@slidejs/runner-swiper 0.1.2 → 0.1.3

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/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  import { Swiper as F } from "swiper";
2
- import { parseSlideDSL as K, compile as X } from "@slidejs/dsl";
3
- import { SlideRunner as Y } from "@slidejs/runner";
4
- function z(s) {
2
+ import { parseSlideDSL as U, compile as V } from "@slidejs/dsl";
3
+ import { SlideRunner as K } from "@slidejs/runner";
4
+ function T(s) {
5
5
  return s !== null && typeof s == "object" && "constructor" in s && s.constructor === Object;
6
6
  }
7
- function I(s, e) {
7
+ function G(s, e) {
8
8
  s === void 0 && (s = {}), e === void 0 && (e = {});
9
- const a = ["__proto__", "constructor", "prototype"];
10
- Object.keys(e).filter((n) => a.indexOf(n) < 0).forEach((n) => {
11
- typeof s[n] > "u" ? s[n] = e[n] : z(e[n]) && z(s[n]) && Object.keys(e[n]).length > 0 && I(s[n], e[n]);
9
+ const n = ["__proto__", "constructor", "prototype"];
10
+ Object.keys(e).filter((i) => n.indexOf(i) < 0).forEach((i) => {
11
+ typeof s[i] > "u" ? s[i] = e[i] : T(e[i]) && T(s[i]) && Object.keys(e[i]).length > 0 && G(s[i], e[i]);
12
12
  });
13
13
  }
14
- const V = {
14
+ const $ = {
15
15
  body: {},
16
16
  addEventListener() {
17
17
  },
@@ -66,12 +66,12 @@ const V = {
66
66
  search: ""
67
67
  }
68
68
  };
69
- function R() {
69
+ function W() {
70
70
  const s = typeof document < "u" ? document : {};
71
- return I(s, V), s;
71
+ return G(s, $), s;
72
72
  }
73
73
  const J = {
74
- document: V,
74
+ document: $,
75
75
  navigator: {
76
76
  userAgent: ""
77
77
  },
@@ -128,135 +128,135 @@ const J = {
128
128
  typeof setTimeout > "u" || clearTimeout(s);
129
129
  }
130
130
  };
131
- function O() {
131
+ function H() {
132
132
  const s = typeof window < "u" ? window : {};
133
- return I(s, J), s;
133
+ return G(s, J), s;
134
134
  }
135
- function Q(s) {
135
+ function X(s) {
136
136
  return s === void 0 && (s = ""), s.trim().split(" ").filter((e) => !!e.trim());
137
137
  }
138
- function Z(s, e) {
138
+ function _(s, e) {
139
139
  e === void 0 && (e = "");
140
- const a = O(), n = [...s.children];
141
- return a.HTMLSlotElement && s instanceof HTMLSlotElement && n.push(...s.assignedElements()), e ? n.filter((o) => o.matches(e)) : n;
140
+ const n = H(), i = [...s.children];
141
+ return n.HTMLSlotElement && s instanceof HTMLSlotElement && i.push(...s.assignedElements()), e ? i.filter((l) => l.matches(e)) : i;
142
142
  }
143
143
  function ee(s, e) {
144
144
  e === void 0 && (e = []);
145
- const a = document.createElement(s);
146
- return a.classList.add(...Array.isArray(e) ? e : Q(e)), a;
145
+ const n = document.createElement(s);
146
+ return n.classList.add(...Array.isArray(e) ? e : X(e)), n;
147
147
  }
148
148
  function te(s) {
149
- const e = O(), a = R(), n = s.getBoundingClientRect(), o = a.body, r = s.clientTop || o.clientTop || 0, g = s.clientLeft || o.clientLeft || 0, b = s === e ? e.scrollY : s.scrollTop, m = s === e ? e.scrollX : s.scrollLeft;
149
+ const e = H(), n = W(), i = s.getBoundingClientRect(), l = n.body, a = s.clientTop || l.clientTop || 0, m = s.clientLeft || l.clientLeft || 0, w = s === e ? e.scrollY : s.scrollTop, f = s === e ? e.scrollX : s.scrollLeft;
150
150
  return {
151
- top: n.top + b - r,
152
- left: n.left + m - g
151
+ top: i.top + w - a,
152
+ left: i.left + f - m
153
153
  };
154
154
  }
155
- function W(s) {
156
- let e = s, a;
155
+ function I(s) {
156
+ let e = s, n;
157
157
  if (e) {
158
- for (a = 0; (e = e.previousSibling) !== null; )
159
- e.nodeType === 1 && (a += 1);
160
- return a;
158
+ for (n = 0; (e = e.previousSibling) !== null; )
159
+ e.nodeType === 1 && (n += 1);
160
+ return n;
161
161
  }
162
162
  }
163
163
  function N(s, e) {
164
- const a = [];
165
- let n = s.parentElement;
166
- for (; n; )
167
- e ? n.matches(e) && a.push(n) : a.push(n), n = n.parentElement;
168
- return a;
164
+ const n = [];
165
+ let i = s.parentElement;
166
+ for (; i; )
167
+ e ? i.matches(e) && n.push(i) : n.push(i), i = i.parentElement;
168
+ return n;
169
169
  }
170
- function ne(s, e, a) {
171
- const n = O();
172
- return s[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(n.getComputedStyle(s, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(n.getComputedStyle(s, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom"));
170
+ function ie(s, e, n) {
171
+ const i = H();
172
+ return s[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(i.getComputedStyle(s, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(i.getComputedStyle(s, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom"));
173
173
  }
174
- function L(s) {
174
+ function x(s) {
175
175
  return (Array.isArray(s) ? s : [s]).filter((e) => !!e);
176
176
  }
177
- function q(s, e) {
177
+ function O(s, e) {
178
178
  e === void 0 && (e = ""), typeof trustedTypes < "u" ? s.innerHTML = trustedTypes.createPolicy("html", {
179
- createHTML: (a) => a
179
+ createHTML: (n) => n
180
180
  }).createHTML(e) : s.innerHTML = e;
181
181
  }
182
- function j(s) {
182
+ function Q(s) {
183
183
  let {
184
184
  swiper: e,
185
- extendParams: a,
186
- on: n,
187
- emit: o
185
+ extendParams: n,
186
+ on: i,
187
+ emit: l
188
188
  } = s;
189
- const r = R(), g = O();
189
+ const a = W(), m = H();
190
190
  e.keyboard = {
191
191
  enabled: !1
192
- }, a({
192
+ }, n({
193
193
  keyboard: {
194
194
  enabled: !1,
195
195
  onlyInViewport: !0,
196
196
  pageUpDown: !0
197
197
  }
198
198
  });
199
- function b(H) {
199
+ function w(M) {
200
200
  if (!e.enabled) return;
201
201
  const {
202
- rtlTranslate: $
202
+ rtlTranslate: v
203
203
  } = e;
204
- let h = H;
205
- h.originalEvent && (h = h.originalEvent);
206
- const x = h.keyCode || h.charCode, d = e.params.keyboard.pageUpDown, c = d && x === 33, f = d && x === 34, u = x === 37, t = x === 39, i = x === 38, l = x === 40;
207
- if (!e.allowSlideNext && (e.isHorizontal() && t || e.isVertical() && l || f) || !e.allowSlidePrev && (e.isHorizontal() && u || e.isVertical() && i || c))
204
+ let A = M;
205
+ A.originalEvent && (A = A.originalEvent);
206
+ const B = A.keyCode || A.charCode, d = e.params.keyboard.pageUpDown, p = d && B === 33, u = d && B === 34, g = B === 37, t = B === 39, r = B === 38, o = B === 40;
207
+ if (!e.allowSlideNext && (e.isHorizontal() && t || e.isVertical() && o || u) || !e.allowSlidePrev && (e.isHorizontal() && g || e.isVertical() && r || p))
208
208
  return !1;
209
- if (!(h.shiftKey || h.altKey || h.ctrlKey || h.metaKey) && !(r.activeElement && (r.activeElement.isContentEditable || r.activeElement.nodeName && (r.activeElement.nodeName.toLowerCase() === "input" || r.activeElement.nodeName.toLowerCase() === "textarea")))) {
210
- if (e.params.keyboard.onlyInViewport && (c || f || u || t || i || l)) {
211
- let p = !1;
209
+ if (!(A.shiftKey || A.altKey || A.ctrlKey || A.metaKey) && !(a.activeElement && (a.activeElement.isContentEditable || a.activeElement.nodeName && (a.activeElement.nodeName.toLowerCase() === "input" || a.activeElement.nodeName.toLowerCase() === "textarea")))) {
210
+ if (e.params.keyboard.onlyInViewport && (p || u || g || t || r || o)) {
211
+ let c = !1;
212
212
  if (N(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && N(e.el, `.${e.params.slideActiveClass}`).length === 0)
213
213
  return;
214
- const E = e.el, T = E.clientWidth, B = E.clientHeight, w = g.innerWidth, A = g.innerHeight, v = te(E);
215
- $ && (v.left -= E.scrollLeft);
216
- const D = [[v.left, v.top], [v.left + T, v.top], [v.left, v.top + B], [v.left + T, v.top + B]];
214
+ const E = e.el, z = E.clientWidth, Y = E.clientHeight, b = m.innerWidth, S = m.innerHeight, h = te(E);
215
+ v && (h.left -= E.scrollLeft);
216
+ const D = [[h.left, h.top], [h.left + z, h.top], [h.left, h.top + Y], [h.left + z, h.top + Y]];
217
217
  for (let C = 0; C < D.length; C += 1) {
218
218
  const y = D[C];
219
- if (y[0] >= 0 && y[0] <= w && y[1] >= 0 && y[1] <= A) {
219
+ if (y[0] >= 0 && y[0] <= b && y[1] >= 0 && y[1] <= S) {
220
220
  if (y[0] === 0 && y[1] === 0) continue;
221
- p = !0;
221
+ c = !0;
222
222
  }
223
223
  }
224
- if (!p) return;
224
+ if (!c) return;
225
225
  }
226
- e.isHorizontal() ? ((c || f || u || t) && (h.preventDefault ? h.preventDefault() : h.returnValue = !1), ((f || t) && !$ || (c || u) && $) && e.slideNext(), ((c || u) && !$ || (f || t) && $) && e.slidePrev()) : ((c || f || i || l) && (h.preventDefault ? h.preventDefault() : h.returnValue = !1), (f || l) && e.slideNext(), (c || i) && e.slidePrev()), o("keyPress", x);
226
+ e.isHorizontal() ? ((p || u || g || t) && (A.preventDefault ? A.preventDefault() : A.returnValue = !1), ((u || t) && !v || (p || g) && v) && e.slideNext(), ((p || g) && !v || (u || t) && v) && e.slidePrev()) : ((p || u || r || o) && (A.preventDefault ? A.preventDefault() : A.returnValue = !1), (u || o) && e.slideNext(), (p || r) && e.slidePrev()), l("keyPress", B);
227
227
  }
228
228
  }
229
- function m() {
230
- e.keyboard.enabled || (r.addEventListener("keydown", b), e.keyboard.enabled = !0);
229
+ function f() {
230
+ e.keyboard.enabled || (a.addEventListener("keydown", w), e.keyboard.enabled = !0);
231
231
  }
232
232
  function k() {
233
- e.keyboard.enabled && (r.removeEventListener("keydown", b), e.keyboard.enabled = !1);
233
+ e.keyboard.enabled && (a.removeEventListener("keydown", w), e.keyboard.enabled = !1);
234
234
  }
235
- n("init", () => {
236
- e.params.keyboard.enabled && m();
237
- }), n("destroy", () => {
235
+ i("init", () => {
236
+ e.params.keyboard.enabled && f();
237
+ }), i("destroy", () => {
238
238
  e.keyboard.enabled && k();
239
239
  }), Object.assign(e.keyboard, {
240
- enable: m,
240
+ enable: f,
241
241
  disable: k
242
242
  });
243
243
  }
244
- function G(s, e, a, n) {
245
- return s.params.createElements && Object.keys(n).forEach((o) => {
246
- if (!a[o] && a.auto === !0) {
247
- let r = Z(s.el, `.${n[o]}`)[0];
248
- r || (r = ee("div", n[o]), r.className = n[o], s.el.append(r)), a[o] = r, e[o] = r;
244
+ function q(s, e, n, i) {
245
+ return s.params.createElements && Object.keys(i).forEach((l) => {
246
+ if (!n[l] && n.auto === !0) {
247
+ let a = _(s.el, `.${i[l]}`)[0];
248
+ a || (a = ee("div", i[l]), a.className = i[l], s.el.append(a)), n[l] = a, e[l] = a;
249
249
  }
250
- }), a;
250
+ }), n;
251
251
  }
252
- function U(s) {
252
+ function R(s) {
253
253
  let {
254
254
  swiper: e,
255
- extendParams: a,
256
- on: n,
257
- emit: o
255
+ extendParams: n,
256
+ on: i,
257
+ emit: l
258
258
  } = s;
259
- a({
259
+ n({
260
260
  navigation: {
261
261
  nextEl: null,
262
262
  prevEl: null,
@@ -270,119 +270,119 @@ function U(s) {
270
270
  nextEl: null,
271
271
  prevEl: null
272
272
  };
273
- function r(d) {
274
- let c;
275
- return d && typeof d == "string" && e.isElement && (c = e.el.querySelector(d) || e.hostEl.querySelector(d), c) ? c : (d && (typeof d == "string" && (c = [...document.querySelectorAll(d)]), e.params.uniqueNavElements && typeof d == "string" && c && c.length > 1 && e.el.querySelectorAll(d).length === 1 ? c = e.el.querySelector(d) : c && c.length === 1 && (c = c[0])), d && !c ? d : c);
276
- }
277
- function g(d, c) {
278
- const f = e.params.navigation;
279
- d = L(d), d.forEach((u) => {
280
- u && (u.classList[c ? "add" : "remove"](...f.disabledClass.split(" ")), u.tagName === "BUTTON" && (u.disabled = c), e.params.watchOverflow && e.enabled && u.classList[e.isLocked ? "add" : "remove"](f.lockClass));
273
+ function a(d) {
274
+ let p;
275
+ return d && typeof d == "string" && e.isElement && (p = e.el.querySelector(d) || e.hostEl.querySelector(d), p) ? p : (d && (typeof d == "string" && (p = [...document.querySelectorAll(d)]), e.params.uniqueNavElements && typeof d == "string" && p && p.length > 1 && e.el.querySelectorAll(d).length === 1 ? p = e.el.querySelector(d) : p && p.length === 1 && (p = p[0])), d && !p ? d : p);
276
+ }
277
+ function m(d, p) {
278
+ const u = e.params.navigation;
279
+ d = x(d), d.forEach((g) => {
280
+ g && (g.classList[p ? "add" : "remove"](...u.disabledClass.split(" ")), g.tagName === "BUTTON" && (g.disabled = p), e.params.watchOverflow && e.enabled && g.classList[e.isLocked ? "add" : "remove"](u.lockClass));
281
281
  });
282
282
  }
283
- function b() {
283
+ function w() {
284
284
  const {
285
285
  nextEl: d,
286
- prevEl: c
286
+ prevEl: p
287
287
  } = e.navigation;
288
288
  if (e.params.loop) {
289
- g(c, !1), g(d, !1);
289
+ m(p, !1), m(d, !1);
290
290
  return;
291
291
  }
292
- g(c, e.isBeginning && !e.params.rewind), g(d, e.isEnd && !e.params.rewind);
292
+ m(p, e.isBeginning && !e.params.rewind), m(d, e.isEnd && !e.params.rewind);
293
293
  }
294
- function m(d) {
295
- d.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), o("navigationPrev"));
294
+ function f(d) {
295
+ d.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), l("navigationPrev"));
296
296
  }
297
297
  function k(d) {
298
- d.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), o("navigationNext"));
298
+ d.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), l("navigationNext"));
299
299
  }
300
- function H() {
300
+ function M() {
301
301
  const d = e.params.navigation;
302
- if (e.params.navigation = G(e, e.originalParams.navigation, e.params.navigation, {
302
+ if (e.params.navigation = q(e, e.originalParams.navigation, e.params.navigation, {
303
303
  nextEl: "swiper-button-next",
304
304
  prevEl: "swiper-button-prev"
305
305
  }), !(d.nextEl || d.prevEl)) return;
306
- let c = r(d.nextEl), f = r(d.prevEl);
306
+ let p = a(d.nextEl), u = a(d.prevEl);
307
307
  Object.assign(e.navigation, {
308
- nextEl: c,
309
- prevEl: f
310
- }), c = L(c), f = L(f);
311
- const u = (t, i) => {
312
- t && t.addEventListener("click", i === "next" ? k : m), !e.enabled && t && t.classList.add(...d.lockClass.split(" "));
308
+ nextEl: p,
309
+ prevEl: u
310
+ }), p = x(p), u = x(u);
311
+ const g = (t, r) => {
312
+ t && t.addEventListener("click", r === "next" ? k : f), !e.enabled && t && t.classList.add(...d.lockClass.split(" "));
313
313
  };
314
- c.forEach((t) => u(t, "next")), f.forEach((t) => u(t, "prev"));
314
+ p.forEach((t) => g(t, "next")), u.forEach((t) => g(t, "prev"));
315
315
  }
316
- function $() {
316
+ function v() {
317
317
  let {
318
318
  nextEl: d,
319
- prevEl: c
319
+ prevEl: p
320
320
  } = e.navigation;
321
- d = L(d), c = L(c);
322
- const f = (u, t) => {
323
- u.removeEventListener("click", t === "next" ? k : m), u.classList.remove(...e.params.navigation.disabledClass.split(" "));
321
+ d = x(d), p = x(p);
322
+ const u = (g, t) => {
323
+ g.removeEventListener("click", t === "next" ? k : f), g.classList.remove(...e.params.navigation.disabledClass.split(" "));
324
324
  };
325
- d.forEach((u) => f(u, "next")), c.forEach((u) => f(u, "prev"));
326
- }
327
- n("init", () => {
328
- e.params.navigation.enabled === !1 ? x() : (H(), b());
329
- }), n("toEdge fromEdge lock unlock", () => {
330
- b();
331
- }), n("destroy", () => {
332
- $();
333
- }), n("enable disable", () => {
325
+ d.forEach((g) => u(g, "next")), p.forEach((g) => u(g, "prev"));
326
+ }
327
+ i("init", () => {
328
+ e.params.navigation.enabled === !1 ? B() : (M(), w());
329
+ }), i("toEdge fromEdge lock unlock", () => {
330
+ w();
331
+ }), i("destroy", () => {
332
+ v();
333
+ }), i("enable disable", () => {
334
334
  let {
335
335
  nextEl: d,
336
- prevEl: c
336
+ prevEl: p
337
337
  } = e.navigation;
338
- if (d = L(d), c = L(c), e.enabled) {
339
- b();
338
+ if (d = x(d), p = x(p), e.enabled) {
339
+ w();
340
340
  return;
341
341
  }
342
- [...d, ...c].filter((f) => !!f).forEach((f) => f.classList.add(e.params.navigation.lockClass));
343
- }), n("click", (d, c) => {
342
+ [...d, ...p].filter((u) => !!u).forEach((u) => u.classList.add(e.params.navigation.lockClass));
343
+ }), i("click", (d, p) => {
344
344
  let {
345
- nextEl: f,
346
- prevEl: u
345
+ nextEl: u,
346
+ prevEl: g
347
347
  } = e.navigation;
348
- f = L(f), u = L(u);
349
- const t = c.target;
350
- let i = u.includes(t) || f.includes(t);
351
- if (e.isElement && !i) {
352
- const l = c.path || c.composedPath && c.composedPath();
353
- l && (i = l.find((p) => f.includes(p) || u.includes(p)));
348
+ u = x(u), g = x(g);
349
+ const t = p.target;
350
+ let r = g.includes(t) || u.includes(t);
351
+ if (e.isElement && !r) {
352
+ const o = p.path || p.composedPath && p.composedPath();
353
+ o && (r = o.find((c) => u.includes(c) || g.includes(c)));
354
354
  }
355
- if (e.params.navigation.hideOnClick && !i) {
355
+ if (e.params.navigation.hideOnClick && !r) {
356
356
  if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === t || e.pagination.el.contains(t))) return;
357
- let l;
358
- f.length ? l = f[0].classList.contains(e.params.navigation.hiddenClass) : u.length && (l = u[0].classList.contains(e.params.navigation.hiddenClass)), o(l === !0 ? "navigationShow" : "navigationHide"), [...f, ...u].filter((p) => !!p).forEach((p) => p.classList.toggle(e.params.navigation.hiddenClass));
357
+ let o;
358
+ u.length ? o = u[0].classList.contains(e.params.navigation.hiddenClass) : g.length && (o = g[0].classList.contains(e.params.navigation.hiddenClass)), l(o === !0 ? "navigationShow" : "navigationHide"), [...u, ...g].filter((c) => !!c).forEach((c) => c.classList.toggle(e.params.navigation.hiddenClass));
359
359
  }
360
360
  });
361
- const h = () => {
362
- e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), H(), b();
363
- }, x = () => {
364
- e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), $();
361
+ const A = () => {
362
+ e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), M(), w();
363
+ }, B = () => {
364
+ e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), v();
365
365
  };
366
366
  Object.assign(e.navigation, {
367
- enable: h,
368
- disable: x,
369
- update: b,
370
- init: H,
371
- destroy: $
367
+ enable: A,
368
+ disable: B,
369
+ update: w,
370
+ init: M,
371
+ destroy: v
372
372
  });
373
373
  }
374
- function P(s) {
374
+ function j(s) {
375
375
  return s === void 0 && (s = ""), `.${s.trim().replace(/([\.:!+\/()[\]])/g, "\\$1").replace(/ /g, ".")}`;
376
376
  }
377
- function _(s) {
377
+ function Z(s) {
378
378
  let {
379
379
  swiper: e,
380
- extendParams: a,
381
- on: n,
382
- emit: o
380
+ extendParams: n,
381
+ on: i,
382
+ emit: l
383
383
  } = s;
384
- const r = "swiper-pagination";
385
- a({
384
+ const a = "swiper-pagination";
385
+ n({
386
386
  pagination: {
387
387
  el: null,
388
388
  bulletElement: "span",
@@ -399,204 +399,204 @@ function _(s) {
399
399
  dynamicMainBullets: 1,
400
400
  formatFractionCurrent: (t) => t,
401
401
  formatFractionTotal: (t) => t,
402
- bulletClass: `${r}-bullet`,
403
- bulletActiveClass: `${r}-bullet-active`,
404
- modifierClass: `${r}-`,
405
- currentClass: `${r}-current`,
406
- totalClass: `${r}-total`,
407
- hiddenClass: `${r}-hidden`,
408
- progressbarFillClass: `${r}-progressbar-fill`,
409
- progressbarOppositeClass: `${r}-progressbar-opposite`,
410
- clickableClass: `${r}-clickable`,
411
- lockClass: `${r}-lock`,
412
- horizontalClass: `${r}-horizontal`,
413
- verticalClass: `${r}-vertical`,
414
- paginationDisabledClass: `${r}-disabled`
402
+ bulletClass: `${a}-bullet`,
403
+ bulletActiveClass: `${a}-bullet-active`,
404
+ modifierClass: `${a}-`,
405
+ currentClass: `${a}-current`,
406
+ totalClass: `${a}-total`,
407
+ hiddenClass: `${a}-hidden`,
408
+ progressbarFillClass: `${a}-progressbar-fill`,
409
+ progressbarOppositeClass: `${a}-progressbar-opposite`,
410
+ clickableClass: `${a}-clickable`,
411
+ lockClass: `${a}-lock`,
412
+ horizontalClass: `${a}-horizontal`,
413
+ verticalClass: `${a}-vertical`,
414
+ paginationDisabledClass: `${a}-disabled`
415
415
  }
416
416
  }), e.pagination = {
417
417
  el: null,
418
418
  bullets: []
419
419
  };
420
- let g, b = 0;
421
- function m() {
420
+ let m, w = 0;
421
+ function f() {
422
422
  return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
423
423
  }
424
- function k(t, i) {
424
+ function k(t, r) {
425
425
  const {
426
- bulletActiveClass: l
426
+ bulletActiveClass: o
427
427
  } = e.params.pagination;
428
- t && (t = t[`${i === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${l}-${i}`), t = t[`${i === "prev" ? "previous" : "next"}ElementSibling`], t && t.classList.add(`${l}-${i}-${i}`)));
428
+ t && (t = t[`${r === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${o}-${r}`), t = t[`${r === "prev" ? "previous" : "next"}ElementSibling`], t && t.classList.add(`${o}-${r}-${r}`)));
429
429
  }
430
- function H(t, i, l) {
431
- if (t = t % l, i = i % l, i === t + 1)
430
+ function M(t, r, o) {
431
+ if (t = t % o, r = r % o, r === t + 1)
432
432
  return "next";
433
- if (i === t - 1)
433
+ if (r === t - 1)
434
434
  return "previous";
435
435
  }
436
- function $(t) {
437
- const i = t.target.closest(P(e.params.pagination.bulletClass));
438
- if (!i)
436
+ function v(t) {
437
+ const r = t.target.closest(j(e.params.pagination.bulletClass));
438
+ if (!r)
439
439
  return;
440
440
  t.preventDefault();
441
- const l = W(i) * e.params.slidesPerGroup;
441
+ const o = I(r) * e.params.slidesPerGroup;
442
442
  if (e.params.loop) {
443
- if (e.realIndex === l) return;
444
- const p = H(e.realIndex, l, e.slides.length);
445
- p === "next" ? e.slideNext() : p === "previous" ? e.slidePrev() : e.slideToLoop(l);
443
+ if (e.realIndex === o) return;
444
+ const c = M(e.realIndex, o, e.slides.length);
445
+ c === "next" ? e.slideNext() : c === "previous" ? e.slidePrev() : e.slideToLoop(o);
446
446
  } else
447
- e.slideTo(l);
448
- }
449
- function h() {
450
- const t = e.rtl, i = e.params.pagination;
451
- if (m()) return;
452
- let l = e.pagination.el;
453
- l = L(l);
454
- let p, E;
455
- const T = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, B = e.params.loop ? Math.ceil(T / e.params.slidesPerGroup) : e.snapGrid.length;
456
- if (e.params.loop ? (E = e.previousRealIndex || 0, p = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (p = e.snapIndex, E = e.previousSnapIndex) : (E = e.previousIndex || 0, p = e.activeIndex || 0), i.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
457
- const w = e.pagination.bullets;
458
- let A, v, D;
459
- if (i.dynamicBullets && (g = ne(w[0], e.isHorizontal() ? "width" : "height"), l.forEach((C) => {
460
- C.style[e.isHorizontal() ? "width" : "height"] = `${g * (i.dynamicMainBullets + 4)}px`;
461
- }), i.dynamicMainBullets > 1 && E !== void 0 && (b += p - (E || 0), b > i.dynamicMainBullets - 1 ? b = i.dynamicMainBullets - 1 : b < 0 && (b = 0)), A = Math.max(p - b, 0), v = A + (Math.min(w.length, i.dynamicMainBullets) - 1), D = (v + A) / 2), w.forEach((C) => {
462
- const y = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((S) => `${i.bulletActiveClass}${S}`)].map((S) => typeof S == "string" && S.includes(" ") ? S.split(" ") : S).flat();
447
+ e.slideTo(o);
448
+ }
449
+ function A() {
450
+ const t = e.rtl, r = e.params.pagination;
451
+ if (f()) return;
452
+ let o = e.pagination.el;
453
+ o = x(o);
454
+ let c, E;
455
+ const z = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, Y = e.params.loop ? Math.ceil(z / e.params.slidesPerGroup) : e.snapGrid.length;
456
+ if (e.params.loop ? (E = e.previousRealIndex || 0, c = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (c = e.snapIndex, E = e.previousSnapIndex) : (E = e.previousIndex || 0, c = e.activeIndex || 0), r.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
457
+ const b = e.pagination.bullets;
458
+ let S, h, D;
459
+ if (r.dynamicBullets && (m = ie(b[0], e.isHorizontal() ? "width" : "height"), o.forEach((C) => {
460
+ C.style[e.isHorizontal() ? "width" : "height"] = `${m * (r.dynamicMainBullets + 4)}px`;
461
+ }), r.dynamicMainBullets > 1 && E !== void 0 && (w += c - (E || 0), w > r.dynamicMainBullets - 1 ? w = r.dynamicMainBullets - 1 : w < 0 && (w = 0)), S = Math.max(c - w, 0), h = S + (Math.min(b.length, r.dynamicMainBullets) - 1), D = (h + S) / 2), b.forEach((C) => {
462
+ const y = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((L) => `${r.bulletActiveClass}${L}`)].map((L) => typeof L == "string" && L.includes(" ") ? L.split(" ") : L).flat();
463
463
  C.classList.remove(...y);
464
- }), l.length > 1)
465
- w.forEach((C) => {
466
- const y = W(C);
467
- y === p ? C.classList.add(...i.bulletActiveClass.split(" ")) : e.isElement && C.setAttribute("part", "bullet"), i.dynamicBullets && (y >= A && y <= v && C.classList.add(...`${i.bulletActiveClass}-main`.split(" ")), y === A && k(C, "prev"), y === v && k(C, "next"));
464
+ }), o.length > 1)
465
+ b.forEach((C) => {
466
+ const y = I(C);
467
+ y === c ? C.classList.add(...r.bulletActiveClass.split(" ")) : e.isElement && C.setAttribute("part", "bullet"), r.dynamicBullets && (y >= S && y <= h && C.classList.add(...`${r.bulletActiveClass}-main`.split(" ")), y === S && k(C, "prev"), y === h && k(C, "next"));
468
468
  });
469
469
  else {
470
- const C = w[p];
471
- if (C && C.classList.add(...i.bulletActiveClass.split(" ")), e.isElement && w.forEach((y, S) => {
472
- y.setAttribute("part", S === p ? "bullet-active" : "bullet");
473
- }), i.dynamicBullets) {
474
- const y = w[A], S = w[v];
475
- for (let M = A; M <= v; M += 1)
476
- w[M] && w[M].classList.add(...`${i.bulletActiveClass}-main`.split(" "));
477
- k(y, "prev"), k(S, "next");
470
+ const C = b[c];
471
+ if (C && C.classList.add(...r.bulletActiveClass.split(" ")), e.isElement && b.forEach((y, L) => {
472
+ y.setAttribute("part", L === c ? "bullet-active" : "bullet");
473
+ }), r.dynamicBullets) {
474
+ const y = b[S], L = b[h];
475
+ for (let P = S; P <= h; P += 1)
476
+ b[P] && b[P].classList.add(...`${r.bulletActiveClass}-main`.split(" "));
477
+ k(y, "prev"), k(L, "next");
478
478
  }
479
479
  }
480
- if (i.dynamicBullets) {
481
- const C = Math.min(w.length, i.dynamicMainBullets + 4), y = (g * C - g) / 2 - D * g, S = t ? "right" : "left";
482
- w.forEach((M) => {
483
- M.style[e.isHorizontal() ? S : "top"] = `${y}px`;
480
+ if (r.dynamicBullets) {
481
+ const C = Math.min(b.length, r.dynamicMainBullets + 4), y = (m * C - m) / 2 - D * m, L = t ? "right" : "left";
482
+ b.forEach((P) => {
483
+ P.style[e.isHorizontal() ? L : "top"] = `${y}px`;
484
484
  });
485
485
  }
486
486
  }
487
- l.forEach((w, A) => {
488
- if (i.type === "fraction" && (w.querySelectorAll(P(i.currentClass)).forEach((v) => {
489
- v.textContent = i.formatFractionCurrent(p + 1);
490
- }), w.querySelectorAll(P(i.totalClass)).forEach((v) => {
491
- v.textContent = i.formatFractionTotal(B);
492
- })), i.type === "progressbar") {
493
- let v;
494
- i.progressbarOpposite ? v = e.isHorizontal() ? "vertical" : "horizontal" : v = e.isHorizontal() ? "horizontal" : "vertical";
495
- const D = (p + 1) / B;
487
+ o.forEach((b, S) => {
488
+ if (r.type === "fraction" && (b.querySelectorAll(j(r.currentClass)).forEach((h) => {
489
+ h.textContent = r.formatFractionCurrent(c + 1);
490
+ }), b.querySelectorAll(j(r.totalClass)).forEach((h) => {
491
+ h.textContent = r.formatFractionTotal(Y);
492
+ })), r.type === "progressbar") {
493
+ let h;
494
+ r.progressbarOpposite ? h = e.isHorizontal() ? "vertical" : "horizontal" : h = e.isHorizontal() ? "horizontal" : "vertical";
495
+ const D = (c + 1) / Y;
496
496
  let C = 1, y = 1;
497
- v === "horizontal" ? C = D : y = D, w.querySelectorAll(P(i.progressbarFillClass)).forEach((S) => {
498
- S.style.transform = `translate3d(0,0,0) scaleX(${C}) scaleY(${y})`, S.style.transitionDuration = `${e.params.speed}ms`;
497
+ h === "horizontal" ? C = D : y = D, b.querySelectorAll(j(r.progressbarFillClass)).forEach((L) => {
498
+ L.style.transform = `translate3d(0,0,0) scaleX(${C}) scaleY(${y})`, L.style.transitionDuration = `${e.params.speed}ms`;
499
499
  });
500
500
  }
501
- i.type === "custom" && i.renderCustom ? (q(w, i.renderCustom(e, p + 1, B)), A === 0 && o("paginationRender", w)) : (A === 0 && o("paginationRender", w), o("paginationUpdate", w)), e.params.watchOverflow && e.enabled && w.classList[e.isLocked ? "add" : "remove"](i.lockClass);
501
+ r.type === "custom" && r.renderCustom ? (O(b, r.renderCustom(e, c + 1, Y)), S === 0 && l("paginationRender", b)) : (S === 0 && l("paginationRender", b), l("paginationUpdate", b)), e.params.watchOverflow && e.enabled && b.classList[e.isLocked ? "add" : "remove"](r.lockClass);
502
502
  });
503
503
  }
504
- function x() {
504
+ function B() {
505
505
  const t = e.params.pagination;
506
- if (m()) return;
507
- const i = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
508
- let l = e.pagination.el;
509
- l = L(l);
510
- let p = "";
506
+ if (f()) return;
507
+ const r = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
508
+ let o = e.pagination.el;
509
+ o = x(o);
510
+ let c = "";
511
511
  if (t.type === "bullets") {
512
- let E = e.params.loop ? Math.ceil(i / e.params.slidesPerGroup) : e.snapGrid.length;
513
- e.params.freeMode && e.params.freeMode.enabled && E > i && (E = i);
514
- for (let T = 0; T < E; T += 1)
515
- t.renderBullet ? p += t.renderBullet.call(e, T, t.bulletClass) : p += `<${t.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${t.bulletClass}"></${t.bulletElement}>`;
512
+ let E = e.params.loop ? Math.ceil(r / e.params.slidesPerGroup) : e.snapGrid.length;
513
+ e.params.freeMode && e.params.freeMode.enabled && E > r && (E = r);
514
+ for (let z = 0; z < E; z += 1)
515
+ t.renderBullet ? c += t.renderBullet.call(e, z, t.bulletClass) : c += `<${t.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${t.bulletClass}"></${t.bulletElement}>`;
516
516
  }
517
- t.type === "fraction" && (t.renderFraction ? p = t.renderFraction.call(e, t.currentClass, t.totalClass) : p = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? p = t.renderProgressbar.call(e, t.progressbarFillClass) : p = `<span class="${t.progressbarFillClass}"></span>`), e.pagination.bullets = [], l.forEach((E) => {
518
- t.type !== "custom" && q(E, p || ""), t.type === "bullets" && e.pagination.bullets.push(...E.querySelectorAll(P(t.bulletClass)));
519
- }), t.type !== "custom" && o("paginationRender", l[0]);
517
+ t.type === "fraction" && (t.renderFraction ? c = t.renderFraction.call(e, t.currentClass, t.totalClass) : c = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? c = t.renderProgressbar.call(e, t.progressbarFillClass) : c = `<span class="${t.progressbarFillClass}"></span>`), e.pagination.bullets = [], o.forEach((E) => {
518
+ t.type !== "custom" && O(E, c || ""), t.type === "bullets" && e.pagination.bullets.push(...E.querySelectorAll(j(t.bulletClass)));
519
+ }), t.type !== "custom" && l("paginationRender", o[0]);
520
520
  }
521
521
  function d() {
522
- e.params.pagination = G(e, e.originalParams.pagination, e.params.pagination, {
522
+ e.params.pagination = q(e, e.originalParams.pagination, e.params.pagination, {
523
523
  el: "swiper-pagination"
524
524
  });
525
525
  const t = e.params.pagination;
526
526
  if (!t.el) return;
527
- let i;
528
- typeof t.el == "string" && e.isElement && (i = e.el.querySelector(t.el)), !i && typeof t.el == "string" && (i = [...document.querySelectorAll(t.el)]), i || (i = t.el), !(!i || i.length === 0) && (e.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(i) && i.length > 1 && (i = [...e.el.querySelectorAll(t.el)], i.length > 1 && (i = i.find((l) => N(l, ".swiper")[0] === e.el))), Array.isArray(i) && i.length === 1 && (i = i[0]), Object.assign(e.pagination, {
529
- el: i
530
- }), i = L(i), i.forEach((l) => {
531
- t.type === "bullets" && t.clickable && l.classList.add(...(t.clickableClass || "").split(" ")), l.classList.add(t.modifierClass + t.type), l.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (l.classList.add(`${t.modifierClass}${t.type}-dynamic`), b = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && l.classList.add(t.progressbarOppositeClass), t.clickable && l.addEventListener("click", $), e.enabled || l.classList.add(t.lockClass);
527
+ let r;
528
+ typeof t.el == "string" && e.isElement && (r = e.el.querySelector(t.el)), !r && typeof t.el == "string" && (r = [...document.querySelectorAll(t.el)]), r || (r = t.el), !(!r || r.length === 0) && (e.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(r) && r.length > 1 && (r = [...e.el.querySelectorAll(t.el)], r.length > 1 && (r = r.find((o) => N(o, ".swiper")[0] === e.el))), Array.isArray(r) && r.length === 1 && (r = r[0]), Object.assign(e.pagination, {
529
+ el: r
530
+ }), r = x(r), r.forEach((o) => {
531
+ t.type === "bullets" && t.clickable && o.classList.add(...(t.clickableClass || "").split(" ")), o.classList.add(t.modifierClass + t.type), o.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (o.classList.add(`${t.modifierClass}${t.type}-dynamic`), w = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && o.classList.add(t.progressbarOppositeClass), t.clickable && o.addEventListener("click", v), e.enabled || o.classList.add(t.lockClass);
532
532
  }));
533
533
  }
534
- function c() {
534
+ function p() {
535
535
  const t = e.params.pagination;
536
- if (m()) return;
537
- let i = e.pagination.el;
538
- i && (i = L(i), i.forEach((l) => {
539
- l.classList.remove(t.hiddenClass), l.classList.remove(t.modifierClass + t.type), l.classList.remove(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.clickable && (l.classList.remove(...(t.clickableClass || "").split(" ")), l.removeEventListener("click", $));
540
- })), e.pagination.bullets && e.pagination.bullets.forEach((l) => l.classList.remove(...t.bulletActiveClass.split(" ")));
536
+ if (f()) return;
537
+ let r = e.pagination.el;
538
+ r && (r = x(r), r.forEach((o) => {
539
+ o.classList.remove(t.hiddenClass), o.classList.remove(t.modifierClass + t.type), o.classList.remove(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.clickable && (o.classList.remove(...(t.clickableClass || "").split(" ")), o.removeEventListener("click", v));
540
+ })), e.pagination.bullets && e.pagination.bullets.forEach((o) => o.classList.remove(...t.bulletActiveClass.split(" ")));
541
541
  }
542
- n("changeDirection", () => {
542
+ i("changeDirection", () => {
543
543
  if (!e.pagination || !e.pagination.el) return;
544
544
  const t = e.params.pagination;
545
545
  let {
546
- el: i
546
+ el: r
547
547
  } = e.pagination;
548
- i = L(i), i.forEach((l) => {
549
- l.classList.remove(t.horizontalClass, t.verticalClass), l.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass);
548
+ r = x(r), r.forEach((o) => {
549
+ o.classList.remove(t.horizontalClass, t.verticalClass), o.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass);
550
550
  });
551
- }), n("init", () => {
552
- e.params.pagination.enabled === !1 ? u() : (d(), x(), h());
553
- }), n("activeIndexChange", () => {
554
- typeof e.snapIndex > "u" && h();
555
- }), n("snapIndexChange", () => {
556
- h();
557
- }), n("snapGridLengthChange", () => {
558
- x(), h();
559
- }), n("destroy", () => {
560
- c();
561
- }), n("enable disable", () => {
551
+ }), i("init", () => {
552
+ e.params.pagination.enabled === !1 ? g() : (d(), B(), A());
553
+ }), i("activeIndexChange", () => {
554
+ typeof e.snapIndex > "u" && A();
555
+ }), i("snapIndexChange", () => {
556
+ A();
557
+ }), i("snapGridLengthChange", () => {
558
+ B(), A();
559
+ }), i("destroy", () => {
560
+ p();
561
+ }), i("enable disable", () => {
562
562
  let {
563
563
  el: t
564
564
  } = e.pagination;
565
- t && (t = L(t), t.forEach((i) => i.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
566
- }), n("lock unlock", () => {
567
- h();
568
- }), n("click", (t, i) => {
569
- const l = i.target, p = L(e.pagination.el);
570
- if (e.params.pagination.el && e.params.pagination.hideOnClick && p && p.length > 0 && !l.classList.contains(e.params.pagination.bulletClass)) {
571
- if (e.navigation && (e.navigation.nextEl && l === e.navigation.nextEl || e.navigation.prevEl && l === e.navigation.prevEl)) return;
572
- const E = p[0].classList.contains(e.params.pagination.hiddenClass);
573
- o(E === !0 ? "paginationShow" : "paginationHide"), p.forEach((T) => T.classList.toggle(e.params.pagination.hiddenClass));
565
+ t && (t = x(t), t.forEach((r) => r.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
566
+ }), i("lock unlock", () => {
567
+ A();
568
+ }), i("click", (t, r) => {
569
+ const o = r.target, c = x(e.pagination.el);
570
+ if (e.params.pagination.el && e.params.pagination.hideOnClick && c && c.length > 0 && !o.classList.contains(e.params.pagination.bulletClass)) {
571
+ if (e.navigation && (e.navigation.nextEl && o === e.navigation.nextEl || e.navigation.prevEl && o === e.navigation.prevEl)) return;
572
+ const E = c[0].classList.contains(e.params.pagination.hiddenClass);
573
+ l(E === !0 ? "paginationShow" : "paginationHide"), c.forEach((z) => z.classList.toggle(e.params.pagination.hiddenClass));
574
574
  }
575
575
  });
576
- const f = () => {
576
+ const u = () => {
577
577
  e.el.classList.remove(e.params.pagination.paginationDisabledClass);
578
578
  let {
579
579
  el: t
580
580
  } = e.pagination;
581
- t && (t = L(t), t.forEach((i) => i.classList.remove(e.params.pagination.paginationDisabledClass))), d(), x(), h();
582
- }, u = () => {
581
+ t && (t = x(t), t.forEach((r) => r.classList.remove(e.params.pagination.paginationDisabledClass))), d(), B(), A();
582
+ }, g = () => {
583
583
  e.el.classList.add(e.params.pagination.paginationDisabledClass);
584
584
  let {
585
585
  el: t
586
586
  } = e.pagination;
587
- t && (t = L(t), t.forEach((i) => i.classList.add(e.params.pagination.paginationDisabledClass))), c();
587
+ t && (t = x(t), t.forEach((r) => r.classList.add(e.params.pagination.paginationDisabledClass))), p();
588
588
  };
589
589
  Object.assign(e.pagination, {
590
- enable: f,
591
- disable: u,
592
- render: x,
593
- update: h,
590
+ enable: u,
591
+ disable: g,
592
+ render: B,
593
+ update: A,
594
594
  init: d,
595
- destroy: c
595
+ destroy: p
596
596
  });
597
597
  }
598
- F.use([U, _, j]);
599
- class ie {
598
+ F.use([R, Z, Q]);
599
+ class re {
600
600
  constructor() {
601
601
  this.name = "swiper", this.eventHandlers = /* @__PURE__ */ new Map();
602
602
  }
@@ -606,11 +606,11 @@ class ie {
606
606
  * @param container - 容器元素
607
607
  * @param options - Swiper 选项
608
608
  */
609
- async initialize(e, a) {
609
+ async initialize(e, n) {
610
610
  try {
611
611
  if (this.createSwiperStructure(e), !this.swiperContainer || !this.swiperWrapper)
612
612
  throw new Error("Swiper container not created");
613
- const n = {
613
+ const i = {
614
614
  // 默认配置
615
615
  direction: "horizontal",
616
616
  loop: !1,
@@ -618,7 +618,7 @@ class ie {
618
618
  spaceBetween: 30,
619
619
  slidesPerView: 1,
620
620
  // 注册模块
621
- modules: [U, _, j],
621
+ modules: [R, Z, Q],
622
622
  // 导航配置
623
623
  navigation: {
624
624
  nextEl: ".swiper-button-next",
@@ -634,16 +634,16 @@ class ie {
634
634
  enabled: !0,
635
635
  onlyInViewport: !0
636
636
  },
637
- ...a == null ? void 0 : a.swiperConfig
637
+ ...n?.swiperConfig
638
638
  };
639
- this.swiper = new F(this.swiperContainer, n), await new Promise((o) => {
639
+ this.swiper = new F(this.swiperContainer, i), await new Promise((l) => {
640
640
  requestAnimationFrame(() => {
641
- o();
641
+ l();
642
642
  });
643
643
  }), this.setupEventListeners(), this.emit("ready");
644
- } catch (n) {
645
- const o = n instanceof Error ? n.message : String(n);
646
- throw this.emit("error", { message: o }), new Error(`Failed to initialize SwiperAdapter: ${o}`);
644
+ } catch (i) {
645
+ const l = i instanceof Error ? i.message : String(i);
646
+ throw this.emit("error", { message: l }), new Error(`Failed to initialize SwiperAdapter: ${l}`);
647
647
  }
648
648
  }
649
649
  /**
@@ -656,14 +656,14 @@ class ie {
656
656
  throw new Error("SwiperAdapter not initialized");
657
657
  try {
658
658
  this.swiperWrapper.innerHTML = "";
659
- for (const a of e) {
660
- const n = await this.renderSlide(a);
661
- this.swiperWrapper.appendChild(n);
659
+ for (const n of e) {
660
+ const i = await this.renderSlide(n);
661
+ this.swiperWrapper.appendChild(i);
662
662
  }
663
663
  this.swiper.update(), this.emit("slideRendered", { totalSlides: e.length });
664
- } catch (a) {
665
- const n = a instanceof Error ? a.message : String(a);
666
- throw this.emit("error", { message: n }), new Error(`Failed to render slides: ${n}`);
664
+ } catch (n) {
665
+ const i = n instanceof Error ? n.message : String(n);
666
+ throw this.emit("error", { message: i }), new Error(`Failed to render slides: ${i}`);
667
667
  }
668
668
  }
669
669
  /**
@@ -700,18 +700,18 @@ class ie {
700
700
  * @param index - 幻灯片索引
701
701
  * @param slide - 新的幻灯片定义
702
702
  */
703
- async updateSlide(e, a) {
703
+ async updateSlide(e, n) {
704
704
  if (!this.swiperWrapper || !this.swiper)
705
705
  throw new Error("SwiperAdapter not initialized");
706
706
  try {
707
- const o = this.swiperWrapper.querySelectorAll(".swiper-slide")[e];
708
- if (!o)
707
+ const l = this.swiperWrapper.querySelectorAll(".swiper-slide")[e];
708
+ if (!l)
709
709
  throw new Error(`Slide at index ${e} not found`);
710
- const r = await this.renderSlide(a);
711
- o.replaceWith(r), this.swiper.update();
712
- } catch (n) {
713
- const o = n instanceof Error ? n.message : String(n);
714
- throw this.emit("error", { message: o }), new Error(`Failed to update slide: ${o}`);
710
+ const a = await this.renderSlide(n);
711
+ l.replaceWith(a), this.swiper.update();
712
+ } catch (i) {
713
+ const l = i instanceof Error ? i.message : String(i);
714
+ throw this.emit("error", { message: l }), new Error(`Failed to update slide: ${l}`);
715
715
  }
716
716
  }
717
717
  /**
@@ -720,8 +720,8 @@ class ie {
720
720
  * @param event - 事件类型
721
721
  * @param handler - 事件处理器
722
722
  */
723
- on(e, a) {
724
- this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(a);
723
+ on(e, n) {
724
+ this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(n);
725
725
  }
726
726
  /**
727
727
  * 移除事件监听器
@@ -729,37 +729,36 @@ class ie {
729
729
  * @param event - 事件类型
730
730
  * @param handler - 事件处理器
731
731
  */
732
- off(e, a) {
733
- const n = this.eventHandlers.get(e);
734
- n && n.delete(a);
732
+ off(e, n) {
733
+ const i = this.eventHandlers.get(e);
734
+ i && i.delete(n);
735
735
  }
736
736
  /**
737
737
  * 创建 Swiper DOM 结构
738
738
  *
739
- * @param container - 容器元素
739
+ * @param container - 容器元素(这是 runner.ts 创建的独立 div,Swiper 会接管它)
740
740
  */
741
741
  createSwiperStructure(e) {
742
- const a = document.createElement("div");
743
- a.className = "swiper";
742
+ e.className = "swiper";
744
743
  const n = document.createElement("div");
745
744
  n.className = "swiper-wrapper";
746
- const o = document.createElement("div");
747
- o.className = "swiper-button-prev";
748
- const r = document.createElement("div");
749
- r.className = "swiper-button-next";
750
- const g = document.createElement("div");
751
- g.className = "swiper-pagination", a.appendChild(n), a.appendChild(o), a.appendChild(r), a.appendChild(g), e.appendChild(a), this.swiperContainer = a, this.swiperWrapper = n;
745
+ const i = document.createElement("div");
746
+ i.className = "swiper-button-prev";
747
+ const l = document.createElement("div");
748
+ l.className = "swiper-button-next";
749
+ const a = document.createElement("div");
750
+ a.className = "swiper-pagination", e.appendChild(n), e.appendChild(i), e.appendChild(l), e.appendChild(a), this.swiperContainer = e, this.swiperWrapper = n;
752
751
  }
753
752
  /**
754
753
  * 设置 Swiper 事件监听
755
754
  */
756
755
  setupEventListeners() {
757
756
  this.swiper && this.swiper.on("slideChange", () => {
758
- const e = this.swiper.activeIndex, a = this.swiper.previousIndex;
757
+ const e = this.swiper.activeIndex, n = this.swiper.previousIndex;
759
758
  this.emit("slideChanged", {
760
759
  index: e,
761
- previousIndex: a,
762
- from: a,
760
+ previousIndex: n,
761
+ from: n,
763
762
  to: e
764
763
  });
765
764
  });
@@ -771,20 +770,19 @@ class ie {
771
770
  * @returns slide 元素
772
771
  */
773
772
  async renderSlide(e) {
774
- var n;
775
- const a = document.createElement("div");
776
- if (a.className = "swiper-slide", (n = e.behavior) != null && n.transition) {
777
- const o = this.mapTransition(e.behavior.transition.type);
778
- o && a.classList.add(`slide-transition-${o}`);
773
+ const n = document.createElement("div");
774
+ if (n.className = "swiper-slide", e.behavior?.transition) {
775
+ const i = this.mapTransition(e.behavior.transition.type);
776
+ i && n.classList.add(`slide-transition-${i}`);
779
777
  }
780
778
  if (e.content.type === "dynamic") {
781
- const o = await this.renderDynamicContent(e.content.component, e.content.props);
782
- a.appendChild(o);
779
+ const i = await this.renderDynamicContent(e.content.component, e.content.props);
780
+ n.appendChild(i);
783
781
  } else {
784
- const o = this.renderTextContent(e.content.lines);
785
- a.appendChild(o);
782
+ const i = this.renderTextContent(e.content.lines);
783
+ n.appendChild(i);
786
784
  }
787
- return a;
785
+ return n;
788
786
  }
789
787
  /**
790
788
  * 渲染动态内容(Web Component)
@@ -798,11 +796,11 @@ class ie {
798
796
  * @param props - 组件属性
799
797
  * @returns 组件元素
800
798
  */
801
- async renderDynamicContent(e, a) {
802
- const n = document.createElement(e);
803
- for (const [o, r] of Object.entries(a))
804
- typeof r == "string" || typeof r == "number" ? n.setAttribute(o, String(r)) : typeof r == "boolean" ? r && n.setAttribute(o, "") : n[o] = r;
805
- return n;
799
+ async renderDynamicContent(e, n) {
800
+ const i = document.createElement(e);
801
+ for (const [l, a] of Object.entries(n))
802
+ typeof a == "string" || typeof a == "number" ? i.setAttribute(l, String(a)) : typeof a == "boolean" ? a && i.setAttribute(l, "") : i[l] = a;
803
+ return i;
806
804
  }
807
805
  /**
808
806
  * 渲染文本内容
@@ -819,51 +817,51 @@ class ie {
819
817
  * @returns 内容容器元素
820
818
  */
821
819
  renderTextContent(e) {
822
- const a = document.createElement("div");
823
- a.className = "slide-content";
824
- let n = null;
825
- for (const o of e) {
826
- const r = o.trim();
827
- if (!r) {
828
- n = null;
820
+ const n = document.createElement("div");
821
+ n.className = "slide-content";
822
+ let i = null;
823
+ for (const l of e) {
824
+ const a = l.trim();
825
+ if (!a) {
826
+ i = null;
829
827
  continue;
830
828
  }
831
- if (r.startsWith("# ")) {
832
- n = null;
833
- const m = document.createElement("h1");
834
- m.textContent = r.substring(2), a.appendChild(m);
829
+ if (a.startsWith("# ")) {
830
+ i = null;
831
+ const f = document.createElement("h1");
832
+ f.textContent = a.substring(2), n.appendChild(f);
835
833
  continue;
836
834
  }
837
- if (r.startsWith("## ")) {
838
- n = null;
839
- const m = document.createElement("h2");
840
- m.textContent = r.substring(3), a.appendChild(m);
835
+ if (a.startsWith("## ")) {
836
+ i = null;
837
+ const f = document.createElement("h2");
838
+ f.textContent = a.substring(3), n.appendChild(f);
841
839
  continue;
842
840
  }
843
- if (r.startsWith("### ")) {
844
- n = null;
845
- const m = document.createElement("h3");
846
- m.textContent = r.substring(4), a.appendChild(m);
841
+ if (a.startsWith("### ")) {
842
+ i = null;
843
+ const f = document.createElement("h3");
844
+ f.textContent = a.substring(4), n.appendChild(f);
847
845
  continue;
848
846
  }
849
- const g = r.match(/^!\[(.*?)\]\((.*?)\)$/);
850
- if (g) {
851
- n = null;
852
- const m = document.createElement("img");
853
- m.alt = g[1], m.src = g[2], m.style.maxWidth = "80%", m.style.maxHeight = "500px", a.appendChild(m);
847
+ const m = a.match(/^!\[(.*?)\]\((.*?)\)$/);
848
+ if (m) {
849
+ i = null;
850
+ const f = document.createElement("img");
851
+ f.alt = m[1], f.src = m[2], f.style.maxWidth = "80%", f.style.maxHeight = "500px", n.appendChild(f);
854
852
  continue;
855
853
  }
856
- if (r.startsWith("- ")) {
857
- n || (n = document.createElement("ul"), a.appendChild(n));
858
- const m = document.createElement("li");
859
- m.textContent = r.substring(2), n.appendChild(m);
854
+ if (a.startsWith("- ")) {
855
+ i || (i = document.createElement("ul"), n.appendChild(i));
856
+ const f = document.createElement("li");
857
+ f.textContent = a.substring(2), i.appendChild(f);
860
858
  continue;
861
859
  }
862
- n = null;
863
- const b = document.createElement("p");
864
- b.textContent = r, a.appendChild(b);
860
+ i = null;
861
+ const w = document.createElement("p");
862
+ w.textContent = a, n.appendChild(w);
865
863
  }
866
- return a;
864
+ return n;
867
865
  }
868
866
  /**
869
867
  * 映射 Slide DSL 过渡效果到 Swiper 过渡效果
@@ -880,29 +878,50 @@ class ie {
880
878
  * @param event - 事件类型
881
879
  * @param data - 事件数据
882
880
  */
883
- emit(e, a) {
884
- const n = this.eventHandlers.get(e);
885
- if (n)
886
- for (const o of n)
881
+ emit(e, n) {
882
+ const i = this.eventHandlers.get(e);
883
+ if (i)
884
+ for (const l of i)
887
885
  try {
888
- o(a);
889
- } catch (r) {
890
- console.error(`Error in ${e} handler:`, r);
886
+ l(n);
887
+ } catch (a) {
888
+ console.error(`Error in ${e} handler:`, a);
891
889
  }
892
890
  }
893
891
  }
894
- async function le(s, e, a) {
895
- const n = await K(s), o = X(n), r = new ie(), g = new Y({
896
- container: a.container,
897
- adapter: r,
892
+ const ne = '@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}', se = ".swiper{width:100%;height:100%;--slidejs-swiper-navigation-color: var(--slidejs-navigation-color, #007aff);--slidejs-swiper-pagination-color: var(--slidejs-pagination-color, #007aff);--slidejs-swiper-pagination-bullet-active-color: var(--slidejs-pagination-active-color, #007aff);--slidejs-swiper-scrollbar-bg: var(--slidejs-scrollbar-bg, rgba(0, 0, 0, .1));--slidejs-swiper-scrollbar-drag-bg: var(--slidejs-scrollbar-drag-bg, rgba(0, 0, 0, .5));--swiper-navigation-color: var(--slidejs-navigation-color, #007aff);--swiper-pagination-color: var(--slidejs-pagination-color, #007aff);--swiper-pagination-bullet-active-color: var(--slidejs-pagination-active-color, #007aff);--swiper-theme-color: var(--slidejs-navigation-color, #007aff)}.swiper .swiper-button-next,.swiper .swiper-button-prev{color:var(--swiper-navigation-color, var(--slidejs-swiper-navigation-color, #007aff))!important}.swiper .swiper-pagination-bullet{background-color:var( --swiper-pagination-color, var(--slidejs-swiper-pagination-color, #007aff) )!important}.swiper .swiper-pagination-bullet-active{background-color:var( --swiper-pagination-bullet-active-color, var(--slidejs-swiper-pagination-bullet-active-color, #007aff) )!important}.swiper .swiper-scrollbar{background:var(--slidejs-swiper-scrollbar-bg, rgba(0, 0, 0, .1))!important}.swiper .swiper-scrollbar-drag{background:var(--slidejs-swiper-scrollbar-drag-bg, rgba(0, 0, 0, .5))!important}.swiper-slide{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:var(--slidejs-background-color, #fff);padding:2rem;box-sizing:border-box}.slide-content{width:100%;text-align:center}.slide-content h1{font-size:3rem;margin-bottom:1rem;color:var(--slidejs-heading-color, #333)}.slide-content h2{font-size:2rem;margin-bottom:1rem;color:var(--slidejs-heading-color, #666)}.slide-content h3{font-size:1.5rem;margin-bottom:.5rem;color:var(--slidejs-heading-color, #666)}.slide-content p{font-size:1.2rem;line-height:1.6;color:var(--slidejs-text-color, #555);margin-bottom:1rem}.slide-content ul{text-align:left;display:inline-block;font-size:1.2rem;line-height:1.8;color:var(--slidejs-text-color, #555)}.slide-content li{margin-bottom:.5rem}.slide-content img{border-radius:8px;box-shadow:0 4px 12px #0000001a}.swiper-button-next:after,.swiper-button-prev:after{font-size:24px}.swiper-pagination-bullet{opacity:.5}.swiper-pagination-bullet-active{opacity:1}";
893
+ async function pe(s, e, n) {
894
+ const i = await U(s), l = V(i);
895
+ if (!document.head.querySelector("#swiper-styles")) {
896
+ const v = document.createElement("style");
897
+ v.id = "swiper-styles", v.textContent = ne, document.head.appendChild(v);
898
+ }
899
+ let m;
900
+ if (typeof n.container == "string") {
901
+ const v = document.querySelector(n.container);
902
+ if (!v)
903
+ throw new Error(`Container not found: ${n.container}`);
904
+ m = v;
905
+ } else
906
+ m = n.container;
907
+ const w = "slidejs-runner-swiper-styles";
908
+ if (!m.querySelector(`#${w}`)) {
909
+ const v = document.createElement("style");
910
+ v.id = w, v.textContent = se, m.appendChild(v);
911
+ }
912
+ const f = document.createElement("div");
913
+ m.appendChild(f);
914
+ const k = new re(), M = new K({
915
+ container: f,
916
+ adapter: k,
898
917
  adapterOptions: {
899
- swiperConfig: a.swiperOptions
918
+ swiperConfig: n.swiperOptions
900
919
  }
901
920
  });
902
- return await g.run(o, e), g;
921
+ return await M.run(l, e), M;
903
922
  }
904
923
  export {
905
- ie as SwiperAdapter,
906
- le as createSlideRunner
924
+ re as SwiperAdapter,
925
+ pe as createSlideRunner
907
926
  };
908
927
  //# sourceMappingURL=index.mjs.map