@xwadex/fesd 0.0.14-re.76 → 0.0.14-re.80

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.
@@ -7,7 +7,7 @@ var p = (n, i, t) => {
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  i instanceof WeakSet ? i.add(n) : i.set(n, t);
9
9
  };
10
- var u = (n, i, t) => (hs(n, i, "access private method"), t);
10
+ var d = (n, i, t) => (hs(n, i, "access private method"), t);
11
11
  import { OverlayScrollbars as Ce } from "overlayscrollbars";
12
12
  import g from "jquery";
13
13
  import "./vendor-bundle.js";
@@ -112,24 +112,24 @@ const Y = {
112
112
  "scrollbar-radius": "10px"
113
113
  }
114
114
  },
115
- TEMPLATE(n, i, t) {
116
- const e = `
117
- <div class="filter-bar">
118
- <input class="filter-input" type="text" placeholder="${i}" disabled>
119
- </div>
120
- `;
121
- return `
122
- <div class="select-wrapper">
115
+ TEMPLATE(n, i, t, e) {
116
+ const o = `
117
+ <i class="${e || "dropdown-icon"}"></i>
118
+ `, a = `
119
+ <div class="filter-bar">
120
+ <input class="filter-input" type="text" placeholder="${i}" disabled>
121
+ </div>
122
+ `, r = `<div class="select-wrapper">
123
123
  <div class="select-display"></div>
124
- <i class="dropdown-icon"></i>
124
+ ${o}
125
125
  <div class="dropdown">
126
- ${n ? t || e : ""}
126
+ ${n ? a : ""}
127
127
  <div class="dropdown-scroller">
128
128
  <ul class="dropdown-list"></ul>
129
129
  </div>
130
130
  </div>
131
- </div>
132
- `;
131
+ </div>`;
132
+ return t || r;
133
133
  }
134
134
  }, fs = {
135
135
  SETTINGS: {
@@ -361,7 +361,7 @@ const Y = {
361
361
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
362
362
  }
363
363
  }, be = (n, i) => {
364
- const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", d = c ? "scrollLeft" : "scrollTop", h = c ? "left" : "top", m = c ? "width" : "height", f = b(e) ? T(e) : document.scrollingElement, v = f[d], C = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, L = b(s) ? T(s).getBoundingClientRect()[m] : 0, H = C - a - L, G = 15;
364
+ const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", h = c ? "left" : "top", m = c ? "width" : "height", f = b(e) ? T(e) : document.scrollingElement, v = f[u], C = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, L = b(s) ? T(s).getBoundingClientRect()[m] : 0, H = C - a - L, G = 15;
365
365
  let A = 0;
366
366
  if (H === 0)
367
367
  return;
@@ -373,7 +373,7 @@ const Y = {
373
373
  const Ie = () => {
374
374
  A += G;
375
375
  const R = ws[r](A, v, H, o);
376
- f[d] = R, A < o && requestAnimationFrame(Ie), A >= o && X("afterScroll");
376
+ f[u] = R, A < o && requestAnimationFrame(Ie), A >= o && X("afterScroll");
377
377
  };
378
378
  requestAnimationFrame(Ie);
379
379
  };
@@ -386,7 +386,7 @@ class Je {
386
386
  this.__storage__ = {
387
387
  el: i,
388
388
  options: t
389
- }, this.active = "data-anchor-active", u(this, J, we).call(this);
389
+ }, this.active = "data-anchor-active", d(this, J, we).call(this);
390
390
  }
391
391
  destroy() {
392
392
  const { elements: i } = this;
@@ -396,7 +396,7 @@ class Je {
396
396
  }
397
397
  update() {
398
398
  var i;
399
- return u(i = this.destroy(), J, we).call(i), this.emit("afterUpdate"), this;
399
+ return d(i = this.destroy(), J, we).call(i), this.emit("afterUpdate"), this;
400
400
  }
401
401
  static run(i) {
402
402
  const { SETTINGS: t } = lt, e = Object.assign({}, t, i);
@@ -422,11 +422,11 @@ J = new WeakSet(), we = function() {
422
422
  if (this.elements = t.state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.elements = E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
423
423
  for (const [o, a] of Object.entries(this.options.on))
424
424
  this.__events__[o] = [a];
425
- u(this, pt, Ze).call(this);
425
+ d(this, pt, Ze).call(this);
426
426
  }, pt = new WeakSet(), Ze = function() {
427
427
  const { elements: i, options: t } = this;
428
428
  i.forEach((e) => {
429
- e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = u(this, mt, Qe), 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, "");
429
+ e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, mt, Qe), 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, "");
430
430
  }), this.emit("afterInit");
431
431
  }, mt = new WeakSet(), Qe = function() {
432
432
  const { defaultOptions: i, eventHandler: t, instance: e } = this.anchor, s = {
@@ -472,12 +472,12 @@ class Ve extends HTMLElement {
472
472
  attributeChangedCallback(t, e, s) {
473
473
  switch (t) {
474
474
  case ":state":
475
- u(this, yt, si).call(this, s);
475
+ d(this, yt, si).call(this, s);
476
476
  break;
477
477
  }
478
478
  }
479
479
  connectedCallback() {
480
- this.initialize || (this.initialize = !0, u(this, gt, Ke).call(this));
480
+ this.initialize || (this.initialize = !0, d(this, gt, Ke).call(this));
481
481
  }
482
482
  open() {
483
483
  return this.setAttribute(":state", "open"), this;
@@ -493,28 +493,28 @@ gt = new WeakSet(), Ke = function() {
493
493
  const { ATTRS: t } = I;
494
494
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
495
495
  const e = this.getAttribute(t.id) || vs();
496
- this.getAttribute(t.id) || (y(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && y(`the ${t.id} "${e}" is already be used.`), M[e] = this, u(this, ft, ti).call(this);
496
+ this.getAttribute(t.id) || (y(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && y(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, ft, ti).call(this);
497
497
  }, ft = new WeakSet(), ti = function() {
498
- this.childDom = this.childNodes, this.template = Ts(this), this.innerHTML = "", this.append(this.template), u(this, vt, ei).call(this);
498
+ this.childDom = this.childNodes, this.template = Ts(this), this.innerHTML = "", this.append(this.template), d(this, vt, ei).call(this);
499
499
  }, vt = new WeakSet(), ei = function() {
500
500
  const t = this.querySelector(".modal-scroller");
501
501
  this.__scroller__ = Ce(t, {
502
502
  overflowBehavior: {
503
503
  x: "hidden"
504
504
  }
505
- }), u(this, bt, ii).call(this);
505
+ }), d(this, bt, ii).call(this);
506
506
  }, bt = new WeakSet(), ii = function() {
507
507
  var a, r, l;
508
508
  const t = this, { ATTRS: e } = I, { close: s, destroy: o } = e;
509
509
  (a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
510
510
  c.addEventListener("click", function() {
511
- const d = this.getAttribute(s);
512
- (d && M[d] ? M[d] : t).close();
511
+ const u = this.getAttribute(s);
512
+ (u && M[u] ? M[u] : t).close();
513
513
  });
514
514
  }), (r = t.querySelectorAll(`[${o}]`)) == null || r.forEach((c) => {
515
515
  c.addEventListener("click", function() {
516
- const d = this.getAttribute(o);
517
- (d && M[d] ? M[d] : t).destroy();
516
+ const u = this.getAttribute(o);
517
+ (u && M[u] ? M[u] : t).destroy();
518
518
  });
519
519
  }), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
520
520
  c.stopPropagation();
@@ -590,9 +590,9 @@ const { MODALS: Me } = window, ni = (n, i, ...t) => {
590
590
  i && (i.emit(l, ...c), ni(i, o[l], ...c)), i || oi(o[l], ...c);
591
591
  };
592
592
  fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
593
- const c = bs(l), d = T(s) || T(I.SETTINGS.container);
593
+ const c = bs(l), u = T(s) || T(I.SETTINGS.container);
594
594
  [...c].forEach((m) => {
595
- d.append(m);
595
+ u.append(m);
596
596
  });
597
597
  const h = Me[t] || T(n.target);
598
598
  r("complete", h), ai(n, i);
@@ -609,7 +609,7 @@ const N = class N {
609
609
  this.__storage__ = {
610
610
  el: i,
611
611
  options: t
612
- }, this.active = "data-modal-active", u(this, Z, Te).call(this);
612
+ }, this.active = "data-modal-active", d(this, Z, Te).call(this);
613
613
  }
614
614
  destroy() {
615
615
  const { elements: i } = this;
@@ -619,7 +619,7 @@ const N = class N {
619
619
  }
620
620
  update() {
621
621
  var i;
622
- return u(i = this.destroy(), Z, Te).call(i), this.emit("update"), this;
622
+ return d(i = this.destroy(), Z, Te).call(i), this.emit("update"), this;
623
623
  }
624
624
  /** static method 'open' */
625
625
  static open(i) {
@@ -643,11 +643,11 @@ Z = new WeakSet(), Te = function() {
643
643
  if (this.elements = t.state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
644
644
  for (const [o, a] of Object.entries(this.options.on))
645
645
  this.__events__[o] = [a];
646
- u(this, wt, ri).call(this);
646
+ d(this, wt, ri).call(this);
647
647
  }, wt = new WeakSet(), ri = function() {
648
648
  const { elements: i, options: t } = this;
649
649
  i.forEach((e) => {
650
- e.modal = {}, e.modal.instance = this, e.modal.eventHandler = u(this, Tt, li), 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, "");
650
+ e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Tt, li), 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, "");
651
651
  }), this.emit("init");
652
652
  }, Tt = new WeakSet(), li = function(i) {
653
653
  const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = ys(this.getAttribute("data-modal-on"));
@@ -670,7 +670,7 @@ customElements.define("modern-modal", Ve);
670
670
  const Ls = (n, i) => {
671
671
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
672
672
  i.forEach((s) => {
673
- const { class: o, delay: a, start: r, end: l, repeat: c, instance: d } = s.aost, { top: h, bottom: m } = s.getBoundingClientRect(), f = t * (r / 100), v = t * (l / 100);
673
+ const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: h, bottom: m } = s.getBoundingClientRect(), f = t * (r / 100), v = t * (l / 100);
674
674
  if (h - e <= f && m - e >= v && s.offsetParent)
675
675
  setTimeout(() => {
676
676
  s.classList.add(o);
@@ -691,7 +691,7 @@ class ci {
691
691
  this.__storage__ = {
692
692
  el: i,
693
693
  options: t
694
- }, this.active = "data-aost-active", u(this, Q, Ee).call(this);
694
+ }, this.active = "data-aost-active", d(this, Q, Ee).call(this);
695
695
  }
696
696
  destroy(i) {
697
697
  const { elements: t, options: e } = this;
@@ -707,7 +707,7 @@ class ci {
707
707
  }
708
708
  update(i) {
709
709
  var t;
710
- u(t = this.destroy(i), Q, Ee).call(t);
710
+ d(t = this.destroy(i), Q, Ee).call(t);
711
711
  }
712
712
  }
713
713
  Q = new WeakSet(), Ee = function() {
@@ -718,7 +718,7 @@ Q = new WeakSet(), Ee = function() {
718
718
  if (this.elements = t.state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
719
719
  for (const [o, a] of Object.entries(this.options.on))
720
720
  this.__events__[o] = [a];
721
- u(this, Et, di).call(this);
721
+ d(this, Et, di).call(this);
722
722
  }, Et = new WeakSet(), di = function() {
723
723
  const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !b(e) ? window : T(e);
724
724
  this.eventHandler = () => {
@@ -752,7 +752,7 @@ class Ds extends HTMLElement {
752
752
  // youku iframe
753
753
  p(this, xt);
754
754
  p(this, $t);
755
- u(this, Lt, ui).call(this);
755
+ d(this, Lt, ui).call(this);
756
756
  }
757
757
  play() {
758
758
  const { videoType: t } = this;
@@ -794,9 +794,9 @@ Lt = new WeakSet(), ui = function() {
794
794
  y("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
795
795
  return;
796
796
  }
797
- this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.autoplay = this.getAttribute("video-autoplay"), u(this, At, hi).call(this);
797
+ this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.autoplay = this.getAttribute("video-autoplay"), d(this, At, hi).call(this);
798
798
  }, At = new WeakSet(), hi = function() {
799
- this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), u(this, St, pi).call(this);
799
+ this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this, St, pi).call(this);
800
800
  }, St = new WeakSet(), pi = function() {
801
801
  const { videoType: t } = this;
802
802
  let e = "";
@@ -804,18 +804,18 @@ Lt = new WeakSet(), ui = function() {
804
804
  case "youtubeAPI":
805
805
  break;
806
806
  case "youtube":
807
- e = u(this, Dt, mi).call(this);
807
+ e = d(this, Dt, mi).call(this);
808
808
  break;
809
809
  case "youkuAPI":
810
810
  break;
811
811
  case "youku":
812
- e = u(this, xt, fi).call(this);
812
+ e = d(this, xt, fi).call(this);
813
813
  break;
814
814
  case "vimeo":
815
- e = u(this, _t, gi).call(this);
815
+ e = d(this, _t, gi).call(this);
816
816
  break;
817
817
  case "bilibili":
818
- e = u(this, $t, vi).call(this);
818
+ e = d(this, $t, vi).call(this);
819
819
  break;
820
820
  }
821
821
  this.querySelector(".player-wrapper").insertAdjacentHTML(w.prepend, e);
@@ -974,9 +974,9 @@ function An() {
974
974
  function Sn(n, i, t, e, s) {
975
975
  const o = this, r = g(n).html().split("<br>");
976
976
  let l = "", c = 0;
977
- r.forEach((d, h) => {
978
- h !== 0 && (l += "<br>"), d.split("").forEach((f, v) => {
979
- i ? (v === 0 && (l += '<span class="letter-wrap" style="display: inline-block">'), f === " " ? l += '</span> <span class="letter-wrap" style="display: inline-block">' : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${f}</span>`, c++), v === d.length - 1 && (l += "</span>")) : f === " " ? l += " " : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${f}</span>`, c++);
977
+ r.forEach((u, h) => {
978
+ h !== 0 && (l += "<br>"), u.split("").forEach((f, v) => {
979
+ i ? (v === 0 && (l += '<span class="letter-wrap" style="display: inline-block">'), f === " " ? l += '</span> <span class="letter-wrap" style="display: inline-block">' : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${f}</span>`, c++), v === u.length - 1 && (l += "</span>")) : f === " " ? l += " " : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${f}</span>`, c++);
980
980
  });
981
981
  }), g(n).html(l);
982
982
  }
@@ -1076,10 +1076,10 @@ class ks {
1076
1076
  this.__storage__ = {
1077
1077
  el: i,
1078
1078
  options: t
1079
- }, this.active = "data-video-active", u(this, V, Le).call(this);
1079
+ }, this.active = "data-video-active", d(this, V, Le).call(this);
1080
1080
  }
1081
1081
  update() {
1082
- u(this, V, Le).call(this);
1082
+ d(this, V, Le).call(this);
1083
1083
  }
1084
1084
  }
1085
1085
  V = new WeakSet(), Le = function() {
@@ -1087,27 +1087,27 @@ V = new WeakSet(), Le = function() {
1087
1087
  if (this.elements = t.state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1088
1088
  for (const [o, a] of Object.entries(this.options.on))
1089
1089
  this.__events__[o] = [a];
1090
- u(this, kt, wi).call(this);
1090
+ d(this, kt, wi).call(this);
1091
1091
  }, kt = new WeakSet(), wi = function() {
1092
1092
  const { elements: i, options: t } = this;
1093
1093
  i.forEach((e) => {
1094
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = u(this, Ht, Ei).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), je(e.video.params) && !$s(e.video.params) && (e.setAttribute("video4-active", "on"), u(this, Ct, Ti).call(this, e)), je(e.video.params) || Ne("video4", "無法取得影片 ID");
1094
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Ht, Ei).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), je(e.video.params) && !$s(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Ct, Ti).call(this, e)), je(e.video.params) || Ne("video4", "無法取得影片 ID");
1095
1095
  }), this.emit("init");
1096
1096
  }, Ct = new WeakSet(), Ti = function(i) {
1097
- const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: d } = e;
1097
+ const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u } = e;
1098
1098
  if (l === "onBox") {
1099
1099
  let h = null;
1100
- if (d === "on") {
1100
+ if (u === "on") {
1101
1101
  i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(w.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), y("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1102
1102
  const m = s.querySelector("img");
1103
1103
  m.insertAdjacentHTML(w.after, t[o]);
1104
1104
  const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1105
1105
  !f && r == "youtube" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !f && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : y("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1106
1106
  }
1107
- c == "off" ? h = s : (h = s.querySelector(c) ?? s, s.querySelector(c) || y("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), h.video || (h.video = {}, h.video.params = e), h.video.eventHandler = u(this, K, Ae), h.addEventListener("click", h.video.eventHandler);
1107
+ c == "off" ? h = s : (h = s.querySelector(c) ?? s, s.querySelector(c) || y("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), h.video || (h.video = {}, h.video.params = e), h.video.eventHandler = d(this, K, Ae), h.addEventListener("click", h.video.eventHandler);
1108
1108
  } else if (l === "onPage") {
1109
1109
  let h = null;
1110
- if (d == "on") {
1110
+ if (u == "on") {
1111
1111
  i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(w.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), y("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1112
1112
  const m = s.querySelector("img");
1113
1113
  m.insertAdjacentHTML(w.after, t[o]);
@@ -1117,7 +1117,7 @@ V = new WeakSet(), Le = function() {
1117
1117
  s.innerHTML = ye(e);
1118
1118
  return;
1119
1119
  }
1120
- h.video || (h.video = {}, h.video.params = e), h.video.eventHandler = u(this, K, Ae), h.addEventListener("click", h.video.eventHandler);
1120
+ h.video || (h.video = {}, h.video.params = e), h.video.eventHandler = d(this, K, Ae), h.addEventListener("click", h.video.eventHandler);
1121
1121
  }
1122
1122
  }, K = new WeakSet(), Ae = function(i) {
1123
1123
  const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a, videoTargetRoute: r } = t.params, l = new Xe({ callback_loaded: (c) => {
@@ -1127,18 +1127,18 @@ V = new WeakSet(), Le = function() {
1127
1127
  target: a,
1128
1128
  route: r,
1129
1129
  on: {
1130
- complete(d) {
1131
- d.querySelector(".modal-content").insertAdjacentHTML("beforeend", ye(t.params));
1130
+ complete(u) {
1131
+ u.querySelector(".modal-content").insertAdjacentHTML("beforeend", ye(t.params));
1132
1132
  },
1133
- open(d) {
1134
- const h = d.querySelectorAll("[data-overlayscrollbars-viewport]");
1133
+ open(u) {
1134
+ const h = u.querySelectorAll("[data-overlayscrollbars-viewport]");
1135
1135
  l.update(), bi([...h]);
1136
1136
  },
1137
- close(d) {
1138
- const h = d.querySelectorAll("[data-overlayscrollbars-viewport]");
1137
+ close(u) {
1138
+ const h = u.querySelectorAll("[data-overlayscrollbars-viewport]");
1139
1139
  yi([...h]);
1140
1140
  },
1141
- destroy(d) {
1141
+ destroy(u) {
1142
1142
  }
1143
1143
  }
1144
1144
  };
@@ -1992,17 +1992,18 @@ const qe = {
1992
1992
  ]
1993
1993
  }
1994
1994
  }, Cs = (n) => {
1995
- const { TEMPLATE: i } = He, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("custom-template");
1995
+ const { TEMPLATE: i } = He, { 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");
1996
1996
  e.innerHTML = i(
1997
1997
  s,
1998
1998
  o,
1999
+ r,
1999
2000
  a
2000
2001
  );
2001
- const r = e.querySelector(".dropdown-list");
2002
- return [...t].forEach((l) => {
2003
- l.tagName === "LI" && (l.classList.contains("has-sublayer") ? [...l.querySelectorAll("li")].forEach((d) => {
2004
- (!d.hasAttribute("data-option") || d.getAttribute("data-option").trim() === "") && d.setAttribute("data-option", d.textContent.trim());
2005
- }) : (!l.hasAttribute("data-option") || l.getAttribute("data-option").trim() === "") && l.setAttribute("data-option", l.textContent.trim())), r.append(l);
2002
+ const l = e.querySelector(".dropdown-list");
2003
+ return [...t].forEach((c) => {
2004
+ c.tagName === "LI" && (c.classList.contains("has-sublayer") ? [...c.querySelectorAll("li")].forEach((h) => {
2005
+ (!h.hasAttribute("data-option") || h.getAttribute("data-option").trim() === "") && h.setAttribute("data-option", h.textContent.trim());
2006
+ }) : (!c.hasAttribute("data-option") || c.getAttribute("data-option").trim() === "") && c.setAttribute("data-option", c.textContent.trim())), l.append(c);
2006
2007
  }), e.children[0];
2007
2008
  }, Hs = (n) => {
2008
2009
  var t;
@@ -2051,8 +2052,8 @@ const qe = {
2051
2052
  });
2052
2053
  const o = n.querySelectorAll(".dropdown-list li.active");
2053
2054
  o.length <= 0 ? n.s.selectDisplayEl.textContent = t.trim() : (n.s.selectDisplayEl.textContent = "", o.forEach((r) => {
2054
- const l = r.getAttribute("data-option"), c = r.textContent.trim(), d = `<div class="option-btn" data-option="${l}"><div class="text">${c}</div><div class="remove-icon"></div></div>`;
2055
- n.s.selectDisplayEl.insertAdjacentHTML(w.append, d);
2055
+ const l = r.getAttribute("data-option"), c = r.textContent.trim(), u = `<div class="option-btn" data-option="${l}"><div class="text">${c}</div><div class="remove-icon"></div></div>`;
2056
+ n.s.selectDisplayEl.insertAdjacentHTML(w.append, u);
2056
2057
  })), n.s.activeLi = o, n.s.value = [...o].map((r) => ({
2057
2058
  index: [...e].indexOf(r),
2058
2059
  id: r.getAttribute("data-option"),
@@ -2123,11 +2124,11 @@ class Ai extends HTMLElement {
2123
2124
  break;
2124
2125
  case "multiple":
2125
2126
  const l = [];
2126
- o.querySelector(".dropdown-list li").classList.remove("active"), s.split(",").forEach((d) => {
2127
- const h = o.querySelector(`.dropdown-list li[data-option="${d}"]`);
2127
+ o.querySelector(".dropdown-list li").classList.remove("active"), s.split(",").forEach((u) => {
2128
+ const h = o.querySelector(`.dropdown-list li[data-option="${u}"]`);
2128
2129
  b(h) && (h.classList.add("active"), l.push(h));
2129
2130
  });
2130
- const c = l.map((d) => [...o.s.allLi].indexOf(d));
2131
+ const c = l.map((u) => [...o.s.allLi].indexOf(u));
2131
2132
  $(o, c);
2132
2133
  break;
2133
2134
  }
@@ -2144,10 +2145,10 @@ class Ai extends HTMLElement {
2144
2145
  }
2145
2146
  connectedCallback() {
2146
2147
  const t = this;
2147
- t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, u(this, Mt, Si).call(this));
2148
+ t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, Mt, Si).call(this));
2148
2149
  }
2149
2150
  open() {
2150
- const t = this, e = t.querySelector(".dropdown-scroller").clientHeight, s = t.classList.contains("filter"), o = () => s ? t.querySelector(".filter-bar").clientHeight + e : e;
2151
+ const t = this, e = t.querySelector(".dropdown-scroller").clientHeight, s = t.classList.contains("filter"), o = () => s ? t.querySelector(".dropdown-scroller .filter-bar") ? e : t.querySelector(".filter-bar").clientHeight + e : e;
2151
2152
  return Li(), t.setAttribute("d4-status", "open"), t.setAttribute("d4-default-height", o()), t.style.cssText = `--maxHeight: ${o()}px;`, t.s.dropdownEl.style.cssText = `
2152
2153
  height: ${o()}px;
2153
2154
  z-index: 2;
@@ -2171,9 +2172,9 @@ class Ai extends HTMLElement {
2171
2172
  }
2172
2173
  }
2173
2174
  Mt = new WeakSet(), Si = function() {
2174
- this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), u(this, qt, Di).call(this);
2175
+ this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, qt, Di).call(this);
2175
2176
  }, qt = new WeakSet(), Di = function() {
2176
- this.s.childDom = this.childNodes, this.s.template = Cs(this), this.innerHTML = "", this.append(this.s.template), u(this, It, _i).call(this);
2177
+ this.s.childDom = this.childNodes, this.s.template = Cs(this), this.innerHTML = "", this.append(this.s.template), d(this, It, _i).call(this);
2177
2178
  }, It = new WeakSet(), _i = function() {
2178
2179
  var s;
2179
2180
  const t = this;
@@ -2187,8 +2188,8 @@ Mt = new WeakSet(), Si = function() {
2187
2188
  if (r && l) {
2188
2189
  const c = r.getAttribute("d4-value");
2189
2190
  if (qs(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2190
- const d = e.split(",")[1];
2191
- o = t.querySelector(`.dropdown-list li[data-option="${d}"]`), t.setAttribute("d4-value", d);
2191
+ const u = e.split(",")[1];
2192
+ o = t.querySelector(`.dropdown-list li[data-option="${u}"]`), t.setAttribute("d4-value", u);
2192
2193
  }
2193
2194
  }
2194
2195
  } else
@@ -2219,7 +2220,7 @@ Mt = new WeakSet(), Si = function() {
2219
2220
  };
2220
2221
  break;
2221
2222
  }
2222
- $(t, t.s.value.index), u(s = t, Ot, xi).call(s), t.classList.add("d4-initialize");
2223
+ $(t, t.s.value.index), d(s = t, Ot, xi).call(s), t.classList.add("d4-initialize");
2223
2224
  }, Ot = new WeakSet(), xi = function() {
2224
2225
  const t = this;
2225
2226
  t.__events__.dropdownToggle = () => {
@@ -2243,7 +2244,7 @@ Mt = new WeakSet(), Si = function() {
2243
2244
  if (t.__scroller__) {
2244
2245
  const { viewport: c } = t.__scroller__.elements();
2245
2246
  if (b(t.s.activeLi)) {
2246
- const d = t.s.activeLi.clientHeight / 2, h = t.s.activeLi.offsetTop, m = h - r.clientHeight / 2 + d > 0 ? h - r.clientHeight / 2 + d : 0;
2247
+ const u = t.s.activeLi.clientHeight / 2, h = t.s.activeLi.offsetTop, m = h - r.clientHeight / 2 + u > 0 ? h - r.clientHeight / 2 + u : 0;
2247
2248
  c.scrollTo({
2248
2249
  top: m,
2249
2250
  behavior: "smooth"
@@ -2277,15 +2278,15 @@ Mt = new WeakSet(), Si = function() {
2277
2278
  e.s.allLi = e.querySelectorAll(".dropdown-list li"), e.s.allLi.forEach((l) => {
2278
2279
  l.addEventListener("click", function(c) {
2279
2280
  var f;
2280
- const d = this, h = [...e.s.allLi].indexOf(d), m = parseInt(e.getAttribute("d4-default-height"));
2281
- if (d.classList.contains("has-sublayer")) {
2281
+ const u = this, h = [...e.s.allLi].indexOf(u), m = parseInt(e.getAttribute("d4-default-height"));
2282
+ if (u.classList.contains("has-sublayer")) {
2282
2283
  c.stopPropagation();
2283
- const v = d.querySelector(".sub-dropdown"), C = v.querySelector(".sub-dropdown-list"), L = parseInt(getComputedStyle(C).marginTop) + parseInt(getComputedStyle(C).marginBottom);
2284
+ const v = u.querySelector(".sub-dropdown"), C = v.querySelector(".sub-dropdown-list"), L = parseInt(getComputedStyle(C).marginTop) + parseInt(getComputedStyle(C).marginBottom);
2284
2285
  v.style.cssText = `--height: ${C.offsetHeight + L}px`;
2285
2286
  const H = parseInt(v.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), A = () => {
2286
2287
  s = m + e.s.subDropdownTotalH, o = s > G ? G : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2287
2288
  };
2288
- d.classList.contains("open") ? (d.classList.remove("open"), e.s.subDropdownTotalH -= H, A()) : (d.classList.add("open"), e.s.subDropdownTotalH += H, A());
2289
+ u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= H, A()) : (u.classList.add("open"), e.s.subDropdownTotalH += H, A());
2289
2290
  const X = () => {
2290
2291
  e.__scroller__.update(!0), v.removeEventListener("transitionend", X);
2291
2292
  };
@@ -2293,17 +2294,17 @@ Mt = new WeakSet(), Si = function() {
2293
2294
  } else
2294
2295
  switch (Hs(e), e.s.selectType) {
2295
2296
  case "single":
2296
- if (e.setAttribute("d4-value", d.getAttribute("data-option")), r) {
2297
+ if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2297
2298
  const v = e.s.cityLang, C = l.textContent.trim(), L = document.getElementById(e.getAttribute("dist-select"));
2298
2299
  L && (L.querySelector(".dropdown-list").textContent = "", $(L, -1), qe[v][C].forEach((H, G) => {
2299
2300
  const A = document.createElement("li");
2300
2301
  A.textContent = H[0], A.setAttribute("data-option", H[0]), L.querySelector(".dropdown-list").append(A);
2301
2302
  }), e.__events__.selectOption(L));
2302
2303
  }
2303
- (f = d.parentNode.closest("li")) != null && f.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2304
+ (f = u.parentNode.closest("li")) != null && f.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2304
2305
  break;
2305
2306
  case "multiple":
2306
- c.stopPropagation(), d.classList.toggle("active"), $(e, h);
2307
+ c.stopPropagation(), u.classList.toggle("active"), $(e, h);
2307
2308
  break;
2308
2309
  }
2309
2310
  });
@@ -2452,7 +2453,7 @@ class Ps extends HTMLElement {
2452
2453
  attributeChangedCallback(t, e, s) {
2453
2454
  }
2454
2455
  connectedCallback() {
2455
- this.initialize || (this.initialize = !0, u(this, Nt, $i).call(this));
2456
+ this.initialize || (this.initialize = !0, d(this, Nt, $i).call(this));
2456
2457
  }
2457
2458
  play() {
2458
2459
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -2478,7 +2479,7 @@ Nt = new WeakSet(), $i = function() {
2478
2479
  // true / false
2479
2480
  gap: Number(this.getAttribute("gap")) || x.SETTINGS.gap
2480
2481
  };
2481
- this.s = {}, this.s.options = t, this.s.nowDuration = ze(this), Os(this), u(this, Pt, ki).call(this);
2482
+ this.s = {}, this.s.options = t, this.s.nowDuration = ze(this), Os(this), d(this, Pt, ki).call(this);
2482
2483
  }, Pt = new WeakSet(), ki = function() {
2483
2484
  const { direction: t, continual: e, gap: s } = this.s.options;
2484
2485
  switch (t) {
@@ -2491,11 +2492,11 @@ Nt = new WeakSet(), $i = function() {
2491
2492
  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;`;
2492
2493
  break;
2493
2494
  }
2494
- u(this, jt, Ci).call(this), u(this, zt, Hi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2495
+ d(this, jt, Ci).call(this), d(this, zt, Hi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2495
2496
  }, jt = new WeakSet(), Ci = function() {
2496
2497
  const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
2497
2498
  let c;
2498
- function d() {
2499
+ function u() {
2499
2500
  switch (s) {
2500
2501
  case "normal":
2501
2502
  t.s.animateEl.style.transform = `${D(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(D(t).animate1, {
@@ -2549,7 +2550,7 @@ Nt = new WeakSet(), $i = function() {
2549
2550
  }
2550
2551
  clearTimeout(c), c = setTimeout(
2551
2552
  () => {
2552
- d();
2553
+ u();
2553
2554
  },
2554
2555
  a || 0
2555
2556
  ), t.addEventListener("mouseenter", function() {
@@ -2573,10 +2574,10 @@ Nt = new WeakSet(), $i = function() {
2573
2574
  window.addEventListener("resize", Ns(e));
2574
2575
  };
2575
2576
  customElements.define("marquee-el", Ps);
2576
- const ht = function(n) {
2577
- let i;
2578
- return function(t) {
2579
- i && clearTimeout(i), i = setTimeout(n, 200, t);
2577
+ const ht = function(n, i) {
2578
+ let t;
2579
+ return function(e) {
2580
+ t && clearTimeout(t), t = setTimeout(n, 200, e);
2580
2581
  };
2581
2582
  }, _ = (n, i) => {
2582
2583
  if (rt(n)) {
@@ -2610,7 +2611,7 @@ class We {
2610
2611
  p(this, W);
2611
2612
  // 選項事件綁定
2612
2613
  p(this, Xt);
2613
- this.$element = i, this.option = i.s.option.drag, u(this, Wt, Mi).call(this);
2614
+ this.$element = i, this.option = i.s.option.drag, d(this, Wt, Mi).call(this);
2614
2615
  }
2615
2616
  // 更新 active 位置
2616
2617
  update(i) {
@@ -2631,10 +2632,10 @@ Wt = new WeakSet(), Mi = function() {
2631
2632
  return;
2632
2633
  i.$container = i.$element.querySelector(".drag-container"), i.$wrapper = i.$container.querySelector(".wrapper");
2633
2634
  const t = () => {
2634
- var c, d;
2635
- u(c = i, tt, Se).call(c), u(d = i, W, dt).call(d);
2635
+ var c, u;
2636
+ d(c = i, tt, Se).call(c), d(u = i, W, dt).call(u);
2636
2637
  };
2637
- i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", ht(t)), window.addEventListener("resize", ht(t)), (i.option.draggable || i.$element.s.type == "collapse") && u(e = i, Gt, Ii).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2638
+ i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", ht(t)), window.addEventListener("resize", ht(t)), (i.option.draggable || i.$element.s.type == "collapse") && d(e = i, Gt, Ii).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2638
2639
  w.prepend,
2639
2640
  `<div class="navigation">
2640
2641
  <div class="button prev">
@@ -2644,7 +2645,7 @@ Wt = new WeakSet(), Mi = function() {
2644
2645
  <div></div>
2645
2646
  </div>
2646
2647
  </div>`
2647
- ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), u(o = i, Bt, qi).call(o)), u(a = i, tt, Se).call(a), u(r = i, W, dt).call(r), u(l = i, Xt, Oi).call(l);
2648
+ ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Bt, qi).call(o)), d(a = i, tt, Se).call(a), d(r = i, W, dt).call(r), d(l = i, Xt, Oi).call(l), i.update();
2648
2649
  }, Bt = new WeakSet(), qi = function() {
2649
2650
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2650
2651
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
@@ -2653,7 +2654,7 @@ Wt = new WeakSet(), Mi = function() {
2653
2654
  behavior: "smooth"
2654
2655
  }), setTimeout(() => {
2655
2656
  var r;
2656
- u(r = i, W, dt).call(r);
2657
+ d(r = i, W, dt).call(r);
2657
2658
  }, 100);
2658
2659
  };
2659
2660
  e.forEach((o) => {
@@ -2683,11 +2684,11 @@ Wt = new WeakSet(), Mi = function() {
2683
2684
  });
2684
2685
  };
2685
2686
  i.removeEventListener("mousemove", c), i.addEventListener("mousemove", c);
2686
- const d = function(h) {
2687
+ const u = function(h) {
2687
2688
  e && (h.preventDefault(), h.stopPropagation());
2688
2689
  };
2689
2690
  i.querySelectorAll("a").forEach((h) => {
2690
- h.removeEventListener("click", d), h.addEventListener("click", d);
2691
+ h.removeEventListener("click", u), h.addEventListener("click", u);
2691
2692
  });
2692
2693
  }, tt = new WeakSet(), Se = function() {
2693
2694
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = t.scrollLeft;
@@ -2697,7 +2698,7 @@ Wt = new WeakSet(), Mi = function() {
2697
2698
  if (!t)
2698
2699
  return;
2699
2700
  const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
2700
- if (s <= 0) {
2701
+ if (console.log(s, i.scrollWidth, i.clientWidth), s <= 0) {
2701
2702
  _(t, "hide"), S(t, "active"), _(e, "noScrollable");
2702
2703
  return;
2703
2704
  }
@@ -2739,11 +2740,11 @@ class js {
2739
2740
  p(this, Yt);
2740
2741
  // 選項事件綁定
2741
2742
  p(this, Ut);
2742
- this.$element = i, this.option = i.s.option.collapse, u(this, Rt, Ni).call(this);
2743
+ this.$element = i, this.option = i.s.option.collapse, d(this, Rt, Ni).call(this);
2743
2744
  }
2744
2745
  }
2745
2746
  Rt = new WeakSet(), Ni = function() {
2746
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), u(this, Ft, Pi).call(this) && u(this, Yt, ji).call(this), u(this, Ut, zi).call(this));
2747
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Ft, Pi).call(this) && d(this, Yt, ji).call(this), d(this, Ut, zi).call(this));
2747
2748
  }, Ft = new WeakSet(), Pi = function() {
2748
2749
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2749
2750
  return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(w.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), !0) : !1;
@@ -2791,7 +2792,7 @@ class Ws extends HTMLElement {
2791
2792
  case "m4-type":
2792
2793
  if (e === null || e === s)
2793
2794
  return;
2794
- this.s.type = s, u(this, B, ut).call(this);
2795
+ this.s.type = s, d(this, B, ut).call(this);
2795
2796
  break;
2796
2797
  case "m4-status":
2797
2798
  if (e === s)
@@ -2808,10 +2809,10 @@ class Ws extends HTMLElement {
2808
2809
  }
2809
2810
  }
2810
2811
  connectedCallback() {
2811
- this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, u(this, Jt, Wi).call(this));
2812
+ this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, Jt, Wi).call(this));
2812
2813
  }
2813
2814
  update() {
2814
- u(this, et, De).call(this);
2815
+ d(this, et, De).call(this);
2815
2816
  }
2816
2817
  }
2817
2818
  Jt = new WeakSet(), Wi = function() {
@@ -2825,18 +2826,18 @@ Jt = new WeakSet(), Wi = function() {
2825
2826
  }
2826
2827
  this.update();
2827
2828
  };
2828
- window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, k.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, k.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, k.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, k.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), u(this, Zt, Bi).call(this);
2829
+ window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, k.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, k.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, k.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, k.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Zt, Bi).call(this);
2829
2830
  }, Zt = new WeakSet(), Bi = function() {
2830
- this.classList.add("m4-init"), u(this, et, De).call(this);
2831
+ this.classList.add("m4-init"), d(this, et, De).call(this);
2831
2832
  }, et = new WeakSet(), De = function() {
2832
2833
  const t = Object.keys(this.s.option.breakpoint);
2833
2834
  if (!t.length) {
2834
- u(this, B, ut).call(this);
2835
+ d(this, B, ut).call(this);
2835
2836
  return;
2836
2837
  }
2837
2838
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
2838
2839
  var s, o, a, r;
2839
- 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)), u(this, B, ut).call(this), window.innerWidth >= e;
2840
+ return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, B, ut).call(this), window.innerWidth >= e;
2840
2841
  });
2841
2842
  }, B = new WeakSet(), ut = function() {
2842
2843
  var o;
@@ -2847,10 +2848,14 @@ Jt = new WeakSet(), Wi = function() {
2847
2848
  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")}"]`);
2848
2849
  switch (e == null || e.classList.add("active"), s == null || s.classList.add("active"), t) {
2849
2850
  case "drag":
2850
- this.constructor.drag = new We(this);
2851
+ setTimeout(() => {
2852
+ this.constructor.drag = new We(this);
2853
+ }, 10);
2851
2854
  break;
2852
2855
  case "collapse":
2853
- this.constructor.drag = new We(this), this.constructor.collapse = new js(this);
2856
+ setTimeout(() => {
2857
+ this.constructor.drag = new We(this), this.constructor.collapse = new js(this);
2858
+ }, 10);
2854
2859
  break;
2855
2860
  }
2856
2861
  (o = this.constructor.drag) == null || o.update(this);
@@ -2899,41 +2904,41 @@ class Gi extends HTMLElement {
2899
2904
  return ["t4-active"];
2900
2905
  }
2901
2906
  attributeChangedCallback(t, e, s) {
2902
- t === "t4-active" && e !== s && u(this, de, ss).call(this, s);
2907
+ t === "t4-active" && e !== s && d(this, de, ss).call(this, s);
2903
2908
  }
2904
2909
  connectedCallback() {
2905
- this.classList.contains("t4-initialize") || u(this, Qt, Xi).call(this);
2910
+ this.classList.contains("t4-initialize") || d(this, Qt, Xi).call(this);
2906
2911
  }
2907
2912
  // ------------- 我是分隔線呦 -------------
2908
2913
  // 頁籤切換
2909
2914
  tabClick(t) {
2910
2915
  const { t: e } = this, s = e.tabs.indexOf(t) % e.tabPanels.length, o = e.tabGroup === "true" ? String(s) : t.getAttribute("t4-id");
2911
2916
  this.setActiveTab(o), setTimeout(() => {
2912
- u(this, q, z).call(this, "eventAnchor");
2917
+ d(this, q, z).call(this, "eventAnchor");
2913
2918
  }, e.transition.duration);
2914
2919
  }
2915
2920
  // 外部呼叫方法 $0.setActiveTab(0)
2916
2921
  setActiveTab(t) {
2917
2922
  const { t: e } = this, s = t === "" ? e.tabPanels[0].getAttribute("t4-id") : t;
2918
2923
  e.activeTab = s, this.setAttribute("t4-active", s);
2919
- const o = u(this, P, F).call(this, s);
2924
+ const o = d(this, P, F).call(this, s);
2920
2925
  e.tabPanels.forEach((a, r) => {
2921
- r === o ? u(this, ce, is).call(this, r) : u(this, le, es).call(this, r);
2926
+ r === o ? d(this, ce, is).call(this, r) : d(this, le, es).call(this, r);
2922
2927
  });
2923
2928
  }
2924
2929
  // 外部呼叫方法 $0.goNext()
2925
2930
  goNext() {
2926
- const t = u(this, P, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2931
+ const t = d(this, P, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2927
2932
  this.setActiveTab(s);
2928
2933
  }
2929
2934
  // 外部呼叫方法 $0.goPrev()
2930
2935
  goPrev() {
2931
- const t = u(this, P, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2936
+ const t = d(this, P, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2932
2937
  this.setActiveTab(s);
2933
2938
  }
2934
2939
  // 外部呼叫方法 $0.update()
2935
2940
  update() {
2936
- this.t.tabs = u(this, it, _e).call(this), os(), console.log("tab update!!!!");
2941
+ this.t.tabs = d(this, it, _e).call(this), os(), console.log("tab update!!!!");
2937
2942
  }
2938
2943
  }
2939
2944
  Qt = new WeakSet(), Xi = function() {
@@ -2956,13 +2961,13 @@ Qt = new WeakSet(), Xi = function() {
2956
2961
  delay: this.getAttribute("t4-delay") || e.transition.delay
2957
2962
  },
2958
2963
  tabGroup: this.getAttribute("t4-group") || e.tabGroup
2959
- }, this.__events__ = {}, this.t.tabs = u(this, it, _e).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), u(this, Vt, Ri).call(this);
2964
+ }, this.__events__ = {}, this.t.tabs = d(this, it, _e).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, Vt, Ri).call(this);
2960
2965
  }, Vt = new WeakSet(), Ri = function() {
2961
- if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && u(this, Kt, Fi).call(this), this.t.recordUrl) {
2966
+ if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, Kt, Fi).call(this), this.t.recordUrl) {
2962
2967
  const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
2963
2968
  e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
2964
2969
  }
2965
- this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), u(this, ue, ns).call(this);
2970
+ this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, ue, ns).call(this);
2966
2971
  }, it = new WeakSet(), _e = function() {
2967
2972
  const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
2968
2973
  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) => {
@@ -2979,7 +2984,7 @@ Qt = new WeakSet(), Xi = function() {
2979
2984
  const e = document.createElement("div");
2980
2985
  e.classList.add("swiper-wrapper"), this.t.tabPanels.forEach((s) => {
2981
2986
  e.appendChild(s.cloneNode(!0));
2982
- }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), u(this, te, Yi).call(this);
2987
+ }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, te, Yi).call(this);
2983
2988
  }, te = new WeakSet(), Yi = function() {
2984
2989
  const t = this.querySelector(".swiper-container"), e = this.querySelector(".swiper-wrapper"), s = this.t.tabPanels;
2985
2990
  t.style.overflow = "hidden", e.style.display = "flex";
@@ -2995,7 +3000,7 @@ Qt = new WeakSet(), Xi = function() {
2995
3000
  }
2996
3001
  }, ie = new WeakSet(), Ji = function() {
2997
3002
  const t = parseInt(this.t.gap, 10), e = window.pageYOffset, o = this.getBoundingClientRect().top + e - t;
2998
- u(this, se, Zi).call(this, o);
3003
+ d(this, se, Zi).call(this, o);
2999
3004
  }, se = new WeakSet(), Zi = function(t) {
3000
3005
  window.scrollTo({
3001
3006
  top: t,
@@ -3023,19 +3028,19 @@ Qt = new WeakSet(), Xi = function() {
3023
3028
  }, q = new WeakSet(), z = function(t, e, s) {
3024
3029
  switch (t) {
3025
3030
  case "step":
3026
- ve(this.t.step) && u(this, ne, Qi).call(this, e);
3031
+ ve(this.t.step) && d(this, ne, Qi).call(this, e);
3027
3032
  break;
3028
3033
  case "eventAnchor":
3029
- this.t.anchor && u(this, ie, Ji).call(this);
3034
+ this.t.anchor && d(this, ie, Ji).call(this);
3030
3035
  break;
3031
3036
  case "tabState":
3032
- this.t.type == "normal" && u(this, re, ts).call(this, e, s);
3037
+ this.t.type == "normal" && d(this, re, ts).call(this, e, s);
3033
3038
  break;
3034
3039
  case "btnState":
3035
- u(this, oe, Vi).call(this, e), u(this, ae, Ki).call(this, e);
3040
+ d(this, oe, Vi).call(this, e), d(this, ae, Ki).call(this, e);
3036
3041
  break;
3037
3042
  case "tabUrl":
3038
- this.t.recordUrl === "true" && u(this, ee, Ui).call(this, e);
3043
+ this.t.recordUrl === "true" && d(this, ee, Ui).call(this, e);
3039
3044
  break;
3040
3045
  default:
3041
3046
  console.warn("請增加判斷,謝謝");
@@ -3076,7 +3081,7 @@ Qt = new WeakSet(), Xi = function() {
3076
3081
  break;
3077
3082
  case "swiper":
3078
3083
  a.style.opacity = "1";
3079
- const c = this.querySelector(".swiper-wrapper"), d = this.t.tabPanels[0].offsetWidth, h = -t * d;
3084
+ const c = this.querySelector(".swiper-wrapper"), u = this.t.tabPanels[0].offsetWidth, h = -t * u;
3080
3085
  c.style.transition = `transform ${e}ms ${s} ${o}ms`, c.style.transform = `translateX(${h}px)`;
3081
3086
  break;
3082
3087
  default:
@@ -3084,8 +3089,8 @@ Qt = new WeakSet(), Xi = function() {
3084
3089
  break;
3085
3090
  }
3086
3091
  }, de = new WeakSet(), ss = function(t) {
3087
- const e = u(this, P, F).call(this, t);
3088
- u(this, q, z).call(this, "step", e), u(this, q, z).call(this, "btnState", e), u(this, q, z).call(this, "tabState", e, t), u(this, q, z).call(this, "tabUrl", t), this.emit("change");
3092
+ const e = d(this, P, F).call(this, t);
3093
+ d(this, q, z).call(this, "step", e), d(this, q, z).call(this, "btnState", e), d(this, q, z).call(this, "tabState", e, t), d(this, q, z).call(this, "tabUrl", t), this.emit("change");
3089
3094
  }, ue = new WeakSet(), ns = function() {
3090
3095
  const t = this;
3091
3096
  window.addEventListener(
@@ -3151,10 +3156,10 @@ class Xs {
3151
3156
  !at(i) && !ve(i) && !rt(i) && !b(i) || (this.__storage__ = {
3152
3157
  el: i,
3153
3158
  options: t
3154
- }, this.active = "data-collapse-active", u(this, st, xe).call(this));
3159
+ }, this.active = "data-collapse-active", d(this, st, xe).call(this));
3155
3160
  }
3156
3161
  update() {
3157
- u(this, st, xe).call(this);
3162
+ d(this, st, xe).call(this);
3158
3163
  }
3159
3164
  }
3160
3165
  st = new WeakSet(), xe = function() {
@@ -3162,19 +3167,19 @@ st = new WeakSet(), xe = function() {
3162
3167
  if (this.elements = t.state == "not active" ? E(i + `:not([${this.active}])`) : E(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3163
3168
  for (const [o, a] of Object.entries(this.options.on))
3164
3169
  this.__events__[o] = [a];
3165
- u(this, he, as).call(this);
3170
+ d(this, he, as).call(this);
3166
3171
  }, he = new WeakSet(), as = function() {
3167
3172
  const { elements: i, options: t } = this;
3168
3173
  i.forEach((e) => {
3169
- e.collapse = {}, e.collapse.instance = this, e.collapse.defaultOptions = t, e.collapse.methods = {}, e.collapse.methods.update = this.update, e.setAttribute(this.active, ""), u(this, pe, rs).call(this, e);
3174
+ 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, pe, rs).call(this, e);
3170
3175
  }), this.emit("init");
3171
3176
  }, pe = new WeakSet(), rs = function(i) {
3172
- const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, d = c.querySelector(o);
3173
- if (c.collapse.height = d.children[0].offsetHeight, a ? (d.style.height = `${d.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), d.style.height = "0px", d.style.overflow = "hidden") : (d.style.height = `${d.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", u(this, nt, $e)), c.addEventListener("click", u(this, nt, $e)), r) {
3177
+ const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3178
+ if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, $e)), c.addEventListener("click", d(this, nt, $e)), r) {
3174
3179
  const h = (m) => {
3175
3180
  m.stopPropagation();
3176
3181
  };
3177
- d.removeEventListener("click", h), d.addEventListener("click", h);
3182
+ u.removeEventListener("click", h), u.addEventListener("click", h);
3178
3183
  }
3179
3184
  }, nt = new WeakSet(), $e = function() {
3180
3185
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
@@ -3208,10 +3213,10 @@ class Fs extends HTMLElement {
3208
3213
  }
3209
3214
  connectedCallback() {
3210
3215
  const t = this;
3211
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, u(this, ot, ke).call(this));
3216
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ot, ke).call(this));
3212
3217
  }
3213
3218
  update() {
3214
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), u(this, ot, ke).call(this);
3219
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ot, ke).call(this);
3215
3220
  }
3216
3221
  }
3217
3222
  ot = new WeakSet(), ke = function() {
@@ -3229,9 +3234,9 @@ ot = new WeakSet(), ke = function() {
3229
3234
  hover: this.getAttribute("r4-hover") ? e(this.getAttribute("r4-hover")) : t.hover,
3230
3235
  click: this.getAttribute("r4-hover-click") ? e(this.getAttribute("r4-hover-click")) : t.click
3231
3236
  };
3232
- this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), u(this, me, cs).call(this);
3237
+ this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, me, cs).call(this);
3233
3238
  }, me = new WeakSet(), cs = function() {
3234
- u(this, ge, ds).call(this), u(this, fe, us).call(this), this.classList.add("r4-initialize");
3239
+ d(this, ge, ds).call(this), d(this, fe, us).call(this), this.classList.add("r4-initialize");
3235
3240
  }, ge = new WeakSet(), ds = function() {
3236
3241
  const t = this, e = document.createElement("i");
3237
3242
  e.classList.add("hover-ball"), e.style.transitionDuration = `${t.s.options.speed}ms`, t.appendChild(e);
@@ -3243,7 +3248,7 @@ ot = new WeakSet(), ke = function() {
3243
3248
  let s = "ontouchstart" in document.documentElement ? "touchstart" : "mouseenter", o = "ontouchend" in document.documentElement ? "touchend" : "mouseleave";
3244
3249
  e.addEventListener(s, function(a) {
3245
3250
  if (s === "touchstart" && ls(), e.s.options.hover) {
3246
- const r = Math.round(s === "mouseenter" ? a.clientX - e.getBoundingClientRect().left : a.changedTouches[0].clientX - e.getBoundingClientRect().x), l = Math.round(s === "mouseenter" ? a.clientY - e.getBoundingClientRect().top : a.changedTouches[0].clientY - e.getBoundingClientRect().y), { offsetWidth: c, offsetHeight: d } = e, h = Math.ceil(Math.sqrt(c ** 2 + d ** 2) * 2);
3251
+ const r = Math.round(s === "mouseenter" ? a.clientX - e.getBoundingClientRect().left : a.changedTouches[0].clientX - e.getBoundingClientRect().x), l = Math.round(s === "mouseenter" ? a.clientY - e.getBoundingClientRect().top : a.changedTouches[0].clientY - e.getBoundingClientRect().y), { offsetWidth: c, offsetHeight: u } = e, h = Math.ceil(Math.sqrt(c ** 2 + u ** 2) * 2);
3247
3252
  e.style.setProperty("--r", h), t.style.left = r + "px", t.style.top = l + "px", e.classList.add("entered");
3248
3253
  }
3249
3254
  }), e.addEventListener(o, function(a) {
@@ -3260,12 +3265,12 @@ class Ys {
3260
3265
  }
3261
3266
  init() {
3262
3267
  const i = document.querySelectorAll("*:not([video-id]) > img"), t = (o, a) => {
3263
- const r = document.createElement("div"), l = document.createElement("span"), c = document.createElement("span"), d = Math.sqrt(o ** 2 + a ** 2), h = Math.asin(a / d) * 180 / Math.PI;
3268
+ const r = document.createElement("div"), l = document.createElement("span"), c = document.createElement("span"), u = Math.sqrt(o ** 2 + a ** 2), h = Math.asin(a / u) * 180 / Math.PI;
3264
3269
  return r.className = "no-image", l.className = "slash1", l.style.cssText = `
3265
- width: ${d}px;
3270
+ width: ${u}px;
3266
3271
  transform: rotate(${h}deg);
3267
3272
  `, c.className = "slash2", c.style.cssText = `
3268
- width: ${d}px;
3273
+ width: ${u}px;
3269
3274
  transform: rotate(${-h}deg);
3270
3275
  `, r.appendChild(l), r.appendChild(c), r;
3271
3276
  }, e = document.querySelectorAll(".error-image");
@@ -3275,8 +3280,8 @@ class Ys {
3275
3280
  let a;
3276
3281
  const r = o.parentElement.clientWidth, l = o.parentElement.clientHeight;
3277
3282
  if (o.classList.contains("lazy") || o.classList.contains("swiper-lazy") ? a = o.getAttribute("data-src") : a = o.getAttribute("src"), a === "") {
3278
- const c = document.createElement("div"), d = getComputedStyle(o.parentElement).position;
3279
- c.className = "error-image", d === "static" && (o.parentElement.style.position = "relative"), o.parentElement.appendChild(c), c.style.cssText = `
3283
+ const c = document.createElement("div"), u = getComputedStyle(o.parentElement).position;
3284
+ c.className = "error-image", u === "static" && (o.parentElement.style.position = "relative"), o.parentElement.appendChild(c), c.style.cssText = `
3280
3285
  position: absolute;
3281
3286
  top: 50%;
3282
3287
  left: 50%;
@@ -3290,13 +3295,13 @@ class Ys {
3290
3295
  function s() {
3291
3296
  const o = document.querySelectorAll(".no-image");
3292
3297
  o.length <= 0 || o.forEach((a) => {
3293
- const r = a.parentElement.clientWidth, l = a.parentElement.clientHeight, c = Math.sqrt(r ** 2 + l ** 2), d = Math.asin(l / c) * 180 / Math.PI;
3298
+ const r = a.parentElement.clientWidth, l = a.parentElement.clientHeight, c = Math.sqrt(r ** 2 + l ** 2), u = Math.asin(l / c) * 180 / Math.PI;
3294
3299
  a.querySelector(".slash1").style.cssText = `
3295
3300
  width: ${c}px;
3296
- transform: rotate(${d}deg);
3301
+ transform: rotate(${u}deg);
3297
3302
  `, a.querySelector(".slash2").style.cssText = `
3298
3303
  width: ${c}px;
3299
- transform: rotate(${-d}deg);
3304
+ transform: rotate(${-u}deg);
3300
3305
  `;
3301
3306
  });
3302
3307
  }
@@ -3318,8 +3323,8 @@ function Us(n, i, t, e) {
3318
3323
  if (s.compress) {
3319
3324
  const l = t.name.substring(t.name.lastIndexOf(".")).replace("."), c = t.name.replace(`.${l}`, "");
3320
3325
  e.originalCanvas.toBlob(
3321
- function(d) {
3322
- const h = new File([d], `${c}`, { type: t.type });
3326
+ function(u) {
3327
+ const h = new File([u], `${c}`, { type: t.type });
3323
3328
  uploadImage[`${a}`][r] = {
3324
3329
  file: h,
3325
3330
  info: e
@@ -3336,17 +3341,17 @@ function Us(n, i, t, e) {
3336
3341
  }
3337
3342
  function Js(n, i, t, e) {
3338
3343
  const s = document.createElement("canvas"), o = s.getContext("2d"), a = i.width, l = i.height / a * 100, c = e / t * 100;
3339
- let d = 0, h = 0;
3344
+ let u = 0, h = 0;
3340
3345
  switch (s.width = t, s.height = e, n.previewSize) {
3341
3346
  case "contain":
3342
- l < c ? (d = s.width, h = t * l / 100) : l > c ? (d = e / l * 100, h = s.height) : (d = s.width, h = s.height);
3347
+ l < c ? (u = s.width, h = t * l / 100) : l > c ? (u = e / l * 100, h = s.height) : (u = s.width, h = s.height);
3343
3348
  break;
3344
3349
  case "cover":
3345
- l < c ? (d = e / l * 100, h = s.height) : l > c ? (d = s.width, h = t * l / 100) : l === c && (d = s.width, h = s.height);
3350
+ l < c ? (u = e / l * 100, h = s.height) : l > c ? (u = s.width, h = t * l / 100) : l === c && (u = s.width, h = s.height);
3346
3351
  break;
3347
3352
  }
3348
- const m = (s.width - d) * 0.5, f = (s.height - h) * 0.5;
3349
- return o.drawImage(i, m, f, d, h), s;
3353
+ const m = (s.width - u) * 0.5, f = (s.height - h) * 0.5;
3354
+ return o.drawImage(i, m, f, u, h), s;
3350
3355
  }
3351
3356
  function Zs(n, i) {
3352
3357
  return new Promise((t, e) => {