q2-tecton-elements 1.51.0 → 1.52.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/dist/cjs/click-elsewhere_2.cjs.entry.js +16 -5
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-9aa4a776.js → index-07285783.js} +86 -2
- package/dist/cjs/index-07285783.js.map +1 -0
- package/dist/cjs/{index-14c3693c.js → index-e7e68b1e.js} +40 -5
- package/dist/cjs/index-e7e68b1e.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-action-sheet.cjs.entry.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge_7.cjs.entry.js +49 -44
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +17 -20
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +4 -2
- package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +4 -4
- package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js +16 -3
- package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +3 -3
- package/dist/cjs/q2-chart-donut.cjs.entry.js +19 -3
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -5
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/q2-currency.cjs.entry.js +14 -2
- package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +3 -3
- package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +3 -3
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +12 -14
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +7 -5
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
- package/dist/cjs/q2-example.cjs.entry.js +145 -0
- package/dist/cjs/q2-example.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js +2 -2
- package/dist/cjs/q2-item.cjs.entry.js +3 -3
- package/dist/cjs/q2-legend.cjs.entry.js +2 -2
- package/dist/cjs/q2-link.cjs.entry.js +4 -4
- package/dist/cjs/q2-link.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +6 -7
- package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-loading-element.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +52 -3
- package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +3 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +4 -4
- package/dist/cjs/q2-optgroup.cjs.entry.js +5 -4
- package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-option.cjs.entry.js +50 -33
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -7
- package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +19 -18
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +3 -3
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +8 -6
- package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +6 -5
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +16 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +6 -4
- package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +6 -4
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +2 -2
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{shapes-be198cc0.js → shapes-5d45fc11.js} +2 -2
- package/dist/cjs/{shapes-be198cc0.js.map → shapes-5d45fc11.js.map} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +16 -18
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +27 -0
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/q2-card.js +2 -0
- package/dist/collection/components/q2-card/q2-card.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +42 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +15 -0
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +41 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +11 -0
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +30 -23
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +4 -3
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +37 -1
- package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +34 -23
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +6 -4
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +5 -0
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +10 -4
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +59 -14
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +29 -11
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +9 -11
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +108 -74
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
- package/dist/collection/components/q2-example/q2-example.css +66 -0
- package/dist/collection/components/q2-example/q2-example.js +312 -0
- package/dist/collection/components/q2-example/q2-example.js.map +1 -0
- package/dist/collection/components/q2-example/test/q2-example.e2e.js +27 -0
- package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -0
- package/dist/collection/components/q2-example/test/q2-example.spec.js +126 -0
- package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-input/formatting/alpha.spec.js +10 -0
- package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/currency.spec.js +20 -0
- package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.spec.js +17 -0
- package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/numeric.spec.js +32 -0
- package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/phone.spec.js +16 -0
- package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.spec.js +28 -0
- package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/ssn.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/tin.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -0
- package/dist/collection/components/q2-input/q2-input.js +58 -44
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +259 -2106
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js +4035 -0
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -0
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-link/q2-link.css +17 -20
- package/dist/collection/components/q2-link/q2-link.js +2 -2
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +6 -6
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-list/q2-list.js +4 -5
- package/dist/collection/components/q2-list/q2-list.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +66 -4
- package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +19 -30
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +164 -0
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -0
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +3 -2
- package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.css +1 -1
- package/dist/collection/components/q2-option/q2-option.js +57 -34
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +110 -106
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +532 -0
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +9 -5
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +18 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +18 -17
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +128 -57
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +17 -4
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +19 -9
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-section/q2-section.js +6 -4
- package/dist/collection/components/q2-section/q2-section.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +5 -3
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +123 -62
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +4 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -2
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +46 -2
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +26 -0
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +4 -3
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +5 -2
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +55 -4
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/helpers.js +63 -41
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +83 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +84 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-calendar.js +16 -18
- package/dist/components/q2-calendar.js.map +1 -1
- package/dist/components/q2-card.js +2 -0
- package/dist/components/q2-card.js.map +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +16 -2
- package/dist/components/q2-chart-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +19 -2
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +5 -4
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-currency.js +15 -2
- package/dist/components/q2-currency.js.map +1 -1
- package/dist/components/q2-data-table.js +1 -1
- package/dist/components/q2-data-table.js.map +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +12 -26
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +6 -3
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-example.d.ts +11 -0
- package/dist/components/q2-example.js +170 -0
- package/dist/components/q2-example.js.map +1 -0
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-input2.js +41 -37
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-link.js +3 -3
- package/dist/components/q2-link.js.map +1 -1
- package/dist/components/q2-list.js +4 -5
- package/dist/components/q2-list.js.map +1 -1
- package/dist/components/q2-loc.js +55 -2
- package/dist/components/q2-loc.js.map +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +3 -2
- package/dist/components/q2-optgroup2.js.map +1 -1
- package/dist/components/q2-option-list2.js +1 -1
- package/dist/components/q2-option2.js +52 -33
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +9 -5
- package/dist/components/q2-pagination.js.map +1 -1
- package/dist/components/q2-pill.js +18 -17
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +16 -4
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +3 -3
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +6 -4
- package/dist/components/q2-section.js.map +1 -1
- package/dist/components/q2-select2.js +6 -4
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-pane.js +3 -2
- package/dist/components/q2-stepper-pane.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +16 -3
- package/dist/components/q2-stepper-vertical.js.map +1 -1
- package/dist/components/q2-stepper.js +4 -2
- package/dist/components/q2-stepper.js.map +1 -1
- package/dist/components/q2-tab-container.js +4 -3
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +5 -2
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +16 -5
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-1e1ce94e.js → index-7a5365e2.js} +40 -5
- package/dist/esm/index-7a5365e2.js.map +1 -0
- package/dist/esm/{index-844fc010.js → index-d18e2a20.js} +86 -3
- package/dist/esm/index-d18e2a20.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q2-action-group.entry.js +2 -2
- package/dist/esm/q2-action-sheet.entry.js +3 -3
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge_7.entry.js +49 -44
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +17 -20
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-card.entry.js +4 -2
- package/dist/esm/q2-card.entry.js.map +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +4 -4
- package/dist/esm/q2-carousel.entry.js +2 -2
- package/dist/esm/q2-chart-area.entry.js +16 -3
- package/dist/esm/q2-chart-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +3 -3
- package/dist/esm/q2-chart-donut.entry.js +19 -3
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +6 -5
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +2 -2
- package/dist/esm/q2-currency.entry.js +14 -2
- package/dist/esm/q2-currency.entry.js.map +1 -1
- package/dist/esm/q2-data-table.entry.js +3 -3
- package/dist/esm/q2-data-table.entry.js.map +1 -1
- package/dist/esm/q2-detail.entry.js +3 -3
- package/dist/esm/q2-dropdown-item.entry.js +12 -14
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +7 -5
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +3 -3
- package/dist/esm/q2-example.entry.js +141 -0
- package/dist/esm/q2-example.entry.js.map +1 -0
- package/dist/esm/q2-formatted-text.entry.js +2 -2
- package/dist/esm/q2-item.entry.js +3 -3
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-link.entry.js +4 -4
- package/dist/esm/q2-link.entry.js.map +1 -1
- package/dist/esm/q2-list.entry.js +6 -7
- package/dist/esm/q2-list.entry.js.map +1 -1
- package/dist/esm/q2-loading-element.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +52 -3
- package/dist/esm/q2-loc.entry.js.map +1 -1
- package/dist/esm/q2-message.entry.js +3 -3
- package/dist/esm/q2-month-picker.entry.js +4 -4
- package/dist/esm/q2-optgroup.entry.js +5 -4
- package/dist/esm/q2-optgroup.entry.js.map +1 -1
- package/dist/esm/q2-option-list.entry.js +2 -2
- package/dist/esm/q2-option.entry.js +50 -33
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +11 -7
- package/dist/esm/q2-pagination.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +19 -18
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-radio-group.entry.js +5 -5
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +3 -3
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-resize-observer.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +8 -6
- package/dist/esm/q2-section.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +6 -5
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +5 -4
- package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +16 -4
- package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
- package/dist/esm/q2-stepper.entry.js +6 -4
- package/dist/esm/q2-stepper.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +6 -4
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-tooltip.entry.js +2 -2
- package/dist/esm/{shapes-36183b2a.js → shapes-c7e1a3fa.js} +2 -2
- package/dist/esm/{shapes-36183b2a.js.map → shapes-c7e1a3fa.js.map} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +77 -0
- package/dist/q2-tecton-elements/{p-b7554a79.js.map → action-sheet-e64cb6f7.js.map} +1 -1
- package/dist/q2-tecton-elements/app-globals-0f993ce5.js +4 -0
- package/dist/q2-tecton-elements/{p-e1255160.js.map → app-globals-0f993ce5.js.map} +1 -1
- package/dist/q2-tecton-elements/charting-1abfb877.js +34872 -0
- package/dist/q2-tecton-elements/{p-2941aafa.js.map → charting-1abfb877.js.map} +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +410 -0
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -0
- package/dist/q2-tecton-elements/dataSample-7b62e101.js +2602 -0
- package/dist/q2-tecton-elements/{p-ad80aef0.js.map → dataSample-7b62e101.js.map} +1 -1
- package/dist/q2-tecton-elements/index-3184c760.js +18168 -0
- package/dist/q2-tecton-elements/{p-f1e887f5.js.map → index-3184c760.js.map} +1 -1
- package/dist/q2-tecton-elements/index-7a5365e2.js +1792 -0
- package/dist/q2-tecton-elements/index-7a5365e2.js.map +1 -0
- package/dist/q2-tecton-elements/index-d18e2a20.js +323 -0
- package/dist/q2-tecton-elements/index-d18e2a20.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +56 -0
- package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → q2-action-group.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1480 -0
- package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → q2-action-sheet.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +101 -0
- package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → q2-avatar.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +5449 -0
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-calendar.entry.js +1313 -0
- package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-card.entry.js +170 -0
- package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +130 -0
- package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → q2-carousel-pane.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-carousel.entry.js +4613 -0
- package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → q2-carousel.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +4330 -0
- package/dist/q2-tecton-elements/q2-chart-area.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1479 -0
- package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → q2-chart-bar.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +4537 -0
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +166 -0
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +223 -0
- package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → q2-checkbox.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +153 -0
- package/dist/q2-tecton-elements/q2-currency.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-data-table.entry.js +622 -0
- package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → q2-data-table.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +128 -0
- package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → q2-detail.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +146 -0
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +432 -0
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +296 -0
- package/dist/q2-tecton-elements/{p-896c7008.entry.js.map → q2-editable-field.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-example.entry.js +152 -0
- package/dist/q2-tecton-elements/q2-example.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +73 -0
- package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → q2-formatted-text.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +158 -0
- package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → q2-item.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-legend.entry.js +146 -0
- package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → q2-legend.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-link.entry.js +83 -0
- package/dist/q2-tecton-elements/q2-link.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-list.entry.js +100 -0
- package/dist/q2-tecton-elements/q2-list.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-loading-element.entry.js +36 -0
- package/dist/q2-tecton-elements/{p-a068c84c.entry.js.map → q2-loading-element.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-loc.entry.js +82 -0
- package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-message.entry.js +99 -0
- package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → q2-message.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +198 -0
- package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → q2-month-picker.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +88 -0
- package/dist/q2-tecton-elements/q2-optgroup.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-option-list.entry.js +585 -0
- package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → q2-option-list.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +110 -0
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-pagination.entry.js +377 -0
- package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-pill.entry.js +434 -0
- package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +227 -0
- package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-radio.entry.js +144 -0
- package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → q2-radio.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +162 -0
- package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → q2-relative-time.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +100 -0
- package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → q2-resize-observer.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +256 -0
- package/dist/q2-tecton-elements/q2-section.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-select.entry.js +684 -0
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +124 -0
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +356 -0
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper.entry.js +332 -0
- package/dist/q2-tecton-elements/q2-stepper.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tag.entry.js +213 -0
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +21 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +364 -0
- package/dist/q2-tecton-elements/{p-f135b265.entry.js.map → q2-textarea.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +105 -0
- package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → q2-tooltip.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/sectorHelper-183cedd0.js +949 -0
- package/dist/q2-tecton-elements/{p-eea5aa01.js.map → sectorHelper-183cedd0.js.map} +1 -1
- package/dist/q2-tecton-elements/shapes-c7e1a3fa.js +132 -0
- package/dist/q2-tecton-elements/{p-50b425de.js.map → shapes-c7e1a3fa.js.map} +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +134 -0
- package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → tecton-tab-pane.entry.js.map} +1 -1
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +4 -5
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +6 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +6 -0
- package/dist/types/components/q2-currency/q2-currency.d.ts +7 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -1
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +2 -2
- package/dist/types/components/q2-example/q2-example.d.ts +119 -0
- package/dist/types/components/q2-input/formatting/date.d.ts +22 -0
- package/dist/types/components/q2-input/formatting/postal.d.ts +197 -0
- package/dist/types/components/q2-input/q2-input.d.ts +15 -12
- package/dist/types/components/q2-loc/q2-loc.d.ts +15 -1
- package/dist/types/components/q2-option/q2-option.d.ts +11 -3
- package/dist/types/components/q2-pill/q2-pill.d.ts +3 -3
- package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
- package/dist/types/components/q2-select/q2-select.d.ts +1 -1
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +6 -0
- package/dist/types/components/q2-tag/q2-tag.d.ts +1 -1
- package/dist/types/components.d.ts +104 -14
- package/dist/types/utils/helpers.d.ts +13 -0
- package/dist/types/utils/index.d.ts +11 -0
- package/package.json +7 -7
- package/dist/cjs/index-14c3693c.js.map +0 -1
- package/dist/cjs/index-9aa4a776.js.map +0 -1
- package/dist/esm/index-1e1ce94e.js.map +0 -1
- package/dist/esm/index-844fc010.js.map +0 -1
- package/dist/q2-tecton-elements/p-06701928.entry.js +0 -2
- package/dist/q2-tecton-elements/p-06701928.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-07d1c3ae.entry.js +0 -2
- package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
- package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
- package/dist/q2-tecton-elements/p-16910682.entry.js +0 -2
- package/dist/q2-tecton-elements/p-16910682.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-188eb162.entry.js +0 -3
- package/dist/q2-tecton-elements/p-1c760a89.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1c760a89.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-1c88d057.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1c88d057.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js +0 -2
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2733583e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-2733583e.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2941aafa.js +0 -39
- package/dist/q2-tecton-elements/p-3e428290.entry.js +0 -2
- package/dist/q2-tecton-elements/p-3e428290.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4774e5b3.entry.js +0 -2
- package/dist/q2-tecton-elements/p-4774e5b3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-490ef8e5.entry.js +0 -2
- package/dist/q2-tecton-elements/p-490ef8e5.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4e10550d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-50b425de.js +0 -2
- package/dist/q2-tecton-elements/p-50f7328f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-50f7328f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5637c486.entry.js +0 -2
- package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
- package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5a834214.entry.js +0 -2
- package/dist/q2-tecton-elements/p-5a834214.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +0 -2
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-72d948b4.entry.js +0 -2
- package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-7903cd15.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7906f49e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7aef0c08.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7c9a0122.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +0 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js +0 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-896c7008.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8d07cf91.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8d2b02e1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-95a7c042.entry.js +0 -2
- package/dist/q2-tecton-elements/p-96b1406c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a068c84c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a5f18e27.js +0 -3
- package/dist/q2-tecton-elements/p-a5f18e27.js.map +0 -1
- package/dist/q2-tecton-elements/p-ac6aa392.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ac6aa392.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad057d10.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ad057d10.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad798287.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ad798287.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad80aef0.js +0 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b1784be3.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b1784be3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b7554a79.js +0 -2
- package/dist/q2-tecton-elements/p-b7de110e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c235ab3f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-e1255160.js +0 -2
- package/dist/q2-tecton-elements/p-e216ef3f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js +0 -2
- package/dist/q2-tecton-elements/p-eea5aa01.js +0 -2
- package/dist/q2-tecton-elements/p-f135b265.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f1e887f5.js +0 -2
- package/dist/q2-tecton-elements/p-f5f23659.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +0 -1
|
@@ -0,0 +1,4613 @@
|
|
|
1
|
+
import { r as e, c as t, h as i, F as n, H as s, g as r } from "./index-7a5365e2.js";
|
|
2
|
+
|
|
3
|
+
import { c as o, l as a, a as l, o as c, i as f } from "./index-d18e2a20.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* SSR Window 4.0.2
|
|
7
|
+
* Better handling for window object in SSR environment
|
|
8
|
+
* https://github.com/nolimits4web/ssr-window
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2021, Vladimir Kharlampidi
|
|
11
|
+
*
|
|
12
|
+
* Licensed under MIT
|
|
13
|
+
*
|
|
14
|
+
* Released on: December 13, 2021
|
|
15
|
+
*/
|
|
16
|
+
/* eslint-disable no-param-reassign */ function isObject$1(e) {
|
|
17
|
+
return e !== null && typeof e === "object" && "constructor" in e && e.constructor === Object;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function extend$1(e = {}, t = {}) {
|
|
21
|
+
Object.keys(t).forEach((i => {
|
|
22
|
+
if (typeof e[i] === "undefined") e[i] = t[i]; else if (isObject$1(t[i]) && isObject$1(e[i]) && Object.keys(t[i]).length > 0) {
|
|
23
|
+
extend$1(e[i], t[i]);
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const u = {
|
|
29
|
+
body: {},
|
|
30
|
+
addEventListener() {},
|
|
31
|
+
removeEventListener() {},
|
|
32
|
+
activeElement: {
|
|
33
|
+
blur() {},
|
|
34
|
+
nodeName: ""
|
|
35
|
+
},
|
|
36
|
+
querySelector() {
|
|
37
|
+
return null;
|
|
38
|
+
},
|
|
39
|
+
querySelectorAll() {
|
|
40
|
+
return [];
|
|
41
|
+
},
|
|
42
|
+
getElementById() {
|
|
43
|
+
return null;
|
|
44
|
+
},
|
|
45
|
+
createEvent() {
|
|
46
|
+
return {
|
|
47
|
+
initEvent() {}
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
createElement() {
|
|
51
|
+
return {
|
|
52
|
+
children: [],
|
|
53
|
+
childNodes: [],
|
|
54
|
+
style: {},
|
|
55
|
+
setAttribute() {},
|
|
56
|
+
getElementsByTagName() {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
createElementNS() {
|
|
62
|
+
return {};
|
|
63
|
+
},
|
|
64
|
+
importNode() {
|
|
65
|
+
return null;
|
|
66
|
+
},
|
|
67
|
+
location: {
|
|
68
|
+
hash: "",
|
|
69
|
+
host: "",
|
|
70
|
+
hostname: "",
|
|
71
|
+
href: "",
|
|
72
|
+
origin: "",
|
|
73
|
+
pathname: "",
|
|
74
|
+
protocol: "",
|
|
75
|
+
search: ""
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
function getDocument() {
|
|
80
|
+
const e = typeof document !== "undefined" ? document : {};
|
|
81
|
+
extend$1(e, u);
|
|
82
|
+
return e;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const d = {
|
|
86
|
+
document: u,
|
|
87
|
+
navigator: {
|
|
88
|
+
userAgent: ""
|
|
89
|
+
},
|
|
90
|
+
location: {
|
|
91
|
+
hash: "",
|
|
92
|
+
host: "",
|
|
93
|
+
hostname: "",
|
|
94
|
+
href: "",
|
|
95
|
+
origin: "",
|
|
96
|
+
pathname: "",
|
|
97
|
+
protocol: "",
|
|
98
|
+
search: ""
|
|
99
|
+
},
|
|
100
|
+
history: {
|
|
101
|
+
replaceState() {},
|
|
102
|
+
pushState() {},
|
|
103
|
+
go() {},
|
|
104
|
+
back() {}
|
|
105
|
+
},
|
|
106
|
+
CustomEvent: function CustomEvent() {
|
|
107
|
+
return this;
|
|
108
|
+
},
|
|
109
|
+
addEventListener() {},
|
|
110
|
+
removeEventListener() {},
|
|
111
|
+
getComputedStyle() {
|
|
112
|
+
return {
|
|
113
|
+
getPropertyValue() {
|
|
114
|
+
return "";
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
Image() {},
|
|
119
|
+
Date() {},
|
|
120
|
+
screen: {},
|
|
121
|
+
setTimeout() {},
|
|
122
|
+
clearTimeout() {},
|
|
123
|
+
matchMedia() {
|
|
124
|
+
return {};
|
|
125
|
+
},
|
|
126
|
+
requestAnimationFrame(e) {
|
|
127
|
+
if (typeof setTimeout === "undefined") {
|
|
128
|
+
e();
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return setTimeout(e, 0);
|
|
132
|
+
},
|
|
133
|
+
cancelAnimationFrame(e) {
|
|
134
|
+
if (typeof setTimeout === "undefined") {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
clearTimeout(e);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
function getWindow() {
|
|
142
|
+
const e = typeof window !== "undefined" ? window : {};
|
|
143
|
+
extend$1(e, d);
|
|
144
|
+
return e;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Dom7 4.0.6
|
|
149
|
+
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
|
150
|
+
* https://framework7.io/docs/dom7.html
|
|
151
|
+
*
|
|
152
|
+
* Copyright 2023, Vladimir Kharlampidi
|
|
153
|
+
*
|
|
154
|
+
* Licensed under MIT
|
|
155
|
+
*
|
|
156
|
+
* Released on: February 2, 2023
|
|
157
|
+
*/
|
|
158
|
+
/* eslint-disable no-proto */ function makeReactive(e) {
|
|
159
|
+
const t = e.__proto__;
|
|
160
|
+
Object.defineProperty(e, "__proto__", {
|
|
161
|
+
get() {
|
|
162
|
+
return t;
|
|
163
|
+
},
|
|
164
|
+
set(e) {
|
|
165
|
+
t.__proto__ = e;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
class p extends Array {
|
|
171
|
+
constructor(e) {
|
|
172
|
+
if (typeof e === "number") {
|
|
173
|
+
super(e);
|
|
174
|
+
} else {
|
|
175
|
+
super(...e || []);
|
|
176
|
+
makeReactive(this);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function arrayFlat(e = []) {
|
|
182
|
+
const t = [];
|
|
183
|
+
e.forEach((e => {
|
|
184
|
+
if (Array.isArray(e)) {
|
|
185
|
+
t.push(...arrayFlat(e));
|
|
186
|
+
} else {
|
|
187
|
+
t.push(e);
|
|
188
|
+
}
|
|
189
|
+
}));
|
|
190
|
+
return t;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function arrayFilter(e, t) {
|
|
194
|
+
return Array.prototype.filter.call(e, t);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function arrayUnique(e) {
|
|
198
|
+
const t = [];
|
|
199
|
+
for (let i = 0; i < e.length; i += 1) {
|
|
200
|
+
if (t.indexOf(e[i]) === -1) t.push(e[i]);
|
|
201
|
+
}
|
|
202
|
+
return t;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// eslint-disable-next-line
|
|
206
|
+
function qsa(e, t) {
|
|
207
|
+
if (typeof e !== "string") {
|
|
208
|
+
return [ e ];
|
|
209
|
+
}
|
|
210
|
+
const i = [];
|
|
211
|
+
const n = t.querySelectorAll(e);
|
|
212
|
+
for (let e = 0; e < n.length; e += 1) {
|
|
213
|
+
i.push(n[e]);
|
|
214
|
+
}
|
|
215
|
+
return i;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function $(e, t) {
|
|
219
|
+
const i = getWindow();
|
|
220
|
+
const n = getDocument();
|
|
221
|
+
let s = [];
|
|
222
|
+
if (!t && e instanceof p) {
|
|
223
|
+
return e;
|
|
224
|
+
}
|
|
225
|
+
if (!e) {
|
|
226
|
+
return new p(s);
|
|
227
|
+
}
|
|
228
|
+
if (typeof e === "string") {
|
|
229
|
+
const i = e.trim();
|
|
230
|
+
if (i.indexOf("<") >= 0 && i.indexOf(">") >= 0) {
|
|
231
|
+
let e = "div";
|
|
232
|
+
if (i.indexOf("<li") === 0) e = "ul";
|
|
233
|
+
if (i.indexOf("<tr") === 0) e = "tbody";
|
|
234
|
+
if (i.indexOf("<td") === 0 || i.indexOf("<th") === 0) e = "tr";
|
|
235
|
+
if (i.indexOf("<tbody") === 0) e = "table";
|
|
236
|
+
if (i.indexOf("<option") === 0) e = "select";
|
|
237
|
+
const t = n.createElement(e);
|
|
238
|
+
t.innerHTML = i;
|
|
239
|
+
for (let e = 0; e < t.childNodes.length; e += 1) {
|
|
240
|
+
s.push(t.childNodes[e]);
|
|
241
|
+
}
|
|
242
|
+
} else {
|
|
243
|
+
s = qsa(e.trim(), t || n);
|
|
244
|
+
}
|
|
245
|
+
// arr = qsa(selector, document);
|
|
246
|
+
} else if (e.nodeType || e === i || e === n) {
|
|
247
|
+
s.push(e);
|
|
248
|
+
} else if (Array.isArray(e)) {
|
|
249
|
+
if (e instanceof p) return e;
|
|
250
|
+
s = e;
|
|
251
|
+
}
|
|
252
|
+
return new p(arrayUnique(s));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
$.fn = p.prototype;
|
|
256
|
+
|
|
257
|
+
// eslint-disable-next-line
|
|
258
|
+
function addClass(...e) {
|
|
259
|
+
const t = arrayFlat(e.map((e => e.split(" "))));
|
|
260
|
+
this.forEach((e => {
|
|
261
|
+
e.classList.add(...t);
|
|
262
|
+
}));
|
|
263
|
+
return this;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function removeClass(...e) {
|
|
267
|
+
const t = arrayFlat(e.map((e => e.split(" "))));
|
|
268
|
+
this.forEach((e => {
|
|
269
|
+
e.classList.remove(...t);
|
|
270
|
+
}));
|
|
271
|
+
return this;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function toggleClass(...e) {
|
|
275
|
+
const t = arrayFlat(e.map((e => e.split(" "))));
|
|
276
|
+
this.forEach((e => {
|
|
277
|
+
t.forEach((t => {
|
|
278
|
+
e.classList.toggle(t);
|
|
279
|
+
}));
|
|
280
|
+
}));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function hasClass(...e) {
|
|
284
|
+
const t = arrayFlat(e.map((e => e.split(" "))));
|
|
285
|
+
return arrayFilter(this, (e => t.filter((t => e.classList.contains(t))).length > 0)).length > 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function attr(e, t) {
|
|
289
|
+
if (arguments.length === 1 && typeof e === "string") {
|
|
290
|
+
// Get attr
|
|
291
|
+
if (this[0]) return this[0].getAttribute(e);
|
|
292
|
+
return undefined;
|
|
293
|
+
}
|
|
294
|
+
// Set attrs
|
|
295
|
+
for (let i = 0; i < this.length; i += 1) {
|
|
296
|
+
if (arguments.length === 2) {
|
|
297
|
+
// String
|
|
298
|
+
this[i].setAttribute(e, t);
|
|
299
|
+
} else {
|
|
300
|
+
// Object
|
|
301
|
+
for (const t in e) {
|
|
302
|
+
this[i][t] = e[t];
|
|
303
|
+
this[i].setAttribute(t, e[t]);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return this;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function removeAttr(e) {
|
|
311
|
+
for (let t = 0; t < this.length; t += 1) {
|
|
312
|
+
this[t].removeAttribute(e);
|
|
313
|
+
}
|
|
314
|
+
return this;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function transform(e) {
|
|
318
|
+
for (let t = 0; t < this.length; t += 1) {
|
|
319
|
+
this[t].style.transform = e;
|
|
320
|
+
}
|
|
321
|
+
return this;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function transition$1(e) {
|
|
325
|
+
for (let t = 0; t < this.length; t += 1) {
|
|
326
|
+
this[t].style.transitionDuration = typeof e !== "string" ? `${e}ms` : e;
|
|
327
|
+
}
|
|
328
|
+
return this;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function on(...e) {
|
|
332
|
+
let [t, i, n, s] = e;
|
|
333
|
+
if (typeof e[1] === "function") {
|
|
334
|
+
[t, n, s] = e;
|
|
335
|
+
i = undefined;
|
|
336
|
+
}
|
|
337
|
+
if (!s) s = false;
|
|
338
|
+
function handleLiveEvent(e) {
|
|
339
|
+
const t = e.target;
|
|
340
|
+
if (!t) return;
|
|
341
|
+
const s = e.target.dom7EventData || [];
|
|
342
|
+
if (s.indexOf(e) < 0) {
|
|
343
|
+
s.unshift(e);
|
|
344
|
+
}
|
|
345
|
+
if ($(t).is(i)) n.apply(t, s); else {
|
|
346
|
+
const e = $(t).parents();
|
|
347
|
+
// eslint-disable-line
|
|
348
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
349
|
+
if ($(e[t]).is(i)) n.apply(e[t], s);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
function handleEvent(e) {
|
|
354
|
+
const t = e && e.target ? e.target.dom7EventData || [] : [];
|
|
355
|
+
if (t.indexOf(e) < 0) {
|
|
356
|
+
t.unshift(e);
|
|
357
|
+
}
|
|
358
|
+
n.apply(this, t);
|
|
359
|
+
}
|
|
360
|
+
const r = t.split(" ");
|
|
361
|
+
let o;
|
|
362
|
+
for (let e = 0; e < this.length; e += 1) {
|
|
363
|
+
const t = this[e];
|
|
364
|
+
if (!i) {
|
|
365
|
+
for (o = 0; o < r.length; o += 1) {
|
|
366
|
+
const e = r[o];
|
|
367
|
+
if (!t.dom7Listeners) t.dom7Listeners = {};
|
|
368
|
+
if (!t.dom7Listeners[e]) t.dom7Listeners[e] = [];
|
|
369
|
+
t.dom7Listeners[e].push({
|
|
370
|
+
listener: n,
|
|
371
|
+
proxyListener: handleEvent
|
|
372
|
+
});
|
|
373
|
+
t.addEventListener(e, handleEvent, s);
|
|
374
|
+
}
|
|
375
|
+
} else {
|
|
376
|
+
// Live events
|
|
377
|
+
for (o = 0; o < r.length; o += 1) {
|
|
378
|
+
const e = r[o];
|
|
379
|
+
if (!t.dom7LiveListeners) t.dom7LiveListeners = {};
|
|
380
|
+
if (!t.dom7LiveListeners[e]) t.dom7LiveListeners[e] = [];
|
|
381
|
+
t.dom7LiveListeners[e].push({
|
|
382
|
+
listener: n,
|
|
383
|
+
proxyListener: handleLiveEvent
|
|
384
|
+
});
|
|
385
|
+
t.addEventListener(e, handleLiveEvent, s);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function off(...e) {
|
|
393
|
+
let [t, i, n, s] = e;
|
|
394
|
+
if (typeof e[1] === "function") {
|
|
395
|
+
[t, n, s] = e;
|
|
396
|
+
i = undefined;
|
|
397
|
+
}
|
|
398
|
+
if (!s) s = false;
|
|
399
|
+
const r = t.split(" ");
|
|
400
|
+
for (let e = 0; e < r.length; e += 1) {
|
|
401
|
+
const t = r[e];
|
|
402
|
+
for (let e = 0; e < this.length; e += 1) {
|
|
403
|
+
const r = this[e];
|
|
404
|
+
let o;
|
|
405
|
+
if (!i && r.dom7Listeners) {
|
|
406
|
+
o = r.dom7Listeners[t];
|
|
407
|
+
} else if (i && r.dom7LiveListeners) {
|
|
408
|
+
o = r.dom7LiveListeners[t];
|
|
409
|
+
}
|
|
410
|
+
if (o && o.length) {
|
|
411
|
+
for (let e = o.length - 1; e >= 0; e -= 1) {
|
|
412
|
+
const i = o[e];
|
|
413
|
+
if (n && i.listener === n) {
|
|
414
|
+
r.removeEventListener(t, i.proxyListener, s);
|
|
415
|
+
o.splice(e, 1);
|
|
416
|
+
} else if (n && i.listener && i.listener.dom7proxy && i.listener.dom7proxy === n) {
|
|
417
|
+
r.removeEventListener(t, i.proxyListener, s);
|
|
418
|
+
o.splice(e, 1);
|
|
419
|
+
} else if (!n) {
|
|
420
|
+
r.removeEventListener(t, i.proxyListener, s);
|
|
421
|
+
o.splice(e, 1);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return this;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function trigger(...e) {
|
|
431
|
+
const t = getWindow();
|
|
432
|
+
const i = e[0].split(" ");
|
|
433
|
+
const n = e[1];
|
|
434
|
+
for (let s = 0; s < i.length; s += 1) {
|
|
435
|
+
const r = i[s];
|
|
436
|
+
for (let i = 0; i < this.length; i += 1) {
|
|
437
|
+
const s = this[i];
|
|
438
|
+
if (t.CustomEvent) {
|
|
439
|
+
const i = new t.CustomEvent(r, {
|
|
440
|
+
detail: n,
|
|
441
|
+
bubbles: true,
|
|
442
|
+
cancelable: true
|
|
443
|
+
});
|
|
444
|
+
s.dom7EventData = e.filter(((e, t) => t > 0));
|
|
445
|
+
s.dispatchEvent(i);
|
|
446
|
+
s.dom7EventData = [];
|
|
447
|
+
delete s.dom7EventData;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
return this;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function transitionEnd$1(e) {
|
|
455
|
+
const t = this;
|
|
456
|
+
function fireCallBack(i) {
|
|
457
|
+
if (i.target !== this) return;
|
|
458
|
+
e.call(this, i);
|
|
459
|
+
t.off("transitionend", fireCallBack);
|
|
460
|
+
}
|
|
461
|
+
if (e) {
|
|
462
|
+
t.on("transitionend", fireCallBack);
|
|
463
|
+
}
|
|
464
|
+
return this;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
function outerWidth(e) {
|
|
468
|
+
if (this.length > 0) {
|
|
469
|
+
if (e) {
|
|
470
|
+
const e = this.styles();
|
|
471
|
+
return this[0].offsetWidth + parseFloat(e.getPropertyValue("margin-right")) + parseFloat(e.getPropertyValue("margin-left"));
|
|
472
|
+
}
|
|
473
|
+
return this[0].offsetWidth;
|
|
474
|
+
}
|
|
475
|
+
return null;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function outerHeight(e) {
|
|
479
|
+
if (this.length > 0) {
|
|
480
|
+
if (e) {
|
|
481
|
+
const e = this.styles();
|
|
482
|
+
return this[0].offsetHeight + parseFloat(e.getPropertyValue("margin-top")) + parseFloat(e.getPropertyValue("margin-bottom"));
|
|
483
|
+
}
|
|
484
|
+
return this[0].offsetHeight;
|
|
485
|
+
}
|
|
486
|
+
return null;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function offset() {
|
|
490
|
+
if (this.length > 0) {
|
|
491
|
+
const e = getWindow();
|
|
492
|
+
const t = getDocument();
|
|
493
|
+
const i = this[0];
|
|
494
|
+
const n = i.getBoundingClientRect();
|
|
495
|
+
const s = t.body;
|
|
496
|
+
const r = i.clientTop || s.clientTop || 0;
|
|
497
|
+
const o = i.clientLeft || s.clientLeft || 0;
|
|
498
|
+
const a = i === e ? e.scrollY : i.scrollTop;
|
|
499
|
+
const l = i === e ? e.scrollX : i.scrollLeft;
|
|
500
|
+
return {
|
|
501
|
+
top: n.top + a - r,
|
|
502
|
+
left: n.left + l - o
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
return null;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function styles() {
|
|
509
|
+
const e = getWindow();
|
|
510
|
+
if (this[0]) return e.getComputedStyle(this[0], null);
|
|
511
|
+
return {};
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
function css(e, t) {
|
|
515
|
+
const i = getWindow();
|
|
516
|
+
let n;
|
|
517
|
+
if (arguments.length === 1) {
|
|
518
|
+
if (typeof e === "string") {
|
|
519
|
+
// .css('width')
|
|
520
|
+
if (this[0]) return i.getComputedStyle(this[0], null).getPropertyValue(e);
|
|
521
|
+
} else {
|
|
522
|
+
// .css({ width: '100px' })
|
|
523
|
+
for (n = 0; n < this.length; n += 1) {
|
|
524
|
+
for (const t in e) {
|
|
525
|
+
this[n].style[t] = e[t];
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return this;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
if (arguments.length === 2 && typeof e === "string") {
|
|
532
|
+
// .css('width', '100px')
|
|
533
|
+
for (n = 0; n < this.length; n += 1) {
|
|
534
|
+
this[n].style[e] = t;
|
|
535
|
+
}
|
|
536
|
+
return this;
|
|
537
|
+
}
|
|
538
|
+
return this;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
function each(e) {
|
|
542
|
+
if (!e) return this;
|
|
543
|
+
this.forEach(((t, i) => {
|
|
544
|
+
e.apply(t, [ t, i ]);
|
|
545
|
+
}));
|
|
546
|
+
return this;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function filter(e) {
|
|
550
|
+
const t = arrayFilter(this, e);
|
|
551
|
+
return $(t);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function html(e) {
|
|
555
|
+
if (typeof e === "undefined") {
|
|
556
|
+
return this[0] ? this[0].innerHTML : null;
|
|
557
|
+
}
|
|
558
|
+
for (let t = 0; t < this.length; t += 1) {
|
|
559
|
+
this[t].innerHTML = e;
|
|
560
|
+
}
|
|
561
|
+
return this;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
function text(e) {
|
|
565
|
+
if (typeof e === "undefined") {
|
|
566
|
+
return this[0] ? this[0].textContent.trim() : null;
|
|
567
|
+
}
|
|
568
|
+
for (let t = 0; t < this.length; t += 1) {
|
|
569
|
+
this[t].textContent = e;
|
|
570
|
+
}
|
|
571
|
+
return this;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
function is(e) {
|
|
575
|
+
const t = getWindow();
|
|
576
|
+
const i = getDocument();
|
|
577
|
+
const n = this[0];
|
|
578
|
+
let s;
|
|
579
|
+
let r;
|
|
580
|
+
if (!n || typeof e === "undefined") return false;
|
|
581
|
+
if (typeof e === "string") {
|
|
582
|
+
if (n.matches) return n.matches(e);
|
|
583
|
+
if (n.webkitMatchesSelector) return n.webkitMatchesSelector(e);
|
|
584
|
+
if (n.msMatchesSelector) return n.msMatchesSelector(e);
|
|
585
|
+
s = $(e);
|
|
586
|
+
for (r = 0; r < s.length; r += 1) {
|
|
587
|
+
if (s[r] === n) return true;
|
|
588
|
+
}
|
|
589
|
+
return false;
|
|
590
|
+
}
|
|
591
|
+
if (e === i) {
|
|
592
|
+
return n === i;
|
|
593
|
+
}
|
|
594
|
+
if (e === t) {
|
|
595
|
+
return n === t;
|
|
596
|
+
}
|
|
597
|
+
if (e.nodeType || e instanceof p) {
|
|
598
|
+
s = e.nodeType ? [ e ] : e;
|
|
599
|
+
for (r = 0; r < s.length; r += 1) {
|
|
600
|
+
if (s[r] === n) return true;
|
|
601
|
+
}
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
return false;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
function index() {
|
|
608
|
+
let e = this[0];
|
|
609
|
+
let t;
|
|
610
|
+
if (e) {
|
|
611
|
+
t = 0;
|
|
612
|
+
// eslint-disable-next-line
|
|
613
|
+
while ((e = e.previousSibling) !== null) {
|
|
614
|
+
if (e.nodeType === 1) t += 1;
|
|
615
|
+
}
|
|
616
|
+
return t;
|
|
617
|
+
}
|
|
618
|
+
return undefined;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
function eq(e) {
|
|
622
|
+
if (typeof e === "undefined") return this;
|
|
623
|
+
const t = this.length;
|
|
624
|
+
if (e > t - 1) {
|
|
625
|
+
return $([]);
|
|
626
|
+
}
|
|
627
|
+
if (e < 0) {
|
|
628
|
+
const i = t + e;
|
|
629
|
+
if (i < 0) return $([]);
|
|
630
|
+
return $([ this[i] ]);
|
|
631
|
+
}
|
|
632
|
+
return $([ this[e] ]);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
function append(...e) {
|
|
636
|
+
let t;
|
|
637
|
+
const i = getDocument();
|
|
638
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
639
|
+
t = e[n];
|
|
640
|
+
for (let e = 0; e < this.length; e += 1) {
|
|
641
|
+
if (typeof t === "string") {
|
|
642
|
+
const n = i.createElement("div");
|
|
643
|
+
n.innerHTML = t;
|
|
644
|
+
while (n.firstChild) {
|
|
645
|
+
this[e].appendChild(n.firstChild);
|
|
646
|
+
}
|
|
647
|
+
} else if (t instanceof p) {
|
|
648
|
+
for (let i = 0; i < t.length; i += 1) {
|
|
649
|
+
this[e].appendChild(t[i]);
|
|
650
|
+
}
|
|
651
|
+
} else {
|
|
652
|
+
this[e].appendChild(t);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
return this;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
function prepend(e) {
|
|
660
|
+
const t = getDocument();
|
|
661
|
+
let i;
|
|
662
|
+
let n;
|
|
663
|
+
for (i = 0; i < this.length; i += 1) {
|
|
664
|
+
if (typeof e === "string") {
|
|
665
|
+
const s = t.createElement("div");
|
|
666
|
+
s.innerHTML = e;
|
|
667
|
+
for (n = s.childNodes.length - 1; n >= 0; n -= 1) {
|
|
668
|
+
this[i].insertBefore(s.childNodes[n], this[i].childNodes[0]);
|
|
669
|
+
}
|
|
670
|
+
} else if (e instanceof p) {
|
|
671
|
+
for (n = 0; n < e.length; n += 1) {
|
|
672
|
+
this[i].insertBefore(e[n], this[i].childNodes[0]);
|
|
673
|
+
}
|
|
674
|
+
} else {
|
|
675
|
+
this[i].insertBefore(e, this[i].childNodes[0]);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
return this;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
function next(e) {
|
|
682
|
+
if (this.length > 0) {
|
|
683
|
+
if (e) {
|
|
684
|
+
if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(e)) {
|
|
685
|
+
return $([ this[0].nextElementSibling ]);
|
|
686
|
+
}
|
|
687
|
+
return $([]);
|
|
688
|
+
}
|
|
689
|
+
if (this[0].nextElementSibling) return $([ this[0].nextElementSibling ]);
|
|
690
|
+
return $([]);
|
|
691
|
+
}
|
|
692
|
+
return $([]);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
function nextAll(e) {
|
|
696
|
+
const t = [];
|
|
697
|
+
let i = this[0];
|
|
698
|
+
if (!i) return $([]);
|
|
699
|
+
while (i.nextElementSibling) {
|
|
700
|
+
const n = i.nextElementSibling;
|
|
701
|
+
// eslint-disable-line
|
|
702
|
+
if (e) {
|
|
703
|
+
if ($(n).is(e)) t.push(n);
|
|
704
|
+
} else t.push(n);
|
|
705
|
+
i = n;
|
|
706
|
+
}
|
|
707
|
+
return $(t);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
function prev(e) {
|
|
711
|
+
if (this.length > 0) {
|
|
712
|
+
const t = this[0];
|
|
713
|
+
if (e) {
|
|
714
|
+
if (t.previousElementSibling && $(t.previousElementSibling).is(e)) {
|
|
715
|
+
return $([ t.previousElementSibling ]);
|
|
716
|
+
}
|
|
717
|
+
return $([]);
|
|
718
|
+
}
|
|
719
|
+
if (t.previousElementSibling) return $([ t.previousElementSibling ]);
|
|
720
|
+
return $([]);
|
|
721
|
+
}
|
|
722
|
+
return $([]);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function prevAll(e) {
|
|
726
|
+
const t = [];
|
|
727
|
+
let i = this[0];
|
|
728
|
+
if (!i) return $([]);
|
|
729
|
+
while (i.previousElementSibling) {
|
|
730
|
+
const n = i.previousElementSibling;
|
|
731
|
+
// eslint-disable-line
|
|
732
|
+
if (e) {
|
|
733
|
+
if ($(n).is(e)) t.push(n);
|
|
734
|
+
} else t.push(n);
|
|
735
|
+
i = n;
|
|
736
|
+
}
|
|
737
|
+
return $(t);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
function parent(e) {
|
|
741
|
+
const t = [];
|
|
742
|
+
// eslint-disable-line
|
|
743
|
+
for (let i = 0; i < this.length; i += 1) {
|
|
744
|
+
if (this[i].parentNode !== null) {
|
|
745
|
+
if (e) {
|
|
746
|
+
if ($(this[i].parentNode).is(e)) t.push(this[i].parentNode);
|
|
747
|
+
} else {
|
|
748
|
+
t.push(this[i].parentNode);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
return $(t);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
function parents(e) {
|
|
756
|
+
const t = [];
|
|
757
|
+
// eslint-disable-line
|
|
758
|
+
for (let i = 0; i < this.length; i += 1) {
|
|
759
|
+
let n = this[i].parentNode;
|
|
760
|
+
// eslint-disable-line
|
|
761
|
+
while (n) {
|
|
762
|
+
if (e) {
|
|
763
|
+
if ($(n).is(e)) t.push(n);
|
|
764
|
+
} else {
|
|
765
|
+
t.push(n);
|
|
766
|
+
}
|
|
767
|
+
n = n.parentNode;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
return $(t);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
function closest(e) {
|
|
774
|
+
let t = this;
|
|
775
|
+
// eslint-disable-line
|
|
776
|
+
if (typeof e === "undefined") {
|
|
777
|
+
return $([]);
|
|
778
|
+
}
|
|
779
|
+
if (!t.is(e)) {
|
|
780
|
+
t = t.parents(e).eq(0);
|
|
781
|
+
}
|
|
782
|
+
return t;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
function find(e) {
|
|
786
|
+
const t = [];
|
|
787
|
+
for (let i = 0; i < this.length; i += 1) {
|
|
788
|
+
const n = this[i].querySelectorAll(e);
|
|
789
|
+
for (let e = 0; e < n.length; e += 1) {
|
|
790
|
+
t.push(n[e]);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
return $(t);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function children(e) {
|
|
797
|
+
const t = [];
|
|
798
|
+
// eslint-disable-line
|
|
799
|
+
for (let i = 0; i < this.length; i += 1) {
|
|
800
|
+
const n = this[i].children;
|
|
801
|
+
for (let i = 0; i < n.length; i += 1) {
|
|
802
|
+
if (!e || $(n[i]).is(e)) {
|
|
803
|
+
t.push(n[i]);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
return $(t);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
function remove() {
|
|
811
|
+
for (let e = 0; e < this.length; e += 1) {
|
|
812
|
+
if (this[e].parentNode) this[e].parentNode.removeChild(this[e]);
|
|
813
|
+
}
|
|
814
|
+
return this;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
const h = {
|
|
818
|
+
addClass,
|
|
819
|
+
removeClass,
|
|
820
|
+
hasClass,
|
|
821
|
+
toggleClass,
|
|
822
|
+
attr,
|
|
823
|
+
removeAttr,
|
|
824
|
+
transform,
|
|
825
|
+
transition: transition$1,
|
|
826
|
+
on,
|
|
827
|
+
off,
|
|
828
|
+
trigger,
|
|
829
|
+
transitionEnd: transitionEnd$1,
|
|
830
|
+
outerWidth,
|
|
831
|
+
outerHeight,
|
|
832
|
+
styles,
|
|
833
|
+
offset,
|
|
834
|
+
css,
|
|
835
|
+
each,
|
|
836
|
+
html,
|
|
837
|
+
text,
|
|
838
|
+
is,
|
|
839
|
+
index,
|
|
840
|
+
eq,
|
|
841
|
+
append,
|
|
842
|
+
prepend,
|
|
843
|
+
next,
|
|
844
|
+
nextAll,
|
|
845
|
+
prev,
|
|
846
|
+
prevAll,
|
|
847
|
+
parent,
|
|
848
|
+
parents,
|
|
849
|
+
closest,
|
|
850
|
+
find,
|
|
851
|
+
children,
|
|
852
|
+
filter,
|
|
853
|
+
remove
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
Object.keys(h).forEach((e => {
|
|
857
|
+
Object.defineProperty($.fn, e, {
|
|
858
|
+
value: h[e],
|
|
859
|
+
writable: true
|
|
860
|
+
});
|
|
861
|
+
}));
|
|
862
|
+
|
|
863
|
+
function deleteProps(e) {
|
|
864
|
+
const t = e;
|
|
865
|
+
Object.keys(t).forEach((e => {
|
|
866
|
+
try {
|
|
867
|
+
t[e] = null;
|
|
868
|
+
} catch (e) {// no getter for object
|
|
869
|
+
}
|
|
870
|
+
try {
|
|
871
|
+
delete t[e];
|
|
872
|
+
} catch (e) {// something got wrong
|
|
873
|
+
}
|
|
874
|
+
}));
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
function nextTick(e, t = 0) {
|
|
878
|
+
return setTimeout(e, t);
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
function now() {
|
|
882
|
+
return Date.now();
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
function getComputedStyle$1(e) {
|
|
886
|
+
const t = getWindow();
|
|
887
|
+
let i;
|
|
888
|
+
if (t.getComputedStyle) {
|
|
889
|
+
i = t.getComputedStyle(e, null);
|
|
890
|
+
}
|
|
891
|
+
if (!i && e.currentStyle) {
|
|
892
|
+
i = e.currentStyle;
|
|
893
|
+
}
|
|
894
|
+
if (!i) {
|
|
895
|
+
i = e.style;
|
|
896
|
+
}
|
|
897
|
+
return i;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
function getTranslate(e, t = "x") {
|
|
901
|
+
const i = getWindow();
|
|
902
|
+
let n;
|
|
903
|
+
let s;
|
|
904
|
+
let r;
|
|
905
|
+
const o = getComputedStyle$1(e);
|
|
906
|
+
if (i.WebKitCSSMatrix) {
|
|
907
|
+
s = o.transform || o.webkitTransform;
|
|
908
|
+
if (s.split(",").length > 6) {
|
|
909
|
+
s = s.split(", ").map((e => e.replace(",", "."))).join(", ");
|
|
910
|
+
}
|
|
911
|
+
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
912
|
+
// empty string instead in this case
|
|
913
|
+
r = new i.WebKitCSSMatrix(s === "none" ? "" : s);
|
|
914
|
+
} else {
|
|
915
|
+
r = o.MozTransform || o.OTransform || o.MsTransform || o.msTransform || o.transform || o.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,");
|
|
916
|
+
n = r.toString().split(",");
|
|
917
|
+
}
|
|
918
|
+
if (t === "x") {
|
|
919
|
+
// Latest Chrome and webkits Fix
|
|
920
|
+
if (i.WebKitCSSMatrix) s = r.m41; // Crazy IE10 Matrix
|
|
921
|
+
else if (n.length === 16) s = parseFloat(n[12]); // Normal Browsers
|
|
922
|
+
else s = parseFloat(n[4]);
|
|
923
|
+
}
|
|
924
|
+
if (t === "y") {
|
|
925
|
+
// Latest Chrome and webkits Fix
|
|
926
|
+
if (i.WebKitCSSMatrix) s = r.m42; // Crazy IE10 Matrix
|
|
927
|
+
else if (n.length === 16) s = parseFloat(n[13]); // Normal Browsers
|
|
928
|
+
else s = parseFloat(n[5]);
|
|
929
|
+
}
|
|
930
|
+
return s || 0;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
function isObject(e) {
|
|
934
|
+
return typeof e === "object" && e !== null && e.constructor && Object.prototype.toString.call(e).slice(8, -1) === "Object";
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
function isNode(e) {
|
|
938
|
+
// eslint-disable-next-line
|
|
939
|
+
if (typeof window !== "undefined" && typeof window.HTMLElement !== "undefined") {
|
|
940
|
+
return e instanceof HTMLElement;
|
|
941
|
+
}
|
|
942
|
+
return e && (e.nodeType === 1 || e.nodeType === 11);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
function extend(...e) {
|
|
946
|
+
const t = Object(e[0]);
|
|
947
|
+
const i = [ "__proto__", "constructor", "prototype" ];
|
|
948
|
+
for (let n = 1; n < e.length; n += 1) {
|
|
949
|
+
const s = e[n];
|
|
950
|
+
if (s !== undefined && s !== null && !isNode(s)) {
|
|
951
|
+
const e = Object.keys(Object(s)).filter((e => i.indexOf(e) < 0));
|
|
952
|
+
for (let i = 0, n = e.length; i < n; i += 1) {
|
|
953
|
+
const n = e[i];
|
|
954
|
+
const r = Object.getOwnPropertyDescriptor(s, n);
|
|
955
|
+
if (r !== undefined && r.enumerable) {
|
|
956
|
+
if (isObject(t[n]) && isObject(s[n])) {
|
|
957
|
+
if (s[n].__swiper__) {
|
|
958
|
+
t[n] = s[n];
|
|
959
|
+
} else {
|
|
960
|
+
extend(t[n], s[n]);
|
|
961
|
+
}
|
|
962
|
+
} else if (!isObject(t[n]) && isObject(s[n])) {
|
|
963
|
+
t[n] = {};
|
|
964
|
+
if (s[n].__swiper__) {
|
|
965
|
+
t[n] = s[n];
|
|
966
|
+
} else {
|
|
967
|
+
extend(t[n], s[n]);
|
|
968
|
+
}
|
|
969
|
+
} else {
|
|
970
|
+
t[n] = s[n];
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
return t;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
function setCSSProperty(e, t, i) {
|
|
980
|
+
e.style.setProperty(t, i);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
function animateCSSModeScroll({swiper: e, targetPosition: t, side: i}) {
|
|
984
|
+
const n = getWindow();
|
|
985
|
+
const s = -e.translate;
|
|
986
|
+
let r = null;
|
|
987
|
+
let o;
|
|
988
|
+
const a = e.params.speed;
|
|
989
|
+
e.wrapperEl.style.scrollSnapType = "none";
|
|
990
|
+
n.cancelAnimationFrame(e.cssModeFrameID);
|
|
991
|
+
const l = t > s ? "next" : "prev";
|
|
992
|
+
const isOutOfBound = (e, t) => l === "next" && e >= t || l === "prev" && e <= t;
|
|
993
|
+
const animate = () => {
|
|
994
|
+
o = (new Date).getTime();
|
|
995
|
+
if (r === null) {
|
|
996
|
+
r = o;
|
|
997
|
+
}
|
|
998
|
+
const l = Math.max(Math.min((o - r) / a, 1), 0);
|
|
999
|
+
const c = .5 - Math.cos(l * Math.PI) / 2;
|
|
1000
|
+
let f = s + c * (t - s);
|
|
1001
|
+
if (isOutOfBound(f, t)) {
|
|
1002
|
+
f = t;
|
|
1003
|
+
}
|
|
1004
|
+
e.wrapperEl.scrollTo({
|
|
1005
|
+
[i]: f
|
|
1006
|
+
});
|
|
1007
|
+
if (isOutOfBound(f, t)) {
|
|
1008
|
+
e.wrapperEl.style.overflow = "hidden";
|
|
1009
|
+
e.wrapperEl.style.scrollSnapType = "";
|
|
1010
|
+
setTimeout((() => {
|
|
1011
|
+
e.wrapperEl.style.overflow = "";
|
|
1012
|
+
e.wrapperEl.scrollTo({
|
|
1013
|
+
[i]: f
|
|
1014
|
+
});
|
|
1015
|
+
}));
|
|
1016
|
+
n.cancelAnimationFrame(e.cssModeFrameID);
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
e.cssModeFrameID = n.requestAnimationFrame(animate);
|
|
1020
|
+
};
|
|
1021
|
+
animate();
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
let g;
|
|
1025
|
+
|
|
1026
|
+
function calcSupport() {
|
|
1027
|
+
const e = getWindow();
|
|
1028
|
+
const t = getDocument();
|
|
1029
|
+
return {
|
|
1030
|
+
smoothScroll: t.documentElement && "scrollBehavior" in t.documentElement.style,
|
|
1031
|
+
touch: !!("ontouchstart" in e || e.DocumentTouch && t instanceof e.DocumentTouch),
|
|
1032
|
+
passiveListener: function checkPassiveListener() {
|
|
1033
|
+
let t = false;
|
|
1034
|
+
try {
|
|
1035
|
+
const i = Object.defineProperty({}, "passive", {
|
|
1036
|
+
// eslint-disable-next-line
|
|
1037
|
+
get() {
|
|
1038
|
+
t = true;
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
e.addEventListener("testPassiveListener", null, i);
|
|
1042
|
+
} catch (e) {// No support
|
|
1043
|
+
}
|
|
1044
|
+
return t;
|
|
1045
|
+
}(),
|
|
1046
|
+
gestures: function checkGestures() {
|
|
1047
|
+
return "ongesturestart" in e;
|
|
1048
|
+
}()
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
function getSupport() {
|
|
1053
|
+
if (!g) {
|
|
1054
|
+
g = calcSupport();
|
|
1055
|
+
}
|
|
1056
|
+
return g;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
let v;
|
|
1060
|
+
|
|
1061
|
+
function calcDevice({userAgent: e} = {}) {
|
|
1062
|
+
const t = getSupport();
|
|
1063
|
+
const i = getWindow();
|
|
1064
|
+
const n = i.navigator.platform;
|
|
1065
|
+
const s = e || i.navigator.userAgent;
|
|
1066
|
+
const r = {
|
|
1067
|
+
ios: false,
|
|
1068
|
+
android: false
|
|
1069
|
+
};
|
|
1070
|
+
const o = i.screen.width;
|
|
1071
|
+
const a = i.screen.height;
|
|
1072
|
+
const l = s.match(/(Android);?[\s\/]+([\d.]+)?/);
|
|
1073
|
+
// eslint-disable-line
|
|
1074
|
+
let c = s.match(/(iPad).*OS\s([\d_]+)/);
|
|
1075
|
+
const f = s.match(/(iPod)(.*OS\s([\d_]+))?/);
|
|
1076
|
+
const u = !c && s.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
|
1077
|
+
const d = n === "Win32";
|
|
1078
|
+
let p = n === "MacIntel";
|
|
1079
|
+
// iPadOs 13 fix
|
|
1080
|
+
const h = [ "1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810" ];
|
|
1081
|
+
if (!c && p && t.touch && h.indexOf(`${o}x${a}`) >= 0) {
|
|
1082
|
+
c = s.match(/(Version)\/([\d.]+)/);
|
|
1083
|
+
if (!c) c = [ 0, 1, "13_0_0" ];
|
|
1084
|
+
p = false;
|
|
1085
|
+
}
|
|
1086
|
+
// Android
|
|
1087
|
+
if (l && !d) {
|
|
1088
|
+
r.os = "android";
|
|
1089
|
+
r.android = true;
|
|
1090
|
+
}
|
|
1091
|
+
if (c || u || f) {
|
|
1092
|
+
r.os = "ios";
|
|
1093
|
+
r.ios = true;
|
|
1094
|
+
}
|
|
1095
|
+
// Export object
|
|
1096
|
+
return r;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
function getDevice(e = {}) {
|
|
1100
|
+
if (!v) {
|
|
1101
|
+
v = calcDevice(e);
|
|
1102
|
+
}
|
|
1103
|
+
return v;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
let m;
|
|
1107
|
+
|
|
1108
|
+
function calcBrowser() {
|
|
1109
|
+
const e = getWindow();
|
|
1110
|
+
function isSafari() {
|
|
1111
|
+
const t = e.navigator.userAgent.toLowerCase();
|
|
1112
|
+
return t.indexOf("safari") >= 0 && t.indexOf("chrome") < 0 && t.indexOf("android") < 0;
|
|
1113
|
+
}
|
|
1114
|
+
return {
|
|
1115
|
+
isSafari: isSafari(),
|
|
1116
|
+
isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
function getBrowser() {
|
|
1121
|
+
if (!m) {
|
|
1122
|
+
m = calcBrowser();
|
|
1123
|
+
}
|
|
1124
|
+
return m;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
function Resize({swiper: e, on: t, emit: i}) {
|
|
1128
|
+
const n = getWindow();
|
|
1129
|
+
let s = null;
|
|
1130
|
+
let r = null;
|
|
1131
|
+
const resizeHandler = () => {
|
|
1132
|
+
if (!e || e.destroyed || !e.initialized) return;
|
|
1133
|
+
i("beforeResize");
|
|
1134
|
+
i("resize");
|
|
1135
|
+
};
|
|
1136
|
+
const createObserver = () => {
|
|
1137
|
+
if (!e || e.destroyed || !e.initialized) return;
|
|
1138
|
+
s = new ResizeObserver((t => {
|
|
1139
|
+
r = n.requestAnimationFrame((() => {
|
|
1140
|
+
const {width: i, height: n} = e;
|
|
1141
|
+
let s = i;
|
|
1142
|
+
let r = n;
|
|
1143
|
+
t.forEach((({contentBoxSize: t, contentRect: i, target: n}) => {
|
|
1144
|
+
if (n && n !== e.el) return;
|
|
1145
|
+
s = i ? i.width : (t[0] || t).inlineSize;
|
|
1146
|
+
r = i ? i.height : (t[0] || t).blockSize;
|
|
1147
|
+
}));
|
|
1148
|
+
if (s !== i || r !== n) {
|
|
1149
|
+
resizeHandler();
|
|
1150
|
+
}
|
|
1151
|
+
}));
|
|
1152
|
+
}));
|
|
1153
|
+
s.observe(e.el);
|
|
1154
|
+
};
|
|
1155
|
+
const removeObserver = () => {
|
|
1156
|
+
if (r) {
|
|
1157
|
+
n.cancelAnimationFrame(r);
|
|
1158
|
+
}
|
|
1159
|
+
if (s && s.unobserve && e.el) {
|
|
1160
|
+
s.unobserve(e.el);
|
|
1161
|
+
s = null;
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
const orientationChangeHandler = () => {
|
|
1165
|
+
if (!e || e.destroyed || !e.initialized) return;
|
|
1166
|
+
i("orientationchange");
|
|
1167
|
+
};
|
|
1168
|
+
t("init", (() => {
|
|
1169
|
+
if (e.params.resizeObserver && typeof n.ResizeObserver !== "undefined") {
|
|
1170
|
+
createObserver();
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
n.addEventListener("resize", resizeHandler);
|
|
1174
|
+
n.addEventListener("orientationchange", orientationChangeHandler);
|
|
1175
|
+
}));
|
|
1176
|
+
t("destroy", (() => {
|
|
1177
|
+
removeObserver();
|
|
1178
|
+
n.removeEventListener("resize", resizeHandler);
|
|
1179
|
+
n.removeEventListener("orientationchange", orientationChangeHandler);
|
|
1180
|
+
}));
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
function Observer({swiper: e, extendParams: t, on: i, emit: n}) {
|
|
1184
|
+
const s = [];
|
|
1185
|
+
const r = getWindow();
|
|
1186
|
+
const attach = (e, t = {}) => {
|
|
1187
|
+
const i = r.MutationObserver || r.WebkitMutationObserver;
|
|
1188
|
+
const o = new i((e => {
|
|
1189
|
+
// The observerUpdate event should only be triggered
|
|
1190
|
+
// once despite the number of mutations. Additional
|
|
1191
|
+
// triggers are redundant and are very costly
|
|
1192
|
+
if (e.length === 1) {
|
|
1193
|
+
n("observerUpdate", e[0]);
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
const t = function observerUpdate() {
|
|
1197
|
+
n("observerUpdate", e[0]);
|
|
1198
|
+
};
|
|
1199
|
+
if (r.requestAnimationFrame) {
|
|
1200
|
+
r.requestAnimationFrame(t);
|
|
1201
|
+
} else {
|
|
1202
|
+
r.setTimeout(t, 0);
|
|
1203
|
+
}
|
|
1204
|
+
}));
|
|
1205
|
+
o.observe(e, {
|
|
1206
|
+
attributes: typeof t.attributes === "undefined" ? true : t.attributes,
|
|
1207
|
+
childList: typeof t.childList === "undefined" ? true : t.childList,
|
|
1208
|
+
characterData: typeof t.characterData === "undefined" ? true : t.characterData
|
|
1209
|
+
});
|
|
1210
|
+
s.push(o);
|
|
1211
|
+
};
|
|
1212
|
+
const init = () => {
|
|
1213
|
+
if (!e.params.observer) return;
|
|
1214
|
+
if (e.params.observeParents) {
|
|
1215
|
+
const t = e.$el.parents();
|
|
1216
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
1217
|
+
attach(t[e]);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
// Observe container
|
|
1221
|
+
attach(e.$el[0], {
|
|
1222
|
+
childList: e.params.observeSlideChildren
|
|
1223
|
+
});
|
|
1224
|
+
// Observe wrapper
|
|
1225
|
+
attach(e.$wrapperEl[0], {
|
|
1226
|
+
attributes: false
|
|
1227
|
+
});
|
|
1228
|
+
};
|
|
1229
|
+
const destroy = () => {
|
|
1230
|
+
s.forEach((e => {
|
|
1231
|
+
e.disconnect();
|
|
1232
|
+
}));
|
|
1233
|
+
s.splice(0, s.length);
|
|
1234
|
+
};
|
|
1235
|
+
t({
|
|
1236
|
+
observer: false,
|
|
1237
|
+
observeParents: false,
|
|
1238
|
+
observeSlideChildren: false
|
|
1239
|
+
});
|
|
1240
|
+
i("init", init);
|
|
1241
|
+
i("destroy", destroy);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/* eslint-disable no-underscore-dangle */ const b = {
|
|
1245
|
+
on(e, t, i) {
|
|
1246
|
+
const n = this;
|
|
1247
|
+
if (!n.eventsListeners || n.destroyed) return n;
|
|
1248
|
+
if (typeof t !== "function") return n;
|
|
1249
|
+
const s = i ? "unshift" : "push";
|
|
1250
|
+
e.split(" ").forEach((e => {
|
|
1251
|
+
if (!n.eventsListeners[e]) n.eventsListeners[e] = [];
|
|
1252
|
+
n.eventsListeners[e][s](t);
|
|
1253
|
+
}));
|
|
1254
|
+
return n;
|
|
1255
|
+
},
|
|
1256
|
+
once(e, t, i) {
|
|
1257
|
+
const n = this;
|
|
1258
|
+
if (!n.eventsListeners || n.destroyed) return n;
|
|
1259
|
+
if (typeof t !== "function") return n;
|
|
1260
|
+
function onceHandler(...i) {
|
|
1261
|
+
n.off(e, onceHandler);
|
|
1262
|
+
if (onceHandler.__emitterProxy) {
|
|
1263
|
+
delete onceHandler.__emitterProxy;
|
|
1264
|
+
}
|
|
1265
|
+
t.apply(n, i);
|
|
1266
|
+
}
|
|
1267
|
+
onceHandler.__emitterProxy = t;
|
|
1268
|
+
return n.on(e, onceHandler, i);
|
|
1269
|
+
},
|
|
1270
|
+
onAny(e, t) {
|
|
1271
|
+
const i = this;
|
|
1272
|
+
if (!i.eventsListeners || i.destroyed) return i;
|
|
1273
|
+
if (typeof e !== "function") return i;
|
|
1274
|
+
const n = t ? "unshift" : "push";
|
|
1275
|
+
if (i.eventsAnyListeners.indexOf(e) < 0) {
|
|
1276
|
+
i.eventsAnyListeners[n](e);
|
|
1277
|
+
}
|
|
1278
|
+
return i;
|
|
1279
|
+
},
|
|
1280
|
+
offAny(e) {
|
|
1281
|
+
const t = this;
|
|
1282
|
+
if (!t.eventsListeners || t.destroyed) return t;
|
|
1283
|
+
if (!t.eventsAnyListeners) return t;
|
|
1284
|
+
const i = t.eventsAnyListeners.indexOf(e);
|
|
1285
|
+
if (i >= 0) {
|
|
1286
|
+
t.eventsAnyListeners.splice(i, 1);
|
|
1287
|
+
}
|
|
1288
|
+
return t;
|
|
1289
|
+
},
|
|
1290
|
+
off(e, t) {
|
|
1291
|
+
const i = this;
|
|
1292
|
+
if (!i.eventsListeners || i.destroyed) return i;
|
|
1293
|
+
if (!i.eventsListeners) return i;
|
|
1294
|
+
e.split(" ").forEach((e => {
|
|
1295
|
+
if (typeof t === "undefined") {
|
|
1296
|
+
i.eventsListeners[e] = [];
|
|
1297
|
+
} else if (i.eventsListeners[e]) {
|
|
1298
|
+
i.eventsListeners[e].forEach(((n, s) => {
|
|
1299
|
+
if (n === t || n.__emitterProxy && n.__emitterProxy === t) {
|
|
1300
|
+
i.eventsListeners[e].splice(s, 1);
|
|
1301
|
+
}
|
|
1302
|
+
}));
|
|
1303
|
+
}
|
|
1304
|
+
}));
|
|
1305
|
+
return i;
|
|
1306
|
+
},
|
|
1307
|
+
emit(...e) {
|
|
1308
|
+
const t = this;
|
|
1309
|
+
if (!t.eventsListeners || t.destroyed) return t;
|
|
1310
|
+
if (!t.eventsListeners) return t;
|
|
1311
|
+
let i;
|
|
1312
|
+
let n;
|
|
1313
|
+
let s;
|
|
1314
|
+
if (typeof e[0] === "string" || Array.isArray(e[0])) {
|
|
1315
|
+
i = e[0];
|
|
1316
|
+
n = e.slice(1, e.length);
|
|
1317
|
+
s = t;
|
|
1318
|
+
} else {
|
|
1319
|
+
i = e[0].events;
|
|
1320
|
+
n = e[0].data;
|
|
1321
|
+
s = e[0].context || t;
|
|
1322
|
+
}
|
|
1323
|
+
n.unshift(s);
|
|
1324
|
+
const r = Array.isArray(i) ? i : i.split(" ");
|
|
1325
|
+
r.forEach((e => {
|
|
1326
|
+
if (t.eventsAnyListeners && t.eventsAnyListeners.length) {
|
|
1327
|
+
t.eventsAnyListeners.forEach((t => {
|
|
1328
|
+
t.apply(s, [ e, ...n ]);
|
|
1329
|
+
}));
|
|
1330
|
+
}
|
|
1331
|
+
if (t.eventsListeners && t.eventsListeners[e]) {
|
|
1332
|
+
t.eventsListeners[e].forEach((e => {
|
|
1333
|
+
e.apply(s, n);
|
|
1334
|
+
}));
|
|
1335
|
+
}
|
|
1336
|
+
}));
|
|
1337
|
+
return t;
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
function updateSize() {
|
|
1342
|
+
const e = this;
|
|
1343
|
+
let t;
|
|
1344
|
+
let i;
|
|
1345
|
+
const n = e.$el;
|
|
1346
|
+
if (typeof e.params.width !== "undefined" && e.params.width !== null) {
|
|
1347
|
+
t = e.params.width;
|
|
1348
|
+
} else {
|
|
1349
|
+
t = n[0].clientWidth;
|
|
1350
|
+
}
|
|
1351
|
+
if (typeof e.params.height !== "undefined" && e.params.height !== null) {
|
|
1352
|
+
i = e.params.height;
|
|
1353
|
+
} else {
|
|
1354
|
+
i = n[0].clientHeight;
|
|
1355
|
+
}
|
|
1356
|
+
if (t === 0 && e.isHorizontal() || i === 0 && e.isVertical()) {
|
|
1357
|
+
return;
|
|
1358
|
+
}
|
|
1359
|
+
// Subtract paddings
|
|
1360
|
+
t = t - parseInt(n.css("padding-left") || 0, 10) - parseInt(n.css("padding-right") || 0, 10);
|
|
1361
|
+
i = i - parseInt(n.css("padding-top") || 0, 10) - parseInt(n.css("padding-bottom") || 0, 10);
|
|
1362
|
+
if (Number.isNaN(t)) t = 0;
|
|
1363
|
+
if (Number.isNaN(i)) i = 0;
|
|
1364
|
+
Object.assign(e, {
|
|
1365
|
+
width: t,
|
|
1366
|
+
height: i,
|
|
1367
|
+
size: e.isHorizontal() ? t : i
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
function updateSlides() {
|
|
1372
|
+
const e = this;
|
|
1373
|
+
function getDirectionLabel(t) {
|
|
1374
|
+
if (e.isHorizontal()) {
|
|
1375
|
+
return t;
|
|
1376
|
+
}
|
|
1377
|
+
// prettier-ignore
|
|
1378
|
+
return {
|
|
1379
|
+
width: "height",
|
|
1380
|
+
"margin-top": "margin-left",
|
|
1381
|
+
"margin-bottom ": "margin-right",
|
|
1382
|
+
"margin-left": "margin-top",
|
|
1383
|
+
"margin-right": "margin-bottom",
|
|
1384
|
+
"padding-left": "padding-top",
|
|
1385
|
+
"padding-right": "padding-bottom",
|
|
1386
|
+
marginRight: "marginBottom"
|
|
1387
|
+
}[t];
|
|
1388
|
+
}
|
|
1389
|
+
function getDirectionPropertyValue(e, t) {
|
|
1390
|
+
return parseFloat(e.getPropertyValue(getDirectionLabel(t)) || 0);
|
|
1391
|
+
}
|
|
1392
|
+
const t = e.params;
|
|
1393
|
+
const {$wrapperEl: i, size: n, rtlTranslate: s, wrongRTL: r} = e;
|
|
1394
|
+
const o = e.virtual && t.virtual.enabled;
|
|
1395
|
+
const a = o ? e.virtual.slides.length : e.slides.length;
|
|
1396
|
+
const l = i.children(`.${e.params.slideClass}`);
|
|
1397
|
+
const c = o ? e.virtual.slides.length : l.length;
|
|
1398
|
+
let f = [];
|
|
1399
|
+
const u = [];
|
|
1400
|
+
const d = [];
|
|
1401
|
+
let p = t.slidesOffsetBefore;
|
|
1402
|
+
if (typeof p === "function") {
|
|
1403
|
+
p = t.slidesOffsetBefore.call(e);
|
|
1404
|
+
}
|
|
1405
|
+
let h = t.slidesOffsetAfter;
|
|
1406
|
+
if (typeof h === "function") {
|
|
1407
|
+
h = t.slidesOffsetAfter.call(e);
|
|
1408
|
+
}
|
|
1409
|
+
const g = e.snapGrid.length;
|
|
1410
|
+
const v = e.slidesGrid.length;
|
|
1411
|
+
let m = t.spaceBetween;
|
|
1412
|
+
let b = -p;
|
|
1413
|
+
let w = 0;
|
|
1414
|
+
let y = 0;
|
|
1415
|
+
if (typeof n === "undefined") {
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1418
|
+
if (typeof m === "string" && m.indexOf("%") >= 0) {
|
|
1419
|
+
m = parseFloat(m.replace("%", "")) / 100 * n;
|
|
1420
|
+
}
|
|
1421
|
+
e.virtualSize = -m;
|
|
1422
|
+
// reset margins
|
|
1423
|
+
if (s) l.css({
|
|
1424
|
+
marginLeft: "",
|
|
1425
|
+
marginBottom: "",
|
|
1426
|
+
marginTop: ""
|
|
1427
|
+
}); else l.css({
|
|
1428
|
+
marginRight: "",
|
|
1429
|
+
marginBottom: "",
|
|
1430
|
+
marginTop: ""
|
|
1431
|
+
});
|
|
1432
|
+
// reset cssMode offsets
|
|
1433
|
+
if (t.centeredSlides && t.cssMode) {
|
|
1434
|
+
setCSSProperty(e.wrapperEl, "--swiper-centered-offset-before", "");
|
|
1435
|
+
setCSSProperty(e.wrapperEl, "--swiper-centered-offset-after", "");
|
|
1436
|
+
}
|
|
1437
|
+
const x = t.grid && t.grid.rows > 1 && e.grid;
|
|
1438
|
+
if (x) {
|
|
1439
|
+
e.grid.initSlides(c);
|
|
1440
|
+
}
|
|
1441
|
+
// Calc slides
|
|
1442
|
+
let S;
|
|
1443
|
+
const C = t.slidesPerView === "auto" && t.breakpoints && Object.keys(t.breakpoints).filter((e => typeof t.breakpoints[e].slidesPerView !== "undefined")).length > 0;
|
|
1444
|
+
for (let i = 0; i < c; i += 1) {
|
|
1445
|
+
S = 0;
|
|
1446
|
+
const s = l.eq(i);
|
|
1447
|
+
if (x) {
|
|
1448
|
+
e.grid.updateSlide(i, s, c, getDirectionLabel);
|
|
1449
|
+
}
|
|
1450
|
+
if (s.css("display") === "none") continue;
|
|
1451
|
+
// eslint-disable-line
|
|
1452
|
+
if (t.slidesPerView === "auto") {
|
|
1453
|
+
if (C) {
|
|
1454
|
+
l[i].style[getDirectionLabel("width")] = ``;
|
|
1455
|
+
}
|
|
1456
|
+
const n = getComputedStyle(s[0]);
|
|
1457
|
+
const r = s[0].style.transform;
|
|
1458
|
+
const o = s[0].style.webkitTransform;
|
|
1459
|
+
if (r) {
|
|
1460
|
+
s[0].style.transform = "none";
|
|
1461
|
+
}
|
|
1462
|
+
if (o) {
|
|
1463
|
+
s[0].style.webkitTransform = "none";
|
|
1464
|
+
}
|
|
1465
|
+
if (t.roundLengths) {
|
|
1466
|
+
S = e.isHorizontal() ? s.outerWidth(true) : s.outerHeight(true);
|
|
1467
|
+
} else {
|
|
1468
|
+
// eslint-disable-next-line
|
|
1469
|
+
const e = getDirectionPropertyValue(n, "width");
|
|
1470
|
+
const t = getDirectionPropertyValue(n, "padding-left");
|
|
1471
|
+
const i = getDirectionPropertyValue(n, "padding-right");
|
|
1472
|
+
const r = getDirectionPropertyValue(n, "margin-left");
|
|
1473
|
+
const o = getDirectionPropertyValue(n, "margin-right");
|
|
1474
|
+
const a = n.getPropertyValue("box-sizing");
|
|
1475
|
+
if (a && a === "border-box") {
|
|
1476
|
+
S = e + r + o;
|
|
1477
|
+
} else {
|
|
1478
|
+
const {clientWidth: n, offsetWidth: a} = s[0];
|
|
1479
|
+
S = e + t + i + r + o + (a - n);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
if (r) {
|
|
1483
|
+
s[0].style.transform = r;
|
|
1484
|
+
}
|
|
1485
|
+
if (o) {
|
|
1486
|
+
s[0].style.webkitTransform = o;
|
|
1487
|
+
}
|
|
1488
|
+
if (t.roundLengths) S = Math.floor(S);
|
|
1489
|
+
} else {
|
|
1490
|
+
S = (n - (t.slidesPerView - 1) * m) / t.slidesPerView;
|
|
1491
|
+
if (t.roundLengths) S = Math.floor(S);
|
|
1492
|
+
if (l[i]) {
|
|
1493
|
+
l[i].style[getDirectionLabel("width")] = `${S}px`;
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
if (l[i]) {
|
|
1497
|
+
l[i].swiperSlideSize = S;
|
|
1498
|
+
}
|
|
1499
|
+
d.push(S);
|
|
1500
|
+
if (t.centeredSlides) {
|
|
1501
|
+
b = b + S / 2 + w / 2 + m;
|
|
1502
|
+
if (w === 0 && i !== 0) b = b - n / 2 - m;
|
|
1503
|
+
if (i === 0) b = b - n / 2 - m;
|
|
1504
|
+
if (Math.abs(b) < 1 / 1e3) b = 0;
|
|
1505
|
+
if (t.roundLengths) b = Math.floor(b);
|
|
1506
|
+
if (y % t.slidesPerGroup === 0) f.push(b);
|
|
1507
|
+
u.push(b);
|
|
1508
|
+
} else {
|
|
1509
|
+
if (t.roundLengths) b = Math.floor(b);
|
|
1510
|
+
if ((y - Math.min(e.params.slidesPerGroupSkip, y)) % e.params.slidesPerGroup === 0) f.push(b);
|
|
1511
|
+
u.push(b);
|
|
1512
|
+
b = b + S + m;
|
|
1513
|
+
}
|
|
1514
|
+
e.virtualSize += S + m;
|
|
1515
|
+
w = S;
|
|
1516
|
+
y += 1;
|
|
1517
|
+
}
|
|
1518
|
+
e.virtualSize = Math.max(e.virtualSize, n) + h;
|
|
1519
|
+
if (s && r && (t.effect === "slide" || t.effect === "coverflow")) {
|
|
1520
|
+
i.css({
|
|
1521
|
+
width: `${e.virtualSize + t.spaceBetween}px`
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
if (t.setWrapperSize) {
|
|
1525
|
+
i.css({
|
|
1526
|
+
[getDirectionLabel("width")]: `${e.virtualSize + t.spaceBetween}px`
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
if (x) {
|
|
1530
|
+
e.grid.updateWrapperSize(S, f, getDirectionLabel);
|
|
1531
|
+
}
|
|
1532
|
+
// Remove last grid elements depending on width
|
|
1533
|
+
if (!t.centeredSlides) {
|
|
1534
|
+
const i = [];
|
|
1535
|
+
for (let s = 0; s < f.length; s += 1) {
|
|
1536
|
+
let r = f[s];
|
|
1537
|
+
if (t.roundLengths) r = Math.floor(r);
|
|
1538
|
+
if (f[s] <= e.virtualSize - n) {
|
|
1539
|
+
i.push(r);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
f = i;
|
|
1543
|
+
if (Math.floor(e.virtualSize - n) - Math.floor(f[f.length - 1]) > 1) {
|
|
1544
|
+
f.push(e.virtualSize - n);
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
if (f.length === 0) f = [ 0 ];
|
|
1548
|
+
if (t.spaceBetween !== 0) {
|
|
1549
|
+
const i = e.isHorizontal() && s ? "marginLeft" : getDirectionLabel("marginRight");
|
|
1550
|
+
l.filter(((e, i) => {
|
|
1551
|
+
if (!t.cssMode) return true;
|
|
1552
|
+
if (i === l.length - 1) {
|
|
1553
|
+
return false;
|
|
1554
|
+
}
|
|
1555
|
+
return true;
|
|
1556
|
+
})).css({
|
|
1557
|
+
[i]: `${m}px`
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
if (t.centeredSlides && t.centeredSlidesBounds) {
|
|
1561
|
+
let e = 0;
|
|
1562
|
+
d.forEach((i => {
|
|
1563
|
+
e += i + (t.spaceBetween ? t.spaceBetween : 0);
|
|
1564
|
+
}));
|
|
1565
|
+
e -= t.spaceBetween;
|
|
1566
|
+
const i = e - n;
|
|
1567
|
+
f = f.map((e => {
|
|
1568
|
+
if (e < 0) return -p;
|
|
1569
|
+
if (e > i) return i + h;
|
|
1570
|
+
return e;
|
|
1571
|
+
}));
|
|
1572
|
+
}
|
|
1573
|
+
if (t.centerInsufficientSlides) {
|
|
1574
|
+
let e = 0;
|
|
1575
|
+
d.forEach((i => {
|
|
1576
|
+
e += i + (t.spaceBetween ? t.spaceBetween : 0);
|
|
1577
|
+
}));
|
|
1578
|
+
e -= t.spaceBetween;
|
|
1579
|
+
if (e < n) {
|
|
1580
|
+
const t = (n - e) / 2;
|
|
1581
|
+
f.forEach(((e, i) => {
|
|
1582
|
+
f[i] = e - t;
|
|
1583
|
+
}));
|
|
1584
|
+
u.forEach(((e, i) => {
|
|
1585
|
+
u[i] = e + t;
|
|
1586
|
+
}));
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
Object.assign(e, {
|
|
1590
|
+
slides: l,
|
|
1591
|
+
snapGrid: f,
|
|
1592
|
+
slidesGrid: u,
|
|
1593
|
+
slidesSizesGrid: d
|
|
1594
|
+
});
|
|
1595
|
+
if (t.centeredSlides && t.cssMode && !t.centeredSlidesBounds) {
|
|
1596
|
+
setCSSProperty(e.wrapperEl, "--swiper-centered-offset-before", `${-f[0]}px`);
|
|
1597
|
+
setCSSProperty(e.wrapperEl, "--swiper-centered-offset-after", `${e.size / 2 - d[d.length - 1] / 2}px`);
|
|
1598
|
+
const t = -e.snapGrid[0];
|
|
1599
|
+
const i = -e.slidesGrid[0];
|
|
1600
|
+
e.snapGrid = e.snapGrid.map((e => e + t));
|
|
1601
|
+
e.slidesGrid = e.slidesGrid.map((e => e + i));
|
|
1602
|
+
}
|
|
1603
|
+
if (c !== a) {
|
|
1604
|
+
e.emit("slidesLengthChange");
|
|
1605
|
+
}
|
|
1606
|
+
if (f.length !== g) {
|
|
1607
|
+
if (e.params.watchOverflow) e.checkOverflow();
|
|
1608
|
+
e.emit("snapGridLengthChange");
|
|
1609
|
+
}
|
|
1610
|
+
if (u.length !== v) {
|
|
1611
|
+
e.emit("slidesGridLengthChange");
|
|
1612
|
+
}
|
|
1613
|
+
if (t.watchSlidesProgress) {
|
|
1614
|
+
e.updateSlidesOffset();
|
|
1615
|
+
}
|
|
1616
|
+
if (!o && !t.cssMode && (t.effect === "slide" || t.effect === "fade")) {
|
|
1617
|
+
const i = `${t.containerModifierClass}backface-hidden`;
|
|
1618
|
+
const n = e.$el.hasClass(i);
|
|
1619
|
+
if (c <= t.maxBackfaceHiddenSlides) {
|
|
1620
|
+
if (!n) e.$el.addClass(i);
|
|
1621
|
+
} else if (n) {
|
|
1622
|
+
e.$el.removeClass(i);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
function updateAutoHeight(e) {
|
|
1628
|
+
const t = this;
|
|
1629
|
+
const i = [];
|
|
1630
|
+
const n = t.virtual && t.params.virtual.enabled;
|
|
1631
|
+
let s = 0;
|
|
1632
|
+
let r;
|
|
1633
|
+
if (typeof e === "number") {
|
|
1634
|
+
t.setTransition(e);
|
|
1635
|
+
} else if (e === true) {
|
|
1636
|
+
t.setTransition(t.params.speed);
|
|
1637
|
+
}
|
|
1638
|
+
const getSlideByIndex = e => {
|
|
1639
|
+
if (n) {
|
|
1640
|
+
return t.slides.filter((t => parseInt(t.getAttribute("data-swiper-slide-index"), 10) === e))[0];
|
|
1641
|
+
}
|
|
1642
|
+
return t.slides.eq(e)[0];
|
|
1643
|
+
};
|
|
1644
|
+
// Find slides currently in view
|
|
1645
|
+
if (t.params.slidesPerView !== "auto" && t.params.slidesPerView > 1) {
|
|
1646
|
+
if (t.params.centeredSlides) {
|
|
1647
|
+
(t.visibleSlides || $([])).each((e => {
|
|
1648
|
+
i.push(e);
|
|
1649
|
+
}));
|
|
1650
|
+
} else {
|
|
1651
|
+
for (r = 0; r < Math.ceil(t.params.slidesPerView); r += 1) {
|
|
1652
|
+
const e = t.activeIndex + r;
|
|
1653
|
+
if (e > t.slides.length && !n) break;
|
|
1654
|
+
i.push(getSlideByIndex(e));
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
} else {
|
|
1658
|
+
i.push(getSlideByIndex(t.activeIndex));
|
|
1659
|
+
}
|
|
1660
|
+
// Find new height from highest slide in view
|
|
1661
|
+
for (r = 0; r < i.length; r += 1) {
|
|
1662
|
+
if (typeof i[r] !== "undefined") {
|
|
1663
|
+
const e = i[r].offsetHeight;
|
|
1664
|
+
s = e > s ? e : s;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
// Update Height
|
|
1668
|
+
if (s || s === 0) t.$wrapperEl.css("height", `${s}px`);
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
function updateSlidesOffset() {
|
|
1672
|
+
const e = this;
|
|
1673
|
+
const t = e.slides;
|
|
1674
|
+
for (let i = 0; i < t.length; i += 1) {
|
|
1675
|
+
t[i].swiperSlideOffset = e.isHorizontal() ? t[i].offsetLeft : t[i].offsetTop;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
function updateSlidesProgress(e = this && this.translate || 0) {
|
|
1680
|
+
const t = this;
|
|
1681
|
+
const i = t.params;
|
|
1682
|
+
const {slides: n, rtlTranslate: s, snapGrid: r} = t;
|
|
1683
|
+
if (n.length === 0) return;
|
|
1684
|
+
if (typeof n[0].swiperSlideOffset === "undefined") t.updateSlidesOffset();
|
|
1685
|
+
let o = -e;
|
|
1686
|
+
if (s) o = e;
|
|
1687
|
+
// Visible Slides
|
|
1688
|
+
n.removeClass(i.slideVisibleClass);
|
|
1689
|
+
t.visibleSlidesIndexes = [];
|
|
1690
|
+
t.visibleSlides = [];
|
|
1691
|
+
for (let e = 0; e < n.length; e += 1) {
|
|
1692
|
+
const a = n[e];
|
|
1693
|
+
let l = a.swiperSlideOffset;
|
|
1694
|
+
if (i.cssMode && i.centeredSlides) {
|
|
1695
|
+
l -= n[0].swiperSlideOffset;
|
|
1696
|
+
}
|
|
1697
|
+
const c = (o + (i.centeredSlides ? t.minTranslate() : 0) - l) / (a.swiperSlideSize + i.spaceBetween);
|
|
1698
|
+
const f = (o - r[0] + (i.centeredSlides ? t.minTranslate() : 0) - l) / (a.swiperSlideSize + i.spaceBetween);
|
|
1699
|
+
const u = -(o - l);
|
|
1700
|
+
const d = u + t.slidesSizesGrid[e];
|
|
1701
|
+
const p = u >= 0 && u < t.size - 1 || d > 1 && d <= t.size || u <= 0 && d >= t.size;
|
|
1702
|
+
if (p) {
|
|
1703
|
+
t.visibleSlides.push(a);
|
|
1704
|
+
t.visibleSlidesIndexes.push(e);
|
|
1705
|
+
n.eq(e).addClass(i.slideVisibleClass);
|
|
1706
|
+
}
|
|
1707
|
+
a.progress = s ? -c : c;
|
|
1708
|
+
a.originalProgress = s ? -f : f;
|
|
1709
|
+
}
|
|
1710
|
+
t.visibleSlides = $(t.visibleSlides);
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
function updateProgress(e) {
|
|
1714
|
+
const t = this;
|
|
1715
|
+
if (typeof e === "undefined") {
|
|
1716
|
+
const i = t.rtlTranslate ? -1 : 1;
|
|
1717
|
+
// eslint-disable-next-line
|
|
1718
|
+
e = t && t.translate && t.translate * i || 0;
|
|
1719
|
+
}
|
|
1720
|
+
const i = t.params;
|
|
1721
|
+
const n = t.maxTranslate() - t.minTranslate();
|
|
1722
|
+
let {progress: s, isBeginning: r, isEnd: o} = t;
|
|
1723
|
+
const a = r;
|
|
1724
|
+
const l = o;
|
|
1725
|
+
if (n === 0) {
|
|
1726
|
+
s = 0;
|
|
1727
|
+
r = true;
|
|
1728
|
+
o = true;
|
|
1729
|
+
} else {
|
|
1730
|
+
s = (e - t.minTranslate()) / n;
|
|
1731
|
+
r = s <= 0;
|
|
1732
|
+
o = s >= 1;
|
|
1733
|
+
}
|
|
1734
|
+
Object.assign(t, {
|
|
1735
|
+
progress: s,
|
|
1736
|
+
isBeginning: r,
|
|
1737
|
+
isEnd: o
|
|
1738
|
+
});
|
|
1739
|
+
if (i.watchSlidesProgress || i.centeredSlides && i.autoHeight) t.updateSlidesProgress(e);
|
|
1740
|
+
if (r && !a) {
|
|
1741
|
+
t.emit("reachBeginning toEdge");
|
|
1742
|
+
}
|
|
1743
|
+
if (o && !l) {
|
|
1744
|
+
t.emit("reachEnd toEdge");
|
|
1745
|
+
}
|
|
1746
|
+
if (a && !r || l && !o) {
|
|
1747
|
+
t.emit("fromEdge");
|
|
1748
|
+
}
|
|
1749
|
+
t.emit("progress", s);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
function updateSlidesClasses() {
|
|
1753
|
+
const e = this;
|
|
1754
|
+
const {slides: t, params: i, $wrapperEl: n, activeIndex: s, realIndex: r} = e;
|
|
1755
|
+
const o = e.virtual && i.virtual.enabled;
|
|
1756
|
+
t.removeClass(`${i.slideActiveClass} ${i.slideNextClass} ${i.slidePrevClass} ${i.slideDuplicateActiveClass} ${i.slideDuplicateNextClass} ${i.slideDuplicatePrevClass}`);
|
|
1757
|
+
let a;
|
|
1758
|
+
if (o) {
|
|
1759
|
+
a = e.$wrapperEl.find(`.${i.slideClass}[data-swiper-slide-index="${s}"]`);
|
|
1760
|
+
} else {
|
|
1761
|
+
a = t.eq(s);
|
|
1762
|
+
}
|
|
1763
|
+
// Active classes
|
|
1764
|
+
a.addClass(i.slideActiveClass);
|
|
1765
|
+
if (i.loop) {
|
|
1766
|
+
// Duplicate to all looped slides
|
|
1767
|
+
if (a.hasClass(i.slideDuplicateClass)) {
|
|
1768
|
+
n.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${r}"]`).addClass(i.slideDuplicateActiveClass);
|
|
1769
|
+
} else {
|
|
1770
|
+
n.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${r}"]`).addClass(i.slideDuplicateActiveClass);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
// Next Slide
|
|
1774
|
+
let l = a.nextAll(`.${i.slideClass}`).eq(0).addClass(i.slideNextClass);
|
|
1775
|
+
if (i.loop && l.length === 0) {
|
|
1776
|
+
l = t.eq(0);
|
|
1777
|
+
l.addClass(i.slideNextClass);
|
|
1778
|
+
}
|
|
1779
|
+
// Prev Slide
|
|
1780
|
+
let c = a.prevAll(`.${i.slideClass}`).eq(0).addClass(i.slidePrevClass);
|
|
1781
|
+
if (i.loop && c.length === 0) {
|
|
1782
|
+
c = t.eq(-1);
|
|
1783
|
+
c.addClass(i.slidePrevClass);
|
|
1784
|
+
}
|
|
1785
|
+
if (i.loop) {
|
|
1786
|
+
// Duplicate to all looped slides
|
|
1787
|
+
if (l.hasClass(i.slideDuplicateClass)) {
|
|
1788
|
+
n.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicateNextClass);
|
|
1789
|
+
} else {
|
|
1790
|
+
n.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicateNextClass);
|
|
1791
|
+
}
|
|
1792
|
+
if (c.hasClass(i.slideDuplicateClass)) {
|
|
1793
|
+
n.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicatePrevClass);
|
|
1794
|
+
} else {
|
|
1795
|
+
n.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicatePrevClass);
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
e.emitSlidesClasses();
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
function updateActiveIndex(e) {
|
|
1802
|
+
const t = this;
|
|
1803
|
+
const i = t.rtlTranslate ? t.translate : -t.translate;
|
|
1804
|
+
const {slidesGrid: n, snapGrid: s, params: r, activeIndex: o, realIndex: a, snapIndex: l} = t;
|
|
1805
|
+
let c = e;
|
|
1806
|
+
let f;
|
|
1807
|
+
if (typeof c === "undefined") {
|
|
1808
|
+
for (let e = 0; e < n.length; e += 1) {
|
|
1809
|
+
if (typeof n[e + 1] !== "undefined") {
|
|
1810
|
+
if (i >= n[e] && i < n[e + 1] - (n[e + 1] - n[e]) / 2) {
|
|
1811
|
+
c = e;
|
|
1812
|
+
} else if (i >= n[e] && i < n[e + 1]) {
|
|
1813
|
+
c = e + 1;
|
|
1814
|
+
}
|
|
1815
|
+
} else if (i >= n[e]) {
|
|
1816
|
+
c = e;
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
// Normalize slideIndex
|
|
1820
|
+
if (r.normalizeSlideIndex) {
|
|
1821
|
+
if (c < 0 || typeof c === "undefined") c = 0;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
if (s.indexOf(i) >= 0) {
|
|
1825
|
+
f = s.indexOf(i);
|
|
1826
|
+
} else {
|
|
1827
|
+
const e = Math.min(r.slidesPerGroupSkip, c);
|
|
1828
|
+
f = e + Math.floor((c - e) / r.slidesPerGroup);
|
|
1829
|
+
}
|
|
1830
|
+
if (f >= s.length) f = s.length - 1;
|
|
1831
|
+
if (c === o) {
|
|
1832
|
+
if (f !== l) {
|
|
1833
|
+
t.snapIndex = f;
|
|
1834
|
+
t.emit("snapIndexChange");
|
|
1835
|
+
}
|
|
1836
|
+
return;
|
|
1837
|
+
}
|
|
1838
|
+
// Get real index
|
|
1839
|
+
const u = parseInt(t.slides.eq(c).attr("data-swiper-slide-index") || c, 10);
|
|
1840
|
+
Object.assign(t, {
|
|
1841
|
+
snapIndex: f,
|
|
1842
|
+
realIndex: u,
|
|
1843
|
+
previousIndex: o,
|
|
1844
|
+
activeIndex: c
|
|
1845
|
+
});
|
|
1846
|
+
t.emit("activeIndexChange");
|
|
1847
|
+
t.emit("snapIndexChange");
|
|
1848
|
+
if (a !== u) {
|
|
1849
|
+
t.emit("realIndexChange");
|
|
1850
|
+
}
|
|
1851
|
+
if (t.initialized || t.params.runCallbacksOnInit) {
|
|
1852
|
+
t.emit("slideChange");
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
function updateClickedSlide(e) {
|
|
1857
|
+
const t = this;
|
|
1858
|
+
const i = t.params;
|
|
1859
|
+
const n = $(e).closest(`.${i.slideClass}`)[0];
|
|
1860
|
+
let s = false;
|
|
1861
|
+
let r;
|
|
1862
|
+
if (n) {
|
|
1863
|
+
for (let e = 0; e < t.slides.length; e += 1) {
|
|
1864
|
+
if (t.slides[e] === n) {
|
|
1865
|
+
s = true;
|
|
1866
|
+
r = e;
|
|
1867
|
+
break;
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
if (n && s) {
|
|
1872
|
+
t.clickedSlide = n;
|
|
1873
|
+
if (t.virtual && t.params.virtual.enabled) {
|
|
1874
|
+
t.clickedIndex = parseInt($(n).attr("data-swiper-slide-index"), 10);
|
|
1875
|
+
} else {
|
|
1876
|
+
t.clickedIndex = r;
|
|
1877
|
+
}
|
|
1878
|
+
} else {
|
|
1879
|
+
t.clickedSlide = undefined;
|
|
1880
|
+
t.clickedIndex = undefined;
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1883
|
+
if (i.slideToClickedSlide && t.clickedIndex !== undefined && t.clickedIndex !== t.activeIndex) {
|
|
1884
|
+
t.slideToClickedSlide();
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
const w = {
|
|
1889
|
+
updateSize,
|
|
1890
|
+
updateSlides,
|
|
1891
|
+
updateAutoHeight,
|
|
1892
|
+
updateSlidesOffset,
|
|
1893
|
+
updateSlidesProgress,
|
|
1894
|
+
updateProgress,
|
|
1895
|
+
updateSlidesClasses,
|
|
1896
|
+
updateActiveIndex,
|
|
1897
|
+
updateClickedSlide
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
function getSwiperTranslate(e = (this.isHorizontal() ? "x" : "y")) {
|
|
1901
|
+
const t = this;
|
|
1902
|
+
const {params: i, rtlTranslate: n, translate: s, $wrapperEl: r} = t;
|
|
1903
|
+
if (i.virtualTranslate) {
|
|
1904
|
+
return n ? -s : s;
|
|
1905
|
+
}
|
|
1906
|
+
if (i.cssMode) {
|
|
1907
|
+
return s;
|
|
1908
|
+
}
|
|
1909
|
+
let o = getTranslate(r[0], e);
|
|
1910
|
+
if (n) o = -o;
|
|
1911
|
+
return o || 0;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
function setTranslate(e, t) {
|
|
1915
|
+
const i = this;
|
|
1916
|
+
const {rtlTranslate: n, params: s, $wrapperEl: r, wrapperEl: o, progress: a} = i;
|
|
1917
|
+
let l = 0;
|
|
1918
|
+
let c = 0;
|
|
1919
|
+
const f = 0;
|
|
1920
|
+
if (i.isHorizontal()) {
|
|
1921
|
+
l = n ? -e : e;
|
|
1922
|
+
} else {
|
|
1923
|
+
c = e;
|
|
1924
|
+
}
|
|
1925
|
+
if (s.roundLengths) {
|
|
1926
|
+
l = Math.floor(l);
|
|
1927
|
+
c = Math.floor(c);
|
|
1928
|
+
}
|
|
1929
|
+
if (s.cssMode) {
|
|
1930
|
+
o[i.isHorizontal() ? "scrollLeft" : "scrollTop"] = i.isHorizontal() ? -l : -c;
|
|
1931
|
+
} else if (!s.virtualTranslate) {
|
|
1932
|
+
r.transform(`translate3d(${l}px, ${c}px, ${f}px)`);
|
|
1933
|
+
}
|
|
1934
|
+
i.previousTranslate = i.translate;
|
|
1935
|
+
i.translate = i.isHorizontal() ? l : c;
|
|
1936
|
+
// Check if we need to update progress
|
|
1937
|
+
let u;
|
|
1938
|
+
const d = i.maxTranslate() - i.minTranslate();
|
|
1939
|
+
if (d === 0) {
|
|
1940
|
+
u = 0;
|
|
1941
|
+
} else {
|
|
1942
|
+
u = (e - i.minTranslate()) / d;
|
|
1943
|
+
}
|
|
1944
|
+
if (u !== a) {
|
|
1945
|
+
i.updateProgress(e);
|
|
1946
|
+
}
|
|
1947
|
+
i.emit("setTranslate", i.translate, t);
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
function minTranslate() {
|
|
1951
|
+
return -this.snapGrid[0];
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
function maxTranslate() {
|
|
1955
|
+
return -this.snapGrid[this.snapGrid.length - 1];
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
function translateTo(e = 0, t = this.params.speed, i = true, n = true, s) {
|
|
1959
|
+
const r = this;
|
|
1960
|
+
const {params: o, wrapperEl: a} = r;
|
|
1961
|
+
if (r.animating && o.preventInteractionOnTransition) {
|
|
1962
|
+
return false;
|
|
1963
|
+
}
|
|
1964
|
+
const l = r.minTranslate();
|
|
1965
|
+
const c = r.maxTranslate();
|
|
1966
|
+
let f;
|
|
1967
|
+
if (n && e > l) f = l; else if (n && e < c) f = c; else f = e;
|
|
1968
|
+
// Update progress
|
|
1969
|
+
r.updateProgress(f);
|
|
1970
|
+
if (o.cssMode) {
|
|
1971
|
+
const e = r.isHorizontal();
|
|
1972
|
+
if (t === 0) {
|
|
1973
|
+
a[e ? "scrollLeft" : "scrollTop"] = -f;
|
|
1974
|
+
} else {
|
|
1975
|
+
if (!r.support.smoothScroll) {
|
|
1976
|
+
animateCSSModeScroll({
|
|
1977
|
+
swiper: r,
|
|
1978
|
+
targetPosition: -f,
|
|
1979
|
+
side: e ? "left" : "top"
|
|
1980
|
+
});
|
|
1981
|
+
return true;
|
|
1982
|
+
}
|
|
1983
|
+
a.scrollTo({
|
|
1984
|
+
[e ? "left" : "top"]: -f,
|
|
1985
|
+
behavior: "smooth"
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
return true;
|
|
1989
|
+
}
|
|
1990
|
+
if (t === 0) {
|
|
1991
|
+
r.setTransition(0);
|
|
1992
|
+
r.setTranslate(f);
|
|
1993
|
+
if (i) {
|
|
1994
|
+
r.emit("beforeTransitionStart", t, s);
|
|
1995
|
+
r.emit("transitionEnd");
|
|
1996
|
+
}
|
|
1997
|
+
} else {
|
|
1998
|
+
r.setTransition(t);
|
|
1999
|
+
r.setTranslate(f);
|
|
2000
|
+
if (i) {
|
|
2001
|
+
r.emit("beforeTransitionStart", t, s);
|
|
2002
|
+
r.emit("transitionStart");
|
|
2003
|
+
}
|
|
2004
|
+
if (!r.animating) {
|
|
2005
|
+
r.animating = true;
|
|
2006
|
+
if (!r.onTranslateToWrapperTransitionEnd) {
|
|
2007
|
+
r.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {
|
|
2008
|
+
if (!r || r.destroyed) return;
|
|
2009
|
+
if (e.target !== this) return;
|
|
2010
|
+
r.$wrapperEl[0].removeEventListener("transitionend", r.onTranslateToWrapperTransitionEnd);
|
|
2011
|
+
r.$wrapperEl[0].removeEventListener("webkitTransitionEnd", r.onTranslateToWrapperTransitionEnd);
|
|
2012
|
+
r.onTranslateToWrapperTransitionEnd = null;
|
|
2013
|
+
delete r.onTranslateToWrapperTransitionEnd;
|
|
2014
|
+
if (i) {
|
|
2015
|
+
r.emit("transitionEnd");
|
|
2016
|
+
}
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2019
|
+
r.$wrapperEl[0].addEventListener("transitionend", r.onTranslateToWrapperTransitionEnd);
|
|
2020
|
+
r.$wrapperEl[0].addEventListener("webkitTransitionEnd", r.onTranslateToWrapperTransitionEnd);
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
return true;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
const y = {
|
|
2027
|
+
getTranslate: getSwiperTranslate,
|
|
2028
|
+
setTranslate,
|
|
2029
|
+
minTranslate,
|
|
2030
|
+
maxTranslate,
|
|
2031
|
+
translateTo
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
function setTransition(e, t) {
|
|
2035
|
+
const i = this;
|
|
2036
|
+
if (!i.params.cssMode) {
|
|
2037
|
+
i.$wrapperEl.transition(e);
|
|
2038
|
+
}
|
|
2039
|
+
i.emit("setTransition", e, t);
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
function transitionEmit({swiper: e, runCallbacks: t, direction: i, step: n}) {
|
|
2043
|
+
const {activeIndex: s, previousIndex: r} = e;
|
|
2044
|
+
let o = i;
|
|
2045
|
+
if (!o) {
|
|
2046
|
+
if (s > r) o = "next"; else if (s < r) o = "prev"; else o = "reset";
|
|
2047
|
+
}
|
|
2048
|
+
e.emit(`transition${n}`);
|
|
2049
|
+
if (t && s !== r) {
|
|
2050
|
+
if (o === "reset") {
|
|
2051
|
+
e.emit(`slideResetTransition${n}`);
|
|
2052
|
+
return;
|
|
2053
|
+
}
|
|
2054
|
+
e.emit(`slideChangeTransition${n}`);
|
|
2055
|
+
if (o === "next") {
|
|
2056
|
+
e.emit(`slideNextTransition${n}`);
|
|
2057
|
+
} else {
|
|
2058
|
+
e.emit(`slidePrevTransition${n}`);
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
function transitionStart(e = true, t) {
|
|
2064
|
+
const i = this;
|
|
2065
|
+
const {params: n} = i;
|
|
2066
|
+
if (n.cssMode) return;
|
|
2067
|
+
if (n.autoHeight) {
|
|
2068
|
+
i.updateAutoHeight();
|
|
2069
|
+
}
|
|
2070
|
+
transitionEmit({
|
|
2071
|
+
swiper: i,
|
|
2072
|
+
runCallbacks: e,
|
|
2073
|
+
direction: t,
|
|
2074
|
+
step: "Start"
|
|
2075
|
+
});
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
function transitionEnd(e = true, t) {
|
|
2079
|
+
const i = this;
|
|
2080
|
+
const {params: n} = i;
|
|
2081
|
+
i.animating = false;
|
|
2082
|
+
if (n.cssMode) return;
|
|
2083
|
+
i.setTransition(0);
|
|
2084
|
+
transitionEmit({
|
|
2085
|
+
swiper: i,
|
|
2086
|
+
runCallbacks: e,
|
|
2087
|
+
direction: t,
|
|
2088
|
+
step: "End"
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
const x = {
|
|
2093
|
+
setTransition,
|
|
2094
|
+
transitionStart,
|
|
2095
|
+
transitionEnd
|
|
2096
|
+
};
|
|
2097
|
+
|
|
2098
|
+
function slideTo(e = 0, t = this.params.speed, i = true, n, s) {
|
|
2099
|
+
if (typeof e !== "number" && typeof e !== "string") {
|
|
2100
|
+
throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`);
|
|
2101
|
+
}
|
|
2102
|
+
if (typeof e === "string") {
|
|
2103
|
+
/**
|
|
2104
|
+
* The `index` argument converted from `string` to `number`.
|
|
2105
|
+
* @type {number}
|
|
2106
|
+
*/
|
|
2107
|
+
const t = parseInt(e, 10);
|
|
2108
|
+
/**
|
|
2109
|
+
* Determines whether the `index` argument is a valid `number`
|
|
2110
|
+
* after being converted from the `string` type.
|
|
2111
|
+
* @type {boolean}
|
|
2112
|
+
*/ const i = isFinite(t);
|
|
2113
|
+
if (!i) {
|
|
2114
|
+
throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);
|
|
2115
|
+
}
|
|
2116
|
+
// Knowing that the converted `index` is a valid number,
|
|
2117
|
+
// we can update the original argument's value.
|
|
2118
|
+
e = t;
|
|
2119
|
+
}
|
|
2120
|
+
const r = this;
|
|
2121
|
+
let o = e;
|
|
2122
|
+
if (o < 0) o = 0;
|
|
2123
|
+
const {params: a, snapGrid: l, slidesGrid: c, previousIndex: f, activeIndex: u, rtlTranslate: d, wrapperEl: p, enabled: h} = r;
|
|
2124
|
+
if (r.animating && a.preventInteractionOnTransition || !h && !n && !s) {
|
|
2125
|
+
return false;
|
|
2126
|
+
}
|
|
2127
|
+
const g = Math.min(r.params.slidesPerGroupSkip, o);
|
|
2128
|
+
let v = g + Math.floor((o - g) / r.params.slidesPerGroup);
|
|
2129
|
+
if (v >= l.length) v = l.length - 1;
|
|
2130
|
+
const m = -l[v];
|
|
2131
|
+
// Normalize slideIndex
|
|
2132
|
+
if (a.normalizeSlideIndex) {
|
|
2133
|
+
for (let e = 0; e < c.length; e += 1) {
|
|
2134
|
+
const t = -Math.floor(m * 100);
|
|
2135
|
+
const i = Math.floor(c[e] * 100);
|
|
2136
|
+
const n = Math.floor(c[e + 1] * 100);
|
|
2137
|
+
if (typeof c[e + 1] !== "undefined") {
|
|
2138
|
+
if (t >= i && t < n - (n - i) / 2) {
|
|
2139
|
+
o = e;
|
|
2140
|
+
} else if (t >= i && t < n) {
|
|
2141
|
+
o = e + 1;
|
|
2142
|
+
}
|
|
2143
|
+
} else if (t >= i) {
|
|
2144
|
+
o = e;
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
// Directions locks
|
|
2149
|
+
if (r.initialized && o !== u) {
|
|
2150
|
+
if (!r.allowSlideNext && m < r.translate && m < r.minTranslate()) {
|
|
2151
|
+
return false;
|
|
2152
|
+
}
|
|
2153
|
+
if (!r.allowSlidePrev && m > r.translate && m > r.maxTranslate()) {
|
|
2154
|
+
if ((u || 0) !== o) return false;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
if (o !== (f || 0) && i) {
|
|
2158
|
+
r.emit("beforeSlideChangeStart");
|
|
2159
|
+
}
|
|
2160
|
+
// Update progress
|
|
2161
|
+
r.updateProgress(m);
|
|
2162
|
+
let b;
|
|
2163
|
+
if (o > u) b = "next"; else if (o < u) b = "prev"; else b = "reset";
|
|
2164
|
+
// Update Index
|
|
2165
|
+
if (d && -m === r.translate || !d && m === r.translate) {
|
|
2166
|
+
r.updateActiveIndex(o);
|
|
2167
|
+
// Update Height
|
|
2168
|
+
if (a.autoHeight) {
|
|
2169
|
+
r.updateAutoHeight();
|
|
2170
|
+
}
|
|
2171
|
+
r.updateSlidesClasses();
|
|
2172
|
+
if (a.effect !== "slide") {
|
|
2173
|
+
r.setTranslate(m);
|
|
2174
|
+
}
|
|
2175
|
+
if (b !== "reset") {
|
|
2176
|
+
r.transitionStart(i, b);
|
|
2177
|
+
r.transitionEnd(i, b);
|
|
2178
|
+
}
|
|
2179
|
+
return false;
|
|
2180
|
+
}
|
|
2181
|
+
if (a.cssMode) {
|
|
2182
|
+
const e = r.isHorizontal();
|
|
2183
|
+
const i = d ? m : -m;
|
|
2184
|
+
if (t === 0) {
|
|
2185
|
+
const t = r.virtual && r.params.virtual.enabled;
|
|
2186
|
+
if (t) {
|
|
2187
|
+
r.wrapperEl.style.scrollSnapType = "none";
|
|
2188
|
+
r._immediateVirtual = true;
|
|
2189
|
+
}
|
|
2190
|
+
p[e ? "scrollLeft" : "scrollTop"] = i;
|
|
2191
|
+
if (t) {
|
|
2192
|
+
requestAnimationFrame((() => {
|
|
2193
|
+
r.wrapperEl.style.scrollSnapType = "";
|
|
2194
|
+
r._swiperImmediateVirtual = false;
|
|
2195
|
+
}));
|
|
2196
|
+
}
|
|
2197
|
+
} else {
|
|
2198
|
+
if (!r.support.smoothScroll) {
|
|
2199
|
+
animateCSSModeScroll({
|
|
2200
|
+
swiper: r,
|
|
2201
|
+
targetPosition: i,
|
|
2202
|
+
side: e ? "left" : "top"
|
|
2203
|
+
});
|
|
2204
|
+
return true;
|
|
2205
|
+
}
|
|
2206
|
+
p.scrollTo({
|
|
2207
|
+
[e ? "left" : "top"]: i,
|
|
2208
|
+
behavior: "smooth"
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
return true;
|
|
2212
|
+
}
|
|
2213
|
+
r.setTransition(t);
|
|
2214
|
+
r.setTranslate(m);
|
|
2215
|
+
r.updateActiveIndex(o);
|
|
2216
|
+
r.updateSlidesClasses();
|
|
2217
|
+
r.emit("beforeTransitionStart", t, n);
|
|
2218
|
+
r.transitionStart(i, b);
|
|
2219
|
+
if (t === 0) {
|
|
2220
|
+
r.transitionEnd(i, b);
|
|
2221
|
+
} else if (!r.animating) {
|
|
2222
|
+
r.animating = true;
|
|
2223
|
+
if (!r.onSlideToWrapperTransitionEnd) {
|
|
2224
|
+
r.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
|
2225
|
+
if (!r || r.destroyed) return;
|
|
2226
|
+
if (e.target !== this) return;
|
|
2227
|
+
r.$wrapperEl[0].removeEventListener("transitionend", r.onSlideToWrapperTransitionEnd);
|
|
2228
|
+
r.$wrapperEl[0].removeEventListener("webkitTransitionEnd", r.onSlideToWrapperTransitionEnd);
|
|
2229
|
+
r.onSlideToWrapperTransitionEnd = null;
|
|
2230
|
+
delete r.onSlideToWrapperTransitionEnd;
|
|
2231
|
+
r.transitionEnd(i, b);
|
|
2232
|
+
};
|
|
2233
|
+
}
|
|
2234
|
+
r.$wrapperEl[0].addEventListener("transitionend", r.onSlideToWrapperTransitionEnd);
|
|
2235
|
+
r.$wrapperEl[0].addEventListener("webkitTransitionEnd", r.onSlideToWrapperTransitionEnd);
|
|
2236
|
+
}
|
|
2237
|
+
return true;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
function slideToLoop(e = 0, t = this.params.speed, i = true, n) {
|
|
2241
|
+
if (typeof e === "string") {
|
|
2242
|
+
/**
|
|
2243
|
+
* The `index` argument converted from `string` to `number`.
|
|
2244
|
+
* @type {number}
|
|
2245
|
+
*/
|
|
2246
|
+
const t = parseInt(e, 10);
|
|
2247
|
+
/**
|
|
2248
|
+
* Determines whether the `index` argument is a valid `number`
|
|
2249
|
+
* after being converted from the `string` type.
|
|
2250
|
+
* @type {boolean}
|
|
2251
|
+
*/ const i = isFinite(t);
|
|
2252
|
+
if (!i) {
|
|
2253
|
+
throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);
|
|
2254
|
+
}
|
|
2255
|
+
// Knowing that the converted `index` is a valid number,
|
|
2256
|
+
// we can update the original argument's value.
|
|
2257
|
+
e = t;
|
|
2258
|
+
}
|
|
2259
|
+
const s = this;
|
|
2260
|
+
let r = e;
|
|
2261
|
+
if (s.params.loop) {
|
|
2262
|
+
r += s.loopedSlides;
|
|
2263
|
+
}
|
|
2264
|
+
return s.slideTo(r, t, i, n);
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
/* eslint no-unused-vars: "off" */ function slideNext(e = this.params.speed, t = true, i) {
|
|
2268
|
+
const n = this;
|
|
2269
|
+
const {animating: s, enabled: r, params: o} = n;
|
|
2270
|
+
if (!r) return n;
|
|
2271
|
+
let a = o.slidesPerGroup;
|
|
2272
|
+
if (o.slidesPerView === "auto" && o.slidesPerGroup === 1 && o.slidesPerGroupAuto) {
|
|
2273
|
+
a = Math.max(n.slidesPerViewDynamic("current", true), 1);
|
|
2274
|
+
}
|
|
2275
|
+
const l = n.activeIndex < o.slidesPerGroupSkip ? 1 : a;
|
|
2276
|
+
if (o.loop) {
|
|
2277
|
+
if (s && o.loopPreventsSlide) return false;
|
|
2278
|
+
n.loopFix();
|
|
2279
|
+
// eslint-disable-next-line
|
|
2280
|
+
n._clientLeft = n.$wrapperEl[0].clientLeft;
|
|
2281
|
+
}
|
|
2282
|
+
if (o.rewind && n.isEnd) {
|
|
2283
|
+
return n.slideTo(0, e, t, i);
|
|
2284
|
+
}
|
|
2285
|
+
return n.slideTo(n.activeIndex + l, e, t, i);
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
/* eslint no-unused-vars: "off" */ function slidePrev(e = this.params.speed, t = true, i) {
|
|
2289
|
+
const n = this;
|
|
2290
|
+
const {params: s, animating: r, snapGrid: o, slidesGrid: a, rtlTranslate: l, enabled: c} = n;
|
|
2291
|
+
if (!c) return n;
|
|
2292
|
+
if (s.loop) {
|
|
2293
|
+
if (r && s.loopPreventsSlide) return false;
|
|
2294
|
+
n.loopFix();
|
|
2295
|
+
// eslint-disable-next-line
|
|
2296
|
+
n._clientLeft = n.$wrapperEl[0].clientLeft;
|
|
2297
|
+
}
|
|
2298
|
+
const f = l ? n.translate : -n.translate;
|
|
2299
|
+
function normalize(e) {
|
|
2300
|
+
if (e < 0) return -Math.floor(Math.abs(e));
|
|
2301
|
+
return Math.floor(e);
|
|
2302
|
+
}
|
|
2303
|
+
const u = normalize(f);
|
|
2304
|
+
const d = o.map((e => normalize(e)));
|
|
2305
|
+
let p = o[d.indexOf(u) - 1];
|
|
2306
|
+
if (typeof p === "undefined" && s.cssMode) {
|
|
2307
|
+
let e;
|
|
2308
|
+
o.forEach(((t, i) => {
|
|
2309
|
+
if (u >= t) {
|
|
2310
|
+
// prevSnap = snap;
|
|
2311
|
+
e = i;
|
|
2312
|
+
}
|
|
2313
|
+
}));
|
|
2314
|
+
if (typeof e !== "undefined") {
|
|
2315
|
+
p = o[e > 0 ? e - 1 : e];
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
let h = 0;
|
|
2319
|
+
if (typeof p !== "undefined") {
|
|
2320
|
+
h = a.indexOf(p);
|
|
2321
|
+
if (h < 0) h = n.activeIndex - 1;
|
|
2322
|
+
if (s.slidesPerView === "auto" && s.slidesPerGroup === 1 && s.slidesPerGroupAuto) {
|
|
2323
|
+
h = h - n.slidesPerViewDynamic("previous", true) + 1;
|
|
2324
|
+
h = Math.max(h, 0);
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
if (s.rewind && n.isBeginning) {
|
|
2328
|
+
const s = n.params.virtual && n.params.virtual.enabled && n.virtual ? n.virtual.slides.length - 1 : n.slides.length - 1;
|
|
2329
|
+
return n.slideTo(s, e, t, i);
|
|
2330
|
+
}
|
|
2331
|
+
return n.slideTo(h, e, t, i);
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
/* eslint no-unused-vars: "off" */ function slideReset(e = this.params.speed, t = true, i) {
|
|
2335
|
+
const n = this;
|
|
2336
|
+
return n.slideTo(n.activeIndex, e, t, i);
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
/* eslint no-unused-vars: "off" */ function slideToClosest(e = this.params.speed, t = true, i, n = .5) {
|
|
2340
|
+
const s = this;
|
|
2341
|
+
let r = s.activeIndex;
|
|
2342
|
+
const o = Math.min(s.params.slidesPerGroupSkip, r);
|
|
2343
|
+
const a = o + Math.floor((r - o) / s.params.slidesPerGroup);
|
|
2344
|
+
const l = s.rtlTranslate ? s.translate : -s.translate;
|
|
2345
|
+
if (l >= s.snapGrid[a]) {
|
|
2346
|
+
// The current translate is on or after the current snap index, so the choice
|
|
2347
|
+
// is between the current index and the one after it.
|
|
2348
|
+
const e = s.snapGrid[a];
|
|
2349
|
+
const t = s.snapGrid[a + 1];
|
|
2350
|
+
if (l - e > (t - e) * n) {
|
|
2351
|
+
r += s.params.slidesPerGroup;
|
|
2352
|
+
}
|
|
2353
|
+
} else {
|
|
2354
|
+
// The current translate is before the current snap index, so the choice
|
|
2355
|
+
// is between the current index and the one before it.
|
|
2356
|
+
const e = s.snapGrid[a - 1];
|
|
2357
|
+
const t = s.snapGrid[a];
|
|
2358
|
+
if (l - e <= (t - e) * n) {
|
|
2359
|
+
r -= s.params.slidesPerGroup;
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
r = Math.max(r, 0);
|
|
2363
|
+
r = Math.min(r, s.slidesGrid.length - 1);
|
|
2364
|
+
return s.slideTo(r, e, t, i);
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
function slideToClickedSlide() {
|
|
2368
|
+
const e = this;
|
|
2369
|
+
const {params: t, $wrapperEl: i} = e;
|
|
2370
|
+
const n = t.slidesPerView === "auto" ? e.slidesPerViewDynamic() : t.slidesPerView;
|
|
2371
|
+
let s = e.clickedIndex;
|
|
2372
|
+
let r;
|
|
2373
|
+
if (t.loop) {
|
|
2374
|
+
if (e.animating) return;
|
|
2375
|
+
r = parseInt($(e.clickedSlide).attr("data-swiper-slide-index"), 10);
|
|
2376
|
+
if (t.centeredSlides) {
|
|
2377
|
+
if (s < e.loopedSlides - n / 2 || s > e.slides.length - e.loopedSlides + n / 2) {
|
|
2378
|
+
e.loopFix();
|
|
2379
|
+
s = i.children(`.${t.slideClass}[data-swiper-slide-index="${r}"]:not(.${t.slideDuplicateClass})`).eq(0).index();
|
|
2380
|
+
nextTick((() => {
|
|
2381
|
+
e.slideTo(s);
|
|
2382
|
+
}));
|
|
2383
|
+
} else {
|
|
2384
|
+
e.slideTo(s);
|
|
2385
|
+
}
|
|
2386
|
+
} else if (s > e.slides.length - n) {
|
|
2387
|
+
e.loopFix();
|
|
2388
|
+
s = i.children(`.${t.slideClass}[data-swiper-slide-index="${r}"]:not(.${t.slideDuplicateClass})`).eq(0).index();
|
|
2389
|
+
nextTick((() => {
|
|
2390
|
+
e.slideTo(s);
|
|
2391
|
+
}));
|
|
2392
|
+
} else {
|
|
2393
|
+
e.slideTo(s);
|
|
2394
|
+
}
|
|
2395
|
+
} else {
|
|
2396
|
+
e.slideTo(s);
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
const S = {
|
|
2401
|
+
slideTo,
|
|
2402
|
+
slideToLoop,
|
|
2403
|
+
slideNext,
|
|
2404
|
+
slidePrev,
|
|
2405
|
+
slideReset,
|
|
2406
|
+
slideToClosest,
|
|
2407
|
+
slideToClickedSlide
|
|
2408
|
+
};
|
|
2409
|
+
|
|
2410
|
+
function loopCreate() {
|
|
2411
|
+
const e = this;
|
|
2412
|
+
const t = getDocument();
|
|
2413
|
+
const {params: i, $wrapperEl: n} = e;
|
|
2414
|
+
// Remove duplicated slides
|
|
2415
|
+
const s = n.children().length > 0 ? $(n.children()[0].parentNode) : n;
|
|
2416
|
+
s.children(`.${i.slideClass}.${i.slideDuplicateClass}`).remove();
|
|
2417
|
+
let r = s.children(`.${i.slideClass}`);
|
|
2418
|
+
if (i.loopFillGroupWithBlank) {
|
|
2419
|
+
const e = i.slidesPerGroup - r.length % i.slidesPerGroup;
|
|
2420
|
+
if (e !== i.slidesPerGroup) {
|
|
2421
|
+
for (let n = 0; n < e; n += 1) {
|
|
2422
|
+
const e = $(t.createElement("div")).addClass(`${i.slideClass} ${i.slideBlankClass}`);
|
|
2423
|
+
s.append(e);
|
|
2424
|
+
}
|
|
2425
|
+
r = s.children(`.${i.slideClass}`);
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
if (i.slidesPerView === "auto" && !i.loopedSlides) i.loopedSlides = r.length;
|
|
2429
|
+
e.loopedSlides = Math.ceil(parseFloat(i.loopedSlides || i.slidesPerView, 10));
|
|
2430
|
+
e.loopedSlides += i.loopAdditionalSlides;
|
|
2431
|
+
if (e.loopedSlides > r.length && e.params.loopedSlidesLimit) {
|
|
2432
|
+
e.loopedSlides = r.length;
|
|
2433
|
+
}
|
|
2434
|
+
const o = [];
|
|
2435
|
+
const a = [];
|
|
2436
|
+
r.each(((e, t) => {
|
|
2437
|
+
const i = $(e);
|
|
2438
|
+
i.attr("data-swiper-slide-index", t);
|
|
2439
|
+
}));
|
|
2440
|
+
for (let t = 0; t < e.loopedSlides; t += 1) {
|
|
2441
|
+
const e = t - Math.floor(t / r.length) * r.length;
|
|
2442
|
+
a.push(r.eq(e)[0]);
|
|
2443
|
+
o.unshift(r.eq(r.length - e - 1)[0]);
|
|
2444
|
+
}
|
|
2445
|
+
for (let e = 0; e < a.length; e += 1) {
|
|
2446
|
+
s.append($(a[e].cloneNode(true)).addClass(i.slideDuplicateClass));
|
|
2447
|
+
}
|
|
2448
|
+
for (let e = o.length - 1; e >= 0; e -= 1) {
|
|
2449
|
+
s.prepend($(o[e].cloneNode(true)).addClass(i.slideDuplicateClass));
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
function loopFix() {
|
|
2454
|
+
const e = this;
|
|
2455
|
+
e.emit("beforeLoopFix");
|
|
2456
|
+
const {activeIndex: t, slides: i, loopedSlides: n, allowSlidePrev: s, allowSlideNext: r, snapGrid: o, rtlTranslate: a} = e;
|
|
2457
|
+
let l;
|
|
2458
|
+
e.allowSlidePrev = true;
|
|
2459
|
+
e.allowSlideNext = true;
|
|
2460
|
+
const c = -o[t];
|
|
2461
|
+
const f = c - e.getTranslate();
|
|
2462
|
+
// Fix For Negative Oversliding
|
|
2463
|
+
if (t < n) {
|
|
2464
|
+
l = i.length - n * 3 + t;
|
|
2465
|
+
l += n;
|
|
2466
|
+
const s = e.slideTo(l, 0, false, true);
|
|
2467
|
+
if (s && f !== 0) {
|
|
2468
|
+
e.setTranslate((a ? -e.translate : e.translate) - f);
|
|
2469
|
+
}
|
|
2470
|
+
} else if (t >= i.length - n) {
|
|
2471
|
+
// Fix For Positive Oversliding
|
|
2472
|
+
l = -i.length + t + n;
|
|
2473
|
+
l += n;
|
|
2474
|
+
const s = e.slideTo(l, 0, false, true);
|
|
2475
|
+
if (s && f !== 0) {
|
|
2476
|
+
e.setTranslate((a ? -e.translate : e.translate) - f);
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
e.allowSlidePrev = s;
|
|
2480
|
+
e.allowSlideNext = r;
|
|
2481
|
+
e.emit("loopFix");
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
function loopDestroy() {
|
|
2485
|
+
const e = this;
|
|
2486
|
+
const {$wrapperEl: t, params: i, slides: n} = e;
|
|
2487
|
+
t.children(`.${i.slideClass}.${i.slideDuplicateClass},.${i.slideClass}.${i.slideBlankClass}`).remove();
|
|
2488
|
+
n.removeAttr("data-swiper-slide-index");
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
const C = {
|
|
2492
|
+
loopCreate,
|
|
2493
|
+
loopFix,
|
|
2494
|
+
loopDestroy
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
function setGrabCursor(e) {
|
|
2498
|
+
const t = this;
|
|
2499
|
+
if (t.support.touch || !t.params.simulateTouch || t.params.watchOverflow && t.isLocked || t.params.cssMode) return;
|
|
2500
|
+
const i = t.params.touchEventsTarget === "container" ? t.el : t.wrapperEl;
|
|
2501
|
+
i.style.cursor = "move";
|
|
2502
|
+
i.style.cursor = e ? "grabbing" : "grab";
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
function unsetGrabCursor() {
|
|
2506
|
+
const e = this;
|
|
2507
|
+
if (e.support.touch || e.params.watchOverflow && e.isLocked || e.params.cssMode) {
|
|
2508
|
+
return;
|
|
2509
|
+
}
|
|
2510
|
+
e[e.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "";
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
const T = {
|
|
2514
|
+
setGrabCursor,
|
|
2515
|
+
unsetGrabCursor
|
|
2516
|
+
};
|
|
2517
|
+
|
|
2518
|
+
function closestElement(e, t = this) {
|
|
2519
|
+
function __closestFrom(t) {
|
|
2520
|
+
if (!t || t === getDocument() || t === getWindow()) return null;
|
|
2521
|
+
if (t.assignedSlot) t = t.assignedSlot;
|
|
2522
|
+
const i = t.closest(e);
|
|
2523
|
+
if (!i && !t.getRootNode) {
|
|
2524
|
+
return null;
|
|
2525
|
+
}
|
|
2526
|
+
return i || __closestFrom(t.getRootNode().host);
|
|
2527
|
+
}
|
|
2528
|
+
return __closestFrom(t);
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
function onTouchStart(e) {
|
|
2532
|
+
const t = this;
|
|
2533
|
+
const i = getDocument();
|
|
2534
|
+
const n = getWindow();
|
|
2535
|
+
const s = t.touchEventsData;
|
|
2536
|
+
const {params: r, touches: o, enabled: a} = t;
|
|
2537
|
+
if (!a) return;
|
|
2538
|
+
if (t.animating && r.preventInteractionOnTransition) {
|
|
2539
|
+
return;
|
|
2540
|
+
}
|
|
2541
|
+
if (!t.animating && r.cssMode && r.loop) {
|
|
2542
|
+
t.loopFix();
|
|
2543
|
+
}
|
|
2544
|
+
let l = e;
|
|
2545
|
+
if (l.originalEvent) l = l.originalEvent;
|
|
2546
|
+
let c = $(l.target);
|
|
2547
|
+
if (r.touchEventsTarget === "wrapper") {
|
|
2548
|
+
if (!c.closest(t.wrapperEl).length) return;
|
|
2549
|
+
}
|
|
2550
|
+
s.isTouchEvent = l.type === "touchstart";
|
|
2551
|
+
if (!s.isTouchEvent && "which" in l && l.which === 3) return;
|
|
2552
|
+
if (!s.isTouchEvent && "button" in l && l.button > 0) return;
|
|
2553
|
+
if (s.isTouched && s.isMoved) return;
|
|
2554
|
+
// change target el for shadow root component
|
|
2555
|
+
const f = !!r.noSwipingClass && r.noSwipingClass !== "";
|
|
2556
|
+
// eslint-disable-next-line
|
|
2557
|
+
const u = e.composedPath ? e.composedPath() : e.path;
|
|
2558
|
+
if (f && l.target && l.target.shadowRoot && u) {
|
|
2559
|
+
c = $(u[0]);
|
|
2560
|
+
}
|
|
2561
|
+
const d = r.noSwipingSelector ? r.noSwipingSelector : `.${r.noSwipingClass}`;
|
|
2562
|
+
const p = !!(l.target && l.target.shadowRoot);
|
|
2563
|
+
// use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
2564
|
+
if (r.noSwiping && (p ? closestElement(d, c[0]) : c.closest(d)[0])) {
|
|
2565
|
+
t.allowClick = true;
|
|
2566
|
+
return;
|
|
2567
|
+
}
|
|
2568
|
+
if (r.swipeHandler) {
|
|
2569
|
+
if (!c.closest(r.swipeHandler)[0]) return;
|
|
2570
|
+
}
|
|
2571
|
+
o.currentX = l.type === "touchstart" ? l.targetTouches[0].pageX : l.pageX;
|
|
2572
|
+
o.currentY = l.type === "touchstart" ? l.targetTouches[0].pageY : l.pageY;
|
|
2573
|
+
const h = o.currentX;
|
|
2574
|
+
const g = o.currentY;
|
|
2575
|
+
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
|
|
2576
|
+
const v = r.edgeSwipeDetection || r.iOSEdgeSwipeDetection;
|
|
2577
|
+
const m = r.edgeSwipeThreshold || r.iOSEdgeSwipeThreshold;
|
|
2578
|
+
if (v && (h <= m || h >= n.innerWidth - m)) {
|
|
2579
|
+
if (v === "prevent") {
|
|
2580
|
+
e.preventDefault();
|
|
2581
|
+
} else {
|
|
2582
|
+
return;
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
Object.assign(s, {
|
|
2586
|
+
isTouched: true,
|
|
2587
|
+
isMoved: false,
|
|
2588
|
+
allowTouchCallbacks: true,
|
|
2589
|
+
isScrolling: undefined,
|
|
2590
|
+
startMoving: undefined
|
|
2591
|
+
});
|
|
2592
|
+
o.startX = h;
|
|
2593
|
+
o.startY = g;
|
|
2594
|
+
s.touchStartTime = now();
|
|
2595
|
+
t.allowClick = true;
|
|
2596
|
+
t.updateSize();
|
|
2597
|
+
t.swipeDirection = undefined;
|
|
2598
|
+
if (r.threshold > 0) s.allowThresholdMove = false;
|
|
2599
|
+
if (l.type !== "touchstart") {
|
|
2600
|
+
let e = true;
|
|
2601
|
+
if (c.is(s.focusableElements)) {
|
|
2602
|
+
e = false;
|
|
2603
|
+
if (c[0].nodeName === "SELECT") {
|
|
2604
|
+
s.isTouched = false;
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
if (i.activeElement && $(i.activeElement).is(s.focusableElements) && i.activeElement !== c[0]) {
|
|
2608
|
+
i.activeElement.blur();
|
|
2609
|
+
}
|
|
2610
|
+
const n = e && t.allowTouchMove && r.touchStartPreventDefault;
|
|
2611
|
+
if ((r.touchStartForcePreventDefault || n) && !c[0].isContentEditable) {
|
|
2612
|
+
l.preventDefault();
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
if (t.params.freeMode && t.params.freeMode.enabled && t.freeMode && t.animating && !r.cssMode) {
|
|
2616
|
+
t.freeMode.onTouchStart();
|
|
2617
|
+
}
|
|
2618
|
+
t.emit("touchStart", l);
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
function onTouchMove(e) {
|
|
2622
|
+
const t = getDocument();
|
|
2623
|
+
const i = this;
|
|
2624
|
+
const n = i.touchEventsData;
|
|
2625
|
+
const {params: s, touches: r, rtlTranslate: o, enabled: a} = i;
|
|
2626
|
+
if (!a) return;
|
|
2627
|
+
let l = e;
|
|
2628
|
+
if (l.originalEvent) l = l.originalEvent;
|
|
2629
|
+
if (!n.isTouched) {
|
|
2630
|
+
if (n.startMoving && n.isScrolling) {
|
|
2631
|
+
i.emit("touchMoveOpposite", l);
|
|
2632
|
+
}
|
|
2633
|
+
return;
|
|
2634
|
+
}
|
|
2635
|
+
if (n.isTouchEvent && l.type !== "touchmove") return;
|
|
2636
|
+
const c = l.type === "touchmove" && l.targetTouches && (l.targetTouches[0] || l.changedTouches[0]);
|
|
2637
|
+
const f = l.type === "touchmove" ? c.pageX : l.pageX;
|
|
2638
|
+
const u = l.type === "touchmove" ? c.pageY : l.pageY;
|
|
2639
|
+
if (l.preventedByNestedSwiper) {
|
|
2640
|
+
r.startX = f;
|
|
2641
|
+
r.startY = u;
|
|
2642
|
+
return;
|
|
2643
|
+
}
|
|
2644
|
+
if (!i.allowTouchMove) {
|
|
2645
|
+
if (!$(l.target).is(n.focusableElements)) {
|
|
2646
|
+
i.allowClick = false;
|
|
2647
|
+
}
|
|
2648
|
+
if (n.isTouched) {
|
|
2649
|
+
Object.assign(r, {
|
|
2650
|
+
startX: f,
|
|
2651
|
+
startY: u,
|
|
2652
|
+
currentX: f,
|
|
2653
|
+
currentY: u
|
|
2654
|
+
});
|
|
2655
|
+
n.touchStartTime = now();
|
|
2656
|
+
}
|
|
2657
|
+
return;
|
|
2658
|
+
}
|
|
2659
|
+
if (n.isTouchEvent && s.touchReleaseOnEdges && !s.loop) {
|
|
2660
|
+
if (i.isVertical()) {
|
|
2661
|
+
// Vertical
|
|
2662
|
+
if (u < r.startY && i.translate <= i.maxTranslate() || u > r.startY && i.translate >= i.minTranslate()) {
|
|
2663
|
+
n.isTouched = false;
|
|
2664
|
+
n.isMoved = false;
|
|
2665
|
+
return;
|
|
2666
|
+
}
|
|
2667
|
+
} else if (f < r.startX && i.translate <= i.maxTranslate() || f > r.startX && i.translate >= i.minTranslate()) {
|
|
2668
|
+
return;
|
|
2669
|
+
}
|
|
2670
|
+
}
|
|
2671
|
+
if (n.isTouchEvent && t.activeElement) {
|
|
2672
|
+
if (l.target === t.activeElement && $(l.target).is(n.focusableElements)) {
|
|
2673
|
+
n.isMoved = true;
|
|
2674
|
+
i.allowClick = false;
|
|
2675
|
+
return;
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
if (n.allowTouchCallbacks) {
|
|
2679
|
+
i.emit("touchMove", l);
|
|
2680
|
+
}
|
|
2681
|
+
if (l.targetTouches && l.targetTouches.length > 1) return;
|
|
2682
|
+
r.currentX = f;
|
|
2683
|
+
r.currentY = u;
|
|
2684
|
+
const d = r.currentX - r.startX;
|
|
2685
|
+
const p = r.currentY - r.startY;
|
|
2686
|
+
if (i.params.threshold && Math.sqrt(d ** 2 + p ** 2) < i.params.threshold) return;
|
|
2687
|
+
if (typeof n.isScrolling === "undefined") {
|
|
2688
|
+
let e;
|
|
2689
|
+
if (i.isHorizontal() && r.currentY === r.startY || i.isVertical() && r.currentX === r.startX) {
|
|
2690
|
+
n.isScrolling = false;
|
|
2691
|
+
} else {
|
|
2692
|
+
// eslint-disable-next-line
|
|
2693
|
+
if (d * d + p * p >= 25) {
|
|
2694
|
+
e = Math.atan2(Math.abs(p), Math.abs(d)) * 180 / Math.PI;
|
|
2695
|
+
n.isScrolling = i.isHorizontal() ? e > s.touchAngle : 90 - e > s.touchAngle;
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
if (n.isScrolling) {
|
|
2700
|
+
i.emit("touchMoveOpposite", l);
|
|
2701
|
+
}
|
|
2702
|
+
if (typeof n.startMoving === "undefined") {
|
|
2703
|
+
if (r.currentX !== r.startX || r.currentY !== r.startY) {
|
|
2704
|
+
n.startMoving = true;
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
if (n.isScrolling) {
|
|
2708
|
+
n.isTouched = false;
|
|
2709
|
+
return;
|
|
2710
|
+
}
|
|
2711
|
+
if (!n.startMoving) {
|
|
2712
|
+
return;
|
|
2713
|
+
}
|
|
2714
|
+
i.allowClick = false;
|
|
2715
|
+
if (!s.cssMode && l.cancelable) {
|
|
2716
|
+
l.preventDefault();
|
|
2717
|
+
}
|
|
2718
|
+
if (s.touchMoveStopPropagation && !s.nested) {
|
|
2719
|
+
l.stopPropagation();
|
|
2720
|
+
}
|
|
2721
|
+
if (!n.isMoved) {
|
|
2722
|
+
if (s.loop && !s.cssMode) {
|
|
2723
|
+
i.loopFix();
|
|
2724
|
+
}
|
|
2725
|
+
n.startTranslate = i.getTranslate();
|
|
2726
|
+
i.setTransition(0);
|
|
2727
|
+
if (i.animating) {
|
|
2728
|
+
i.$wrapperEl.trigger("webkitTransitionEnd transitionend");
|
|
2729
|
+
}
|
|
2730
|
+
n.allowMomentumBounce = false;
|
|
2731
|
+
// Grab Cursor
|
|
2732
|
+
if (s.grabCursor && (i.allowSlideNext === true || i.allowSlidePrev === true)) {
|
|
2733
|
+
i.setGrabCursor(true);
|
|
2734
|
+
}
|
|
2735
|
+
i.emit("sliderFirstMove", l);
|
|
2736
|
+
}
|
|
2737
|
+
i.emit("sliderMove", l);
|
|
2738
|
+
n.isMoved = true;
|
|
2739
|
+
let h = i.isHorizontal() ? d : p;
|
|
2740
|
+
r.diff = h;
|
|
2741
|
+
h *= s.touchRatio;
|
|
2742
|
+
if (o) h = -h;
|
|
2743
|
+
i.swipeDirection = h > 0 ? "prev" : "next";
|
|
2744
|
+
n.currentTranslate = h + n.startTranslate;
|
|
2745
|
+
let g = true;
|
|
2746
|
+
let v = s.resistanceRatio;
|
|
2747
|
+
if (s.touchReleaseOnEdges) {
|
|
2748
|
+
v = 0;
|
|
2749
|
+
}
|
|
2750
|
+
if (h > 0 && n.currentTranslate > i.minTranslate()) {
|
|
2751
|
+
g = false;
|
|
2752
|
+
if (s.resistance) n.currentTranslate = i.minTranslate() - 1 + (-i.minTranslate() + n.startTranslate + h) ** v;
|
|
2753
|
+
} else if (h < 0 && n.currentTranslate < i.maxTranslate()) {
|
|
2754
|
+
g = false;
|
|
2755
|
+
if (s.resistance) n.currentTranslate = i.maxTranslate() + 1 - (i.maxTranslate() - n.startTranslate - h) ** v;
|
|
2756
|
+
}
|
|
2757
|
+
if (g) {
|
|
2758
|
+
l.preventedByNestedSwiper = true;
|
|
2759
|
+
}
|
|
2760
|
+
// Directions locks
|
|
2761
|
+
if (!i.allowSlideNext && i.swipeDirection === "next" && n.currentTranslate < n.startTranslate) {
|
|
2762
|
+
n.currentTranslate = n.startTranslate;
|
|
2763
|
+
}
|
|
2764
|
+
if (!i.allowSlidePrev && i.swipeDirection === "prev" && n.currentTranslate > n.startTranslate) {
|
|
2765
|
+
n.currentTranslate = n.startTranslate;
|
|
2766
|
+
}
|
|
2767
|
+
if (!i.allowSlidePrev && !i.allowSlideNext) {
|
|
2768
|
+
n.currentTranslate = n.startTranslate;
|
|
2769
|
+
}
|
|
2770
|
+
// Threshold
|
|
2771
|
+
if (s.threshold > 0) {
|
|
2772
|
+
if (Math.abs(h) > s.threshold || n.allowThresholdMove) {
|
|
2773
|
+
if (!n.allowThresholdMove) {
|
|
2774
|
+
n.allowThresholdMove = true;
|
|
2775
|
+
r.startX = r.currentX;
|
|
2776
|
+
r.startY = r.currentY;
|
|
2777
|
+
n.currentTranslate = n.startTranslate;
|
|
2778
|
+
r.diff = i.isHorizontal() ? r.currentX - r.startX : r.currentY - r.startY;
|
|
2779
|
+
return;
|
|
2780
|
+
}
|
|
2781
|
+
} else {
|
|
2782
|
+
n.currentTranslate = n.startTranslate;
|
|
2783
|
+
return;
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
if (!s.followFinger || s.cssMode) return;
|
|
2787
|
+
// Update active index in free mode
|
|
2788
|
+
if (s.freeMode && s.freeMode.enabled && i.freeMode || s.watchSlidesProgress) {
|
|
2789
|
+
i.updateActiveIndex();
|
|
2790
|
+
i.updateSlidesClasses();
|
|
2791
|
+
}
|
|
2792
|
+
if (i.params.freeMode && s.freeMode.enabled && i.freeMode) {
|
|
2793
|
+
i.freeMode.onTouchMove();
|
|
2794
|
+
}
|
|
2795
|
+
// Update progress
|
|
2796
|
+
i.updateProgress(n.currentTranslate);
|
|
2797
|
+
// Update translate
|
|
2798
|
+
i.setTranslate(n.currentTranslate);
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
function onTouchEnd(e) {
|
|
2802
|
+
const t = this;
|
|
2803
|
+
const i = t.touchEventsData;
|
|
2804
|
+
const {params: n, touches: s, rtlTranslate: r, slidesGrid: o, enabled: a} = t;
|
|
2805
|
+
if (!a) return;
|
|
2806
|
+
let l = e;
|
|
2807
|
+
if (l.originalEvent) l = l.originalEvent;
|
|
2808
|
+
if (i.allowTouchCallbacks) {
|
|
2809
|
+
t.emit("touchEnd", l);
|
|
2810
|
+
}
|
|
2811
|
+
i.allowTouchCallbacks = false;
|
|
2812
|
+
if (!i.isTouched) {
|
|
2813
|
+
if (i.isMoved && n.grabCursor) {
|
|
2814
|
+
t.setGrabCursor(false);
|
|
2815
|
+
}
|
|
2816
|
+
i.isMoved = false;
|
|
2817
|
+
i.startMoving = false;
|
|
2818
|
+
return;
|
|
2819
|
+
}
|
|
2820
|
+
// Return Grab Cursor
|
|
2821
|
+
if (n.grabCursor && i.isMoved && i.isTouched && (t.allowSlideNext === true || t.allowSlidePrev === true)) {
|
|
2822
|
+
t.setGrabCursor(false);
|
|
2823
|
+
}
|
|
2824
|
+
// Time diff
|
|
2825
|
+
const c = now();
|
|
2826
|
+
const f = c - i.touchStartTime;
|
|
2827
|
+
// Tap, doubleTap, Click
|
|
2828
|
+
if (t.allowClick) {
|
|
2829
|
+
const e = l.path || l.composedPath && l.composedPath();
|
|
2830
|
+
t.updateClickedSlide(e && e[0] || l.target);
|
|
2831
|
+
t.emit("tap click", l);
|
|
2832
|
+
if (f < 300 && c - i.lastClickTime < 300) {
|
|
2833
|
+
t.emit("doubleTap doubleClick", l);
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
i.lastClickTime = now();
|
|
2837
|
+
nextTick((() => {
|
|
2838
|
+
if (!t.destroyed) t.allowClick = true;
|
|
2839
|
+
}));
|
|
2840
|
+
if (!i.isTouched || !i.isMoved || !t.swipeDirection || s.diff === 0 || i.currentTranslate === i.startTranslate) {
|
|
2841
|
+
i.isTouched = false;
|
|
2842
|
+
i.isMoved = false;
|
|
2843
|
+
i.startMoving = false;
|
|
2844
|
+
return;
|
|
2845
|
+
}
|
|
2846
|
+
i.isTouched = false;
|
|
2847
|
+
i.isMoved = false;
|
|
2848
|
+
i.startMoving = false;
|
|
2849
|
+
let u;
|
|
2850
|
+
if (n.followFinger) {
|
|
2851
|
+
u = r ? t.translate : -t.translate;
|
|
2852
|
+
} else {
|
|
2853
|
+
u = -i.currentTranslate;
|
|
2854
|
+
}
|
|
2855
|
+
if (n.cssMode) {
|
|
2856
|
+
return;
|
|
2857
|
+
}
|
|
2858
|
+
if (t.params.freeMode && n.freeMode.enabled) {
|
|
2859
|
+
t.freeMode.onTouchEnd({
|
|
2860
|
+
currentPos: u
|
|
2861
|
+
});
|
|
2862
|
+
return;
|
|
2863
|
+
}
|
|
2864
|
+
// Find current slide
|
|
2865
|
+
let d = 0;
|
|
2866
|
+
let p = t.slidesSizesGrid[0];
|
|
2867
|
+
for (let e = 0; e < o.length; e += e < n.slidesPerGroupSkip ? 1 : n.slidesPerGroup) {
|
|
2868
|
+
const t = e < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
|
|
2869
|
+
if (typeof o[e + t] !== "undefined") {
|
|
2870
|
+
if (u >= o[e] && u < o[e + t]) {
|
|
2871
|
+
d = e;
|
|
2872
|
+
p = o[e + t] - o[e];
|
|
2873
|
+
}
|
|
2874
|
+
} else if (u >= o[e]) {
|
|
2875
|
+
d = e;
|
|
2876
|
+
p = o[o.length - 1] - o[o.length - 2];
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
let h = null;
|
|
2880
|
+
let g = null;
|
|
2881
|
+
if (n.rewind) {
|
|
2882
|
+
if (t.isBeginning) {
|
|
2883
|
+
g = t.params.virtual && t.params.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1;
|
|
2884
|
+
} else if (t.isEnd) {
|
|
2885
|
+
h = 0;
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
// Find current slide size
|
|
2889
|
+
const v = (u - o[d]) / p;
|
|
2890
|
+
const m = d < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
|
|
2891
|
+
if (f > n.longSwipesMs) {
|
|
2892
|
+
// Long touches
|
|
2893
|
+
if (!n.longSwipes) {
|
|
2894
|
+
t.slideTo(t.activeIndex);
|
|
2895
|
+
return;
|
|
2896
|
+
}
|
|
2897
|
+
if (t.swipeDirection === "next") {
|
|
2898
|
+
if (v >= n.longSwipesRatio) t.slideTo(n.rewind && t.isEnd ? h : d + m); else t.slideTo(d);
|
|
2899
|
+
}
|
|
2900
|
+
if (t.swipeDirection === "prev") {
|
|
2901
|
+
if (v > 1 - n.longSwipesRatio) {
|
|
2902
|
+
t.slideTo(d + m);
|
|
2903
|
+
} else if (g !== null && v < 0 && Math.abs(v) > n.longSwipesRatio) {
|
|
2904
|
+
t.slideTo(g);
|
|
2905
|
+
} else {
|
|
2906
|
+
t.slideTo(d);
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
} else {
|
|
2910
|
+
// Short swipes
|
|
2911
|
+
if (!n.shortSwipes) {
|
|
2912
|
+
t.slideTo(t.activeIndex);
|
|
2913
|
+
return;
|
|
2914
|
+
}
|
|
2915
|
+
const e = t.navigation && (l.target === t.navigation.nextEl || l.target === t.navigation.prevEl);
|
|
2916
|
+
if (!e) {
|
|
2917
|
+
if (t.swipeDirection === "next") {
|
|
2918
|
+
t.slideTo(h !== null ? h : d + m);
|
|
2919
|
+
}
|
|
2920
|
+
if (t.swipeDirection === "prev") {
|
|
2921
|
+
t.slideTo(g !== null ? g : d);
|
|
2922
|
+
}
|
|
2923
|
+
} else if (l.target === t.navigation.nextEl) {
|
|
2924
|
+
t.slideTo(d + m);
|
|
2925
|
+
} else {
|
|
2926
|
+
t.slideTo(d);
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
function onResize() {
|
|
2932
|
+
const e = this;
|
|
2933
|
+
const {params: t, el: i} = e;
|
|
2934
|
+
if (i && i.offsetWidth === 0) return;
|
|
2935
|
+
// Breakpoints
|
|
2936
|
+
if (t.breakpoints) {
|
|
2937
|
+
e.setBreakpoint();
|
|
2938
|
+
}
|
|
2939
|
+
// Save locks
|
|
2940
|
+
const {allowSlideNext: n, allowSlidePrev: s, snapGrid: r} = e;
|
|
2941
|
+
// Disable locks on resize
|
|
2942
|
+
e.allowSlideNext = true;
|
|
2943
|
+
e.allowSlidePrev = true;
|
|
2944
|
+
e.updateSize();
|
|
2945
|
+
e.updateSlides();
|
|
2946
|
+
e.updateSlidesClasses();
|
|
2947
|
+
if ((t.slidesPerView === "auto" || t.slidesPerView > 1) && e.isEnd && !e.isBeginning && !e.params.centeredSlides) {
|
|
2948
|
+
e.slideTo(e.slides.length - 1, 0, false, true);
|
|
2949
|
+
} else {
|
|
2950
|
+
e.slideTo(e.activeIndex, 0, false, true);
|
|
2951
|
+
}
|
|
2952
|
+
if (e.autoplay && e.autoplay.running && e.autoplay.paused) {
|
|
2953
|
+
e.autoplay.run();
|
|
2954
|
+
}
|
|
2955
|
+
// Return locks after resize
|
|
2956
|
+
e.allowSlidePrev = s;
|
|
2957
|
+
e.allowSlideNext = n;
|
|
2958
|
+
if (e.params.watchOverflow && r !== e.snapGrid) {
|
|
2959
|
+
e.checkOverflow();
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
function onClick(e) {
|
|
2964
|
+
const t = this;
|
|
2965
|
+
if (!t.enabled) return;
|
|
2966
|
+
if (!t.allowClick) {
|
|
2967
|
+
if (t.params.preventClicks) e.preventDefault();
|
|
2968
|
+
if (t.params.preventClicksPropagation && t.animating) {
|
|
2969
|
+
e.stopPropagation();
|
|
2970
|
+
e.stopImmediatePropagation();
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
function onScroll() {
|
|
2976
|
+
const e = this;
|
|
2977
|
+
const {wrapperEl: t, rtlTranslate: i, enabled: n} = e;
|
|
2978
|
+
if (!n) return;
|
|
2979
|
+
e.previousTranslate = e.translate;
|
|
2980
|
+
if (e.isHorizontal()) {
|
|
2981
|
+
e.translate = -t.scrollLeft;
|
|
2982
|
+
} else {
|
|
2983
|
+
e.translate = -t.scrollTop;
|
|
2984
|
+
}
|
|
2985
|
+
// eslint-disable-next-line
|
|
2986
|
+
if (e.translate === 0) e.translate = 0;
|
|
2987
|
+
e.updateActiveIndex();
|
|
2988
|
+
e.updateSlidesClasses();
|
|
2989
|
+
let s;
|
|
2990
|
+
const r = e.maxTranslate() - e.minTranslate();
|
|
2991
|
+
if (r === 0) {
|
|
2992
|
+
s = 0;
|
|
2993
|
+
} else {
|
|
2994
|
+
s = (e.translate - e.minTranslate()) / r;
|
|
2995
|
+
}
|
|
2996
|
+
if (s !== e.progress) {
|
|
2997
|
+
e.updateProgress(i ? -e.translate : e.translate);
|
|
2998
|
+
}
|
|
2999
|
+
e.emit("setTranslate", e.translate, false);
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
let E = false;
|
|
3003
|
+
|
|
3004
|
+
function dummyEventListener() {}
|
|
3005
|
+
|
|
3006
|
+
const events = (e, t) => {
|
|
3007
|
+
const i = getDocument();
|
|
3008
|
+
const {params: n, touchEvents: s, el: r, wrapperEl: o, device: a, support: l} = e;
|
|
3009
|
+
const c = !!n.nested;
|
|
3010
|
+
const f = t === "on" ? "addEventListener" : "removeEventListener";
|
|
3011
|
+
const u = t;
|
|
3012
|
+
// Touch Events
|
|
3013
|
+
if (!l.touch) {
|
|
3014
|
+
r[f](s.start, e.onTouchStart, false);
|
|
3015
|
+
i[f](s.move, e.onTouchMove, c);
|
|
3016
|
+
i[f](s.end, e.onTouchEnd, false);
|
|
3017
|
+
} else {
|
|
3018
|
+
const t = s.start === "touchstart" && l.passiveListener && n.passiveListeners ? {
|
|
3019
|
+
passive: true,
|
|
3020
|
+
capture: false
|
|
3021
|
+
} : false;
|
|
3022
|
+
r[f](s.start, e.onTouchStart, t);
|
|
3023
|
+
r[f](s.move, e.onTouchMove, l.passiveListener ? {
|
|
3024
|
+
passive: false,
|
|
3025
|
+
capture: c
|
|
3026
|
+
} : c);
|
|
3027
|
+
r[f](s.end, e.onTouchEnd, t);
|
|
3028
|
+
if (s.cancel) {
|
|
3029
|
+
r[f](s.cancel, e.onTouchEnd, t);
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
// Prevent Links Clicks
|
|
3033
|
+
if (n.preventClicks || n.preventClicksPropagation) {
|
|
3034
|
+
r[f]("click", e.onClick, true);
|
|
3035
|
+
}
|
|
3036
|
+
if (n.cssMode) {
|
|
3037
|
+
o[f]("scroll", e.onScroll);
|
|
3038
|
+
}
|
|
3039
|
+
// Resize handler
|
|
3040
|
+
if (n.updateOnWindowResize) {
|
|
3041
|
+
e[u](a.ios || a.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, true);
|
|
3042
|
+
} else {
|
|
3043
|
+
e[u]("observerUpdate", onResize, true);
|
|
3044
|
+
}
|
|
3045
|
+
};
|
|
3046
|
+
|
|
3047
|
+
function attachEvents() {
|
|
3048
|
+
const e = this;
|
|
3049
|
+
const t = getDocument();
|
|
3050
|
+
const {params: i, support: n} = e;
|
|
3051
|
+
e.onTouchStart = onTouchStart.bind(e);
|
|
3052
|
+
e.onTouchMove = onTouchMove.bind(e);
|
|
3053
|
+
e.onTouchEnd = onTouchEnd.bind(e);
|
|
3054
|
+
if (i.cssMode) {
|
|
3055
|
+
e.onScroll = onScroll.bind(e);
|
|
3056
|
+
}
|
|
3057
|
+
e.onClick = onClick.bind(e);
|
|
3058
|
+
if (n.touch && !E) {
|
|
3059
|
+
t.addEventListener("touchstart", dummyEventListener);
|
|
3060
|
+
E = true;
|
|
3061
|
+
}
|
|
3062
|
+
events(e, "on");
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
function detachEvents() {
|
|
3066
|
+
const e = this;
|
|
3067
|
+
events(e, "off");
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
const k = {
|
|
3071
|
+
attachEvents,
|
|
3072
|
+
detachEvents
|
|
3073
|
+
};
|
|
3074
|
+
|
|
3075
|
+
const isGridEnabled = (e, t) => e.grid && t.grid && t.grid.rows > 1;
|
|
3076
|
+
|
|
3077
|
+
function setBreakpoint() {
|
|
3078
|
+
const e = this;
|
|
3079
|
+
const {activeIndex: t, initialized: i, loopedSlides: n = 0, params: s, $el: r} = e;
|
|
3080
|
+
const o = s.breakpoints;
|
|
3081
|
+
if (!o || o && Object.keys(o).length === 0) return;
|
|
3082
|
+
// Get breakpoint for window width and update parameters
|
|
3083
|
+
const a = e.getBreakpoint(o, e.params.breakpointsBase, e.el);
|
|
3084
|
+
if (!a || e.currentBreakpoint === a) return;
|
|
3085
|
+
const l = a in o ? o[a] : undefined;
|
|
3086
|
+
const c = l || e.originalParams;
|
|
3087
|
+
const f = isGridEnabled(e, s);
|
|
3088
|
+
const u = isGridEnabled(e, c);
|
|
3089
|
+
const d = s.enabled;
|
|
3090
|
+
if (f && !u) {
|
|
3091
|
+
r.removeClass(`${s.containerModifierClass}grid ${s.containerModifierClass}grid-column`);
|
|
3092
|
+
e.emitContainerClasses();
|
|
3093
|
+
} else if (!f && u) {
|
|
3094
|
+
r.addClass(`${s.containerModifierClass}grid`);
|
|
3095
|
+
if (c.grid.fill && c.grid.fill === "column" || !c.grid.fill && s.grid.fill === "column") {
|
|
3096
|
+
r.addClass(`${s.containerModifierClass}grid-column`);
|
|
3097
|
+
}
|
|
3098
|
+
e.emitContainerClasses();
|
|
3099
|
+
}
|
|
3100
|
+
// Toggle navigation, pagination, scrollbar
|
|
3101
|
+
[ "navigation", "pagination", "scrollbar" ].forEach((t => {
|
|
3102
|
+
const i = s[t] && s[t].enabled;
|
|
3103
|
+
const n = c[t] && c[t].enabled;
|
|
3104
|
+
if (i && !n) {
|
|
3105
|
+
e[t].disable();
|
|
3106
|
+
}
|
|
3107
|
+
if (!i && n) {
|
|
3108
|
+
e[t].enable();
|
|
3109
|
+
}
|
|
3110
|
+
}));
|
|
3111
|
+
const p = c.direction && c.direction !== s.direction;
|
|
3112
|
+
const h = s.loop && (c.slidesPerView !== s.slidesPerView || p);
|
|
3113
|
+
if (p && i) {
|
|
3114
|
+
e.changeDirection();
|
|
3115
|
+
}
|
|
3116
|
+
extend(e.params, c);
|
|
3117
|
+
const g = e.params.enabled;
|
|
3118
|
+
Object.assign(e, {
|
|
3119
|
+
allowTouchMove: e.params.allowTouchMove,
|
|
3120
|
+
allowSlideNext: e.params.allowSlideNext,
|
|
3121
|
+
allowSlidePrev: e.params.allowSlidePrev
|
|
3122
|
+
});
|
|
3123
|
+
if (d && !g) {
|
|
3124
|
+
e.disable();
|
|
3125
|
+
} else if (!d && g) {
|
|
3126
|
+
e.enable();
|
|
3127
|
+
}
|
|
3128
|
+
e.currentBreakpoint = a;
|
|
3129
|
+
e.emit("_beforeBreakpoint", c);
|
|
3130
|
+
if (h && i) {
|
|
3131
|
+
e.loopDestroy();
|
|
3132
|
+
e.loopCreate();
|
|
3133
|
+
e.updateSlides();
|
|
3134
|
+
e.slideTo(t - n + e.loopedSlides, 0, false);
|
|
3135
|
+
}
|
|
3136
|
+
e.emit("breakpoint", c);
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
function getBreakpoint(e, t = "window", i) {
|
|
3140
|
+
if (!e || t === "container" && !i) return undefined;
|
|
3141
|
+
let n = false;
|
|
3142
|
+
const s = getWindow();
|
|
3143
|
+
const r = t === "window" ? s.innerHeight : i.clientHeight;
|
|
3144
|
+
const o = Object.keys(e).map((e => {
|
|
3145
|
+
if (typeof e === "string" && e.indexOf("@") === 0) {
|
|
3146
|
+
const t = parseFloat(e.substr(1));
|
|
3147
|
+
const i = r * t;
|
|
3148
|
+
return {
|
|
3149
|
+
value: i,
|
|
3150
|
+
point: e
|
|
3151
|
+
};
|
|
3152
|
+
}
|
|
3153
|
+
return {
|
|
3154
|
+
value: e,
|
|
3155
|
+
point: e
|
|
3156
|
+
};
|
|
3157
|
+
}));
|
|
3158
|
+
o.sort(((e, t) => parseInt(e.value, 10) - parseInt(t.value, 10)));
|
|
3159
|
+
for (let e = 0; e < o.length; e += 1) {
|
|
3160
|
+
const {point: r, value: a} = o[e];
|
|
3161
|
+
if (t === "window") {
|
|
3162
|
+
if (s.matchMedia(`(min-width: ${a}px)`).matches) {
|
|
3163
|
+
n = r;
|
|
3164
|
+
}
|
|
3165
|
+
} else if (a <= i.clientWidth) {
|
|
3166
|
+
n = r;
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
return n || "max";
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
const M = {
|
|
3173
|
+
setBreakpoint,
|
|
3174
|
+
getBreakpoint
|
|
3175
|
+
};
|
|
3176
|
+
|
|
3177
|
+
function prepareClasses(e, t) {
|
|
3178
|
+
const i = [];
|
|
3179
|
+
e.forEach((e => {
|
|
3180
|
+
if (typeof e === "object") {
|
|
3181
|
+
Object.keys(e).forEach((n => {
|
|
3182
|
+
if (e[n]) {
|
|
3183
|
+
i.push(t + n);
|
|
3184
|
+
}
|
|
3185
|
+
}));
|
|
3186
|
+
} else if (typeof e === "string") {
|
|
3187
|
+
i.push(t + e);
|
|
3188
|
+
}
|
|
3189
|
+
}));
|
|
3190
|
+
return i;
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
function addClasses() {
|
|
3194
|
+
const e = this;
|
|
3195
|
+
const {classNames: t, params: i, rtl: n, $el: s, device: r, support: o} = e;
|
|
3196
|
+
// prettier-ignore
|
|
3197
|
+
const a = prepareClasses([ "initialized", i.direction, {
|
|
3198
|
+
"pointer-events": !o.touch
|
|
3199
|
+
}, {
|
|
3200
|
+
"free-mode": e.params.freeMode && i.freeMode.enabled
|
|
3201
|
+
}, {
|
|
3202
|
+
autoheight: i.autoHeight
|
|
3203
|
+
}, {
|
|
3204
|
+
rtl: n
|
|
3205
|
+
}, {
|
|
3206
|
+
grid: i.grid && i.grid.rows > 1
|
|
3207
|
+
}, {
|
|
3208
|
+
"grid-column": i.grid && i.grid.rows > 1 && i.grid.fill === "column"
|
|
3209
|
+
}, {
|
|
3210
|
+
android: r.android
|
|
3211
|
+
}, {
|
|
3212
|
+
ios: r.ios
|
|
3213
|
+
}, {
|
|
3214
|
+
"css-mode": i.cssMode
|
|
3215
|
+
}, {
|
|
3216
|
+
centered: i.cssMode && i.centeredSlides
|
|
3217
|
+
}, {
|
|
3218
|
+
"watch-progress": i.watchSlidesProgress
|
|
3219
|
+
} ], i.containerModifierClass);
|
|
3220
|
+
t.push(...a);
|
|
3221
|
+
s.addClass([ ...t ].join(" "));
|
|
3222
|
+
e.emitContainerClasses();
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
function removeClasses() {
|
|
3226
|
+
const e = this;
|
|
3227
|
+
const {$el: t, classNames: i} = e;
|
|
3228
|
+
t.removeClass(i.join(" "));
|
|
3229
|
+
e.emitContainerClasses();
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3232
|
+
const P = {
|
|
3233
|
+
addClasses,
|
|
3234
|
+
removeClasses
|
|
3235
|
+
};
|
|
3236
|
+
|
|
3237
|
+
function loadImage(e, t, i, n, s, r) {
|
|
3238
|
+
const o = getWindow();
|
|
3239
|
+
let a;
|
|
3240
|
+
function onReady() {
|
|
3241
|
+
if (r) r();
|
|
3242
|
+
}
|
|
3243
|
+
const l = $(e).parent("picture")[0];
|
|
3244
|
+
if (!l && (!e.complete || !s)) {
|
|
3245
|
+
if (t) {
|
|
3246
|
+
a = new o.Image;
|
|
3247
|
+
a.onload = onReady;
|
|
3248
|
+
a.onerror = onReady;
|
|
3249
|
+
if (n) {
|
|
3250
|
+
a.sizes = n;
|
|
3251
|
+
}
|
|
3252
|
+
if (i) {
|
|
3253
|
+
a.srcset = i;
|
|
3254
|
+
}
|
|
3255
|
+
if (t) {
|
|
3256
|
+
a.src = t;
|
|
3257
|
+
}
|
|
3258
|
+
} else {
|
|
3259
|
+
onReady();
|
|
3260
|
+
}
|
|
3261
|
+
} else {
|
|
3262
|
+
// image already loaded...
|
|
3263
|
+
onReady();
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
function preloadImages() {
|
|
3268
|
+
const e = this;
|
|
3269
|
+
e.imagesToLoad = e.$el.find("img");
|
|
3270
|
+
function onReady() {
|
|
3271
|
+
if (typeof e === "undefined" || e === null || !e || e.destroyed) return;
|
|
3272
|
+
if (e.imagesLoaded !== undefined) e.imagesLoaded += 1;
|
|
3273
|
+
if (e.imagesLoaded === e.imagesToLoad.length) {
|
|
3274
|
+
if (e.params.updateOnImagesReady) e.update();
|
|
3275
|
+
e.emit("imagesReady");
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
for (let t = 0; t < e.imagesToLoad.length; t += 1) {
|
|
3279
|
+
const i = e.imagesToLoad[t];
|
|
3280
|
+
e.loadImage(i, i.currentSrc || i.getAttribute("src"), i.srcset || i.getAttribute("srcset"), i.sizes || i.getAttribute("sizes"), true, onReady);
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
const O = {
|
|
3285
|
+
loadImage,
|
|
3286
|
+
preloadImages
|
|
3287
|
+
};
|
|
3288
|
+
|
|
3289
|
+
function checkOverflow() {
|
|
3290
|
+
const e = this;
|
|
3291
|
+
const {isLocked: t, params: i} = e;
|
|
3292
|
+
const {slidesOffsetBefore: n} = i;
|
|
3293
|
+
if (n) {
|
|
3294
|
+
const t = e.slides.length - 1;
|
|
3295
|
+
const i = e.slidesGrid[t] + e.slidesSizesGrid[t] + n * 2;
|
|
3296
|
+
e.isLocked = e.size > i;
|
|
3297
|
+
} else {
|
|
3298
|
+
e.isLocked = e.snapGrid.length === 1;
|
|
3299
|
+
}
|
|
3300
|
+
if (i.allowSlideNext === true) {
|
|
3301
|
+
e.allowSlideNext = !e.isLocked;
|
|
3302
|
+
}
|
|
3303
|
+
if (i.allowSlidePrev === true) {
|
|
3304
|
+
e.allowSlidePrev = !e.isLocked;
|
|
3305
|
+
}
|
|
3306
|
+
if (t && t !== e.isLocked) {
|
|
3307
|
+
e.isEnd = false;
|
|
3308
|
+
}
|
|
3309
|
+
if (t !== e.isLocked) {
|
|
3310
|
+
e.emit(e.isLocked ? "lock" : "unlock");
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
const q = {
|
|
3315
|
+
checkOverflow
|
|
3316
|
+
};
|
|
3317
|
+
|
|
3318
|
+
const D = {
|
|
3319
|
+
init: true,
|
|
3320
|
+
direction: "horizontal",
|
|
3321
|
+
touchEventsTarget: "wrapper",
|
|
3322
|
+
initialSlide: 0,
|
|
3323
|
+
speed: 300,
|
|
3324
|
+
cssMode: false,
|
|
3325
|
+
updateOnWindowResize: true,
|
|
3326
|
+
resizeObserver: true,
|
|
3327
|
+
nested: false,
|
|
3328
|
+
createElements: false,
|
|
3329
|
+
enabled: true,
|
|
3330
|
+
focusableElements: "input, select, option, textarea, button, video, label",
|
|
3331
|
+
// Overrides
|
|
3332
|
+
width: null,
|
|
3333
|
+
height: null,
|
|
3334
|
+
preventInteractionOnTransition: false,
|
|
3335
|
+
// ssr
|
|
3336
|
+
userAgent: null,
|
|
3337
|
+
url: null,
|
|
3338
|
+
// To support iOS's swipe-to-go-back gesture (when being used in-app).
|
|
3339
|
+
edgeSwipeDetection: false,
|
|
3340
|
+
edgeSwipeThreshold: 20,
|
|
3341
|
+
// Autoheight
|
|
3342
|
+
autoHeight: false,
|
|
3343
|
+
// Set wrapper width
|
|
3344
|
+
setWrapperSize: false,
|
|
3345
|
+
// Virtual Translate
|
|
3346
|
+
virtualTranslate: false,
|
|
3347
|
+
// Effects
|
|
3348
|
+
effect: "slide",
|
|
3349
|
+
// 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
|
3350
|
+
// Breakpoints
|
|
3351
|
+
breakpoints: undefined,
|
|
3352
|
+
breakpointsBase: "window",
|
|
3353
|
+
// Slides grid
|
|
3354
|
+
spaceBetween: 0,
|
|
3355
|
+
slidesPerView: 1,
|
|
3356
|
+
slidesPerGroup: 1,
|
|
3357
|
+
slidesPerGroupSkip: 0,
|
|
3358
|
+
slidesPerGroupAuto: false,
|
|
3359
|
+
centeredSlides: false,
|
|
3360
|
+
centeredSlidesBounds: false,
|
|
3361
|
+
slidesOffsetBefore: 0,
|
|
3362
|
+
// in px
|
|
3363
|
+
slidesOffsetAfter: 0,
|
|
3364
|
+
// in px
|
|
3365
|
+
normalizeSlideIndex: true,
|
|
3366
|
+
centerInsufficientSlides: false,
|
|
3367
|
+
// Disable swiper and hide navigation when container not overflow
|
|
3368
|
+
watchOverflow: true,
|
|
3369
|
+
// Round length
|
|
3370
|
+
roundLengths: false,
|
|
3371
|
+
// Touches
|
|
3372
|
+
touchRatio: 1,
|
|
3373
|
+
touchAngle: 45,
|
|
3374
|
+
simulateTouch: true,
|
|
3375
|
+
shortSwipes: true,
|
|
3376
|
+
longSwipes: true,
|
|
3377
|
+
longSwipesRatio: .5,
|
|
3378
|
+
longSwipesMs: 300,
|
|
3379
|
+
followFinger: true,
|
|
3380
|
+
allowTouchMove: true,
|
|
3381
|
+
threshold: 0,
|
|
3382
|
+
touchMoveStopPropagation: false,
|
|
3383
|
+
touchStartPreventDefault: true,
|
|
3384
|
+
touchStartForcePreventDefault: false,
|
|
3385
|
+
touchReleaseOnEdges: false,
|
|
3386
|
+
// Unique Navigation Elements
|
|
3387
|
+
uniqueNavElements: true,
|
|
3388
|
+
// Resistance
|
|
3389
|
+
resistance: true,
|
|
3390
|
+
resistanceRatio: .85,
|
|
3391
|
+
// Progress
|
|
3392
|
+
watchSlidesProgress: false,
|
|
3393
|
+
// Cursor
|
|
3394
|
+
grabCursor: false,
|
|
3395
|
+
// Clicks
|
|
3396
|
+
preventClicks: true,
|
|
3397
|
+
preventClicksPropagation: true,
|
|
3398
|
+
slideToClickedSlide: false,
|
|
3399
|
+
// Images
|
|
3400
|
+
preloadImages: true,
|
|
3401
|
+
updateOnImagesReady: true,
|
|
3402
|
+
// loop
|
|
3403
|
+
loop: false,
|
|
3404
|
+
loopAdditionalSlides: 0,
|
|
3405
|
+
loopedSlides: null,
|
|
3406
|
+
loopedSlidesLimit: true,
|
|
3407
|
+
loopFillGroupWithBlank: false,
|
|
3408
|
+
loopPreventsSlide: true,
|
|
3409
|
+
// rewind
|
|
3410
|
+
rewind: false,
|
|
3411
|
+
// Swiping/no swiping
|
|
3412
|
+
allowSlidePrev: true,
|
|
3413
|
+
allowSlideNext: true,
|
|
3414
|
+
swipeHandler: null,
|
|
3415
|
+
// '.swipe-handler',
|
|
3416
|
+
noSwiping: true,
|
|
3417
|
+
noSwipingClass: "swiper-no-swiping",
|
|
3418
|
+
noSwipingSelector: null,
|
|
3419
|
+
// Passive Listeners
|
|
3420
|
+
passiveListeners: true,
|
|
3421
|
+
maxBackfaceHiddenSlides: 10,
|
|
3422
|
+
// NS
|
|
3423
|
+
containerModifierClass: "swiper-",
|
|
3424
|
+
// NEW
|
|
3425
|
+
slideClass: "swiper-slide",
|
|
3426
|
+
slideBlankClass: "swiper-slide-invisible-blank",
|
|
3427
|
+
slideActiveClass: "swiper-slide-active",
|
|
3428
|
+
slideDuplicateActiveClass: "swiper-slide-duplicate-active",
|
|
3429
|
+
slideVisibleClass: "swiper-slide-visible",
|
|
3430
|
+
slideDuplicateClass: "swiper-slide-duplicate",
|
|
3431
|
+
slideNextClass: "swiper-slide-next",
|
|
3432
|
+
slideDuplicateNextClass: "swiper-slide-duplicate-next",
|
|
3433
|
+
slidePrevClass: "swiper-slide-prev",
|
|
3434
|
+
slideDuplicatePrevClass: "swiper-slide-duplicate-prev",
|
|
3435
|
+
wrapperClass: "swiper-wrapper",
|
|
3436
|
+
// Callbacks
|
|
3437
|
+
runCallbacksOnInit: true,
|
|
3438
|
+
// Internals
|
|
3439
|
+
_emitClasses: false
|
|
3440
|
+
};
|
|
3441
|
+
|
|
3442
|
+
function moduleExtendParams(e, t) {
|
|
3443
|
+
return function extendParams(i = {}) {
|
|
3444
|
+
const n = Object.keys(i)[0];
|
|
3445
|
+
const s = i[n];
|
|
3446
|
+
if (typeof s !== "object" || s === null) {
|
|
3447
|
+
extend(t, i);
|
|
3448
|
+
return;
|
|
3449
|
+
}
|
|
3450
|
+
if ([ "navigation", "pagination", "scrollbar" ].indexOf(n) >= 0 && e[n] === true) {
|
|
3451
|
+
e[n] = {
|
|
3452
|
+
auto: true
|
|
3453
|
+
};
|
|
3454
|
+
}
|
|
3455
|
+
if (!(n in e && "enabled" in s)) {
|
|
3456
|
+
extend(t, i);
|
|
3457
|
+
return;
|
|
3458
|
+
}
|
|
3459
|
+
if (e[n] === true) {
|
|
3460
|
+
e[n] = {
|
|
3461
|
+
enabled: true
|
|
3462
|
+
};
|
|
3463
|
+
}
|
|
3464
|
+
if (typeof e[n] === "object" && !("enabled" in e[n])) {
|
|
3465
|
+
e[n].enabled = true;
|
|
3466
|
+
}
|
|
3467
|
+
if (!e[n]) e[n] = {
|
|
3468
|
+
enabled: false
|
|
3469
|
+
};
|
|
3470
|
+
extend(t, i);
|
|
3471
|
+
};
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
/* eslint no-param-reassign: "off" */ const L = {
|
|
3475
|
+
eventsEmitter: b,
|
|
3476
|
+
update: w,
|
|
3477
|
+
translate: y,
|
|
3478
|
+
transition: x,
|
|
3479
|
+
slide: S,
|
|
3480
|
+
loop: C,
|
|
3481
|
+
grabCursor: T,
|
|
3482
|
+
events: k,
|
|
3483
|
+
breakpoints: M,
|
|
3484
|
+
checkOverflow: q,
|
|
3485
|
+
classes: P,
|
|
3486
|
+
images: O
|
|
3487
|
+
};
|
|
3488
|
+
|
|
3489
|
+
const I = {};
|
|
3490
|
+
|
|
3491
|
+
class j {
|
|
3492
|
+
constructor(...e) {
|
|
3493
|
+
let t;
|
|
3494
|
+
let i;
|
|
3495
|
+
if (e.length === 1 && e[0].constructor && Object.prototype.toString.call(e[0]).slice(8, -1) === "Object") {
|
|
3496
|
+
i = e[0];
|
|
3497
|
+
} else {
|
|
3498
|
+
[t, i] = e;
|
|
3499
|
+
}
|
|
3500
|
+
if (!i) i = {};
|
|
3501
|
+
i = extend({}, i);
|
|
3502
|
+
if (t && !i.el) i.el = t;
|
|
3503
|
+
if (i.el && $(i.el).length > 1) {
|
|
3504
|
+
const e = [];
|
|
3505
|
+
$(i.el).each((t => {
|
|
3506
|
+
const n = extend({}, i, {
|
|
3507
|
+
el: t
|
|
3508
|
+
});
|
|
3509
|
+
e.push(new j(n));
|
|
3510
|
+
}));
|
|
3511
|
+
// eslint-disable-next-line no-constructor-return
|
|
3512
|
+
return e;
|
|
3513
|
+
}
|
|
3514
|
+
// Swiper Instance
|
|
3515
|
+
const n = this;
|
|
3516
|
+
n.__swiper__ = true;
|
|
3517
|
+
n.support = getSupport();
|
|
3518
|
+
n.device = getDevice({
|
|
3519
|
+
userAgent: i.userAgent
|
|
3520
|
+
});
|
|
3521
|
+
n.browser = getBrowser();
|
|
3522
|
+
n.eventsListeners = {};
|
|
3523
|
+
n.eventsAnyListeners = [];
|
|
3524
|
+
n.modules = [ ...n.__modules__ ];
|
|
3525
|
+
if (i.modules && Array.isArray(i.modules)) {
|
|
3526
|
+
n.modules.push(...i.modules);
|
|
3527
|
+
}
|
|
3528
|
+
const s = {};
|
|
3529
|
+
n.modules.forEach((e => {
|
|
3530
|
+
e({
|
|
3531
|
+
swiper: n,
|
|
3532
|
+
extendParams: moduleExtendParams(i, s),
|
|
3533
|
+
on: n.on.bind(n),
|
|
3534
|
+
once: n.once.bind(n),
|
|
3535
|
+
off: n.off.bind(n),
|
|
3536
|
+
emit: n.emit.bind(n)
|
|
3537
|
+
});
|
|
3538
|
+
}));
|
|
3539
|
+
// Extend defaults with modules params
|
|
3540
|
+
const r = extend({}, D, s);
|
|
3541
|
+
// Extend defaults with passed params
|
|
3542
|
+
n.params = extend({}, r, I, i);
|
|
3543
|
+
n.originalParams = extend({}, n.params);
|
|
3544
|
+
n.passedParams = extend({}, i);
|
|
3545
|
+
// add event listeners
|
|
3546
|
+
if (n.params && n.params.on) {
|
|
3547
|
+
Object.keys(n.params.on).forEach((e => {
|
|
3548
|
+
n.on(e, n.params.on[e]);
|
|
3549
|
+
}));
|
|
3550
|
+
}
|
|
3551
|
+
if (n.params && n.params.onAny) {
|
|
3552
|
+
n.onAny(n.params.onAny);
|
|
3553
|
+
}
|
|
3554
|
+
// Save Dom lib
|
|
3555
|
+
n.$ = $;
|
|
3556
|
+
// Extend Swiper
|
|
3557
|
+
Object.assign(n, {
|
|
3558
|
+
enabled: n.params.enabled,
|
|
3559
|
+
el: t,
|
|
3560
|
+
// Classes
|
|
3561
|
+
classNames: [],
|
|
3562
|
+
// Slides
|
|
3563
|
+
slides: $(),
|
|
3564
|
+
slidesGrid: [],
|
|
3565
|
+
snapGrid: [],
|
|
3566
|
+
slidesSizesGrid: [],
|
|
3567
|
+
// isDirection
|
|
3568
|
+
isHorizontal() {
|
|
3569
|
+
return n.params.direction === "horizontal";
|
|
3570
|
+
},
|
|
3571
|
+
isVertical() {
|
|
3572
|
+
return n.params.direction === "vertical";
|
|
3573
|
+
},
|
|
3574
|
+
// Indexes
|
|
3575
|
+
activeIndex: 0,
|
|
3576
|
+
realIndex: 0,
|
|
3577
|
+
isBeginning: true,
|
|
3578
|
+
isEnd: false,
|
|
3579
|
+
// Props
|
|
3580
|
+
translate: 0,
|
|
3581
|
+
previousTranslate: 0,
|
|
3582
|
+
progress: 0,
|
|
3583
|
+
velocity: 0,
|
|
3584
|
+
animating: false,
|
|
3585
|
+
// Locks
|
|
3586
|
+
allowSlideNext: n.params.allowSlideNext,
|
|
3587
|
+
allowSlidePrev: n.params.allowSlidePrev,
|
|
3588
|
+
// Touch Events
|
|
3589
|
+
touchEvents: function touchEvents() {
|
|
3590
|
+
const e = [ "touchstart", "touchmove", "touchend", "touchcancel" ];
|
|
3591
|
+
const t = [ "pointerdown", "pointermove", "pointerup" ];
|
|
3592
|
+
n.touchEventsTouch = {
|
|
3593
|
+
start: e[0],
|
|
3594
|
+
move: e[1],
|
|
3595
|
+
end: e[2],
|
|
3596
|
+
cancel: e[3]
|
|
3597
|
+
};
|
|
3598
|
+
n.touchEventsDesktop = {
|
|
3599
|
+
start: t[0],
|
|
3600
|
+
move: t[1],
|
|
3601
|
+
end: t[2]
|
|
3602
|
+
};
|
|
3603
|
+
return n.support.touch || !n.params.simulateTouch ? n.touchEventsTouch : n.touchEventsDesktop;
|
|
3604
|
+
}(),
|
|
3605
|
+
touchEventsData: {
|
|
3606
|
+
isTouched: undefined,
|
|
3607
|
+
isMoved: undefined,
|
|
3608
|
+
allowTouchCallbacks: undefined,
|
|
3609
|
+
touchStartTime: undefined,
|
|
3610
|
+
isScrolling: undefined,
|
|
3611
|
+
currentTranslate: undefined,
|
|
3612
|
+
startTranslate: undefined,
|
|
3613
|
+
allowThresholdMove: undefined,
|
|
3614
|
+
// Form elements to match
|
|
3615
|
+
focusableElements: n.params.focusableElements,
|
|
3616
|
+
// Last click time
|
|
3617
|
+
lastClickTime: now(),
|
|
3618
|
+
clickTimeout: undefined,
|
|
3619
|
+
// Velocities
|
|
3620
|
+
velocities: [],
|
|
3621
|
+
allowMomentumBounce: undefined,
|
|
3622
|
+
isTouchEvent: undefined,
|
|
3623
|
+
startMoving: undefined
|
|
3624
|
+
},
|
|
3625
|
+
// Clicks
|
|
3626
|
+
allowClick: true,
|
|
3627
|
+
// Touches
|
|
3628
|
+
allowTouchMove: n.params.allowTouchMove,
|
|
3629
|
+
touches: {
|
|
3630
|
+
startX: 0,
|
|
3631
|
+
startY: 0,
|
|
3632
|
+
currentX: 0,
|
|
3633
|
+
currentY: 0,
|
|
3634
|
+
diff: 0
|
|
3635
|
+
},
|
|
3636
|
+
// Images
|
|
3637
|
+
imagesToLoad: [],
|
|
3638
|
+
imagesLoaded: 0
|
|
3639
|
+
});
|
|
3640
|
+
n.emit("_swiper");
|
|
3641
|
+
// Init
|
|
3642
|
+
if (n.params.init) {
|
|
3643
|
+
n.init();
|
|
3644
|
+
}
|
|
3645
|
+
// Return app instance
|
|
3646
|
+
// eslint-disable-next-line no-constructor-return
|
|
3647
|
+
return n;
|
|
3648
|
+
}
|
|
3649
|
+
enable() {
|
|
3650
|
+
const e = this;
|
|
3651
|
+
if (e.enabled) return;
|
|
3652
|
+
e.enabled = true;
|
|
3653
|
+
if (e.params.grabCursor) {
|
|
3654
|
+
e.setGrabCursor();
|
|
3655
|
+
}
|
|
3656
|
+
e.emit("enable");
|
|
3657
|
+
}
|
|
3658
|
+
disable() {
|
|
3659
|
+
const e = this;
|
|
3660
|
+
if (!e.enabled) return;
|
|
3661
|
+
e.enabled = false;
|
|
3662
|
+
if (e.params.grabCursor) {
|
|
3663
|
+
e.unsetGrabCursor();
|
|
3664
|
+
}
|
|
3665
|
+
e.emit("disable");
|
|
3666
|
+
}
|
|
3667
|
+
setProgress(e, t) {
|
|
3668
|
+
const i = this;
|
|
3669
|
+
e = Math.min(Math.max(e, 0), 1);
|
|
3670
|
+
const n = i.minTranslate();
|
|
3671
|
+
const s = i.maxTranslate();
|
|
3672
|
+
const r = (s - n) * e + n;
|
|
3673
|
+
i.translateTo(r, typeof t === "undefined" ? 0 : t);
|
|
3674
|
+
i.updateActiveIndex();
|
|
3675
|
+
i.updateSlidesClasses();
|
|
3676
|
+
}
|
|
3677
|
+
emitContainerClasses() {
|
|
3678
|
+
const e = this;
|
|
3679
|
+
if (!e.params._emitClasses || !e.el) return;
|
|
3680
|
+
const t = e.el.className.split(" ").filter((t => t.indexOf("swiper") === 0 || t.indexOf(e.params.containerModifierClass) === 0));
|
|
3681
|
+
e.emit("_containerClasses", t.join(" "));
|
|
3682
|
+
}
|
|
3683
|
+
getSlideClasses(e) {
|
|
3684
|
+
const t = this;
|
|
3685
|
+
if (t.destroyed) return "";
|
|
3686
|
+
return e.className.split(" ").filter((e => e.indexOf("swiper-slide") === 0 || e.indexOf(t.params.slideClass) === 0)).join(" ");
|
|
3687
|
+
}
|
|
3688
|
+
emitSlidesClasses() {
|
|
3689
|
+
const e = this;
|
|
3690
|
+
if (!e.params._emitClasses || !e.el) return;
|
|
3691
|
+
const t = [];
|
|
3692
|
+
e.slides.each((i => {
|
|
3693
|
+
const n = e.getSlideClasses(i);
|
|
3694
|
+
t.push({
|
|
3695
|
+
slideEl: i,
|
|
3696
|
+
classNames: n
|
|
3697
|
+
});
|
|
3698
|
+
e.emit("_slideClass", i, n);
|
|
3699
|
+
}));
|
|
3700
|
+
e.emit("_slideClasses", t);
|
|
3701
|
+
}
|
|
3702
|
+
slidesPerViewDynamic(e = "current", t = false) {
|
|
3703
|
+
const i = this;
|
|
3704
|
+
const {params: n, slides: s, slidesGrid: r, slidesSizesGrid: o, size: a, activeIndex: l} = i;
|
|
3705
|
+
let c = 1;
|
|
3706
|
+
if (n.centeredSlides) {
|
|
3707
|
+
let e = s[l].swiperSlideSize;
|
|
3708
|
+
let t;
|
|
3709
|
+
for (let i = l + 1; i < s.length; i += 1) {
|
|
3710
|
+
if (s[i] && !t) {
|
|
3711
|
+
e += s[i].swiperSlideSize;
|
|
3712
|
+
c += 1;
|
|
3713
|
+
if (e > a) t = true;
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
for (let i = l - 1; i >= 0; i -= 1) {
|
|
3717
|
+
if (s[i] && !t) {
|
|
3718
|
+
e += s[i].swiperSlideSize;
|
|
3719
|
+
c += 1;
|
|
3720
|
+
if (e > a) t = true;
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
} else {
|
|
3724
|
+
// eslint-disable-next-line
|
|
3725
|
+
if (e === "current") {
|
|
3726
|
+
for (let e = l + 1; e < s.length; e += 1) {
|
|
3727
|
+
const i = t ? r[e] + o[e] - r[l] < a : r[e] - r[l] < a;
|
|
3728
|
+
if (i) {
|
|
3729
|
+
c += 1;
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
} else {
|
|
3733
|
+
// previous
|
|
3734
|
+
for (let e = l - 1; e >= 0; e -= 1) {
|
|
3735
|
+
const t = r[l] - r[e] < a;
|
|
3736
|
+
if (t) {
|
|
3737
|
+
c += 1;
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
return c;
|
|
3743
|
+
}
|
|
3744
|
+
update() {
|
|
3745
|
+
const e = this;
|
|
3746
|
+
if (!e || e.destroyed) return;
|
|
3747
|
+
const {snapGrid: t, params: i} = e;
|
|
3748
|
+
// Breakpoints
|
|
3749
|
+
if (i.breakpoints) {
|
|
3750
|
+
e.setBreakpoint();
|
|
3751
|
+
}
|
|
3752
|
+
e.updateSize();
|
|
3753
|
+
e.updateSlides();
|
|
3754
|
+
e.updateProgress();
|
|
3755
|
+
e.updateSlidesClasses();
|
|
3756
|
+
function setTranslate() {
|
|
3757
|
+
const t = e.rtlTranslate ? e.translate * -1 : e.translate;
|
|
3758
|
+
const i = Math.min(Math.max(t, e.maxTranslate()), e.minTranslate());
|
|
3759
|
+
e.setTranslate(i);
|
|
3760
|
+
e.updateActiveIndex();
|
|
3761
|
+
e.updateSlidesClasses();
|
|
3762
|
+
}
|
|
3763
|
+
let n;
|
|
3764
|
+
if (e.params.freeMode && e.params.freeMode.enabled) {
|
|
3765
|
+
setTranslate();
|
|
3766
|
+
if (e.params.autoHeight) {
|
|
3767
|
+
e.updateAutoHeight();
|
|
3768
|
+
}
|
|
3769
|
+
} else {
|
|
3770
|
+
if ((e.params.slidesPerView === "auto" || e.params.slidesPerView > 1) && e.isEnd && !e.params.centeredSlides) {
|
|
3771
|
+
n = e.slideTo(e.slides.length - 1, 0, false, true);
|
|
3772
|
+
} else {
|
|
3773
|
+
n = e.slideTo(e.activeIndex, 0, false, true);
|
|
3774
|
+
}
|
|
3775
|
+
if (!n) {
|
|
3776
|
+
setTranslate();
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
if (i.watchOverflow && t !== e.snapGrid) {
|
|
3780
|
+
e.checkOverflow();
|
|
3781
|
+
}
|
|
3782
|
+
e.emit("update");
|
|
3783
|
+
}
|
|
3784
|
+
changeDirection(e, t = true) {
|
|
3785
|
+
const i = this;
|
|
3786
|
+
const n = i.params.direction;
|
|
3787
|
+
if (!e) {
|
|
3788
|
+
// eslint-disable-next-line
|
|
3789
|
+
e = n === "horizontal" ? "vertical" : "horizontal";
|
|
3790
|
+
}
|
|
3791
|
+
if (e === n || e !== "horizontal" && e !== "vertical") {
|
|
3792
|
+
return i;
|
|
3793
|
+
}
|
|
3794
|
+
i.$el.removeClass(`${i.params.containerModifierClass}${n}`).addClass(`${i.params.containerModifierClass}${e}`);
|
|
3795
|
+
i.emitContainerClasses();
|
|
3796
|
+
i.params.direction = e;
|
|
3797
|
+
i.slides.each((t => {
|
|
3798
|
+
if (e === "vertical") {
|
|
3799
|
+
t.style.width = "";
|
|
3800
|
+
} else {
|
|
3801
|
+
t.style.height = "";
|
|
3802
|
+
}
|
|
3803
|
+
}));
|
|
3804
|
+
i.emit("changeDirection");
|
|
3805
|
+
if (t) i.update();
|
|
3806
|
+
return i;
|
|
3807
|
+
}
|
|
3808
|
+
changeLanguageDirection(e) {
|
|
3809
|
+
const t = this;
|
|
3810
|
+
if (t.rtl && e === "rtl" || !t.rtl && e === "ltr") return;
|
|
3811
|
+
t.rtl = e === "rtl";
|
|
3812
|
+
t.rtlTranslate = t.params.direction === "horizontal" && t.rtl;
|
|
3813
|
+
if (t.rtl) {
|
|
3814
|
+
t.$el.addClass(`${t.params.containerModifierClass}rtl`);
|
|
3815
|
+
t.el.dir = "rtl";
|
|
3816
|
+
} else {
|
|
3817
|
+
t.$el.removeClass(`${t.params.containerModifierClass}rtl`);
|
|
3818
|
+
t.el.dir = "ltr";
|
|
3819
|
+
}
|
|
3820
|
+
t.update();
|
|
3821
|
+
}
|
|
3822
|
+
mount(e) {
|
|
3823
|
+
const t = this;
|
|
3824
|
+
if (t.mounted) return true;
|
|
3825
|
+
// Find el
|
|
3826
|
+
const i = $(e || t.params.el);
|
|
3827
|
+
e = i[0];
|
|
3828
|
+
if (!e) {
|
|
3829
|
+
return false;
|
|
3830
|
+
}
|
|
3831
|
+
e.swiper = t;
|
|
3832
|
+
const getWrapperSelector = () => `.${(t.params.wrapperClass || "").trim().split(" ").join(".")}`;
|
|
3833
|
+
const getWrapper = () => {
|
|
3834
|
+
if (e && e.shadowRoot && e.shadowRoot.querySelector) {
|
|
3835
|
+
const t = $(e.shadowRoot.querySelector(getWrapperSelector()));
|
|
3836
|
+
// Children needs to return slot items
|
|
3837
|
+
t.children = e => i.children(e);
|
|
3838
|
+
return t;
|
|
3839
|
+
}
|
|
3840
|
+
if (!i.children) {
|
|
3841
|
+
return $(i).children(getWrapperSelector());
|
|
3842
|
+
}
|
|
3843
|
+
return i.children(getWrapperSelector());
|
|
3844
|
+
};
|
|
3845
|
+
// Find Wrapper
|
|
3846
|
+
let n = getWrapper();
|
|
3847
|
+
if (n.length === 0 && t.params.createElements) {
|
|
3848
|
+
const e = getDocument();
|
|
3849
|
+
const s = e.createElement("div");
|
|
3850
|
+
n = $(s);
|
|
3851
|
+
s.className = t.params.wrapperClass;
|
|
3852
|
+
i.append(s);
|
|
3853
|
+
i.children(`.${t.params.slideClass}`).each((e => {
|
|
3854
|
+
n.append(e);
|
|
3855
|
+
}));
|
|
3856
|
+
}
|
|
3857
|
+
Object.assign(t, {
|
|
3858
|
+
$el: i,
|
|
3859
|
+
el: e,
|
|
3860
|
+
$wrapperEl: n,
|
|
3861
|
+
wrapperEl: n[0],
|
|
3862
|
+
mounted: true,
|
|
3863
|
+
// RTL
|
|
3864
|
+
rtl: e.dir.toLowerCase() === "rtl" || i.css("direction") === "rtl",
|
|
3865
|
+
rtlTranslate: t.params.direction === "horizontal" && (e.dir.toLowerCase() === "rtl" || i.css("direction") === "rtl"),
|
|
3866
|
+
wrongRTL: n.css("display") === "-webkit-box"
|
|
3867
|
+
});
|
|
3868
|
+
return true;
|
|
3869
|
+
}
|
|
3870
|
+
init(e) {
|
|
3871
|
+
const t = this;
|
|
3872
|
+
if (t.initialized) return t;
|
|
3873
|
+
const i = t.mount(e);
|
|
3874
|
+
if (i === false) return t;
|
|
3875
|
+
t.emit("beforeInit");
|
|
3876
|
+
// Set breakpoint
|
|
3877
|
+
if (t.params.breakpoints) {
|
|
3878
|
+
t.setBreakpoint();
|
|
3879
|
+
}
|
|
3880
|
+
// Add Classes
|
|
3881
|
+
t.addClasses();
|
|
3882
|
+
// Create loop
|
|
3883
|
+
if (t.params.loop) {
|
|
3884
|
+
t.loopCreate();
|
|
3885
|
+
}
|
|
3886
|
+
// Update size
|
|
3887
|
+
t.updateSize();
|
|
3888
|
+
// Update slides
|
|
3889
|
+
t.updateSlides();
|
|
3890
|
+
if (t.params.watchOverflow) {
|
|
3891
|
+
t.checkOverflow();
|
|
3892
|
+
}
|
|
3893
|
+
// Set Grab Cursor
|
|
3894
|
+
if (t.params.grabCursor && t.enabled) {
|
|
3895
|
+
t.setGrabCursor();
|
|
3896
|
+
}
|
|
3897
|
+
if (t.params.preloadImages) {
|
|
3898
|
+
t.preloadImages();
|
|
3899
|
+
}
|
|
3900
|
+
// Slide To Initial Slide
|
|
3901
|
+
if (t.params.loop) {
|
|
3902
|
+
t.slideTo(t.params.initialSlide + t.loopedSlides, 0, t.params.runCallbacksOnInit, false, true);
|
|
3903
|
+
} else {
|
|
3904
|
+
t.slideTo(t.params.initialSlide, 0, t.params.runCallbacksOnInit, false, true);
|
|
3905
|
+
}
|
|
3906
|
+
// Attach events
|
|
3907
|
+
t.attachEvents();
|
|
3908
|
+
// Init Flag
|
|
3909
|
+
t.initialized = true;
|
|
3910
|
+
// Emit
|
|
3911
|
+
t.emit("init");
|
|
3912
|
+
t.emit("afterInit");
|
|
3913
|
+
return t;
|
|
3914
|
+
}
|
|
3915
|
+
destroy(e = true, t = true) {
|
|
3916
|
+
const i = this;
|
|
3917
|
+
const {params: n, $el: s, $wrapperEl: r, slides: o} = i;
|
|
3918
|
+
if (typeof i.params === "undefined" || i.destroyed) {
|
|
3919
|
+
return null;
|
|
3920
|
+
}
|
|
3921
|
+
i.emit("beforeDestroy");
|
|
3922
|
+
// Init Flag
|
|
3923
|
+
i.initialized = false;
|
|
3924
|
+
// Detach events
|
|
3925
|
+
i.detachEvents();
|
|
3926
|
+
// Destroy loop
|
|
3927
|
+
if (n.loop) {
|
|
3928
|
+
i.loopDestroy();
|
|
3929
|
+
}
|
|
3930
|
+
// Cleanup styles
|
|
3931
|
+
if (t) {
|
|
3932
|
+
i.removeClasses();
|
|
3933
|
+
s.removeAttr("style");
|
|
3934
|
+
r.removeAttr("style");
|
|
3935
|
+
if (o && o.length) {
|
|
3936
|
+
o.removeClass([ n.slideVisibleClass, n.slideActiveClass, n.slideNextClass, n.slidePrevClass ].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index");
|
|
3937
|
+
}
|
|
3938
|
+
}
|
|
3939
|
+
i.emit("destroy");
|
|
3940
|
+
// Detach emitter events
|
|
3941
|
+
Object.keys(i.eventsListeners).forEach((e => {
|
|
3942
|
+
i.off(e);
|
|
3943
|
+
}));
|
|
3944
|
+
if (e !== false) {
|
|
3945
|
+
i.$el[0].swiper = null;
|
|
3946
|
+
deleteProps(i);
|
|
3947
|
+
}
|
|
3948
|
+
i.destroyed = true;
|
|
3949
|
+
return null;
|
|
3950
|
+
}
|
|
3951
|
+
static extendDefaults(e) {
|
|
3952
|
+
extend(I, e);
|
|
3953
|
+
}
|
|
3954
|
+
static get extendedDefaults() {
|
|
3955
|
+
return I;
|
|
3956
|
+
}
|
|
3957
|
+
static get defaults() {
|
|
3958
|
+
return D;
|
|
3959
|
+
}
|
|
3960
|
+
static installModule(e) {
|
|
3961
|
+
if (!j.prototype.__modules__) j.prototype.__modules__ = [];
|
|
3962
|
+
const t = j.prototype.__modules__;
|
|
3963
|
+
if (typeof e === "function" && t.indexOf(e) < 0) {
|
|
3964
|
+
t.push(e);
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
static use(e) {
|
|
3968
|
+
if (Array.isArray(e)) {
|
|
3969
|
+
e.forEach((e => j.installModule(e)));
|
|
3970
|
+
return j;
|
|
3971
|
+
}
|
|
3972
|
+
j.installModule(e);
|
|
3973
|
+
return j;
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
Object.keys(L).forEach((e => {
|
|
3978
|
+
Object.keys(L[e]).forEach((t => {
|
|
3979
|
+
j.prototype[t] = L[e][t];
|
|
3980
|
+
}));
|
|
3981
|
+
}));
|
|
3982
|
+
|
|
3983
|
+
j.use([ Resize, Observer ]);
|
|
3984
|
+
|
|
3985
|
+
/* eslint no-underscore-dangle: "off" */ function Autoplay({swiper: e, extendParams: t, on: i, emit: n}) {
|
|
3986
|
+
let s;
|
|
3987
|
+
e.autoplay = {
|
|
3988
|
+
running: false,
|
|
3989
|
+
paused: false
|
|
3990
|
+
};
|
|
3991
|
+
t({
|
|
3992
|
+
autoplay: {
|
|
3993
|
+
enabled: false,
|
|
3994
|
+
delay: 3e3,
|
|
3995
|
+
waitForTransition: true,
|
|
3996
|
+
disableOnInteraction: true,
|
|
3997
|
+
stopOnLastSlide: false,
|
|
3998
|
+
reverseDirection: false,
|
|
3999
|
+
pauseOnMouseEnter: false
|
|
4000
|
+
}
|
|
4001
|
+
});
|
|
4002
|
+
function run() {
|
|
4003
|
+
if (!e.size) {
|
|
4004
|
+
e.autoplay.running = false;
|
|
4005
|
+
e.autoplay.paused = false;
|
|
4006
|
+
return;
|
|
4007
|
+
}
|
|
4008
|
+
const t = e.slides.eq(e.activeIndex);
|
|
4009
|
+
let i = e.params.autoplay.delay;
|
|
4010
|
+
if (t.attr("data-swiper-autoplay")) {
|
|
4011
|
+
i = t.attr("data-swiper-autoplay") || e.params.autoplay.delay;
|
|
4012
|
+
}
|
|
4013
|
+
clearTimeout(s);
|
|
4014
|
+
s = nextTick((() => {
|
|
4015
|
+
let t;
|
|
4016
|
+
if (e.params.autoplay.reverseDirection) {
|
|
4017
|
+
if (e.params.loop) {
|
|
4018
|
+
e.loopFix();
|
|
4019
|
+
t = e.slidePrev(e.params.speed, true, true);
|
|
4020
|
+
n("autoplay");
|
|
4021
|
+
} else if (!e.isBeginning) {
|
|
4022
|
+
t = e.slidePrev(e.params.speed, true, true);
|
|
4023
|
+
n("autoplay");
|
|
4024
|
+
} else if (!e.params.autoplay.stopOnLastSlide) {
|
|
4025
|
+
t = e.slideTo(e.slides.length - 1, e.params.speed, true, true);
|
|
4026
|
+
n("autoplay");
|
|
4027
|
+
} else {
|
|
4028
|
+
stop();
|
|
4029
|
+
}
|
|
4030
|
+
} else if (e.params.loop) {
|
|
4031
|
+
e.loopFix();
|
|
4032
|
+
t = e.slideNext(e.params.speed, true, true);
|
|
4033
|
+
n("autoplay");
|
|
4034
|
+
} else if (!e.isEnd) {
|
|
4035
|
+
t = e.slideNext(e.params.speed, true, true);
|
|
4036
|
+
n("autoplay");
|
|
4037
|
+
} else if (!e.params.autoplay.stopOnLastSlide) {
|
|
4038
|
+
t = e.slideTo(0, e.params.speed, true, true);
|
|
4039
|
+
n("autoplay");
|
|
4040
|
+
} else {
|
|
4041
|
+
stop();
|
|
4042
|
+
}
|
|
4043
|
+
if (e.params.cssMode && e.autoplay.running) run(); else if (t === false) {
|
|
4044
|
+
run();
|
|
4045
|
+
}
|
|
4046
|
+
}), i);
|
|
4047
|
+
}
|
|
4048
|
+
function start() {
|
|
4049
|
+
if (typeof s !== "undefined") return false;
|
|
4050
|
+
if (e.autoplay.running) return false;
|
|
4051
|
+
e.autoplay.running = true;
|
|
4052
|
+
n("autoplayStart");
|
|
4053
|
+
run();
|
|
4054
|
+
return true;
|
|
4055
|
+
}
|
|
4056
|
+
function stop() {
|
|
4057
|
+
if (!e.autoplay.running) return false;
|
|
4058
|
+
if (typeof s === "undefined") return false;
|
|
4059
|
+
if (s) {
|
|
4060
|
+
clearTimeout(s);
|
|
4061
|
+
s = undefined;
|
|
4062
|
+
}
|
|
4063
|
+
e.autoplay.running = false;
|
|
4064
|
+
n("autoplayStop");
|
|
4065
|
+
return true;
|
|
4066
|
+
}
|
|
4067
|
+
function pause(t) {
|
|
4068
|
+
if (!e.autoplay.running) return;
|
|
4069
|
+
if (e.autoplay.paused) return;
|
|
4070
|
+
if (s) clearTimeout(s);
|
|
4071
|
+
e.autoplay.paused = true;
|
|
4072
|
+
if (t === 0 || !e.params.autoplay.waitForTransition) {
|
|
4073
|
+
e.autoplay.paused = false;
|
|
4074
|
+
run();
|
|
4075
|
+
} else {
|
|
4076
|
+
[ "transitionend", "webkitTransitionEnd" ].forEach((t => {
|
|
4077
|
+
e.$wrapperEl[0].addEventListener(t, onTransitionEnd);
|
|
4078
|
+
}));
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
function onVisibilityChange() {
|
|
4082
|
+
const t = getDocument();
|
|
4083
|
+
if (t.visibilityState === "hidden" && e.autoplay.running) {
|
|
4084
|
+
pause();
|
|
4085
|
+
}
|
|
4086
|
+
if (t.visibilityState === "visible" && e.autoplay.paused) {
|
|
4087
|
+
run();
|
|
4088
|
+
e.autoplay.paused = false;
|
|
4089
|
+
}
|
|
4090
|
+
}
|
|
4091
|
+
function onTransitionEnd(t) {
|
|
4092
|
+
if (!e || e.destroyed || !e.$wrapperEl) return;
|
|
4093
|
+
if (t.target !== e.$wrapperEl[0]) return;
|
|
4094
|
+
[ "transitionend", "webkitTransitionEnd" ].forEach((t => {
|
|
4095
|
+
e.$wrapperEl[0].removeEventListener(t, onTransitionEnd);
|
|
4096
|
+
}));
|
|
4097
|
+
e.autoplay.paused = false;
|
|
4098
|
+
if (!e.autoplay.running) {
|
|
4099
|
+
stop();
|
|
4100
|
+
} else {
|
|
4101
|
+
run();
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4104
|
+
function onMouseEnter() {
|
|
4105
|
+
if (e.params.autoplay.disableOnInteraction) {
|
|
4106
|
+
stop();
|
|
4107
|
+
} else {
|
|
4108
|
+
n("autoplayPause");
|
|
4109
|
+
pause();
|
|
4110
|
+
}
|
|
4111
|
+
[ "transitionend", "webkitTransitionEnd" ].forEach((t => {
|
|
4112
|
+
e.$wrapperEl[0].removeEventListener(t, onTransitionEnd);
|
|
4113
|
+
}));
|
|
4114
|
+
}
|
|
4115
|
+
function onMouseLeave() {
|
|
4116
|
+
if (e.params.autoplay.disableOnInteraction) {
|
|
4117
|
+
return;
|
|
4118
|
+
}
|
|
4119
|
+
e.autoplay.paused = false;
|
|
4120
|
+
n("autoplayResume");
|
|
4121
|
+
run();
|
|
4122
|
+
}
|
|
4123
|
+
function attachMouseEvents() {
|
|
4124
|
+
if (e.params.autoplay.pauseOnMouseEnter) {
|
|
4125
|
+
e.$el.on("mouseenter", onMouseEnter);
|
|
4126
|
+
e.$el.on("mouseleave", onMouseLeave);
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
function detachMouseEvents() {
|
|
4130
|
+
e.$el.off("mouseenter", onMouseEnter);
|
|
4131
|
+
e.$el.off("mouseleave", onMouseLeave);
|
|
4132
|
+
}
|
|
4133
|
+
i("init", (() => {
|
|
4134
|
+
if (e.params.autoplay.enabled) {
|
|
4135
|
+
start();
|
|
4136
|
+
const e = getDocument();
|
|
4137
|
+
e.addEventListener("visibilitychange", onVisibilityChange);
|
|
4138
|
+
attachMouseEvents();
|
|
4139
|
+
}
|
|
4140
|
+
}));
|
|
4141
|
+
i("beforeTransitionStart", ((t, i, n) => {
|
|
4142
|
+
if (e.autoplay.running) {
|
|
4143
|
+
if (n || !e.params.autoplay.disableOnInteraction) {
|
|
4144
|
+
e.autoplay.pause(i);
|
|
4145
|
+
} else {
|
|
4146
|
+
stop();
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
}));
|
|
4150
|
+
i("sliderFirstMove", (() => {
|
|
4151
|
+
if (e.autoplay.running) {
|
|
4152
|
+
if (e.params.autoplay.disableOnInteraction) {
|
|
4153
|
+
stop();
|
|
4154
|
+
} else {
|
|
4155
|
+
pause();
|
|
4156
|
+
}
|
|
4157
|
+
}
|
|
4158
|
+
}));
|
|
4159
|
+
i("touchEnd", (() => {
|
|
4160
|
+
if (e.params.cssMode && e.autoplay.paused && !e.params.autoplay.disableOnInteraction) {
|
|
4161
|
+
run();
|
|
4162
|
+
}
|
|
4163
|
+
}));
|
|
4164
|
+
i("destroy", (() => {
|
|
4165
|
+
detachMouseEvents();
|
|
4166
|
+
if (e.autoplay.running) {
|
|
4167
|
+
stop();
|
|
4168
|
+
}
|
|
4169
|
+
const t = getDocument();
|
|
4170
|
+
t.removeEventListener("visibilitychange", onVisibilityChange);
|
|
4171
|
+
}));
|
|
4172
|
+
Object.assign(e.autoplay, {
|
|
4173
|
+
pause,
|
|
4174
|
+
run,
|
|
4175
|
+
start,
|
|
4176
|
+
stop
|
|
4177
|
+
});
|
|
4178
|
+
}
|
|
4179
|
+
|
|
4180
|
+
const A = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}q2-carousel{display:grid;grid-template-rows:repeat(2, auto);gap:var(--app-scale-2x, 10px)}.swiper-container{--comp-container-padding:var(--app-scale-1x, 5px) 0 var(--app-scale-2x, 10px);display:block;width:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;padding:var(--tct-carousel-container-padding, var(--t-carousel-container-padding, var(--comp-container-padding, 5px 0 10px)))}.insufficient-pane-feedback{text-align:center;box-shadow:var(--app-shadow-2, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14));background:var(--tct-carousel-background, var(--tct-carousel-background-color, var(--t-carousel-background-color, var(--tct-white, var(--app-white, #ffffff)))));border:var(--tct-carousel-pane-border-width, var(--t-carousel-pane-border-width, 1px)) solid var(--tct-carousel-pane-border-color, var(--t-carousel-pane-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));border-radius:var(--tct-carousel-pane-border-radius, var(--t-carousel-pane-border-radius, 8px));padding:var(--tct-carousel-pane-padding, var(--t-carousel-pane-padding, 7px))}.insufficient-pane-feedback.content-peek-display{max-width:395px;margin:0 auto}.insufficient-pane-feedback .insufficient-panes-header,.insufficient-pane-feedback .insufficient-panes-body{text-align:center}.insufficient-pane-feedback .insufficient-panes-header strong{font-weight:600}.insufficient-pane-feedback .insufficient-panes-body{margin:0 auto 2rem auto;max-width:75%}.insufficient-pane-feedback .insufficient-panes-icon-wrapper{display:flex;justify-content:center;margin:1rem 0 2rem 0}.insufficient-pane-feedback .insufficient-panes-icon-wrapper q2-icon{width:38px}.q2-carousel-pagination-navigation-wrapper{grid-row:2;display:flex;justify-content:center;align-items:center;min-height:44px}.q2-carousel-pagination-navigation-wrapper.evenly-space{justify-content:space-between}.q2-carousel-control-center-tray{display:flex;align-items:center}.q2-carousel-swiper-wrapper.compact{overflow:visible}.q2-carousel-swiper-wrapper.compact q2-btn{margin-top:4px}.q2-carousel-pagination{height:12px;display:flex;align-content:center;justify-content:center;gap:0.5rem}.q2-carousel-pagination .q2-carousel-page-indicator{display:inline-block;height:12px;width:12px;border-radius:50%;background-color:var(--tct-carousel-pagination-inactive-color, var(--t-carousel-pagination-inactive-color, var(--t-a11y--gray-color-AA, #949494)));padding:0;border:0;transition:all 0.5s}.q2-carousel-pagination .q2-carousel-page-indicator:hover{background-color:var(--tct-carousel-pagination-active-color, var(--t-carousel-pagination-active-color, var(--tct-primary, var(--t-primary, #006eb2))))}.q2-carousel-pagination .q2-carousel-page-indicator.active-page{display:inline-block;background-color:var(--tct-carousel-pagination-active-color, var(--t-carousel-pagination-active-color, var(--tct-primary, var(--t-primary, #006eb2))))}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator{display:none}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-page,.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-adjacent{display:inline-block;height:10px;width:10px}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-adjacent-adjacent{display:inline-block;height:8px;width:8px}.q2-carousel-swiper-container{grid-row:1;}.q2-carousel-swiper-container .swiper-wrapper{position:relative;width:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.q2-carousel-swiper-container.content-peek-display .q2-carousel-pane:not(.swiper-slide-active){transform:scale(0.9)}.q2-carousel-swiper-container.frameless-display{padding:var(--tct-carousel-frameless-container-padding, var(--t-carousel-frameless-container-padding, 0))}.q2-carousel-swiper-container.full-width-display{--comp-container-padding:var(--app-scale-1x, 5px) var(--app-scale-2x, 10px) var(--app-scale-2x, 10px);padding:var(--tct-carousel-full-width-container-padding, var(--t-carousel-full-width-container-padding, var(--comp-container-padding, 5px 10px 10px)))}";
|
|
4181
|
+
|
|
4182
|
+
const z = A;
|
|
4183
|
+
|
|
4184
|
+
const F = 500;
|
|
4185
|
+
|
|
4186
|
+
/* width in px of this host element where the layout starts to get unruly */ const W = class {
|
|
4187
|
+
constructor(n) {
|
|
4188
|
+
e(this, n);
|
|
4189
|
+
this.change = t(this, "change", 7);
|
|
4190
|
+
this.guid = o();
|
|
4191
|
+
this.swiper = null;
|
|
4192
|
+
this.configureCarousel = (e, t) => {
|
|
4193
|
+
var i, n;
|
|
4194
|
+
if (!!this.swiper) {
|
|
4195
|
+
this.tearDownCarousel();
|
|
4196
|
+
}
|
|
4197
|
+
this.autoPlayInProgress = this.autoPlay;
|
|
4198
|
+
new j(e, t);
|
|
4199
|
+
(i = this.swiper) === null || i === void 0 ? void 0 : i.slideTo(this.realIndex);
|
|
4200
|
+
if (this.autoPlayInProgress) (n = this.swiper) === null || n === void 0 ? void 0 : n.autoplay.start();
|
|
4201
|
+
};
|
|
4202
|
+
this.handleAutoPlayPause = e => {
|
|
4203
|
+
var t;
|
|
4204
|
+
if (!this.autoPlay) return;
|
|
4205
|
+
const i = (t = this.swiper) === null || t === void 0 ? void 0 : t.autoplay;
|
|
4206
|
+
switch (e) {
|
|
4207
|
+
case "play":
|
|
4208
|
+
i.start();
|
|
4209
|
+
this.autoPlayInProgress = true;
|
|
4210
|
+
break;
|
|
4211
|
+
|
|
4212
|
+
case "pause":
|
|
4213
|
+
i.stop();
|
|
4214
|
+
this.autoPlayInProgress = false;
|
|
4215
|
+
break;
|
|
4216
|
+
}
|
|
4217
|
+
};
|
|
4218
|
+
this.handlePopovers = e => {
|
|
4219
|
+
const {swiper: t, carouselPaneWrapperElement: i} = this;
|
|
4220
|
+
if (e.detail.open) {
|
|
4221
|
+
i.style.left = `${t === null || t === void 0 ? void 0 : t.translate}px`;
|
|
4222
|
+
i.style.transform = null;
|
|
4223
|
+
t === null || t === void 0 ? void 0 : t.disable();
|
|
4224
|
+
} else {
|
|
4225
|
+
i.style.left = null;
|
|
4226
|
+
i.style.transform = `translate3d(${t === null || t === void 0 ? void 0 : t.translate}px, 0, 0)`;
|
|
4227
|
+
t === null || t === void 0 ? void 0 : t.enable();
|
|
4228
|
+
}
|
|
4229
|
+
};
|
|
4230
|
+
this.keydownHandler = e => {
|
|
4231
|
+
var t, i, n, s;
|
|
4232
|
+
switch (e.key) {
|
|
4233
|
+
case "ArrowRight":
|
|
4234
|
+
e.preventDefault();
|
|
4235
|
+
(t = this.swiper) === null || t === void 0 ? void 0 : t.slideNext();
|
|
4236
|
+
break;
|
|
4237
|
+
|
|
4238
|
+
case "ArrowLeft":
|
|
4239
|
+
e.preventDefault();
|
|
4240
|
+
(i = this.swiper) === null || i === void 0 ? void 0 : i.slidePrev();
|
|
4241
|
+
break;
|
|
4242
|
+
|
|
4243
|
+
case "Home":
|
|
4244
|
+
e.preventDefault();
|
|
4245
|
+
(n = this.swiper) === null || n === void 0 ? void 0 : n.slideTo(0);
|
|
4246
|
+
break;
|
|
4247
|
+
|
|
4248
|
+
case "End":
|
|
4249
|
+
e.preventDefault();
|
|
4250
|
+
(s = this.swiper) === null || s === void 0 ? void 0 : s.slideTo(this.paneCount - 1);
|
|
4251
|
+
break;
|
|
4252
|
+
}
|
|
4253
|
+
};
|
|
4254
|
+
this.onMutationObserved = () => {
|
|
4255
|
+
this.updateCarouselPaneProps();
|
|
4256
|
+
this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
4257
|
+
};
|
|
4258
|
+
this.setCarouselWrapperWidth = () => {
|
|
4259
|
+
if (this.insufficientPanes) return;
|
|
4260
|
+
this.carouselWrapperWidth = this.carouselWrapper.clientWidth;
|
|
4261
|
+
};
|
|
4262
|
+
this.tearDownCarousel = () => {
|
|
4263
|
+
this.swiper.destroy();
|
|
4264
|
+
this.swiper = null;
|
|
4265
|
+
};
|
|
4266
|
+
this.updateCarouselPaneProps = () => {
|
|
4267
|
+
const {framelessPanes: e, paneCount: t, paneArray: i} = this;
|
|
4268
|
+
i.forEach(((i, n) => {
|
|
4269
|
+
i.index = n;
|
|
4270
|
+
i.siblingCount = t;
|
|
4271
|
+
i.isActivePane = n === this.realIndex;
|
|
4272
|
+
i.slotFrameless = e || undefined;
|
|
4273
|
+
}));
|
|
4274
|
+
this.currentPaneCount = t;
|
|
4275
|
+
};
|
|
4276
|
+
// #endregion
|
|
4277
|
+
// #region Render Methods
|
|
4278
|
+
this.renderAutoPlayBtn = () => {
|
|
4279
|
+
const {autoPlayInProgress: e} = this;
|
|
4280
|
+
return i("q2-btn", {
|
|
4281
|
+
type: "button",
|
|
4282
|
+
"hide-label": true,
|
|
4283
|
+
label: a(e ? "tecton.element.carousel.pausePlayLabel" : "tecton.element.carousel.resumePlayLabel"),
|
|
4284
|
+
class: "q2-carousel-autoplay-control",
|
|
4285
|
+
onClick: () => this.handleAutoPlayPause(e ? "pause" : "play")
|
|
4286
|
+
}, i("q2-icon", {
|
|
4287
|
+
type: e ? "pause" : "play"
|
|
4288
|
+
}));
|
|
4289
|
+
};
|
|
4290
|
+
this.renderInsufficientPanesDisplay = () => {
|
|
4291
|
+
let e = [ "insufficient-pane-feedback", this.fullWidthPanes ? "full-width-display" : "content-peek-display" ];
|
|
4292
|
+
if (this.compactMode) e = [ ...e, "compact" ];
|
|
4293
|
+
return i("div", {
|
|
4294
|
+
class: e.join(" ")
|
|
4295
|
+
}, i("div", {
|
|
4296
|
+
class: "insufficient-panes-icon-wrapper"
|
|
4297
|
+
}, i("q2-icon", {
|
|
4298
|
+
type: "warning"
|
|
4299
|
+
})), i("p", {
|
|
4300
|
+
class: "insufficient-panes-header"
|
|
4301
|
+
}, i("strong", null, a("tecton.element.carousel.insufficientPanesMessageHeader"))), i("p", {
|
|
4302
|
+
class: "insufficient-panes-body"
|
|
4303
|
+
}, a("tecton.element.carousel.insufficientPanesMessageBody")));
|
|
4304
|
+
};
|
|
4305
|
+
this.renderNextNavBtn = () => {
|
|
4306
|
+
const e = this.realIndex < this.paneCount - 1;
|
|
4307
|
+
return i("div", null, i("q2-btn", {
|
|
4308
|
+
type: "button",
|
|
4309
|
+
disabled: e ? undefined : true,
|
|
4310
|
+
class: "q2-carousel-navigation-button q2-carousel-navigation-button-next",
|
|
4311
|
+
"hide-label": true,
|
|
4312
|
+
label: a("tecton.element.carousel.nextItemLabel"),
|
|
4313
|
+
onClick: () => {
|
|
4314
|
+
var e;
|
|
4315
|
+
return (e = this.swiper) === null || e === void 0 ? void 0 : e.slideNext();
|
|
4316
|
+
}
|
|
4317
|
+
}, i("q2-icon", {
|
|
4318
|
+
type: "chevron-right"
|
|
4319
|
+
})));
|
|
4320
|
+
};
|
|
4321
|
+
this.renderPaginationArea = () => {
|
|
4322
|
+
const {useDynamicPaginationDots: e, realIndex: t, paneCount: n, paneArray: s} = this;
|
|
4323
|
+
let r = [ "q2-carousel-pagination" ];
|
|
4324
|
+
if (e) r = [ ...r, "dynamic" ];
|
|
4325
|
+
return i("div", {
|
|
4326
|
+
class: r.join(" "),
|
|
4327
|
+
role: "tablist",
|
|
4328
|
+
"aria-label": a("tecton.element.carousel.tabWrapperLabel")
|
|
4329
|
+
}, s.map((s => {
|
|
4330
|
+
let r = [ "q2-carousel-page-indicator", `q2-carousel-page-indicator-${s.index}` ];
|
|
4331
|
+
if (s.isActivePane) r = [ ...r, "active-page" ];
|
|
4332
|
+
if (e) r = [ ...r, "dynamic" ];
|
|
4333
|
+
const o = s.index === t + 1 || s.index === t - 1;
|
|
4334
|
+
if (o) r = [ ...r, "active-adjacent" ];
|
|
4335
|
+
const l = s.index === t + 2 || s.index === t - 2;
|
|
4336
|
+
if (l) r = [ ...r, "active-adjacent-adjacent" ];
|
|
4337
|
+
return i("button", {
|
|
4338
|
+
type: "button",
|
|
4339
|
+
role: "tab",
|
|
4340
|
+
tabIndex: s.isActivePane ? undefined : -1,
|
|
4341
|
+
"aria-selected": s.isActivePane ? "true" : "false",
|
|
4342
|
+
class: r.join(" "),
|
|
4343
|
+
onClick: () => {
|
|
4344
|
+
var e;
|
|
4345
|
+
return (e = this.swiper) === null || e === void 0 ? void 0 : e.slideTo(s.index);
|
|
4346
|
+
},
|
|
4347
|
+
onKeyDown: this.keydownHandler,
|
|
4348
|
+
"aria-label": a("tecton.element.carousel.itemDescription", [ (s.index + 1).toString(), n.toString() ])
|
|
4349
|
+
});
|
|
4350
|
+
})));
|
|
4351
|
+
};
|
|
4352
|
+
this.renderPrevNavBtn = () => {
|
|
4353
|
+
const e = this.realIndex > 0;
|
|
4354
|
+
return i("div", null, i("q2-btn", {
|
|
4355
|
+
type: "button",
|
|
4356
|
+
disabled: e ? undefined : true,
|
|
4357
|
+
class: "q2-carousel-navigation-button q2-carousel-navigation-button-prev",
|
|
4358
|
+
"hide-label": true,
|
|
4359
|
+
label: a("tecton.element.carousel.previousItemLabel"),
|
|
4360
|
+
onClick: () => {
|
|
4361
|
+
var e;
|
|
4362
|
+
return (e = this.swiper) === null || e === void 0 ? void 0 : e.slidePrev();
|
|
4363
|
+
}
|
|
4364
|
+
}, i("q2-icon", {
|
|
4365
|
+
type: "chevron-left"
|
|
4366
|
+
})));
|
|
4367
|
+
};
|
|
4368
|
+
this.ariaLiveValue = "polite";
|
|
4369
|
+
this.autoPlayInProgress = false;
|
|
4370
|
+
this.carouselWrapperWidth = 0;
|
|
4371
|
+
this.compactMode = false;
|
|
4372
|
+
this.currentPaneCount = this.paneCount;
|
|
4373
|
+
this.ariaLabel = undefined;
|
|
4374
|
+
this.autoPlay = false;
|
|
4375
|
+
this.framelessPanes = false;
|
|
4376
|
+
this.fullWidthPanes = false;
|
|
4377
|
+
this.hidePagination = false;
|
|
4378
|
+
this.index = 1;
|
|
4379
|
+
this.label = "tecton.element.carousel.ariaLabel";
|
|
4380
|
+
this.showNavigationArrows = false;
|
|
4381
|
+
}
|
|
4382
|
+
// #endregion
|
|
4383
|
+
// #region Component Lifecycle Events
|
|
4384
|
+
disconnectedCallback() {
|
|
4385
|
+
if (this.mutationObserver) {
|
|
4386
|
+
this.mutationObserver.disconnect();
|
|
4387
|
+
this.mutationObserver = null;
|
|
4388
|
+
}
|
|
4389
|
+
if (!!this.swiper) {
|
|
4390
|
+
this.tearDownCarousel();
|
|
4391
|
+
}
|
|
4392
|
+
window.removeEventListener("resize", this.setCarouselWrapperWidth);
|
|
4393
|
+
}
|
|
4394
|
+
componentWillLoad() {
|
|
4395
|
+
l(this);
|
|
4396
|
+
this.updateCarouselPaneProps();
|
|
4397
|
+
window.addEventListener("resize", this.setCarouselWrapperWidth);
|
|
4398
|
+
this.universalCarouselOptions = {
|
|
4399
|
+
centeredSlides: true,
|
|
4400
|
+
focusableElements: "q2-btn, q2-dropdown, q2-item, q2-list, a, input, select, textarea, button, video, label, option",
|
|
4401
|
+
autoplay: this.autoPlay,
|
|
4402
|
+
modules: [ Autoplay ],
|
|
4403
|
+
on: {
|
|
4404
|
+
realIndexChange: e => {
|
|
4405
|
+
this.index = e.realIndex + 1;
|
|
4406
|
+
this.updateCarouselPaneProps();
|
|
4407
|
+
const t = !!document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`);
|
|
4408
|
+
const i = !!document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`);
|
|
4409
|
+
const n = t || i;
|
|
4410
|
+
this.handleAriaLive(n);
|
|
4411
|
+
this.change.emit({
|
|
4412
|
+
index: e.realIndex + 1
|
|
4413
|
+
});
|
|
4414
|
+
if (t) {
|
|
4415
|
+
this.paginationBtns[e.realIndex].focus({
|
|
4416
|
+
preventScroll: true
|
|
4417
|
+
});
|
|
4418
|
+
} else if (i) e.slides[e.realIndex].focus({
|
|
4419
|
+
preventScroll: true
|
|
4420
|
+
});
|
|
4421
|
+
},
|
|
4422
|
+
afterInit: e => {
|
|
4423
|
+
var t;
|
|
4424
|
+
this.swiper = e;
|
|
4425
|
+
(t = this.activePane) === null || t === void 0 ? void 0 : t.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
4426
|
+
},
|
|
4427
|
+
slideChangeTransitionEnd: () => {
|
|
4428
|
+
var e;
|
|
4429
|
+
(e = this.activePane) === null || e === void 0 ? void 0 : e.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
4430
|
+
},
|
|
4431
|
+
slideChangeTransitionStart: () => {
|
|
4432
|
+
var e;
|
|
4433
|
+
(e = this.activePane) === null || e === void 0 ? void 0 : e.removeEventListener("popoverStateChanged", this.handlePopovers);
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4436
|
+
};
|
|
4437
|
+
this.fullWidthDisplayOptions = Object.assign({
|
|
4438
|
+
slidesPerView: 1,
|
|
4439
|
+
spaceBetween: 100
|
|
4440
|
+
}, this.universalCarouselOptions);
|
|
4441
|
+
}
|
|
4442
|
+
componentDidLoad() {
|
|
4443
|
+
this.setCarouselWrapperWidth();
|
|
4444
|
+
if (this.carouselWrapper && !!this.paneArray.length) {
|
|
4445
|
+
this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
4446
|
+
}
|
|
4447
|
+
const e = new MutationObserver(this.onMutationObserved);
|
|
4448
|
+
e.observe(this.hostElement, {
|
|
4449
|
+
childList: true,
|
|
4450
|
+
subtree: true
|
|
4451
|
+
});
|
|
4452
|
+
this.mutationObserver = e;
|
|
4453
|
+
c(this.hostElement);
|
|
4454
|
+
}
|
|
4455
|
+
// #endregion
|
|
4456
|
+
// #region Listeners
|
|
4457
|
+
carouselPaneClicked(e) {
|
|
4458
|
+
var t, i;
|
|
4459
|
+
(t = this.swiper) === null || t === void 0 ? void 0 : t.slideTo(e.detail.paneIndex);
|
|
4460
|
+
((i = this.swiper) === null || i === void 0 ? void 0 : i.slides[e.detail.paneIndex]).focus({
|
|
4461
|
+
preventScroll: true
|
|
4462
|
+
});
|
|
4463
|
+
}
|
|
4464
|
+
delegateFocus(e) {
|
|
4465
|
+
var t, i;
|
|
4466
|
+
const n = (t = this.swiper) === null || t === void 0 ? void 0 : t.slides[(i = this.swiper) === null || i === void 0 ? void 0 : i.realIndex];
|
|
4467
|
+
if (!f(e, this.hostElement) || !n) return;
|
|
4468
|
+
n.focus({
|
|
4469
|
+
preventScroll: true
|
|
4470
|
+
});
|
|
4471
|
+
}
|
|
4472
|
+
// #endregion
|
|
4473
|
+
// #region Public Methods API
|
|
4474
|
+
/**
|
|
4475
|
+
* Clicks and Focuses the `q2-carousel-pane` matching the specified index.
|
|
4476
|
+
* @testOnly
|
|
4477
|
+
*/
|
|
4478
|
+
async selectCarouselPane(e) {
|
|
4479
|
+
if (e > this.paneCount) return;
|
|
4480
|
+
const t = e > 0 ? e - 1 : 0;
|
|
4481
|
+
const i = this.paneArray[t];
|
|
4482
|
+
i === null || i === void 0 ? void 0 : i.click();
|
|
4483
|
+
i === null || i === void 0 ? void 0 : i.focus({
|
|
4484
|
+
preventScroll: true
|
|
4485
|
+
});
|
|
4486
|
+
}
|
|
4487
|
+
/**
|
|
4488
|
+
* Clicks and Focuses the `<button>` that controls playing or pausing the auto-play feature of the carousel.
|
|
4489
|
+
*
|
|
4490
|
+
* @warning
|
|
4491
|
+
* If the `autoPlay` property is not enabled, this method does nothing.
|
|
4492
|
+
*
|
|
4493
|
+
* @testOnly
|
|
4494
|
+
*/ async togglePlayPause() {
|
|
4495
|
+
if (!this.autoPlay) return;
|
|
4496
|
+
const e = this.hostElement.querySelector(".q2-carousel-autoplay-control");
|
|
4497
|
+
e === null || e === void 0 ? void 0 : e.click();
|
|
4498
|
+
e === null || e === void 0 ? void 0 : e.focus();
|
|
4499
|
+
}
|
|
4500
|
+
// #endregion
|
|
4501
|
+
// #region Watchers
|
|
4502
|
+
ariaLabelObserver() {
|
|
4503
|
+
l(this);
|
|
4504
|
+
}
|
|
4505
|
+
carouselWrapperWidthChanged() {
|
|
4506
|
+
this.compactMode = this.carouselWrapperWidth < F;
|
|
4507
|
+
}
|
|
4508
|
+
framelessPanesChanged() {
|
|
4509
|
+
this.updateCarouselPaneProps();
|
|
4510
|
+
this.revampCarousel();
|
|
4511
|
+
}
|
|
4512
|
+
revampCarousel() {
|
|
4513
|
+
this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
4514
|
+
}
|
|
4515
|
+
indexChanged(e) {
|
|
4516
|
+
var t, i;
|
|
4517
|
+
// this allows the carousel to be swiped programmatically via the index prop
|
|
4518
|
+
if (e !== ((t = this.swiper) === null || t === void 0 ? void 0 : t.realIndex) + 1) {
|
|
4519
|
+
(i = this.swiper) === null || i === void 0 ? void 0 : i.slideTo(this.realIndex);
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
// #endregion
|
|
4523
|
+
// #region Local Methods
|
|
4524
|
+
get activeCarouselOptions() {
|
|
4525
|
+
return this.fullWidthPanes || this.framelessPanes ? this.fullWidthDisplayOptions : this.peekContentDisplayOptions;
|
|
4526
|
+
}
|
|
4527
|
+
get activePane() {
|
|
4528
|
+
var e, t, i;
|
|
4529
|
+
const n = (i = (e = this.swiper) === null || e === void 0 ? void 0 : e.slides[(t = this.swiper) === null || t === void 0 ? void 0 : t.realIndex]) !== null && i !== void 0 ? i : 0;
|
|
4530
|
+
return n instanceof HTMLElement ? n : null;
|
|
4531
|
+
}
|
|
4532
|
+
get insufficientPanes() {
|
|
4533
|
+
return this.paneCount < 1;
|
|
4534
|
+
}
|
|
4535
|
+
get paginationBtns() {
|
|
4536
|
+
return this.hostElement.querySelectorAll(".q2-carousel-page-indicator");
|
|
4537
|
+
}
|
|
4538
|
+
get paneArray() {
|
|
4539
|
+
return Array.from(this.hostElement.querySelectorAll("q2-carousel-pane"));
|
|
4540
|
+
}
|
|
4541
|
+
get paneCount() {
|
|
4542
|
+
return this.paneArray.length;
|
|
4543
|
+
}
|
|
4544
|
+
get peekContentDisplayOptions() {
|
|
4545
|
+
return Object.assign({
|
|
4546
|
+
slidesPerView: 2,
|
|
4547
|
+
spaceBetween: this.compactMode ? 0 : -10,
|
|
4548
|
+
centerInsufficientSlides: false
|
|
4549
|
+
}, this.universalCarouselOptions);
|
|
4550
|
+
}
|
|
4551
|
+
get realIndex() {
|
|
4552
|
+
const e = Number(this.index);
|
|
4553
|
+
return e > 0 ? e - 1 : 0;
|
|
4554
|
+
}
|
|
4555
|
+
get useDynamicPaginationDots() {
|
|
4556
|
+
return this.paneCount && this.paneCount > 5;
|
|
4557
|
+
}
|
|
4558
|
+
handleAriaLive(e) {
|
|
4559
|
+
if (this.autoPlayInProgress && !e) {
|
|
4560
|
+
this.ariaLiveValue = "off";
|
|
4561
|
+
} else {
|
|
4562
|
+
this.ariaLiveValue = "polite";
|
|
4563
|
+
}
|
|
4564
|
+
}
|
|
4565
|
+
render() {
|
|
4566
|
+
const {paneCount: e, fullWidthPanes: t, framelessPanes: r, compactMode: o, showNavigationArrows: l, insufficientPanes: c, autoPlay: f, hidePagination: u, ariaLiveValue: d, label: p} = this;
|
|
4567
|
+
let h = [ "q2-carousel-swiper-container", "swiper-container" ];
|
|
4568
|
+
if (t) h = [ ...h, "full-width-display" ];
|
|
4569
|
+
if (r) h = [ ...h, "frameless-display" ];
|
|
4570
|
+
if (!t && !r) h = [ ...h, "content-peek-display" ];
|
|
4571
|
+
if (o) h = [ ...h, "compact" ];
|
|
4572
|
+
let g = [ "q2-carousel-pagination-navigation-wrapper" ];
|
|
4573
|
+
if (l) g = [ ...g, "evenly-space" ];
|
|
4574
|
+
return i(s, {
|
|
4575
|
+
key: "67d25d2920d5a952d2940cfdd6afa21e66c68abe",
|
|
4576
|
+
id: `q2-carousel-${this.guid}`,
|
|
4577
|
+
class: "q2-carousel-instance"
|
|
4578
|
+
}, c ? this.renderInsufficientPanesDisplay() : i(n, null, e > 1 && i("div", {
|
|
4579
|
+
class: g.join(" ")
|
|
4580
|
+
}, l && this.renderPrevNavBtn(), i("div", {
|
|
4581
|
+
class: "q2-carousel-control-center-tray"
|
|
4582
|
+
}, !u && this.renderPaginationArea(), f && this.renderAutoPlayBtn()), l && this.renderNextNavBtn()), i("section", {
|
|
4583
|
+
class: h.join(" "),
|
|
4584
|
+
ref: e => this.carouselWrapper = e,
|
|
4585
|
+
"aria-roledescription": "carousel",
|
|
4586
|
+
"aria-label": a(p)
|
|
4587
|
+
}, i("div", {
|
|
4588
|
+
class: "q2-carousel-swiper-wrapper swiper-wrapper",
|
|
4589
|
+
ref: e => this.carouselPaneWrapperElement = e,
|
|
4590
|
+
"aria-live": d,
|
|
4591
|
+
onKeyDown: this.keydownHandler
|
|
4592
|
+
}, i("slot", null)))));
|
|
4593
|
+
}
|
|
4594
|
+
get hostElement() {
|
|
4595
|
+
return r(this);
|
|
4596
|
+
}
|
|
4597
|
+
static get watchers() {
|
|
4598
|
+
return {
|
|
4599
|
+
ariaLabel: [ "ariaLabelObserver" ],
|
|
4600
|
+
carouselWrapperWidth: [ "carouselWrapperWidthChanged" ],
|
|
4601
|
+
framelessPanes: [ "framelessPanesChanged", "revampCarousel" ],
|
|
4602
|
+
fullWidthPanes: [ "revampCarousel" ],
|
|
4603
|
+
compactMode: [ "revampCarousel" ],
|
|
4604
|
+
autoPlay: [ "revampCarousel" ],
|
|
4605
|
+
index: [ "indexChanged" ]
|
|
4606
|
+
};
|
|
4607
|
+
}
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4610
|
+
W.style = z;
|
|
4611
|
+
|
|
4612
|
+
export { W as q2_carousel };
|
|
4613
|
+
//# sourceMappingURL=q2-carousel.entry.js.map
|