@xwadex/fesd 0.0.14-re.86 → 0.0.14-re.88

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.
@@ -9,7 +9,7 @@ var h = (n, i, t) => {
9
9
  };
10
10
  var d = (n, i, t) => (fs(n, i, "access private method"), t);
11
11
  import { OverlayScrollbars as Me } from "overlayscrollbars";
12
- import f from "jquery";
12
+ import v from "jquery";
13
13
  import "./vendor-bundle.js";
14
14
  import "validator";
15
15
  import "flatpickr";
@@ -88,7 +88,7 @@ const Y = {
88
88
  </div>
89
89
  `;
90
90
  }
91
- }, $ = {
91
+ }, x = {
92
92
  SETTINGS: {
93
93
  direction: "left",
94
94
  // 方向 - top || right || bottom || left
@@ -180,7 +180,7 @@ const Y = {
180
180
  beforeScroll: null,
181
181
  afterScroll: null
182
182
  }
183
- }, C = {
183
+ }, H = {
184
184
  SETTINGS: {
185
185
  type: "drag",
186
186
  drag: {
@@ -297,19 +297,19 @@ const Y = {
297
297
  article4: ws,
298
298
  collapse4: Je,
299
299
  dropdown4: qe,
300
- marquee4: $,
300
+ marquee4: x,
301
301
  modal4: I,
302
- multipurpose4: C,
302
+ multipurpose4: H,
303
303
  ripple4: Ze,
304
304
  share4: ys,
305
305
  tab4: Ue,
306
306
  video4: Y
307
- }, Symbol.toStringTag, { value: "Module" })), E = {
307
+ }, Symbol.toStringTag, { value: "Module" })), A = {
308
308
  before: "beforebegin",
309
309
  after: "afterend",
310
310
  append: "beforeend",
311
311
  prepend: "afterbegin"
312
- }, at = (n) => typeof n == "string" && n !== "", ye = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, w = (n) => A(n) !== null, j = (n) => typeof n == "function", A = (n) => ye(n) ? n : document.querySelector(n), L = (n) => rt(n) ? n : document.querySelectorAll(n), Ts = () => Math.random().toString(36).substr(2, 9), Es = (n) => {
312
+ }, at = (n) => typeof n == "string" && n !== "", ye = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, w = (n) => L(n) !== null, z = (n) => typeof n == "function", L = (n) => ye(n) ? n : document.querySelector(n), S = (n) => rt(n) ? n : document.querySelectorAll(n), Ts = () => Math.random().toString(36).substr(2, 9), Es = (n) => {
313
313
  const i = document.createElement("div");
314
314
  return i.innerHTML = n, i.childNodes;
315
315
  }, As = (n) => {
@@ -319,13 +319,13 @@ const Y = {
319
319
  return n;
320
320
  }
321
321
  return JSON.parse(n);
322
- }, T = (n, i) => {
322
+ }, E = (n, i) => {
323
323
  console.warn(`[${n} warn]: ${i}`);
324
324
  }, je = (n, i) => {
325
325
  console.error(`[${n} error]: ${i}`);
326
326
  }, O = {
327
327
  on(n, i) {
328
- if (!j(i))
328
+ if (!z(i))
329
329
  return this;
330
330
  const { __events__: t } = this;
331
331
  return n.split(" ").forEach((e) => {
@@ -341,7 +341,7 @@ const Y = {
341
341
  }), this;
342
342
  },
343
343
  once(n, i) {
344
- if (!j(i))
344
+ if (!z(i))
345
345
  return this;
346
346
  const t = (...e) => {
347
347
  this.off(n, t), i.apply(this, e);
@@ -351,7 +351,7 @@ const Y = {
351
351
  emit(...n) {
352
352
  const { __events__: i } = this, t = n[0], e = n.slice(1, n.length);
353
353
  return i[t] ? (i[t].forEach((s) => {
354
- j(s) && s.apply(this, e);
354
+ z(s) && s.apply(this, e);
355
355
  }), this) : this;
356
356
  }
357
357
  }, Ls = {
@@ -365,19 +365,19 @@ const Y = {
365
365
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
366
366
  }
367
367
  }, we = (n, i) => {
368
- const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = w(e) ? A(e) : document.scrollingElement, v = m[u], b = w(t) ? A(t).getBoundingClientRect()[p] : 0 - v, y = w(s) ? A(s).getBoundingClientRect()[g] : 0, H = b - a - y, G = 15;
369
- let S = 0;
370
- if (H === 0)
368
+ const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = w(e) ? L(e) : document.scrollingElement, f = m[u], b = w(t) ? L(t).getBoundingClientRect()[p] : 0 - f, y = w(s) ? L(s).getBoundingClientRect()[g] : 0, _ = b - a - y, P = 15;
369
+ let T = 0;
370
+ if (_ === 0)
371
371
  return;
372
- const X = (R) => {
373
- const Ne = A(t);
374
- i && i.emit(R, Ne), !i && n.on && j(n.on[R]) && n.on[R](Ne);
372
+ const R = (X) => {
373
+ const Ne = L(t);
374
+ i && i.emit(X, Ne), !i && n.on && z(n.on[X]) && n.on[X](Ne);
375
375
  };
376
- X("beforeScroll");
376
+ R("beforeScroll");
377
377
  const Pe = () => {
378
- S += G;
379
- const R = Ls[r](S, v, H, o);
380
- m[u] = R, S < o && requestAnimationFrame(Pe), S >= o && X("afterScroll");
378
+ T += P;
379
+ const X = Ls[r](T, f, _, o);
380
+ m[u] = X, T < o && requestAnimationFrame(Pe), T >= o && R("afterScroll");
381
381
  };
382
382
  requestAnimationFrame(Pe);
383
383
  };
@@ -423,7 +423,7 @@ J = new WeakSet(), Ee = function() {
423
423
  if (!at(i) || !w(i))
424
424
  return;
425
425
  const { SETTINGS: e, EVENTS: s } = lt;
426
- if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.elements = L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
426
+ if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.elements = S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
427
427
  for (const [o, a] of Object.entries(this.options.on))
428
428
  this.__events__[o] = [a];
429
429
  d(this, pt, Ve).call(this);
@@ -497,7 +497,7 @@ gt = new WeakSet(), ei = function() {
497
497
  const { ATTRS: t } = I;
498
498
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
499
499
  const e = this.getAttribute(t.id) || Ts();
500
- this.getAttribute(t.id) || (T(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && T(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, ft, ii).call(this);
500
+ this.getAttribute(t.id) || (E(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && E(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, ft, ii).call(this);
501
501
  }, ft = new WeakSet(), ii = function() {
502
502
  this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this, vt, si).call(this);
503
503
  }, vt = new WeakSet(), si = function() {
@@ -560,14 +560,14 @@ const { MODALS: Ie } = window, ai = (n, i, ...t) => {
560
560
  if (!i)
561
561
  return;
562
562
  const e = n[i];
563
- e && j(e) && e.apply(n, t);
563
+ e && z(e) && e.apply(n, t);
564
564
  }, ri = (n, ...i) => {
565
- n && j(n) && n.apply(U, i);
565
+ n && z(n) && n.apply(U, i);
566
566
  }, ze = (n, i) => {
567
- const { target: t } = n, e = Ie[t] || A(n.target);
567
+ const { target: t } = n, e = Ie[t] || L(n.target);
568
568
  e && li(n, i), e || Ds(n, i);
569
569
  }, li = (n, i) => {
570
- const { target: t, action: e, on: s, e: o } = n, a = Ie[t] || A(n.target);
570
+ const { target: t, action: e, on: s, e: o } = n, a = Ie[t] || L(n.target);
571
571
  switch (["open", "close", "destroy"].forEach((l) => {
572
572
  a.once(l, () => {
573
573
  i && (i.emit(l, a, o), ai(i, s[l], a, o)), i || ri(s[l], a);
@@ -590,23 +590,23 @@ const { MODALS: Ie } = window, ai = (n, i, ...t) => {
590
590
  }, Ds = async (n, i) => {
591
591
  const { target: t, route: e, container: s, on: o, e: a } = n;
592
592
  if (!e)
593
- return T("modal4", "cannot find target or data-modal-route is not defined");
593
+ return E("modal4", "cannot find target or data-modal-route is not defined");
594
594
  const r = (l, ...c) => {
595
595
  i && (i.emit(l, ...c), ai(i, o[l], ...c)), i || ri(o[l], ...c);
596
596
  };
597
597
  fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
598
- const c = Es(l), u = A(s) || A(I.SETTINGS.container);
598
+ const c = Es(l), u = L(s) || L(I.SETTINGS.container);
599
599
  [...c].forEach((g) => {
600
600
  u.append(g);
601
601
  });
602
- const p = Ie[t] || A(n.target);
602
+ const p = Ie[t] || L(n.target);
603
603
  r("complete", p), li(n, i);
604
604
  }).catch((l) => {
605
605
  r("error", l);
606
606
  });
607
607
  };
608
608
  var Z, Ae, wt, ci, Tt, di;
609
- const P = class P {
609
+ const N = class N {
610
610
  constructor(i, t = {}) {
611
611
  h(this, Z);
612
612
  h(this, wt);
@@ -633,11 +633,11 @@ const P = class P {
633
633
  }
634
634
  /** static method 'defineMethods' */
635
635
  static defineMethods(i) {
636
- P.prototype.__methods__ || (P.prototype.__methods__ = {});
637
- const t = P.prototype.__methods__;
636
+ N.prototype.__methods__ || (N.prototype.__methods__ = {});
637
+ const t = N.prototype.__methods__;
638
638
  for (const [e, s] of Object.entries(i))
639
- j(s) && (t[e] = s);
640
- Object.assign(P.prototype, P.prototype.__methods__);
639
+ z(s) && (t[e] = s);
640
+ Object.assign(N.prototype, N.prototype.__methods__);
641
641
  }
642
642
  };
643
643
  Z = new WeakSet(), Ae = function() {
@@ -645,7 +645,7 @@ Z = new WeakSet(), Ae = function() {
645
645
  if (!at(i) || !w(i))
646
646
  return;
647
647
  const { SETTINGS: e, EVENTS: s } = I;
648
- if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
648
+ if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
649
649
  for (const [o, a] of Object.entries(this.options.on))
650
650
  this.__events__[o] = [a];
651
651
  d(this, wt, ci).call(this);
@@ -656,7 +656,7 @@ Z = new WeakSet(), Ae = function() {
656
656
  }), this.emit("init");
657
657
  }, Tt = new WeakSet(), di = function(i) {
658
658
  const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = As(this.getAttribute("data-modal-on"));
659
- o && typeof o != "object" && T("modal4", "data-modal-on must be a json string.");
659
+ o && typeof o != "object" && E("modal4", "data-modal-on must be a json string.");
660
660
  const a = {
661
661
  target: this.getAttribute("data-modal-target") || t.target,
662
662
  action: this.getAttribute("data-modal-action") || t.action,
@@ -669,19 +669,19 @@ Z = new WeakSet(), Ae = function() {
669
669
  this.addEventListener("click", e);
670
670
  }, 200), ze(a, s);
671
671
  };
672
- let U = P;
672
+ let U = N;
673
673
  Object.assign(U.prototype, O);
674
674
  customElements.define("modern-modal", ti);
675
675
  const _s = (n, i) => {
676
676
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
677
677
  i.forEach((s) => {
678
- const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: p, bottom: g } = s.getBoundingClientRect(), m = t * (r / 100), v = t * (l / 100);
679
- if (p - e <= m && g - e >= v && s.offsetParent)
678
+ const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: p, bottom: g } = s.getBoundingClientRect(), m = t * (r / 100), f = t * (l / 100);
679
+ if (p - e <= m && g - e >= f && s.offsetParent)
680
680
  setTimeout(() => {
681
681
  s.classList.add(o);
682
682
  }, a);
683
683
  else {
684
- const y = s.classList.contains(o) && c === "down" && p - e >= m || c === "up" && g - e <= v || c === !0;
684
+ const y = s.classList.contains(o) && c === "down" && p - e >= m || c === "up" && g - e <= f || c === !0;
685
685
  setTimeout(() => {
686
686
  y && s.classList.remove(o);
687
687
  }, a);
@@ -702,7 +702,7 @@ class ui {
702
702
  const { elements: t, options: e } = this;
703
703
  if (!t)
704
704
  return this;
705
- const { scroller: s } = e, o = s === window || !w(s) ? window : A(s);
705
+ const { scroller: s } = e, o = s === window || !w(s) ? window : L(s);
706
706
  return o.aost && (o.removeEventListener("scroll", o.aost.eventHandler), delete o.aost), t.forEach((a) => {
707
707
  if (!a.aost)
708
708
  return;
@@ -720,12 +720,12 @@ Q = new WeakSet(), Le = function() {
720
720
  if (!at(i) || !w(i))
721
721
  return;
722
722
  const { SETTINGS: e, EVENTS: s } = Ye;
723
- if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
723
+ if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
724
724
  for (const [o, a] of Object.entries(this.options.on))
725
725
  this.__events__[o] = [a];
726
726
  d(this, Et, hi).call(this);
727
727
  }, Et = new WeakSet(), hi = function() {
728
- const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window : A(e);
728
+ const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window : L(e);
729
729
  this.eventHandler = () => {
730
730
  _s(s, i);
731
731
  }, i.forEach((a) => {
@@ -800,7 +800,7 @@ class xs extends HTMLElement {
800
800
  }
801
801
  At = new WeakSet(), pi = function() {
802
802
  if (!this.getAttribute("video-id")) {
803
- T("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
803
+ E("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
804
804
  return;
805
805
  }
806
806
  this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), d(this, Lt, mi).call(this);
@@ -833,7 +833,7 @@ At = new WeakSet(), pi = function() {
833
833
  e = d(this, Ct, Ti).call(this);
834
834
  break;
835
835
  }
836
- this.querySelector(".player-wrapper").insertAdjacentHTML(E.prepend, e);
836
+ this.querySelector(".player-wrapper").insertAdjacentHTML(A.prepend, e);
837
837
  }, Dt = new WeakSet(), fi = function() {
838
838
  const { videoId: t, autoplay: e, startTime: s } = this;
839
839
  return `<iframe src="https://www.youtube.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}&start=${s}&mute=1&loop=1&enablejsapi=1" frameborder="0" allowfullscreen="0" volumn="0" allow="${e === "on" ? "autoplay;" : ""} encrypted-media; gyroscope; picture-in-picture;"></iframe>`;
@@ -860,18 +860,18 @@ function Ei(n) {
860
860
  const i = [];
861
861
  n && n.forEach((t) => {
862
862
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
863
- }), f("html").addClass("scrollLock"), vs(i);
863
+ }), v("html").addClass("scrollLock"), vs(i);
864
864
  }
865
865
  function Ai(n) {
866
866
  const i = [];
867
867
  n && n.forEach((t) => {
868
868
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
869
- }), f("html").removeClass("scrollLock"), bs(i);
869
+ }), v("html").removeClass("scrollLock"), bs(i);
870
870
  }
871
871
  async function fn(n = 0) {
872
- if (f(".loading-wrapper").length)
872
+ if (v(".loading-wrapper").length)
873
873
  return;
874
- f("body").append(`
874
+ v("body").append(`
875
875
  <div class="loading-wrapper">
876
876
  <div class="icon-box">
877
877
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><path d="M10 50A40 40 0 0 0 90 50A40 42 0 0 1 10 50" fill="#ffffff" stroke="none">
@@ -881,13 +881,13 @@ async function fn(n = 0) {
881
881
  </svg>
882
882
  </div>
883
883
  </div>
884
- `), f(".loading-wrapper").delay(n).fadeIn(300).promise().done(function() {
884
+ `), v(".loading-wrapper").delay(n).fadeIn(300).promise().done(function() {
885
885
  Ei();
886
886
  });
887
887
  }
888
888
  function vn() {
889
- f(".loading-wrapper").fadeOut(300).promise().done(function() {
890
- f(".loading-wrapper").remove(), Ai();
889
+ v(".loading-wrapper").fadeOut(300).promise().done(function() {
890
+ v(".loading-wrapper").remove(), Ai();
891
891
  });
892
892
  }
893
893
  function bn(n, i) {
@@ -900,7 +900,7 @@ function Cs() {
900
900
  }
901
901
  function yn(n, i = () => {
902
902
  }) {
903
- f(`[data-tab-content=${n}]`).fadeIn(function() {
903
+ v(`[data-tab-content=${n}]`).fadeIn(function() {
904
904
  typeof i == "function" && i();
905
905
  }).siblings("[data-tab-content]").hide(), Cs();
906
906
  }
@@ -941,13 +941,13 @@ function En() {
941
941
  };
942
942
  }
943
943
  function An(n, i) {
944
- f(n).on("click", function() {
945
- f(this).toggleClass(i);
944
+ v(n).on("click", function() {
945
+ v(this).toggleClass(i);
946
946
  });
947
947
  }
948
948
  function Ln(n, i) {
949
- f(n).on("click", function() {
950
- f(n).not(this).removeClass(i), f(this).addClass(i);
949
+ v(n).on("click", function() {
950
+ v(n).not(this).removeClass(i), v(this).addClass(i);
951
951
  });
952
952
  }
953
953
  function Hs(n, i = 250) {
@@ -969,12 +969,12 @@ function Sn(n, i = 250) {
969
969
  };
970
970
  }
971
971
  function Dn() {
972
- window._g.interval = [], f(".countdown").each((i, t) => {
973
- const e = Number(f(t).attr("data-seconds")) + 1;
972
+ window._g.interval = [], v(".countdown").each((i, t) => {
973
+ const e = Number(v(t).attr("data-seconds")) + 1;
974
974
  let s = Math.floor(e / 60) + ":" + e % 60;
975
975
  window._g.interval[i] = setInterval(function() {
976
976
  var o = s.split(":"), a = parseInt(o[0], 10), r = parseInt(o[1], 10);
977
- --r, a = r < 0 ? --a : a, a = a < 10 ? a = "0" + a : a, a == 0 && r == 0 && clearInterval(window._g.interval[i]), r = r < 0 ? 59 : r, r = r < 10 ? "0" + r : r, f(t).html(a + ":" + r), s = a + ":" + r;
977
+ --r, a = r < 0 ? --a : a, a = a < 10 ? a = "0" + a : a, a == 0 && r == 0 && clearInterval(window._g.interval[i]), r = r < 0 ? 59 : r, r = r < 10 ? "0" + r : r, v(t).html(a + ":" + r), s = a + ":" + r;
978
978
  }, 1e3);
979
979
  });
980
980
  }
@@ -993,13 +993,13 @@ function kn() {
993
993
  n(), window.addEventListener("resize", Hs(n));
994
994
  }
995
995
  function $n(n, i, t, e, s) {
996
- const o = this, r = f(n).html().split("<br>");
996
+ const o = this, r = v(n).html().split("<br>");
997
997
  let l = "", c = 0;
998
998
  r.forEach((u, p) => {
999
- p !== 0 && (l += "<br>"), u.split("").forEach((m, v) => {
1000
- i ? (v === 0 && (l += '<span class="letter-wrap" style="display: inline-block">'), m === " " ? l += '</span> <span class="letter-wrap" style="display: inline-block">' : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${m}</span>`, c++), v === u.length - 1 && (l += "</span>")) : m === " " ? l += " " : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${m}</span>`, c++);
999
+ p !== 0 && (l += "<br>"), u.split("").forEach((m, f) => {
1000
+ i ? (f === 0 && (l += '<span class="letter-wrap" style="display: inline-block">'), m === " " ? l += '</span> <span class="letter-wrap" style="display: inline-block">' : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${m}</span>`, c++), f === u.length - 1 && (l += "</span>")) : m === " " ? l += " " : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${m}</span>`, c++);
1001
1001
  });
1002
- }), f(n).html(l);
1002
+ }), v(n).html(l);
1003
1003
  }
1004
1004
  function xn(n, i) {
1005
1005
  const t = Math.pow(10, i);
@@ -1022,7 +1022,7 @@ function Cn(n) {
1022
1022
  }
1023
1023
  function Hn(n, i) {
1024
1024
  const t = n.$el, e = n.params.grid.rows, s = i || n.params.slidesPerView * e;
1025
- (n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), f(n.params.navigation.nextEl).hide(), f(n.params.navigation.prevEl).hide(), f(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), f(n.params.navigation.nextEl).show(), f(n.params.navigation.prevEl).show(), f(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
1025
+ (n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), v(n.params.navigation.nextEl).hide(), v(n.params.navigation.prevEl).hide(), v(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), v(n.params.navigation.nextEl).show(), v(n.params.navigation.prevEl).show(), v(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
1026
1026
  }
1027
1027
  function Mn(n) {
1028
1028
  n.el.querySelectorAll("img.detect-shade").forEach((i) => {
@@ -1032,36 +1032,36 @@ function Mn(n) {
1032
1032
  });
1033
1033
  }
1034
1034
  function qn(n) {
1035
- const i = n.el, t = f(i).find(".swiper-slide-active"), e = f(t).find("video").get(0), s = f(i).find(".swiper-slide video");
1036
- n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
1035
+ const i = n.el, t = v(i).find(".swiper-slide-active"), e = v(t).find("video").get(0), s = v(i).find(".swiper-slide video");
1036
+ n.autoplay.stop(), v(e).off("ended"), e ? (s.each((o, a) => {
1037
1037
  a.currentTime = 0;
1038
- }), f(e).on("ended", function() {
1038
+ }), v(e).on("ended", function() {
1039
1039
  n.slideNext();
1040
1040
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1041
1041
  }
1042
1042
  function In() {
1043
- f(".number-grow").each(function(n, i) {
1044
- const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1043
+ v(".number-grow").each(function(n, i) {
1044
+ const t = v(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1045
1045
  let r = "";
1046
1046
  for (var l = 0; l <= 9; l++)
1047
1047
  r += String(l) + "<br>";
1048
1048
  return r;
1049
1049
  };
1050
- f(o).each(function(r, l) {
1050
+ v(o).each(function(r, l) {
1051
1051
  const c = () => l !== "," ? `<div class="num" data-final-num="${l}"><div><br>${a()}<br>${a()}</div></div>` : `<div class="comma">${l}</div>`;
1052
1052
  t.append(c);
1053
1053
  });
1054
1054
  });
1055
1055
  }
1056
1056
  function On() {
1057
- f(".letter-grow").each(function(n, i) {
1058
- const t = f(i), s = t.attr("data-letter").split(""), o = () => {
1057
+ v(".letter-grow").each(function(n, i) {
1058
+ const t = v(i), s = t.attr("data-letter").split(""), o = () => {
1059
1059
  let a = "";
1060
1060
  for (let r = 65; r <= 90; r++)
1061
1061
  a += String.fromCharCode(r) + "<br>";
1062
1062
  return a;
1063
1063
  };
1064
- f(s).each(function(a, r) {
1064
+ v(s).each(function(a, r) {
1065
1065
  const l = `<div class="letter" data-final-letter="${r}"><div><br>${o()}<br>${o()}</div></div>`;
1066
1066
  t.append(l);
1067
1067
  });
@@ -1105,7 +1105,7 @@ class qs {
1105
1105
  }
1106
1106
  V = new WeakSet(), Se = function() {
1107
1107
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Y;
1108
- if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1108
+ if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1109
1109
  for (const [o, a] of Object.entries(this.options.on))
1110
1110
  this.__events__[o] = [a];
1111
1111
  d(this, Ht, Li).call(this);
@@ -1119,31 +1119,31 @@ V = new WeakSet(), Se = function() {
1119
1119
  if (l === "onBox") {
1120
1120
  let g = null;
1121
1121
  if (u === "on") {
1122
- i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(E.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), T("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1122
+ i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(A.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), E("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1123
1123
  const m = s.querySelector("img");
1124
- m.insertAdjacentHTML(E.after, t[o]);
1125
- const v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1126
- !v && r == "youtube" ? p == "on" ? m.setAttribute("src", `http://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !v && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !v && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((b) => b.json()).then((b) => {
1124
+ m.insertAdjacentHTML(A.after, t[o]);
1125
+ const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1126
+ !f && r == "youtube" ? p == "on" ? m.setAttribute("src", `http://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !f && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !f && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((b) => b.json()).then((b) => {
1127
1127
  const y = b.thumbnail_url;
1128
1128
  m.setAttribute("src", `${y}`);
1129
1129
  }).catch(function(b) {
1130
1130
  console.log("error");
1131
- }) : T("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1131
+ }) : E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1132
1132
  }
1133
- c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || T("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, K, De), g.addEventListener("click", g.video.eventHandler);
1133
+ c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || E("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, K, De), g.addEventListener("click", g.video.eventHandler);
1134
1134
  } else if (l === "onPage") {
1135
1135
  let g = null;
1136
1136
  if (u == "on") {
1137
- i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(E.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), T("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1137
+ i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(A.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), E("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1138
1138
  const m = s.querySelector("img");
1139
- m.insertAdjacentHTML(E.after, t[o]);
1140
- const v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1141
- !v && r == "youtube" ? p == "on" ? m.setAttribute("src", `http://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !v && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !v && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((b) => b.json()).then((b) => {
1139
+ m.insertAdjacentHTML(A.after, t[o]);
1140
+ const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1141
+ !f && r == "youtube" ? p == "on" ? m.setAttribute("src", `http://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !f && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !f && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((b) => b.json()).then((b) => {
1142
1142
  const y = b.thumbnail_url;
1143
1143
  m.setAttribute("src", `${y}`);
1144
1144
  }).catch(function(b) {
1145
1145
  console.log("error");
1146
- }) : v || T("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || T("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1146
+ }) : f || E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || E("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1147
1147
  } else {
1148
1148
  s.innerHTML = Te(e);
1149
1149
  return;
@@ -1171,7 +1171,14 @@ V = new WeakSet(), Se = function() {
1171
1171
  },
1172
1172
  open(g) {
1173
1173
  const m = g.querySelectorAll("[data-overlayscrollbars-viewport]");
1174
- u.update(), Ei([...m]);
1174
+ if (u.update(), Ei([...m]), l == "instagram") {
1175
+ const f = document.querySelector("[video-template] .modal-content");
1176
+ let b = f.offsetHeight;
1177
+ new ResizeObserver((_) => {
1178
+ for (let P of _)
1179
+ P.contentRect.height !== b && f.classList.add("active");
1180
+ }).observe(f);
1181
+ }
1175
1182
  },
1176
1183
  close(g) {
1177
1184
  const m = g.querySelectorAll("[data-overlayscrollbars-viewport]");
@@ -2052,9 +2059,9 @@ const Oe = {
2052
2059
  const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
2053
2060
  i && i.forEach((e) => {
2054
2061
  const s = document.querySelector(e);
2055
- s || T("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && x(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2062
+ s || E("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && C(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2056
2063
  });
2057
- }, x = (n, i) => {
2064
+ }, C = (n, i) => {
2058
2065
  const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
2059
2066
  if (i < 0 || i.length === 0) {
2060
2067
  switch (e.forEach((s) => {
@@ -2095,7 +2102,7 @@ const Oe = {
2095
2102
  const o = n.querySelectorAll(".dropdown-list li.active");
2096
2103
  o.length <= 0 ? n.s.selectDisplayEl.textContent = t.trim() : (n.s.selectDisplayEl.textContent = "", o.forEach((r) => {
2097
2104
  const l = r.getAttribute("data-option"), c = r.textContent.trim(), u = `<div class="option-btn" data-option="${l}"><div class="text">${c}</div><div class="remove-icon"></div></div>`;
2098
- n.s.selectDisplayEl.insertAdjacentHTML(E.append, u);
2105
+ n.s.selectDisplayEl.insertAdjacentHTML(A.append, u);
2099
2106
  })), n.s.activeLi = o, n.s.value = [...o].map((r) => ({
2100
2107
  index: [...e].indexOf(r),
2101
2108
  id: r.getAttribute("data-option"),
@@ -2119,7 +2126,7 @@ const Oe = {
2119
2126
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
2120
2127
  });
2121
2128
  }, _i = () => {
2122
- L('dropdown-el[d4-status="open"]').forEach((i) => {
2129
+ S('dropdown-el[d4-status="open"]').forEach((i) => {
2123
2130
  i.close();
2124
2131
  });
2125
2132
  }, js = () => {
@@ -2162,7 +2169,7 @@ class ki extends HTMLElement {
2162
2169
  switch (o.hasAttribute("multiple") ? "multiple" : "single") {
2163
2170
  case "single":
2164
2171
  const r = o.querySelector(`.dropdown-list li[data-option="${s}"]`);
2165
- w(r) ? x(o, [...o.s.allLi].indexOf(r)) : x(o, -1);
2172
+ w(r) ? C(o, [...o.s.allLi].indexOf(r)) : C(o, -1);
2166
2173
  break;
2167
2174
  case "multiple":
2168
2175
  const l = [];
@@ -2171,17 +2178,17 @@ class ki extends HTMLElement {
2171
2178
  w(p) && (p.classList.add("active"), l.push(p));
2172
2179
  });
2173
2180
  const c = l.map((u) => [...o.s.allLi].indexOf(u));
2174
- x(o, c);
2181
+ C(o, c);
2175
2182
  break;
2176
2183
  }
2177
2184
  else
2178
- x(o, -1);
2185
+ C(o, -1);
2179
2186
  o.emit("change");
2180
2187
  break;
2181
2188
  case "d4-placeholder":
2182
2189
  if (e === null)
2183
2190
  return;
2184
- e !== s && o.s.value.index < 0 && x(o, o.s.value.index);
2191
+ e !== s && o.s.value.index < 0 && C(o, o.s.value.index);
2185
2192
  break;
2186
2193
  }
2187
2194
  }
@@ -2262,7 +2269,7 @@ It = new WeakSet(), $i = function() {
2262
2269
  };
2263
2270
  break;
2264
2271
  }
2265
- x(t, t.s.value.index), d(s = t, Nt, Hi).call(s), t.classList.add("d4-initialize");
2272
+ C(t, t.s.value.index), d(s = t, Nt, Hi).call(s), t.classList.add("d4-initialize");
2266
2273
  }, Nt = new WeakSet(), Hi = function() {
2267
2274
  const t = this;
2268
2275
  t.__events__.dropdownToggle = () => {
@@ -2323,30 +2330,30 @@ It = new WeakSet(), $i = function() {
2323
2330
  const u = this, p = [...e.s.allLi].indexOf(u), g = parseInt(e.getAttribute("d4-default-height"));
2324
2331
  if (u.classList.contains("has-sublayer")) {
2325
2332
  c.stopPropagation();
2326
- const v = u.querySelector(".sub-dropdown"), b = v.querySelector(".sub-dropdown-list"), y = parseInt(getComputedStyle(b).marginTop) + parseInt(getComputedStyle(b).marginBottom);
2327
- v.style.cssText = `--height: ${b.offsetHeight + y}px`;
2328
- const H = parseInt(v.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), S = () => {
2329
- s = g + e.s.subDropdownTotalH, o = s > G ? G : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2333
+ const f = u.querySelector(".sub-dropdown"), b = f.querySelector(".sub-dropdown-list"), y = parseInt(getComputedStyle(b).marginTop) + parseInt(getComputedStyle(b).marginBottom);
2334
+ f.style.cssText = `--height: ${b.offsetHeight + y}px`;
2335
+ const _ = parseInt(f.style.cssText.replace("--height:", "").trim()), P = parseInt(getComputedStyle(a).maxHeight), T = () => {
2336
+ s = g + e.s.subDropdownTotalH, o = s > P ? P : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2330
2337
  };
2331
- u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= H, S()) : (u.classList.add("open"), e.s.subDropdownTotalH += H, S());
2332
- const X = () => {
2333
- e.__scroller__.update(!0), v.removeEventListener("transitionend", X);
2338
+ u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= _, T()) : (u.classList.add("open"), e.s.subDropdownTotalH += _, T());
2339
+ const R = () => {
2340
+ e.__scroller__.update(!0), f.removeEventListener("transitionend", R);
2334
2341
  };
2335
- v.addEventListener("transitionend", X);
2342
+ f.addEventListener("transitionend", R);
2336
2343
  } else
2337
2344
  switch (Os(e), e.s.selectType) {
2338
2345
  case "single":
2339
2346
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2340
- const v = e.s.cityLang, b = l.textContent.trim(), y = document.getElementById(e.getAttribute("dist-select"));
2341
- y && (y.querySelector(".dropdown-list").textContent = "", x(y, -1), Oe[v][b].forEach((H, G) => {
2342
- const S = document.createElement("li");
2343
- S.textContent = H[0], S.setAttribute("data-option", H[0]), y.querySelector(".dropdown-list").append(S);
2347
+ const f = e.s.cityLang, b = l.textContent.trim(), y = document.getElementById(e.getAttribute("dist-select"));
2348
+ y && (y.querySelector(".dropdown-list").textContent = "", C(y, -1), Oe[f][b].forEach((_, P) => {
2349
+ const T = document.createElement("li");
2350
+ T.textContent = _[0], T.setAttribute("data-option", _[0]), y.querySelector(".dropdown-list").append(T);
2344
2351
  }), e.__events__.selectOption(y));
2345
2352
  }
2346
2353
  (m = u.parentNode.closest("li")) != null && m.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2347
2354
  break;
2348
2355
  case "multiple":
2349
- c.stopPropagation(), u.classList.toggle("active"), x(e, p);
2356
+ c.stopPropagation(), u.classList.toggle("active"), C(e, p);
2350
2357
  break;
2351
2358
  }
2352
2359
  });
@@ -2417,7 +2424,7 @@ function zs(n) {
2417
2424
  }
2418
2425
  n.s.animation = null, n.s.animateEl = a, n.textContent = "", o.append(a), n.append(o), a.clientWidth * 2 + e >= n.clientWidth ? i === "normal" && t && o.append(r()) : n.s.options.continual = !1;
2419
2426
  }
2420
- function _(n) {
2427
+ function k(n) {
2421
2428
  const { behavior: i, direction: t, continual: e } = n.s.options;
2422
2429
  let s = {};
2423
2430
  switch (i) {
@@ -2506,20 +2513,20 @@ class Bs extends HTMLElement {
2506
2513
  }
2507
2514
  jt = new WeakSet(), Mi = function() {
2508
2515
  const t = {
2509
- direction: this.getAttribute("direction") || $.SETTINGS.direction,
2516
+ direction: this.getAttribute("direction") || x.SETTINGS.direction,
2510
2517
  // up / down / left / right
2511
- behavior: this.getAttribute("behavior") || $.SETTINGS.behavior,
2518
+ behavior: this.getAttribute("behavior") || x.SETTINGS.behavior,
2512
2519
  // normal / alternate / endStop
2513
- duration: Number(this.getAttribute("duration")) || $.SETTINGS.duration,
2520
+ duration: Number(this.getAttribute("duration")) || x.SETTINGS.duration,
2514
2521
  // ms
2515
- durationBreakpoints: ct(this) || $.SETTINGS.durationBreakpoints,
2516
- autoplay: this.getAttribute("autoplay") || $.SETTINGS.autoplay,
2522
+ durationBreakpoints: ct(this) || x.SETTINGS.durationBreakpoints,
2523
+ autoplay: this.getAttribute("autoplay") || x.SETTINGS.autoplay,
2517
2524
  // normal / alternate / endStop
2518
- pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : $.SETTINGS.pauseOnMouseenter,
2525
+ pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : x.SETTINGS.pauseOnMouseenter,
2519
2526
  // true / false
2520
- continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : $.SETTINGS.continual,
2527
+ continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : x.SETTINGS.continual,
2521
2528
  // true / false
2522
- gap: Number(this.getAttribute("gap")) || $.SETTINGS.gap
2529
+ gap: Number(this.getAttribute("gap")) || x.SETTINGS.gap
2523
2530
  };
2524
2531
  this.s = {}, this.s.options = t, this.s.nowDuration = Be(this), zs(this), d(this, zt, qi).call(this);
2525
2532
  }, zt = new WeakSet(), qi = function() {
@@ -2541,10 +2548,10 @@ jt = new WeakSet(), Mi = function() {
2541
2548
  function u() {
2542
2549
  switch (s) {
2543
2550
  case "normal":
2544
- t.s.animateEl.style.transform = `${_(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2551
+ t.s.animateEl.style.transform = `${k(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(k(t).animate1, {
2545
2552
  duration: t.s.nowDuration,
2546
2553
  iterations: 1 / 0
2547
- }), l && (t.s.cloneAnimateEl.style.transform = `${_(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(_(t).animate2, {
2554
+ }), l && (t.s.cloneAnimateEl.style.transform = `${k(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(k(t).animate2, {
2548
2555
  duration: t.s.nowDuration,
2549
2556
  delay: -t.s.nowDuration / 2,
2550
2557
  iterations: 1 / 0
@@ -2552,28 +2559,28 @@ jt = new WeakSet(), Mi = function() {
2552
2559
  break;
2553
2560
  case "alternate":
2554
2561
  let m = function() {
2555
- let v = [];
2562
+ let f = [];
2556
2563
  switch (e) {
2557
2564
  case "top":
2558
- p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
2565
+ p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollHeight, f = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
2559
2566
  break;
2560
2567
  case "right":
2561
- p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
2568
+ p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollWidth, f = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
2562
2569
  break;
2563
2570
  case "bottom":
2564
- p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
2571
+ p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollHeight, f = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
2565
2572
  break;
2566
2573
  case "left":
2567
- p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
2574
+ p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollWidth, f = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
2568
2575
  break;
2569
2576
  }
2570
- return v;
2577
+ return f;
2571
2578
  }, p, g;
2572
2579
  (t.clientHeight > t.s.animateEl.scrollHeight || e === "left" || e === "right") && (t.s.animateEl.style.transform = `${m()[0].transform}`, t.s.animateEl.animate(m(), {
2573
2580
  duration: g,
2574
2581
  fill: "forwards"
2575
2582
  }).finished.then(() => {
2576
- t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2583
+ t.s.animation = t.s.animateEl.animate(k(t).animate1, {
2577
2584
  duration: t.s.nowDuration,
2578
2585
  iterations: 1 / 0
2579
2586
  });
@@ -2582,7 +2589,7 @@ jt = new WeakSet(), Mi = function() {
2582
2589
  });
2583
2590
  break;
2584
2591
  case "endStop":
2585
- t.s.animateEl.style.transform = `${_(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2592
+ t.s.animateEl.style.transform = `${k(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(k(t).animate1, {
2586
2593
  duration: t.s.nowDuration,
2587
2594
  fill: "forwards"
2588
2595
  });
@@ -2604,10 +2611,10 @@ jt = new WeakSet(), Mi = function() {
2604
2611
  const t = this;
2605
2612
  function e() {
2606
2613
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
2607
- t.s.nowDuration = Be(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2614
+ t.s.nowDuration = Be(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(k(t).animate1, {
2608
2615
  duration: t.s.nowDuration,
2609
2616
  iterations: 1 / 0
2610
- }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(_(t).animate2, {
2617
+ }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(k(t).animate2, {
2611
2618
  duration: t.s.nowDuration,
2612
2619
  delay: -t.s.nowDuration / 2,
2613
2620
  iterations: 1 / 0
@@ -2621,7 +2628,7 @@ const ht = function(n, i) {
2621
2628
  return function(e) {
2622
2629
  t && clearTimeout(t), t = setTimeout(n, 200, e);
2623
2630
  };
2624
- }, k = (n, i) => {
2631
+ }, $ = (n, i) => {
2625
2632
  if (rt(n)) {
2626
2633
  n.forEach((t) => {
2627
2634
  t.classList.add(i);
@@ -2638,19 +2645,19 @@ const ht = function(n, i) {
2638
2645
  }
2639
2646
  n.classList.remove(i);
2640
2647
  };
2641
- var Gt, Pi, Xt, Ni, Rt, ji, tt, _e, W, dt, Ft, zi;
2648
+ var Gt, Pi, Rt, Ni, Xt, ji, tt, _e, B, dt, Ft, zi;
2642
2649
  class Ge {
2643
2650
  constructor(i) {
2644
2651
  // 初始化
2645
2652
  h(this, Gt);
2646
2653
  // 左右箭頭事件綁定
2647
- h(this, Xt);
2648
- // 左右拖拉事件綁定
2649
2654
  h(this, Rt);
2655
+ // 左右拖拉事件綁定
2656
+ h(this, Xt);
2650
2657
  // 卷軸位置判斷
2651
2658
  h(this, tt);
2652
2659
  // 隱藏按鈕判斷
2653
- h(this, W);
2660
+ h(this, B);
2654
2661
  // 選項事件綁定
2655
2662
  h(this, Ft);
2656
2663
  this.$element = i, this.option = i.s.option.drag, d(this, Gt, Pi).call(this);
@@ -2675,10 +2682,10 @@ Gt = new WeakSet(), Pi = function() {
2675
2682
  i.$container = i.$element.querySelector(".drag-container"), i.$wrapper = i.$container.querySelector(".wrapper");
2676
2683
  const t = () => {
2677
2684
  var c, u;
2678
- d(c = i, tt, _e).call(c), d(u = i, W, dt).call(u);
2685
+ d(c = i, tt, _e).call(c), d(u = i, B, dt).call(u);
2679
2686
  };
2680
- i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", ht(t)), window.addEventListener("resize", ht(t)), (i.option.draggable || i.$element.s.type == "collapse") && d(e = i, Rt, ji).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2681
- E.prepend,
2687
+ i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", ht(t)), window.addEventListener("resize", ht(t)), (i.option.draggable || i.$element.s.type == "collapse") && d(e = i, Xt, ji).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2688
+ A.prepend,
2682
2689
  `<div class="navigation">
2683
2690
  <div class="button prev">
2684
2691
  <div></div>
@@ -2687,8 +2694,8 @@ Gt = new WeakSet(), Pi = function() {
2687
2694
  <div></div>
2688
2695
  </div>
2689
2696
  </div>`
2690
- ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Xt, Ni).call(o)), d(a = i, tt, _e).call(a), d(r = i, W, dt).call(r), d(l = i, Ft, zi).call(l), i.update();
2691
- }, Xt = new WeakSet(), Ni = function() {
2697
+ ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Rt, Ni).call(o)), d(a = i, tt, _e).call(a), d(r = i, B, dt).call(r), d(l = i, Ft, zi).call(l), i.update();
2698
+ }, Rt = new WeakSet(), Ni = function() {
2692
2699
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2693
2700
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
2694
2701
  t.scrollTo({
@@ -2696,13 +2703,13 @@ Gt = new WeakSet(), Pi = function() {
2696
2703
  behavior: "smooth"
2697
2704
  }), setTimeout(() => {
2698
2705
  var r;
2699
- d(r = i, W, dt).call(r);
2706
+ d(r = i, B, dt).call(r);
2700
2707
  }, 100);
2701
2708
  };
2702
2709
  e.forEach((o) => {
2703
2710
  o.removeEventListener("click", s), o.addEventListener("click", s);
2704
2711
  });
2705
- }, Rt = new WeakSet(), ji = function() {
2712
+ }, Xt = new WeakSet(), ji = function() {
2706
2713
  const { $wrapper: i } = this;
2707
2714
  let t = !1, e = !1, s = 0, o = 0;
2708
2715
  const a = function(p) {
@@ -2734,25 +2741,25 @@ Gt = new WeakSet(), Pi = function() {
2734
2741
  });
2735
2742
  }, tt = new WeakSet(), _e = function() {
2736
2743
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = t.scrollLeft;
2737
- e <= 0 || (k(i, "scrollable"), s == 0 ? (D(i, "scrollable"), k(t, "start"), D(t, "end")) : s >= e ? (D(i, "scrollable"), D(t, "start"), k(t, "end")) : (k(t, "center"), D(t, "start"), D(t, "end")));
2738
- }, W = new WeakSet(), dt = function() {
2744
+ e <= 0 || ($(i, "scrollable"), s == 0 ? (D(i, "scrollable"), $(t, "start"), D(t, "end")) : s >= e ? (D(i, "scrollable"), D(t, "start"), $(t, "end")) : ($(t, "center"), D(t, "start"), D(t, "end")));
2745
+ }, B = new WeakSet(), dt = function() {
2739
2746
  const { $wrapper: i, $button: t, $element: e } = this;
2740
2747
  if (!t)
2741
2748
  return;
2742
2749
  const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
2743
2750
  if (s <= 0) {
2744
- k(t, "hide"), D(t, "active"), k(e, "noScrollable");
2751
+ $(t, "hide"), D(t, "active"), $(e, "noScrollable");
2745
2752
  return;
2746
2753
  }
2747
- s > 0 && (k(t, "active"), D(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2754
+ s > 0 && ($(t, "active"), D(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2748
2755
  if (a.classList.contains("next")) {
2749
2756
  D(a, "hide");
2750
2757
  return;
2751
2758
  }
2752
- k(a, "hide");
2759
+ $(a, "hide");
2753
2760
  }) : o >= s ? t.forEach((a) => {
2754
2761
  if (a.classList.contains("next")) {
2755
- k(a, "hide");
2762
+ $(a, "hide");
2756
2763
  return;
2757
2764
  }
2758
2765
  D(a, "hide");
@@ -2771,7 +2778,7 @@ Gt = new WeakSet(), Pi = function() {
2771
2778
  s.removeEventListener("click", e), s.addEventListener("click", e);
2772
2779
  });
2773
2780
  };
2774
- var Yt, Wi, Ut, Bi, Jt, Gi, Zt, Xi;
2781
+ var Yt, Wi, Ut, Bi, Jt, Gi, Zt, Ri;
2775
2782
  class Gs {
2776
2783
  constructor(i) {
2777
2784
  // 初始化
@@ -2786,16 +2793,16 @@ class Gs {
2786
2793
  }
2787
2794
  }
2788
2795
  Yt = new WeakSet(), Wi = function() {
2789
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Ut, Bi).call(this) && d(this, Jt, Gi).call(this), d(this, Zt, Xi).call(this));
2796
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Ut, Bi).call(this) && d(this, Jt, Gi).call(this), d(this, Zt, Ri).call(this));
2790
2797
  }, Ut = new WeakSet(), Bi = function() {
2791
2798
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2792
- return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(E.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), !0) : !1;
2799
+ return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(A.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), !0) : !1;
2793
2800
  }, Jt = new WeakSet(), Gi = function() {
2794
2801
  const { $element: i, $button: t } = this, e = function() {
2795
2802
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
2796
2803
  };
2797
2804
  t.removeEventListener("click", e), t.addEventListener("click", e);
2798
- }, Zt = new WeakSet(), Xi = function() {
2805
+ }, Zt = new WeakSet(), Ri = function() {
2799
2806
  const { $element: i } = this, t = (s, o) => {
2800
2807
  if (i != null && i.classList.contains("expand") ? i == null || i.classList.remove("expand") : i == null || i.classList.add("expand"), this.option.selected) {
2801
2808
  const a = s.getAttribute("data-option").trim();
@@ -2809,12 +2816,12 @@ Yt = new WeakSet(), Wi = function() {
2809
2816
  s.removeEventListener("click", e), s.addEventListener("click", e);
2810
2817
  });
2811
2818
  };
2812
- const Xs = (n) => {
2819
+ const Rs = (n) => {
2813
2820
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2814
- return i == "drag" && (s.innerHTML = C.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(E.append, e)), i == "collapse" && (s.innerHTML = C.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(E.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(E.append, e)), i == "dropdown" && (s.innerHTML = C.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(E.append, e)), s.children;
2821
+ return i == "drag" && (s.innerHTML = H.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(A.append, e)), i == "collapse" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(A.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(A.append, e)), i == "dropdown" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(A.append, e)), s.children;
2815
2822
  };
2816
- var Qt, Ri, Vt, Fi, et, ke, B, ut;
2817
- class Rs extends HTMLElement {
2823
+ var Qt, Xi, Vt, Fi, et, ke, G, ut;
2824
+ class Xs extends HTMLElement {
2818
2825
  constructor() {
2819
2826
  super();
2820
2827
  h(this, Qt);
@@ -2822,7 +2829,7 @@ class Rs extends HTMLElement {
2822
2829
  // 斷點設定
2823
2830
  h(this, et);
2824
2831
  // check type
2825
- h(this, B);
2832
+ h(this, G);
2826
2833
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
2827
2834
  }
2828
2835
  static get observedAttributes() {
@@ -2834,7 +2841,7 @@ class Rs extends HTMLElement {
2834
2841
  case "m4-type":
2835
2842
  if (e === null || e === s)
2836
2843
  return;
2837
- this.s.type = s, d(this, B, ut).call(this);
2844
+ this.s.type = s, d(this, G, ut).call(this);
2838
2845
  break;
2839
2846
  case "m4-status":
2840
2847
  if (e === s)
@@ -2851,15 +2858,15 @@ class Rs extends HTMLElement {
2851
2858
  }
2852
2859
  }
2853
2860
  connectedCallback() {
2854
- this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, Qt, Ri).call(this));
2861
+ this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, Qt, Xi).call(this));
2855
2862
  }
2856
2863
  update() {
2857
2864
  d(this, et, ke).call(this);
2858
2865
  }
2859
2866
  }
2860
- Qt = new WeakSet(), Ri = function() {
2867
+ Qt = new WeakSet(), Xi = function() {
2861
2868
  let t = {};
2862
- this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? C.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2869
+ this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? H.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2863
2870
  const e = (s) => {
2864
2871
  if (s.type === "resize") {
2865
2872
  if (window.innerWidth === this.previousWidth)
@@ -2868,23 +2875,23 @@ Qt = new WeakSet(), Ri = function() {
2868
2875
  }
2869
2876
  this.update();
2870
2877
  };
2871
- window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, C.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, C.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, C.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, C.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Vt, Fi).call(this);
2878
+ window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, H.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, H.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, H.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, H.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Vt, Fi).call(this);
2872
2879
  }, Vt = new WeakSet(), Fi = function() {
2873
2880
  this.classList.add("m4-init"), d(this, et, ke).call(this);
2874
2881
  }, et = new WeakSet(), ke = function() {
2875
2882
  const t = Object.keys(this.s.option.breakpoint);
2876
2883
  if (!t.length) {
2877
- d(this, B, ut).call(this);
2884
+ d(this, G, ut).call(this);
2878
2885
  return;
2879
2886
  }
2880
2887
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
2881
2888
  var s, o, a, r;
2882
- return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, B, ut).call(this), window.innerWidth >= e;
2889
+ return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, G, ut).call(this), window.innerWidth >= e;
2883
2890
  });
2884
- }, B = new WeakSet(), ut = function() {
2891
+ }, G = new WeakSet(), ut = function() {
2885
2892
  var o;
2886
2893
  const { type: t } = this.s;
2887
- this.innerHTML = "", [...Xs(this)].forEach((a) => {
2894
+ this.innerHTML = "", [...Rs(this)].forEach((a) => {
2888
2895
  this.append(a);
2889
2896
  });
2890
2897
  const e = this.querySelector(`.drag-container .item[data-option="${this.getAttribute("m4-status")}"]`), s = this.querySelector(`.collapse-container .item[data-option="${this.getAttribute("m4-status")}"]`);
@@ -2902,8 +2909,8 @@ Qt = new WeakSet(), Ri = function() {
2902
2909
  }
2903
2910
  (o = this.constructor.drag) == null || o.update(this);
2904
2911
  };
2905
- customElements.define("multipurpose-nav", Rs);
2906
- var Kt, Ui, te, Ji, it, $e, N, F, ee, Zi, ie, Qi, se, Vi, ne, Ki, oe, ts, ae, es, re, is, le, ss, ce, ns, q, z, de, os, ue, as, he, rs, pe, ls;
2912
+ customElements.define("multipurpose-nav", Xs);
2913
+ var Kt, Ui, te, Ji, it, $e, j, F, ee, Zi, ie, Qi, se, Vi, ne, Ki, oe, ts, ae, es, re, is, le, ss, ce, ns, q, W, de, os, ue, as, he, rs, pe, ls;
2907
2914
  class Yi extends HTMLElement {
2908
2915
  // 定義組件的初始狀態
2909
2916
  constructor(t, e) {
@@ -2913,7 +2920,7 @@ class Yi extends HTMLElement {
2913
2920
  // 第一關 判斷數量以及id設定
2914
2921
  h(this, it);
2915
2922
  // 第二關 id命名提醒
2916
- h(this, N);
2923
+ h(this, j);
2917
2924
  h(this, ee);
2918
2925
  h(this, ie);
2919
2926
  h(this, se);
@@ -2956,26 +2963,26 @@ class Yi extends HTMLElement {
2956
2963
  tabClick(t) {
2957
2964
  const { t: e } = this, s = e.tabs.indexOf(t) % e.tabPanels.length, o = e.tabGroup === "true" ? String(s) : t.getAttribute("t4-id");
2958
2965
  this.setActiveTab(o), setTimeout(() => {
2959
- d(this, q, z).call(this, "eventAnchor");
2966
+ d(this, q, W).call(this, "eventAnchor");
2960
2967
  }, e.transition.duration);
2961
2968
  }
2962
2969
  // 外部呼叫方法 $0.setActiveTab(0)
2963
2970
  setActiveTab(t) {
2964
2971
  const { t: e } = this, s = t === "" ? e.tabPanels[0].getAttribute("t4-id") : t;
2965
2972
  e.activeTab = s, this.setAttribute("t4-active", s);
2966
- const o = d(this, N, F).call(this, s);
2973
+ const o = d(this, j, F).call(this, s);
2967
2974
  e.tabPanels.forEach((a, r) => {
2968
2975
  r === o ? d(this, ue, as).call(this, r) : d(this, de, os).call(this, r);
2969
2976
  });
2970
2977
  }
2971
2978
  // 外部呼叫方法 $0.goNext()
2972
2979
  goNext() {
2973
- const t = d(this, N, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2980
+ const t = d(this, j, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2974
2981
  this.setActiveTab(s);
2975
2982
  }
2976
2983
  // 外部呼叫方法 $0.goPrev()
2977
2984
  goPrev() {
2978
- const t = d(this, N, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2985
+ const t = d(this, j, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2979
2986
  this.setActiveTab(s);
2980
2987
  }
2981
2988
  // 外部呼叫方法 $0.update()
@@ -3015,7 +3022,7 @@ Kt = new WeakSet(), Ui = function() {
3015
3022
  return t.type === "normal" && t.tabGroup === "true" && t.tabPanels.length !== e.length && console.warn("按鈕與內容數量不同喔", t.tabPanels.length, e.length), t.tabGroup === "true" ? t.tabPanels.forEach((s, o) => s.setAttribute("t4-id", o)) : t.tabPanels.forEach((s) => {
3016
3023
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
3017
3024
  }), e;
3018
- }, N = new WeakSet(), F = function(t) {
3025
+ }, j = new WeakSet(), F = function(t) {
3019
3026
  const { t: e } = this, s = e.tabPanels.filter((a) => a.getAttribute("t4-id") === t);
3020
3027
  s.length > 1 && console.warn("有兩個相同id設定", s);
3021
3028
  const o = s[0];
@@ -3067,7 +3074,7 @@ Kt = new WeakSet(), Ui = function() {
3067
3074
  }) : this.t.tabs.forEach((s, o) => {
3068
3075
  s.getAttribute("t4-id") === e ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
3069
3076
  });
3070
- }, q = new WeakSet(), z = function(t, e, s) {
3077
+ }, q = new WeakSet(), W = function(t, e, s) {
3071
3078
  switch (t) {
3072
3079
  case "step":
3073
3080
  ye(this.t.step) && d(this, ae, es).call(this, e);
@@ -3131,8 +3138,8 @@ Kt = new WeakSet(), Ui = function() {
3131
3138
  break;
3132
3139
  }
3133
3140
  }, he = new WeakSet(), rs = function(t) {
3134
- const e = d(this, N, F).call(this, t);
3135
- d(this, q, z).call(this, "step", e), d(this, q, z).call(this, "btnState", e), d(this, q, z).call(this, "tabState", e, t), d(this, q, z).call(this, "tabUrl", t), this.emit("change");
3141
+ const e = d(this, j, F).call(this, t);
3142
+ d(this, q, W).call(this, "step", e), d(this, q, W).call(this, "btnState", e), d(this, q, W).call(this, "tabState", e, t), d(this, q, W).call(this, "tabUrl", t), this.emit("change");
3136
3143
  }, pe = new WeakSet(), ls = function() {
3137
3144
  const t = this;
3138
3145
  window.addEventListener(
@@ -3181,7 +3188,7 @@ function cs() {
3181
3188
  cs();
3182
3189
  Object.assign(Yi.prototype, O);
3183
3190
  customElements.define("tab-el", Yi);
3184
- const Xe = (n) => {
3191
+ const Re = (n) => {
3185
3192
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
3186
3193
  n.classList.add(t), o.style.height = 0, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3187
3194
  }, Ys = (n) => {
@@ -3206,7 +3213,7 @@ class Us {
3206
3213
  }
3207
3214
  st = new WeakSet(), xe = function() {
3208
3215
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Je;
3209
- if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3216
+ if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3210
3217
  for (const [o, a] of Object.entries(this.options.on))
3211
3218
  this.__events__[o] = [a];
3212
3219
  d(this, me, ds).call(this);
@@ -3226,8 +3233,8 @@ st = new WeakSet(), xe = function() {
3226
3233
  }, nt = new WeakSet(), Ce = function() {
3227
3234
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3228
3235
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3229
- Xe(l);
3230
- }), Ys(r)) : Xe(r), i.emit("afterCollapse");
3236
+ Re(l);
3237
+ }), Ys(r)) : Re(r), i.emit("afterCollapse");
3231
3238
  };
3232
3239
  Object.assign(Us.prototype, O);
3233
3240
  function Js(n, i) {
@@ -3353,7 +3360,7 @@ class Qs {
3353
3360
  this.init();
3354
3361
  }
3355
3362
  }
3356
- function Re(n, i) {
3363
+ function Xe(n, i) {
3357
3364
  return n ? function(t, e) {
3358
3365
  Function(n)(t, e);
3359
3366
  } : i;
@@ -3467,8 +3474,8 @@ class on {
3467
3474
  previewSize: e.dataset.previewSize || i.params.previewSize,
3468
3475
  compress: e.dataset.compress || i.params.compress,
3469
3476
  on: {
3470
- changeAfter: Re(e.dataset.changeAfter, i.params.on.changeAfter),
3471
- overLimit: Re(e.dataset.overLimit, i.params.on.overLimit)
3477
+ changeAfter: Xe(e.dataset.changeAfter, i.params.on.changeAfter),
3478
+ overLimit: Xe(e.dataset.overLimit, i.params.on.overLimit)
3472
3479
  }
3473
3480
  };
3474
3481
  i.params = o, typeof uploadImage[`${o.group}`] > "u" && (uploadImage[`${o.group}`] = []), e.dataset.group || (e.dataset.group = o.group), e.dataset.index = document.querySelectorAll(`[data-group="${o.group}"]`).length - 1, e.addEventListener("change", function(a) {
@@ -3508,13 +3515,13 @@ export {
3508
3515
  Ts as c,
3509
3516
  ws as d,
3510
3517
  Y as e,
3511
- E as f,
3512
- L as g,
3518
+ A as f,
3519
+ S as g,
3513
3520
  mn as h,
3514
3521
  at as i,
3515
3522
  ui as j,
3516
3523
  Bs as k,
3517
- Rs as l,
3524
+ Xs as l,
3518
3525
  on as m,
3519
3526
  Hs as n,
3520
3527
  jn as o,