@xwadex/fesd 0.0.14-re.55 → 0.0.14-re.56

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.
@@ -173,7 +173,7 @@ const Y = {
173
173
  beforeScroll: null,
174
174
  afterScroll: null
175
175
  }
176
- }, $ = {
176
+ }, k = {
177
177
  SETTINGS: {
178
178
  type: "drag",
179
179
  drag: {
@@ -292,7 +292,7 @@ const Y = {
292
292
  dropdown4: He,
293
293
  marquee4: _,
294
294
  modal4: I,
295
- multipurpose4: $,
295
+ multipurpose4: k,
296
296
  ripple4: Ue,
297
297
  share4: fs,
298
298
  tab4: Fe,
@@ -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", 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;
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], $ = b(t) ? T(t).getBoundingClientRect()[h] : 0 - v, L = b(s) ? T(s).getBoundingClientRect()[m] : 0, C = $ - a - L, G = 15;
362
362
  let A = 0;
363
363
  if (C === 0)
364
364
  return;
@@ -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, fi, xt, gi, $t, vi;
738
+ var Lt, ui, At, hi, St, pi, Dt, mi, _t, fi, xt, gi, kt, vi;
739
739
  class Ds extends HTMLElement {
740
740
  constructor() {
741
741
  super();
@@ -748,7 +748,7 @@ class Ds extends HTMLElement {
748
748
  p(this, _t);
749
749
  // youku iframe
750
750
  p(this, xt);
751
- p(this, $t);
751
+ p(this, kt);
752
752
  d(this, Lt, ui).call(this);
753
753
  }
754
754
  play() {
@@ -812,7 +812,7 @@ Lt = new WeakSet(), ui = function() {
812
812
  e = d(this, _t, fi).call(this);
813
813
  break;
814
814
  case "bilibili":
815
- e = d(this, $t, vi).call(this);
815
+ e = d(this, kt, vi).call(this);
816
816
  break;
817
817
  }
818
818
  this.querySelector(".player-wrapper").insertAdjacentHTML(w.prepend, e);
@@ -825,7 +825,7 @@ Lt = new WeakSet(), ui = function() {
825
825
  }, xt = new WeakSet(), 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
- }, $t = new WeakSet(), vi = function() {
828
+ }, kt = new WeakSet(), vi = function() {
829
829
  const { videoId: t, autoplay: e } = this;
830
830
  return `<iframe src="//player.bilibili.com/player.html?bvid=${t}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`;
831
831
  };
@@ -833,13 +833,13 @@ function bi(n) {
833
833
  const i = [];
834
834
  n && n.forEach((t) => {
835
835
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
836
- }), ps(i);
836
+ }), f("html").addClass("scrollLock"), ps(i);
837
837
  }
838
838
  function yi(n) {
839
839
  const i = [];
840
840
  n && n.forEach((t) => {
841
841
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
842
- }), ms(i);
842
+ }), f("html").removeClass("scrollLock"), ms(i);
843
843
  }
844
844
  function un() {
845
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() {
@@ -992,7 +992,7 @@ function xn(n) {
992
992
  });
993
993
  });
994
994
  }
995
- function $n(n) {
995
+ function kn(n) {
996
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
997
  n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
998
998
  a.currentTime = 0;
@@ -1000,7 +1000,7 @@ function $n(n) {
1000
1000
  n.slideNext();
1001
1001
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1002
1002
  }
1003
- function kn() {
1003
+ function $n() {
1004
1004
  f(".number-grow").each(function(n, i) {
1005
1005
  const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1006
1006
  let r = "";
@@ -1042,12 +1042,12 @@ function qn(n) {
1042
1042
  const i = document.createElement("div");
1043
1043
  return i.innerHTML = n, i.childNodes[0];
1044
1044
  }
1045
- const je = (n) => n.videoId !== "" || typeof n.videoId < "u", $s = (n) => n.$selector.getAttribute("video4-active") === "on", ye = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1046
- var V, Le, kt, wi, Ct, Ti, K, Ae, Ht, Ei;
1047
- class ks {
1045
+ const je = (n) => n.videoId !== "" || typeof n.videoId < "u", ks = (n) => n.$selector.getAttribute("video4-active") === "on", ye = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1046
+ var V, Le, $t, wi, Ct, Ti, K, Ae, Ht, Ei;
1047
+ class $s {
1048
1048
  constructor(i, t = {}) {
1049
1049
  p(this, V);
1050
- p(this, kt);
1050
+ p(this, $t);
1051
1051
  p(this, Ct);
1052
1052
  p(this, K);
1053
1053
  p(this, Ht);
@@ -1069,11 +1069,11 @@ V = new WeakSet(), Le = function() {
1069
1069
  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)
1070
1070
  for (const [o, a] of Object.entries(this.options.on))
1071
1071
  this.__events__[o] = [a];
1072
- d(this, kt, wi).call(this);
1073
- }, kt = new WeakSet(), wi = function() {
1072
+ d(this, $t, wi).call(this);
1073
+ }, $t = new WeakSet(), wi = function() {
1074
1074
  const { elements: i, options: t } = this;
1075
1075
  i.forEach((e) => {
1076
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Ht, Ei).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), je(e.video.params) && !$s(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Ct, Ti).call(this, e)), je(e.video.params) || Ne("video4", "無法取得影片 ID");
1076
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Ht, Ei).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), je(e.video.params) && !ks(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Ct, Ti).call(this, e)), je(e.video.params) || Ne("video4", "無法取得影片 ID");
1077
1077
  }), this.emit("init");
1078
1078
  }, Ct = new WeakSet(), Ti = function(i) {
1079
1079
  const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u } = e;
@@ -1142,7 +1142,7 @@ V = new WeakSet(), Le = function() {
1142
1142
  videoTargetRoute: i.getAttribute("video-target-route") || t.videoTargetRoute
1143
1143
  };
1144
1144
  };
1145
- Object.assign(ks.prototype, O);
1145
+ Object.assign($s.prototype, O);
1146
1146
  customElements.define("video-player", Ds);
1147
1147
  const qe = {
1148
1148
  "zh-tw": {
@@ -2258,8 +2258,8 @@ Mt = new WeakSet(), Si = function() {
2258
2258
  const u = this, h = [...e.s.allLi].indexOf(u), m = parseInt(e.getAttribute("d4-default-height"));
2259
2259
  if (u.classList.contains("has-sublayer")) {
2260
2260
  c.stopPropagation();
2261
- const v = u.querySelector(".sub-dropdown"), k = v.querySelector(".sub-dropdown-list"), L = parseInt(getComputedStyle(k).marginTop) + parseInt(getComputedStyle(k).marginBottom);
2262
- v.style.cssText = `--height: ${k.offsetHeight + L}px`;
2261
+ const v = u.querySelector(".sub-dropdown"), $ = v.querySelector(".sub-dropdown-list"), L = parseInt(getComputedStyle($).marginTop) + parseInt(getComputedStyle($).marginBottom);
2262
+ v.style.cssText = `--height: ${$.offsetHeight + L}px`;
2263
2263
  const C = parseInt(v.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), A = () => {
2264
2264
  s = m + e.s.subDropdownTotalH, o = s > G ? G : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2265
2265
  };
@@ -2272,8 +2272,8 @@ Mt = new WeakSet(), Si = function() {
2272
2272
  switch (Hs(e), e.s.selectType) {
2273
2273
  case "single":
2274
2274
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2275
- const v = e.s.cityLang, k = l.textContent.trim(), L = document.getElementById(e.getAttribute("dist-select"));
2276
- L && (L.querySelector(".dropdown-list").textContent = "", x(L, -1), qe[v][k].forEach((C, G) => {
2275
+ const v = e.s.cityLang, $ = l.textContent.trim(), L = document.getElementById(e.getAttribute("dist-select"));
2276
+ L && (L.querySelector(".dropdown-list").textContent = "", x(L, -1), qe[v][$].forEach((C, G) => {
2277
2277
  const A = document.createElement("li");
2278
2278
  A.textContent = C[0], A.setAttribute("data-option", C[0]), L.querySelector(".dropdown-list").append(A);
2279
2279
  }), e.__events__.selectOption(L));
@@ -2414,7 +2414,7 @@ function Ns(n) {
2414
2414
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2415
2415
  };
2416
2416
  }
2417
- var Nt, $i, Pt, ki, jt, Ci, zt, Hi;
2417
+ var Nt, ki, Pt, $i, jt, Ci, zt, Hi;
2418
2418
  class Ps extends HTMLElement {
2419
2419
  constructor() {
2420
2420
  super();
@@ -2430,7 +2430,7 @@ class Ps extends HTMLElement {
2430
2430
  attributeChangedCallback(t, e, s) {
2431
2431
  }
2432
2432
  connectedCallback() {
2433
- this.initialize || (this.initialize = !0, d(this, Nt, $i).call(this));
2433
+ this.initialize || (this.initialize = !0, d(this, Nt, ki).call(this));
2434
2434
  }
2435
2435
  play() {
2436
2436
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -2439,7 +2439,7 @@ class Ps extends HTMLElement {
2439
2439
  this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
2440
2440
  }
2441
2441
  }
2442
- Nt = new WeakSet(), $i = function() {
2442
+ Nt = new WeakSet(), ki = function() {
2443
2443
  const t = {
2444
2444
  direction: this.getAttribute("direction") || _.SETTINGS.direction,
2445
2445
  // up / down / left / right
@@ -2456,8 +2456,8 @@ Nt = new WeakSet(), $i = function() {
2456
2456
  // true / false
2457
2457
  gap: Number(this.getAttribute("gap")) || _.SETTINGS.gap
2458
2458
  };
2459
- this.s = {}, this.s.options = t, this.s.nowDuration = ze(this), Os(this), d(this, Pt, ki).call(this);
2460
- }, Pt = new WeakSet(), ki = function() {
2459
+ this.s = {}, this.s.options = t, this.s.nowDuration = ze(this), Os(this), d(this, Pt, $i).call(this);
2460
+ }, Pt = new WeakSet(), $i = function() {
2461
2461
  const { direction: t, continual: e, gap: s } = this.s.options;
2462
2462
  switch (t) {
2463
2463
  case "left":
@@ -2746,7 +2746,7 @@ Rt = new WeakSet(), Ni = function() {
2746
2746
  };
2747
2747
  const zs = (n) => {
2748
2748
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2749
- return i == "drag" && (s.innerHTML = $.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e)), i == "collapse" && (s.innerHTML = $.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(w.append, e)), i == "dropdown" && (s.innerHTML = $.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(w.append, e)), s.children;
2749
+ return i == "drag" && (s.innerHTML = k.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e)), i == "collapse" && (s.innerHTML = k.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(w.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(w.append, e)), i == "dropdown" && (s.innerHTML = k.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(w.append, e)), s.children;
2750
2750
  };
2751
2751
  var Jt, Wi, Zt, Bi, et, De, B, ut;
2752
2752
  class Ws extends HTMLElement {
@@ -2794,7 +2794,7 @@ class Ws extends HTMLElement {
2794
2794
  }
2795
2795
  Jt = new WeakSet(), Wi = function() {
2796
2796
  let t = {};
2797
- this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? $.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2797
+ this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? k.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2798
2798
  const e = (s) => {
2799
2799
  if (s.type === "resize") {
2800
2800
  if (window.innerWidth === this.previousWidth)
@@ -2803,7 +2803,7 @@ Jt = new WeakSet(), Wi = function() {
2803
2803
  }
2804
2804
  this.update();
2805
2805
  };
2806
- window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, $.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, $.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, $.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, $.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Zt, Bi).call(this);
2806
+ 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);
2807
2807
  }, Zt = new WeakSet(), Bi = function() {
2808
2808
  this.classList.add("m4-init"), d(this, et, De).call(this);
2809
2809
  }, et = new WeakSet(), De = function() {
@@ -3119,7 +3119,7 @@ const Be = (n) => {
3119
3119
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3120
3120
  n.collapse.height = a, n.classList.remove(t), o.style.display = "block", o.style.height = `${a}px`, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3121
3121
  };
3122
- var st, xe, he, as, pe, rs, nt, $e;
3122
+ var st, xe, he, as, pe, rs, nt, ke;
3123
3123
  class Xs {
3124
3124
  constructor(i, t = {}) {
3125
3125
  p(this, st);
@@ -3148,13 +3148,13 @@ st = new WeakSet(), xe = function() {
3148
3148
  }), this.emit("init");
3149
3149
  }, pe = new WeakSet(), rs = function(i) {
3150
3150
  const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3151
- if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, $e)), c.addEventListener("click", d(this, nt, $e)), r) {
3151
+ if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, ke)), c.addEventListener("click", d(this, nt, ke)), r) {
3152
3152
  const h = (m) => {
3153
3153
  m.stopPropagation();
3154
3154
  };
3155
3155
  u.removeEventListener("click", h), u.addEventListener("click", h);
3156
3156
  }
3157
- }, nt = new WeakSet(), $e = function() {
3157
+ }, nt = new WeakSet(), ke = function() {
3158
3158
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3159
3159
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3160
3160
  Be(l);
@@ -3174,7 +3174,7 @@ function ls() {
3174
3174
  });
3175
3175
  }
3176
3176
  document.addEventListener("click", ls);
3177
- var ot, ke, me, cs, fe, ds, ge, us;
3177
+ var ot, $e, me, cs, fe, ds, ge, us;
3178
3178
  class Fs extends HTMLElement {
3179
3179
  constructor() {
3180
3180
  super();
@@ -3186,13 +3186,13 @@ class Fs extends HTMLElement {
3186
3186
  }
3187
3187
  connectedCallback() {
3188
3188
  const t = this;
3189
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ot, ke).call(this));
3189
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ot, $e).call(this));
3190
3190
  }
3191
3191
  update() {
3192
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ot, ke).call(this);
3192
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ot, $e).call(this);
3193
3193
  }
3194
3194
  }
3195
- ot = new WeakSet(), ke = function() {
3195
+ ot = new WeakSet(), $e = function() {
3196
3196
  const { SETTINGS: t } = Ue;
3197
3197
  this.s = {};
3198
3198
  function e(o) {
@@ -3427,9 +3427,9 @@ export {
3427
3427
  _n as P,
3428
3428
  xn as Q,
3429
3429
  Fs as R,
3430
- $n as S,
3430
+ kn as S,
3431
3431
  Gi as T,
3432
- kn as U,
3432
+ $n as U,
3433
3433
  Cn as V,
3434
3434
  Hn as W,
3435
3435
  Mn as X,
@@ -3454,7 +3454,7 @@ export {
3454
3454
  fs as s,
3455
3455
  hn as t,
3456
3456
  pn as u,
3457
- ks as v,
3457
+ $s as v,
3458
3458
  _s as w,
3459
3459
  mn as x,
3460
3460
  fn as y,