@xwadex/fesd 0.0.67 → 0.0.68

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.
@@ -17,7 +17,7 @@ import "validator";
17
17
  import "flatpickr";
18
18
  import hi from "vanilla-lazyload";
19
19
  import { lock as Ws, unlock as Gs } from "tua-body-scroll-lock";
20
- const He = {
20
+ const Ie = {
21
21
  SETTINGS: {
22
22
  videoId: null,
23
23
  videoType: null,
@@ -336,13 +336,13 @@ const He = {
336
336
  ripple4: vi,
337
337
  share4: Rs,
338
338
  tab4: gi,
339
- video4: He
339
+ video4: Ie
340
340
  }, Symbol.toStringTag, { value: "Module" })), S = {
341
341
  before: "beforebegin",
342
342
  after: "afterend",
343
343
  append: "beforeend",
344
344
  prepend: "afterbegin"
345
- }, ft = (n) => typeof n == "string" && n !== "", Ie = (n) => n instanceof HTMLElement, vt = (n) => n instanceof NodeList, A = (n) => _(n) !== null, G = (n) => typeof n == "function", _ = (n) => Ie(n) ? n : document.querySelector(n), D = (n) => vt(n) ? n : document.querySelectorAll(n), Us = () => Math.random().toString(36).substr(2, 9), Ys = (n) => {
345
+ }, ft = (n) => typeof n == "string" && n !== "", Me = (n) => n instanceof HTMLElement, vt = (n) => n instanceof NodeList, A = (n) => _(n) !== null, G = (n) => typeof n == "function", _ = (n) => Me(n) ? n : document.querySelector(n), D = (n) => vt(n) ? n : document.querySelectorAll(n), Us = () => Math.random().toString(36).substr(2, 9), Ys = (n) => {
346
346
  const i = document.createElement("div");
347
347
  return i.innerHTML = n, i.childNodes;
348
348
  }, Fs = (n) => {
@@ -397,33 +397,33 @@ const He = {
397
397
  easeOutQuart(n, i, t, e) {
398
398
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
399
399
  }
400
- }, Me = (n, i) => {
400
+ }, qe = (n, i) => {
401
401
  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", g = c ? "width" : "height", m = A(e) ? _(e) : document.scrollingElement, v = m[u], w = A(t) ? _(t).getBoundingClientRect()[h] : 0 - v, b = A(s) ? _(s).getBoundingClientRect()[g] : 0, T = w - a - b, C = 15;
402
402
  let y = 0;
403
403
  if (T === 0)
404
404
  return;
405
- const L = (x) => {
406
- const F = _(t);
407
- i && i.emit(x, F), !i && n.on && G(n.on[x]) && n.on[x](F);
405
+ const L = (k) => {
406
+ const J = _(t);
407
+ i && i.emit(k, J), !i && n.on && G(n.on[k]) && n.on[k](J);
408
408
  };
409
409
  L("beforeScroll");
410
410
  const O = () => {
411
411
  y += C;
412
- const x = Js[r](y, v, T, o);
413
- m[u] = x, y < o && requestAnimationFrame(O), y >= o && L("afterScroll");
412
+ const k = Js[r](y, v, T, o);
413
+ m[u] = k, y < o && requestAnimationFrame(O), y >= o && L("afterScroll");
414
414
  };
415
415
  requestAnimationFrame(O);
416
416
  };
417
- var tt, qe, St, yi, Lt, wi;
417
+ var et, Oe, Lt, yi, _t, wi;
418
418
  class bi {
419
419
  constructor(i, t = {}) {
420
- p(this, tt);
421
- p(this, St);
420
+ p(this, et);
422
421
  p(this, Lt);
422
+ p(this, _t);
423
423
  this.__storage__ = {
424
424
  el: i,
425
425
  options: t
426
- }, this.active = "data-anchor-active", d(this, tt, qe).call(this);
426
+ }, this.active = "data-anchor-active", d(this, et, Oe).call(this);
427
427
  }
428
428
  destroy() {
429
429
  const { elements: i } = this;
@@ -433,12 +433,12 @@ class bi {
433
433
  }
434
434
  update() {
435
435
  var i;
436
- return d(i = this.destroy(), tt, qe).call(i), this.emit("afterUpdate"), this;
436
+ return d(i = this.destroy(), et, Oe).call(i), this.emit("afterUpdate"), this;
437
437
  }
438
438
  static run(i) {
439
439
  const { SETTINGS: t } = wt, e = Object.assign({}, t, i);
440
440
  setTimeout(() => {
441
- Me(e);
441
+ qe(e);
442
442
  }, e.delay);
443
443
  }
444
444
  static url(i) {
@@ -447,11 +447,11 @@ class bi {
447
447
  return;
448
448
  const r = Object.assign({}, t, i, { target: a });
449
449
  setTimeout(() => {
450
- Me(r);
450
+ qe(r);
451
451
  }, r.delay);
452
452
  }
453
453
  }
454
- tt = new WeakSet(), qe = function() {
454
+ et = new WeakSet(), Oe = function() {
455
455
  const { el: i, options: t } = this.__storage__;
456
456
  if (!ft(i) || !A(i))
457
457
  return;
@@ -459,13 +459,13 @@ tt = new WeakSet(), qe = function() {
459
459
  if (this.elements = t.state == "not active" ? D(i + `:not([${this.active}])`) : D(i), this.elements = D(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
460
460
  for (const [o, a] of Object.entries(this.options.on))
461
461
  this.__events__[o] = [a];
462
- d(this, St, yi).call(this);
463
- }, St = new WeakSet(), yi = function() {
462
+ d(this, Lt, yi).call(this);
463
+ }, Lt = new WeakSet(), yi = function() {
464
464
  const { elements: i, options: t } = this;
465
465
  i.forEach((e) => {
466
- e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, Lt, wi), e.anchor.defaultOptions = t, e.anchor.methods = {}, e.anchor.methods.destroy = this.destroy, e.anchor.methods.update = this.update, e.addEventListener("click", e.anchor.eventHandler), e.setAttribute(this.active, "");
466
+ e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, _t, wi), e.anchor.defaultOptions = t, e.anchor.methods = {}, e.anchor.methods.destroy = this.destroy, e.anchor.methods.update = this.update, e.addEventListener("click", e.anchor.eventHandler), e.setAttribute(this.active, "");
467
467
  }), this.emit("afterInit");
468
- }, Lt = new WeakSet(), wi = function() {
468
+ }, _t = new WeakSet(), wi = function() {
469
469
  const { defaultOptions: i, eventHandler: t, instance: e } = this.anchor, s = {
470
470
  target: this.getAttribute("data-anchor-target") || i.target,
471
471
  container: this.getAttribute("data-anchor-container") || i.container,
@@ -479,7 +479,7 @@ tt = new WeakSet(), qe = function() {
479
479
  this.removeEventListener("click", t), setTimeout(() => {
480
480
  this.addEventListener("click", t);
481
481
  }, s.speed), setTimeout(() => {
482
- Me(s, e);
482
+ qe(s, e);
483
483
  }, s.delay);
484
484
  };
485
485
  Object.assign(bi.prototype, z);
@@ -492,15 +492,15 @@ const { MODALS: P } = window, Zs = (n) => {
492
492
  s.append(o);
493
493
  }), e.children[0];
494
494
  };
495
- var _t, Ei, Dt, Ai, xt, Si, kt, Li, $t, _i;
495
+ var Dt, Ei, kt, Ai, xt, Si, $t, Li, Ct, _i;
496
496
  class Ti extends HTMLElement {
497
497
  constructor() {
498
498
  super();
499
- p(this, _t);
500
499
  p(this, Dt);
501
- p(this, xt);
502
500
  p(this, kt);
501
+ p(this, xt);
503
502
  p(this, $t);
503
+ p(this, Ct);
504
504
  this.initialize = !1;
505
505
  }
506
506
  static get observedAttributes() {
@@ -509,12 +509,12 @@ class Ti extends HTMLElement {
509
509
  attributeChangedCallback(t, e, s) {
510
510
  switch (t) {
511
511
  case ":state":
512
- d(this, $t, _i).call(this, s);
512
+ d(this, Ct, _i).call(this, s);
513
513
  break;
514
514
  }
515
515
  }
516
516
  connectedCallback() {
517
- this.initialize || (this.initialize = !0, d(this, _t, Ei).call(this));
517
+ this.initialize || (this.initialize = !0, d(this, Dt, Ei).call(this));
518
518
  }
519
519
  open() {
520
520
  return this.setAttribute(":state", "open"), this;
@@ -526,12 +526,12 @@ class Ti extends HTMLElement {
526
526
  return this.setAttribute(":state", "destroy"), this;
527
527
  }
528
528
  }
529
- _t = new WeakSet(), Ei = function() {
529
+ Dt = new WeakSet(), Ei = function() {
530
530
  const { ATTRS: t } = j;
531
531
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
532
532
  const e = this.getAttribute(t.id) || Us();
533
- this.getAttribute(t.id) || (E(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), P[e] && E(`the ${t.id} "${e}" is already be used.`), P[e] = this, d(this, Dt, Ai).call(this);
534
- }, Dt = new WeakSet(), Ai = function() {
533
+ this.getAttribute(t.id) || (E(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), P[e] && E(`the ${t.id} "${e}" is already be used.`), P[e] = this, d(this, kt, Ai).call(this);
534
+ }, kt = new WeakSet(), Ai = function() {
535
535
  this.childDom = this.childNodes, this.template = Zs(this), this.innerHTML = "", this.append(this.template), d(this, xt, Si).call(this);
536
536
  }, xt = new WeakSet(), Si = function() {
537
537
  const t = this.querySelector(".modal-scroller");
@@ -540,8 +540,8 @@ _t = new WeakSet(), Ei = function() {
540
540
  x: "hidden"
541
541
  },
542
542
  autoUpdate: !0
543
- }), window.modalScroll = this.__scroller__, d(this, kt, Li).call(this);
544
- }, kt = new WeakSet(), Li = function() {
543
+ }), window.modalScroll = this.__scroller__, d(this, $t, Li).call(this);
544
+ }, $t = new WeakSet(), Li = function() {
545
545
  var a, r, l;
546
546
  const t = this, { ATTRS: e } = j, { close: s, destroy: o } = e;
547
547
  (a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
@@ -557,7 +557,7 @@ _t = new WeakSet(), Ei = function() {
557
557
  }), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
558
558
  c.stopPropagation();
559
559
  });
560
- }, $t = new WeakSet(), _i = function(t) {
560
+ }, Ct = new WeakSet(), _i = function(t) {
561
561
  const { __scroller__: e } = this;
562
562
  if (t === "open") {
563
563
  if (this.style.display = "block", e) {
@@ -594,16 +594,16 @@ const { MODALS: ei } = window, bt = {}, Di = (n, i, ...t) => {
594
594
  return;
595
595
  const e = n[i];
596
596
  e && G(e) && e.apply(n, t);
597
- }, xi = (n, ...i) => {
598
- n && G(n) && n.apply(V, i);
597
+ }, ki = (n, ...i) => {
598
+ n && G(n) && n.apply(tt, i);
599
599
  }, oi = (n, i) => {
600
600
  const { target: t } = n, e = ei[t] || _(n.target);
601
- e && ki(n, i), e || Qs(n, i);
602
- }, ki = (n, i) => {
601
+ e && xi(n, i), e || Qs(n, i);
602
+ }, xi = (n, i) => {
603
603
  const { target: t, action: e, on: s, e: o } = n, a = ei[t] || _(n.target);
604
604
  switch (["open", "close", "destroy"].forEach((l) => {
605
605
  a.once(l, () => {
606
- i && (i.emit(l, a, o), Di(i, s[l], a, o)), i || xi(s[l], a);
606
+ i && (i.emit(l, a, o), Di(i, s[l], a, o)), i || ki(s[l], a);
607
607
  });
608
608
  }), e) {
609
609
  case "open":
@@ -625,7 +625,7 @@ const { MODALS: ei } = window, bt = {}, Di = (n, i, ...t) => {
625
625
  if (!e)
626
626
  return E("modal4", "cannot find target or data-modal-route is not defined");
627
627
  const r = (l, ...c) => {
628
- i && (i.emit(l, ...c), Di(i, o[l], ...c)), i || xi(o[l], ...c);
628
+ i && (i.emit(l, ...c), Di(i, o[l], ...c)), i || ki(o[l], ...c);
629
629
  };
630
630
  bt[t] || (bt[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
631
631
  const c = Ys(l), u = _(s) || _(j.SETTINGS.container);
@@ -633,21 +633,21 @@ const { MODALS: ei } = window, bt = {}, Di = (n, i, ...t) => {
633
633
  u.append(g);
634
634
  });
635
635
  const h = ei[t] || _(n.target);
636
- r("complete", h), ki(n, i), delete bt[t];
636
+ r("complete", h), xi(n, i), delete bt[t];
637
637
  }).catch((l) => {
638
638
  r("error", l), delete bt[t];
639
639
  }));
640
640
  };
641
- var et, Oe, Ct, $i, Ht, Ci;
641
+ var it, Pe, Ht, $i, It, Ci;
642
642
  const B = class B {
643
643
  constructor(i, t = {}) {
644
- p(this, et);
645
- p(this, Ct);
644
+ p(this, it);
646
645
  p(this, Ht);
646
+ p(this, It);
647
647
  this.__storage__ = {
648
648
  el: i,
649
649
  options: t
650
- }, this.active = "data-modal-active", d(this, et, Oe).call(this);
650
+ }, this.active = "data-modal-active", d(this, it, Pe).call(this);
651
651
  }
652
652
  destroy() {
653
653
  const { elements: i } = this;
@@ -657,7 +657,7 @@ const B = class B {
657
657
  }
658
658
  update() {
659
659
  var i;
660
- return d(i = this.destroy(), et, Oe).call(i), this.emit("update"), this;
660
+ return d(i = this.destroy(), it, Pe).call(i), this.emit("update"), this;
661
661
  }
662
662
  /** static method 'open' */
663
663
  static open(i) {
@@ -673,7 +673,7 @@ const B = class B {
673
673
  Object.assign(B.prototype, B.prototype.__methods__);
674
674
  }
675
675
  };
676
- et = new WeakSet(), Oe = function() {
676
+ it = new WeakSet(), Pe = function() {
677
677
  const { el: i, options: t } = this.__storage__;
678
678
  if (!ft(i) || !A(i))
679
679
  return;
@@ -681,13 +681,13 @@ et = new WeakSet(), Oe = function() {
681
681
  if (this.elements = t.state == "not active" ? D(i + `:not([${this.active}])`) : D(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
682
682
  for (const [o, a] of Object.entries(this.options.on))
683
683
  this.__events__[o] = [a];
684
- d(this, Ct, $i).call(this);
685
- }, Ct = new WeakSet(), $i = function() {
684
+ d(this, Ht, $i).call(this);
685
+ }, Ht = new WeakSet(), $i = function() {
686
686
  const { elements: i, options: t } = this;
687
687
  i.forEach((e) => {
688
- e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Ht, Ci), e.modal.defaultOptions = t, e.modal.methods = {}, e.modal.methods.destroy = this.destroy, e.modal.methods.update = this.update, e.addEventListener("click", e.modal.eventHandler), e.setAttribute(this.active, "");
688
+ e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, It, Ci), e.modal.defaultOptions = t, e.modal.methods = {}, e.modal.methods.destroy = this.destroy, e.modal.methods.update = this.update, e.addEventListener("click", e.modal.eventHandler), e.setAttribute(this.active, "");
689
689
  }), this.emit("init");
690
- }, Ht = new WeakSet(), Ci = function(i) {
690
+ }, It = new WeakSet(), Ci = function(i) {
691
691
  const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = Fs(this.getAttribute("data-modal-on"));
692
692
  o && typeof o != "object" && E("modal4", "data-modal-on must be a json string.");
693
693
  const a = {
@@ -702,8 +702,8 @@ et = new WeakSet(), Oe = function() {
702
702
  this.addEventListener("click", e);
703
703
  }, 200), oi(a, s);
704
704
  };
705
- let V = B;
706
- Object.assign(V.prototype, z);
705
+ let tt = B;
706
+ Object.assign(tt.prototype, z);
707
707
  customElements.define("modern-modal", Ti);
708
708
  const Ks = (n, i) => {
709
709
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
@@ -721,15 +721,15 @@ const Ks = (n, i) => {
721
721
  }
722
722
  });
723
723
  }, Vs = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
724
- var it, Pe, It, Ii;
724
+ var st, Ne, Mt, Ii;
725
725
  class Hi {
726
726
  constructor(i, t = {}) {
727
- p(this, it);
728
- p(this, It);
727
+ p(this, st);
728
+ p(this, Mt);
729
729
  this.__storage__ = {
730
730
  el: i,
731
731
  options: t
732
- }, this.active = "data-aost-active", d(this, it, Pe).call(this);
732
+ }, this.active = "data-aost-active", d(this, st, Ne).call(this);
733
733
  }
734
734
  destroy(i) {
735
735
  const { elements: t, options: e } = this;
@@ -745,10 +745,10 @@ class Hi {
745
745
  }
746
746
  update(i) {
747
747
  var t;
748
- d(t = this.destroy(i), it, Pe).call(t);
748
+ d(t = this.destroy(i), st, Ne).call(t);
749
749
  }
750
750
  }
751
- it = new WeakSet(), Pe = function() {
751
+ st = new WeakSet(), Ne = function() {
752
752
  const { el: i, options: t } = this.__storage__;
753
753
  if (!ft(i) || !A(i))
754
754
  return;
@@ -756,8 +756,8 @@ it = new WeakSet(), Pe = function() {
756
756
  if (this.elements = t.state == "not active" ? D(i + `:not([${this.active}])`) : D(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
757
757
  for (const [o, a] of Object.entries(this.options.on))
758
758
  this.__events__[o] = [a];
759
- d(this, It, Ii).call(this);
760
- }, It = new WeakSet(), Ii = function() {
759
+ d(this, Mt, Ii).call(this);
760
+ }, Mt = new WeakSet(), Ii = function() {
761
761
  const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !A(e) ? window : _(e);
762
762
  this.eventHandler = () => {
763
763
  Ks(s, i);
@@ -769,34 +769,34 @@ it = new WeakSet(), Pe = function() {
769
769
  };
770
770
  Object.assign(Hi.prototype, z);
771
771
  const tn = (n) => {
772
- const { TEMPLATE: i } = He, { childDom: t } = n, e = document.createElement("div");
772
+ const { TEMPLATE: i } = Ie, { childDom: t } = n, e = document.createElement("div");
773
773
  e.innerHTML = i();
774
774
  const s = e.querySelector(".player-wrapper");
775
775
  return [...t].forEach((o) => {
776
776
  s.append(o);
777
777
  }), e.children[0];
778
778
  };
779
- var Mt, Mi, qt, qi, Ot, Oi, Pt, Pi, Nt, Ni, jt, ji, zt, zi, Bt, Bi, Wt, Wi, Gt, Gi;
779
+ var qt, Mi, Ot, qi, Pt, Oi, Nt, Pi, jt, Ni, zt, ji, Bt, zi, Wt, Bi, Gt, Wi, Rt, Gi;
780
780
  class en extends HTMLElement {
781
781
  constructor() {
782
782
  super();
783
- p(this, Mt);
784
783
  p(this, qt);
785
784
  p(this, Ot);
786
- // youtube iframe
787
785
  p(this, Pt);
788
- // vimeo iframe
786
+ // youtube iframe
789
787
  p(this, Nt);
790
- // youku iframe
788
+ // vimeo iframe
791
789
  p(this, jt);
790
+ // youku iframe
792
791
  p(this, zt);
793
- // 2025.02.11 新增 ig
794
792
  p(this, Bt);
795
- // 2025.02.11 新增 tiktok
793
+ // 2025.02.11 新增 ig
796
794
  p(this, Wt);
797
- // 2026.01.15 新增 video
795
+ // 2025.02.11 新增 tiktok
798
796
  p(this, Gt);
799
- d(this, Mt, Mi).call(this);
797
+ // 2026.01.15 新增 video
798
+ p(this, Rt);
799
+ d(this, qt, Mi).call(this);
800
800
  }
801
801
  play() {
802
802
  const { videoType: t } = this;
@@ -833,16 +833,16 @@ class en extends HTMLElement {
833
833
  }
834
834
  }
835
835
  }
836
- Mt = new WeakSet(), Mi = function() {
836
+ qt = new WeakSet(), Mi = function() {
837
837
  if (!this.getAttribute("video-id")) {
838
838
  E("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
839
839
  return;
840
840
  }
841
- this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.videoMode = this.getAttribute("video-mode"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), this.videoInboxImg = this.getAttribute("video-inbox-img"), d(this, qt, qi).call(this);
842
- }, qt = new WeakSet(), qi = function() {
843
- this.childDom = this.childNodes, this.template = tn(this), this.innerHTML = "", this.append(this.template), d(this, Ot, Oi).call(this);
844
- }, Ot = new WeakSet(), Oi = function() {
845
- const { videoType: t, videoMode: e } = this, { COOKIEDISAGREELAYOUT: s } = He;
841
+ this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.videoMode = this.getAttribute("video-mode"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), this.videoInboxImg = this.getAttribute("video-inbox-img"), d(this, Ot, qi).call(this);
842
+ }, Ot = new WeakSet(), qi = function() {
843
+ this.childDom = this.childNodes, this.template = tn(this), this.innerHTML = "", this.append(this.template), d(this, Pt, Oi).call(this);
844
+ }, Pt = new WeakSet(), Oi = function() {
845
+ const { videoType: t, videoMode: e } = this, { COOKIEDISAGREELAYOUT: s } = Ie;
846
846
  let o = "";
847
847
  function a(r) {
848
848
  f(r).addClass("cookie-disagree"), f(".cookie-disagree").append(s);
@@ -851,55 +851,55 @@ Mt = new WeakSet(), Mi = function() {
851
851
  case "youtubeAPI":
852
852
  break;
853
853
  case "youtube":
854
- document.body.wd_youtube == !1 ? a("video-player") : o = d(this, Pt, Pi).call(this);
854
+ document.body.wd_youtube == !1 ? a("video-player") : o = d(this, Nt, Pi).call(this);
855
855
  break;
856
856
  case "youkuAPI":
857
857
  break;
858
858
  case "youku":
859
- document.body.wd_youku == !1 ? a("video-player") : o = d(this, jt, ji).call(this);
859
+ document.body.wd_youku == !1 ? a("video-player") : o = d(this, zt, ji).call(this);
860
860
  break;
861
861
  case "vimeo":
862
- document.body.wd_vimeo == !1 ? a("video-player") : o = d(this, Nt, Ni).call(this);
862
+ document.body.wd_vimeo == !1 ? a("video-player") : o = d(this, jt, Ni).call(this);
863
863
  break;
864
864
  case "bilibili":
865
- document.body.wd_bilibili == !1 ? a("video-player") : o = d(this, zt, zi).call(this);
865
+ document.body.wd_bilibili == !1 ? a("video-player") : o = d(this, Bt, zi).call(this);
866
866
  break;
867
867
  case "instagram":
868
- document.body.wd_instagram == !1 ? a(".instagram-media") : o = d(this, Bt, Bi).call(this);
868
+ document.body.wd_instagram == !1 ? a(".instagram-media") : o = d(this, Wt, Bi).call(this);
869
869
  break;
870
870
  case "tiktok":
871
- document.body.wd_tiktok == !1 ? a("video-player") : o = d(this, Wt, Wi).call(this);
871
+ document.body.wd_tiktok == !1 ? a("video-player") : o = d(this, Gt, Wi).call(this);
872
872
  break;
873
873
  case "videojs":
874
874
  break;
875
875
  case "video":
876
- o = d(this, Gt, Gi).call(this);
876
+ o = d(this, Rt, Gi).call(this);
877
877
  break;
878
878
  }
879
879
  this.querySelector(".player-wrapper").insertAdjacentHTML(S.prepend, o);
880
- }, Pt = new WeakSet(), Pi = function() {
880
+ }, Nt = new WeakSet(), Pi = function() {
881
881
  const { videoId: t, autoplay: e, startTime: s } = this;
882
882
  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>`;
883
- }, Nt = new WeakSet(), Ni = function() {
883
+ }, jt = new WeakSet(), Ni = function() {
884
884
  const { videoId: t, autoplay: e, hash: s } = this;
885
885
  return `<iframe src="https://player.vimeo.com/video/${t}?h=${s}&${e === "on" ? "autoplay=1" : ""}&loop=1&color=ffffff&title=0&byline=0&portrait=0" frameborder="0" allow="${e === "on" ? "autoplay;" : ""} fullscreen; picture-in-picture" allowfullscreen></iframe><script src="https://player.vimeo.com/api/player.js"><\/script>`;
886
- }, jt = new WeakSet(), ji = function() {
886
+ }, zt = new WeakSet(), ji = function() {
887
887
  const { videoId: t, autoplay: e } = this;
888
888
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=true" : ""}" allow="${e === "on" ? "autoplay;" : ""} width="100%" height="100%" frameborder=0 "allowfullscreen"></iframe>`;
889
- }, zt = new WeakSet(), zi = function() {
889
+ }, Bt = new WeakSet(), zi = function() {
890
890
  const { videoId: t, autoplay: e } = this;
891
891
  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>`;
892
- }, Bt = new WeakSet(), Bi = function() {
892
+ }, Wt = new WeakSet(), Bi = function() {
893
893
  const { videoId: t, autoplay: e } = this;
894
894
  return `<iframe class="instagram-media instagram-media-rendered" id="instagram-embed-0" src="https://www.instagram.com/p/${t}/embed/" width="num-w" height=" num-h" scrolling="auto" frameborder="0" data-instgrm-payload-id="instagram-media-payload-0"></iframe>`;
895
- }, Wt = new WeakSet(), Wi = function() {
895
+ }, Gt = new WeakSet(), Wi = function() {
896
896
  const { videoId: t, autoplay: e } = this;
897
897
  return `<iframe name="__tt_embed__v79271677875424740" sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-top-navigation allow-same-origin" src="https://www.tiktok.com/player/v1/${t}?&${e === "on" ? "autoplay=1" : ""}"></iframe>`;
898
- }, Gt = new WeakSet(), Gi = function() {
898
+ }, Rt = new WeakSet(), Gi = function() {
899
899
  const { videoId: t, autoplay: e } = this;
900
900
  return `<video src="${t}" ${e == "on" ? "autoplay" : ""} muted playsinline controls></video>`;
901
901
  };
902
- let Q = 0;
902
+ let K = 0;
903
903
  function Ri(n) {
904
904
  const i = [];
905
905
  return (n || []).forEach((t) => {
@@ -908,12 +908,12 @@ function Ri(n) {
908
908
  }
909
909
  function Xi(n) {
910
910
  const i = Ri(n);
911
- Q += 1, Q === 1 && document.documentElement.classList.add("scrollLock"), Ws(i);
911
+ K += 1, K === 1 && document.documentElement.classList.add("scrollLock"), Ws(i);
912
912
  }
913
913
  function Ui(n) {
914
- Q = Math.max(0, Q - 1);
914
+ K = Math.max(0, K - 1);
915
915
  const i = Ri(n);
916
- Gs(i), Q === 0 && document.documentElement.classList.remove("scrollLock");
916
+ Gs(i), K === 0 && document.documentElement.classList.remove("scrollLock");
917
917
  }
918
918
  async function zn(n = 0) {
919
919
  if (f(".loading-wrapper").length)
@@ -1132,32 +1132,32 @@ function uo(n) {
1132
1132
  return i.innerHTML = n, i.childNodes[0];
1133
1133
  }
1134
1134
  const ai = (n) => n.videoId !== "" || typeof n.videoId < "u", on = (n) => n.$selector.getAttribute("video4-active") === "on", yt = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`, ri = (n) => (console.log(n.videoId, "params.videoId"), `<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="${n.videoId}"></blockquote>`);
1135
- var st, je, Rt, Yi, nt, ze, ot, Be, Xt, Fi, at, We, Ut, Ji;
1135
+ var nt, ze, Xt, Yi, ot, Be, at, We, Ut, Fi, rt, Ge, Yt, Ji;
1136
1136
  const X = class X {
1137
1137
  //*-* 給Article4用的 **//
1138
1138
  constructor(i, t = {}) {
1139
- p(this, st);
1140
- p(this, Rt);
1141
1139
  p(this, nt);
1142
- p(this, ot);
1143
1140
  p(this, Xt);
1141
+ p(this, ot);
1144
1142
  p(this, at);
1145
1143
  p(this, Ut);
1146
- if (!ft(i) && !Ie(i) && !vt(i)) {
1144
+ p(this, rt);
1145
+ p(this, Yt);
1146
+ if (!ft(i) && !Me(i) && !vt(i)) {
1147
1147
  ni("video4", `找不到該物件 -> ${i}`);
1148
1148
  return;
1149
1149
  }
1150
1150
  this.__storage__ = {
1151
1151
  el: i,
1152
1152
  options: t
1153
- }, this.active = "data-video-active", d(this, st, je).call(this);
1153
+ }, this.active = "data-video-active", d(this, nt, ze).call(this);
1154
1154
  }
1155
1155
  update() {
1156
- d(this, st, je).call(this);
1156
+ d(this, nt, ze).call(this);
1157
1157
  }
1158
1158
  };
1159
- st = new WeakSet(), je = function() {
1160
- const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = He;
1159
+ nt = new WeakSet(), ze = function() {
1160
+ const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = Ie;
1161
1161
  if (t.isGlobal && (X.globalOptions = t), this.elements = t.state == "not active" ? D(i + `:not([${this.active}])`) : D(i), this.options = Object.assign(
1162
1162
  {},
1163
1163
  { LAYOUT: o },
@@ -1171,18 +1171,18 @@ st = new WeakSet(), je = function() {
1171
1171
  ), this.__events__ = Object.assign({}, s), this.options.on)
1172
1172
  for (const [a, r] of Object.entries(this.options.on))
1173
1173
  this.__events__[a] = [r];
1174
- d(this, Rt, Yi).call(this);
1175
- }, Rt = new WeakSet(), Yi = function() {
1174
+ d(this, Xt, Yi).call(this);
1175
+ }, Xt = new WeakSet(), Yi = function() {
1176
1176
  const { elements: i, options: t } = this;
1177
1177
  i.forEach((e) => {
1178
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Ut, Ji).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), ai(e.video.params) && !on(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Xt, Fi).call(this, e)), ai(e.video.params) || ni("video4", "無法取得影片 ID");
1178
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Yt, Ji).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), ai(e.video.params) && !on(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Ut, Fi).call(this, e)), ai(e.video.params) || ni("video4", "無法取得影片 ID");
1179
1179
  }), this.emit("init");
1180
- }, nt = new WeakSet(), ze = function(i) {
1180
+ }, ot = new WeakSet(), Be = function(i) {
1181
1181
  const { $selector: t, videoId: e, videoType: s, videoInboxImg: o, videoHighQualityPic: a } = i, r = t == null ? void 0 : t.querySelector("img"), l = (r == null ? void 0 : r.getAttribute("src")) || (r == null ? void 0 : r.getAttribute("data-src"));
1182
1182
  return o ? Promise.resolve(o) : l ? Promise.resolve(l) : s == "youtube" ? a == "on" ? Promise.resolve(`https://img.youtube.com/vi/${e}/maxresdefault.jpg`) : Promise.resolve(`https://img.youtube.com/vi/${e}/0.jpg`) : s == "vimeo" ? Promise.resolve(`https://vumbnail.com/${e}_large.jpg`) : s == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${e}`, { method: "GET", redirect: "follow" }).then((c) => c.json()).then((c) => c.thumbnail_url).catch(function() {
1183
1183
  return "";
1184
1184
  }) : Promise.resolve("");
1185
- }, ot = new WeakSet(), Be = function(i, t) {
1185
+ }, at = new WeakSet(), We = function(i, t) {
1186
1186
  const { videoType: e, videoId: s } = t;
1187
1187
  if (!(i != null && i.getAttribute("src") || i != null && i.getAttribute("data-src"))) {
1188
1188
  if (e === "video") {
@@ -1195,11 +1195,11 @@ st = new WeakSet(), je = function() {
1195
1195
  };
1196
1196
  return;
1197
1197
  }
1198
- d(this, nt, ze).call(this, t).then((a) => {
1198
+ d(this, ot, Be).call(this, t).then((a) => {
1199
1199
  a ? i.setAttribute("src", `${a}`) : E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1200
1200
  });
1201
1201
  }
1202
- }, Xt = new WeakSet(), Fi = function(i) {
1202
+ }, Ut = new WeakSet(), Fi = function(i) {
1203
1203
  const { LAYOUT: t } = this.options, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u, videoHighQualityPic: h } = e;
1204
1204
  if (l === "onBox" || l === "inBox") {
1205
1205
  let g = null;
@@ -1207,7 +1207,7 @@ st = new WeakSet(), je = function() {
1207
1207
  i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), E("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1208
1208
  const m = s.querySelector("img"), v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src")), w = t[o] ? t[o] : t[0] || "";
1209
1209
  if (w ? m.insertAdjacentHTML(S.after, w) : E("video4", `找不到對應的 LAYOUT 設定 (No: ${o}),且無預設樣式。`), !v)
1210
- d(this, ot, Be).call(this, m, e);
1210
+ d(this, at, We).call(this, m, e);
1211
1211
  else if (!v && r == "youtube")
1212
1212
  h == "on" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`);
1213
1213
  else if (!v && r == "vimeo")
@@ -1228,7 +1228,7 @@ st = new WeakSet(), je = function() {
1228
1228
  console.log("error");
1229
1229
  }) : E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1230
1230
  }
1231
- 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.instance = this), g.video.eventHandler = d(this, at, We), g.addEventListener("click", g.video.eventHandler);
1231
+ 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.instance = this), g.video.eventHandler = d(this, rt, Ge), g.addEventListener("click", g.video.eventHandler);
1232
1232
  } else if (l === "onPage") {
1233
1233
  let g = null;
1234
1234
  if (u == "on") {
@@ -1241,14 +1241,14 @@ st = new WeakSet(), je = function() {
1241
1241
  m.setAttribute("src", `${b}`);
1242
1242
  }).catch(function(w) {
1243
1243
  console.log("error");
1244
- }) : v || E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片") : d(this, ot, Be).call(this, m, e), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || E("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1244
+ }) : v || E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片") : d(this, at, We).call(this, m, e), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || E("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1245
1245
  } else {
1246
1246
  s.innerHTML = yt(e);
1247
1247
  return;
1248
1248
  }
1249
- g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, at, We), g.addEventListener("click", g.video.eventHandler);
1249
+ g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, rt, Ge), g.addEventListener("click", g.video.eventHandler);
1250
1250
  }
1251
- }, at = new WeakSet(), We = function(i) {
1251
+ }, rt = new WeakSet(), Ge = function(i) {
1252
1252
  const { video: t } = this, e = t.instance, {
1253
1253
  $selector: s,
1254
1254
  videoMode: o,
@@ -1281,19 +1281,19 @@ st = new WeakSet(), je = function() {
1281
1281
  var O;
1282
1282
  const L = y.querySelectorAll("[data-overlayscrollbars-viewport]");
1283
1283
  if (b.update(), Xi([...L]), u == "instagram") {
1284
- const x = document.querySelector("[video-template] .modal-content");
1285
- new ResizeObserver((J) => {
1286
- J[0].contentRect.height > 50 && x.classList.add("active");
1287
- }).observe(x);
1284
+ const k = document.querySelector("[video-template] .modal-content");
1285
+ new ResizeObserver((Z) => {
1286
+ Z[0].contentRect.height > 50 && k.classList.add("active");
1287
+ }).observe(k);
1288
1288
  }
1289
1289
  if (o == "inBox")
1290
1290
  if (u == "instagram")
1291
1291
  f(".video-content").remove();
1292
1292
  else {
1293
- let x;
1294
- const F = y.querySelector(".video-content");
1295
- d(O = e, nt, ze).call(O, t.params).then((J) => {
1296
- x = `
1293
+ let k;
1294
+ const J = y.querySelector(".video-content");
1295
+ d(O = e, ot, Be).call(O, t.params).then((Z) => {
1296
+ k = `
1297
1297
  <div
1298
1298
  class="photo-box"
1299
1299
  video-target
@@ -1306,16 +1306,16 @@ st = new WeakSet(), je = function() {
1306
1306
  >
1307
1307
  <picture>
1308
1308
  <source
1309
- srcset="${J || ""}"
1309
+ srcset="${Z || ""}"
1310
1310
  type="image/webp"
1311
1311
  />
1312
1312
  <source
1313
- srcset="${J || ""}"
1313
+ srcset="${Z || ""}"
1314
1314
  type="image/jpeg"
1315
1315
  />
1316
- <img src="${J || ""}" alt="" />
1316
+ <img src="${Z || ""}" alt="" />
1317
1317
  </picture>
1318
- </div>`, F.insertAdjacentHTML(S.prepend, x);
1318
+ </div>`, J.insertAdjacentHTML(S.prepend, k);
1319
1319
  const ii = y.querySelectorAll("[video-target]");
1320
1320
  ii.length > 0 && new X(ii, {
1321
1321
  LAYOUT: t.params.LAYOUT,
@@ -1333,7 +1333,7 @@ st = new WeakSet(), je = function() {
1333
1333
  }
1334
1334
  }
1335
1335
  };
1336
- V.open(C);
1336
+ tt.open(C);
1337
1337
  } else if (o == "onPage")
1338
1338
  if (t.params.videoAutoplay = "on", r == "off") {
1339
1339
  if (s.querySelector("video-player"))
@@ -1344,7 +1344,7 @@ st = new WeakSet(), je = function() {
1344
1344
  (s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", yt(t.params));
1345
1345
  return;
1346
1346
  }
1347
- }, Ut = new WeakSet(), Ji = function(i) {
1347
+ }, Yt = new WeakSet(), Ji = function(i) {
1348
1348
  const t = this.options;
1349
1349
  return {
1350
1350
  $selector: i,
@@ -1365,8 +1365,8 @@ st = new WeakSet(), je = function() {
1365
1365
  LAYOUT: t.LAYOUT || []
1366
1366
  };
1367
1367
  }, si(X, "globalOptions", {});
1368
- let Ne = X;
1369
- Object.assign(Ne.prototype, z);
1368
+ let je = X;
1369
+ Object.assign(je.prototype, z);
1370
1370
  customElements.define("video-player", en);
1371
1371
  const an = {
1372
1372
  "zh-tw": {
@@ -2198,7 +2198,7 @@ const an = {
2198
2198
  ]
2199
2199
  }
2200
2200
  };
2201
- let K;
2201
+ let V;
2202
2202
  const rn = (n) => {
2203
2203
  const { TEMPLATE: i } = ti, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("d4-icon"), r = n.getAttribute("custom-template");
2204
2204
  e.innerHTML = i(
@@ -2274,17 +2274,17 @@ const rn = (n) => {
2274
2274
  }
2275
2275
  }, cn = (n) => {
2276
2276
  const i = n.s.cityLang;
2277
- f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (K = JSON.parse(f("#newCityData").val())[0], console.log([0])) : K = an, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(K[i]).forEach((t) => {
2277
+ f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (V = JSON.parse(f("#newCityData").val())[0], console.log([0])) : V = an, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(V[i]).forEach((t) => {
2278
2278
  const e = document.createElement("li");
2279
2279
  e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
2280
2280
  }), n.s.allLi = n.s.dropdownEl.querySelectorAll(".dropdown-list li"));
2281
2281
  }, dn = (n, i) => {
2282
2282
  const t = n.s.cityLang;
2283
- K[t][i].forEach((e, s) => {
2283
+ V[t][i].forEach((e, s) => {
2284
2284
  const o = document.createElement("li");
2285
2285
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.s.dropdownEl.querySelector(".dropdown-list").append(o);
2286
2286
  });
2287
- }, Ge = () => {
2287
+ }, Re = () => {
2288
2288
  D('dropdown-el[d4-status="open"]').forEach((i) => {
2289
2289
  i.close();
2290
2290
  });
@@ -2298,18 +2298,18 @@ const rn = (n) => {
2298
2298
  };
2299
2299
  un();
2300
2300
  document.addEventListener("click", function() {
2301
- Ge();
2301
+ Re();
2302
2302
  });
2303
- var Yt, Qi, Ft, Ki, rt, Re, Jt, Vi, Zt, ts;
2303
+ var Ft, Qi, Jt, Ki, U, Tt, Zt, Vi, Qt, ts;
2304
2304
  class Zi extends HTMLElement {
2305
2305
  constructor() {
2306
2306
  super();
2307
- p(this, Yt);
2308
2307
  p(this, Ft);
2309
- // -** 獨立 dropdown 出 body 更新
2310
- p(this, rt);
2311
2308
  p(this, Jt);
2309
+ // -** 獨立 dropdown 出 body 更新
2310
+ p(this, U);
2312
2311
  p(this, Zt);
2312
+ p(this, Qt);
2313
2313
  this.initialize = !1;
2314
2314
  }
2315
2315
  static get observedAttributes() {
@@ -2355,7 +2355,7 @@ class Zi extends HTMLElement {
2355
2355
  }
2356
2356
  connectedCallback() {
2357
2357
  const t = this;
2358
- t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, Yt, Qi).call(this));
2358
+ t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, Ft, Qi).call(this));
2359
2359
  }
2360
2360
  disconnectedCallback() {
2361
2361
  this.s && this.s.dropdownEl && this.s.dropdownEl.parentNode === document.body && document.body.removeChild(this.s.dropdownEl);
@@ -2363,12 +2363,7 @@ class Zi extends HTMLElement {
2363
2363
  open() {
2364
2364
  const t = this;
2365
2365
  let e;
2366
- if (t.getAttribute("d4-portal") == "true")
2367
- Ge(), t.s.dropdownEl.parentNode !== document.body && document.body.appendChild(t.s.dropdownEl), t.__scroller__ || t.__events__.bindScrollbar(), e = t.s.dropdownEl.querySelector(".dropdown-scroller").clientHeight;
2368
- else {
2369
- const c = t.querySelector(".dropdown-scroller"), u = c.querySelector(".os-content"), h = parseInt(getComputedStyle(c).maxHeight) || 200;
2370
- e = Math.min(u ? u.scrollHeight : c.clientHeight, h);
2371
- }
2366
+ t.getAttribute("d4-portal") == "true" ? (Re(), t.s.dropdownEl.parentNode !== document.body && document.body.appendChild(t.s.dropdownEl), t.__scroller__ || t.__events__.bindScrollbar(), d(this, U, Tt).call(this), t.s.dropdownEl.offsetHeight, e = t.s.dropdownEl.querySelector(".dropdown-scroller").clientHeight) : e = t.querySelector(".dropdown-scroller").clientHeight;
2372
2367
  const s = t.classList.contains("filter"), o = () => {
2373
2368
  if (t.getAttribute("d4-portal") == "true") {
2374
2369
  if (s)
@@ -2387,10 +2382,10 @@ class Zi extends HTMLElement {
2387
2382
  const c = o() + t.s.subDropdownTotalH;
2388
2383
  return c > r ? r : c;
2389
2384
  };
2390
- return t.getAttribute("d4-portal") !== "true" && Ge(), t.setAttribute("d4-status", "open"), t.setAttribute("d4-default-height", o()), t.getAttribute("d4-portal") == "true" ? (t.s.dropdownEl.style.setProperty("--maxHeight", `${l()}px`), t.s.dropdownEl.style.zIndex = "9999", d(this, rt, Re).call(this), t.s.dropdownEl.offsetHeight, t.s.dropdownEl.style.height = `${l()}px`, t.__events__._scrollUpdate = () => {
2385
+ return t.getAttribute("d4-portal") !== "true" && Re(), t.setAttribute("d4-status", "open"), t.setAttribute("d4-default-height", o()), t.getAttribute("d4-portal") == "true" ? (t.s.dropdownEl.style.setProperty("--maxHeight", `${l()}px`), t.s.dropdownEl.style.zIndex = "9999", d(this, U, Tt).call(this), t.s.dropdownEl.offsetHeight, t.s.dropdownEl.style.height = `${l()}px`, t.__events__._scrollUpdate = () => {
2391
2386
  var u;
2392
2387
  const c = t.getBoundingClientRect();
2393
- c.bottom < 0 || c.top > window.innerHeight ? t.close() : d(u = t, rt, Re).call(u);
2388
+ c.bottom < 0 || c.top > window.innerHeight ? t.close() : d(u = t, U, Tt).call(u);
2394
2389
  }, window.addEventListener("scroll", t.__events__._scrollUpdate, { passive: !0, capture: !0 }), window.addEventListener("resize", t.__events__._scrollUpdate, { passive: !0 })) : (t.style.cssText = `--maxHeight: ${l()}px;`, t.s.dropdownEl.style.cssText = `
2395
2390
  height: ${l()}px;
2396
2391
  z-index: 2;
@@ -2413,16 +2408,16 @@ class Zi extends HTMLElement {
2413
2408
  this.__events__.selectOption();
2414
2409
  }
2415
2410
  }
2416
- Yt = new WeakSet(), Qi = function() {
2417
- this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Ft, Ki).call(this);
2418
- }, Ft = new WeakSet(), Ki = function() {
2419
- this.s.childDom = this.childNodes, this.s.template = rn(this), this.innerHTML = "", this.append(this.s.template), this.s.dropdownEl = this.querySelector(".dropdown"), this.getAttribute("d4-portal") === "true" && (this.s.dropdownEl.setAttribute("data-d4-portal", ""), document.body.appendChild(this.s.dropdownEl)), d(this, Jt, Vi).call(this);
2420
- }, rt = new WeakSet(), Re = function() {
2411
+ Ft = new WeakSet(), Qi = function() {
2412
+ this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Jt, Ki).call(this);
2413
+ }, Jt = new WeakSet(), Ki = function() {
2414
+ this.s.childDom = this.childNodes, this.s.template = rn(this), this.innerHTML = "", this.append(this.s.template), this.s.dropdownEl = this.querySelector(".dropdown"), this.getAttribute("d4-portal") === "true" && (this.s.dropdownEl.setAttribute("data-d4-portal", ""), document.body.appendChild(this.s.dropdownEl)), d(this, Zt, Vi).call(this);
2415
+ }, U = new WeakSet(), Tt = function() {
2421
2416
  const t = this, e = t.getBoundingClientRect(), s = t.s.dropdownEl;
2422
2417
  s.style.position = "fixed", s.style.overflow = "hidden", s.style.left = `${e.left}px`, s.style.width = `${e.width}px`;
2423
2418
  const o = parseInt(s.style.height) || s.scrollHeight;
2424
2419
  window.innerHeight - e.bottom < o && e.top > o ? (s.style.top = "auto", s.style.bottom = `${window.innerHeight - e.top + 5}px`) : (s.style.top = `${e.bottom + 5}px`, s.style.bottom = "auto");
2425
- }, Jt = new WeakSet(), Vi = function() {
2420
+ }, Zt = new WeakSet(), Vi = function() {
2426
2421
  var s;
2427
2422
  const t = this;
2428
2423
  t.s.allLi = t.s.dropdownEl.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", cn(t), t.s.subDropdownTotalH = 0;
@@ -2467,8 +2462,8 @@ Yt = new WeakSet(), Qi = function() {
2467
2462
  };
2468
2463
  break;
2469
2464
  }
2470
- M(t, t.s.value.index), d(s = t, Zt, ts).call(s), t.classList.add("d4-initialize");
2471
- }, Zt = new WeakSet(), ts = function() {
2465
+ M(t, t.s.value.index), d(s = t, Qt, ts).call(s), t.classList.add("d4-initialize");
2466
+ }, Qt = new WeakSet(), ts = function() {
2472
2467
  const t = this;
2473
2468
  t.__events__.dropdownToggle = () => {
2474
2469
  t.addEventListener("click", function(e) {
@@ -2543,7 +2538,7 @@ Yt = new WeakSet(), Qi = function() {
2543
2538
  case "single":
2544
2539
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2545
2540
  const v = e.s.cityLang, w = l.textContent.trim(), b = document.getElementById(e.getAttribute("dist-select"));
2546
- b && (b.s.dropdownEl.querySelector(".dropdown-list").textContent = "", M(b, -1), K[v][w].forEach((T, C) => {
2541
+ b && (b.s.dropdownEl.querySelector(".dropdown-list").textContent = "", M(b, -1), V[v][w].forEach((T, C) => {
2547
2542
  const y = document.createElement("li");
2548
2543
  y.textContent = T[0], y.setAttribute("data-option", T[0]), e.getAttribute("d4-portal") == "true" ? b.s.dropdownEl.querySelector(".dropdown-list").append(y) : b.querySelector(".dropdown-list").append(y);
2549
2544
  }), e.__events__.selectOption(b));
@@ -2586,7 +2581,7 @@ Yt = new WeakSet(), Qi = function() {
2586
2581
  };
2587
2582
  Object.assign(Zi.prototype, z);
2588
2583
  customElements.define("dropdown-el", Zi);
2589
- function Tt(n) {
2584
+ function Et(n) {
2590
2585
  const i = {};
2591
2586
  return [...n.attributes].forEach((t) => {
2592
2587
  if (t.name.includes("duration-")) {
@@ -2596,9 +2591,9 @@ function Tt(n) {
2596
2591
  }), Object.keys(i).length === 0 ? null : i;
2597
2592
  }
2598
2593
  function li(n) {
2599
- if (Tt(n)) {
2594
+ if (Et(n)) {
2600
2595
  let i;
2601
- const t = Object.keys(Tt(n)).map((e) => ({
2596
+ const t = Object.keys(Et(n)).map((e) => ({
2602
2597
  value: e,
2603
2598
  point: e
2604
2599
  }));
@@ -2607,7 +2602,7 @@ function li(n) {
2607
2602
  const { point: s, value: o } = t[e];
2608
2603
  window.matchMedia(`(max-width: ${o}px)`).matches && (i = s);
2609
2604
  }
2610
- return i ? Number(Tt(n)[i]) : n.s.options.duration;
2605
+ return i ? Number(Et(n)[i]) : n.s.options.duration;
2611
2606
  } else
2612
2607
  return n.s.options.duration;
2613
2608
  }
@@ -2684,14 +2679,14 @@ function hn(n) {
2684
2679
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2685
2680
  };
2686
2681
  }
2687
- var Qt, es, Kt, is, Vt, ss, te, ns;
2682
+ var Kt, es, Vt, is, te, ss, ee, ns;
2688
2683
  class mn extends HTMLElement {
2689
2684
  constructor() {
2690
2685
  super();
2691
- p(this, Qt);
2692
2686
  p(this, Kt);
2693
2687
  p(this, Vt);
2694
2688
  p(this, te);
2689
+ p(this, ee);
2695
2690
  this.initialize = !1;
2696
2691
  }
2697
2692
  static get observedAttributes() {
@@ -2700,7 +2695,7 @@ class mn extends HTMLElement {
2700
2695
  attributeChangedCallback(t, e, s) {
2701
2696
  }
2702
2697
  connectedCallback() {
2703
- this.initialize || (this.initialize = !0, d(this, Qt, es).call(this));
2698
+ this.initialize || (this.initialize = !0, d(this, Kt, es).call(this));
2704
2699
  }
2705
2700
  play() {
2706
2701
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -2709,7 +2704,7 @@ class mn extends HTMLElement {
2709
2704
  this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
2710
2705
  }
2711
2706
  }
2712
- Qt = new WeakSet(), es = function() {
2707
+ Kt = new WeakSet(), es = function() {
2713
2708
  const t = {
2714
2709
  direction: this.getAttribute("direction") || I.SETTINGS.direction,
2715
2710
  // up / down / left / right
@@ -2717,7 +2712,7 @@ Qt = new WeakSet(), es = function() {
2717
2712
  // normal / alternate / endStop
2718
2713
  duration: Number(this.getAttribute("duration")) || I.SETTINGS.duration,
2719
2714
  // ms
2720
- durationBreakpoints: Tt(this) || I.SETTINGS.durationBreakpoints,
2715
+ durationBreakpoints: Et(this) || I.SETTINGS.durationBreakpoints,
2721
2716
  autoplay: this.getAttribute("autoplay") || I.SETTINGS.autoplay,
2722
2717
  // normal / alternate / endStop
2723
2718
  pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : I.SETTINGS.pauseOnMouseenter,
@@ -2726,8 +2721,8 @@ Qt = new WeakSet(), es = function() {
2726
2721
  // true / false
2727
2722
  gap: Number(this.getAttribute("gap")) || I.SETTINGS.gap
2728
2723
  };
2729
- this.s = {}, this.s.options = t, this.s.nowDuration = li(this), pn(this), d(this, Kt, is).call(this);
2730
- }, Kt = new WeakSet(), is = function() {
2724
+ this.s = {}, this.s.options = t, this.s.nowDuration = li(this), pn(this), d(this, Vt, is).call(this);
2725
+ }, Vt = new WeakSet(), is = function() {
2731
2726
  const { direction: t, continual: e, gap: s } = this.s.options;
2732
2727
  switch (t) {
2733
2728
  case "left":
@@ -2739,8 +2734,8 @@ Qt = new WeakSet(), es = function() {
2739
2734
  e ? this.style.cssText = `height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${s}px;` : this.style.cssText = `min-height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${s}px;`;
2740
2735
  break;
2741
2736
  }
2742
- d(this, Vt, ss).call(this), d(this, te, ns).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2743
- }, Vt = new WeakSet(), ss = function() {
2737
+ d(this, te, ss).call(this), d(this, ee, ns).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2738
+ }, te = new WeakSet(), ss = function() {
2744
2739
  const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
2745
2740
  let c;
2746
2741
  function u() {
@@ -2805,7 +2800,7 @@ Qt = new WeakSet(), es = function() {
2805
2800
  }), t.addEventListener("mouseleave", function() {
2806
2801
  t.s.animation && r && t.s.animation.playState === "paused" && t.play();
2807
2802
  });
2808
- }, te = new WeakSet(), ns = function() {
2803
+ }, ee = new WeakSet(), ns = function() {
2809
2804
  const t = this;
2810
2805
  function e() {
2811
2806
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
@@ -2826,7 +2821,7 @@ const ci = function(n, i) {
2826
2821
  return function(e) {
2827
2822
  t && clearTimeout(t), t = setTimeout(n, 200, e);
2828
2823
  };
2829
- }, k = (n, i) => {
2824
+ }, x = (n, i) => {
2830
2825
  if (vt(n)) {
2831
2826
  n.forEach((t) => {
2832
2827
  t.classList.add(i);
@@ -2843,22 +2838,22 @@ const ci = function(n, i) {
2843
2838
  }
2844
2839
  n.classList.remove(i);
2845
2840
  };
2846
- var ee, os, ie, as, se, rs, lt, Xe, U, Et, ne, ls;
2841
+ var ie, os, se, as, ne, rs, lt, Xe, Y, At, oe, ls;
2847
2842
  class di {
2848
2843
  constructor(i) {
2849
2844
  // 初始化
2850
- p(this, ee);
2851
- // 左右箭頭事件綁定
2852
2845
  p(this, ie);
2853
- // 左右拖拉事件綁定
2846
+ // 左右箭頭事件綁定
2854
2847
  p(this, se);
2848
+ // 左右拖拉事件綁定
2849
+ p(this, ne);
2855
2850
  // 卷軸位置判斷
2856
2851
  p(this, lt);
2857
2852
  // 隱藏按鈕判斷
2858
- p(this, U);
2853
+ p(this, Y);
2859
2854
  // 選項事件綁定
2860
- p(this, ne);
2861
- this.$element = i, this.option = i.s.option.drag, this._didInitialScroll = !1, d(this, ee, os).call(this);
2855
+ p(this, oe);
2856
+ this.$element = i, this.option = i.s.option.drag, this._didInitialScroll = !1, d(this, ie, os).call(this);
2862
2857
  }
2863
2858
  // 更新 active 位置
2864
2859
  update(i = !1) {
@@ -2879,7 +2874,7 @@ class di {
2879
2874
  s();
2880
2875
  }
2881
2876
  }
2882
- ee = new WeakSet(), os = function() {
2877
+ ie = new WeakSet(), os = function() {
2883
2878
  var s, o, a, r;
2884
2879
  const i = this;
2885
2880
  if (!i.$element)
@@ -2888,10 +2883,10 @@ ee = new WeakSet(), os = function() {
2888
2883
  let t = !1;
2889
2884
  const e = () => {
2890
2885
  t || (requestAnimationFrame(() => {
2891
- d(this, lt, Xe).call(this), d(this, U, Et).call(this), t = !1;
2886
+ d(this, lt, Xe).call(this), d(this, Y, At).call(this), t = !1;
2892
2887
  }), t = !0);
2893
2888
  };
2894
- i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, se, rs).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2889
+ i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, ne, rs).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2895
2890
  S.prepend,
2896
2891
  `<div class="navigation">
2897
2892
  <div class="button prev">
@@ -2901,10 +2896,10 @@ ee = new WeakSet(), os = function() {
2901
2896
  <div></div>
2902
2897
  </div>
2903
2898
  </div>`
2904
- ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, ie, as).call(a)), d(r = i, ne, ls).call(r), i.update(!0), requestAnimationFrame(() => {
2905
- d(this, lt, Xe).call(this), d(this, U, Et).call(this);
2899
+ ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, se, as).call(a)), d(r = i, oe, ls).call(r), i.update(!0), requestAnimationFrame(() => {
2900
+ d(this, lt, Xe).call(this), d(this, Y, At).call(this);
2906
2901
  });
2907
- }, ie = new WeakSet(), as = function() {
2902
+ }, se = new WeakSet(), as = function() {
2908
2903
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2909
2904
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
2910
2905
  t.scrollTo({
@@ -2912,13 +2907,13 @@ ee = new WeakSet(), os = function() {
2912
2907
  behavior: "smooth"
2913
2908
  }), setTimeout(() => {
2914
2909
  var r;
2915
- d(r = i, U, Et).call(r);
2910
+ d(r = i, Y, At).call(r);
2916
2911
  }, 100);
2917
2912
  };
2918
2913
  e.forEach((o) => {
2919
2914
  o.removeEventListener("click", s), o.addEventListener("click", s);
2920
2915
  });
2921
- }, se = new WeakSet(), rs = function() {
2916
+ }, ne = new WeakSet(), rs = function() {
2922
2917
  const { $wrapper: i } = this;
2923
2918
  let t = !1, e = !1, s = 0, o = 0;
2924
2919
  const a = function(h) {
@@ -2950,30 +2945,30 @@ ee = new WeakSet(), os = function() {
2950
2945
  });
2951
2946
  }, lt = new WeakSet(), Xe = function() {
2952
2947
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
2953
- e <= 0 || (k(i, "scrollable"), s == 0 ? (k(t, "start"), $(t, "end")) : s + 1 >= e ? ($(t, "start"), k(t, "end")) : (k(t, "center"), $(t, "start"), $(t, "end")));
2954
- }, U = new WeakSet(), Et = function() {
2948
+ e <= 0 || (x(i, "scrollable"), s == 0 ? (x(t, "start"), $(t, "end")) : s + 1 >= e ? ($(t, "start"), x(t, "end")) : (x(t, "center"), $(t, "start"), $(t, "end")));
2949
+ }, Y = new WeakSet(), At = function() {
2955
2950
  const { $wrapper: i, $button: t, $element: e } = this;
2956
2951
  if (!t)
2957
2952
  return;
2958
2953
  const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
2959
2954
  if (s <= 0) {
2960
- k(t, "hide"), $(t, "active"), k(e, "noScrollable");
2955
+ x(t, "hide"), $(t, "active"), x(e, "noScrollable");
2961
2956
  return;
2962
2957
  }
2963
- s > 0 && (k(t, "active"), $(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2958
+ s > 0 && (x(t, "active"), $(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2964
2959
  if (a.classList.contains("next")) {
2965
2960
  $(a, "hide");
2966
2961
  return;
2967
2962
  }
2968
- k(a, "hide");
2963
+ x(a, "hide");
2969
2964
  }) : o + 1 >= s ? t.forEach((a) => {
2970
2965
  if (a.classList.contains("next")) {
2971
- k(a, "hide");
2966
+ x(a, "hide");
2972
2967
  return;
2973
2968
  }
2974
2969
  $(a, "hide");
2975
2970
  }) : $(t, "hide");
2976
- }, ne = new WeakSet(), ls = function() {
2971
+ }, oe = new WeakSet(), ls = function() {
2977
2972
  const { $element: i } = this, t = (s) => {
2978
2973
  if (this.option.selected) {
2979
2974
  const o = s.getAttribute("data-option").trim();
@@ -2987,31 +2982,31 @@ ee = new WeakSet(), os = function() {
2987
2982
  s.removeEventListener("click", e), s.addEventListener("click", e);
2988
2983
  });
2989
2984
  };
2990
- var oe, cs, ae, ds, re, us, le, ps;
2985
+ var ae, cs, re, ds, le, us, ce, ps;
2991
2986
  class gn {
2992
2987
  constructor(i) {
2993
2988
  // 初始化
2994
- p(this, oe);
2995
- // 隱藏按鈕判斷
2996
2989
  p(this, ae);
2997
- // 展開箭頭事件綁定
2990
+ // 隱藏按鈕判斷
2998
2991
  p(this, re);
2999
- // 選項事件綁定
2992
+ // 展開箭頭事件綁定
3000
2993
  p(this, le);
3001
- this.$element = i, this.option = i.s.option.collapse, d(this, oe, cs).call(this);
2994
+ // 選項事件綁定
2995
+ p(this, ce);
2996
+ this.$element = i, this.option = i.s.option.collapse, d(this, ae, cs).call(this);
3002
2997
  }
3003
2998
  }
3004
- oe = new WeakSet(), cs = function() {
3005
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, ae, ds).call(this) && d(this, re, us).call(this), d(this, le, ps).call(this));
3006
- }, ae = new WeakSet(), ds = function() {
2999
+ ae = new WeakSet(), cs = function() {
3000
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, re, ds).call(this) && d(this, le, us).call(this), d(this, ce, ps).call(this));
3001
+ }, re = new WeakSet(), ds = function() {
3007
3002
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
3008
- return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(S.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), $(this.$element, "noScrollable"), !0) : (k(this.$element, "noScrollable"), !1);
3009
- }, re = new WeakSet(), us = function() {
3003
+ return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(S.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), $(this.$element, "noScrollable"), !0) : (x(this.$element, "noScrollable"), !1);
3004
+ }, le = new WeakSet(), us = function() {
3010
3005
  const { $element: i, $button: t } = this, e = function() {
3011
3006
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
3012
3007
  };
3013
3008
  t.removeEventListener("click", e), t.addEventListener("click", e);
3014
- }, le = new WeakSet(), ps = function() {
3009
+ }, ce = new WeakSet(), ps = function() {
3015
3010
  const { $element: i } = this, t = (s, o) => {
3016
3011
  if (i != null && i.classList.contains("expand") ? i == null || i.classList.remove("expand") : i == null || i.classList.add("expand"), this.option.selected) {
3017
3012
  const a = s.getAttribute("data-option").trim();
@@ -3029,22 +3024,22 @@ const fn = (n) => {
3029
3024
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
3030
3025
  return i == "drag" && (s.innerHTML = q.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e)), i == "collapse" && (s.innerHTML = q.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(S.append, e)), i == "dropdown" && (s.innerHTML = q.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(S.append, e)), s.children;
3031
3026
  };
3032
- var ce, hs, de, ms, ct, Ue, dt, Ye, ue, gs, ut, Fe, Y, At;
3027
+ var de, hs, ue, ms, ct, Ue, dt, Ye, pe, gs, ut, Fe, F, St;
3033
3028
  class vn extends HTMLElement {
3034
3029
  constructor() {
3035
3030
  super();
3036
- p(this, ce);
3037
3031
  p(this, de);
3032
+ p(this, ue);
3038
3033
  // 斷點設定
3039
3034
  p(this, ct);
3040
3035
  // 同步目前選中的項目
3041
3036
  p(this, dt);
3042
3037
  // 下拉選項事件綁定
3043
- p(this, ue);
3038
+ p(this, pe);
3044
3039
  // 關閉展開中的 collapse
3045
3040
  p(this, ut);
3046
3041
  // check type
3047
- p(this, Y);
3042
+ p(this, F);
3048
3043
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
3049
3044
  }
3050
3045
  static get observedAttributes() {
@@ -3055,7 +3050,7 @@ class vn extends HTMLElement {
3055
3050
  case "m4-type":
3056
3051
  if (e === null || e === s)
3057
3052
  return;
3058
- this.s.type = s, d(this, Y, At).call(this);
3053
+ this.s.type = s, d(this, F, St).call(this);
3059
3054
  break;
3060
3055
  case "m4-status":
3061
3056
  if (e === s)
@@ -3065,13 +3060,13 @@ class vn extends HTMLElement {
3065
3060
  }
3066
3061
  }
3067
3062
  connectedCallback() {
3068
- this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, ce, hs).call(this));
3063
+ this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, de, hs).call(this));
3069
3064
  }
3070
3065
  update() {
3071
3066
  d(this, ut, Fe).call(this), d(this, ct, Ue).call(this);
3072
3067
  }
3073
3068
  }
3074
- ce = new WeakSet(), hs = function() {
3069
+ de = new WeakSet(), hs = function() {
3075
3070
  let t = {};
3076
3071
  this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? q.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
3077
3072
  const e = (s) => {
@@ -3082,18 +3077,18 @@ ce = new WeakSet(), hs = function() {
3082
3077
  }
3083
3078
  this.update();
3084
3079
  };
3085
- window.removeEventListener("resize", ci(e)), window.addEventListener("resize", ci(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, q.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, q.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, q.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, q.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, de, ms).call(this);
3086
- }, de = new WeakSet(), ms = function() {
3080
+ window.removeEventListener("resize", ci(e)), window.addEventListener("resize", ci(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, q.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, q.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, q.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, q.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, ue, ms).call(this);
3081
+ }, ue = new WeakSet(), ms = function() {
3087
3082
  this.classList.add("m4-init"), d(this, ct, Ue).call(this);
3088
3083
  }, ct = new WeakSet(), Ue = function() {
3089
3084
  const t = Object.keys(this.s.option.breakpoint);
3090
3085
  if (!t.length) {
3091
- d(this, Y, At).call(this);
3086
+ d(this, F, St).call(this);
3092
3087
  return;
3093
3088
  }
3094
3089
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
3095
3090
  var s, o, a, r;
3096
- 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, Y, At).call(this), window.innerWidth >= e;
3091
+ 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, F, St).call(this), window.innerWidth >= e;
3097
3092
  });
3098
3093
  }, dt = new WeakSet(), Ye = function(t = this.getAttribute("m4-status")) {
3099
3094
  var a;
@@ -3107,7 +3102,7 @@ ce = new WeakSet(), hs = function() {
3107
3102
  s(".drag-container .item"), s(".collapse-container .item");
3108
3103
  const o = this.querySelector("dropdown-el");
3109
3104
  o && o.getAttribute("d4-value") !== e && o.setAttribute("d4-value", e), (a = this.drag) == null || a.update();
3110
- }, ue = new WeakSet(), gs = function() {
3105
+ }, pe = new WeakSet(), gs = function() {
3111
3106
  var e;
3112
3107
  const t = this.querySelector("dropdown-el");
3113
3108
  !t || typeof t.on != "function" || (this.__events__.dropdownChange = () => {
@@ -3117,7 +3112,7 @@ ce = new WeakSet(), hs = function() {
3117
3112
  }, (e = t.off) == null || e.call(t, "change", this.__events__.dropdownChange), t.on("change", this.__events__.dropdownChange));
3118
3113
  }, ut = new WeakSet(), Fe = function() {
3119
3114
  this.classList.remove("expand");
3120
- }, Y = new WeakSet(), At = function() {
3115
+ }, F = new WeakSet(), St = function() {
3121
3116
  const { type: t } = this.s;
3122
3117
  switch (d(this, ut, Fe).call(this), this.innerHTML = "", [...fn(this)].forEach((e) => {
3123
3118
  this.append(e);
@@ -3129,59 +3124,59 @@ ce = new WeakSet(), hs = function() {
3129
3124
  this.drag = new di(this), this.collapse = new gn(this);
3130
3125
  break;
3131
3126
  case "dropdown":
3132
- d(this, ue, gs).call(this);
3127
+ d(this, pe, gs).call(this);
3133
3128
  break;
3134
3129
  }
3135
3130
  d(this, dt, Ye).call(this);
3136
3131
  };
3137
3132
  customElements.define("multipurpose-nav", vn);
3138
- var pe, vs, he, bs, pt, Je, W, Z, me, ys, ge, ws, fe, Ts, ve, Es, be, As, ye, Ss, we, Ls, Te, _s, Ee, Ds, N, R, Ae, xs, Se, ks, Le, $s, _e, Cs;
3133
+ var he, vs, me, bs, pt, Je, W, Q, ge, ys, fe, ws, ve, Ts, be, Es, ye, As, we, Ss, Te, Ls, Ee, _s, Ae, Ds, N, R, Se, ks, Le, xs, _e, $s, De, Cs;
3139
3134
  class fs extends HTMLElement {
3140
3135
  // 定義組件的初始狀態
3141
3136
  constructor(t, e) {
3142
3137
  super();
3143
- p(this, pe);
3144
3138
  p(this, he);
3139
+ p(this, me);
3145
3140
  // 第一關 判斷數量以及id設定
3146
3141
  p(this, pt);
3147
3142
  // 第二關 id命名提醒
3148
3143
  p(this, W);
3149
- p(this, me);
3150
3144
  p(this, ge);
3151
3145
  p(this, fe);
3146
+ p(this, ve);
3152
3147
  // 執行函式
3153
3148
  // 移動至指定位置
3154
- p(this, ve);
3155
- // 移動
3156
3149
  p(this, be);
3157
- // 步驟狀態
3150
+ // 移動
3158
3151
  p(this, ye);
3159
- // next 按鈕狀態
3152
+ // 步驟狀態
3160
3153
  p(this, we);
3161
- // prev 按鈕狀態
3154
+ // next 按鈕狀態
3162
3155
  p(this, Te);
3163
- // 頁籤狀態
3156
+ // prev 按鈕狀態
3164
3157
  p(this, Ee);
3158
+ // 頁籤狀態
3159
+ p(this, Ae);
3165
3160
  // 第三關各種元件判斷 及 執行
3166
3161
  p(this, N);
3167
3162
  // 消失動畫
3168
- p(this, Ae);
3169
- // 出現動畫
3170
3163
  p(this, Se);
3171
- // 狀態
3164
+ // 出現動畫
3172
3165
  p(this, Le);
3173
- // resize
3166
+ // 狀態
3174
3167
  p(this, _e);
3168
+ // resize
3169
+ p(this, De);
3175
3170
  }
3176
3171
  // 當組件的屬性被更改時會被呼叫
3177
3172
  static get observedAttributes() {
3178
3173
  return ["t4-active"];
3179
3174
  }
3180
3175
  attributeChangedCallback(t, e, s) {
3181
- t === "t4-active" && e !== s && d(this, Le, $s).call(this, s);
3176
+ t === "t4-active" && e !== s && d(this, _e, $s).call(this, s);
3182
3177
  }
3183
3178
  connectedCallback() {
3184
- this.classList.contains("t4-initialize") || d(this, pe, vs).call(this);
3179
+ this.classList.contains("t4-initialize") || d(this, he, vs).call(this);
3185
3180
  }
3186
3181
  // ------------- 我是分隔線呦 -------------
3187
3182
  // 頁籤切換
@@ -3195,19 +3190,19 @@ class fs extends HTMLElement {
3195
3190
  setActiveTab(t) {
3196
3191
  const { t: e } = this, s = t === "" ? e.tabPanels[0].getAttribute("t4-id") : t;
3197
3192
  e.activeTab = s, this.setAttribute("t4-active", s);
3198
- const o = d(this, W, Z).call(this, s);
3193
+ const o = d(this, W, Q).call(this, s);
3199
3194
  e.tabPanels.forEach((a, r) => {
3200
- r === o ? d(this, Se, ks).call(this, r) : d(this, Ae, xs).call(this, r);
3195
+ r === o ? d(this, Le, xs).call(this, r) : d(this, Se, ks).call(this, r);
3201
3196
  });
3202
3197
  }
3203
3198
  // 外部呼叫方法 $0.goNext()
3204
3199
  goNext() {
3205
- const t = d(this, W, Z).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
3200
+ const t = d(this, W, Q).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
3206
3201
  this.setActiveTab(s);
3207
3202
  }
3208
3203
  // 外部呼叫方法 $0.goPrev()
3209
3204
  goPrev() {
3210
- const t = d(this, W, Z).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
3205
+ const t = d(this, W, Q).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
3211
3206
  this.setActiveTab(s);
3212
3207
  }
3213
3208
  // 外部呼叫方法 $0.update()
@@ -3215,7 +3210,7 @@ class fs extends HTMLElement {
3215
3210
  this.t.tabs = d(this, pt, Je).call(this), Hs(), console.log("tab update!!!!");
3216
3211
  }
3217
3212
  }
3218
- pe = new WeakSet(), vs = function() {
3213
+ he = new WeakSet(), vs = function() {
3219
3214
  const t = this.getAttribute("t4-name"), { SETTINGS: e } = gi;
3220
3215
  document.querySelectorAll(`tab-el[t4-name=${t}]`).length > 1 && console.warn(t, "名字有重複喔!!!"), this.t = {
3221
3216
  tabs: [],
@@ -3235,36 +3230,36 @@ pe = new WeakSet(), vs = function() {
3235
3230
  delay: this.getAttribute("t4-delay") || e.transition.delay
3236
3231
  },
3237
3232
  tabGroup: this.getAttribute("t4-group") || e.tabGroup
3238
- }, this.__events__ = {}, this.t.tabs = d(this, pt, Je).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, he, bs).call(this);
3239
- }, he = new WeakSet(), bs = function() {
3240
- if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, me, ys).call(this), this.t.recordUrl) {
3233
+ }, this.__events__ = {}, this.t.tabs = d(this, pt, Je).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, me, bs).call(this);
3234
+ }, me = new WeakSet(), bs = function() {
3235
+ if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, ge, ys).call(this), this.t.recordUrl) {
3241
3236
  const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
3242
3237
  e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
3243
3238
  }
3244
- this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, _e, Cs).call(this);
3239
+ this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, De, Cs).call(this);
3245
3240
  }, pt = new WeakSet(), Je = function() {
3246
3241
  const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
3247
3242
  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) => {
3248
3243
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
3249
3244
  }), e;
3250
- }, W = new WeakSet(), Z = function(t) {
3245
+ }, W = new WeakSet(), Q = function(t) {
3251
3246
  const { t: e } = this, s = e.tabPanels.filter((a) => a.getAttribute("t4-id") === t);
3252
3247
  s.length > 1 && console.warn("有兩個相同id設定", s);
3253
3248
  const o = s[0];
3254
3249
  return o ? e.tabPanels.indexOf(o) : (console.warn(`找不到t4-id為${t}的頁籤`), 0);
3255
- }, me = new WeakSet(), ys = function() {
3250
+ }, ge = new WeakSet(), ys = function() {
3256
3251
  const t = document.createElement("div");
3257
3252
  t.classList.add("swiper-container");
3258
3253
  const e = document.createElement("div");
3259
3254
  e.classList.add("swiper-wrapper"), this.t.tabPanels.forEach((s) => {
3260
3255
  e.appendChild(s.cloneNode(!0));
3261
- }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, ge, ws).call(this);
3262
- }, ge = new WeakSet(), ws = function() {
3256
+ }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, fe, ws).call(this);
3257
+ }, fe = new WeakSet(), ws = function() {
3263
3258
  const t = this.querySelector(".swiper-container"), e = this.querySelector(".swiper-wrapper"), s = this.t.tabPanels;
3264
3259
  t.style.overflow = "hidden", e.style.display = "flex";
3265
3260
  const o = s.length * 100 + "%";
3266
3261
  e.style.width = o;
3267
- }, fe = new WeakSet(), Ts = function(t) {
3262
+ }, ve = new WeakSet(), Ts = function(t) {
3268
3263
  const { t: e } = this;
3269
3264
  if (e.recordUrl === "true") {
3270
3265
  const s = new URLSearchParams(document.location.search);
@@ -3272,28 +3267,28 @@ pe = new WeakSet(), vs = function() {
3272
3267
  const o = `${window.location.pathname}?${s.toString()}`;
3273
3268
  history.replaceState({ t4Id: t }, "", o);
3274
3269
  }
3275
- }, ve = new WeakSet(), Es = function() {
3270
+ }, be = new WeakSet(), Es = function() {
3276
3271
  const t = parseInt(this.t.gap, 10), e = window.pageYOffset, o = this.getBoundingClientRect().top + e - t;
3277
- d(this, be, As).call(this, o);
3278
- }, be = new WeakSet(), As = function(t) {
3272
+ d(this, ye, As).call(this, o);
3273
+ }, ye = new WeakSet(), As = function(t) {
3279
3274
  window.scrollTo({
3280
3275
  top: t,
3281
3276
  behavior: "smooth"
3282
3277
  });
3283
- }, ye = new WeakSet(), Ss = function(t) {
3278
+ }, we = new WeakSet(), Ss = function(t) {
3284
3279
  let e = parseInt(t, 10) + 1;
3285
3280
  this.t.step.textContent = `${e}`, this.t.step.setAttribute("now-page", e);
3286
- }, we = new WeakSet(), Ls = function(t) {
3281
+ }, Te = new WeakSet(), Ls = function(t) {
3287
3282
  const e = document.querySelectorAll(`[t4-role="next"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === this.t.tabPanels.length - 1;
3288
3283
  e.forEach((a) => {
3289
3284
  s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
3290
3285
  });
3291
- }, Te = new WeakSet(), _s = function(t) {
3286
+ }, Ee = new WeakSet(), _s = function(t) {
3292
3287
  const e = document.querySelectorAll(`[t4-role="prev"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === 0;
3293
3288
  e.forEach((a) => {
3294
3289
  s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
3295
3290
  });
3296
- }, Ee = new WeakSet(), Ds = function(t, e) {
3291
+ }, Ae = new WeakSet(), Ds = function(t, e) {
3297
3292
  this.t.tabGroup === "true" ? this.t.tabs.forEach((s, o) => {
3298
3293
  o == t ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
3299
3294
  }) : this.t.tabs.forEach((s, o) => {
@@ -3302,25 +3297,25 @@ pe = new WeakSet(), vs = function() {
3302
3297
  }, N = new WeakSet(), R = function(t, e, s) {
3303
3298
  switch (t) {
3304
3299
  case "step":
3305
- Ie(this.t.step) && d(this, ye, Ss).call(this, e);
3300
+ Me(this.t.step) && d(this, we, Ss).call(this, e);
3306
3301
  break;
3307
3302
  case "eventAnchor":
3308
- this.t.anchor && d(this, ve, Es).call(this);
3303
+ this.t.anchor && d(this, be, Es).call(this);
3309
3304
  break;
3310
3305
  case "tabState":
3311
- this.t.type == "normal" && d(this, Ee, Ds).call(this, e, s);
3306
+ this.t.type == "normal" && d(this, Ae, Ds).call(this, e, s);
3312
3307
  break;
3313
3308
  case "btnState":
3314
- d(this, we, Ls).call(this, e), d(this, Te, _s).call(this, e);
3309
+ d(this, Te, Ls).call(this, e), d(this, Ee, _s).call(this, e);
3315
3310
  break;
3316
3311
  case "tabUrl":
3317
- this.t.recordUrl === "true" && d(this, fe, Ts).call(this, e);
3312
+ this.t.recordUrl === "true" && d(this, ve, Ts).call(this, e);
3318
3313
  break;
3319
3314
  default:
3320
3315
  console.warn("請增加判斷,謝謝");
3321
3316
  break;
3322
3317
  }
3323
- }, Ae = new WeakSet(), xs = function(t) {
3318
+ }, Se = new WeakSet(), ks = function(t) {
3324
3319
  const { t: e } = this;
3325
3320
  this.t.transition;
3326
3321
  const s = e.tabPanels[t];
@@ -3337,7 +3332,7 @@ pe = new WeakSet(), vs = function() {
3337
3332
  s.style.display = "none";
3338
3333
  break;
3339
3334
  }
3340
- }, Se = new WeakSet(), ks = function(t) {
3335
+ }, Le = new WeakSet(), xs = function(t) {
3341
3336
  const { duration: e, timing: s, delay: o } = this.t.transition, a = this.t.tabPanels[t];
3342
3337
  let r;
3343
3338
  switch (a.classList.add("show"), a.classList.remove("hide"), a.style.transition = `opacity ${e}ms ${s} ${o}ms`, a.style.display = "block", this.t.display) {
@@ -3362,10 +3357,10 @@ pe = new WeakSet(), vs = function() {
3362
3357
  console.warn(this.t.display, "沒有這個效果請自己想辦法!!!!");
3363
3358
  break;
3364
3359
  }
3365
- }, Le = new WeakSet(), $s = function(t) {
3366
- const e = d(this, W, Z).call(this, t);
3360
+ }, _e = new WeakSet(), $s = function(t) {
3361
+ const e = d(this, W, Q).call(this, t);
3367
3362
  d(this, N, R).call(this, "step", e), d(this, N, R).call(this, "btnState", e), d(this, N, R).call(this, "tabState", e, t), d(this, N, R).call(this, "tabUrl", t), this.emit("change");
3368
- }, _e = new WeakSet(), Cs = function() {
3363
+ }, De = new WeakSet(), Cs = function() {
3369
3364
  const t = this;
3370
3365
  window.addEventListener(
3371
3366
  "resize",
@@ -3420,14 +3415,14 @@ const ui = (n) => {
3420
3415
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3421
3416
  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";
3422
3417
  };
3423
- var ht, Ze, De, Is, xe, Ms, mt, Qe;
3418
+ var ht, Ze, ke, Is, xe, Ms, mt, Qe;
3424
3419
  class wn {
3425
3420
  constructor(i, t = {}) {
3426
3421
  p(this, ht);
3427
- p(this, De);
3422
+ p(this, ke);
3428
3423
  p(this, xe);
3429
3424
  p(this, mt);
3430
- !ft(i) && !Ie(i) && !vt(i) && !A(i) || (this.__storage__ = {
3425
+ !ft(i) && !Me(i) && !vt(i) && !A(i) || (this.__storage__ = {
3431
3426
  el: i,
3432
3427
  options: t
3433
3428
  }, this.active = "data-collapse-active", d(this, ht, Ze).call(this));
@@ -3441,8 +3436,8 @@ ht = new WeakSet(), Ze = function() {
3441
3436
  if (this.elements = t.state == "not active" ? D(i + `:not([${this.active}])`) : D(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3442
3437
  for (const [o, a] of Object.entries(this.options.on))
3443
3438
  this.__events__[o] = [a];
3444
- d(this, De, Is).call(this);
3445
- }, De = new WeakSet(), Is = function() {
3439
+ d(this, ke, Is).call(this);
3440
+ }, ke = new WeakSet(), Is = function() {
3446
3441
  const { elements: i, options: t } = this;
3447
3442
  i.forEach((e) => {
3448
3443
  e.collapse = {}, e.collapse.instance = this, e.collapse.defaultOptions = t, e.collapse.methods = {}, e.collapse.methods.update = this.update, e.setAttribute(this.active, ""), d(this, xe, Ms).call(this, e);
@@ -3475,14 +3470,14 @@ function qs() {
3475
3470
  });
3476
3471
  }
3477
3472
  document.addEventListener("click", qs);
3478
- var gt, Ke, ke, Os, $e, Ps, Ce, Ns;
3473
+ var gt, Ke, $e, Os, Ce, Ps, He, Ns;
3479
3474
  class En extends HTMLElement {
3480
3475
  constructor() {
3481
3476
  super();
3482
3477
  p(this, gt);
3483
- p(this, ke);
3484
3478
  p(this, $e);
3485
3479
  p(this, Ce);
3480
+ p(this, He);
3486
3481
  this.initialize = !1;
3487
3482
  }
3488
3483
  connectedCallback() {
@@ -3508,13 +3503,13 @@ gt = new WeakSet(), Ke = function() {
3508
3503
  hover: this.getAttribute("r4-hover") ? e(this.getAttribute("r4-hover")) : t.hover,
3509
3504
  click: this.getAttribute("r4-hover-click") ? e(this.getAttribute("r4-hover-click")) : t.click
3510
3505
  };
3511
- this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, ke, Os).call(this);
3512
- }, ke = new WeakSet(), Os = function() {
3513
- d(this, $e, Ps).call(this), d(this, Ce, Ns).call(this), this.classList.add("r4-initialize");
3514
- }, $e = new WeakSet(), Ps = function() {
3506
+ this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, $e, Os).call(this);
3507
+ }, $e = new WeakSet(), Os = function() {
3508
+ d(this, Ce, Ps).call(this), d(this, He, Ns).call(this), this.classList.add("r4-initialize");
3509
+ }, Ce = new WeakSet(), Ps = function() {
3515
3510
  const t = this, e = document.createElement("i");
3516
3511
  e.classList.add("hover-ball"), e.style.transitionDuration = `${t.s.options.speed}ms`, t.appendChild(e);
3517
- }, Ce = new WeakSet(), Ns = function() {
3512
+ }, He = new WeakSet(), Ns = function() {
3518
3513
  const t = this.querySelector("i.hover-ball"), e = this;
3519
3514
  e.addEventListener("click", function(a) {
3520
3515
  a.stopPropagation(), e.s.options.click && Tn(a, e);
@@ -3651,18 +3646,18 @@ function Dn(n, i) {
3651
3646
  const t = Math.pow(10, i);
3652
3647
  return Math.round(n * t) / t;
3653
3648
  }
3654
- function xn(n, i) {
3649
+ function kn(n, i) {
3655
3650
  let t = n.size / 1024 / 1024;
3656
3651
  return `${Dn(t, 2)}` <= i;
3657
3652
  }
3658
- function kn(n, i, t) {
3653
+ function xn(n, i, t) {
3659
3654
  if (n.target.files.length <= 0)
3660
3655
  return;
3661
3656
  const e = n.target.files[0], s = i.closest("[data-upload-item]");
3662
3657
  let o = new FileReader();
3663
3658
  o.onload = (a) => {
3664
3659
  const r = e.type.split("/")[0] === "image" ? a.target.result : null;
3665
- if (t.params.sizeLimit && !xn(e, t.params.sizeLimit)) {
3660
+ if (t.params.sizeLimit && !kn(e, t.params.sizeLimit)) {
3666
3661
  i.value = "", s.classList.add("over-limit"), t.params.on.overLimit && typeof t.params.on.overLimit == "function" && t.params.on.overLimit(i, t.params.sizeLimit);
3667
3662
  return;
3668
3663
  } else
@@ -3704,7 +3699,7 @@ class $n {
3704
3699
  }
3705
3700
  };
3706
3701
  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) {
3707
- kn(a, e, i);
3702
+ xn(a, e, i);
3708
3703
  });
3709
3704
  }));
3710
3705
  }
@@ -3722,7 +3717,7 @@ export {
3722
3717
  Qn as J,
3723
3718
  Kn as K,
3724
3719
  Vn as L,
3725
- V as M,
3720
+ tt as M,
3726
3721
  to as N,
3727
3722
  eo as O,
3728
3723
  io as P,
@@ -3739,7 +3734,7 @@ export {
3739
3734
  vt as b,
3740
3735
  Us as c,
3741
3736
  Xs as d,
3742
- He as e,
3737
+ Ie as e,
3743
3738
  S as f,
3744
3739
  D as g,
3745
3740
  jn as h,
@@ -3756,7 +3751,7 @@ export {
3756
3751
  Rs as s,
3757
3752
  Bn as t,
3758
3753
  Wn as u,
3759
- Ne as v,
3754
+ je as v,
3760
3755
  sn as w,
3761
3756
  Gn as x,
3762
3757
  Rn as y,