@xwadex/fesd 0.0.14-re.49 → 0.0.14-re.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ var p = (n, i, t) => {
9
9
  };
10
10
  var d = (n, i, t) => (hs(n, i, "access private method"), t);
11
11
  import { OverlayScrollbars as Ce } from "overlayscrollbars";
12
- import g from "jquery";
12
+ import f from "jquery";
13
13
  import "./vendor-bundle.js";
14
14
  import "validator";
15
15
  import "flatpickr";
@@ -46,7 +46,7 @@ const Y = {
46
46
  TEMPLATE() {
47
47
  return '<div class="player-container"><div class="player-wrapper"></div></div>';
48
48
  }
49
- }, gs = {
49
+ }, fs = {
50
50
  SETTINGS: {
51
51
  success: null,
52
52
  text: null,
@@ -128,7 +128,7 @@ const Y = {
128
128
  </div>
129
129
  `;
130
130
  }
131
- }, fs = {
131
+ }, gs = {
132
132
  SETTINGS: {
133
133
  basic_rwd: 900
134
134
  }
@@ -287,14 +287,14 @@ const Y = {
287
287
  __proto__: null,
288
288
  anchor4: lt,
289
289
  aost4: Re,
290
- article4: fs,
290
+ article4: gs,
291
291
  collapse4: Ye,
292
292
  dropdown4: He,
293
293
  marquee4: _,
294
294
  modal4: I,
295
295
  multipurpose4: $,
296
296
  ripple4: Ue,
297
- share4: gs,
297
+ share4: fs,
298
298
  tab4: Fe,
299
299
  video4: Y
300
300
  }, Symbol.toStringTag, { value: "Module" })), w = {
@@ -358,7 +358,7 @@ const Y = {
358
358
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
359
359
  }
360
360
  }, be = (n, i) => {
361
- const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", h = c ? "left" : "top", m = c ? "width" : "height", f = b(e) ? T(e) : document.scrollingElement, v = f[u], k = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, L = b(s) ? T(s).getBoundingClientRect()[m] : 0, C = k - a - L, G = 15;
361
+ const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", h = c ? "left" : "top", m = c ? "width" : "height", g = b(e) ? T(e) : document.scrollingElement, v = g[u], k = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, L = b(s) ? T(s).getBoundingClientRect()[m] : 0, C = k - a - L, G = 15;
362
362
  let A = 0;
363
363
  if (C === 0)
364
364
  return;
@@ -370,7 +370,7 @@ const Y = {
370
370
  const Ie = () => {
371
371
  A += G;
372
372
  const R = ws[r](A, v, C, o);
373
- f[u] = R, A < o && requestAnimationFrame(Ie), A >= o && X("afterScroll");
373
+ g[u] = R, A < o && requestAnimationFrame(Ie), A >= o && X("afterScroll");
374
374
  };
375
375
  requestAnimationFrame(Ie);
376
376
  };
@@ -403,7 +403,7 @@ class Je {
403
403
  }
404
404
  static url(i) {
405
405
  const { SETTINGS: t } = lt, { hashName: e } = i, s = window.location.search || window.location.hash, { searchParams: o } = new URL(window.location), a = document.querySelector(`[data-anchor-id="${e ? o.get(e) : s.split("?").pop()}"]`);
406
- if (console.log("anchor-hashName", e), console.log("anchor-searchParams", o.get(e)), console.log("anchor-targetStr", s.split("?").pop()), console.log("anchor-target", a), !a)
406
+ if (!a)
407
407
  return;
408
408
  const r = Object.assign({}, t, i, { target: a });
409
409
  setTimeout(() => {
@@ -452,12 +452,12 @@ const { MODALS: H } = window, Ts = (n) => {
452
452
  s.append(o);
453
453
  }), e.children[0];
454
454
  };
455
- var gt, Ke, ft, ti, vt, ei, bt, ii, yt, si;
455
+ var ft, Ke, gt, ti, vt, ei, bt, ii, yt, si;
456
456
  class Ve extends HTMLElement {
457
457
  constructor() {
458
458
  super();
459
- p(this, gt);
460
459
  p(this, ft);
460
+ p(this, gt);
461
461
  p(this, vt);
462
462
  p(this, bt);
463
463
  p(this, yt);
@@ -474,7 +474,7 @@ class Ve extends HTMLElement {
474
474
  }
475
475
  }
476
476
  connectedCallback() {
477
- this.initialize || (this.initialize = !0, d(this, gt, Ke).call(this));
477
+ this.initialize || (this.initialize = !0, d(this, ft, Ke).call(this));
478
478
  }
479
479
  open() {
480
480
  return this.setAttribute(":state", "open"), this;
@@ -486,12 +486,12 @@ class Ve extends HTMLElement {
486
486
  return this.setAttribute(":state", "destroy"), this;
487
487
  }
488
488
  }
489
- gt = new WeakSet(), Ke = function() {
489
+ ft = new WeakSet(), Ke = function() {
490
490
  const { ATTRS: t } = I;
491
491
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
492
492
  const e = this.getAttribute(t.id) || vs();
493
- this.getAttribute(t.id) || (y(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), H[e] && y(`the ${t.id} "${e}" is already be used.`), H[e] = this, d(this, ft, ti).call(this);
494
- }, ft = new WeakSet(), ti = function() {
493
+ this.getAttribute(t.id) || (y(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), H[e] && y(`the ${t.id} "${e}" is already be used.`), H[e] = this, d(this, gt, ti).call(this);
494
+ }, gt = new WeakSet(), ti = function() {
495
495
  this.childDom = this.childNodes, this.template = Ts(this), this.innerHTML = "", this.append(this.template), d(this, vt, ei).call(this);
496
496
  }, vt = new WeakSet(), ei = function() {
497
497
  const t = this.querySelector(".modal-scroller");
@@ -667,13 +667,13 @@ customElements.define("modern-modal", Ve);
667
667
  const Ls = (n, i) => {
668
668
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
669
669
  i.forEach((s) => {
670
- 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);
671
- if (h - e <= f && m - e >= v && s.offsetParent)
670
+ const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: h, bottom: m } = s.getBoundingClientRect(), g = t * (r / 100), v = t * (l / 100);
671
+ if (h - e <= g && m - e >= v && s.offsetParent)
672
672
  setTimeout(() => {
673
673
  s.classList.add(o);
674
674
  }, a);
675
675
  else {
676
- const L = s.classList.contains(o) && c === "down" && h - e >= f || c === "up" && m - e <= v || c === !0;
676
+ const L = s.classList.contains(o) && c === "down" && h - e >= g || c === "up" && m - e <= v || c === !0;
677
677
  setTimeout(() => {
678
678
  L && s.classList.remove(o);
679
679
  }, a);
@@ -735,7 +735,7 @@ const Ss = (n) => {
735
735
  s.append(o);
736
736
  }), e.children[0];
737
737
  };
738
- var Lt, ui, At, hi, St, pi, Dt, mi, _t, gi, xt, fi, $t, vi;
738
+ var Lt, ui, At, hi, St, pi, Dt, mi, _t, fi, xt, gi, $t, vi;
739
739
  class Ds extends HTMLElement {
740
740
  constructor() {
741
741
  super();
@@ -806,10 +806,10 @@ Lt = new WeakSet(), ui = function() {
806
806
  case "youkuAPI":
807
807
  break;
808
808
  case "youku":
809
- e = d(this, xt, fi).call(this);
809
+ e = d(this, xt, gi).call(this);
810
810
  break;
811
811
  case "vimeo":
812
- e = d(this, _t, gi).call(this);
812
+ e = d(this, _t, fi).call(this);
813
813
  break;
814
814
  case "bilibili":
815
815
  e = d(this, $t, vi).call(this);
@@ -819,10 +819,10 @@ Lt = new WeakSet(), ui = function() {
819
819
  }, Dt = new WeakSet(), mi = function() {
820
820
  const { videoId: t, autoplay: e } = this;
821
821
  return `<iframe src="https://www.youtube.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}&mute=1&loop=1&enablejsapi=1" frameborder="0" allowfullscreen="0" volumn="0" allow="${e === "on" ? "autoplay;" : ""} encrypted-media; gyroscope; picture-in-picture;"></iframe>`;
822
- }, _t = new WeakSet(), gi = function() {
822
+ }, _t = new WeakSet(), fi = function() {
823
823
  const { videoId: t, autoplay: e, hash: s } = this;
824
824
  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>`;
825
- }, xt = new WeakSet(), fi = function() {
825
+ }, xt = new WeakSet(), gi = function() {
826
826
  const { videoId: t, autoplay: e } = this;
827
827
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
828
828
  }, $t = new WeakSet(), vi = function() {
@@ -842,13 +842,13 @@ function yi(n) {
842
842
  }), ms(i);
843
843
  }
844
844
  function un() {
845
- g("body").append('<div class="loading-wrapper"><div class="icon-box"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><path d="M10 50A40 40 0 0 0 90 50A40 42 0 0 1 10 50" fill="#ffffff" stroke="none"><animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 51;360 50 51"></animateTransform></path></svg></div></div>'), g(".loading-wrapper").fadeIn(300).promise().done(function() {
845
+ f("body").append('<div class="loading-wrapper"><div class="icon-box"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><path d="M10 50A40 40 0 0 0 90 50A40 42 0 0 1 10 50" fill="#ffffff" stroke="none"><animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 51;360 50 51"></animateTransform></path></svg></div></div>'), f(".loading-wrapper").fadeIn(300).promise().done(function() {
846
846
  bi();
847
847
  });
848
848
  }
849
849
  function hn() {
850
- g(".loading-wrapper").fadeOut(300).promise().done(function() {
851
- g(".loading-wrapper").remove(), yi();
850
+ f(".loading-wrapper").fadeOut(300).promise().done(function() {
851
+ f(".loading-wrapper").remove(), yi();
852
852
  });
853
853
  }
854
854
  function pn(n, i) {
@@ -861,11 +861,11 @@ function _s() {
861
861
  }
862
862
  function mn(n, i = () => {
863
863
  }) {
864
- g(`[data-tab-content=${n}]`).fadeIn(function() {
864
+ f(`[data-tab-content=${n}]`).fadeIn(function() {
865
865
  typeof i == "function" && i();
866
866
  }).siblings("[data-tab-content]").hide(), _s();
867
867
  }
868
- function gn() {
868
+ function fn() {
869
869
  Ce(
870
870
  {
871
871
  target: document.body,
@@ -890,7 +890,7 @@ function gn() {
890
890
  }
891
891
  );
892
892
  }
893
- function fn() {
893
+ function gn() {
894
894
  window.onpageshow = function(n) {
895
895
  n.persisted && window.location.reload();
896
896
  };
@@ -902,13 +902,13 @@ function vn() {
902
902
  };
903
903
  }
904
904
  function bn(n, i) {
905
- g(n).on("click", function() {
906
- g(this).toggleClass(i);
905
+ f(n).on("click", function() {
906
+ f(this).toggleClass(i);
907
907
  });
908
908
  }
909
909
  function yn(n, i) {
910
- g(n).on("click", function() {
911
- g(n).not(this).removeClass(i), g(this).addClass(i);
910
+ f(n).on("click", function() {
911
+ f(n).not(this).removeClass(i), f(this).addClass(i);
912
912
  });
913
913
  }
914
914
  function xs(n, i = 250) {
@@ -930,12 +930,12 @@ function wn(n, i = 250) {
930
930
  };
931
931
  }
932
932
  function Tn() {
933
- window._g.interval = [], g(".countdown").each((i, t) => {
934
- const e = Number(g(t).attr("data-seconds")) + 1;
933
+ window._g.interval = [], f(".countdown").each((i, t) => {
934
+ const e = Number(f(t).attr("data-seconds")) + 1;
935
935
  let s = Math.floor(e / 60) + ":" + e % 60;
936
936
  window._g.interval[i] = setInterval(function() {
937
937
  var o = s.split(":"), a = parseInt(o[0], 10), r = parseInt(o[1], 10);
938
- --r, a = r < 0 ? --a : a, a = a < 10 ? a = "0" + a : a, a == 0 && r == 0 && clearInterval(window._g.interval[i]), r = r < 0 ? 59 : r, r = r < 10 ? "0" + r : r, g(t).html(a + ":" + r), s = a + ":" + r;
938
+ --r, a = r < 0 ? --a : a, a = a < 10 ? a = "0" + a : a, a == 0 && r == 0 && clearInterval(window._g.interval[i]), r = r < 0 ? 59 : r, r = r < 10 ? "0" + r : r, f(t).html(a + ":" + r), s = a + ":" + r;
939
939
  }, 1e3);
940
940
  });
941
941
  }
@@ -954,13 +954,13 @@ function Ln() {
954
954
  n(), window.addEventListener("resize", xs(n));
955
955
  }
956
956
  function An(n, i, t, e, s) {
957
- const o = this, r = g(n).html().split("<br>");
957
+ const o = this, r = f(n).html().split("<br>");
958
958
  let l = "", c = 0;
959
959
  r.forEach((u, h) => {
960
- h !== 0 && (l += "<br>"), u.split("").forEach((f, v) => {
961
- 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++);
960
+ h !== 0 && (l += "<br>"), u.split("").forEach((g, v) => {
961
+ i ? (v === 0 && (l += '<span class="letter-wrap" style="display: inline-block">'), g === " " ? 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;` : ""}"` : ""}>${g}</span>`, c++), v === u.length - 1 && (l += "</span>")) : g === " " ? 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;` : ""}"` : ""}>${g}</span>`, c++);
962
962
  });
963
- }), g(n).html(l);
963
+ }), f(n).html(l);
964
964
  }
965
965
  function Sn(n, i) {
966
966
  const t = Math.pow(10, i);
@@ -983,7 +983,7 @@ function Dn(n) {
983
983
  }
984
984
  function _n(n, i) {
985
985
  const t = n.$el, e = n.params.grid.rows, s = i || n.params.slidesPerView * e;
986
- (n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), g(n.params.navigation.nextEl).hide(), g(n.params.navigation.prevEl).hide(), g(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), g(n.params.navigation.nextEl).show(), g(n.params.navigation.prevEl).show(), g(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
986
+ (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());
987
987
  }
988
988
  function xn(n) {
989
989
  n.el.querySelectorAll("img.detect-shade").forEach((i) => {
@@ -993,36 +993,36 @@ function xn(n) {
993
993
  });
994
994
  }
995
995
  function $n(n) {
996
- const i = n.el, t = g(i).find(".swiper-slide-active"), e = g(t).find("video").get(0), s = g(i).find(".swiper-slide video");
997
- n.autoplay.stop(), g(e).off("ended"), e ? (s.each((o, a) => {
996
+ 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");
997
+ n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
998
998
  a.currentTime = 0;
999
- }), g(e).on("ended", function() {
999
+ }), f(e).on("ended", function() {
1000
1000
  n.slideNext();
1001
1001
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1002
1002
  }
1003
1003
  function kn() {
1004
- g(".number-grow").each(function(n, i) {
1005
- const t = g(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1004
+ f(".number-grow").each(function(n, i) {
1005
+ const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1006
1006
  let r = "";
1007
1007
  for (var l = 0; l <= 9; l++)
1008
1008
  r += String(l) + "<br>";
1009
1009
  return r;
1010
1010
  };
1011
- g(o).each(function(r, l) {
1011
+ f(o).each(function(r, l) {
1012
1012
  const c = () => l !== "," ? `<div class="num" data-final-num="${l}"><div><br>${a()}<br>${a()}</div></div>` : `<div class="comma">${l}</div>`;
1013
1013
  t.append(c);
1014
1014
  });
1015
1015
  });
1016
1016
  }
1017
1017
  function Cn() {
1018
- g(".letter-grow").each(function(n, i) {
1019
- const t = g(i), s = t.attr("data-letter").split(""), o = () => {
1018
+ f(".letter-grow").each(function(n, i) {
1019
+ const t = f(i), s = t.attr("data-letter").split(""), o = () => {
1020
1020
  let a = "";
1021
1021
  for (let r = 65; r <= 90; r++)
1022
1022
  a += String.fromCharCode(r) + "<br>";
1023
1023
  return a;
1024
1024
  };
1025
- g(s).each(function(a, r) {
1025
+ f(s).each(function(a, r) {
1026
1026
  const l = `<div class="letter" data-final-letter="${r}"><div><br>${o()}<br>${o()}</div></div>`;
1027
1027
  t.append(l);
1028
1028
  });
@@ -1083,8 +1083,8 @@ V = new WeakSet(), Le = function() {
1083
1083
  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 結構,若無結構則自動加入圖片結構"));
1084
1084
  const m = s.querySelector("img");
1085
1085
  m.insertAdjacentHTML(w.after, t[o]);
1086
- const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1087
- !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 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1086
+ const g = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1087
+ !g && r == "youtube" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !g && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : y("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1088
1088
  }
1089
1089
  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);
1090
1090
  } else if (l === "onPage") {
@@ -1093,8 +1093,8 @@ V = new WeakSet(), Le = function() {
1093
1093
  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 結構"));
1094
1094
  const m = s.querySelector("img");
1095
1095
  m.insertAdjacentHTML(w.after, t[o]);
1096
- const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1097
- !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`) : f || y("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? h = s : (h = s.querySelector(c) ?? s, s.querySelector(c) || y("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1096
+ const g = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1097
+ !g && r == "youtube" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !g && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : g || y("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? h = s : (h = s.querySelector(c) ?? s, s.querySelector(c) || y("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1098
1098
  } else {
1099
1099
  s.innerHTML = ye(e);
1100
1100
  return;
@@ -2254,7 +2254,7 @@ Mt = new WeakSet(), Si = function() {
2254
2254
  const a = e.querySelector(".dropdown-scroller"), r = e.classList.contains("city");
2255
2255
  e.s.allLi = e.querySelectorAll(".dropdown-list li"), e.s.allLi.forEach((l) => {
2256
2256
  l.addEventListener("click", function(c) {
2257
- var f;
2257
+ var g;
2258
2258
  const u = this, h = [...e.s.allLi].indexOf(u), m = parseInt(e.getAttribute("d4-default-height"));
2259
2259
  if (u.classList.contains("has-sublayer")) {
2260
2260
  c.stopPropagation();
@@ -2278,7 +2278,7 @@ Mt = new WeakSet(), Si = function() {
2278
2278
  A.textContent = C[0], A.setAttribute("data-option", C[0]), L.querySelector(".dropdown-list").append(A);
2279
2279
  }), e.__events__.selectOption(L));
2280
2280
  }
2281
- (f = u.parentNode.closest("li")) != null && f.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2281
+ (g = u.parentNode.closest("li")) != null && g.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2282
2282
  break;
2283
2283
  case "multiple":
2284
2284
  c.stopPropagation(), u.classList.toggle("active"), x(e, h);
@@ -2486,7 +2486,7 @@ Nt = new WeakSet(), $i = function() {
2486
2486
  }));
2487
2487
  break;
2488
2488
  case "alternate":
2489
- let f = function() {
2489
+ let g = function() {
2490
2490
  let v = [];
2491
2491
  switch (e) {
2492
2492
  case "top":
@@ -2504,7 +2504,7 @@ Nt = new WeakSet(), $i = function() {
2504
2504
  }
2505
2505
  return v;
2506
2506
  }, h, m;
2507
- (t.clientHeight > t.s.animateEl.scrollHeight || e === "left" || e === "right") && (t.s.animateEl.style.transform = `${f()[0].transform}`, t.s.animateEl.animate(f(), {
2507
+ (t.clientHeight > t.s.animateEl.scrollHeight || e === "left" || e === "right") && (t.s.animateEl.style.transform = `${g()[0].transform}`, t.s.animateEl.animate(g(), {
2508
2508
  duration: m,
2509
2509
  fill: "forwards"
2510
2510
  }).finished.then(() => {
@@ -2655,9 +2655,9 @@ Wt = new WeakSet(), Mi = function() {
2655
2655
  const c = function(h) {
2656
2656
  if (h.preventDefault(), e = !0, !t)
2657
2657
  return;
2658
- const f = h.pageX - i.offsetLeft - s;
2658
+ const g = h.pageX - i.offsetLeft - s;
2659
2659
  i.scrollTo({
2660
- left: o - f
2660
+ left: o - g
2661
2661
  });
2662
2662
  };
2663
2663
  i.removeEventListener("mousemove", c), i.addEventListener("mousemove", c);
@@ -3174,14 +3174,14 @@ function ls() {
3174
3174
  });
3175
3175
  }
3176
3176
  document.addEventListener("click", ls);
3177
- var ot, ke, me, cs, ge, ds, fe, us;
3177
+ var ot, ke, me, cs, fe, ds, ge, us;
3178
3178
  class Fs extends HTMLElement {
3179
3179
  constructor() {
3180
3180
  super();
3181
3181
  p(this, ot);
3182
3182
  p(this, me);
3183
- p(this, ge);
3184
3183
  p(this, fe);
3184
+ p(this, ge);
3185
3185
  this.initialize = !1;
3186
3186
  }
3187
3187
  connectedCallback() {
@@ -3209,11 +3209,11 @@ ot = new WeakSet(), ke = function() {
3209
3209
  };
3210
3210
  this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, me, cs).call(this);
3211
3211
  }, me = new WeakSet(), cs = function() {
3212
- d(this, ge, ds).call(this), d(this, fe, us).call(this), this.classList.add("r4-initialize");
3213
- }, ge = new WeakSet(), ds = function() {
3212
+ d(this, fe, ds).call(this), d(this, ge, us).call(this), this.classList.add("r4-initialize");
3213
+ }, fe = new WeakSet(), ds = function() {
3214
3214
  const t = this, e = document.createElement("i");
3215
3215
  e.classList.add("hover-ball"), e.style.transitionDuration = `${t.s.options.speed}ms`, t.appendChild(e);
3216
- }, fe = new WeakSet(), us = function() {
3216
+ }, ge = new WeakSet(), us = function() {
3217
3217
  const t = this.querySelector("i.hover-ball"), e = this;
3218
3218
  e.addEventListener("click", function(a) {
3219
3219
  a.stopPropagation(), e.s.options.click && Rs(a, e);
@@ -3323,8 +3323,8 @@ function Js(n, i, t, e) {
3323
3323
  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);
3324
3324
  break;
3325
3325
  }
3326
- const m = (s.width - u) * 0.5, f = (s.height - h) * 0.5;
3327
- return o.drawImage(i, m, f, u, h), s;
3326
+ const m = (s.width - u) * 0.5, g = (s.height - h) * 0.5;
3327
+ return o.drawImage(i, m, g, u, h), s;
3328
3328
  }
3329
3329
  function Zs(n, i) {
3330
3330
  return new Promise((t, e) => {
@@ -3436,7 +3436,7 @@ export {
3436
3436
  b as a,
3437
3437
  rt as b,
3438
3438
  vs as c,
3439
- fs as d,
3439
+ gs as d,
3440
3440
  Y as e,
3441
3441
  w as f,
3442
3442
  E as g,
@@ -3451,13 +3451,13 @@ export {
3451
3451
  bi as p,
3452
3452
  yi as q,
3453
3453
  un as r,
3454
- gs as s,
3454
+ fs as s,
3455
3455
  hn as t,
3456
3456
  pn as u,
3457
3457
  ks as v,
3458
3458
  _s as w,
3459
3459
  mn as x,
3460
- gn as y,
3461
- fn as z
3460
+ fn as y,
3461
+ gn as z
3462
3462
  };
3463
3463
  //# sourceMappingURL=image-preview-bundle.js.map