@xwadex/fesd 0.0.54 → 0.0.55

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.
@@ -1,6 +1,6 @@
1
1
  var Ds = Object.defineProperty;
2
2
  var ks = (n, i, t) => i in n ? Ds(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
- var Xe = (n, i, t) => (ks(n, typeof i != "symbol" ? i + "" : i, t), t), xs = (n, i, t) => {
3
+ var Xe = (n, i, t) => (ks(n, typeof i != "symbol" ? i + "" : i, t), t), $s = (n, i, t) => {
4
4
  if (!i.has(n))
5
5
  throw TypeError("Cannot " + t);
6
6
  };
@@ -9,14 +9,14 @@ var h = (n, i, t) => {
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  i instanceof WeakSet ? i.add(n) : i.set(n, t);
11
11
  };
12
- var d = (n, i, t) => (xs(n, i, "access private method"), t);
12
+ var d = (n, i, t) => ($s(n, i, "access private method"), t);
13
13
  import { OverlayScrollbars as ze } from "overlayscrollbars";
14
14
  import f from "jquery";
15
15
  import "./vendor-bundle.js";
16
16
  import "validator";
17
17
  import "flatpickr";
18
18
  import ti from "vanilla-lazyload";
19
- import { lock as $s, unlock as _s } from "tua-body-scroll-lock";
19
+ import { lock as xs, unlock as _s } from "tua-body-scroll-lock";
20
20
  const Se = {
21
21
  SETTINGS: {
22
22
  videoId: null,
@@ -45,7 +45,9 @@ const Se = {
45
45
  init: null,
46
46
  afterInit: null,
47
47
  beforeDestroy: null,
48
- afterUpdate: null
48
+ afterUpdate: null,
49
+ openModal: null,
50
+ closeModal: null
49
51
  },
50
52
  // video4 target 內放置結構 index 對應 videoLayoutNo
51
53
  LAYOUT: [
@@ -114,7 +116,7 @@ const Se = {
114
116
  </div>
115
117
  `;
116
118
  }
117
- }, I = {
119
+ }, M = {
118
120
  SETTINGS: {
119
121
  direction: "left",
120
122
  // 方向 - top || right || bottom || left
@@ -321,14 +323,14 @@ const Se = {
321
323
  // hover 毫秒 ?
322
324
  speed: 600
323
325
  }
324
- }, Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
326
+ }, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
325
327
  __proto__: null,
326
328
  anchor4: mt,
327
329
  aost4: ei,
328
330
  article4: Hs,
329
331
  collapse4: si,
330
332
  dropdown4: Be,
331
- marquee4: I,
333
+ marquee4: M,
332
334
  modal4: P,
333
335
  multipurpose4: q,
334
336
  ripple4: ni,
@@ -340,7 +342,7 @@ const Se = {
340
342
  after: "afterend",
341
343
  append: "beforeend",
342
344
  prepend: "afterbegin"
343
- }, dt = (n) => typeof n == "string" && n !== "", De = (n) => n instanceof HTMLElement, ut = (n) => n instanceof NodeList, E = (n) => k(n) !== null, G = (n) => typeof n == "function", k = (n) => De(n) ? n : document.querySelector(n), x = (n) => ut(n) ? n : document.querySelectorAll(n), Is = () => Math.random().toString(36).substr(2, 9), Ms = (n) => {
345
+ }, dt = (n) => typeof n == "string" && n !== "", De = (n) => n instanceof HTMLElement, ut = (n) => n instanceof NodeList, E = (n) => k(n) !== null, G = (n) => typeof n == "function", k = (n) => De(n) ? n : document.querySelector(n), $ = (n) => ut(n) ? n : document.querySelectorAll(n), Ms = () => Math.random().toString(36).substr(2, 9), Is = (n) => {
344
346
  const i = document.createElement("div");
345
347
  return i.innerHTML = n, i.childNodes;
346
348
  }, qs = (n) => {
@@ -412,7 +414,7 @@ const Se = {
412
414
  };
413
415
  requestAnimationFrame(U);
414
416
  };
415
- var V, xe, bt, ai, yt, ri;
417
+ var V, $e, bt, ai, yt, ri;
416
418
  class oi {
417
419
  constructor(i, t = {}) {
418
420
  h(this, V);
@@ -421,7 +423,7 @@ class oi {
421
423
  this.__storage__ = {
422
424
  el: i,
423
425
  options: t
424
- }, this.active = "data-anchor-active", d(this, V, xe).call(this);
426
+ }, this.active = "data-anchor-active", d(this, V, $e).call(this);
425
427
  }
426
428
  destroy() {
427
429
  const { elements: i } = this;
@@ -431,7 +433,7 @@ class oi {
431
433
  }
432
434
  update() {
433
435
  var i;
434
- return d(i = this.destroy(), V, xe).call(i), this.emit("afterUpdate"), this;
436
+ return d(i = this.destroy(), V, $e).call(i), this.emit("afterUpdate"), this;
435
437
  }
436
438
  static run(i) {
437
439
  const { SETTINGS: t } = mt, e = Object.assign({}, t, i);
@@ -449,12 +451,12 @@ class oi {
449
451
  }, r.delay);
450
452
  }
451
453
  }
452
- V = new WeakSet(), xe = function() {
454
+ V = new WeakSet(), $e = function() {
453
455
  const { el: i, options: t } = this.__storage__;
454
456
  if (!dt(i) || !E(i))
455
457
  return;
456
458
  const { SETTINGS: e, EVENTS: s } = mt;
457
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.elements = x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
459
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.elements = $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
458
460
  for (const [o, a] of Object.entries(this.options.on))
459
461
  this.__events__[o] = [a];
460
462
  d(this, bt, ai).call(this);
@@ -527,7 +529,7 @@ class li extends HTMLElement {
527
529
  wt = new WeakSet(), ci = function() {
528
530
  const { ATTRS: t } = P;
529
531
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
530
- const e = this.getAttribute(t.id) || Is();
532
+ const e = this.getAttribute(t.id) || Ms();
531
533
  this.getAttribute(t.id) || (L(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), O[e] && L(`the ${t.id} "${e}" is already be used.`), O[e] = this, d(this, Tt, di).call(this);
532
534
  }, Tt = new WeakSet(), di = function() {
533
535
  this.childDom = this.childNodes, this.template = Ns(this), this.innerHTML = "", this.append(this.template), d(this, Et, ui).call(this);
@@ -626,7 +628,7 @@ const { MODALS: We } = window, ht = {}, mi = (n, i, ...t) => {
626
628
  i && (i.emit(l, ...c), mi(i, o[l], ...c)), i || gi(o[l], ...c);
627
629
  };
628
630
  ht[t] || (ht[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
629
- const c = Ms(l), u = k(s) || k(P.SETTINGS.container);
631
+ const c = Is(l), u = k(s) || k(P.SETTINGS.container);
630
632
  [...c].forEach((g) => {
631
633
  u.append(g);
632
634
  });
@@ -636,7 +638,7 @@ const { MODALS: We } = window, ht = {}, mi = (n, i, ...t) => {
636
638
  r("error", l), delete ht[t];
637
639
  }));
638
640
  };
639
- var tt, $e, St, vi, Dt, bi;
641
+ var tt, xe, St, vi, Dt, bi;
640
642
  const B = class B {
641
643
  constructor(i, t = {}) {
642
644
  h(this, tt);
@@ -645,7 +647,7 @@ const B = class B {
645
647
  this.__storage__ = {
646
648
  el: i,
647
649
  options: t
648
- }, this.active = "data-modal-active", d(this, tt, $e).call(this);
650
+ }, this.active = "data-modal-active", d(this, tt, xe).call(this);
649
651
  }
650
652
  destroy() {
651
653
  const { elements: i } = this;
@@ -655,7 +657,7 @@ const B = class B {
655
657
  }
656
658
  update() {
657
659
  var i;
658
- return d(i = this.destroy(), tt, $e).call(i), this.emit("update"), this;
660
+ return d(i = this.destroy(), tt, xe).call(i), this.emit("update"), this;
659
661
  }
660
662
  /** static method 'open' */
661
663
  static open(i) {
@@ -671,12 +673,12 @@ const B = class B {
671
673
  Object.assign(B.prototype, B.prototype.__methods__);
672
674
  }
673
675
  };
674
- tt = new WeakSet(), $e = function() {
676
+ tt = new WeakSet(), xe = function() {
675
677
  const { el: i, options: t } = this.__storage__;
676
678
  if (!dt(i) || !E(i))
677
679
  return;
678
680
  const { SETTINGS: e, EVENTS: s } = P;
679
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
681
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
680
682
  for (const [o, a] of Object.entries(this.options.on))
681
683
  this.__events__[o] = [a];
682
684
  d(this, St, vi).call(this);
@@ -751,7 +753,7 @@ et = new WeakSet(), _e = function() {
751
753
  if (!dt(i) || !E(i))
752
754
  return;
753
755
  const { SETTINGS: e, EVENTS: s } = ei;
754
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
756
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
755
757
  for (const [o, a] of Object.entries(this.options.on))
756
758
  this.__events__[o] = [a];
757
759
  d(this, kt, wi).call(this);
@@ -774,27 +776,27 @@ const Bs = (n) => {
774
776
  s.append(o);
775
777
  }), e.children[0];
776
778
  };
777
- var xt, Ti, $t, Ei, _t, Ai, Ct, Li, Ht, Si, It, Di, Mt, ki, qt, xi, Ot, $i, Nt, _i;
779
+ var $t, Ti, xt, Ei, _t, Ai, Ct, Li, Ht, Si, Mt, Di, It, ki, qt, $i, Ot, xi, Nt, _i;
778
780
  class Ws extends HTMLElement {
779
781
  constructor() {
780
782
  super();
781
- h(this, xt);
782
783
  h(this, $t);
784
+ h(this, xt);
783
785
  h(this, _t);
784
786
  // youtube iframe
785
787
  h(this, Ct);
786
788
  // vimeo iframe
787
789
  h(this, Ht);
788
790
  // youku iframe
789
- h(this, It);
790
791
  h(this, Mt);
792
+ h(this, It);
791
793
  // 2025.02.11 新增 ig
792
794
  h(this, qt);
793
795
  // 2025.02.11 新增 tiktok
794
796
  h(this, Ot);
795
797
  // 2026.01.15 新增 video
796
798
  h(this, Nt);
797
- d(this, xt, Ti).call(this);
799
+ d(this, $t, Ti).call(this);
798
800
  }
799
801
  play() {
800
802
  const { videoType: t } = this;
@@ -831,13 +833,13 @@ class Ws extends HTMLElement {
831
833
  }
832
834
  }
833
835
  }
834
- xt = new WeakSet(), Ti = function() {
836
+ $t = new WeakSet(), Ti = function() {
835
837
  if (!this.getAttribute("video-id")) {
836
838
  L("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
837
839
  return;
838
840
  }
839
- 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, $t, Ei).call(this);
840
- }, $t = new WeakSet(), Ei = function() {
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, xt, Ei).call(this);
842
+ }, xt = new WeakSet(), Ei = function() {
841
843
  this.childDom = this.childNodes, this.template = Bs(this), this.innerHTML = "", this.append(this.template), d(this, _t, Ai).call(this);
842
844
  }, _t = new WeakSet(), Ai = function() {
843
845
  const { videoType: t, videoMode: e } = this, { COOKIEDISAGREELAYOUT: s } = Se;
@@ -854,19 +856,19 @@ xt = new WeakSet(), Ti = function() {
854
856
  case "youkuAPI":
855
857
  break;
856
858
  case "youku":
857
- document.body.wd_youku == !1 ? a("video-player") : o = d(this, It, Di).call(this);
859
+ document.body.wd_youku == !1 ? a("video-player") : o = d(this, Mt, Di).call(this);
858
860
  break;
859
861
  case "vimeo":
860
862
  document.body.wd_vimeo == !1 ? a("video-player") : o = d(this, Ht, Si).call(this);
861
863
  break;
862
864
  case "bilibili":
863
- document.body.wd_bilibili == !1 ? a("video-player") : o = d(this, Mt, ki).call(this);
865
+ document.body.wd_bilibili == !1 ? a("video-player") : o = d(this, It, ki).call(this);
864
866
  break;
865
867
  case "instagram":
866
- document.body.wd_instagram == !1 ? a(".instagram-media") : o = d(this, qt, xi).call(this);
868
+ document.body.wd_instagram == !1 ? a(".instagram-media") : o = d(this, qt, $i).call(this);
867
869
  break;
868
870
  case "tiktok":
869
- document.body.wd_tiktok == !1 ? a("video-player") : o = d(this, Ot, $i).call(this);
871
+ document.body.wd_tiktok == !1 ? a("video-player") : o = d(this, Ot, xi).call(this);
870
872
  break;
871
873
  case "videojs":
872
874
  break;
@@ -881,16 +883,16 @@ xt = new WeakSet(), Ti = function() {
881
883
  }, Ht = new WeakSet(), Si = function() {
882
884
  const { videoId: t, autoplay: e, hash: s } = this;
883
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>`;
884
- }, It = new WeakSet(), Di = function() {
886
+ }, Mt = new WeakSet(), Di = function() {
885
887
  const { videoId: t, autoplay: e } = this;
886
888
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
887
- }, Mt = new WeakSet(), ki = function() {
889
+ }, It = new WeakSet(), ki = function() {
888
890
  const { videoId: t, autoplay: e } = this;
889
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>`;
890
- }, qt = new WeakSet(), xi = function() {
892
+ }, qt = new WeakSet(), $i = function() {
891
893
  const { videoId: t, autoplay: e } = this;
892
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>`;
893
- }, Ot = new WeakSet(), $i = function() {
895
+ }, Ot = new WeakSet(), xi = function() {
894
896
  const { videoId: t, autoplay: e } = this;
895
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>`;
896
898
  }, Nt = new WeakSet(), _i = function() {
@@ -906,15 +908,15 @@ function Ci(n) {
906
908
  }
907
909
  function Hi(n) {
908
910
  const i = Ci(n);
909
- Z += 1, Z === 1 && (document.documentElement.classList.add("scrollLock"), $s(i));
911
+ Z += 1, Z === 1 && (document.documentElement.classList.add("scrollLock"), xs(i));
910
912
  }
911
- function Ii(n) {
913
+ function Mi(n) {
912
914
  if (Z = Math.max(0, Z - 1), Z === 0) {
913
915
  const i = Ci(n);
914
916
  _s(i), document.documentElement.classList.remove("scrollLock");
915
917
  }
916
918
  }
917
- async function kn(n = 0) {
919
+ async function $n(n = 0) {
918
920
  if (f(".loading-wrapper").length)
919
921
  return;
920
922
  f("body").append(`
@@ -933,24 +935,24 @@ async function kn(n = 0) {
933
935
  }
934
936
  function xn() {
935
937
  f(".loading-wrapper").fadeOut(300).promise().done(function() {
936
- f(".loading-wrapper").remove(), Ii();
938
+ f(".loading-wrapper").remove(), Mi();
937
939
  });
938
940
  }
939
- function $n(n, i) {
940
- new vn(n, i);
941
+ function _n(n, i) {
942
+ new bn(n, i);
941
943
  }
942
944
  function Gs() {
943
945
  const n = document.querySelector("[data-aost]") && new yi("[data-aost]"), i = document.querySelector("[data-anchor-target]") && new oi("[data-anchor-target]"), t = new ti({ callback_loaded: () => {
944
- } }), e = new dn();
946
+ } }), e = new un();
945
947
  n == null || n.update(), t.update(), e.reValidate(), i == null || i.update();
946
948
  }
947
- function _n(n, i = () => {
949
+ function Cn(n, i = () => {
948
950
  }) {
949
951
  f(`[data-tab-content=${n}]`).fadeIn(function() {
950
952
  typeof i == "function" && i();
951
953
  }).siblings("[data-tab-content]").hide(), Gs();
952
954
  }
953
- function Cn() {
955
+ function Hn() {
954
956
  ze(
955
957
  {
956
958
  target: document.body,
@@ -975,7 +977,7 @@ function Cn() {
975
977
  }
976
978
  );
977
979
  }
978
- function Hn() {
980
+ function Mn() {
979
981
  window.onpageshow = function(n) {
980
982
  n.persisted && window.location.reload();
981
983
  };
@@ -986,17 +988,17 @@ function In() {
986
988
  BigSurUP: /Mac OS X 10.15/.test(n) || /Mac OS X 10_15_7/.test(n) || /Mac OS X 10_15_8/.test(n) || /Mac OS X 10_15_9/.test(n) || /Mac OS X 11_/.test(n) || /Mac OS X 12_/.test(n)
987
989
  };
988
990
  }
989
- function Mn(n, i) {
991
+ function qn(n, i) {
990
992
  f(n).on("click", function() {
991
993
  f(this).toggleClass(i);
992
994
  });
993
995
  }
994
- function qn(n, i) {
996
+ function On(n, i) {
995
997
  f(n).on("click", function() {
996
998
  f(n).not(this).removeClass(i), f(this).addClass(i);
997
999
  });
998
1000
  }
999
- const On = (n) => new Promise((i) => {
1001
+ const Nn = (n) => new Promise((i) => {
1000
1002
  let t = setTimeout(() => (clearTimeout(t), i()), n);
1001
1003
  });
1002
1004
  function Rs(n, i = 250) {
@@ -1008,7 +1010,7 @@ function Rs(n, i = 250) {
1008
1010
  }, i);
1009
1011
  };
1010
1012
  }
1011
- function Nn(n, i = 250) {
1013
+ function Pn(n, i = 250) {
1012
1014
  let t, e;
1013
1015
  return function() {
1014
1016
  const s = this, o = arguments, a = +/* @__PURE__ */ new Date();
@@ -1017,7 +1019,7 @@ function Nn(n, i = 250) {
1017
1019
  }, i)) : (t = a, n.apply(s, o));
1018
1020
  };
1019
1021
  }
1020
- function Pn() {
1022
+ function jn() {
1021
1023
  window._g.interval = [], f(".countdown").each((i, t) => {
1022
1024
  const e = Number(f(t).attr("data-seconds")) + 1;
1023
1025
  let s = Math.floor(e / 60) + ":" + e % 60;
@@ -1027,21 +1029,21 @@ function Pn() {
1027
1029
  }, 1e3);
1028
1030
  });
1029
1031
  }
1030
- function jn(n = 500) {
1032
+ function zn(n = 500) {
1031
1033
  return new Promise((i, t) => {
1032
1034
  let e = setTimeout(() => {
1033
1035
  clearTimeout(e), i();
1034
1036
  }, n);
1035
1037
  });
1036
1038
  }
1037
- function zn() {
1039
+ function Bn() {
1038
1040
  const n = function() {
1039
1041
  let i = window.innerHeight * 0.01;
1040
1042
  document.documentElement.style.setProperty("--vh", i + "px");
1041
1043
  };
1042
1044
  n(), window.addEventListener("resize", Rs(n));
1043
1045
  }
1044
- function Bn(n, i, t, e, s) {
1046
+ function Wn(n, i, t, e, s) {
1045
1047
  const o = this, r = f(n).html().split("<br>");
1046
1048
  let l = "", c = 0;
1047
1049
  r.forEach((u, p) => {
@@ -1050,11 +1052,11 @@ function Bn(n, i, t, e, s) {
1050
1052
  });
1051
1053
  }), f(n).html(l);
1052
1054
  }
1053
- function Wn(n, i) {
1055
+ function Gn(n, i) {
1054
1056
  const t = Math.pow(10, i);
1055
1057
  return Math.round(n * t) / t;
1056
1058
  }
1057
- function Gn(n) {
1059
+ function Rn(n) {
1058
1060
  let i = n.activeIndex, t = n.slides.length;
1059
1061
  if (n.params.loop)
1060
1062
  switch (n.activeIndex) {
@@ -1069,18 +1071,18 @@ function Gn(n) {
1069
1071
  }
1070
1072
  return i;
1071
1073
  }
1072
- function Rn(n, i) {
1074
+ function Xn(n, i) {
1073
1075
  const t = n.$el, e = n.params.grid.rows, s = i || n.params.slidesPerView * e;
1074
1076
  (n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), f(n.params.navigation.nextEl).hide(), f(n.params.navigation.prevEl).hide(), f(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), f(n.params.navigation.nextEl).show(), f(n.params.navigation.prevEl).show(), f(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
1075
1077
  }
1076
- function Xn(n) {
1078
+ function Yn(n) {
1077
1079
  n.el.querySelectorAll("img.detect-shade").forEach((i) => {
1078
1080
  i.addEventListener("load", function() {
1079
1081
  detectShade(i);
1080
1082
  });
1081
1083
  });
1082
1084
  }
1083
- function Yn(n) {
1085
+ function Fn(n) {
1084
1086
  const i = n.el, t = f(i).find(".swiper-slide-active"), e = f(t).find("video").get(0), s = f(i).find(".swiper-slide video");
1085
1087
  n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
1086
1088
  a.currentTime = 0;
@@ -1088,7 +1090,7 @@ function Yn(n) {
1088
1090
  n.slideNext();
1089
1091
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1090
1092
  }
1091
- function Fn() {
1093
+ function Un() {
1092
1094
  f(".number-grow").each(function(n, i) {
1093
1095
  const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1094
1096
  let r = "";
@@ -1102,7 +1104,7 @@ function Fn() {
1102
1104
  });
1103
1105
  });
1104
1106
  }
1105
- function Un() {
1107
+ function Jn() {
1106
1108
  f(".letter-grow").each(function(n, i) {
1107
1109
  const t = f(i), s = t.attr("data-letter").split(""), o = () => {
1108
1110
  let a = "";
@@ -1116,22 +1118,22 @@ function Un() {
1116
1118
  });
1117
1119
  });
1118
1120
  }
1119
- function Jn(n) {
1121
+ function Zn(n) {
1120
1122
  const i = getComputedStyle(n).transform;
1121
1123
  let t = i.match(/^matrix3d\((.+)\)$/);
1122
1124
  return t ? parseFloat(t[1].split(", ")[12]) : (t = i.match(/^matrix\((.+)\)$/), t ? parseFloat(t[1].split(", ")[4]) : 0);
1123
1125
  }
1124
- function Zn(n) {
1126
+ function Qn(n) {
1125
1127
  const i = getComputedStyle(n).transform;
1126
1128
  let t = i.match(/^matrix3d\((.+)\)$/);
1127
1129
  return t ? parseFloat(t[1].split(", ")[13]) : (t = i.match(/^matrix\((.+)\)$/), t ? parseFloat(t[1].split(", ")[5]) : 0);
1128
1130
  }
1129
- function Qn(n) {
1131
+ function Kn(n) {
1130
1132
  const i = document.createElement("div");
1131
1133
  return i.innerHTML = n, i.childNodes[0];
1132
1134
  }
1133
- const Ue = (n) => n.videoId !== "" || typeof n.videoId < "u", Xs = (n) => n.$selector.getAttribute("video4-active") === "on", pt = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1134
- var it, He, Pt, Mi, jt, qi, st, Ie, zt, Oi;
1135
+ const Ue = (n) => n.videoId !== "" || typeof n.videoId < "u", Xs = (n) => n.$selector.getAttribute("video4-active") === "on", pt = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`, Ys = (n) => (console.log(n.videoId, "params.videoId"), `<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="${n.videoId}"></blockquote>`);
1136
+ var it, He, Pt, Ii, jt, qi, st, Me, zt, Oi;
1135
1137
  const X = class X {
1136
1138
  //*-* 給Article4用的 **//
1137
1139
  constructor(i, t = {}) {
@@ -1155,7 +1157,7 @@ const X = class X {
1155
1157
  };
1156
1158
  it = new WeakSet(), He = function() {
1157
1159
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = Se;
1158
- if (t.isGlobal && (X.globalOptions = t), this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign(
1160
+ if (t.isGlobal && (X.globalOptions = t), this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign(
1159
1161
  {},
1160
1162
  { LAYOUT: o },
1161
1163
  // 原始 configs 的 LAYOUT
@@ -1168,8 +1170,8 @@ it = new WeakSet(), He = function() {
1168
1170
  ), this.__events__ = Object.assign({}, s), this.options.on)
1169
1171
  for (const [a, r] of Object.entries(this.options.on))
1170
1172
  this.__events__[a] = [r];
1171
- d(this, Pt, Mi).call(this);
1172
- }, Pt = new WeakSet(), Mi = function() {
1173
+ d(this, Pt, Ii).call(this);
1174
+ }, Pt = new WeakSet(), Ii = function() {
1173
1175
  const { elements: i, options: t } = this;
1174
1176
  i.forEach((e) => {
1175
1177
  e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, zt, Oi).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Ue(e.video.params) && !Xs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, jt, qi).call(this, e)), Ue(e.video.params) || Ye("video4", "無法取得影片 ID");
@@ -1201,7 +1203,7 @@ it = new WeakSet(), He = function() {
1201
1203
  console.log("error");
1202
1204
  }) : L("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1203
1205
  }
1204
- c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, Ie), g.addEventListener("click", g.video.eventHandler);
1206
+ c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e, g.video.instance = this), g.video.eventHandler = d(this, st, Me), g.addEventListener("click", g.video.eventHandler);
1205
1207
  } else if (l === "onPage") {
1206
1208
  let g = null;
1207
1209
  if (u == "on") {
@@ -1219,10 +1221,10 @@ it = new WeakSet(), He = function() {
1219
1221
  s.innerHTML = pt(e);
1220
1222
  return;
1221
1223
  }
1222
- g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, Ie), g.addEventListener("click", g.video.eventHandler);
1224
+ g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, Me), g.addEventListener("click", g.video.eventHandler);
1223
1225
  }
1224
- }, st = new WeakSet(), Ie = function(i) {
1225
- const { video: t, emit: e } = this, {
1226
+ }, st = new WeakSet(), Me = function(i) {
1227
+ const { video: t } = this, e = t.instance, {
1226
1228
  $selector: s,
1227
1229
  videoMode: o,
1228
1230
  videoTarget: a,
@@ -1248,7 +1250,7 @@ it = new WeakSet(), He = function() {
1248
1250
  on: {
1249
1251
  complete(y) {
1250
1252
  var D;
1251
- o == "onBox" && (u == "instagram" ? (y.setAttribute("video-typeStyle", `${u}`), (D = window.instgrm) != null && D.Embeds ? window.instgrm.Embeds.process() : console.log("window.instgrm is undefined")) : (y.querySelector(".modal-content").insertAdjacentHTML("beforeend", pt(t.params)), y.setAttribute("video-typeStyle", `${u}`))), o == "inBox" && y.setAttribute("video-typeStyle", `${u}`);
1253
+ o == "onBox" && (u == "instagram" ? (y.setAttribute("video-typeStyle", `${u}`), (D = window.instgrm) != null && D.Embeds ? (y.querySelector(".modal-content").insertAdjacentHTML("beforeend", Ys(t.params)), window.instgrm.Embeds.process()) : console.log("window.instgrm is undefined")) : (y.querySelector(".modal-content").insertAdjacentHTML("beforeend", pt(t.params)), y.setAttribute("video-typeStyle", `${u}`))), o == "inBox" && y.setAttribute("video-typeStyle", `${u}`);
1252
1254
  },
1253
1255
  open(y) {
1254
1256
  var U;
@@ -1302,10 +1304,11 @@ it = new WeakSet(), He = function() {
1302
1304
  videoLayoutNo: t.params.videoLayoutNo
1303
1305
  });
1304
1306
  }
1307
+ e == null || e.emit("openModal");
1305
1308
  },
1306
1309
  close(y) {
1307
1310
  const D = y.querySelectorAll("[data-overlayscrollbars-viewport]");
1308
- Ii([...D]);
1311
+ Mi([...D]), e == null || e.emit("closeModal");
1309
1312
  },
1310
1313
  destroy(y) {
1311
1314
  }
@@ -1346,7 +1349,7 @@ it = new WeakSet(), He = function() {
1346
1349
  let Ce = X;
1347
1350
  Object.assign(Ce.prototype, j);
1348
1351
  customElements.define("video-player", Ws);
1349
- const Ys = {
1352
+ const Fs = {
1350
1353
  "zh-tw": {
1351
1354
  臺北市: [
1352
1355
  ["中正區", "100"],
@@ -2177,7 +2180,7 @@ const Ys = {
2177
2180
  }
2178
2181
  };
2179
2182
  let Q;
2180
- const Fs = (n) => {
2183
+ const Us = (n) => {
2181
2184
  const { TEMPLATE: i } = Be, { 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");
2182
2185
  e.innerHTML = i(
2183
2186
  s,
@@ -2191,14 +2194,14 @@ const Fs = (n) => {
2191
2194
  (!p.hasAttribute("data-option") || p.getAttribute("data-option").trim() === "") && p.setAttribute("data-option", p.textContent.trim());
2192
2195
  }) : (!c.hasAttribute("data-option") || c.getAttribute("data-option").trim() === "") && c.setAttribute("data-option", c.textContent.trim())), l.append(c);
2193
2196
  }), e.children[0];
2194
- }, Us = (n) => {
2197
+ }, Js = (n) => {
2195
2198
  var t;
2196
2199
  const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
2197
2200
  i && i.forEach((e) => {
2198
2201
  const s = document.querySelector(e);
2199
- s || L("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && M(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2202
+ s || L("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && I(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2200
2203
  });
2201
- }, M = (n, i) => {
2204
+ }, I = (n, i) => {
2202
2205
  const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
2203
2206
  if (i < 0 || i.length === 0) {
2204
2207
  switch (e.forEach((s) => {
@@ -2250,23 +2253,23 @@ const Fs = (n) => {
2250
2253
  break;
2251
2254
  }
2252
2255
  }
2253
- }, Js = (n) => {
2256
+ }, Zs = (n) => {
2254
2257
  const i = n.s.cityLang;
2255
- f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (Q = JSON.parse(f("#newCityData").val())[0], console.log([0])) : Q = Ys, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Q[i]).forEach((t) => {
2258
+ f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (Q = JSON.parse(f("#newCityData").val())[0], console.log([0])) : Q = Fs, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Q[i]).forEach((t) => {
2256
2259
  const e = document.createElement("li");
2257
2260
  e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
2258
2261
  }), n.s.allLi = n.querySelectorAll(".dropdown-list li"));
2259
- }, Zs = (n, i) => {
2262
+ }, Qs = (n, i) => {
2260
2263
  const t = n.s.cityLang;
2261
2264
  Q[t][i].forEach((e, s) => {
2262
2265
  const o = document.createElement("li");
2263
2266
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
2264
2267
  });
2265
2268
  }, Ni = () => {
2266
- x('dropdown-el[d4-status="open"]').forEach((i) => {
2269
+ $('dropdown-el[d4-status="open"]').forEach((i) => {
2267
2270
  i.close();
2268
2271
  });
2269
- }, Qs = () => {
2272
+ }, Ks = () => {
2270
2273
  const { SETTINGS: n } = Be;
2271
2274
  ((t, e) => {
2272
2275
  Object.keys(e).forEach((s) => {
@@ -2274,7 +2277,7 @@ const Fs = (n) => {
2274
2277
  });
2275
2278
  })(document.documentElement, n.scrollbar);
2276
2279
  };
2277
- Qs();
2280
+ Ks();
2278
2281
  document.addEventListener("click", function() {
2279
2282
  Ni();
2280
2283
  });
@@ -2306,7 +2309,7 @@ class Pi extends HTMLElement {
2306
2309
  switch (o.hasAttribute("multiple") ? "multiple" : "single") {
2307
2310
  case "single":
2308
2311
  const r = o.querySelector(`.dropdown-list li[data-option="${s}"]`);
2309
- E(r) ? M(o, [...o.s.allLi].indexOf(r)) : M(o, -1);
2312
+ E(r) ? I(o, [...o.s.allLi].indexOf(r)) : I(o, -1);
2310
2313
  break;
2311
2314
  case "multiple":
2312
2315
  const l = [];
@@ -2315,17 +2318,17 @@ class Pi extends HTMLElement {
2315
2318
  E(p) && (p.classList.add("active"), l.push(p));
2316
2319
  });
2317
2320
  const c = l.map((u) => [...o.s.allLi].indexOf(u));
2318
- M(o, c);
2321
+ I(o, c);
2319
2322
  break;
2320
2323
  }
2321
2324
  else
2322
- M(o, -1);
2325
+ I(o, -1);
2323
2326
  o.emit("change");
2324
2327
  break;
2325
2328
  case "d4-placeholder":
2326
2329
  if (e === null)
2327
2330
  return;
2328
- e !== s && o.s.value.index < 0 && M(o, o.s.value.index);
2331
+ e !== s && o.s.value.index < 0 && I(o, o.s.value.index);
2329
2332
  break;
2330
2333
  }
2331
2334
  }
@@ -2360,11 +2363,11 @@ class Pi extends HTMLElement {
2360
2363
  Bt = new WeakSet(), ji = function() {
2361
2364
  this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Wt, zi).call(this);
2362
2365
  }, Wt = new WeakSet(), zi = function() {
2363
- this.s.childDom = this.childNodes, this.s.template = Fs(this), this.innerHTML = "", this.append(this.s.template), d(this, Gt, Bi).call(this);
2366
+ this.s.childDom = this.childNodes, this.s.template = Us(this), this.innerHTML = "", this.append(this.s.template), d(this, Gt, Bi).call(this);
2364
2367
  }, Gt = new WeakSet(), Bi = function() {
2365
2368
  var s;
2366
2369
  const t = this;
2367
- t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Js(t), t.s.subDropdownTotalH = 0;
2370
+ t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Zs(t), t.s.subDropdownTotalH = 0;
2368
2371
  const e = t.getAttribute("d4-value");
2369
2372
  switch (t.s.selectType) {
2370
2373
  case "single":
@@ -2373,7 +2376,7 @@ Bt = new WeakSet(), ji = function() {
2373
2376
  const r = document.querySelector(`dropdown-el[dist-select="${t.id}"]`), l = r ? r.getAttribute("d4-value") !== "" : !1;
2374
2377
  if (r && l) {
2375
2378
  const c = r.getAttribute("d4-value");
2376
- if (Zs(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2379
+ if (Qs(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2377
2380
  const u = e.split(",")[1];
2378
2381
  o = t.querySelector(`.dropdown-list li[data-option="${u}"]`), t.setAttribute("d4-value", u);
2379
2382
  }
@@ -2406,7 +2409,7 @@ Bt = new WeakSet(), ji = function() {
2406
2409
  };
2407
2410
  break;
2408
2411
  }
2409
- M(t, t.s.value.index), d(s = t, Rt, Wi).call(s), t.classList.add("d4-initialize");
2412
+ I(t, t.s.value.index), d(s = t, Rt, Wi).call(s), t.classList.add("d4-initialize");
2410
2413
  }, Rt = new WeakSet(), Wi = function() {
2411
2414
  const t = this;
2412
2415
  t.__events__.dropdownToggle = () => {
@@ -2478,11 +2481,11 @@ Bt = new WeakSet(), ji = function() {
2478
2481
  };
2479
2482
  v.addEventListener("transitionend", D);
2480
2483
  } else
2481
- switch (Us(e), e.s.selectType) {
2484
+ switch (Js(e), e.s.selectType) {
2482
2485
  case "single":
2483
2486
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2484
2487
  const v = e.s.cityLang, w = l.textContent.trim(), b = document.getElementById(e.getAttribute("dist-select"));
2485
- b && (b.querySelector(".dropdown-list").textContent = "", M(b, -1), Q[v][w].forEach((T, C) => {
2488
+ b && (b.querySelector(".dropdown-list").textContent = "", I(b, -1), Q[v][w].forEach((T, C) => {
2486
2489
  const y = document.createElement("li");
2487
2490
  y.textContent = T[0], y.setAttribute("data-option", T[0]), b.querySelector(".dropdown-list").append(y);
2488
2491
  }), e.__events__.selectOption(b));
@@ -2490,7 +2493,7 @@ Bt = new WeakSet(), ji = function() {
2490
2493
  (m = u.parentNode.closest("li")) != null && m.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2491
2494
  break;
2492
2495
  case "multiple":
2493
- c.stopPropagation(), u.classList.toggle("active"), M(e, p);
2496
+ c.stopPropagation(), u.classList.toggle("active"), I(e, p);
2494
2497
  break;
2495
2498
  }
2496
2499
  });
@@ -2550,7 +2553,7 @@ function Je(n) {
2550
2553
  } else
2551
2554
  return n.s.options.duration;
2552
2555
  }
2553
- function Ks(n) {
2556
+ function Vs(n) {
2554
2557
  const { behavior: i, continual: t, gap: e } = n.s.options, s = n.childNodes, o = document.createElement("div"), a = document.createElement("div");
2555
2558
  o.className = "animate-container", a.className = "animate-item", [...s].forEach((l) => {
2556
2559
  a.append(l);
@@ -2617,14 +2620,14 @@ function H(n) {
2617
2620
  }
2618
2621
  return s;
2619
2622
  }
2620
- function Vs(n) {
2623
+ function tn(n) {
2621
2624
  let i;
2622
2625
  return function(t) {
2623
2626
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2624
2627
  };
2625
2628
  }
2626
2629
  var Xt, Gi, Yt, Ri, Ft, Xi, Ut, Yi;
2627
- class tn extends HTMLElement {
2630
+ class en extends HTMLElement {
2628
2631
  constructor() {
2629
2632
  super();
2630
2633
  h(this, Xt);
@@ -2650,22 +2653,22 @@ class tn extends HTMLElement {
2650
2653
  }
2651
2654
  Xt = new WeakSet(), Gi = function() {
2652
2655
  const t = {
2653
- direction: this.getAttribute("direction") || I.SETTINGS.direction,
2656
+ direction: this.getAttribute("direction") || M.SETTINGS.direction,
2654
2657
  // up / down / left / right
2655
- behavior: this.getAttribute("behavior") || I.SETTINGS.behavior,
2658
+ behavior: this.getAttribute("behavior") || M.SETTINGS.behavior,
2656
2659
  // normal / alternate / endStop
2657
- duration: Number(this.getAttribute("duration")) || I.SETTINGS.duration,
2660
+ duration: Number(this.getAttribute("duration")) || M.SETTINGS.duration,
2658
2661
  // ms
2659
- durationBreakpoints: gt(this) || I.SETTINGS.durationBreakpoints,
2660
- autoplay: this.getAttribute("autoplay") || I.SETTINGS.autoplay,
2662
+ durationBreakpoints: gt(this) || M.SETTINGS.durationBreakpoints,
2663
+ autoplay: this.getAttribute("autoplay") || M.SETTINGS.autoplay,
2661
2664
  // normal / alternate / endStop
2662
- pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : I.SETTINGS.pauseOnMouseenter,
2665
+ pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : M.SETTINGS.pauseOnMouseenter,
2663
2666
  // true / false
2664
- continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : I.SETTINGS.continual,
2667
+ continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : M.SETTINGS.continual,
2665
2668
  // true / false
2666
- gap: Number(this.getAttribute("gap")) || I.SETTINGS.gap
2669
+ gap: Number(this.getAttribute("gap")) || M.SETTINGS.gap
2667
2670
  };
2668
- this.s = {}, this.s.options = t, this.s.nowDuration = Je(this), Ks(this), d(this, Yt, Ri).call(this);
2671
+ this.s = {}, this.s.options = t, this.s.nowDuration = Je(this), Vs(this), d(this, Yt, Ri).call(this);
2669
2672
  }, Yt = new WeakSet(), Ri = function() {
2670
2673
  const { direction: t, continual: e, gap: s } = this.s.options;
2671
2674
  switch (t) {
@@ -2757,15 +2760,15 @@ Xt = new WeakSet(), Gi = function() {
2757
2760
  iterations: 1 / 0
2758
2761
  }), t.s.cloneAnimation.startTime = o);
2759
2762
  }
2760
- window.addEventListener("resize", Vs(e));
2763
+ window.addEventListener("resize", tn(e));
2761
2764
  };
2762
- customElements.define("marquee-el", tn);
2765
+ customElements.define("marquee-el", en);
2763
2766
  const Ze = function(n, i) {
2764
2767
  let t;
2765
2768
  return function(e) {
2766
2769
  t && clearTimeout(t), t = setTimeout(n, 200, e);
2767
2770
  };
2768
- }, $ = (n, i) => {
2771
+ }, x = (n, i) => {
2769
2772
  if (ut(n)) {
2770
2773
  n.forEach((t) => {
2771
2774
  t.classList.add(i);
@@ -2782,7 +2785,7 @@ const Ze = function(n, i) {
2782
2785
  }
2783
2786
  n.classList.remove(i);
2784
2787
  };
2785
- var Jt, Fi, Zt, Ui, Qt, Ji, nt, Me, Y, ft, Kt, Zi;
2788
+ var Jt, Fi, Zt, Ui, Qt, Ji, nt, Ie, Y, ft, Kt, Zi;
2786
2789
  class Qe {
2787
2790
  constructor(i) {
2788
2791
  // 初始化
@@ -2827,7 +2830,7 @@ Jt = new WeakSet(), Fi = function() {
2827
2830
  let t = !1;
2828
2831
  const e = () => {
2829
2832
  t || (requestAnimationFrame(() => {
2830
- d(this, nt, Me).call(this), d(this, Y, ft).call(this), t = !1;
2833
+ d(this, nt, Ie).call(this), d(this, Y, ft).call(this), t = !1;
2831
2834
  }), t = !0);
2832
2835
  };
2833
2836
  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, Qt, Ji).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
@@ -2841,7 +2844,7 @@ Jt = new WeakSet(), Fi = function() {
2841
2844
  </div>
2842
2845
  </div>`
2843
2846
  ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Zt, Ui).call(a)), d(r = i, Kt, Zi).call(r), i.update(!0), requestAnimationFrame(() => {
2844
- d(this, nt, Me).call(this), d(this, Y, ft).call(this);
2847
+ d(this, nt, Ie).call(this), d(this, Y, ft).call(this);
2845
2848
  });
2846
2849
  }, Zt = new WeakSet(), Ui = function() {
2847
2850
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
@@ -2887,27 +2890,27 @@ Jt = new WeakSet(), Fi = function() {
2887
2890
  i.querySelectorAll("a").forEach((p) => {
2888
2891
  p.removeEventListener("click", u), p.addEventListener("click", u);
2889
2892
  });
2890
- }, nt = new WeakSet(), Me = function() {
2893
+ }, nt = new WeakSet(), Ie = function() {
2891
2894
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
2892
- e <= 0 || ($(i, "scrollable"), s == 0 ? ($(t, "start"), _(t, "end")) : s + 1 >= e ? (_(t, "start"), $(t, "end")) : ($(t, "center"), _(t, "start"), _(t, "end")));
2895
+ 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")));
2893
2896
  }, Y = new WeakSet(), ft = function() {
2894
2897
  const { $wrapper: i, $button: t, $element: e } = this;
2895
2898
  if (!t)
2896
2899
  return;
2897
2900
  const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
2898
2901
  if (s <= 0) {
2899
- $(t, "hide"), _(t, "active"), $(e, "noScrollable");
2902
+ x(t, "hide"), _(t, "active"), x(e, "noScrollable");
2900
2903
  return;
2901
2904
  }
2902
- s > 0 && ($(t, "active"), _(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2905
+ s > 0 && (x(t, "active"), _(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2903
2906
  if (a.classList.contains("next")) {
2904
2907
  _(a, "hide");
2905
2908
  return;
2906
2909
  }
2907
- $(a, "hide");
2910
+ x(a, "hide");
2908
2911
  }) : o + 1 >= s ? t.forEach((a) => {
2909
2912
  if (a.classList.contains("next")) {
2910
- $(a, "hide");
2913
+ x(a, "hide");
2911
2914
  return;
2912
2915
  }
2913
2916
  _(a, "hide");
@@ -2927,7 +2930,7 @@ Jt = new WeakSet(), Fi = function() {
2927
2930
  });
2928
2931
  };
2929
2932
  var Vt, Qi, te, Ki, ee, Vi, ie, ts;
2930
- class en {
2933
+ class sn {
2931
2934
  constructor(i) {
2932
2935
  // 初始化
2933
2936
  h(this, Vt);
@@ -2944,7 +2947,7 @@ Vt = new WeakSet(), Qi = function() {
2944
2947
  this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, te, Ki).call(this) && d(this, ee, Vi).call(this), d(this, ie, ts).call(this));
2945
2948
  }, te = new WeakSet(), Ki = function() {
2946
2949
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2947
- 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) : ($(this.$element, "noScrollable"), !1);
2950
+ 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);
2948
2951
  }, ee = new WeakSet(), Vi = function() {
2949
2952
  const { $element: i, $button: t } = this, e = function() {
2950
2953
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
@@ -2964,12 +2967,12 @@ Vt = new WeakSet(), Qi = function() {
2964
2967
  s.removeEventListener("click", e), s.addEventListener("click", e);
2965
2968
  });
2966
2969
  };
2967
- const sn = (n) => {
2970
+ const nn = (n) => {
2968
2971
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2969
2972
  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;
2970
2973
  };
2971
2974
  var se, es, ne, is, ot, qe, F, vt;
2972
- class nn extends HTMLElement {
2975
+ class on extends HTMLElement {
2973
2976
  constructor() {
2974
2977
  super();
2975
2978
  h(this, se);
@@ -3039,7 +3042,7 @@ se = new WeakSet(), es = function() {
3039
3042
  }, F = new WeakSet(), vt = function() {
3040
3043
  var o;
3041
3044
  const { type: t } = this.s;
3042
- this.innerHTML = "", [...sn(this)].forEach((a) => {
3045
+ this.innerHTML = "", [...nn(this)].forEach((a) => {
3043
3046
  this.append(a);
3044
3047
  });
3045
3048
  const e = this.querySelector(`.drag-container .item[data-option="${this.getAttribute("m4-status")}"]`), s = this.querySelector(`.collapse-container .item[data-option="${this.getAttribute("m4-status")}"]`);
@@ -3048,12 +3051,12 @@ se = new WeakSet(), es = function() {
3048
3051
  this.drag = new Qe(this);
3049
3052
  break;
3050
3053
  case "collapse":
3051
- this.drag = new Qe(this), this.collapse = new en(this);
3054
+ this.drag = new Qe(this), this.collapse = new sn(this);
3052
3055
  break;
3053
3056
  }
3054
3057
  (o = this.drag) == null || o.update();
3055
3058
  };
3056
- customElements.define("multipurpose-nav", nn);
3059
+ customElements.define("multipurpose-nav", on);
3057
3060
  var oe, ns, ae, os, at, Oe, W, J, re, as, le, rs, ce, ls, de, cs, ue, ds, he, us, pe, hs, me, ps, ge, ms, N, R, fe, gs, ve, fs, be, vs, ye, bs;
3058
3061
  class ss extends HTMLElement {
3059
3062
  // 定義組件的初始狀態
@@ -3288,12 +3291,12 @@ oe = new WeakSet(), ns = function() {
3288
3291
  const t = this;
3289
3292
  window.addEventListener(
3290
3293
  "resize",
3291
- on(() => {
3294
+ an(() => {
3292
3295
  t.update();
3293
3296
  }, 1e3)
3294
3297
  );
3295
3298
  };
3296
- function on(n, i = 1e3) {
3299
+ function an(n, i = 1e3) {
3297
3300
  let t;
3298
3301
  return function(e) {
3299
3302
  t && clearTimeout(t), t = setTimeout(n, i, e);
@@ -3335,12 +3338,12 @@ customElements.define("tab-el", ss);
3335
3338
  const Ke = (n) => {
3336
3339
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
3337
3340
  n.classList.add(t), o.style.height = 0, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3338
- }, an = (n) => {
3341
+ }, rn = (n) => {
3339
3342
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3340
3343
  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";
3341
3344
  };
3342
3345
  var rt, Ne, we, ws, Te, Ts, lt, Pe;
3343
- class rn {
3346
+ class ln {
3344
3347
  constructor(i, t = {}) {
3345
3348
  h(this, rt);
3346
3349
  h(this, we);
@@ -3357,7 +3360,7 @@ class rn {
3357
3360
  }
3358
3361
  rt = new WeakSet(), Ne = function() {
3359
3362
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = si;
3360
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3363
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3361
3364
  for (const [o, a] of Object.entries(this.options.on))
3362
3365
  this.__events__[o] = [a];
3363
3366
  d(this, we, ws).call(this);
@@ -3378,10 +3381,10 @@ rt = new WeakSet(), Ne = function() {
3378
3381
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3379
3382
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3380
3383
  Ke(l);
3381
- }), an(r)) : Ke(r), i.emit("afterCollapse");
3384
+ }), rn(r)) : Ke(r), i.emit("afterCollapse");
3382
3385
  };
3383
- Object.assign(rn.prototype, j);
3384
- function ln(n, i) {
3386
+ Object.assign(ln.prototype, j);
3387
+ function cn(n, i) {
3385
3388
  const t = i, { color: e, opacity: s, duration: o } = i.s.options;
3386
3389
  let a = document.createElement("span"), r = n.clientX - t.getBoundingClientRect().left, l = n.clientY - t.getBoundingClientRect().top;
3387
3390
  a.style.cssText = `background: ${e};left: ${r}px;top: ${l}px;opacity: ${s};animation-duration: ${o}ms`, a.classList.add("circle"), t.appendChild(a), setTimeout(function() {
@@ -3395,7 +3398,7 @@ function Es() {
3395
3398
  }
3396
3399
  document.addEventListener("click", Es);
3397
3400
  var ct, je, Ee, As, Ae, Ls, Le, Ss;
3398
- class cn extends HTMLElement {
3401
+ class dn extends HTMLElement {
3399
3402
  constructor() {
3400
3403
  super();
3401
3404
  h(this, ct);
@@ -3436,7 +3439,7 @@ ct = new WeakSet(), je = function() {
3436
3439
  }, Le = new WeakSet(), Ss = function() {
3437
3440
  const t = this.querySelector("i.hover-ball"), e = this;
3438
3441
  e.addEventListener("click", function(a) {
3439
- a.stopPropagation(), e.s.options.click && ln(a, e);
3442
+ a.stopPropagation(), e.s.options.click && cn(a, e);
3440
3443
  });
3441
3444
  let s = "ontouchstart" in document.documentElement ? "touchstart" : "mouseenter", o = "ontouchend" in document.documentElement ? "touchend" : "mouseleave";
3442
3445
  e.addEventListener(s, function(a) {
@@ -3451,8 +3454,8 @@ ct = new WeakSet(), je = function() {
3451
3454
  }
3452
3455
  });
3453
3456
  };
3454
- customElements.define("ripple-btn", cn);
3455
- class dn {
3457
+ customElements.define("ripple-btn", dn);
3458
+ class un {
3456
3459
  constructor() {
3457
3460
  this.init();
3458
3461
  }
@@ -3509,7 +3512,7 @@ function Ve(n, i) {
3509
3512
  Function(n)(t, e);
3510
3513
  } : i;
3511
3514
  }
3512
- function un(n, i, t, e) {
3515
+ function hn(n, i, t, e) {
3513
3516
  const s = i.params, o = n.closest("[data-upload-item]").querySelector("[data-preview]");
3514
3517
  o.querySelector("img") && o.querySelector("img").remove(), o.appendChild(e.imgElement);
3515
3518
  const a = n.dataset.group, r = document.querySelector(i.el).dataset.index;
@@ -3532,7 +3535,7 @@ function un(n, i, t, e) {
3532
3535
  info: e
3533
3536
  }, s.on.changeAfter && typeof s.on.changeAfter == "function" && s.on.changeAfter(n, e);
3534
3537
  }
3535
- function hn(n, i, t, e) {
3538
+ function pn(n, i, t, e) {
3536
3539
  const s = document.createElement("canvas"), o = s.getContext("2d"), a = i.width, l = i.height / a * 100, c = e / t * 100;
3537
3540
  let u = 0, p = 0;
3538
3541
  switch (s.width = t, s.height = e, n.previewSize) {
@@ -3546,14 +3549,14 @@ function hn(n, i, t, e) {
3546
3549
  const g = (s.width - u) * 0.5, m = (s.height - p) * 0.5;
3547
3550
  return o.drawImage(i, g, m, u, p), s;
3548
3551
  }
3549
- function pn(n, i) {
3552
+ function mn(n, i) {
3550
3553
  return new Promise((t, e) => {
3551
3554
  if (i) {
3552
3555
  const s = new Image();
3553
3556
  s.src = i, s.classList.add(n.previewSize), s.onload = () => {
3554
3557
  let o = {
3555
3558
  imgElement: s,
3556
- originalCanvas: hn(n, s, s.width, s.height),
3559
+ originalCanvas: pn(n, s, s.width, s.height),
3557
3560
  info: {
3558
3561
  originalWidth: s.width,
3559
3562
  originalHeight: s.height,
@@ -3566,31 +3569,31 @@ function pn(n, i) {
3566
3569
  t();
3567
3570
  });
3568
3571
  }
3569
- function mn(n, i) {
3572
+ function gn(n, i) {
3570
3573
  const t = Math.pow(10, i);
3571
3574
  return Math.round(n * t) / t;
3572
3575
  }
3573
- function gn(n, i) {
3576
+ function fn(n, i) {
3574
3577
  let t = n.size / 1024 / 1024;
3575
- return `${mn(t, 2)}` <= i;
3578
+ return `${gn(t, 2)}` <= i;
3576
3579
  }
3577
- function fn(n, i, t) {
3580
+ function vn(n, i, t) {
3578
3581
  if (n.target.files.length <= 0)
3579
3582
  return;
3580
3583
  const e = n.target.files[0], s = i.closest("[data-upload-item]");
3581
3584
  let o = new FileReader();
3582
3585
  o.onload = (a) => {
3583
3586
  const r = e.type.split("/")[0] === "image" ? a.target.result : null;
3584
- if (t.params.sizeLimit && !gn(e, t.params.sizeLimit)) {
3587
+ if (t.params.sizeLimit && !fn(e, t.params.sizeLimit)) {
3585
3588
  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);
3586
3589
  return;
3587
3590
  } else
3588
- s.classList.remove("over-limit"), s.classList.add("uploaded"), pn(t.params, r).then((l) => {
3589
- un(i, t, e, l);
3591
+ s.classList.remove("over-limit"), s.classList.add("uploaded"), mn(t.params, r).then((l) => {
3592
+ hn(i, t, e, l);
3590
3593
  });
3591
3594
  }, o.readAsDataURL(e);
3592
3595
  }
3593
- class vn {
3596
+ class bn {
3594
3597
  constructor(i, t) {
3595
3598
  const e = this;
3596
3599
  e.el = i, e.params = {
@@ -3623,7 +3626,7 @@ class vn {
3623
3626
  }
3624
3627
  };
3625
3628
  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) {
3626
- fn(a, e, i);
3629
+ vn(a, e, i);
3627
3630
  });
3628
3631
  }));
3629
3632
  }
@@ -3631,54 +3634,54 @@ class vn {
3631
3634
  export {
3632
3635
  oi as A,
3633
3636
  In as B,
3634
- rn as C,
3637
+ ln as C,
3635
3638
  Pi as D,
3636
- Mn as E,
3637
- qn as F,
3638
- On as G,
3639
- Nn as H,
3640
- dn as I,
3641
- Pn as J,
3642
- jn as K,
3643
- zn as L,
3639
+ qn as E,
3640
+ On as F,
3641
+ Nn as G,
3642
+ Pn as H,
3643
+ un as I,
3644
+ jn as J,
3645
+ zn as K,
3646
+ Bn as L,
3644
3647
  K as M,
3645
- Bn as N,
3646
- Wn as O,
3647
- Gn as P,
3648
- Rn as Q,
3649
- cn as R,
3650
- Xn as S,
3648
+ Wn as N,
3649
+ Gn as O,
3650
+ Rn as P,
3651
+ Xn as Q,
3652
+ dn as R,
3653
+ Yn as S,
3651
3654
  ss as T,
3652
- Yn as U,
3653
- Fn as V,
3654
- Un as W,
3655
- Jn as X,
3656
- Zn as Y,
3655
+ Fn as U,
3656
+ Un as V,
3657
+ Jn as W,
3658
+ Zn as X,
3659
+ Qn as Y,
3657
3660
  E as a,
3658
3661
  ut as b,
3659
- Is as c,
3662
+ Ms as c,
3660
3663
  Hs as d,
3661
3664
  Se as e,
3662
3665
  S as f,
3663
- x as g,
3664
- Dn as h,
3666
+ $ as g,
3667
+ kn as h,
3665
3668
  dt as i,
3666
3669
  yi as j,
3667
- tn as k,
3668
- nn as l,
3669
- vn as m,
3670
+ en as k,
3671
+ on as l,
3672
+ bn as m,
3670
3673
  Rs as n,
3671
- Qn as o,
3674
+ Kn as o,
3672
3675
  Hi as p,
3673
- Ii as q,
3674
- kn as r,
3676
+ Mi as q,
3677
+ $n as r,
3675
3678
  Cs as s,
3676
3679
  xn as t,
3677
- $n as u,
3680
+ _n as u,
3678
3681
  Ce as v,
3679
3682
  Gs as w,
3680
- _n as x,
3681
- Cn as y,
3682
- Hn as z
3683
+ Cn as x,
3684
+ Hn as y,
3685
+ Mn as z
3683
3686
  };
3684
3687
  //# sourceMappingURL=image-preview-bundle.js.map