@wikicasa-dev/components 2.1.27 → 2.1.28-alpha.1
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/UIKit/AccessibleSelect.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordion.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionBtn.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionContent.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionItem.js +1 -1
- package/dist/UIKit/BaseAlert.d.ts +1 -1
- package/dist/UIKit/BaseAlert.js +2 -2
- package/dist/UIKit/BaseAutocomplete.js +1 -1
- package/dist/UIKit/BaseBadge.js +2 -2
- package/dist/UIKit/BaseBreadcrumb.js +1 -1
- package/dist/UIKit/BaseButton.js +1 -1
- package/dist/UIKit/BaseCard.js +2 -2
- package/dist/UIKit/BaseComplexToggle.d.ts +1 -1
- package/dist/UIKit/BaseComplexToggle.js +5 -5
- package/dist/UIKit/BaseDropDown.js +1 -1
- package/dist/UIKit/BaseFloatingLabel.js +2 -2
- package/dist/UIKit/BaseIcon.js +2 -2
- package/dist/UIKit/BaseInput.js +2 -2
- package/dist/UIKit/BaseModal.js +2 -2
- package/dist/UIKit/BasePagination.js +1 -1
- package/dist/UIKit/BasePaper.js +2 -2
- package/dist/UIKit/BaseSelect/SelectItem.js +1 -1
- package/dist/UIKit/BaseSlider.js +2 -2
- package/dist/UIKit/BaseSnackbar.js +2 -2
- package/dist/UIKit/BaseTextarea.js +2 -2
- package/dist/UIKit/BaseToggle.js +2 -2
- package/dist/UIKit/BaseTooltip.js +2 -2
- package/dist/UIKit/BaseUploadFile.js +1 -1
- package/dist/UIKit/Checkbox/CheckboxBtn.js +2 -2
- package/dist/UIKit/Checkbox/CheckboxGroup.js +1 -1
- package/dist/UIKit/Radio/RadioButton.js +1 -1
- package/dist/UIKit/Radio/RadioGroup.js +1 -1
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +2 -2
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +1 -1
- package/dist/UIKit/Slider/SimpleSlider.js +2 -2
- package/dist/UIKit/StaticSpinner.js +2 -2
- package/dist/UIKit/Tab/BaseTab.js +1 -1
- package/dist/UIKit/Tab/BaseTabList.js +1 -1
- package/dist/UIKit/Tab/BaseTabPanel.js +1 -1
- package/dist/UIKit/Tab/BaseTabView.js +1 -1
- package/dist/assets/{packages/components/lib → lib}/UIKit/BaseComplexToggle.css +1 -1
- package/dist/chart/DoughnutChart.js +1 -1
- package/dist/chart/LineChart.js +1 -1
- package/dist/components/IntersectionObserver/IntersectionObservable.js +1 -1
- package/dist/components/IntersectionObserver/IntersectionObserver.js +1 -1
- package/dist/components/carousel/SwiperCarousel.js +3 -3
- package/dist/index.js +30 -30
- package/dist/lazyModules/Swiper/autoplay.js +5 -0
- package/dist/lazyModules/Swiper/controller.js +5 -0
- package/dist/lazyModules/Swiper/free-mode.js +5 -0
- package/dist/lazyModules/Swiper/keyboard.js +5 -0
- package/dist/lazyModules/Swiper/navigation.js +5 -0
- package/dist/lazyModules/Swiper/pagination.js +5 -0
- package/dist/lazyModules/Swiper/thumbs.js +5 -0
- package/dist/{packages/components/lib → lib}/UIKit/AccessibleSelect.vue.js +16 -18
- package/dist/lib/UIKit/Accordion/BaseAccordion.vue.js +31 -0
- package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionBtn.vue.js +5 -6
- package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionItem.vue.js +3 -4
- package/dist/{packages/components/lib → lib}/UIKit/BaseAutocomplete.vue.js +9 -12
- package/dist/{packages/components/lib → lib}/UIKit/BaseBreadcrumb.vue.js +9 -10
- package/dist/{packages/components/lib → lib}/UIKit/BaseButton.vue.js +1 -1
- package/dist/{packages/components/lib → lib}/UIKit/BaseDropDown.vue.js +6 -7
- package/dist/{packages/components/lib → lib}/UIKit/BaseInput.vue.js +2 -2
- package/dist/{packages/components/lib → lib}/UIKit/BaseModal.vue.js +15 -20
- package/dist/{packages/components/lib → lib}/UIKit/BasePagination.vue.js +3 -4
- package/dist/{packages/components/lib → lib}/UIKit/BaseSlider.vue.js +1 -1
- package/dist/{packages/components/lib → lib}/UIKit/BaseSnackbar.vue.js +3 -4
- package/dist/{packages/components/lib → lib}/UIKit/BaseTextarea.vue.js +2 -2
- package/dist/{packages/components/lib → lib}/UIKit/BaseUploadFile.vue.js +1 -1
- package/dist/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxGroup.vue.js +18 -22
- package/dist/{packages/components/lib → lib}/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +1 -1
- package/dist/{packages/components/lib → lib}/chart/DoughnutChart.vue.js +1 -1
- package/dist/{packages/components/lib → lib}/chart/LineChart.vue.js +1 -1
- package/dist/{packages/components/lib → lib}/components/carousel/SwiperCarousel.vue.js +32 -35
- package/package.json +16 -12
- package/dist/_virtual/polyline.js +0 -2
- package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/autoplay.css +0 -0
- package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/free-mode.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/navigation.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/zoom.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper.css +0 -1
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/autoplay.js +0 -128
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/controller.js +0 -100
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/free-mode.js +0 -123
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/keyboard.js +0 -66
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/navigation.js +0 -136
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.js +0 -226
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/thumbs.js +0 -120
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/zoom.js +0 -309
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/classes-to-selector.js +0 -6
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/create-element-if-not-defined.js +0 -12
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/ssr-window.esm.js +0 -134
- package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/utils.js +0 -88
- package/dist/packages/components/lazyModules/Swiper/autoplay.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/controller.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/free-mode.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/keyboard.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/navigation.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/pagination.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/thumbs.js +0 -5
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +0 -34
- package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js +0 -28
- package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js +0 -38
- package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -9
- package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -2
- package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -40
- package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/ArrayUtils.js +0 -4
- package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/DeviceDetectionUtils.js +0 -4
- package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js +0 -15
- package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js +0 -12
- package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +0 -10
- package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/StringUtils.js +0 -4
- package/dist/packages/components/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -41
- package/dist/packages/components/node_modules/google-polyline/lib/decode.js +0 -22
- package/dist/packages/components/node_modules/google-polyline/lib/encode.js +0 -34
- package/dist/packages/components/node_modules/google-polyline/lib/polyline.js +0 -12
- package/dist/packages/components/node_modules/js-cookie/dist/js.cookie.js +0 -70
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseAlert.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseBadge.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseCard.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseFloatingLabel.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseIcon.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseInput.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseModal.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BasePaper.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseSlider.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseSnackbar.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseTextarea.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseToggle.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseTooltip.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxBtn.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/ShimmerLoader/BaseShimmerLoader.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/Slider/SimpleSlider.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/StaticSpinner.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/components/carousel/SwiperCarousel.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/components/carousel/SwiperCarousel2.css +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionContent.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseAlert.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseBadge.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseCard.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseComplexToggle.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseFloatingLabel.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseIcon.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BasePaper.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseSelect/SelectItem.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseToggle.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BaseTooltip.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxBtn.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Radio/RadioButton.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Radio/RadioGroup.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Slider/SimpleSlider.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/StaticSpinner.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTab.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTabList.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTabPanel.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTabView.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/components/IntersectionObserver/IntersectionObservable.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/components/IntersectionObserver/IntersectionObserver.vue.js +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { g as K, a as U } from "../shared/ssr-window.esm.js";
|
|
2
|
-
import { d as V, f as W } from "../shared/utils.js";
|
|
3
|
-
function O({
|
|
4
|
-
swiper: e,
|
|
5
|
-
extendParams: p,
|
|
6
|
-
on: y,
|
|
7
|
-
emit: L
|
|
8
|
-
}) {
|
|
9
|
-
const a = K(), g = U();
|
|
10
|
-
e.keyboard = {
|
|
11
|
-
enabled: !1
|
|
12
|
-
}, p({
|
|
13
|
-
keyboard: {
|
|
14
|
-
enabled: !1,
|
|
15
|
-
onlyInViewport: !0,
|
|
16
|
-
pageUpDown: !0
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
function v(N) {
|
|
20
|
-
if (!e.enabled) return;
|
|
21
|
-
const {
|
|
22
|
-
rtlTranslate: d
|
|
23
|
-
} = e;
|
|
24
|
-
let t = N;
|
|
25
|
-
t.originalEvent && (t = t.originalEvent);
|
|
26
|
-
const o = t.keyCode || t.charCode, D = e.params.keyboard.pageUpDown, l = D && o === 33, i = D && o === 34, f = o === 37, s = o === 39, c = o === 38, u = o === 40;
|
|
27
|
-
if (!e.allowSlideNext && (e.isHorizontal() && s || e.isVertical() && u || i) || !e.allowSlidePrev && (e.isHorizontal() && f || e.isVertical() && c || l))
|
|
28
|
-
return !1;
|
|
29
|
-
if (!(t.shiftKey || t.altKey || t.ctrlKey || t.metaKey) && !(a.activeElement && (a.activeElement.isContentEditable || a.activeElement.nodeName && (a.activeElement.nodeName.toLowerCase() === "input" || a.activeElement.nodeName.toLowerCase() === "textarea")))) {
|
|
30
|
-
if (e.params.keyboard.onlyInViewport && (l || i || f || s || c || u)) {
|
|
31
|
-
let E = !1;
|
|
32
|
-
if (V(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && V(e.el, `.${e.params.slideActiveClass}`).length === 0)
|
|
33
|
-
return;
|
|
34
|
-
const b = e.el, C = b.clientWidth, H = b.clientHeight, x = g.innerWidth, A = g.innerHeight, n = W(b);
|
|
35
|
-
d && (n.left -= b.scrollLeft);
|
|
36
|
-
const P = [[n.left, n.top], [n.left + C, n.top], [n.left, n.top + H], [n.left + C, n.top + H]];
|
|
37
|
-
for (let m = 0; m < P.length; m += 1) {
|
|
38
|
-
const r = P[m];
|
|
39
|
-
if (r[0] >= 0 && r[0] <= x && r[1] >= 0 && r[1] <= A) {
|
|
40
|
-
if (r[0] === 0 && r[1] === 0) continue;
|
|
41
|
-
E = !0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (!E) return;
|
|
45
|
-
}
|
|
46
|
-
e.isHorizontal() ? ((l || i || f || s) && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), ((i || s) && !d || (l || f) && d) && e.slideNext(), ((l || f) && !d || (i || s) && d) && e.slidePrev()) : ((l || i || c || u) && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), (i || u) && e.slideNext(), (l || c) && e.slidePrev()), L("keyPress", o);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function k() {
|
|
50
|
-
e.keyboard.enabled || (a.addEventListener("keydown", v), e.keyboard.enabled = !0);
|
|
51
|
-
}
|
|
52
|
-
function h() {
|
|
53
|
-
e.keyboard.enabled && (a.removeEventListener("keydown", v), e.keyboard.enabled = !1);
|
|
54
|
-
}
|
|
55
|
-
y("init", () => {
|
|
56
|
-
e.params.keyboard.enabled && k();
|
|
57
|
-
}), y("destroy", () => {
|
|
58
|
-
e.keyboard.enabled && h();
|
|
59
|
-
}), Object.assign(e.keyboard, {
|
|
60
|
-
enable: k,
|
|
61
|
-
disable: h
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
O as default
|
|
66
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { c as k } from "../shared/create-element-if-not-defined.js";
|
|
2
|
-
import { m as s, s as y } from "../shared/utils.js";
|
|
3
|
-
const b = '<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';
|
|
4
|
-
function N({
|
|
5
|
-
swiper: a,
|
|
6
|
-
extendParams: x,
|
|
7
|
-
on: r,
|
|
8
|
-
emit: v
|
|
9
|
-
}) {
|
|
10
|
-
x({
|
|
11
|
-
navigation: {
|
|
12
|
-
nextEl: null,
|
|
13
|
-
prevEl: null,
|
|
14
|
-
addIcons: !0,
|
|
15
|
-
hideOnClick: !1,
|
|
16
|
-
disabledClass: "swiper-button-disabled",
|
|
17
|
-
hiddenClass: "swiper-button-hidden",
|
|
18
|
-
lockClass: "swiper-button-lock",
|
|
19
|
-
navigationDisabledClass: "swiper-navigation-disabled"
|
|
20
|
-
}
|
|
21
|
-
}), a.navigation = {
|
|
22
|
-
nextEl: null,
|
|
23
|
-
prevEl: null,
|
|
24
|
-
arrowSvg: b
|
|
25
|
-
};
|
|
26
|
-
function E(n) {
|
|
27
|
-
let t;
|
|
28
|
-
return n && typeof n == "string" && a.isElement && (t = a.el.querySelector(n) || a.hostEl.querySelector(n), t) ? t : (n && (typeof n == "string" && (t = [...document.querySelectorAll(n)]), a.params.uniqueNavElements && typeof n == "string" && t && t.length > 1 && a.el.querySelectorAll(n).length === 1 ? t = a.el.querySelector(n) : t && t.length === 1 && (t = t[0])), n && !t ? n : t);
|
|
29
|
-
}
|
|
30
|
-
function f(n, t) {
|
|
31
|
-
const e = a.params.navigation;
|
|
32
|
-
n = s(n), n.forEach((i) => {
|
|
33
|
-
i && (i.classList[t ? "add" : "remove"](...e.disabledClass.split(" ")), i.tagName === "BUTTON" && (i.disabled = t), a.params.watchOverflow && a.enabled && i.classList[a.isLocked ? "add" : "remove"](e.lockClass));
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function d() {
|
|
37
|
-
const {
|
|
38
|
-
nextEl: n,
|
|
39
|
-
prevEl: t
|
|
40
|
-
} = a.navigation;
|
|
41
|
-
if (a.params.loop) {
|
|
42
|
-
f(t, !1), f(n, !1);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
f(t, a.isBeginning && !a.params.rewind), f(n, a.isEnd && !a.params.rewind);
|
|
46
|
-
}
|
|
47
|
-
function h(n) {
|
|
48
|
-
n.preventDefault(), !(a.isBeginning && !a.params.loop && !a.params.rewind) && (a.slidePrev(), v("navigationPrev"));
|
|
49
|
-
}
|
|
50
|
-
function p(n) {
|
|
51
|
-
n.preventDefault(), !(a.isEnd && !a.params.loop && !a.params.rewind) && (a.slideNext(), v("navigationNext"));
|
|
52
|
-
}
|
|
53
|
-
function m() {
|
|
54
|
-
const n = a.params.navigation;
|
|
55
|
-
if (a.params.navigation = k(a, a.originalParams.navigation, a.params.navigation, {
|
|
56
|
-
nextEl: "swiper-button-next",
|
|
57
|
-
prevEl: "swiper-button-prev"
|
|
58
|
-
}), !(n.nextEl || n.prevEl)) return;
|
|
59
|
-
let t = E(n.nextEl), e = E(n.prevEl);
|
|
60
|
-
Object.assign(a.navigation, {
|
|
61
|
-
nextEl: t,
|
|
62
|
-
prevEl: e
|
|
63
|
-
}), t = s(t), e = s(e);
|
|
64
|
-
const i = (l, g) => {
|
|
65
|
-
if (l) {
|
|
66
|
-
if (n.addIcons && l.matches(".swiper-button-next,.swiper-button-prev") && !l.querySelector("svg")) {
|
|
67
|
-
const o = document.createElement("div");
|
|
68
|
-
y(o, b), l.appendChild(o.querySelector("svg")), o.remove();
|
|
69
|
-
}
|
|
70
|
-
l.addEventListener("click", g === "next" ? p : h);
|
|
71
|
-
}
|
|
72
|
-
!a.enabled && l && l.classList.add(...n.lockClass.split(" "));
|
|
73
|
-
};
|
|
74
|
-
t.forEach((l) => i(l, "next")), e.forEach((l) => i(l, "prev"));
|
|
75
|
-
}
|
|
76
|
-
function u() {
|
|
77
|
-
let {
|
|
78
|
-
nextEl: n,
|
|
79
|
-
prevEl: t
|
|
80
|
-
} = a.navigation;
|
|
81
|
-
n = s(n), t = s(t);
|
|
82
|
-
const e = (i, l) => {
|
|
83
|
-
i.removeEventListener("click", l === "next" ? p : h), i.classList.remove(...a.params.navigation.disabledClass.split(" "));
|
|
84
|
-
};
|
|
85
|
-
n.forEach((i) => e(i, "next")), t.forEach((i) => e(i, "prev"));
|
|
86
|
-
}
|
|
87
|
-
r("init", () => {
|
|
88
|
-
a.params.navigation.enabled === !1 ? C() : (m(), d());
|
|
89
|
-
}), r("toEdge fromEdge lock unlock", () => {
|
|
90
|
-
d();
|
|
91
|
-
}), r("destroy", () => {
|
|
92
|
-
u();
|
|
93
|
-
}), r("enable disable", () => {
|
|
94
|
-
let {
|
|
95
|
-
nextEl: n,
|
|
96
|
-
prevEl: t
|
|
97
|
-
} = a.navigation;
|
|
98
|
-
if (n = s(n), t = s(t), a.enabled) {
|
|
99
|
-
d();
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
[...n, ...t].filter((e) => !!e).forEach((e) => e.classList.add(a.params.navigation.lockClass));
|
|
103
|
-
}), r("click", (n, t) => {
|
|
104
|
-
let {
|
|
105
|
-
nextEl: e,
|
|
106
|
-
prevEl: i
|
|
107
|
-
} = a.navigation;
|
|
108
|
-
e = s(e), i = s(i);
|
|
109
|
-
const l = t.target;
|
|
110
|
-
let g = i.includes(l) || e.includes(l);
|
|
111
|
-
if (a.isElement && !g) {
|
|
112
|
-
const o = t.path || t.composedPath && t.composedPath();
|
|
113
|
-
o && (g = o.find((c) => e.includes(c) || i.includes(c)));
|
|
114
|
-
}
|
|
115
|
-
if (a.params.navigation.hideOnClick && !g) {
|
|
116
|
-
if (a.pagination && a.params.pagination && a.params.pagination.clickable && (a.pagination.el === l || a.pagination.el.contains(l))) return;
|
|
117
|
-
let o;
|
|
118
|
-
e.length ? o = e[0].classList.contains(a.params.navigation.hiddenClass) : i.length && (o = i[0].classList.contains(a.params.navigation.hiddenClass)), v(o === !0 ? "navigationShow" : "navigationHide"), [...e, ...i].filter((c) => !!c).forEach((c) => c.classList.toggle(a.params.navigation.hiddenClass));
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
const L = () => {
|
|
122
|
-
a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")), m(), d();
|
|
123
|
-
}, C = () => {
|
|
124
|
-
a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")), u();
|
|
125
|
-
};
|
|
126
|
-
Object.assign(a.navigation, {
|
|
127
|
-
enable: L,
|
|
128
|
-
disable: C,
|
|
129
|
-
update: d,
|
|
130
|
-
init: m,
|
|
131
|
-
destroy: u
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
export {
|
|
135
|
-
N as default
|
|
136
|
-
};
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { c as $ } from "../shared/classes-to-selector.js";
|
|
2
|
-
import { c as E } from "../shared/create-element-if-not-defined.js";
|
|
3
|
-
import { m, d as q, s as S, i as G, j as P } from "../shared/utils.js";
|
|
4
|
-
function N({
|
|
5
|
-
swiper: a,
|
|
6
|
-
extendParams: O,
|
|
7
|
-
on: u,
|
|
8
|
-
emit: v
|
|
9
|
-
}) {
|
|
10
|
-
const f = "swiper-pagination";
|
|
11
|
-
O({
|
|
12
|
-
pagination: {
|
|
13
|
-
el: null,
|
|
14
|
-
bulletElement: "span",
|
|
15
|
-
clickable: !1,
|
|
16
|
-
hideOnClick: !1,
|
|
17
|
-
renderBullet: null,
|
|
18
|
-
renderProgressbar: null,
|
|
19
|
-
renderFraction: null,
|
|
20
|
-
renderCustom: null,
|
|
21
|
-
progressbarOpposite: !1,
|
|
22
|
-
type: "bullets",
|
|
23
|
-
// 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
|
24
|
-
dynamicBullets: !1,
|
|
25
|
-
dynamicMainBullets: 1,
|
|
26
|
-
formatFractionCurrent: (t) => t,
|
|
27
|
-
formatFractionTotal: (t) => t,
|
|
28
|
-
bulletClass: `${f}-bullet`,
|
|
29
|
-
bulletActiveClass: `${f}-bullet-active`,
|
|
30
|
-
modifierClass: `${f}-`,
|
|
31
|
-
currentClass: `${f}-current`,
|
|
32
|
-
totalClass: `${f}-total`,
|
|
33
|
-
hiddenClass: `${f}-hidden`,
|
|
34
|
-
progressbarFillClass: `${f}-progressbar-fill`,
|
|
35
|
-
progressbarOppositeClass: `${f}-progressbar-opposite`,
|
|
36
|
-
clickableClass: `${f}-clickable`,
|
|
37
|
-
lockClass: `${f}-lock`,
|
|
38
|
-
horizontalClass: `${f}-horizontal`,
|
|
39
|
-
verticalClass: `${f}-vertical`,
|
|
40
|
-
paginationDisabledClass: `${f}-disabled`
|
|
41
|
-
}
|
|
42
|
-
}), a.pagination = {
|
|
43
|
-
el: null,
|
|
44
|
-
bullets: []
|
|
45
|
-
};
|
|
46
|
-
let b, p = 0;
|
|
47
|
-
function k() {
|
|
48
|
-
return !a.params.pagination.el || !a.pagination.el || Array.isArray(a.pagination.el) && a.pagination.el.length === 0;
|
|
49
|
-
}
|
|
50
|
-
function x(t, l) {
|
|
51
|
-
const {
|
|
52
|
-
bulletActiveClass: e
|
|
53
|
-
} = a.params.pagination;
|
|
54
|
-
t && (t = t[`${l === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${e}-${l}`), t = t[`${l === "prev" ? "previous" : "next"}ElementSibling`], t && t.classList.add(`${e}-${l}-${l}`)));
|
|
55
|
-
}
|
|
56
|
-
function H(t, l, e) {
|
|
57
|
-
if (t = t % e, l = l % e, l === t + 1)
|
|
58
|
-
return "next";
|
|
59
|
-
if (l === t - 1)
|
|
60
|
-
return "previous";
|
|
61
|
-
}
|
|
62
|
-
function D(t) {
|
|
63
|
-
const l = t.target.closest($(a.params.pagination.bulletClass));
|
|
64
|
-
if (!l)
|
|
65
|
-
return;
|
|
66
|
-
t.preventDefault();
|
|
67
|
-
const e = P(l) * a.params.slidesPerGroup;
|
|
68
|
-
if (a.params.loop) {
|
|
69
|
-
if (a.realIndex === e) return;
|
|
70
|
-
const n = H(a.realIndex, e, a.slides.length);
|
|
71
|
-
n === "next" ? a.slideNext() : n === "previous" ? a.slidePrev() : a.slideToLoop(e);
|
|
72
|
-
} else
|
|
73
|
-
a.slideTo(e);
|
|
74
|
-
}
|
|
75
|
-
function h() {
|
|
76
|
-
const t = a.rtl, l = a.params.pagination;
|
|
77
|
-
if (k()) return;
|
|
78
|
-
let e = a.pagination.el;
|
|
79
|
-
e = m(e);
|
|
80
|
-
let n, c;
|
|
81
|
-
const C = a.virtual && a.params.virtual.enabled ? a.virtual.slides.length : a.slides.length, z = a.params.loop ? Math.ceil(C / a.params.slidesPerGroup) : a.snapGrid.length;
|
|
82
|
-
if (a.params.loop ? (c = a.previousRealIndex || 0, n = a.params.slidesPerGroup > 1 ? Math.floor(a.realIndex / a.params.slidesPerGroup) : a.realIndex) : typeof a.snapIndex < "u" ? (n = a.snapIndex, c = a.previousSnapIndex) : (c = a.previousIndex || 0, n = a.activeIndex || 0), l.type === "bullets" && a.pagination.bullets && a.pagination.bullets.length > 0) {
|
|
83
|
-
const s = a.pagination.bullets;
|
|
84
|
-
let g, d, L;
|
|
85
|
-
if (l.dynamicBullets && (b = G(s[0], a.isHorizontal() ? "width" : "height"), e.forEach((i) => {
|
|
86
|
-
i.style[a.isHorizontal() ? "width" : "height"] = `${b * (l.dynamicMainBullets + 4)}px`;
|
|
87
|
-
}), l.dynamicMainBullets > 1 && c !== void 0 && (p += n - (c || 0), p > l.dynamicMainBullets - 1 ? p = l.dynamicMainBullets - 1 : p < 0 && (p = 0)), g = Math.max(n - p, 0), d = g + (Math.min(s.length, l.dynamicMainBullets) - 1), L = (d + g) / 2), s.forEach((i) => {
|
|
88
|
-
const o = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((r) => `${l.bulletActiveClass}${r}`)].map((r) => typeof r == "string" && r.includes(" ") ? r.split(" ") : r).flat();
|
|
89
|
-
i.classList.remove(...o);
|
|
90
|
-
}), e.length > 1)
|
|
91
|
-
s.forEach((i) => {
|
|
92
|
-
const o = P(i);
|
|
93
|
-
o === n ? i.classList.add(...l.bulletActiveClass.split(" ")) : a.isElement && i.setAttribute("part", "bullet"), l.dynamicBullets && (o >= g && o <= d && i.classList.add(...`${l.bulletActiveClass}-main`.split(" ")), o === g && x(i, "prev"), o === d && x(i, "next"));
|
|
94
|
-
});
|
|
95
|
-
else {
|
|
96
|
-
const i = s[n];
|
|
97
|
-
if (i && i.classList.add(...l.bulletActiveClass.split(" ")), a.isElement && s.forEach((o, r) => {
|
|
98
|
-
o.setAttribute("part", r === n ? "bullet-active" : "bullet");
|
|
99
|
-
}), l.dynamicBullets) {
|
|
100
|
-
const o = s[g], r = s[d];
|
|
101
|
-
for (let y = g; y <= d; y += 1)
|
|
102
|
-
s[y] && s[y].classList.add(...`${l.bulletActiveClass}-main`.split(" "));
|
|
103
|
-
x(o, "prev"), x(r, "next");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (l.dynamicBullets) {
|
|
107
|
-
const i = Math.min(s.length, l.dynamicMainBullets + 4), o = (b * i - b) / 2 - L * b, r = t ? "right" : "left";
|
|
108
|
-
s.forEach((y) => {
|
|
109
|
-
y.style[a.isHorizontal() ? r : "top"] = `${o}px`;
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
e.forEach((s, g) => {
|
|
114
|
-
if (l.type === "fraction" && (s.querySelectorAll($(l.currentClass)).forEach((d) => {
|
|
115
|
-
d.textContent = l.formatFractionCurrent(n + 1);
|
|
116
|
-
}), s.querySelectorAll($(l.totalClass)).forEach((d) => {
|
|
117
|
-
d.textContent = l.formatFractionTotal(z);
|
|
118
|
-
})), l.type === "progressbar") {
|
|
119
|
-
let d;
|
|
120
|
-
l.progressbarOpposite ? d = a.isHorizontal() ? "vertical" : "horizontal" : d = a.isHorizontal() ? "horizontal" : "vertical";
|
|
121
|
-
const L = (n + 1) / z;
|
|
122
|
-
let i = 1, o = 1;
|
|
123
|
-
d === "horizontal" ? i = L : o = L, s.querySelectorAll($(l.progressbarFillClass)).forEach((r) => {
|
|
124
|
-
r.style.transform = `translate3d(0,0,0) scaleX(${i}) scaleY(${o})`, r.style.transitionDuration = `${a.params.speed}ms`;
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
l.type === "custom" && l.renderCustom ? (S(s, l.renderCustom(a, n + 1, z)), g === 0 && v("paginationRender", s)) : (g === 0 && v("paginationRender", s), v("paginationUpdate", s)), a.params.watchOverflow && a.enabled && s.classList[a.isLocked ? "add" : "remove"](l.lockClass);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function B() {
|
|
131
|
-
const t = a.params.pagination;
|
|
132
|
-
if (k()) return;
|
|
133
|
-
const l = a.virtual && a.params.virtual.enabled ? a.virtual.slides.length : a.grid && a.params.grid.rows > 1 ? a.slides.length / Math.ceil(a.params.grid.rows) : a.slides.length;
|
|
134
|
-
let e = a.pagination.el;
|
|
135
|
-
e = m(e);
|
|
136
|
-
let n = "";
|
|
137
|
-
if (t.type === "bullets") {
|
|
138
|
-
let c = a.params.loop ? Math.ceil(l / a.params.slidesPerGroup) : a.snapGrid.length;
|
|
139
|
-
a.params.freeMode && a.params.freeMode.enabled && c > l && (c = l);
|
|
140
|
-
for (let C = 0; C < c; C += 1)
|
|
141
|
-
t.renderBullet ? n += t.renderBullet.call(a, C, t.bulletClass) : n += `<${t.bulletElement} ${a.isElement ? 'part="bullet"' : ""} class="${t.bulletClass}"></${t.bulletElement}>`;
|
|
142
|
-
}
|
|
143
|
-
t.type === "fraction" && (t.renderFraction ? n = t.renderFraction.call(a, t.currentClass, t.totalClass) : n = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? n = t.renderProgressbar.call(a, t.progressbarFillClass) : n = `<span class="${t.progressbarFillClass}"></span>`), a.pagination.bullets = [], e.forEach((c) => {
|
|
144
|
-
t.type !== "custom" && S(c, n || ""), t.type === "bullets" && a.pagination.bullets.push(...c.querySelectorAll($(t.bulletClass)));
|
|
145
|
-
}), t.type !== "custom" && v("paginationRender", e[0]);
|
|
146
|
-
}
|
|
147
|
-
function A() {
|
|
148
|
-
a.params.pagination = E(a, a.originalParams.pagination, a.params.pagination, {
|
|
149
|
-
el: "swiper-pagination"
|
|
150
|
-
});
|
|
151
|
-
const t = a.params.pagination;
|
|
152
|
-
if (!t.el) return;
|
|
153
|
-
let l;
|
|
154
|
-
typeof t.el == "string" && a.isElement && (l = a.el.querySelector(t.el)), !l && typeof t.el == "string" && (l = [...document.querySelectorAll(t.el)]), l || (l = t.el), !(!l || l.length === 0) && (a.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(l) && l.length > 1 && (l = [...a.el.querySelectorAll(t.el)], l.length > 1 && (l = l.find((e) => q(e, ".swiper")[0] === a.el))), Array.isArray(l) && l.length === 1 && (l = l[0]), Object.assign(a.pagination, {
|
|
155
|
-
el: l
|
|
156
|
-
}), l = m(l), l.forEach((e) => {
|
|
157
|
-
t.type === "bullets" && t.clickable && e.classList.add(...(t.clickableClass || "").split(" ")), e.classList.add(t.modifierClass + t.type), e.classList.add(a.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (e.classList.add(`${t.modifierClass}${t.type}-dynamic`), p = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && e.classList.add(t.progressbarOppositeClass), t.clickable && e.addEventListener("click", D), a.enabled || e.classList.add(t.lockClass);
|
|
158
|
-
}));
|
|
159
|
-
}
|
|
160
|
-
function M() {
|
|
161
|
-
const t = a.params.pagination;
|
|
162
|
-
if (k()) return;
|
|
163
|
-
let l = a.pagination.el;
|
|
164
|
-
l && (l = m(l), l.forEach((e) => {
|
|
165
|
-
e.classList.remove(t.hiddenClass), e.classList.remove(t.modifierClass + t.type), e.classList.remove(a.isHorizontal() ? t.horizontalClass : t.verticalClass), t.clickable && (e.classList.remove(...(t.clickableClass || "").split(" ")), e.removeEventListener("click", D));
|
|
166
|
-
})), a.pagination.bullets && a.pagination.bullets.forEach((e) => e.classList.remove(...t.bulletActiveClass.split(" ")));
|
|
167
|
-
}
|
|
168
|
-
u("changeDirection", () => {
|
|
169
|
-
if (!a.pagination || !a.pagination.el) return;
|
|
170
|
-
const t = a.params.pagination;
|
|
171
|
-
let {
|
|
172
|
-
el: l
|
|
173
|
-
} = a.pagination;
|
|
174
|
-
l = m(l), l.forEach((e) => {
|
|
175
|
-
e.classList.remove(t.horizontalClass, t.verticalClass), e.classList.add(a.isHorizontal() ? t.horizontalClass : t.verticalClass);
|
|
176
|
-
});
|
|
177
|
-
}), u("init", () => {
|
|
178
|
-
a.params.pagination.enabled === !1 ? I() : (A(), B(), h());
|
|
179
|
-
}), u("activeIndexChange", () => {
|
|
180
|
-
typeof a.snapIndex > "u" && h();
|
|
181
|
-
}), u("snapIndexChange", () => {
|
|
182
|
-
h();
|
|
183
|
-
}), u("snapGridLengthChange", () => {
|
|
184
|
-
B(), h();
|
|
185
|
-
}), u("destroy", () => {
|
|
186
|
-
M();
|
|
187
|
-
}), u("enable disable", () => {
|
|
188
|
-
let {
|
|
189
|
-
el: t
|
|
190
|
-
} = a.pagination;
|
|
191
|
-
t && (t = m(t), t.forEach((l) => l.classList[a.enabled ? "remove" : "add"](a.params.pagination.lockClass)));
|
|
192
|
-
}), u("lock unlock", () => {
|
|
193
|
-
h();
|
|
194
|
-
}), u("click", (t, l) => {
|
|
195
|
-
const e = l.target, n = m(a.pagination.el);
|
|
196
|
-
if (a.params.pagination.el && a.params.pagination.hideOnClick && n && n.length > 0 && !e.classList.contains(a.params.pagination.bulletClass)) {
|
|
197
|
-
if (a.navigation && (a.navigation.nextEl && e === a.navigation.nextEl || a.navigation.prevEl && e === a.navigation.prevEl)) return;
|
|
198
|
-
const c = n[0].classList.contains(a.params.pagination.hiddenClass);
|
|
199
|
-
v(c === !0 ? "paginationShow" : "paginationHide"), n.forEach((C) => C.classList.toggle(a.params.pagination.hiddenClass));
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
const F = () => {
|
|
203
|
-
a.el.classList.remove(a.params.pagination.paginationDisabledClass);
|
|
204
|
-
let {
|
|
205
|
-
el: t
|
|
206
|
-
} = a.pagination;
|
|
207
|
-
t && (t = m(t), t.forEach((l) => l.classList.remove(a.params.pagination.paginationDisabledClass))), A(), B(), h();
|
|
208
|
-
}, I = () => {
|
|
209
|
-
a.el.classList.add(a.params.pagination.paginationDisabledClass);
|
|
210
|
-
let {
|
|
211
|
-
el: t
|
|
212
|
-
} = a.pagination;
|
|
213
|
-
t && (t = m(t), t.forEach((l) => l.classList.add(a.params.pagination.paginationDisabledClass))), M();
|
|
214
|
-
};
|
|
215
|
-
Object.assign(a.pagination, {
|
|
216
|
-
enable: F,
|
|
217
|
-
disable: I,
|
|
218
|
-
render: B,
|
|
219
|
-
update: h,
|
|
220
|
-
init: A,
|
|
221
|
-
destroy: M
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
export {
|
|
225
|
-
N as default
|
|
226
|
-
};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { g as T } from "../shared/ssr-window.esm.js";
|
|
2
|
-
import { p as I, e as g } from "../shared/utils.js";
|
|
3
|
-
function P({
|
|
4
|
-
swiper: e,
|
|
5
|
-
extendParams: p,
|
|
6
|
-
on: m
|
|
7
|
-
}) {
|
|
8
|
-
p({
|
|
9
|
-
thumbs: {
|
|
10
|
-
swiper: null,
|
|
11
|
-
multipleActiveThumbs: !0,
|
|
12
|
-
autoScrollOffset: 0,
|
|
13
|
-
slideThumbActiveClass: "swiper-slide-thumb-active",
|
|
14
|
-
thumbsContainerClass: "swiper-thumbs"
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
let f = !1, h = !1;
|
|
18
|
-
e.thumbs = {
|
|
19
|
-
swiper: null
|
|
20
|
-
};
|
|
21
|
-
function x() {
|
|
22
|
-
const t = e.thumbs.swiper;
|
|
23
|
-
if (!t || t.destroyed) return;
|
|
24
|
-
const s = t.clickedIndex, r = t.clickedSlide;
|
|
25
|
-
if (r && r.classList.contains(e.params.thumbs.slideThumbActiveClass) || typeof s > "u" || s === null) return;
|
|
26
|
-
let a;
|
|
27
|
-
t.params.loop ? a = parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"), 10) : a = s, e.params.loop ? e.slideToLoop(a) : e.slideTo(a);
|
|
28
|
-
}
|
|
29
|
-
function c() {
|
|
30
|
-
const {
|
|
31
|
-
thumbs: t
|
|
32
|
-
} = e.params;
|
|
33
|
-
if (f) return !1;
|
|
34
|
-
f = !0;
|
|
35
|
-
const s = e.constructor;
|
|
36
|
-
if (t.swiper instanceof s) {
|
|
37
|
-
if (t.swiper.destroyed)
|
|
38
|
-
return f = !1, !1;
|
|
39
|
-
e.thumbs.swiper = t.swiper, Object.assign(e.thumbs.swiper.originalParams, {
|
|
40
|
-
watchSlidesProgress: !0,
|
|
41
|
-
slideToClickedSlide: !1
|
|
42
|
-
}), Object.assign(e.thumbs.swiper.params, {
|
|
43
|
-
watchSlidesProgress: !0,
|
|
44
|
-
slideToClickedSlide: !1
|
|
45
|
-
}), e.thumbs.swiper.update();
|
|
46
|
-
} else if (I(t.swiper)) {
|
|
47
|
-
const r = Object.assign({}, t.swiper);
|
|
48
|
-
Object.assign(r, {
|
|
49
|
-
watchSlidesProgress: !0,
|
|
50
|
-
slideToClickedSlide: !1
|
|
51
|
-
}), e.thumbs.swiper = new s(r), h = !0;
|
|
52
|
-
}
|
|
53
|
-
return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass), e.thumbs.swiper.on("tap", x), !0;
|
|
54
|
-
}
|
|
55
|
-
function o(t) {
|
|
56
|
-
const s = e.thumbs.swiper;
|
|
57
|
-
if (!s || s.destroyed) return;
|
|
58
|
-
const r = s.params.slidesPerView === "auto" ? s.slidesPerViewDynamic() : s.params.slidesPerView;
|
|
59
|
-
let a = 1;
|
|
60
|
-
const n = e.params.thumbs.slideThumbActiveClass;
|
|
61
|
-
if (e.params.slidesPerView > 1 && !e.params.centeredSlides && (a = e.params.slidesPerView), e.params.thumbs.multipleActiveThumbs || (a = 1), a = Math.floor(a), s.slides.forEach((i) => i.classList.remove(n)), s.params.loop || s.params.virtual && s.params.virtual.enabled)
|
|
62
|
-
for (let i = 0; i < a; i += 1)
|
|
63
|
-
g(s.slidesEl, `[data-swiper-slide-index="${e.realIndex + i}"]`).forEach((l) => {
|
|
64
|
-
l.classList.add(n);
|
|
65
|
-
});
|
|
66
|
-
else
|
|
67
|
-
for (let i = 0; i < a; i += 1)
|
|
68
|
-
s.slides[e.realIndex + i] && s.slides[e.realIndex + i].classList.add(n);
|
|
69
|
-
const d = e.params.thumbs.autoScrollOffset, u = d && !s.params.loop;
|
|
70
|
-
if (e.realIndex !== s.realIndex || u) {
|
|
71
|
-
const i = s.activeIndex;
|
|
72
|
-
let l, b;
|
|
73
|
-
if (s.params.loop) {
|
|
74
|
-
const v = s.slides.find((S) => S.getAttribute("data-swiper-slide-index") === `${e.realIndex}`);
|
|
75
|
-
l = s.slides.indexOf(v), b = e.activeIndex > e.previousIndex ? "next" : "prev";
|
|
76
|
-
} else
|
|
77
|
-
l = e.realIndex, b = l > e.previousIndex ? "next" : "prev";
|
|
78
|
-
u && (l += b === "next" ? d : -1 * d), s.visibleSlidesIndexes && s.visibleSlidesIndexes.indexOf(l) < 0 && (s.params.centeredSlides ? l > i ? l = l - Math.floor(r / 2) + 1 : l = l + Math.floor(r / 2) - 1 : l > i && s.params.slidesPerGroup, s.slideTo(l, t ? 0 : void 0));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
m("beforeInit", () => {
|
|
82
|
-
const {
|
|
83
|
-
thumbs: t
|
|
84
|
-
} = e.params;
|
|
85
|
-
if (!(!t || !t.swiper))
|
|
86
|
-
if (typeof t.swiper == "string" || t.swiper instanceof HTMLElement) {
|
|
87
|
-
const s = T(), r = () => {
|
|
88
|
-
const n = typeof t.swiper == "string" ? s.querySelector(t.swiper) : t.swiper;
|
|
89
|
-
if (n && n.swiper)
|
|
90
|
-
t.swiper = n.swiper, c(), o(!0);
|
|
91
|
-
else if (n) {
|
|
92
|
-
const d = `${e.params.eventsPrefix}init`, u = (i) => {
|
|
93
|
-
t.swiper = i.detail[0], n.removeEventListener(d, u), c(), o(!0), t.swiper.update(), e.update();
|
|
94
|
-
};
|
|
95
|
-
n.addEventListener(d, u);
|
|
96
|
-
}
|
|
97
|
-
return n;
|
|
98
|
-
}, a = () => {
|
|
99
|
-
if (e.destroyed) return;
|
|
100
|
-
r() || requestAnimationFrame(a);
|
|
101
|
-
};
|
|
102
|
-
requestAnimationFrame(a);
|
|
103
|
-
} else
|
|
104
|
-
c(), o(!0);
|
|
105
|
-
}), m("slideChange update resize observerUpdate", () => {
|
|
106
|
-
o();
|
|
107
|
-
}), m("setTransition", (t, s) => {
|
|
108
|
-
const r = e.thumbs.swiper;
|
|
109
|
-
!r || r.destroyed || r.setTransition(s);
|
|
110
|
-
}), m("beforeDestroy", () => {
|
|
111
|
-
const t = e.thumbs.swiper;
|
|
112
|
-
!t || t.destroyed || h && t.destroy();
|
|
113
|
-
}), Object.assign(e.thumbs, {
|
|
114
|
-
init: c,
|
|
115
|
-
update: o
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
export {
|
|
119
|
-
P as default
|
|
120
|
-
};
|