@xwadex/fesd 0.0.14-re.35 → 0.0.14-re.37

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.
@@ -53,7 +53,7 @@ const Y = {
53
53
  className: null,
54
54
  duration: 1500
55
55
  }
56
- }, q = {
56
+ }, I = {
57
57
  SETTINGS: {
58
58
  target: null,
59
59
  route: null,
@@ -84,7 +84,7 @@ const Y = {
84
84
  </div>
85
85
  `;
86
86
  }
87
- }, D = {
87
+ }, _ = {
88
88
  SETTINGS: {
89
89
  direction: "left",
90
90
  // 方向 - top || right || bottom || left
@@ -173,7 +173,7 @@ const Y = {
173
173
  beforeScroll: null,
174
174
  afterScroll: null
175
175
  }
176
- }, x = {
176
+ }, $ = {
177
177
  SETTINGS: {
178
178
  type: "drag",
179
179
  drag: {
@@ -290,9 +290,9 @@ const Y = {
290
290
  article4: fs,
291
291
  collapse4: Ye,
292
292
  dropdown4: He,
293
- marquee4: D,
294
- modal4: q,
295
- multipurpose4: x,
293
+ marquee4: _,
294
+ modal4: I,
295
+ multipurpose4: $,
296
296
  ripple4: Ue,
297
297
  share4: gs,
298
298
  tab4: Fe,
@@ -302,7 +302,7 @@ const Y = {
302
302
  after: "afterend",
303
303
  append: "beforeend",
304
304
  prepend: "afterbegin"
305
- }, at = (n) => typeof n == "string" && n !== "", ve = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, b = (n) => T(n) !== null, P = (n) => typeof n == "function", T = (n) => ve(n) ? n : document.querySelector(n), B = (n) => rt(n) ? n : document.querySelectorAll(n), vs = () => Math.random().toString(36).substr(2, 9), bs = (n) => {
305
+ }, at = (n) => typeof n == "string" && n !== "", ve = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, b = (n) => T(n) !== null, j = (n) => typeof n == "function", T = (n) => ve(n) ? n : document.querySelector(n), E = (n) => rt(n) ? n : document.querySelectorAll(n), vs = () => Math.random().toString(36).substr(2, 9), bs = (n) => {
306
306
  const i = document.createElement("div");
307
307
  return i.innerHTML = n, i.childNodes;
308
308
  }, ys = (n) => {
@@ -316,9 +316,9 @@ const Y = {
316
316
  console.warn(`[${n} warn]: ${i}`);
317
317
  }, Ne = (n, i) => {
318
318
  console.error(`[${n} error]: ${i}`);
319
- }, I = {
319
+ }, O = {
320
320
  on(n, i) {
321
- if (!P(i))
321
+ if (!j(i))
322
322
  return this;
323
323
  const { __events__: t } = this;
324
324
  return n.split(" ").forEach((e) => {
@@ -334,7 +334,7 @@ const Y = {
334
334
  }), this;
335
335
  },
336
336
  once(n, i) {
337
- if (!P(i))
337
+ if (!j(i))
338
338
  return this;
339
339
  const t = (...e) => {
340
340
  this.off(n, t), i.apply(this, e);
@@ -344,7 +344,7 @@ const Y = {
344
344
  emit(...n) {
345
345
  const { __events__: i } = this, t = n[0], e = n.slice(1, n.length);
346
346
  return i[t] ? (i[t].forEach((s) => {
347
- P(s) && s.apply(this, e);
347
+ j(s) && s.apply(this, e);
348
348
  }), this) : this;
349
349
  }
350
350
  }, ws = {
@@ -358,32 +358,32 @@ const Y = {
358
358
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
359
359
  }
360
360
  }, be = (n, i) => {
361
- const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", h = c ? "left" : "top", m = c ? "width" : "height", f = b(e) ? T(e) : document.scrollingElement, v = f[u], k = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, E = b(s) ? T(s).getBoundingClientRect()[m] : 0, $ = k - a - E, G = 15;
362
- let L = 0;
363
- if ($ === 0)
361
+ const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", h = c ? "left" : "top", m = c ? "width" : "height", f = b(e) ? T(e) : document.scrollingElement, v = f[u], k = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, L = b(s) ? T(s).getBoundingClientRect()[m] : 0, C = k - a - L, G = 15;
362
+ let A = 0;
363
+ if (C === 0)
364
364
  return;
365
365
  const X = (R) => {
366
366
  const Oe = T(t);
367
- i && i.emit(R, Oe), !i && n.on && P(n.on[R]) && n.on[R](Oe);
367
+ i && i.emit(R, Oe), !i && n.on && j(n.on[R]) && n.on[R](Oe);
368
368
  };
369
369
  X("beforeScroll");
370
370
  const Ie = () => {
371
- L += G;
372
- const R = ws[r](L, v, $, o);
373
- f[u] = R, L < o && requestAnimationFrame(Ie), L >= o && X("afterScroll");
371
+ A += G;
372
+ const R = ws[r](A, v, C, o);
373
+ f[u] = R, A < o && requestAnimationFrame(Ie), A >= o && X("afterScroll");
374
374
  };
375
375
  requestAnimationFrame(Ie);
376
376
  };
377
377
  var J, we, pt, Ze, mt, Qe;
378
378
  class Je {
379
- constructor(i, t = {}) {
379
+ constructor(i, t = {}, e) {
380
380
  p(this, J);
381
381
  p(this, pt);
382
382
  p(this, mt);
383
383
  this.__storage__ = {
384
384
  el: i,
385
385
  options: t
386
- }, this.active = "data-anchor-active", d(this, J, we).call(this);
386
+ }, this.state = e, this.active = "data-anchor-active", d(this, J, we).call(this);
387
387
  }
388
388
  destroy() {
389
389
  const { elements: i } = this;
@@ -416,7 +416,7 @@ J = new WeakSet(), we = function() {
416
416
  if (!at(i) || !b(i))
417
417
  return;
418
418
  const { SETTINGS: e, EVENTS: s } = lt;
419
- if (this.elements = B(i + `:not([${this.active}])`), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
419
+ if (this.elements = state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.elements = E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
420
420
  for (const [o, a] of Object.entries(this.options.on))
421
421
  this.__events__[o] = [a];
422
422
  d(this, pt, Ze).call(this);
@@ -442,10 +442,10 @@ J = new WeakSet(), we = function() {
442
442
  be(s, e);
443
443
  }, s.delay);
444
444
  };
445
- Object.assign(Je.prototype, I);
445
+ Object.assign(Je.prototype, O);
446
446
  window.MODALS || (window.MODALS = {});
447
- const { MODALS: C } = window, Ts = (n) => {
448
- const { TEMPLATE: i } = q, { childDom: t } = n, e = document.createElement("div");
447
+ const { MODALS: H } = window, Ts = (n) => {
448
+ const { TEMPLATE: i } = I, { childDom: t } = n, e = document.createElement("div");
449
449
  e.innerHTML = i(n.getAttribute("data-modal-template-setting"));
450
450
  const s = e.querySelector(".modal-content");
451
451
  return [...t].forEach((o) => {
@@ -487,10 +487,10 @@ class Ve extends HTMLElement {
487
487
  }
488
488
  }
489
489
  gt = new WeakSet(), Ke = function() {
490
- const { ATTRS: t } = q;
490
+ const { ATTRS: t } = I;
491
491
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
492
492
  const e = this.getAttribute(t.id) || vs();
493
- this.getAttribute(t.id) || (y(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), C[e] && y(`the ${t.id} "${e}" is already be used.`), C[e] = this, d(this, ft, ti).call(this);
493
+ this.getAttribute(t.id) || (y(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), H[e] && y(`the ${t.id} "${e}" is already be used.`), H[e] = this, d(this, ft, ti).call(this);
494
494
  }, ft = new WeakSet(), ti = function() {
495
495
  this.childDom = this.childNodes, this.template = Ts(this), this.innerHTML = "", this.append(this.template), d(this, vt, ei).call(this);
496
496
  }, vt = new WeakSet(), ei = function() {
@@ -502,16 +502,16 @@ gt = new WeakSet(), Ke = function() {
502
502
  }), d(this, bt, ii).call(this);
503
503
  }, bt = new WeakSet(), ii = function() {
504
504
  var a, r, l;
505
- const t = this, { ATTRS: e } = q, { close: s, destroy: o } = e;
505
+ const t = this, { ATTRS: e } = I, { close: s, destroy: o } = e;
506
506
  (a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
507
507
  c.addEventListener("click", function() {
508
508
  const u = this.getAttribute(s);
509
- (u && C[u] ? C[u] : t).close();
509
+ (u && H[u] ? H[u] : t).close();
510
510
  });
511
511
  }), (r = t.querySelectorAll(`[${o}]`)) == null || r.forEach((c) => {
512
512
  c.addEventListener("click", function() {
513
513
  const u = this.getAttribute(o);
514
- (u && C[u] ? C[u] : t).destroy();
514
+ (u && H[u] ? H[u] : t).destroy();
515
515
  });
516
516
  }), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
517
517
  c.stopPropagation();
@@ -541,20 +541,20 @@ gt = new WeakSet(), Ke = function() {
541
541
  if (t === "destroy") {
542
542
  this.classList.remove("show");
543
543
  const s = () => {
544
- const { ATTRS: o } = q, a = this.getAttribute(o.id);
545
- this.style.removeProperty("display"), this.emit("close"), this.remove(), this.emit("destroy"), C[a] && delete C[a];
544
+ const { ATTRS: o } = I, a = this.getAttribute(o.id);
545
+ this.style.removeProperty("display"), this.emit("close"), this.remove(), this.emit("destroy"), H[a] && delete H[a];
546
546
  };
547
547
  this.addEventListener("transitionend", s);
548
548
  }
549
549
  };
550
- Object.assign(Ve.prototype, I);
550
+ Object.assign(Ve.prototype, O);
551
551
  const { MODALS: Me } = window, ni = (n, i, ...t) => {
552
552
  if (!i)
553
553
  return;
554
554
  const e = n[i];
555
- e && P(e) && e.apply(n, t);
555
+ e && j(e) && e.apply(n, t);
556
556
  }, oi = (n, ...i) => {
557
- n && P(n) && n.apply(U, i);
557
+ n && j(n) && n.apply(U, i);
558
558
  }, Pe = (n, i) => {
559
559
  const { target: t } = n, e = Me[t] || T(n.target);
560
560
  e && ai(n, i), e || Es(n, i);
@@ -587,7 +587,7 @@ const { MODALS: Me } = window, ni = (n, i, ...t) => {
587
587
  i && (i.emit(l, ...c), ni(i, o[l], ...c)), i || oi(o[l], ...c);
588
588
  };
589
589
  fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
590
- const c = bs(l), u = T(s) || T(q.SETTINGS.container);
590
+ const c = bs(l), u = T(s) || T(I.SETTINGS.container);
591
591
  [...c].forEach((m) => {
592
592
  u.append(m);
593
593
  });
@@ -598,15 +598,15 @@ const { MODALS: Me } = window, ni = (n, i, ...t) => {
598
598
  });
599
599
  };
600
600
  var Z, Te, wt, ri, Tt, li;
601
- const O = class O {
602
- constructor(i, t = {}) {
601
+ const N = class N {
602
+ constructor(i, t = {}, e) {
603
603
  p(this, Z);
604
604
  p(this, wt);
605
605
  p(this, Tt);
606
606
  this.__storage__ = {
607
607
  el: i,
608
608
  options: t
609
- }, this.active = "data-modal-active", d(this, Z, Te).call(this);
609
+ }, this.state = e, this.active = "data-modal-active", d(this, Z, Te).call(this);
610
610
  }
611
611
  destroy() {
612
612
  const { elements: i } = this;
@@ -620,24 +620,24 @@ const O = class O {
620
620
  }
621
621
  /** static method 'open' */
622
622
  static open(i) {
623
- const { SETTINGS: t } = q, e = Object.assign({}, t, { on: {} }, i);
623
+ const { SETTINGS: t } = I, e = Object.assign({}, t, { on: {} }, i);
624
624
  Pe(e);
625
625
  }
626
626
  /** static method 'defineMethods' */
627
627
  static defineMethods(i) {
628
- O.prototype.__methods__ || (O.prototype.__methods__ = {});
629
- const t = O.prototype.__methods__;
628
+ N.prototype.__methods__ || (N.prototype.__methods__ = {});
629
+ const t = N.prototype.__methods__;
630
630
  for (const [e, s] of Object.entries(i))
631
- P(s) && (t[e] = s);
632
- Object.assign(O.prototype, O.prototype.__methods__);
631
+ j(s) && (t[e] = s);
632
+ Object.assign(N.prototype, N.prototype.__methods__);
633
633
  }
634
634
  };
635
635
  Z = new WeakSet(), Te = function() {
636
636
  const { el: i, options: t } = this.__storage__;
637
637
  if (!at(i) || !b(i))
638
638
  return;
639
- const { SETTINGS: e, EVENTS: s } = q;
640
- if (this.elements = B(i + `:not([${this.active}])`), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
639
+ const { SETTINGS: e, EVENTS: s } = I;
640
+ if (this.elements = state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
641
641
  for (const [o, a] of Object.entries(this.options.on))
642
642
  this.__events__[o] = [a];
643
643
  d(this, wt, ri).call(this);
@@ -661,8 +661,8 @@ Z = new WeakSet(), Te = function() {
661
661
  this.addEventListener("click", e);
662
662
  }, 200), Pe(a, s);
663
663
  };
664
- let U = O;
665
- Object.assign(U.prototype, I);
664
+ let U = N;
665
+ Object.assign(U.prototype, O);
666
666
  customElements.get("modern-modal") || customElements.define("modern-modal", Ve);
667
667
  const Ls = (n, i) => {
668
668
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
@@ -673,22 +673,22 @@ const Ls = (n, i) => {
673
673
  s.classList.add(o);
674
674
  }, a);
675
675
  else {
676
- const E = s.classList.contains(o) && c === "down" && h - e >= f || c === "up" && m - e <= v || c === !0;
676
+ const L = s.classList.contains(o) && c === "down" && h - e >= f || c === "up" && m - e <= v || c === !0;
677
677
  setTimeout(() => {
678
- E && s.classList.remove(o);
678
+ L && s.classList.remove(o);
679
679
  }, a);
680
680
  }
681
681
  });
682
682
  }, As = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
683
683
  var Q, Ee, Et, di;
684
684
  class ci {
685
- constructor(i, t = {}) {
685
+ constructor(i, t = {}, e) {
686
686
  p(this, Q);
687
687
  p(this, Et);
688
688
  this.__storage__ = {
689
689
  el: i,
690
690
  options: t
691
- }, this.active = "data-aost-active", d(this, Q, Ee).call(this);
691
+ }, this.state = e, this.active = "data-aost-active", d(this, Q, Ee).call(this);
692
692
  }
693
693
  destroy(i) {
694
694
  const { elements: t, options: e } = this;
@@ -712,7 +712,7 @@ Q = new WeakSet(), Ee = function() {
712
712
  if (!at(i) || !b(i))
713
713
  return;
714
714
  const { SETTINGS: e, EVENTS: s } = Re;
715
- if (this.elements = B(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
715
+ if (this.elements = state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
716
716
  for (const [o, a] of Object.entries(this.options.on))
717
717
  this.__events__[o] = [a];
718
718
  d(this, Et, di).call(this);
@@ -726,7 +726,7 @@ Q = new WeakSet(), Ee = function() {
726
726
  const { eventHandler: o } = this;
727
727
  o(), s.aost = {}, s.aost.eventHandler = o, s.addEventListener("scroll", s.aost.eventHandler, !1);
728
728
  };
729
- Object.assign(ci.prototype, I);
729
+ Object.assign(ci.prototype, O);
730
730
  const Ss = (n) => {
731
731
  const { TEMPLATE: i } = Y, { childDom: t } = n, e = document.createElement("div");
732
732
  e.innerHTML = i();
@@ -735,7 +735,7 @@ const Ss = (n) => {
735
735
  s.append(o);
736
736
  }), e.children[0];
737
737
  };
738
- var Lt, ui, At, hi, St, pi, Dt, mi, _t, gi, xt, fi, kt, vi;
738
+ var Lt, ui, At, hi, St, pi, Dt, mi, _t, gi, xt, fi, $t, vi;
739
739
  class Ds extends HTMLElement {
740
740
  constructor() {
741
741
  super();
@@ -748,7 +748,7 @@ class Ds extends HTMLElement {
748
748
  p(this, _t);
749
749
  // youku iframe
750
750
  p(this, xt);
751
- p(this, kt);
751
+ p(this, $t);
752
752
  d(this, Lt, ui).call(this);
753
753
  }
754
754
  play() {
@@ -812,7 +812,7 @@ Lt = new WeakSet(), ui = function() {
812
812
  e = d(this, _t, gi).call(this);
813
813
  break;
814
814
  case "bilibili":
815
- e = d(this, kt, vi).call(this);
815
+ e = d(this, $t, vi).call(this);
816
816
  break;
817
817
  }
818
818
  this.querySelector(".player-wrapper").insertAdjacentHTML(w.prepend, e);
@@ -825,7 +825,7 @@ Lt = new WeakSet(), ui = function() {
825
825
  }, xt = new WeakSet(), fi = function() {
826
826
  const { videoId: t, autoplay: e } = this;
827
827
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
828
- }, kt = new WeakSet(), vi = function() {
828
+ }, $t = new WeakSet(), vi = function() {
829
829
  const { videoId: t, autoplay: e } = this;
830
830
  return `<iframe src="//player.bilibili.com/player.html?bvid=${t}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`;
831
831
  };
@@ -992,7 +992,7 @@ function xn(n) {
992
992
  });
993
993
  });
994
994
  }
995
- function kn(n) {
995
+ function $n(n) {
996
996
  const i = n.el, t = g(i).find(".swiper-slide-active"), e = g(t).find("video").get(0), s = g(i).find(".swiper-slide video");
997
997
  n.autoplay.stop(), g(e).off("ended"), e ? (s.each((o, a) => {
998
998
  a.currentTime = 0;
@@ -1000,7 +1000,7 @@ function kn(n) {
1000
1000
  n.slideNext();
1001
1001
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1002
1002
  }
1003
- function $n() {
1003
+ function kn() {
1004
1004
  g(".number-grow").each(function(n, i) {
1005
1005
  const t = g(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1006
1006
  let r = "";
@@ -1042,12 +1042,12 @@ function qn(n) {
1042
1042
  const i = document.createElement("div");
1043
1043
  return i.innerHTML = n, i.childNodes[0];
1044
1044
  }
1045
- const je = (n) => n.videoId !== "" || typeof n.videoId < "u", ks = (n) => n.$selector.getAttribute("video4-active") === "on", ye = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1046
- var V, Le, $t, wi, Ct, Ti, K, Ae, Ht, Ei;
1047
- class $s {
1048
- constructor(i, t = {}) {
1045
+ const je = (n) => n.videoId !== "" || typeof n.videoId < "u", $s = (n) => n.$selector.getAttribute("video4-active") === "on", ye = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1046
+ var V, Le, kt, wi, Ct, Ti, K, Ae, Ht, Ei;
1047
+ class ks {
1048
+ constructor(i, t = {}, e) {
1049
1049
  p(this, V);
1050
- p(this, $t);
1050
+ p(this, kt);
1051
1051
  p(this, Ct);
1052
1052
  p(this, K);
1053
1053
  p(this, Ht);
@@ -1058,7 +1058,7 @@ class $s {
1058
1058
  this.__storage__ = {
1059
1059
  el: i,
1060
1060
  options: t
1061
- }, d(this, V, Le).call(this);
1061
+ }, this.state = e, this.active = "data-video-active", d(this, V, Le).call(this);
1062
1062
  }
1063
1063
  update() {
1064
1064
  d(this, V, Le).call(this);
@@ -1066,14 +1066,14 @@ class $s {
1066
1066
  }
1067
1067
  V = new WeakSet(), Le = function() {
1068
1068
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Y;
1069
- if (this.elements = B(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1069
+ if (this.elements = state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1070
1070
  for (const [o, a] of Object.entries(this.options.on))
1071
1071
  this.__events__[o] = [a];
1072
- d(this, $t, wi).call(this);
1073
- }, $t = new WeakSet(), wi = function() {
1072
+ d(this, kt, wi).call(this);
1073
+ }, kt = new WeakSet(), wi = function() {
1074
1074
  const { elements: i, options: t } = this;
1075
1075
  i.forEach((e) => {
1076
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Ht, Ei).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), je(e.video.params) && !ks(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Ct, Ti).call(this, e)), je(e.video.params) || Ne("video4", "無法取得影片 ID");
1076
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Ht, Ei).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), je(e.video.params) && !$s(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Ct, Ti).call(this, e)), je(e.video.params) || Ne("video4", "無法取得影片 ID");
1077
1077
  }), this.emit("init");
1078
1078
  }, Ct = new WeakSet(), Ti = function(i) {
1079
1079
  const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u } = e;
@@ -1142,7 +1142,7 @@ V = new WeakSet(), Le = function() {
1142
1142
  videoTargetRoute: i.getAttribute("video-target-route") || t.videoTargetRoute
1143
1143
  };
1144
1144
  };
1145
- Object.assign($s.prototype, I);
1145
+ Object.assign(ks.prototype, O);
1146
1146
  customElements.get("video-player") || customElements.define("video-player", Ds);
1147
1147
  const qe = {
1148
1148
  "zh-tw": {
@@ -1987,9 +1987,9 @@ const qe = {
1987
1987
  const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
1988
1988
  i && i.forEach((e) => {
1989
1989
  const s = document.querySelector(e);
1990
- s || y("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && _(s, [...s.s.allLi].indexOf(s.s.activeLi)));
1990
+ s || y("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)));
1991
1991
  });
1992
- }, _ = (n, i) => {
1992
+ }, x = (n, i) => {
1993
1993
  const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
1994
1994
  if (i < 0 || i.length === 0) {
1995
1995
  switch (e.forEach((s) => {
@@ -2054,7 +2054,7 @@ const qe = {
2054
2054
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
2055
2055
  });
2056
2056
  }, Li = () => {
2057
- B('dropdown-el[d4-status="open"]').forEach((i) => {
2057
+ E('dropdown-el[d4-status="open"]').forEach((i) => {
2058
2058
  i.close();
2059
2059
  });
2060
2060
  }, Is = () => {
@@ -2097,7 +2097,7 @@ class Ai extends HTMLElement {
2097
2097
  switch (o.hasAttribute("multiple") ? "multiple" : "single") {
2098
2098
  case "single":
2099
2099
  const r = o.querySelector(`.dropdown-list li[data-option="${s}"]`);
2100
- b(r) ? _(o, [...o.s.allLi].indexOf(r)) : _(o, -1);
2100
+ b(r) ? x(o, [...o.s.allLi].indexOf(r)) : x(o, -1);
2101
2101
  break;
2102
2102
  case "multiple":
2103
2103
  const l = [];
@@ -2106,17 +2106,17 @@ class Ai extends HTMLElement {
2106
2106
  b(h) && (h.classList.add("active"), l.push(h));
2107
2107
  });
2108
2108
  const c = l.map((u) => [...o.s.allLi].indexOf(u));
2109
- _(o, c);
2109
+ x(o, c);
2110
2110
  break;
2111
2111
  }
2112
2112
  else
2113
- _(o, -1);
2113
+ x(o, -1);
2114
2114
  o.emit("change");
2115
2115
  break;
2116
2116
  case "d4-placeholder":
2117
2117
  if (e === null)
2118
2118
  return;
2119
- e !== s && o.s.value.index < 0 && _(o, o.s.value.index);
2119
+ e !== s && o.s.value.index < 0 && x(o, o.s.value.index);
2120
2120
  break;
2121
2121
  }
2122
2122
  }
@@ -2197,7 +2197,7 @@ Mt = new WeakSet(), Si = function() {
2197
2197
  };
2198
2198
  break;
2199
2199
  }
2200
- _(t, t.s.value.index), d(s = t, Ot, xi).call(s), t.classList.add("d4-initialize");
2200
+ x(t, t.s.value.index), d(s = t, Ot, xi).call(s), t.classList.add("d4-initialize");
2201
2201
  }, Ot = new WeakSet(), xi = function() {
2202
2202
  const t = this;
2203
2203
  t.__events__.dropdownToggle = () => {
@@ -2258,12 +2258,12 @@ Mt = new WeakSet(), Si = function() {
2258
2258
  const u = this, h = [...e.s.allLi].indexOf(u), m = parseInt(e.getAttribute("d4-default-height"));
2259
2259
  if (u.classList.contains("has-sublayer")) {
2260
2260
  c.stopPropagation();
2261
- const v = u.querySelector(".sub-dropdown"), k = v.querySelector(".sub-dropdown-list"), E = parseInt(getComputedStyle(k).marginTop) + parseInt(getComputedStyle(k).marginBottom);
2262
- v.style.cssText = `--height: ${k.offsetHeight + E}px`;
2263
- const $ = parseInt(v.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), L = () => {
2261
+ const v = u.querySelector(".sub-dropdown"), k = v.querySelector(".sub-dropdown-list"), L = parseInt(getComputedStyle(k).marginTop) + parseInt(getComputedStyle(k).marginBottom);
2262
+ v.style.cssText = `--height: ${k.offsetHeight + L}px`;
2263
+ const C = parseInt(v.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), A = () => {
2264
2264
  s = m + e.s.subDropdownTotalH, o = s > G ? G : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2265
2265
  };
2266
- u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= $, L()) : (u.classList.add("open"), e.s.subDropdownTotalH += $, L());
2266
+ u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= C, A()) : (u.classList.add("open"), e.s.subDropdownTotalH += C, A());
2267
2267
  const X = () => {
2268
2268
  e.__scroller__.update(!0), v.removeEventListener("transitionend", X);
2269
2269
  };
@@ -2272,16 +2272,16 @@ Mt = new WeakSet(), Si = function() {
2272
2272
  switch (Hs(e), e.s.selectType) {
2273
2273
  case "single":
2274
2274
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2275
- const v = e.s.cityLang, k = l.textContent.trim(), E = document.getElementById(e.getAttribute("dist-select"));
2276
- E && (E.querySelector(".dropdown-list").textContent = "", _(E, -1), qe[v][k].forEach(($, G) => {
2277
- const L = document.createElement("li");
2278
- L.textContent = $[0], L.setAttribute("data-option", $[0]), E.querySelector(".dropdown-list").append(L);
2279
- }), e.__events__.selectOption(E));
2275
+ const v = e.s.cityLang, k = l.textContent.trim(), L = document.getElementById(e.getAttribute("dist-select"));
2276
+ L && (L.querySelector(".dropdown-list").textContent = "", x(L, -1), qe[v][k].forEach((C, G) => {
2277
+ const A = document.createElement("li");
2278
+ A.textContent = C[0], A.setAttribute("data-option", C[0]), L.querySelector(".dropdown-list").append(A);
2279
+ }), e.__events__.selectOption(L));
2280
2280
  }
2281
2281
  (f = u.parentNode.closest("li")) != null && f.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2282
2282
  break;
2283
2283
  case "multiple":
2284
- c.stopPropagation(), u.classList.toggle("active"), _(e, h);
2284
+ c.stopPropagation(), u.classList.toggle("active"), x(e, h);
2285
2285
  break;
2286
2286
  }
2287
2287
  });
@@ -2314,7 +2314,7 @@ Mt = new WeakSet(), Si = function() {
2314
2314
  });
2315
2315
  }, t.__events__.dropdownToggle(), t.__events__.bindScrollbar(), t.__events__.selectOption(), t.__events__.filterHandler(), t.__events__.removeTag(), t.__events__.transitionend();
2316
2316
  };
2317
- Object.assign(Ai.prototype, I);
2317
+ Object.assign(Ai.prototype, O);
2318
2318
  customElements.get("dropdown-el") || customElements.define("dropdown-el", Ai);
2319
2319
  function ct(n) {
2320
2320
  const i = {};
@@ -2352,7 +2352,7 @@ function Os(n) {
2352
2352
  }
2353
2353
  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;
2354
2354
  }
2355
- function A(n) {
2355
+ function S(n) {
2356
2356
  const { behavior: i, direction: t, continual: e } = n.s.options;
2357
2357
  let s = {};
2358
2358
  switch (i) {
@@ -2414,7 +2414,7 @@ function Ns(n) {
2414
2414
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2415
2415
  };
2416
2416
  }
2417
- var Nt, ki, Pt, $i, jt, Ci, zt, Hi;
2417
+ var Nt, $i, Pt, ki, jt, Ci, zt, Hi;
2418
2418
  class Ps extends HTMLElement {
2419
2419
  constructor() {
2420
2420
  super();
@@ -2430,7 +2430,7 @@ class Ps extends HTMLElement {
2430
2430
  attributeChangedCallback(t, e, s) {
2431
2431
  }
2432
2432
  connectedCallback() {
2433
- this.initialize || (this.initialize = !0, d(this, Nt, ki).call(this));
2433
+ this.initialize || (this.initialize = !0, d(this, Nt, $i).call(this));
2434
2434
  }
2435
2435
  play() {
2436
2436
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -2439,25 +2439,25 @@ class Ps extends HTMLElement {
2439
2439
  this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
2440
2440
  }
2441
2441
  }
2442
- Nt = new WeakSet(), ki = function() {
2442
+ Nt = new WeakSet(), $i = function() {
2443
2443
  const t = {
2444
- direction: this.getAttribute("direction") || D.SETTINGS.direction,
2444
+ direction: this.getAttribute("direction") || _.SETTINGS.direction,
2445
2445
  // up / down / left / right
2446
- behavior: this.getAttribute("behavior") || D.SETTINGS.behavior,
2446
+ behavior: this.getAttribute("behavior") || _.SETTINGS.behavior,
2447
2447
  // normal / alternate / endStop
2448
- duration: Number(this.getAttribute("duration")) || D.SETTINGS.duration,
2448
+ duration: Number(this.getAttribute("duration")) || _.SETTINGS.duration,
2449
2449
  // ms
2450
- durationBreakpoints: ct(this) || D.SETTINGS.durationBreakpoints,
2451
- autoplay: this.getAttribute("autoplay") || D.SETTINGS.autoplay,
2450
+ durationBreakpoints: ct(this) || _.SETTINGS.durationBreakpoints,
2451
+ autoplay: this.getAttribute("autoplay") || _.SETTINGS.autoplay,
2452
2452
  // normal / alternate / endStop
2453
- pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : D.SETTINGS.pauseOnMouseenter,
2453
+ pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : _.SETTINGS.pauseOnMouseenter,
2454
2454
  // true / false
2455
- continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : D.SETTINGS.continual,
2455
+ continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : _.SETTINGS.continual,
2456
2456
  // true / false
2457
- gap: Number(this.getAttribute("gap")) || D.SETTINGS.gap
2457
+ gap: Number(this.getAttribute("gap")) || _.SETTINGS.gap
2458
2458
  };
2459
- this.s = {}, this.s.options = t, this.s.nowDuration = ze(this), Os(this), d(this, Pt, $i).call(this);
2460
- }, Pt = new WeakSet(), $i = function() {
2459
+ this.s = {}, this.s.options = t, this.s.nowDuration = ze(this), Os(this), d(this, Pt, ki).call(this);
2460
+ }, Pt = new WeakSet(), ki = function() {
2461
2461
  const { direction: t, continual: e, gap: s } = this.s.options;
2462
2462
  switch (t) {
2463
2463
  case "left":
@@ -2476,10 +2476,10 @@ Nt = new WeakSet(), ki = function() {
2476
2476
  function u() {
2477
2477
  switch (s) {
2478
2478
  case "normal":
2479
- t.s.animateEl.style.transform = `${A(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(A(t).animate1, {
2479
+ t.s.animateEl.style.transform = `${S(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(S(t).animate1, {
2480
2480
  duration: t.s.nowDuration,
2481
2481
  iterations: 1 / 0
2482
- }), l && (t.s.cloneAnimateEl.style.transform = `${A(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(A(t).animate2, {
2482
+ }), l && (t.s.cloneAnimateEl.style.transform = `${S(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(S(t).animate2, {
2483
2483
  duration: t.s.nowDuration,
2484
2484
  delay: -t.s.nowDuration / 2,
2485
2485
  iterations: 1 / 0
@@ -2508,7 +2508,7 @@ Nt = new WeakSet(), ki = function() {
2508
2508
  duration: m,
2509
2509
  fill: "forwards"
2510
2510
  }).finished.then(() => {
2511
- t.s.animation = t.s.animateEl.animate(A(t).animate1, {
2511
+ t.s.animation = t.s.animateEl.animate(S(t).animate1, {
2512
2512
  duration: t.s.nowDuration,
2513
2513
  iterations: 1 / 0
2514
2514
  });
@@ -2517,7 +2517,7 @@ Nt = new WeakSet(), ki = function() {
2517
2517
  });
2518
2518
  break;
2519
2519
  case "endStop":
2520
- t.s.animateEl.style.transform = `${A(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(A(t).animate1, {
2520
+ t.s.animateEl.style.transform = `${S(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(S(t).animate1, {
2521
2521
  duration: t.s.nowDuration,
2522
2522
  fill: "forwards"
2523
2523
  });
@@ -2539,10 +2539,10 @@ Nt = new WeakSet(), ki = function() {
2539
2539
  const t = this;
2540
2540
  function e() {
2541
2541
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
2542
- t.s.nowDuration = ze(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(A(t).animate1, {
2542
+ t.s.nowDuration = ze(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(S(t).animate1, {
2543
2543
  duration: t.s.nowDuration,
2544
2544
  iterations: 1 / 0
2545
- }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(A(t).animate2, {
2545
+ }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(S(t).animate2, {
2546
2546
  duration: t.s.nowDuration,
2547
2547
  delay: -t.s.nowDuration / 2,
2548
2548
  iterations: 1 / 0
@@ -2556,7 +2556,7 @@ const ht = function(n) {
2556
2556
  return function(t) {
2557
2557
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2558
2558
  };
2559
- }, H = (n, i) => {
2559
+ }, M = (n, i) => {
2560
2560
  if (rt(n)) {
2561
2561
  n.forEach((t) => {
2562
2562
  t.classList.add(i);
@@ -2564,7 +2564,7 @@ const ht = function(n) {
2564
2564
  return;
2565
2565
  }
2566
2566
  n.classList.add(i);
2567
- }, S = (n, i) => {
2567
+ }, D = (n, i) => {
2568
2568
  if (rt(n)) {
2569
2569
  n.forEach((t) => {
2570
2570
  t.classList.remove(i);
@@ -2573,7 +2573,7 @@ const ht = function(n) {
2573
2573
  }
2574
2574
  n.classList.remove(i);
2575
2575
  };
2576
- var Wt, Mi, Bt, qi, Gt, Ii, tt, Se, z, dt, Xt, Oi;
2576
+ var Wt, Mi, Bt, qi, Gt, Ii, tt, Se, W, dt, Xt, Oi;
2577
2577
  class We {
2578
2578
  constructor(i) {
2579
2579
  // 初始化
@@ -2585,7 +2585,7 @@ class We {
2585
2585
  // 卷軸位置判斷
2586
2586
  p(this, tt);
2587
2587
  // 隱藏按鈕判斷
2588
- p(this, z);
2588
+ p(this, W);
2589
2589
  // 選項事件綁定
2590
2590
  p(this, Xt);
2591
2591
  this.$element = i, this.option = i.s.option.drag, d(this, Wt, Mi).call(this);
@@ -2610,7 +2610,7 @@ Wt = new WeakSet(), Mi = function() {
2610
2610
  i.$container = i.$element.querySelector(".drag-container"), i.$wrapper = i.$container.querySelector(".wrapper");
2611
2611
  const t = () => {
2612
2612
  var c, u;
2613
- d(c = i, tt, Se).call(c), d(u = i, z, dt).call(u);
2613
+ d(c = i, tt, Se).call(c), d(u = i, W, dt).call(u);
2614
2614
  };
2615
2615
  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, Gt, Ii).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2616
2616
  w.prepend,
@@ -2622,7 +2622,7 @@ Wt = new WeakSet(), Mi = function() {
2622
2622
  <div></div>
2623
2623
  </div>
2624
2624
  </div>`
2625
- ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Bt, qi).call(o)), d(a = i, tt, Se).call(a), d(r = i, z, dt).call(r), d(l = i, Xt, Oi).call(l);
2625
+ ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Bt, qi).call(o)), d(a = i, tt, Se).call(a), d(r = i, W, dt).call(r), d(l = i, Xt, Oi).call(l);
2626
2626
  }, Bt = new WeakSet(), qi = function() {
2627
2627
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2628
2628
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
@@ -2631,7 +2631,7 @@ Wt = new WeakSet(), Mi = function() {
2631
2631
  behavior: "smooth"
2632
2632
  }), setTimeout(() => {
2633
2633
  var r;
2634
- d(r = i, z, dt).call(r);
2634
+ d(r = i, W, dt).call(r);
2635
2635
  }, 100);
2636
2636
  };
2637
2637
  e.forEach((o) => {
@@ -2669,29 +2669,29 @@ Wt = new WeakSet(), Mi = function() {
2669
2669
  });
2670
2670
  }, tt = new WeakSet(), Se = function() {
2671
2671
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = t.scrollLeft;
2672
- e <= 0 || (H(i, "scrollable"), s == 0 ? (S(i, "scrollable"), H(t, "start"), S(t, "end")) : s >= e ? (S(i, "scrollable"), S(t, "start"), H(t, "end")) : (H(t, "center"), S(t, "start"), S(t, "end")));
2673
- }, z = new WeakSet(), dt = function() {
2672
+ e <= 0 || (M(i, "scrollable"), s == 0 ? (D(i, "scrollable"), M(t, "start"), D(t, "end")) : s >= e ? (D(i, "scrollable"), D(t, "start"), M(t, "end")) : (M(t, "center"), D(t, "start"), D(t, "end")));
2673
+ }, W = new WeakSet(), dt = function() {
2674
2674
  const { $wrapper: i, $button: t, $element: e } = this;
2675
2675
  if (!t)
2676
2676
  return;
2677
2677
  const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
2678
2678
  if (s <= 0) {
2679
- H(t, "hide"), H(e, "noScrollable");
2679
+ M(t, "hide"), M(e, "noScrollable");
2680
2680
  return;
2681
2681
  }
2682
2682
  o == 0 ? t.forEach((a) => {
2683
2683
  if (a.classList.contains("next")) {
2684
- S(a, "hide");
2684
+ D(a, "hide");
2685
2685
  return;
2686
2686
  }
2687
- H(a, "hide");
2687
+ M(a, "hide");
2688
2688
  }) : o >= s ? t.forEach((a) => {
2689
2689
  if (a.classList.contains("next")) {
2690
- H(a, "hide");
2690
+ M(a, "hide");
2691
2691
  return;
2692
2692
  }
2693
- S(a, "hide");
2694
- }) : S(t, "hide");
2693
+ D(a, "hide");
2694
+ }) : D(t, "hide");
2695
2695
  }, Xt = new WeakSet(), Oi = function() {
2696
2696
  const { $element: i } = this, t = (s) => {
2697
2697
  if (this.option.selected) {
@@ -2746,9 +2746,9 @@ Rt = new WeakSet(), Ni = function() {
2746
2746
  };
2747
2747
  const zs = (n) => {
2748
2748
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2749
- return i == "drag" && (s.innerHTML = x.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e)), i == "collapse" && (s.innerHTML = x.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(w.append, e)), i == "dropdown" && (s.innerHTML = x.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(w.append, e)), s.children;
2749
+ return i == "drag" && (s.innerHTML = $.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e)), i == "collapse" && (s.innerHTML = $.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(w.append, e)), i == "dropdown" && (s.innerHTML = $.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(w.append, e)), s.children;
2750
2750
  };
2751
- var Jt, Wi, Zt, Bi, et, De, W, ut;
2751
+ var Jt, Wi, Zt, Bi, et, De, B, ut;
2752
2752
  class Ws extends HTMLElement {
2753
2753
  constructor() {
2754
2754
  super();
@@ -2757,7 +2757,7 @@ class Ws extends HTMLElement {
2757
2757
  // 斷點設定
2758
2758
  p(this, et);
2759
2759
  // check type
2760
- p(this, W);
2760
+ p(this, B);
2761
2761
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
2762
2762
  }
2763
2763
  static get observedAttributes() {
@@ -2769,7 +2769,7 @@ class Ws extends HTMLElement {
2769
2769
  case "m4-type":
2770
2770
  if (e === null || e === s)
2771
2771
  return;
2772
- this.s.type = s, d(this, W, ut).call(this);
2772
+ this.s.type = s, d(this, B, ut).call(this);
2773
2773
  break;
2774
2774
  case "m4-status":
2775
2775
  if (e === s)
@@ -2794,7 +2794,7 @@ class Ws extends HTMLElement {
2794
2794
  }
2795
2795
  Jt = new WeakSet(), Wi = function() {
2796
2796
  let t = {};
2797
- this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? x.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2797
+ this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? $.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2798
2798
  const e = (s) => {
2799
2799
  if (s.type === "resize") {
2800
2800
  if (window.innerWidth === this.previousWidth)
@@ -2803,20 +2803,20 @@ Jt = new WeakSet(), Wi = function() {
2803
2803
  }
2804
2804
  this.update();
2805
2805
  };
2806
- window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, x.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, x.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, x.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, x.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Zt, Bi).call(this);
2806
+ window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, $.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, $.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, $.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, $.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Zt, Bi).call(this);
2807
2807
  }, Zt = new WeakSet(), Bi = function() {
2808
2808
  this.classList.add("m4-init"), d(this, et, De).call(this);
2809
2809
  }, et = new WeakSet(), De = function() {
2810
2810
  const t = Object.keys(this.s.option.breakpoint);
2811
2811
  if (!t.length) {
2812
- d(this, W, ut).call(this);
2812
+ d(this, B, ut).call(this);
2813
2813
  return;
2814
2814
  }
2815
2815
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
2816
2816
  var s, o, a, r;
2817
- 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, W, ut).call(this), window.innerWidth >= e;
2817
+ 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;
2818
2818
  });
2819
- }, W = new WeakSet(), ut = function() {
2819
+ }, B = new WeakSet(), ut = function() {
2820
2820
  var o;
2821
2821
  const { type: t } = this.s;
2822
2822
  this.innerHTML = "", [...zs(this)].forEach((a) => {
@@ -2834,7 +2834,7 @@ Jt = new WeakSet(), Wi = function() {
2834
2834
  (o = this.constructor.drag) == null || o.update(this);
2835
2835
  };
2836
2836
  customElements.get("multipurpose-nav") || customElements.define("multipurpose-nav", Ws);
2837
- var Qt, Xi, Vt, Ri, it, _e, N, F, Kt, Fi, te, Yi, ee, Ui, ie, Ji, se, Zi, ne, Qi, oe, Vi, ae, Ki, re, ts, M, j, le, es, ce, is, de, ss, ue, ns;
2837
+ var Qt, Xi, Vt, Ri, it, _e, P, F, Kt, Fi, te, Yi, ee, Ui, ie, Ji, se, Zi, ne, Qi, oe, Vi, ae, Ki, re, ts, q, z, le, es, ce, is, de, ss, ue, ns;
2838
2838
  class Gi extends HTMLElement {
2839
2839
  // 定義組件的初始狀態
2840
2840
  constructor(t, e) {
@@ -2844,7 +2844,7 @@ class Gi extends HTMLElement {
2844
2844
  // 第一關 判斷數量以及id設定
2845
2845
  p(this, it);
2846
2846
  // 第二關 id命名提醒
2847
- p(this, N);
2847
+ p(this, P);
2848
2848
  p(this, Kt);
2849
2849
  p(this, te);
2850
2850
  p(this, ee);
@@ -2862,7 +2862,7 @@ class Gi extends HTMLElement {
2862
2862
  // 頁籤狀態
2863
2863
  p(this, re);
2864
2864
  // 第三關各種元件判斷 及 執行
2865
- p(this, M);
2865
+ p(this, q);
2866
2866
  // 消失動畫
2867
2867
  p(this, le);
2868
2868
  // 出現動畫
@@ -2887,26 +2887,26 @@ class Gi extends HTMLElement {
2887
2887
  tabClick(t) {
2888
2888
  const { t: e } = this, s = e.tabs.indexOf(t) % e.tabPanels.length, o = e.tabGroup === "true" ? String(s) : t.getAttribute("t4-id");
2889
2889
  this.setActiveTab(o), setTimeout(() => {
2890
- d(this, M, j).call(this, "eventAnchor");
2890
+ d(this, q, z).call(this, "eventAnchor");
2891
2891
  }, e.transition.duration);
2892
2892
  }
2893
2893
  // 外部呼叫方法 $0.setActiveTab(0)
2894
2894
  setActiveTab(t) {
2895
2895
  const { t: e } = this, s = t === "" ? e.tabPanels[0].getAttribute("t4-id") : t;
2896
2896
  e.activeTab = s, this.setAttribute("t4-active", s);
2897
- const o = d(this, N, F).call(this, s);
2897
+ const o = d(this, P, F).call(this, s);
2898
2898
  e.tabPanels.forEach((a, r) => {
2899
2899
  r === o ? d(this, ce, is).call(this, r) : d(this, le, es).call(this, r);
2900
2900
  });
2901
2901
  }
2902
2902
  // 外部呼叫方法 $0.goNext()
2903
2903
  goNext() {
2904
- 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");
2904
+ const t = d(this, P, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2905
2905
  this.setActiveTab(s);
2906
2906
  }
2907
2907
  // 外部呼叫方法 $0.goPrev()
2908
2908
  goPrev() {
2909
- 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");
2909
+ const t = d(this, P, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2910
2910
  this.setActiveTab(s);
2911
2911
  }
2912
2912
  // 外部呼叫方法 $0.update()
@@ -2946,7 +2946,7 @@ Qt = new WeakSet(), Xi = function() {
2946
2946
  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) => {
2947
2947
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
2948
2948
  }), e;
2949
- }, N = new WeakSet(), F = function(t) {
2949
+ }, P = new WeakSet(), F = function(t) {
2950
2950
  const { t: e } = this, s = e.tabPanels.filter((a) => a.getAttribute("t4-id") === t);
2951
2951
  s.length > 1 && console.warn("有兩個相同id設定", s);
2952
2952
  const o = s[0];
@@ -2998,7 +2998,7 @@ Qt = new WeakSet(), Xi = function() {
2998
2998
  }) : this.t.tabs.forEach((s, o) => {
2999
2999
  s.getAttribute("t4-id") === e ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
3000
3000
  });
3001
- }, M = new WeakSet(), j = function(t, e, s) {
3001
+ }, q = new WeakSet(), z = function(t, e, s) {
3002
3002
  switch (t) {
3003
3003
  case "step":
3004
3004
  ve(this.t.step) && d(this, ne, Qi).call(this, e);
@@ -3062,8 +3062,8 @@ Qt = new WeakSet(), Xi = function() {
3062
3062
  break;
3063
3063
  }
3064
3064
  }, de = new WeakSet(), ss = function(t) {
3065
- const e = d(this, N, F).call(this, t);
3066
- d(this, M, j).call(this, "step", e), d(this, M, j).call(this, "btnState", e), d(this, M, j).call(this, "tabState", e, t), d(this, M, j).call(this, "tabUrl", t), this.emit("change");
3065
+ const e = d(this, P, F).call(this, t);
3066
+ 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");
3067
3067
  }, ue = new WeakSet(), ns = function() {
3068
3068
  const t = this;
3069
3069
  window.addEventListener(
@@ -3110,7 +3110,7 @@ function os() {
3110
3110
  });
3111
3111
  }
3112
3112
  os();
3113
- Object.assign(Gi.prototype, I);
3113
+ Object.assign(Gi.prototype, O);
3114
3114
  customElements.get("tab-el") || customElements.define("tab-el", Gi);
3115
3115
  const Be = (n) => {
3116
3116
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
@@ -3119,9 +3119,9 @@ const Be = (n) => {
3119
3119
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3120
3120
  n.collapse.height = a, n.classList.remove(t), o.style.display = "block", o.style.height = `${a}px`, 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";
3121
3121
  };
3122
- var st, xe, he, as, pe, rs, nt, ke;
3122
+ var st, xe, he, as, pe, rs, nt, $e;
3123
3123
  class Xs {
3124
- constructor(i, t = {}) {
3124
+ constructor(i, t = {}, e) {
3125
3125
  p(this, st);
3126
3126
  p(this, he);
3127
3127
  p(this, pe);
@@ -3129,7 +3129,7 @@ class Xs {
3129
3129
  !at(i) && !ve(i) && !rt(i) && !b(i) || (this.__storage__ = {
3130
3130
  el: i,
3131
3131
  options: t
3132
- }, this.active = "data-collapse-active", d(this, st, xe).call(this));
3132
+ }, this.state = e, this.active = "data-collapse-active", d(this, st, xe).call(this));
3133
3133
  }
3134
3134
  update() {
3135
3135
  d(this, st, xe).call(this);
@@ -3137,7 +3137,7 @@ class Xs {
3137
3137
  }
3138
3138
  st = new WeakSet(), xe = function() {
3139
3139
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Ye;
3140
- if (this.elements = B(i + `:not([${this.active}])`), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3140
+ if (this.elements = state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3141
3141
  for (const [o, a] of Object.entries(this.options.on))
3142
3142
  this.__events__[o] = [a];
3143
3143
  d(this, he, as).call(this);
@@ -3148,19 +3148,19 @@ st = new WeakSet(), xe = function() {
3148
3148
  }), this.emit("init");
3149
3149
  }, pe = new WeakSet(), rs = function(i) {
3150
3150
  const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3151
- if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, ke)), c.addEventListener("click", d(this, nt, ke)), r) {
3151
+ if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, $e)), c.addEventListener("click", d(this, nt, $e)), r) {
3152
3152
  const h = (m) => {
3153
3153
  m.stopPropagation();
3154
3154
  };
3155
3155
  u.removeEventListener("click", h), u.addEventListener("click", h);
3156
3156
  }
3157
- }, nt = new WeakSet(), ke = function() {
3157
+ }, nt = new WeakSet(), $e = function() {
3158
3158
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3159
3159
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3160
3160
  Be(l);
3161
3161
  }), Gs(r)) : Be(r), i.emit("afterCollapse");
3162
3162
  };
3163
- Object.assign(Xs.prototype, I);
3163
+ Object.assign(Xs.prototype, O);
3164
3164
  function Rs(n, i) {
3165
3165
  const t = i, { color: e, opacity: s, duration: o } = i.s.options;
3166
3166
  let a = document.createElement("span"), r = n.clientX - t.getBoundingClientRect().left, l = n.clientY - t.getBoundingClientRect().top;
@@ -3174,7 +3174,7 @@ function ls() {
3174
3174
  });
3175
3175
  }
3176
3176
  document.addEventListener("click", ls);
3177
- var ot, $e, me, cs, ge, ds, fe, us;
3177
+ var ot, ke, me, cs, ge, ds, fe, us;
3178
3178
  class Fs extends HTMLElement {
3179
3179
  constructor() {
3180
3180
  super();
@@ -3186,13 +3186,13 @@ class Fs extends HTMLElement {
3186
3186
  }
3187
3187
  connectedCallback() {
3188
3188
  const t = this;
3189
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ot, $e).call(this));
3189
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ot, ke).call(this));
3190
3190
  }
3191
3191
  update() {
3192
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ot, $e).call(this);
3192
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ot, ke).call(this);
3193
3193
  }
3194
3194
  }
3195
- ot = new WeakSet(), $e = function() {
3195
+ ot = new WeakSet(), ke = function() {
3196
3196
  const { SETTINGS: t } = Ue;
3197
3197
  this.s = {};
3198
3198
  function e(o) {
@@ -3427,9 +3427,9 @@ export {
3427
3427
  _n as P,
3428
3428
  xn as Q,
3429
3429
  Fs as R,
3430
- kn as S,
3430
+ $n as S,
3431
3431
  Gi as T,
3432
- $n as U,
3432
+ kn as U,
3433
3433
  Cn as V,
3434
3434
  Hn as W,
3435
3435
  Mn as X,
@@ -3439,7 +3439,7 @@ export {
3439
3439
  fs as d,
3440
3440
  Y as e,
3441
3441
  w as f,
3442
- B as g,
3442
+ E as g,
3443
3443
  dn as h,
3444
3444
  at as i,
3445
3445
  ci as j,
@@ -3454,7 +3454,7 @@ export {
3454
3454
  gs as s,
3455
3455
  hn as t,
3456
3456
  pn as u,
3457
- $s as v,
3457
+ ks as v,
3458
3458
  _s as w,
3459
3459
  mn as x,
3460
3460
  gn as y,