@xwadex/fesd 0.0.48 → 0.0.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.
@@ -1,6 +1,6 @@
1
- var As = Object.defineProperty;
2
- var Ss = (n, i, t) => i in n ? As(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
- var Re = (n, i, t) => (Ss(n, typeof i != "symbol" ? i + "" : i, t), t), Ds = (n, i, t) => {
1
+ var Ds = Object.defineProperty;
2
+ var ks = (n, i, t) => i in n ? Ds(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
+ var Xe = (n, i, t) => (ks(n, typeof i != "symbol" ? i + "" : i, t), t), xs = (n, i, t) => {
4
4
  if (!i.has(n))
5
5
  throw TypeError("Cannot " + t);
6
6
  };
@@ -9,15 +9,15 @@ var h = (n, i, t) => {
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  i instanceof WeakSet ? i.add(n) : i.set(n, t);
11
11
  };
12
- var d = (n, i, t) => (Ds(n, i, "access private method"), t);
13
- import { OverlayScrollbars as Pe } from "overlayscrollbars";
12
+ var d = (n, i, t) => (xs(n, i, "access private method"), t);
13
+ import { OverlayScrollbars as je } from "overlayscrollbars";
14
14
  import f from "jquery";
15
15
  import "./vendor-bundle.js";
16
16
  import "validator";
17
17
  import "flatpickr";
18
- import Ke from "vanilla-lazyload";
19
- import { lock as ks, unlock as $s } from "tua-body-scroll-lock";
20
- const je = {
18
+ import ti from "vanilla-lazyload";
19
+ import { lock as $s, unlock as _s } from "tua-body-scroll-lock";
20
+ const ze = {
21
21
  SETTINGS: {
22
22
  videoId: null,
23
23
  videoType: null,
@@ -60,7 +60,7 @@ const je = {
60
60
  TEMPLATE() {
61
61
  return '<div class="player-container"><div class="player-wrapper"></div></div>';
62
62
  }
63
- }, xs = {
63
+ }, Cs = {
64
64
  SETTINGS: {
65
65
  success: null,
66
66
  text: null,
@@ -117,7 +117,7 @@ const je = {
117
117
  gap: 30
118
118
  // 跑馬燈內容之間的距離 - Number
119
119
  }
120
- }, ze = {
120
+ }, Be = {
121
121
  SETTINGS: {
122
122
  scrollbar: {
123
123
  "scrollbar-track-color": "transparent",
@@ -145,7 +145,7 @@ const je = {
145
145
  </div>`;
146
146
  return t || r;
147
147
  }
148
- }, _s = {
148
+ }, Hs = {
149
149
  SETTINGS: {
150
150
  basic_rwd: 900,
151
151
  markdownLink: !1,
@@ -154,7 +154,7 @@ const je = {
154
154
  navigation: !1,
155
155
  scrollStep: !1
156
156
  }
157
- }, ti = {
157
+ }, ei = {
158
158
  SETTINGS: {
159
159
  scroller: window,
160
160
  class: "aost-show",
@@ -177,7 +177,7 @@ const je = {
177
177
  enter: null,
178
178
  leave: null
179
179
  }
180
- }, pt = {
180
+ }, mt = {
181
181
  SETTINGS: {
182
182
  target: null,
183
183
  container: null,
@@ -237,7 +237,7 @@ const je = {
237
237
  return `<dropdown-el${n.placeholder ? ` d4-placeholder="${n.placeholder}"` : ""}${n.value ? ` d4-value="${n.value}"` : ""}></dropdown-el>`;
238
238
  }
239
239
  }
240
- }, ei = {
240
+ }, ii = {
241
241
  SETTINGS: {
242
242
  // 樣式 normal / process
243
243
  type: "normal",
@@ -257,7 +257,7 @@ const je = {
257
257
  // 步驟狀態綁定
258
258
  stepOutput: ".step-show"
259
259
  }
260
- }, ii = {
260
+ }, si = {
261
261
  SETTINGS: {
262
262
  collapseClass: "collapse",
263
263
  block: "[collapse-block]",
@@ -290,7 +290,7 @@ const je = {
290
290
  update: null,
291
291
  afterUpdate: null
292
292
  }
293
- }, si = {
293
+ }, ni = {
294
294
  SETTINGS: {
295
295
  // 是否要加 hover 效果?
296
296
  hover: !0,
@@ -305,38 +305,38 @@ const je = {
305
305
  // hover 毫秒 ?
306
306
  speed: 600
307
307
  }
308
- }, An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
308
+ }, Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
309
309
  __proto__: null,
310
- anchor4: pt,
311
- aost4: ti,
312
- article4: _s,
313
- collapse4: ii,
314
- dropdown4: ze,
310
+ anchor4: mt,
311
+ aost4: ei,
312
+ article4: Hs,
313
+ collapse4: si,
314
+ dropdown4: Be,
315
315
  marquee4: M,
316
316
  modal4: P,
317
317
  multipurpose4: q,
318
- ripple4: si,
319
- share4: xs,
320
- tab4: ei,
321
- video4: je
318
+ ripple4: ni,
319
+ share4: Cs,
320
+ tab4: ii,
321
+ video4: ze
322
322
  }, Symbol.toStringTag, { value: "Module" })), S = {
323
323
  before: "beforebegin",
324
324
  after: "afterend",
325
325
  append: "beforeend",
326
326
  prepend: "afterbegin"
327
- }, ct = (n) => typeof n == "string" && n !== "", Ae = (n) => n instanceof HTMLElement, dt = (n) => n instanceof NodeList, E = (n) => $(n) !== null, G = (n) => typeof n == "function", $ = (n) => Ae(n) ? n : document.querySelector(n), x = (n) => dt(n) ? n : document.querySelectorAll(n), Cs = () => Math.random().toString(36).substr(2, 9), Hs = (n) => {
327
+ }, dt = (n) => typeof n == "string" && n !== "", Se = (n) => n instanceof HTMLElement, ut = (n) => n instanceof NodeList, E = (n) => x(n) !== null, G = (n) => typeof n == "function", x = (n) => Se(n) ? n : document.querySelector(n), $ = (n) => ut(n) ? n : document.querySelectorAll(n), Ms = () => Math.random().toString(36).substr(2, 9), Is = (n) => {
328
328
  const i = document.createElement("div");
329
329
  return i.innerHTML = n, i.childNodes;
330
- }, Ms = (n) => {
330
+ }, qs = (n) => {
331
331
  try {
332
332
  JSON.parse(n);
333
333
  } catch {
334
334
  return n;
335
335
  }
336
336
  return JSON.parse(n);
337
- }, A = (n, i) => {
337
+ }, L = (n, i) => {
338
338
  console.warn(`[${n} warn]: ${i}`);
339
- }, Xe = (n, i) => {
339
+ }, Fe = (n, i) => {
340
340
  console.error(`[${n} error]: ${i}`);
341
341
  }, j = {
342
342
  on(n, i) {
@@ -369,7 +369,7 @@ const je = {
369
369
  G(s) && s.apply(this, e);
370
370
  }), this) : this;
371
371
  }
372
- }, Is = {
372
+ }, Os = {
373
373
  easeInOutCirc(n, i, t, e) {
374
374
  return (n /= e / 2) < 1 ? -t / 2 * (Math.sqrt(1 - n * n) - 1) + i : t / 2 * (Math.sqrt(1 - (n -= 2) * n) + 1) + i;
375
375
  },
@@ -379,33 +379,33 @@ const je = {
379
379
  easeOutQuart(n, i, t, e) {
380
380
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
381
381
  }
382
- }, Se = (n, i) => {
383
- const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = E(e) ? $(e) : document.scrollingElement, v = m[u], w = E(t) ? $(t).getBoundingClientRect()[p] : 0 - v, b = E(s) ? $(s).getBoundingClientRect()[g] : 0, T = w - a - b, C = 15;
382
+ }, De = (n, i) => {
383
+ const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = E(e) ? x(e) : document.scrollingElement, v = m[u], w = E(t) ? x(t).getBoundingClientRect()[p] : 0 - v, b = E(s) ? x(s).getBoundingClientRect()[g] : 0, T = w - a - b, C = 15;
384
384
  let y = 0;
385
385
  if (T === 0)
386
386
  return;
387
- const D = (L) => {
388
- const z = $(t);
389
- i && i.emit(L, z), !i && n.on && G(n.on[L]) && n.on[L](z);
387
+ const D = (A) => {
388
+ const z = x(t);
389
+ i && i.emit(A, z), !i && n.on && G(n.on[A]) && n.on[A](z);
390
390
  };
391
391
  D("beforeScroll");
392
392
  const U = () => {
393
393
  y += C;
394
- const L = Is[r](y, v, T, o);
395
- m[u] = L, y < o && requestAnimationFrame(U), y >= o && D("afterScroll");
394
+ const A = Os[r](y, v, T, o);
395
+ m[u] = A, y < o && requestAnimationFrame(U), y >= o && D("afterScroll");
396
396
  };
397
397
  requestAnimationFrame(U);
398
398
  };
399
- var V, De, vt, oi, bt, ai;
400
- class ni {
399
+ var K, ke, bt, ai, yt, ri;
400
+ class oi {
401
401
  constructor(i, t = {}) {
402
- h(this, V);
403
- h(this, vt);
402
+ h(this, K);
404
403
  h(this, bt);
404
+ h(this, yt);
405
405
  this.__storage__ = {
406
406
  el: i,
407
407
  options: t
408
- }, this.active = "data-anchor-active", d(this, V, De).call(this);
408
+ }, this.active = "data-anchor-active", d(this, K, ke).call(this);
409
409
  }
410
410
  destroy() {
411
411
  const { elements: i } = this;
@@ -415,39 +415,39 @@ class ni {
415
415
  }
416
416
  update() {
417
417
  var i;
418
- return d(i = this.destroy(), V, De).call(i), this.emit("afterUpdate"), this;
418
+ return d(i = this.destroy(), K, ke).call(i), this.emit("afterUpdate"), this;
419
419
  }
420
420
  static run(i) {
421
- const { SETTINGS: t } = pt, e = Object.assign({}, t, i);
421
+ const { SETTINGS: t } = mt, e = Object.assign({}, t, i);
422
422
  setTimeout(() => {
423
- Se(e);
423
+ De(e);
424
424
  }, e.delay);
425
425
  }
426
426
  static url(i) {
427
- const { SETTINGS: t } = pt, { 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()}"]`);
427
+ const { SETTINGS: t } = mt, { 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()}"]`);
428
428
  if (!a)
429
429
  return;
430
430
  const r = Object.assign({}, t, i, { target: a });
431
431
  setTimeout(() => {
432
- Se(r);
432
+ De(r);
433
433
  }, r.delay);
434
434
  }
435
435
  }
436
- V = new WeakSet(), De = function() {
436
+ K = new WeakSet(), ke = function() {
437
437
  const { el: i, options: t } = this.__storage__;
438
- if (!ct(i) || !E(i))
438
+ if (!dt(i) || !E(i))
439
439
  return;
440
- const { SETTINGS: e, EVENTS: s } = pt;
441
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.elements = x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
440
+ const { SETTINGS: e, EVENTS: s } = mt;
441
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.elements = $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
442
442
  for (const [o, a] of Object.entries(this.options.on))
443
443
  this.__events__[o] = [a];
444
- d(this, vt, oi).call(this);
445
- }, vt = new WeakSet(), oi = function() {
444
+ d(this, bt, ai).call(this);
445
+ }, bt = new WeakSet(), ai = function() {
446
446
  const { elements: i, options: t } = this;
447
447
  i.forEach((e) => {
448
- e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, bt, ai), 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, "");
448
+ e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, yt, ri), 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, "");
449
449
  }), this.emit("afterInit");
450
- }, bt = new WeakSet(), ai = function() {
450
+ }, yt = new WeakSet(), ri = function() {
451
451
  const { defaultOptions: i, eventHandler: t, instance: e } = this.anchor, s = {
452
452
  target: this.getAttribute("data-anchor-target") || i.target,
453
453
  container: this.getAttribute("data-anchor-container") || i.container,
@@ -461,12 +461,12 @@ V = new WeakSet(), De = function() {
461
461
  this.removeEventListener("click", t), setTimeout(() => {
462
462
  this.addEventListener("click", t);
463
463
  }, s.speed), setTimeout(() => {
464
- Se(s, e);
464
+ De(s, e);
465
465
  }, s.delay);
466
466
  };
467
- Object.assign(ni.prototype, j);
467
+ Object.assign(oi.prototype, j);
468
468
  window.MODALS || (window.MODALS = {});
469
- const { MODALS: O } = window, qs = (n) => {
469
+ const { MODALS: O } = window, Ns = (n) => {
470
470
  const { TEMPLATE: i } = P, { childDom: t } = n, e = document.createElement("div");
471
471
  e.innerHTML = i(n.getAttribute("data-modal-template-setting"));
472
472
  const s = e.querySelector(".modal-content");
@@ -474,14 +474,14 @@ const { MODALS: O } = window, qs = (n) => {
474
474
  s.append(o);
475
475
  }), e.children[0];
476
476
  };
477
- var yt, li, wt, ci, Tt, di, Et, ui, Lt, hi;
478
- class ri extends HTMLElement {
477
+ var wt, ci, Tt, di, Et, ui, At, hi, Lt, pi;
478
+ class li extends HTMLElement {
479
479
  constructor() {
480
480
  super();
481
- h(this, yt);
482
481
  h(this, wt);
483
482
  h(this, Tt);
484
483
  h(this, Et);
484
+ h(this, At);
485
485
  h(this, Lt);
486
486
  this.initialize = !1;
487
487
  }
@@ -491,12 +491,12 @@ class ri extends HTMLElement {
491
491
  attributeChangedCallback(t, e, s) {
492
492
  switch (t) {
493
493
  case ":state":
494
- d(this, Lt, hi).call(this, s);
494
+ d(this, Lt, pi).call(this, s);
495
495
  break;
496
496
  }
497
497
  }
498
498
  connectedCallback() {
499
- this.initialize || (this.initialize = !0, d(this, yt, li).call(this));
499
+ this.initialize || (this.initialize = !0, d(this, wt, ci).call(this));
500
500
  }
501
501
  open() {
502
502
  return this.setAttribute(":state", "open"), this;
@@ -508,22 +508,22 @@ class ri extends HTMLElement {
508
508
  return this.setAttribute(":state", "destroy"), this;
509
509
  }
510
510
  }
511
- yt = new WeakSet(), li = function() {
511
+ wt = new WeakSet(), ci = function() {
512
512
  const { ATTRS: t } = P;
513
513
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
514
- const e = this.getAttribute(t.id) || Cs();
515
- this.getAttribute(t.id) || (A(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), O[e] && A(`the ${t.id} "${e}" is already be used.`), O[e] = this, d(this, wt, ci).call(this);
516
- }, wt = new WeakSet(), ci = function() {
517
- this.childDom = this.childNodes, this.template = qs(this), this.innerHTML = "", this.append(this.template), d(this, Tt, di).call(this);
514
+ const e = this.getAttribute(t.id) || Ms();
515
+ this.getAttribute(t.id) || (L(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), O[e] && L(`the ${t.id} "${e}" is already be used.`), O[e] = this, d(this, Tt, di).call(this);
518
516
  }, Tt = new WeakSet(), di = function() {
517
+ this.childDom = this.childNodes, this.template = Ns(this), this.innerHTML = "", this.append(this.template), d(this, Et, ui).call(this);
518
+ }, Et = new WeakSet(), ui = function() {
519
519
  const t = this.querySelector(".modal-scroller");
520
- this.__scroller__ = Pe(t, {
520
+ this.__scroller__ = je(t, {
521
521
  overflowBehavior: {
522
522
  x: "hidden"
523
523
  },
524
524
  autoUpdate: !0
525
- }), window.modalScroll = this.__scroller__, d(this, Et, ui).call(this);
526
- }, Et = new WeakSet(), ui = function() {
525
+ }), window.modalScroll = this.__scroller__, d(this, At, hi).call(this);
526
+ }, At = new WeakSet(), hi = function() {
527
527
  var a, r, l;
528
528
  const t = this, { ATTRS: e } = P, { close: s, destroy: o } = e;
529
529
  (a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
@@ -539,7 +539,7 @@ yt = new WeakSet(), li = function() {
539
539
  }), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
540
540
  c.stopPropagation();
541
541
  });
542
- }, Lt = new WeakSet(), hi = function(t) {
542
+ }, Lt = new WeakSet(), pi = function(t) {
543
543
  const { __scroller__: e } = this;
544
544
  if (t === "open") {
545
545
  if (this.style.display = "block", e) {
@@ -570,22 +570,22 @@ yt = new WeakSet(), li = function() {
570
570
  this.addEventListener("transitionend", s);
571
571
  }
572
572
  };
573
- Object.assign(ri.prototype, j);
574
- const { MODALS: Be } = window, ut = {}, pi = (n, i, ...t) => {
573
+ Object.assign(li.prototype, j);
574
+ const { MODALS: We } = window, ht = {}, mi = (n, i, ...t) => {
575
575
  if (!i)
576
576
  return;
577
577
  const e = n[i];
578
578
  e && G(e) && e.apply(n, t);
579
- }, mi = (n, ...i) => {
580
- n && G(n) && n.apply(Q, i);
579
+ }, gi = (n, ...i) => {
580
+ n && G(n) && n.apply(V, i);
581
581
  }, Ye = (n, i) => {
582
- const { target: t } = n, e = Be[t] || $(n.target);
583
- e && gi(n, i), e || Os(n, i);
584
- }, gi = (n, i) => {
585
- const { target: t, action: e, on: s, e: o } = n, a = Be[t] || $(n.target);
582
+ const { target: t } = n, e = We[t] || x(n.target);
583
+ e && fi(n, i), e || Ps(n, i);
584
+ }, fi = (n, i) => {
585
+ const { target: t, action: e, on: s, e: o } = n, a = We[t] || x(n.target);
586
586
  switch (["open", "close", "destroy"].forEach((l) => {
587
587
  a.once(l, () => {
588
- i && (i.emit(l, a, o), pi(i, s[l], a, o)), i || mi(s[l], a);
588
+ i && (i.emit(l, a, o), mi(i, s[l], a, o)), i || gi(s[l], a);
589
589
  });
590
590
  }), e) {
591
591
  case "open":
@@ -602,34 +602,34 @@ const { MODALS: Be } = window, ut = {}, pi = (n, i, ...t) => {
602
602
  l === "close" && a.open(), l === "open" && a.close();
603
603
  break;
604
604
  }
605
- }, Os = async (n, i) => {
605
+ }, Ps = async (n, i) => {
606
606
  const { target: t, route: e, container: s, on: o, e: a } = n;
607
607
  if (!e)
608
- return A("modal4", "cannot find target or data-modal-route is not defined");
608
+ return L("modal4", "cannot find target or data-modal-route is not defined");
609
609
  const r = (l, ...c) => {
610
- i && (i.emit(l, ...c), pi(i, o[l], ...c)), i || mi(o[l], ...c);
610
+ i && (i.emit(l, ...c), mi(i, o[l], ...c)), i || gi(o[l], ...c);
611
611
  };
612
- ut[t] || (ut[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
613
- const c = Hs(l), u = $(s) || $(P.SETTINGS.container);
612
+ ht[t] || (ht[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
613
+ const c = Is(l), u = x(s) || x(P.SETTINGS.container);
614
614
  [...c].forEach((g) => {
615
615
  u.append(g);
616
616
  });
617
- const p = Be[t] || $(n.target);
618
- r("complete", p), gi(n, i), delete ut[t];
617
+ const p = We[t] || x(n.target);
618
+ r("complete", p), fi(n, i), delete ht[t];
619
619
  }).catch((l) => {
620
- r("error", l), delete ut[t];
620
+ r("error", l), delete ht[t];
621
621
  }));
622
622
  };
623
- var K, ke, At, fi, St, vi;
623
+ var tt, xe, St, vi, Dt, bi;
624
624
  const B = class B {
625
625
  constructor(i, t = {}) {
626
- h(this, K);
627
- h(this, At);
626
+ h(this, tt);
628
627
  h(this, St);
628
+ h(this, Dt);
629
629
  this.__storage__ = {
630
630
  el: i,
631
631
  options: t
632
- }, this.active = "data-modal-active", d(this, K, ke).call(this);
632
+ }, this.active = "data-modal-active", d(this, tt, xe).call(this);
633
633
  }
634
634
  destroy() {
635
635
  const { elements: i } = this;
@@ -639,7 +639,7 @@ const B = class B {
639
639
  }
640
640
  update() {
641
641
  var i;
642
- return d(i = this.destroy(), K, ke).call(i), this.emit("update"), this;
642
+ return d(i = this.destroy(), tt, xe).call(i), this.emit("update"), this;
643
643
  }
644
644
  /** static method 'open' */
645
645
  static open(i) {
@@ -655,23 +655,23 @@ const B = class B {
655
655
  Object.assign(B.prototype, B.prototype.__methods__);
656
656
  }
657
657
  };
658
- K = new WeakSet(), ke = function() {
658
+ tt = new WeakSet(), xe = function() {
659
659
  const { el: i, options: t } = this.__storage__;
660
- if (!ct(i) || !E(i))
660
+ if (!dt(i) || !E(i))
661
661
  return;
662
662
  const { SETTINGS: e, EVENTS: s } = P;
663
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
663
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
664
664
  for (const [o, a] of Object.entries(this.options.on))
665
665
  this.__events__[o] = [a];
666
- d(this, At, fi).call(this);
667
- }, At = new WeakSet(), fi = function() {
666
+ d(this, St, vi).call(this);
667
+ }, St = new WeakSet(), vi = function() {
668
668
  const { elements: i, options: t } = this;
669
669
  i.forEach((e) => {
670
- e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, St, vi), 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, "");
670
+ e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Dt, bi), 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, "");
671
671
  }), this.emit("init");
672
- }, St = new WeakSet(), vi = function(i) {
673
- const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = Ms(this.getAttribute("data-modal-on"));
674
- o && typeof o != "object" && A("modal4", "data-modal-on must be a json string.");
672
+ }, Dt = new WeakSet(), bi = function(i) {
673
+ const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = qs(this.getAttribute("data-modal-on"));
674
+ o && typeof o != "object" && L("modal4", "data-modal-on must be a json string.");
675
675
  const a = {
676
676
  target: this.getAttribute("data-modal-target") || t.target,
677
677
  action: this.getAttribute("data-modal-action") || t.action,
@@ -684,10 +684,10 @@ K = new WeakSet(), ke = function() {
684
684
  this.addEventListener("click", e);
685
685
  }, 200), Ye(a, s);
686
686
  };
687
- let Q = B;
688
- Object.assign(Q.prototype, j);
689
- customElements.define("modern-modal", ri);
690
- const Ns = (n, i) => {
687
+ let V = B;
688
+ Object.assign(V.prototype, j);
689
+ customElements.define("modern-modal", li);
690
+ const js = (n, i) => {
691
691
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
692
692
  i.forEach((s) => {
693
693
  const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: p, bottom: g } = s.getBoundingClientRect(), m = t * (r / 100), v = t * (l / 100);
@@ -702,22 +702,22 @@ const Ns = (n, i) => {
702
702
  }, a);
703
703
  }
704
704
  });
705
- }, Ps = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
706
- var tt, $e, Dt, yi;
707
- class bi {
705
+ }, zs = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
706
+ var et, $e, kt, wi;
707
+ class yi {
708
708
  constructor(i, t = {}) {
709
- h(this, tt);
710
- h(this, Dt);
709
+ h(this, et);
710
+ h(this, kt);
711
711
  this.__storage__ = {
712
712
  el: i,
713
713
  options: t
714
- }, this.active = "data-aost-active", d(this, tt, $e).call(this);
714
+ }, this.active = "data-aost-active", d(this, et, $e).call(this);
715
715
  }
716
716
  destroy(i) {
717
717
  const { elements: t, options: e } = this;
718
718
  if (!t)
719
719
  return this;
720
- const { scroller: s } = e, o = s === window || !E(s) ? window : $(s);
720
+ const { scroller: s } = e, o = s === window || !E(s) ? window : x(s);
721
721
  return o.aost && (o.removeEventListener("scroll", o.aost.eventHandler), delete o.aost), t.forEach((a) => {
722
722
  if (!a.aost)
723
723
  return;
@@ -727,58 +727,58 @@ class bi {
727
727
  }
728
728
  update(i) {
729
729
  var t;
730
- d(t = this.destroy(i), tt, $e).call(t);
730
+ d(t = this.destroy(i), et, $e).call(t);
731
731
  }
732
732
  }
733
- tt = new WeakSet(), $e = function() {
733
+ et = new WeakSet(), $e = function() {
734
734
  const { el: i, options: t } = this.__storage__;
735
- if (!ct(i) || !E(i))
735
+ if (!dt(i) || !E(i))
736
736
  return;
737
- const { SETTINGS: e, EVENTS: s } = ti;
738
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
737
+ const { SETTINGS: e, EVENTS: s } = ei;
738
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
739
739
  for (const [o, a] of Object.entries(this.options.on))
740
740
  this.__events__[o] = [a];
741
- d(this, Dt, yi).call(this);
742
- }, Dt = new WeakSet(), yi = function() {
743
- const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !E(e) ? window : $(e);
741
+ d(this, kt, wi).call(this);
742
+ }, kt = new WeakSet(), wi = function() {
743
+ const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !E(e) ? window : x(e);
744
744
  this.eventHandler = () => {
745
- Ns(s, i);
745
+ js(s, i);
746
746
  }, i.forEach((a) => {
747
- a.aost = {}, a.aost.class = a.getAttribute("data-aost-class") || t.class, a.aost.delay = parseInt(a.getAttribute("data-aost-delay")) || t.delay, a.aost.start = parseInt(a.getAttribute("data-aost-start")) || t.start, a.aost.end = parseInt(a.getAttribute("data-aost-end")) || t.end, a.aost.repeat = Ps(a.getAttribute("data-aost-repeat"), t), a.aost.methods = {}, a.aost.methods.destroy = this.destroy, a.aost.methods.update = this.update, a.aost.instance = this, a.setAttribute(this.active, "");
747
+ a.aost = {}, a.aost.class = a.getAttribute("data-aost-class") || t.class, a.aost.delay = parseInt(a.getAttribute("data-aost-delay")) || t.delay, a.aost.start = parseInt(a.getAttribute("data-aost-start")) || t.start, a.aost.end = parseInt(a.getAttribute("data-aost-end")) || t.end, a.aost.repeat = zs(a.getAttribute("data-aost-repeat"), t), a.aost.methods = {}, a.aost.methods.destroy = this.destroy, a.aost.methods.update = this.update, a.aost.instance = this, a.setAttribute(this.active, "");
748
748
  });
749
749
  const { eventHandler: o } = this;
750
750
  o(), s.aost = {}, s.aost.eventHandler = o, s.addEventListener("scroll", s.aost.eventHandler, !1);
751
751
  };
752
- Object.assign(bi.prototype, j);
753
- const js = (n) => {
754
- const { TEMPLATE: i } = je, { childDom: t } = n, e = document.createElement("div");
752
+ Object.assign(yi.prototype, j);
753
+ const Bs = (n) => {
754
+ const { TEMPLATE: i } = ze, { childDom: t } = n, e = document.createElement("div");
755
755
  e.innerHTML = i();
756
756
  const s = e.querySelector(".player-wrapper");
757
757
  return [...t].forEach((o) => {
758
758
  s.append(o);
759
759
  }), e.children[0];
760
760
  };
761
- var kt, wi, $t, Ti, xt, Ei, _t, Li, Ct, Ai, Ht, Si, Mt, Di, It, ki, qt, $i, Ot, xi;
762
- class zs extends HTMLElement {
761
+ var xt, Ti, $t, Ei, _t, Ai, Ct, Li, Ht, Si, Mt, Di, It, ki, qt, xi, Ot, $i, Nt, _i;
762
+ class Ws extends HTMLElement {
763
763
  constructor() {
764
764
  super();
765
- h(this, kt);
766
- h(this, $t);
767
765
  h(this, xt);
768
- // youtube iframe
766
+ h(this, $t);
769
767
  h(this, _t);
770
- // vimeo iframe
768
+ // youtube iframe
771
769
  h(this, Ct);
772
- // youku iframe
770
+ // vimeo iframe
773
771
  h(this, Ht);
772
+ // youku iframe
774
773
  h(this, Mt);
775
- // 2025.02.11 新增 ig
776
774
  h(this, It);
777
- // 2025.02.11 新增 tiktok
775
+ // 2025.02.11 新增 ig
778
776
  h(this, qt);
779
- // 2026.01.15 新增 video
777
+ // 2025.02.11 新增 tiktok
780
778
  h(this, Ot);
781
- d(this, kt, wi).call(this);
779
+ // 2026.01.15 新增 video
780
+ h(this, Nt);
781
+ d(this, xt, Ti).call(this);
782
782
  }
783
783
  play() {
784
784
  const { videoType: t } = this;
@@ -815,15 +815,15 @@ class zs extends HTMLElement {
815
815
  }
816
816
  }
817
817
  }
818
- kt = new WeakSet(), wi = function() {
818
+ xt = new WeakSet(), Ti = function() {
819
819
  if (!this.getAttribute("video-id")) {
820
- A("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
820
+ L("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
821
821
  return;
822
822
  }
823
- this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.videoMode = this.getAttribute("video-mode"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), this.videoInboxImg = this.getAttribute("video-inbox-img"), d(this, $t, Ti).call(this);
824
- }, $t = new WeakSet(), Ti = function() {
825
- this.childDom = this.childNodes, this.template = js(this), this.innerHTML = "", this.append(this.template), d(this, xt, Ei).call(this);
826
- }, xt = new WeakSet(), Ei = function() {
823
+ this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.videoMode = this.getAttribute("video-mode"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), this.videoInboxImg = this.getAttribute("video-inbox-img"), d(this, $t, Ei).call(this);
824
+ }, $t = new WeakSet(), Ei = function() {
825
+ this.childDom = this.childNodes, this.template = Bs(this), this.innerHTML = "", this.append(this.template), d(this, _t, Ai).call(this);
826
+ }, _t = new WeakSet(), Ai = function() {
827
827
  const { videoType: t, videoMode: e } = this;
828
828
  let s = "";
829
829
  function o(a) {
@@ -849,70 +849,72 @@ kt = new WeakSet(), wi = function() {
849
849
  case "youtubeAPI":
850
850
  break;
851
851
  case "youtube":
852
- document.body.wd_youtube == !1 ? o("video-player") : s = d(this, _t, Li).call(this);
852
+ document.body.wd_youtube == !1 ? o("video-player") : s = d(this, Ct, Li).call(this);
853
853
  break;
854
854
  case "youkuAPI":
855
855
  break;
856
856
  case "youku":
857
- document.body.wd_youku == !1 ? o("video-player") : s = d(this, Ht, Si).call(this);
857
+ document.body.wd_youku == !1 ? o("video-player") : s = d(this, Mt, Di).call(this);
858
858
  break;
859
859
  case "vimeo":
860
- document.body.wd_vimeo == !1 ? o("video-player") : s = d(this, Ct, Ai).call(this);
860
+ document.body.wd_vimeo == !1 ? o("video-player") : s = d(this, Ht, Si).call(this);
861
861
  break;
862
862
  case "bilibili":
863
- document.body.wd_bilibili == !1 ? o("video-player") : s = d(this, Mt, Di).call(this);
863
+ document.body.wd_bilibili == !1 ? o("video-player") : s = d(this, It, ki).call(this);
864
864
  break;
865
865
  case "instagram":
866
- document.body.wd_instagram == !1 ? o(".instagram-media") : s = d(this, It, ki).call(this);
866
+ document.body.wd_instagram == !1 ? o(".instagram-media") : s = d(this, qt, xi).call(this);
867
867
  break;
868
868
  case "tiktok":
869
- document.body.wd_tiktok == !1 ? o("video-player") : s = d(this, qt, $i).call(this);
869
+ document.body.wd_tiktok == !1 ? o("video-player") : s = d(this, Ot, $i).call(this);
870
870
  break;
871
871
  case "videojs":
872
872
  break;
873
873
  case "video":
874
- s = d(this, Ot, xi).call(this);
874
+ s = d(this, Nt, _i).call(this);
875
875
  break;
876
876
  }
877
877
  this.querySelector(".player-wrapper").insertAdjacentHTML(S.prepend, s);
878
- }, _t = new WeakSet(), Li = function() {
878
+ }, Ct = new WeakSet(), Li = function() {
879
879
  const { videoId: t, autoplay: e, startTime: s } = this;
880
880
  return `<iframe src="https://www.youtube.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}&start=${s}&mute=1&loop=1&enablejsapi=1" frameborder="0" allowfullscreen="0" volumn="0" allow="${e === "on" ? "autoplay;" : ""} encrypted-media; gyroscope; picture-in-picture;"></iframe>`;
881
- }, Ct = new WeakSet(), Ai = function() {
881
+ }, Ht = new WeakSet(), Si = function() {
882
882
  const { videoId: t, autoplay: e, hash: s } = this;
883
883
  return `<iframe src="https://player.vimeo.com/video/${t}?h=${s}&${e === "on" ? "autoplay=1" : ""}&loop=1&color=ffffff&title=0&byline=0&portrait=0" frameborder="0" allow="${e === "on" ? "autoplay;" : ""} fullscreen; picture-in-picture" allowfullscreen></iframe><script src="https://player.vimeo.com/api/player.js"><\/script>`;
884
- }, Ht = new WeakSet(), Si = function() {
884
+ }, Mt = new WeakSet(), Di = function() {
885
885
  const { videoId: t, autoplay: e } = this;
886
886
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
887
- }, Mt = new WeakSet(), Di = function() {
887
+ }, It = new WeakSet(), ki = function() {
888
888
  const { videoId: t, autoplay: e } = this;
889
889
  return `<iframe src="//player.bilibili.com/player.html?bvid=${t}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`;
890
- }, It = new WeakSet(), ki = function() {
890
+ }, qt = new WeakSet(), xi = function() {
891
891
  const { videoId: t, autoplay: e } = this;
892
892
  return `<iframe class="instagram-media instagram-media-rendered" id="instagram-embed-0" src="https://www.instagram.com/p/${t}/embed/" width="num-w" height=" num-h" scrolling="auto" frameborder="0" data-instgrm-payload-id="instagram-media-payload-0"></iframe>`;
893
- }, qt = new WeakSet(), $i = function() {
893
+ }, Ot = new WeakSet(), $i = function() {
894
894
  const { videoId: t, autoplay: e } = this;
895
895
  return `<iframe name="__tt_embed__v79271677875424740" sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-top-navigation allow-same-origin" src="https://www.tiktok.com/player/v1/${t}?&${e === "on" ? "autoplay=1" : ""}"></iframe>`;
896
- }, Ot = new WeakSet(), xi = function() {
896
+ }, Nt = new WeakSet(), _i = function() {
897
897
  const { videoId: t, autoplay: e } = this;
898
898
  return `<video src="${t}" ${e == "on" ? "autoplay" : ""} muted playsinline controls></video>`;
899
899
  };
900
- const Sn = (n) => new Promise((i) => {
901
- let t = setTimeout(() => (clearTimeout(t), i()), n);
902
- });
903
- function _i(n) {
904
- const i = [];
905
- n && n.forEach((t) => {
906
- t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
907
- }), f("html").addClass("scrollLock"), ks(i);
908
- }
900
+ let Z = 0;
909
901
  function Ci(n) {
910
902
  const i = [];
911
- n && n.forEach((t) => {
912
- t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
913
- }), f("html").removeClass("scrollLock"), $s(i);
903
+ return (n || []).forEach((t) => {
904
+ t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(t));
905
+ }), i;
914
906
  }
915
- async function Dn(n = 0) {
907
+ function Hi(n) {
908
+ const i = Ci(n);
909
+ Z += 1, Z === 1 && (document.documentElement.classList.add("scrollLock"), $s(i));
910
+ }
911
+ function Mi(n) {
912
+ if (Z = Math.max(0, Z - 1), Z === 0) {
913
+ const i = Ci(n);
914
+ _s(i), document.documentElement.classList.remove("scrollLock");
915
+ }
916
+ }
917
+ async function kn(n = 0) {
916
918
  if (f(".loading-wrapper").length)
917
919
  return;
918
920
  f("body").append(`
@@ -926,30 +928,30 @@ async function Dn(n = 0) {
926
928
  </div>
927
929
  </div>
928
930
  `), f(".loading-wrapper").delay(n).fadeIn(300).promise().done(function() {
929
- _i();
931
+ Hi();
930
932
  });
931
933
  }
932
- function kn() {
934
+ function xn() {
933
935
  f(".loading-wrapper").fadeOut(300).promise().done(function() {
934
- f(".loading-wrapper").remove(), Ci();
936
+ f(".loading-wrapper").remove(), Mi();
935
937
  });
936
938
  }
937
939
  function $n(n, i) {
938
- new gn(n, i);
940
+ new vn(n, i);
939
941
  }
940
- function Bs() {
941
- const n = document.querySelector("[data-aost]") && new bi("[data-aost]"), i = document.querySelector("[data-anchor-target]") && new ni("[data-anchor-target]"), t = new Ke({ callback_loaded: () => {
942
- } }), e = new ln();
942
+ function Gs() {
943
+ const n = document.querySelector("[data-aost]") && new yi("[data-aost]"), i = document.querySelector("[data-anchor-target]") && new oi("[data-anchor-target]"), t = new ti({ callback_loaded: () => {
944
+ } }), e = new dn();
943
945
  n == null || n.update(), t.update(), e.reValidate(), i == null || i.update();
944
946
  }
945
- function xn(n, i = () => {
947
+ function _n(n, i = () => {
946
948
  }) {
947
949
  f(`[data-tab-content=${n}]`).fadeIn(function() {
948
950
  typeof i == "function" && i();
949
- }).siblings("[data-tab-content]").hide(), Bs();
951
+ }).siblings("[data-tab-content]").hide(), Gs();
950
952
  }
951
- function _n() {
952
- Pe(
953
+ function Cn() {
954
+ je(
953
955
  {
954
956
  target: document.body,
955
957
  cancel: {
@@ -973,28 +975,31 @@ function _n() {
973
975
  }
974
976
  );
975
977
  }
976
- function Cn() {
978
+ function Hn() {
977
979
  window.onpageshow = function(n) {
978
980
  n.persisted && window.location.reload();
979
981
  };
980
982
  }
981
- function Hn() {
983
+ function Mn() {
982
984
  const n = navigator.userAgent;
983
985
  return {
984
986
  BigSurUP: /Mac OS X 10.15/.test(n) || /Mac OS X 10_15_7/.test(n) || /Mac OS X 10_15_8/.test(n) || /Mac OS X 10_15_9/.test(n) || /Mac OS X 11_/.test(n) || /Mac OS X 12_/.test(n)
985
987
  };
986
988
  }
987
- function Mn(n, i) {
989
+ function In(n, i) {
988
990
  f(n).on("click", function() {
989
991
  f(this).toggleClass(i);
990
992
  });
991
993
  }
992
- function In(n, i) {
994
+ function qn(n, i) {
993
995
  f(n).on("click", function() {
994
996
  f(n).not(this).removeClass(i), f(this).addClass(i);
995
997
  });
996
998
  }
997
- function Ws(n, i = 250) {
999
+ const On = (n) => new Promise((i) => {
1000
+ let t = setTimeout(() => (clearTimeout(t), i()), n);
1001
+ });
1002
+ function Rs(n, i = 250) {
998
1003
  let t = null;
999
1004
  return function(...e) {
1000
1005
  let s = this;
@@ -1003,7 +1008,7 @@ function Ws(n, i = 250) {
1003
1008
  }, i);
1004
1009
  };
1005
1010
  }
1006
- function qn(n, i = 250) {
1011
+ function Nn(n, i = 250) {
1007
1012
  let t, e;
1008
1013
  return function() {
1009
1014
  const s = this, o = arguments, a = +/* @__PURE__ */ new Date();
@@ -1012,7 +1017,7 @@ function qn(n, i = 250) {
1012
1017
  }, i)) : (t = a, n.apply(s, o));
1013
1018
  };
1014
1019
  }
1015
- function On() {
1020
+ function Pn() {
1016
1021
  window._g.interval = [], f(".countdown").each((i, t) => {
1017
1022
  const e = Number(f(t).attr("data-seconds")) + 1;
1018
1023
  let s = Math.floor(e / 60) + ":" + e % 60;
@@ -1022,21 +1027,21 @@ function On() {
1022
1027
  }, 1e3);
1023
1028
  });
1024
1029
  }
1025
- function Nn(n = 500) {
1030
+ function jn(n = 500) {
1026
1031
  return new Promise((i, t) => {
1027
1032
  let e = setTimeout(() => {
1028
1033
  clearTimeout(e), i();
1029
1034
  }, n);
1030
1035
  });
1031
1036
  }
1032
- function Pn() {
1037
+ function zn() {
1033
1038
  const n = function() {
1034
1039
  let i = window.innerHeight * 0.01;
1035
1040
  document.documentElement.style.setProperty("--vh", i + "px");
1036
1041
  };
1037
- n(), window.addEventListener("resize", Ws(n));
1042
+ n(), window.addEventListener("resize", Rs(n));
1038
1043
  }
1039
- function jn(n, i, t, e, s) {
1044
+ function Bn(n, i, t, e, s) {
1040
1045
  const o = this, r = f(n).html().split("<br>");
1041
1046
  let l = "", c = 0;
1042
1047
  r.forEach((u, p) => {
@@ -1045,11 +1050,11 @@ function jn(n, i, t, e, s) {
1045
1050
  });
1046
1051
  }), f(n).html(l);
1047
1052
  }
1048
- function zn(n, i) {
1053
+ function Wn(n, i) {
1049
1054
  const t = Math.pow(10, i);
1050
1055
  return Math.round(n * t) / t;
1051
1056
  }
1052
- function Bn(n) {
1057
+ function Gn(n) {
1053
1058
  let i = n.activeIndex, t = n.slides.length;
1054
1059
  if (n.params.loop)
1055
1060
  switch (n.activeIndex) {
@@ -1064,18 +1069,18 @@ function Bn(n) {
1064
1069
  }
1065
1070
  return i;
1066
1071
  }
1067
- function Wn(n, i) {
1072
+ function Rn(n, i) {
1068
1073
  const t = n.$el, e = n.params.grid.rows, s = i || n.params.slidesPerView * e;
1069
1074
  (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());
1070
1075
  }
1071
- function Gn(n) {
1076
+ function Xn(n) {
1072
1077
  n.el.querySelectorAll("img.detect-shade").forEach((i) => {
1073
1078
  i.addEventListener("load", function() {
1074
1079
  detectShade(i);
1075
1080
  });
1076
1081
  });
1077
1082
  }
1078
- function Rn(n) {
1083
+ function Fn(n) {
1079
1084
  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");
1080
1085
  n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
1081
1086
  a.currentTime = 0;
@@ -1083,7 +1088,7 @@ function Rn(n) {
1083
1088
  n.slideNext();
1084
1089
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1085
1090
  }
1086
- function Xn() {
1091
+ function Yn() {
1087
1092
  f(".number-grow").each(function(n, i) {
1088
1093
  const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1089
1094
  let r = "";
@@ -1097,7 +1102,7 @@ function Xn() {
1097
1102
  });
1098
1103
  });
1099
1104
  }
1100
- function Yn() {
1105
+ function Un() {
1101
1106
  f(".letter-grow").each(function(n, i) {
1102
1107
  const t = f(i), s = t.attr("data-letter").split(""), o = () => {
1103
1108
  let a = "";
@@ -1111,46 +1116,46 @@ function Yn() {
1111
1116
  });
1112
1117
  });
1113
1118
  }
1114
- function Fn(n) {
1119
+ function Jn(n) {
1115
1120
  const i = getComputedStyle(n).transform;
1116
1121
  let t = i.match(/^matrix3d\((.+)\)$/);
1117
1122
  return t ? parseFloat(t[1].split(", ")[12]) : (t = i.match(/^matrix\((.+)\)$/), t ? parseFloat(t[1].split(", ")[4]) : 0);
1118
1123
  }
1119
- function Un(n) {
1124
+ function Zn(n) {
1120
1125
  const i = getComputedStyle(n).transform;
1121
1126
  let t = i.match(/^matrix3d\((.+)\)$/);
1122
1127
  return t ? parseFloat(t[1].split(", ")[13]) : (t = i.match(/^matrix\((.+)\)$/), t ? parseFloat(t[1].split(", ")[5]) : 0);
1123
1128
  }
1124
- function Jn(n) {
1129
+ function Qn(n) {
1125
1130
  const i = document.createElement("div");
1126
1131
  return i.innerHTML = n, i.childNodes[0];
1127
1132
  }
1128
- const Fe = (n) => n.videoId !== "" || typeof n.videoId < "u", Gs = (n) => n.$selector.getAttribute("video4-active") === "on", ht = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1129
- var et, _e, Nt, Hi, Pt, Mi, it, Ce, jt, Ii;
1133
+ const Ue = (n) => n.videoId !== "" || typeof n.videoId < "u", Xs = (n) => n.$selector.getAttribute("video4-active") === "on", pt = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1134
+ var it, Ce, Pt, Ii, jt, qi, st, He, zt, Oi;
1130
1135
  const X = class X {
1131
1136
  //*-* 給Article4用的 **//
1132
1137
  constructor(i, t = {}) {
1133
- h(this, et);
1134
- h(this, Nt);
1135
- h(this, Pt);
1136
1138
  h(this, it);
1139
+ h(this, Pt);
1137
1140
  h(this, jt);
1138
- if (!ct(i) && !Ae(i) && !dt(i)) {
1139
- Xe("video4", `找不到該物件 -> ${i}`);
1141
+ h(this, st);
1142
+ h(this, zt);
1143
+ if (!dt(i) && !Se(i) && !ut(i)) {
1144
+ Fe("video4", `找不到該物件 -> ${i}`);
1140
1145
  return;
1141
1146
  }
1142
1147
  this.__storage__ = {
1143
1148
  el: i,
1144
1149
  options: t
1145
- }, this.active = "data-video-active", d(this, et, _e).call(this);
1150
+ }, this.active = "data-video-active", d(this, it, Ce).call(this);
1146
1151
  }
1147
1152
  update() {
1148
- d(this, et, _e).call(this);
1153
+ d(this, it, Ce).call(this);
1149
1154
  }
1150
1155
  };
1151
- et = new WeakSet(), _e = function() {
1152
- const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = je;
1153
- if (t.isGlobal && (X.globalOptions = t), this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign(
1156
+ it = new WeakSet(), Ce = function() {
1157
+ const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = ze;
1158
+ if (t.isGlobal && (X.globalOptions = t), this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign(
1154
1159
  {},
1155
1160
  { LAYOUT: o },
1156
1161
  // 原始 configs 的 LAYOUT
@@ -1163,20 +1168,20 @@ et = new WeakSet(), _e = function() {
1163
1168
  ), this.__events__ = Object.assign({}, s), this.options.on)
1164
1169
  for (const [a, r] of Object.entries(this.options.on))
1165
1170
  this.__events__[a] = [r];
1166
- d(this, Nt, Hi).call(this);
1167
- }, Nt = new WeakSet(), Hi = function() {
1171
+ d(this, Pt, Ii).call(this);
1172
+ }, Pt = new WeakSet(), Ii = function() {
1168
1173
  const { elements: i, options: t } = this;
1169
1174
  i.forEach((e) => {
1170
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, jt, Ii).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Fe(e.video.params) && !Gs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Pt, Mi).call(this, e)), Fe(e.video.params) || Xe("video4", "無法取得影片 ID");
1175
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, zt, Oi).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Ue(e.video.params) && !Xs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, jt, qi).call(this, e)), Ue(e.video.params) || Fe("video4", "無法取得影片 ID");
1171
1176
  }), this.emit("init");
1172
- }, Pt = new WeakSet(), Mi = function(i) {
1177
+ }, jt = new WeakSet(), qi = function(i) {
1173
1178
  const { LAYOUT: t } = this.options, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u, videoHighQualityPic: p } = e;
1174
1179
  if (l === "onBox" || l === "inBox") {
1175
1180
  let g = null;
1176
1181
  if (u === "on") {
1177
- i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), A("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1182
+ i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), L("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1178
1183
  const m = s.querySelector("img"), v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src")), w = t[o] ? t[o] : t[0] || "";
1179
- if (w ? m.insertAdjacentHTML(S.after, w) : A("video4", `找不到對應的 LAYOUT 設定 (No: ${o}),且無預設樣式。`), !v && r == "youtube")
1184
+ if (w ? m.insertAdjacentHTML(S.after, w) : L("video4", `找不到對應的 LAYOUT 設定 (No: ${o}),且無預設樣式。`), !v && r == "youtube")
1180
1185
  p == "on" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`);
1181
1186
  else if (!v && r == "vimeo")
1182
1187
  m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`);
@@ -1194,13 +1199,13 @@ et = new WeakSet(), _e = function() {
1194
1199
  m.setAttribute("src", `${T}`);
1195
1200
  }).catch(function(b) {
1196
1201
  console.log("error");
1197
- }) : A("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1202
+ }) : L("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1198
1203
  }
1199
- c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || A("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, it, Ce), g.addEventListener("click", g.video.eventHandler);
1204
+ c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, He), g.addEventListener("click", g.video.eventHandler);
1200
1205
  } else if (l === "onPage") {
1201
1206
  let g = null;
1202
1207
  if (u == "on") {
1203
- i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), A("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1208
+ i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), L("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1204
1209
  const m = s.querySelector("img");
1205
1210
  m.insertAdjacentHTML(S.after, t[o]);
1206
1211
  const v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
@@ -1209,14 +1214,14 @@ et = new WeakSet(), _e = function() {
1209
1214
  m.setAttribute("src", `${b}`);
1210
1215
  }).catch(function(w) {
1211
1216
  console.log("error");
1212
- }) : v || A("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || A("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1217
+ }) : v || L("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1213
1218
  } else {
1214
- s.innerHTML = ht(e);
1219
+ s.innerHTML = pt(e);
1215
1220
  return;
1216
1221
  }
1217
- g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, it, Ce), g.addEventListener("click", g.video.eventHandler);
1222
+ g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, He), g.addEventListener("click", g.video.eventHandler);
1218
1223
  }
1219
- }, it = new WeakSet(), Ce = function(i) {
1224
+ }, st = new WeakSet(), He = function(i) {
1220
1225
  const { video: t, emit: e } = this, {
1221
1226
  $selector: s,
1222
1227
  videoMode: o,
@@ -1230,7 +1235,7 @@ et = new WeakSet(), _e = function() {
1230
1235
  videoButton: m,
1231
1236
  videoLayoutNo: v,
1232
1237
  videoStartTime: w
1233
- } = t.params, b = new Ke({ callback_loaded: (C) => {
1238
+ } = t.params, b = new ti({ callback_loaded: (C) => {
1234
1239
  } }), T = new URLSearchParams({
1235
1240
  video_mode: o,
1236
1241
  video_type: u,
@@ -1243,21 +1248,21 @@ et = new WeakSet(), _e = function() {
1243
1248
  on: {
1244
1249
  complete(y) {
1245
1250
  var D;
1246
- o == "onBox" && (u == "instagram" ? (y.setAttribute("video-typeStyle", `${u}`), (D = window.instgrm) != null && D.Embeds ? window.instgrm.Embeds.process() : console.log("window.instgrm is undefined")) : (y.querySelector(".modal-content").insertAdjacentHTML("beforeend", ht(t.params)), y.setAttribute("video-typeStyle", `${u}`))), o == "inBox" && y.setAttribute("video-typeStyle", `${u}`);
1251
+ o == "onBox" && (u == "instagram" ? (y.setAttribute("video-typeStyle", `${u}`), (D = window.instgrm) != null && D.Embeds ? window.instgrm.Embeds.process() : console.log("window.instgrm is undefined")) : (y.querySelector(".modal-content").insertAdjacentHTML("beforeend", pt(t.params)), y.setAttribute("video-typeStyle", `${u}`))), o == "inBox" && y.setAttribute("video-typeStyle", `${u}`);
1247
1252
  },
1248
1253
  open(y) {
1249
1254
  var U;
1250
1255
  const D = y.querySelectorAll("[data-overlayscrollbars-viewport]");
1251
- if (b.update(), _i([...D]), o == "onBox" && u == "instagram") {
1252
- const L = document.querySelector("[video-template] .modal-content");
1253
- new ResizeObserver((We) => {
1254
- We[0].contentRect.height > 50 && L.classList.add("active");
1255
- }).observe(L);
1256
+ if (b.update(), Hi([...D]), o == "onBox" && u == "instagram") {
1257
+ const A = document.querySelector("[video-template] .modal-content");
1258
+ new ResizeObserver((Ge) => {
1259
+ Ge[0].contentRect.height > 50 && A.classList.add("active");
1260
+ }).observe(A);
1256
1261
  }
1257
1262
  if (o == "inBox") {
1258
- const L = g || ((U = s.querySelector("img")) == null ? void 0 : U.src);
1263
+ const A = g || ((U = s.querySelector("img")) == null ? void 0 : U.src);
1259
1264
  let z;
1260
- L == null ? z = `
1265
+ A == null ? z = `
1261
1266
  <div
1262
1267
  class="photo-box"
1263
1268
  video-target
@@ -1281,18 +1286,18 @@ et = new WeakSet(), _e = function() {
1281
1286
  >
1282
1287
  <picture>
1283
1288
  <source
1284
- srcset="${L}"
1289
+ srcset="${A}"
1285
1290
  type="image/webp"
1286
1291
  />
1287
1292
  <source
1288
- srcset="${L}"
1293
+ srcset="${A}"
1289
1294
  type="image/jpeg"
1290
1295
  />
1291
- <img src="${L}" alt="" />
1296
+ <img src="${A}" alt="" />
1292
1297
  </picture>
1293
1298
  </div>`, y.querySelector(".video-content").insertAdjacentHTML(S.prepend, z);
1294
- const Ge = y.querySelectorAll("[video-target]");
1295
- Ge.length > 0 && new X(Ge, {
1299
+ const Re = y.querySelectorAll("[video-target]");
1300
+ Re.length > 0 && new X(Re, {
1296
1301
  LAYOUT: t.params.LAYOUT,
1297
1302
  videoLayoutNo: t.params.videoLayoutNo
1298
1303
  });
@@ -1300,24 +1305,24 @@ et = new WeakSet(), _e = function() {
1300
1305
  },
1301
1306
  close(y) {
1302
1307
  const D = y.querySelectorAll("[data-overlayscrollbars-viewport]");
1303
- Ci([...D]);
1308
+ Mi([...D]);
1304
1309
  },
1305
1310
  destroy(y) {
1306
1311
  }
1307
1312
  }
1308
1313
  };
1309
- Q.open(C);
1314
+ V.open(C);
1310
1315
  } else if (o == "onPage")
1311
1316
  if (t.params.videoAutoplay = "on", r == "off") {
1312
1317
  if (s.querySelector("video-player"))
1313
1318
  return;
1314
- s.innerHTML = ht(t.params);
1319
+ s.innerHTML = pt(t.params);
1315
1320
  return;
1316
1321
  } else {
1317
- (s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", ht(t.params));
1322
+ (s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", pt(t.params));
1318
1323
  return;
1319
1324
  }
1320
- }, jt = new WeakSet(), Ii = function(i) {
1325
+ }, zt = new WeakSet(), Oi = function(i) {
1321
1326
  const t = this.options;
1322
1327
  return {
1323
1328
  $selector: i,
@@ -1337,11 +1342,11 @@ et = new WeakSet(), _e = function() {
1337
1342
  videoInboxImg: i.getAttribute("video-inbox-img") || t.videoInboxImgHtml,
1338
1343
  LAYOUT: t.LAYOUT || []
1339
1344
  };
1340
- }, Re(X, "globalOptions", {});
1341
- let xe = X;
1342
- Object.assign(xe.prototype, j);
1343
- customElements.define("video-player", zs);
1344
- const Rs = {
1345
+ }, Xe(X, "globalOptions", {});
1346
+ let _e = X;
1347
+ Object.assign(_e.prototype, j);
1348
+ customElements.define("video-player", Ws);
1349
+ const Fs = {
1345
1350
  "zh-tw": {
1346
1351
  臺北市: [
1347
1352
  ["中正區", "100"],
@@ -2171,9 +2176,9 @@ const Rs = {
2171
2176
  ]
2172
2177
  }
2173
2178
  };
2174
- let Z;
2175
- const Xs = (n) => {
2176
- const { TEMPLATE: i } = ze, { 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");
2179
+ let Q;
2180
+ const Ys = (n) => {
2181
+ const { TEMPLATE: i } = Be, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("d4-icon"), r = n.getAttribute("custom-template");
2177
2182
  e.innerHTML = i(
2178
2183
  s,
2179
2184
  o,
@@ -2186,12 +2191,12 @@ const Xs = (n) => {
2186
2191
  (!p.hasAttribute("data-option") || p.getAttribute("data-option").trim() === "") && p.setAttribute("data-option", p.textContent.trim());
2187
2192
  }) : (!c.hasAttribute("data-option") || c.getAttribute("data-option").trim() === "") && c.setAttribute("data-option", c.textContent.trim())), l.append(c);
2188
2193
  }), e.children[0];
2189
- }, Ys = (n) => {
2194
+ }, Us = (n) => {
2190
2195
  var t;
2191
2196
  const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
2192
2197
  i && i.forEach((e) => {
2193
2198
  const s = document.querySelector(e);
2194
- s || A("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && I(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2199
+ s || L("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && I(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2195
2200
  });
2196
2201
  }, I = (n, i) => {
2197
2202
  const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
@@ -2245,42 +2250,42 @@ const Xs = (n) => {
2245
2250
  break;
2246
2251
  }
2247
2252
  }
2248
- }, Fs = (n) => {
2253
+ }, Js = (n) => {
2249
2254
  const i = n.s.cityLang;
2250
- f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (Z = JSON.parse(f("#newCityData").val())[0], console.log([0])) : Z = Rs, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Z[i]).forEach((t) => {
2255
+ f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (Q = JSON.parse(f("#newCityData").val())[0], console.log([0])) : Q = Fs, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Q[i]).forEach((t) => {
2251
2256
  const e = document.createElement("li");
2252
2257
  e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
2253
2258
  }), n.s.allLi = n.querySelectorAll(".dropdown-list li"));
2254
- }, Us = (n, i) => {
2259
+ }, Zs = (n, i) => {
2255
2260
  const t = n.s.cityLang;
2256
- Z[t][i].forEach((e, s) => {
2261
+ Q[t][i].forEach((e, s) => {
2257
2262
  const o = document.createElement("li");
2258
2263
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
2259
2264
  });
2260
- }, qi = () => {
2261
- x('dropdown-el[d4-status="open"]').forEach((i) => {
2265
+ }, Ni = () => {
2266
+ $('dropdown-el[d4-status="open"]').forEach((i) => {
2262
2267
  i.close();
2263
2268
  });
2264
- }, Js = () => {
2265
- const { SETTINGS: n } = ze;
2269
+ }, Qs = () => {
2270
+ const { SETTINGS: n } = Be;
2266
2271
  ((t, e) => {
2267
2272
  Object.keys(e).forEach((s) => {
2268
2273
  t.style.setProperty(`--${s}`, e[s]);
2269
2274
  });
2270
2275
  })(document.documentElement, n.scrollbar);
2271
2276
  };
2272
- Js();
2277
+ Qs();
2273
2278
  document.addEventListener("click", function() {
2274
- qi();
2279
+ Ni();
2275
2280
  });
2276
- var zt, Ni, Bt, Pi, Wt, ji, Gt, zi;
2277
- class Oi extends HTMLElement {
2281
+ var Bt, ji, Wt, zi, Gt, Bi, Rt, Wi;
2282
+ class Pi extends HTMLElement {
2278
2283
  constructor() {
2279
2284
  super();
2280
- h(this, zt);
2281
2285
  h(this, Bt);
2282
2286
  h(this, Wt);
2283
2287
  h(this, Gt);
2288
+ h(this, Rt);
2284
2289
  this.initialize = !1;
2285
2290
  }
2286
2291
  static get observedAttributes() {
@@ -2326,11 +2331,11 @@ class Oi extends HTMLElement {
2326
2331
  }
2327
2332
  connectedCallback() {
2328
2333
  const t = this;
2329
- t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, zt, Ni).call(this));
2334
+ t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, Bt, ji).call(this));
2330
2335
  }
2331
2336
  open() {
2332
2337
  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;
2333
- return qi(), t.setAttribute("d4-status", "open"), t.setAttribute("d4-default-height", o()), t.style.cssText = `--maxHeight: ${o()}px;`, t.s.dropdownEl.style.cssText = `
2338
+ return Ni(), t.setAttribute("d4-status", "open"), t.setAttribute("d4-default-height", o()), t.style.cssText = `--maxHeight: ${o()}px;`, t.s.dropdownEl.style.cssText = `
2334
2339
  height: ${o()}px;
2335
2340
  z-index: 2;
2336
2341
  `, this;
@@ -2352,14 +2357,14 @@ class Oi extends HTMLElement {
2352
2357
  this.__events__.selectOption();
2353
2358
  }
2354
2359
  }
2355
- zt = new WeakSet(), Ni = function() {
2356
- this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Bt, Pi).call(this);
2357
- }, Bt = new WeakSet(), Pi = function() {
2358
- this.s.childDom = this.childNodes, this.s.template = Xs(this), this.innerHTML = "", this.append(this.s.template), d(this, Wt, ji).call(this);
2359
- }, Wt = new WeakSet(), ji = function() {
2360
+ Bt = new WeakSet(), ji = function() {
2361
+ this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Wt, zi).call(this);
2362
+ }, Wt = new WeakSet(), zi = function() {
2363
+ this.s.childDom = this.childNodes, this.s.template = Ys(this), this.innerHTML = "", this.append(this.s.template), d(this, Gt, Bi).call(this);
2364
+ }, Gt = new WeakSet(), Bi = function() {
2360
2365
  var s;
2361
2366
  const t = this;
2362
- t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Fs(t), t.s.subDropdownTotalH = 0;
2367
+ t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Js(t), t.s.subDropdownTotalH = 0;
2363
2368
  const e = t.getAttribute("d4-value");
2364
2369
  switch (t.s.selectType) {
2365
2370
  case "single":
@@ -2368,7 +2373,7 @@ zt = new WeakSet(), Ni = function() {
2368
2373
  const r = document.querySelector(`dropdown-el[dist-select="${t.id}"]`), l = r ? r.getAttribute("d4-value") !== "" : !1;
2369
2374
  if (r && l) {
2370
2375
  const c = r.getAttribute("d4-value");
2371
- if (Us(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2376
+ if (Zs(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2372
2377
  const u = e.split(",")[1];
2373
2378
  o = t.querySelector(`.dropdown-list li[data-option="${u}"]`), t.setAttribute("d4-value", u);
2374
2379
  }
@@ -2401,8 +2406,8 @@ zt = new WeakSet(), Ni = function() {
2401
2406
  };
2402
2407
  break;
2403
2408
  }
2404
- I(t, t.s.value.index), d(s = t, Gt, zi).call(s), t.classList.add("d4-initialize");
2405
- }, Gt = new WeakSet(), zi = function() {
2409
+ I(t, t.s.value.index), d(s = t, Rt, Wi).call(s), t.classList.add("d4-initialize");
2410
+ }, Rt = new WeakSet(), Wi = function() {
2406
2411
  const t = this;
2407
2412
  t.__events__.dropdownToggle = () => {
2408
2413
  t.addEventListener("click", function(e) {
@@ -2448,7 +2453,7 @@ zt = new WeakSet(), Ni = function() {
2448
2453
  t.s.dropdownEl.addEventListener("transitionend", e);
2449
2454
  }, t.__events__.bindScrollbar = (e = this) => {
2450
2455
  const s = e.querySelector(".dropdown-scroller");
2451
- e.__scroller__ = Pe(s, {
2456
+ e.__scroller__ = je(s, {
2452
2457
  overflowBehavior: {
2453
2458
  x: "hidden"
2454
2459
  }
@@ -2473,11 +2478,11 @@ zt = new WeakSet(), Ni = function() {
2473
2478
  };
2474
2479
  v.addEventListener("transitionend", D);
2475
2480
  } else
2476
- switch (Ys(e), e.s.selectType) {
2481
+ switch (Us(e), e.s.selectType) {
2477
2482
  case "single":
2478
2483
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2479
2484
  const v = e.s.cityLang, w = l.textContent.trim(), b = document.getElementById(e.getAttribute("dist-select"));
2480
- b && (b.querySelector(".dropdown-list").textContent = "", I(b, -1), Z[v][w].forEach((T, C) => {
2485
+ b && (b.querySelector(".dropdown-list").textContent = "", I(b, -1), Q[v][w].forEach((T, C) => {
2481
2486
  const y = document.createElement("li");
2482
2487
  y.textContent = T[0], y.setAttribute("data-option", T[0]), b.querySelector(".dropdown-list").append(y);
2483
2488
  }), e.__events__.selectOption(b));
@@ -2518,9 +2523,9 @@ zt = new WeakSet(), Ni = function() {
2518
2523
  });
2519
2524
  }, t.__events__.dropdownToggle(), t.__events__.bindScrollbar(), t.__events__.selectOption(), t.__events__.filterHandler(), t.__events__.removeTag(), t.__events__.transitionend();
2520
2525
  };
2521
- Object.assign(Oi.prototype, j);
2522
- customElements.define("dropdown-el", Oi);
2523
- function mt(n) {
2526
+ Object.assign(Pi.prototype, j);
2527
+ customElements.define("dropdown-el", Pi);
2528
+ function gt(n) {
2524
2529
  const i = {};
2525
2530
  return [...n.attributes].forEach((t) => {
2526
2531
  if (t.name.includes("duration-")) {
@@ -2529,10 +2534,10 @@ function mt(n) {
2529
2534
  }
2530
2535
  }), Object.keys(i).length === 0 ? null : i;
2531
2536
  }
2532
- function Ue(n) {
2533
- if (mt(n)) {
2537
+ function Je(n) {
2538
+ if (gt(n)) {
2534
2539
  let i;
2535
- const t = Object.keys(mt(n)).map((e) => ({
2540
+ const t = Object.keys(gt(n)).map((e) => ({
2536
2541
  value: e,
2537
2542
  point: e
2538
2543
  }));
@@ -2541,11 +2546,11 @@ function Ue(n) {
2541
2546
  const { point: s, value: o } = t[e];
2542
2547
  window.matchMedia(`(max-width: ${o}px)`).matches && (i = s);
2543
2548
  }
2544
- return i ? Number(mt(n)[i]) : n.s.options.duration;
2549
+ return i ? Number(gt(n)[i]) : n.s.options.duration;
2545
2550
  } else
2546
2551
  return n.s.options.duration;
2547
2552
  }
2548
- function Zs(n) {
2553
+ function Vs(n) {
2549
2554
  const { behavior: i, continual: t, gap: e } = n.s.options, s = n.childNodes, o = document.createElement("div"), a = document.createElement("div");
2550
2555
  o.className = "animate-container", a.className = "animate-item", [...s].forEach((l) => {
2551
2556
  a.append(l);
@@ -2612,20 +2617,20 @@ function H(n) {
2612
2617
  }
2613
2618
  return s;
2614
2619
  }
2615
- function Qs(n) {
2620
+ function Ks(n) {
2616
2621
  let i;
2617
2622
  return function(t) {
2618
2623
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2619
2624
  };
2620
2625
  }
2621
- var Rt, Bi, Xt, Wi, Yt, Gi, Ft, Ri;
2622
- class Vs extends HTMLElement {
2626
+ var Xt, Gi, Ft, Ri, Yt, Xi, Ut, Fi;
2627
+ class tn extends HTMLElement {
2623
2628
  constructor() {
2624
2629
  super();
2625
- h(this, Rt);
2626
2630
  h(this, Xt);
2627
- h(this, Yt);
2628
2631
  h(this, Ft);
2632
+ h(this, Yt);
2633
+ h(this, Ut);
2629
2634
  this.initialize = !1;
2630
2635
  }
2631
2636
  static get observedAttributes() {
@@ -2634,7 +2639,7 @@ class Vs extends HTMLElement {
2634
2639
  attributeChangedCallback(t, e, s) {
2635
2640
  }
2636
2641
  connectedCallback() {
2637
- this.initialize || (this.initialize = !0, d(this, Rt, Bi).call(this));
2642
+ this.initialize || (this.initialize = !0, d(this, Xt, Gi).call(this));
2638
2643
  }
2639
2644
  play() {
2640
2645
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -2643,7 +2648,7 @@ class Vs extends HTMLElement {
2643
2648
  this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
2644
2649
  }
2645
2650
  }
2646
- Rt = new WeakSet(), Bi = function() {
2651
+ Xt = new WeakSet(), Gi = function() {
2647
2652
  const t = {
2648
2653
  direction: this.getAttribute("direction") || M.SETTINGS.direction,
2649
2654
  // up / down / left / right
@@ -2651,7 +2656,7 @@ Rt = new WeakSet(), Bi = function() {
2651
2656
  // normal / alternate / endStop
2652
2657
  duration: Number(this.getAttribute("duration")) || M.SETTINGS.duration,
2653
2658
  // ms
2654
- durationBreakpoints: mt(this) || M.SETTINGS.durationBreakpoints,
2659
+ durationBreakpoints: gt(this) || M.SETTINGS.durationBreakpoints,
2655
2660
  autoplay: this.getAttribute("autoplay") || M.SETTINGS.autoplay,
2656
2661
  // normal / alternate / endStop
2657
2662
  pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : M.SETTINGS.pauseOnMouseenter,
@@ -2660,8 +2665,8 @@ Rt = new WeakSet(), Bi = function() {
2660
2665
  // true / false
2661
2666
  gap: Number(this.getAttribute("gap")) || M.SETTINGS.gap
2662
2667
  };
2663
- this.s = {}, this.s.options = t, this.s.nowDuration = Ue(this), Zs(this), d(this, Xt, Wi).call(this);
2664
- }, Xt = new WeakSet(), Wi = function() {
2668
+ this.s = {}, this.s.options = t, this.s.nowDuration = Je(this), Vs(this), d(this, Ft, Ri).call(this);
2669
+ }, Ft = new WeakSet(), Ri = function() {
2665
2670
  const { direction: t, continual: e, gap: s } = this.s.options;
2666
2671
  switch (t) {
2667
2672
  case "left":
@@ -2673,8 +2678,8 @@ Rt = new WeakSet(), Bi = function() {
2673
2678
  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;`;
2674
2679
  break;
2675
2680
  }
2676
- d(this, Yt, Gi).call(this), d(this, Ft, Ri).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2677
- }, Yt = new WeakSet(), Gi = function() {
2681
+ d(this, Yt, Xi).call(this), d(this, Ut, Fi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2682
+ }, Yt = new WeakSet(), Xi = function() {
2678
2683
  const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
2679
2684
  let c;
2680
2685
  function u() {
@@ -2739,11 +2744,11 @@ Rt = new WeakSet(), Bi = function() {
2739
2744
  }), t.addEventListener("mouseleave", function() {
2740
2745
  t.s.animation && r && t.s.animation.playState === "paused" && t.play();
2741
2746
  });
2742
- }, Ft = new WeakSet(), Ri = function() {
2747
+ }, Ut = new WeakSet(), Fi = function() {
2743
2748
  const t = this;
2744
2749
  function e() {
2745
2750
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
2746
- t.s.nowDuration = Ue(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(H(t).animate1, {
2751
+ t.s.nowDuration = Je(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(H(t).animate1, {
2747
2752
  duration: t.s.nowDuration,
2748
2753
  iterations: 1 / 0
2749
2754
  }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(H(t).animate2, {
@@ -2752,16 +2757,16 @@ Rt = new WeakSet(), Bi = function() {
2752
2757
  iterations: 1 / 0
2753
2758
  }), t.s.cloneAnimation.startTime = o);
2754
2759
  }
2755
- window.addEventListener("resize", Qs(e));
2760
+ window.addEventListener("resize", Ks(e));
2756
2761
  };
2757
- customElements.define("marquee-el", Vs);
2758
- const Je = function(n, i) {
2762
+ customElements.define("marquee-el", tn);
2763
+ const Ze = function(n, i) {
2759
2764
  let t;
2760
2765
  return function(e) {
2761
2766
  t && clearTimeout(t), t = setTimeout(n, 200, e);
2762
2767
  };
2763
2768
  }, _ = (n, i) => {
2764
- if (dt(n)) {
2769
+ if (ut(n)) {
2765
2770
  n.forEach((t) => {
2766
2771
  t.classList.add(i);
2767
2772
  });
@@ -2769,7 +2774,7 @@ const Je = function(n, i) {
2769
2774
  }
2770
2775
  n.classList.add(i);
2771
2776
  }, k = (n, i) => {
2772
- if (dt(n)) {
2777
+ if (ut(n)) {
2773
2778
  n.forEach((t) => {
2774
2779
  t.classList.remove(i);
2775
2780
  });
@@ -2777,36 +2782,40 @@ const Je = function(n, i) {
2777
2782
  }
2778
2783
  n.classList.remove(i);
2779
2784
  };
2780
- var Ut, Xi, Jt, Yi, Zt, Fi, st, He, Y, gt, Qt, Ui;
2781
- class Ze {
2785
+ var Jt, Yi, Zt, Ui, Qt, Ji, nt, Me, F, ft, Vt, Zi;
2786
+ class Qe {
2782
2787
  constructor(i) {
2783
2788
  // 初始化
2784
- h(this, Ut);
2785
- // 左右箭頭事件綁定
2786
2789
  h(this, Jt);
2787
- // 左右拖拉事件綁定
2790
+ // 左右箭頭事件綁定
2788
2791
  h(this, Zt);
2792
+ // 左右拖拉事件綁定
2793
+ h(this, Qt);
2789
2794
  // 卷軸位置判斷
2790
- h(this, st);
2795
+ h(this, nt);
2791
2796
  // 隱藏按鈕判斷
2792
- h(this, Y);
2797
+ h(this, F);
2793
2798
  // 選項事件綁定
2794
- h(this, Qt);
2795
- this.$element = i, this.option = i.s.option.drag, d(this, Ut, Xi).call(this);
2799
+ h(this, Vt);
2800
+ this.$element = i, this.option = i.s.option.drag, d(this, Jt, Yi).call(this);
2796
2801
  }
2797
2802
  // 更新 active 位置
2798
2803
  update(i) {
2799
2804
  const t = this.$element.querySelector(".wrapper"), e = t == null ? void 0 : t.querySelector(".active");
2800
- if (e) {
2801
- const s = e.offsetLeft + e.getBoundingClientRect().width / 2 - t.getBoundingClientRect().width / 2;
2802
- t.scrollTo({
2803
- left: s,
2804
- behavior: "smooth"
2805
- });
2805
+ if (e && t) {
2806
+ const s = t.querySelectorAll(".item"), o = e === s[0], a = e === s[s.length - 1];
2807
+ let r = "center";
2808
+ o ? r = "start" : a && (r = "end"), setTimeout(() => {
2809
+ e.scrollIntoView({
2810
+ behavior: "smooth",
2811
+ block: "nearest",
2812
+ inline: r
2813
+ });
2814
+ }, 100);
2806
2815
  }
2807
2816
  }
2808
2817
  }
2809
- Ut = new WeakSet(), Xi = function() {
2818
+ Jt = new WeakSet(), Yi = function() {
2810
2819
  var s, o, a, r;
2811
2820
  const i = this;
2812
2821
  if (!i.$element)
@@ -2815,10 +2824,10 @@ Ut = new WeakSet(), Xi = function() {
2815
2824
  let t = !1;
2816
2825
  const e = () => {
2817
2826
  t || (requestAnimationFrame(() => {
2818
- d(this, st, He).call(this), d(this, Y, gt).call(this), t = !1;
2827
+ d(this, nt, Me).call(this), d(this, F, ft).call(this), t = !1;
2819
2828
  }), t = !0);
2820
2829
  };
2821
- i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, Zt, Fi).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2830
+ i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, Qt, Ji).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2822
2831
  S.prepend,
2823
2832
  `<div class="navigation">
2824
2833
  <div class="button prev">
@@ -2828,10 +2837,10 @@ Ut = new WeakSet(), Xi = function() {
2828
2837
  <div></div>
2829
2838
  </div>
2830
2839
  </div>`
2831
- ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Jt, Yi).call(a)), d(r = i, Qt, Ui).call(r), i.update(), requestAnimationFrame(() => {
2832
- d(this, st, He).call(this), d(this, Y, gt).call(this);
2840
+ ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Zt, Ui).call(a)), d(r = i, Vt, Zi).call(r), i.update(), requestAnimationFrame(() => {
2841
+ d(this, nt, Me).call(this), d(this, F, ft).call(this);
2833
2842
  });
2834
- }, Jt = new WeakSet(), Yi = function() {
2843
+ }, Zt = new WeakSet(), Ui = function() {
2835
2844
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2836
2845
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
2837
2846
  t.scrollTo({
@@ -2839,13 +2848,13 @@ Ut = new WeakSet(), Xi = function() {
2839
2848
  behavior: "smooth"
2840
2849
  }), setTimeout(() => {
2841
2850
  var r;
2842
- d(r = i, Y, gt).call(r);
2851
+ d(r = i, F, ft).call(r);
2843
2852
  }, 100);
2844
2853
  };
2845
2854
  e.forEach((o) => {
2846
2855
  o.removeEventListener("click", s), o.addEventListener("click", s);
2847
2856
  });
2848
- }, Zt = new WeakSet(), Fi = function() {
2857
+ }, Qt = new WeakSet(), Ji = function() {
2849
2858
  const { $wrapper: i } = this;
2850
2859
  let t = !1, e = !1, s = 0, o = 0;
2851
2860
  const a = function(p) {
@@ -2875,10 +2884,10 @@ Ut = new WeakSet(), Xi = function() {
2875
2884
  i.querySelectorAll("a").forEach((p) => {
2876
2885
  p.removeEventListener("click", u), p.addEventListener("click", u);
2877
2886
  });
2878
- }, st = new WeakSet(), He = function() {
2887
+ }, nt = new WeakSet(), Me = function() {
2879
2888
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
2880
2889
  e <= 0 || (_(i, "scrollable"), s == 0 ? (k(i, "scrollable"), _(t, "start"), k(t, "end")) : s + 1 >= e ? (k(i, "scrollable"), k(t, "start"), _(t, "end")) : (_(t, "center"), k(t, "start"), k(t, "end")));
2881
- }, Y = new WeakSet(), gt = function() {
2890
+ }, F = new WeakSet(), ft = function() {
2882
2891
  const { $wrapper: i, $button: t, $element: e } = this;
2883
2892
  if (!t)
2884
2893
  return;
@@ -2900,7 +2909,7 @@ Ut = new WeakSet(), Xi = function() {
2900
2909
  }
2901
2910
  k(a, "hide");
2902
2911
  }) : k(t, "hide");
2903
- }, Qt = new WeakSet(), Ui = function() {
2912
+ }, Vt = new WeakSet(), Zi = function() {
2904
2913
  const { $element: i } = this, t = (s) => {
2905
2914
  if (this.option.selected) {
2906
2915
  const o = s.getAttribute("data-option").trim();
@@ -2914,31 +2923,31 @@ Ut = new WeakSet(), Xi = function() {
2914
2923
  s.removeEventListener("click", e), s.addEventListener("click", e);
2915
2924
  });
2916
2925
  };
2917
- var Vt, Ji, Kt, Zi, te, Qi, ee, Vi;
2918
- class Ks {
2926
+ var Kt, Qi, te, Vi, ee, Ki, ie, ts;
2927
+ class en {
2919
2928
  constructor(i) {
2920
2929
  // 初始化
2921
- h(this, Vt);
2922
- // 隱藏按鈕判斷
2923
2930
  h(this, Kt);
2924
- // 展開箭頭事件綁定
2931
+ // 隱藏按鈕判斷
2925
2932
  h(this, te);
2926
- // 選項事件綁定
2933
+ // 展開箭頭事件綁定
2927
2934
  h(this, ee);
2928
- this.$element = i, this.option = i.s.option.collapse, d(this, Vt, Ji).call(this);
2935
+ // 選項事件綁定
2936
+ h(this, ie);
2937
+ this.$element = i, this.option = i.s.option.collapse, d(this, Kt, Qi).call(this);
2929
2938
  }
2930
2939
  }
2931
- Vt = new WeakSet(), Ji = function() {
2932
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Kt, Zi).call(this) && d(this, te, Qi).call(this), d(this, ee, Vi).call(this));
2933
- }, Kt = new WeakSet(), Zi = function() {
2940
+ Kt = new WeakSet(), Qi = function() {
2941
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, te, Vi).call(this) && d(this, ee, Ki).call(this), d(this, ie, ts).call(this));
2942
+ }, te = new WeakSet(), Vi = function() {
2934
2943
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2935
2944
  return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(S.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), k(this.$element, "noScrollable"), !0) : (_(this.$element, "noScrollable"), !1);
2936
- }, te = new WeakSet(), Qi = function() {
2945
+ }, ee = new WeakSet(), Ki = function() {
2937
2946
  const { $element: i, $button: t } = this, e = function() {
2938
2947
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
2939
2948
  };
2940
2949
  t.removeEventListener("click", e), t.addEventListener("click", e);
2941
- }, ee = new WeakSet(), Vi = function() {
2950
+ }, ie = new WeakSet(), ts = function() {
2942
2951
  const { $element: i } = this, t = (s, o) => {
2943
2952
  if (i != null && i.classList.contains("expand") ? i == null || i.classList.remove("expand") : i == null || i.classList.add("expand"), this.option.selected) {
2944
2953
  const a = s.getAttribute("data-option").trim();
@@ -2952,20 +2961,20 @@ Vt = new WeakSet(), Ji = function() {
2952
2961
  s.removeEventListener("click", e), s.addEventListener("click", e);
2953
2962
  });
2954
2963
  };
2955
- const tn = (n) => {
2964
+ const sn = (n) => {
2956
2965
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2957
2966
  return i == "drag" && (s.innerHTML = q.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e)), i == "collapse" && (s.innerHTML = q.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(S.append, e)), i == "dropdown" && (s.innerHTML = q.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(S.append, e)), s.children;
2958
2967
  };
2959
- var ie, Ki, se, ts, nt, Me, F, ft;
2960
- class en extends HTMLElement {
2968
+ var se, es, ne, is, ot, Ie, Y, vt;
2969
+ class nn extends HTMLElement {
2961
2970
  constructor() {
2962
2971
  super();
2963
- h(this, ie);
2964
2972
  h(this, se);
2973
+ h(this, ne);
2965
2974
  // 斷點設定
2966
- h(this, nt);
2975
+ h(this, ot);
2967
2976
  // check type
2968
- h(this, F);
2977
+ h(this, Y);
2969
2978
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
2970
2979
  }
2971
2980
  static get observedAttributes() {
@@ -2977,7 +2986,7 @@ class en extends HTMLElement {
2977
2986
  case "m4-type":
2978
2987
  if (e === null || e === s)
2979
2988
  return;
2980
- this.s.type = s, d(this, F, ft).call(this);
2989
+ this.s.type = s, d(this, Y, vt).call(this);
2981
2990
  break;
2982
2991
  case "m4-status":
2983
2992
  if (e === s)
@@ -2994,13 +3003,13 @@ class en extends HTMLElement {
2994
3003
  }
2995
3004
  }
2996
3005
  connectedCallback() {
2997
- this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, ie, Ki).call(this));
3006
+ this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, se, es).call(this));
2998
3007
  }
2999
3008
  update() {
3000
- d(this, nt, Me).call(this);
3009
+ d(this, ot, Ie).call(this);
3001
3010
  }
3002
3011
  }
3003
- ie = new WeakSet(), Ki = function() {
3012
+ se = new WeakSet(), es = function() {
3004
3013
  let t = {};
3005
3014
  this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? q.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
3006
3015
  const e = (s) => {
@@ -3011,84 +3020,84 @@ ie = new WeakSet(), Ki = function() {
3011
3020
  }
3012
3021
  this.update();
3013
3022
  };
3014
- window.removeEventListener("resize", Je(e)), window.addEventListener("resize", Je(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, q.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, q.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, q.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, q.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, se, ts).call(this);
3015
- }, se = new WeakSet(), ts = function() {
3016
- this.classList.add("m4-init"), d(this, nt, Me).call(this);
3017
- }, nt = new WeakSet(), Me = function() {
3023
+ window.removeEventListener("resize", Ze(e)), window.addEventListener("resize", Ze(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, q.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, q.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, q.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, q.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, ne, is).call(this);
3024
+ }, ne = new WeakSet(), is = function() {
3025
+ this.classList.add("m4-init"), d(this, ot, Ie).call(this);
3026
+ }, ot = new WeakSet(), Ie = function() {
3018
3027
  const t = Object.keys(this.s.option.breakpoint);
3019
3028
  if (!t.length) {
3020
- d(this, F, ft).call(this);
3029
+ d(this, Y, vt).call(this);
3021
3030
  return;
3022
3031
  }
3023
3032
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
3024
3033
  var s, o, a, r;
3025
- return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, F, ft).call(this), window.innerWidth >= e;
3034
+ return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, Y, vt).call(this), window.innerWidth >= e;
3026
3035
  });
3027
- }, F = new WeakSet(), ft = function() {
3036
+ }, Y = new WeakSet(), vt = function() {
3028
3037
  var o;
3029
3038
  const { type: t } = this.s;
3030
- this.innerHTML = "", [...tn(this)].forEach((a) => {
3039
+ this.innerHTML = "", [...sn(this)].forEach((a) => {
3031
3040
  this.append(a);
3032
3041
  });
3033
3042
  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")}"]`);
3034
3043
  switch (e == null || e.classList.add("active"), s == null || s.classList.add("active"), t) {
3035
3044
  case "drag":
3036
- this.drag = new Ze(this);
3045
+ this.drag = new Qe(this);
3037
3046
  break;
3038
3047
  case "collapse":
3039
- this.drag = new Ze(this), this.collapse = new Ks(this);
3048
+ this.drag = new Qe(this), this.collapse = new en(this);
3040
3049
  break;
3041
3050
  }
3042
3051
  (o = this.drag) == null || o.update();
3043
3052
  };
3044
- customElements.define("multipurpose-nav", en);
3045
- var ne, is, oe, ss, ot, Ie, W, J, ae, ns, re, os, le, as, ce, rs, de, ls, ue, cs, he, ds, pe, us, me, hs, N, R, ge, ps, fe, ms, ve, gs, be, fs;
3046
- class es extends HTMLElement {
3053
+ customElements.define("multipurpose-nav", nn);
3054
+ var oe, ns, ae, os, at, qe, W, J, re, as, le, rs, ce, ls, de, cs, ue, ds, he, us, pe, hs, me, ps, ge, ms, N, R, fe, gs, ve, fs, be, vs, ye, bs;
3055
+ class ss extends HTMLElement {
3047
3056
  // 定義組件的初始狀態
3048
3057
  constructor(t, e) {
3049
3058
  super();
3050
- h(this, ne);
3051
3059
  h(this, oe);
3060
+ h(this, ae);
3052
3061
  // 第一關 判斷數量以及id設定
3053
- h(this, ot);
3062
+ h(this, at);
3054
3063
  // 第二關 id命名提醒
3055
3064
  h(this, W);
3056
- h(this, ae);
3057
3065
  h(this, re);
3058
3066
  h(this, le);
3067
+ h(this, ce);
3059
3068
  // 執行函式
3060
3069
  // 移動至指定位置
3061
- h(this, ce);
3062
- // 移動
3063
3070
  h(this, de);
3064
- // 步驟狀態
3071
+ // 移動
3065
3072
  h(this, ue);
3066
- // next 按鈕狀態
3073
+ // 步驟狀態
3067
3074
  h(this, he);
3068
- // prev 按鈕狀態
3075
+ // next 按鈕狀態
3069
3076
  h(this, pe);
3070
- // 頁籤狀態
3077
+ // prev 按鈕狀態
3071
3078
  h(this, me);
3079
+ // 頁籤狀態
3080
+ h(this, ge);
3072
3081
  // 第三關各種元件判斷 及 執行
3073
3082
  h(this, N);
3074
3083
  // 消失動畫
3075
- h(this, ge);
3076
- // 出現動畫
3077
3084
  h(this, fe);
3078
- // 狀態
3085
+ // 出現動畫
3079
3086
  h(this, ve);
3080
- // resize
3087
+ // 狀態
3081
3088
  h(this, be);
3089
+ // resize
3090
+ h(this, ye);
3082
3091
  }
3083
3092
  // 當組件的屬性被更改時會被呼叫
3084
3093
  static get observedAttributes() {
3085
3094
  return ["t4-active"];
3086
3095
  }
3087
3096
  attributeChangedCallback(t, e, s) {
3088
- t === "t4-active" && e !== s && d(this, ve, gs).call(this, s);
3097
+ t === "t4-active" && e !== s && d(this, be, vs).call(this, s);
3089
3098
  }
3090
3099
  connectedCallback() {
3091
- this.classList.contains("t4-initialize") || d(this, ne, is).call(this);
3100
+ this.classList.contains("t4-initialize") || d(this, oe, ns).call(this);
3092
3101
  }
3093
3102
  // ------------- 我是分隔線呦 -------------
3094
3103
  // 頁籤切換
@@ -3104,7 +3113,7 @@ class es extends HTMLElement {
3104
3113
  e.activeTab = s, this.setAttribute("t4-active", s);
3105
3114
  const o = d(this, W, J).call(this, s);
3106
3115
  e.tabPanels.forEach((a, r) => {
3107
- r === o ? d(this, fe, ms).call(this, r) : d(this, ge, ps).call(this, r);
3116
+ r === o ? d(this, ve, fs).call(this, r) : d(this, fe, gs).call(this, r);
3108
3117
  });
3109
3118
  }
3110
3119
  // 外部呼叫方法 $0.goNext()
@@ -3119,11 +3128,11 @@ class es extends HTMLElement {
3119
3128
  }
3120
3129
  // 外部呼叫方法 $0.update()
3121
3130
  update() {
3122
- this.t.tabs = d(this, ot, Ie).call(this), vs(), console.log("tab update!!!!");
3131
+ this.t.tabs = d(this, at, qe).call(this), ys(), console.log("tab update!!!!");
3123
3132
  }
3124
3133
  }
3125
- ne = new WeakSet(), is = function() {
3126
- const t = this.getAttribute("t4-name"), { SETTINGS: e } = ei;
3134
+ oe = new WeakSet(), ns = function() {
3135
+ const t = this.getAttribute("t4-name"), { SETTINGS: e } = ii;
3127
3136
  document.querySelectorAll(`tab-el[t4-name=${t}]`).length > 1 && console.warn(t, "名字有重複喔!!!"), this.t = {
3128
3137
  tabs: [],
3129
3138
  name: t,
@@ -3142,14 +3151,14 @@ ne = new WeakSet(), is = function() {
3142
3151
  delay: this.getAttribute("t4-delay") || e.transition.delay
3143
3152
  },
3144
3153
  tabGroup: this.getAttribute("t4-group") || e.tabGroup
3145
- }, this.__events__ = {}, this.t.tabs = d(this, ot, Ie).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, oe, ss).call(this);
3146
- }, oe = new WeakSet(), ss = function() {
3147
- if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, ae, ns).call(this), this.t.recordUrl) {
3154
+ }, this.__events__ = {}, this.t.tabs = d(this, at, qe).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, ae, os).call(this);
3155
+ }, ae = new WeakSet(), os = function() {
3156
+ if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, re, as).call(this), this.t.recordUrl) {
3148
3157
  const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
3149
3158
  e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
3150
3159
  }
3151
- this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, be, fs).call(this);
3152
- }, ot = new WeakSet(), Ie = function() {
3160
+ this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, ye, bs).call(this);
3161
+ }, at = new WeakSet(), qe = function() {
3153
3162
  const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
3154
3163
  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) => {
3155
3164
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
@@ -3159,19 +3168,19 @@ ne = new WeakSet(), is = function() {
3159
3168
  s.length > 1 && console.warn("有兩個相同id設定", s);
3160
3169
  const o = s[0];
3161
3170
  return o ? e.tabPanels.indexOf(o) : (console.warn(`找不到t4-id為${t}的頁籤`), 0);
3162
- }, ae = new WeakSet(), ns = function() {
3171
+ }, re = new WeakSet(), as = function() {
3163
3172
  const t = document.createElement("div");
3164
3173
  t.classList.add("swiper-container");
3165
3174
  const e = document.createElement("div");
3166
3175
  e.classList.add("swiper-wrapper"), this.t.tabPanels.forEach((s) => {
3167
3176
  e.appendChild(s.cloneNode(!0));
3168
- }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, re, os).call(this);
3169
- }, re = new WeakSet(), os = function() {
3177
+ }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, le, rs).call(this);
3178
+ }, le = new WeakSet(), rs = function() {
3170
3179
  const t = this.querySelector(".swiper-container"), e = this.querySelector(".swiper-wrapper"), s = this.t.tabPanels;
3171
3180
  t.style.overflow = "hidden", e.style.display = "flex";
3172
3181
  const o = s.length * 100 + "%";
3173
3182
  e.style.width = o;
3174
- }, le = new WeakSet(), as = function(t) {
3183
+ }, ce = new WeakSet(), ls = function(t) {
3175
3184
  const { t: e } = this;
3176
3185
  if (e.recordUrl === "true") {
3177
3186
  const s = new URLSearchParams(document.location.search);
@@ -3179,28 +3188,28 @@ ne = new WeakSet(), is = function() {
3179
3188
  const o = `${window.location.pathname}?${s.toString()}`;
3180
3189
  history.replaceState({ t4Id: t }, "", o);
3181
3190
  }
3182
- }, ce = new WeakSet(), rs = function() {
3191
+ }, de = new WeakSet(), cs = function() {
3183
3192
  const t = parseInt(this.t.gap, 10), e = window.pageYOffset, o = this.getBoundingClientRect().top + e - t;
3184
- d(this, de, ls).call(this, o);
3185
- }, de = new WeakSet(), ls = function(t) {
3193
+ d(this, ue, ds).call(this, o);
3194
+ }, ue = new WeakSet(), ds = function(t) {
3186
3195
  window.scrollTo({
3187
3196
  top: t,
3188
3197
  behavior: "smooth"
3189
3198
  });
3190
- }, ue = new WeakSet(), cs = function(t) {
3199
+ }, he = new WeakSet(), us = function(t) {
3191
3200
  let e = parseInt(t, 10) + 1;
3192
3201
  this.t.step.textContent = `${e}`, this.t.step.setAttribute("now-page", e);
3193
- }, he = new WeakSet(), ds = function(t) {
3202
+ }, pe = new WeakSet(), hs = function(t) {
3194
3203
  const e = document.querySelectorAll(`[t4-role="next"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === this.t.tabPanels.length - 1;
3195
3204
  e.forEach((a) => {
3196
3205
  s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
3197
3206
  });
3198
- }, pe = new WeakSet(), us = function(t) {
3207
+ }, me = new WeakSet(), ps = function(t) {
3199
3208
  const e = document.querySelectorAll(`[t4-role="prev"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === 0;
3200
3209
  e.forEach((a) => {
3201
3210
  s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
3202
3211
  });
3203
- }, me = new WeakSet(), hs = function(t, e) {
3212
+ }, ge = new WeakSet(), ms = function(t, e) {
3204
3213
  this.t.tabGroup === "true" ? this.t.tabs.forEach((s, o) => {
3205
3214
  o == t ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
3206
3215
  }) : this.t.tabs.forEach((s, o) => {
@@ -3209,25 +3218,25 @@ ne = new WeakSet(), is = function() {
3209
3218
  }, N = new WeakSet(), R = function(t, e, s) {
3210
3219
  switch (t) {
3211
3220
  case "step":
3212
- Ae(this.t.step) && d(this, ue, cs).call(this, e);
3221
+ Se(this.t.step) && d(this, he, us).call(this, e);
3213
3222
  break;
3214
3223
  case "eventAnchor":
3215
- this.t.anchor && d(this, ce, rs).call(this);
3224
+ this.t.anchor && d(this, de, cs).call(this);
3216
3225
  break;
3217
3226
  case "tabState":
3218
- this.t.type == "normal" && d(this, me, hs).call(this, e, s);
3227
+ this.t.type == "normal" && d(this, ge, ms).call(this, e, s);
3219
3228
  break;
3220
3229
  case "btnState":
3221
- d(this, he, ds).call(this, e), d(this, pe, us).call(this, e);
3230
+ d(this, pe, hs).call(this, e), d(this, me, ps).call(this, e);
3222
3231
  break;
3223
3232
  case "tabUrl":
3224
- this.t.recordUrl === "true" && d(this, le, as).call(this, e);
3233
+ this.t.recordUrl === "true" && d(this, ce, ls).call(this, e);
3225
3234
  break;
3226
3235
  default:
3227
3236
  console.warn("請增加判斷,謝謝");
3228
3237
  break;
3229
3238
  }
3230
- }, ge = new WeakSet(), ps = function(t) {
3239
+ }, fe = new WeakSet(), gs = function(t) {
3231
3240
  const { t: e } = this;
3232
3241
  this.t.transition;
3233
3242
  const s = e.tabPanels[t];
@@ -3244,7 +3253,7 @@ ne = new WeakSet(), is = function() {
3244
3253
  s.style.display = "none";
3245
3254
  break;
3246
3255
  }
3247
- }, fe = new WeakSet(), ms = function(t) {
3256
+ }, ve = new WeakSet(), fs = function(t) {
3248
3257
  const { duration: e, timing: s, delay: o } = this.t.transition, a = this.t.tabPanels[t];
3249
3258
  let r;
3250
3259
  switch (a.classList.add("show"), a.classList.remove("hide"), a.style.transition = `opacity ${e}ms ${s} ${o}ms`, a.style.display = "block", this.t.display) {
@@ -3269,25 +3278,25 @@ ne = new WeakSet(), is = function() {
3269
3278
  console.warn(this.t.display, "沒有這個效果請自己想辦法!!!!");
3270
3279
  break;
3271
3280
  }
3272
- }, ve = new WeakSet(), gs = function(t) {
3281
+ }, be = new WeakSet(), vs = function(t) {
3273
3282
  const e = d(this, W, J).call(this, t);
3274
3283
  d(this, N, R).call(this, "step", e), d(this, N, R).call(this, "btnState", e), d(this, N, R).call(this, "tabState", e, t), d(this, N, R).call(this, "tabUrl", t), this.emit("change");
3275
- }, be = new WeakSet(), fs = function() {
3284
+ }, ye = new WeakSet(), bs = function() {
3276
3285
  const t = this;
3277
3286
  window.addEventListener(
3278
3287
  "resize",
3279
- sn(() => {
3288
+ on(() => {
3280
3289
  t.update();
3281
3290
  }, 1e3)
3282
3291
  );
3283
3292
  };
3284
- function sn(n, i = 1e3) {
3293
+ function on(n, i = 1e3) {
3285
3294
  let t;
3286
3295
  return function(e) {
3287
3296
  t && clearTimeout(t), t = setTimeout(n, i, e);
3288
3297
  };
3289
3298
  }
3290
- function vs() {
3299
+ function ys() {
3291
3300
  const n = document.querySelectorAll("[t4-control]");
3292
3301
  document.addEventListener("click", function(i) {
3293
3302
  let t = !1;
@@ -3317,91 +3326,91 @@ function vs() {
3317
3326
  }
3318
3327
  });
3319
3328
  }
3320
- vs();
3321
- Object.assign(es.prototype, j);
3322
- customElements.define("tab-el", es);
3323
- const Qe = (n) => {
3329
+ ys();
3330
+ Object.assign(ss.prototype, j);
3331
+ customElements.define("tab-el", ss);
3332
+ const Ve = (n) => {
3324
3333
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
3325
3334
  n.classList.add(t), o.style.height = 0, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3326
- }, nn = (n) => {
3335
+ }, an = (n) => {
3327
3336
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3328
3337
  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";
3329
3338
  };
3330
- var at, qe, ye, bs, we, ys, rt, Oe;
3331
- class on {
3339
+ var rt, Oe, we, ws, Te, Ts, lt, Ne;
3340
+ class rn {
3332
3341
  constructor(i, t = {}) {
3333
- h(this, at);
3334
- h(this, ye);
3335
- h(this, we);
3336
3342
  h(this, rt);
3337
- !ct(i) && !Ae(i) && !dt(i) && !E(i) || (this.__storage__ = {
3343
+ h(this, we);
3344
+ h(this, Te);
3345
+ h(this, lt);
3346
+ !dt(i) && !Se(i) && !ut(i) && !E(i) || (this.__storage__ = {
3338
3347
  el: i,
3339
3348
  options: t
3340
- }, this.active = "data-collapse-active", d(this, at, qe).call(this));
3349
+ }, this.active = "data-collapse-active", d(this, rt, Oe).call(this));
3341
3350
  }
3342
3351
  update() {
3343
- d(this, at, qe).call(this);
3352
+ d(this, rt, Oe).call(this);
3344
3353
  }
3345
3354
  }
3346
- at = new WeakSet(), qe = function() {
3347
- const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = ii;
3348
- if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3355
+ rt = new WeakSet(), Oe = function() {
3356
+ const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = si;
3357
+ if (this.elements = t.state == "not active" ? $(i + `:not([${this.active}])`) : $(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3349
3358
  for (const [o, a] of Object.entries(this.options.on))
3350
3359
  this.__events__[o] = [a];
3351
- d(this, ye, bs).call(this);
3352
- }, ye = new WeakSet(), bs = function() {
3360
+ d(this, we, ws).call(this);
3361
+ }, we = new WeakSet(), ws = function() {
3353
3362
  const { elements: i, options: t } = this;
3354
3363
  i.forEach((e) => {
3355
- 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, we, ys).call(this, e);
3364
+ 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, Te, Ts).call(this, e);
3356
3365
  }), this.emit("init");
3357
- }, we = new WeakSet(), ys = function(i) {
3366
+ }, Te = new WeakSet(), Ts = function(i) {
3358
3367
  const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3359
- 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, rt, Oe)), c.addEventListener("click", d(this, rt, Oe)), r) {
3368
+ 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, lt, Ne)), c.addEventListener("click", d(this, lt, Ne)), r) {
3360
3369
  const p = (g) => {
3361
3370
  g.stopPropagation();
3362
3371
  };
3363
3372
  u.removeEventListener("click", p), u.addEventListener("click", p);
3364
3373
  }
3365
- }, rt = new WeakSet(), Oe = function() {
3374
+ }, lt = new WeakSet(), Ne = function() {
3366
3375
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3367
3376
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3368
- Qe(l);
3369
- }), nn(r)) : Qe(r), i.emit("afterCollapse");
3377
+ Ve(l);
3378
+ }), an(r)) : Ve(r), i.emit("afterCollapse");
3370
3379
  };
3371
- Object.assign(on.prototype, j);
3372
- function an(n, i) {
3380
+ Object.assign(rn.prototype, j);
3381
+ function ln(n, i) {
3373
3382
  const t = i, { color: e, opacity: s, duration: o } = i.s.options;
3374
3383
  let a = document.createElement("span"), r = n.clientX - t.getBoundingClientRect().left, l = n.clientY - t.getBoundingClientRect().top;
3375
3384
  a.style.cssText = `background: ${e};left: ${r}px;top: ${l}px;opacity: ${s};animation-duration: ${o}ms`, a.classList.add("circle"), t.appendChild(a), setTimeout(function() {
3376
3385
  a.remove();
3377
3386
  }, `${o}`);
3378
3387
  }
3379
- function ws() {
3388
+ function Es() {
3380
3389
  document.querySelectorAll("ripple-btn").forEach((n) => {
3381
3390
  n.querySelector(".hover-ball"), n.style.setProperty("--r", ""), n.classList.remove("entered");
3382
3391
  });
3383
3392
  }
3384
- document.addEventListener("click", ws);
3385
- var lt, Ne, Te, Ts, Ee, Es, Le, Ls;
3386
- class rn extends HTMLElement {
3393
+ document.addEventListener("click", Es);
3394
+ var ct, Pe, Ee, As, Ae, Ls, Le, Ss;
3395
+ class cn extends HTMLElement {
3387
3396
  constructor() {
3388
3397
  super();
3389
- h(this, lt);
3390
- h(this, Te);
3398
+ h(this, ct);
3391
3399
  h(this, Ee);
3400
+ h(this, Ae);
3392
3401
  h(this, Le);
3393
3402
  this.initialize = !1;
3394
3403
  }
3395
3404
  connectedCallback() {
3396
3405
  const t = this;
3397
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, lt, Ne).call(this));
3406
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ct, Pe).call(this));
3398
3407
  }
3399
3408
  update() {
3400
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, lt, Ne).call(this);
3409
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ct, Pe).call(this);
3401
3410
  }
3402
3411
  }
3403
- lt = new WeakSet(), Ne = function() {
3404
- const { SETTINGS: t } = si;
3412
+ ct = new WeakSet(), Pe = function() {
3413
+ const { SETTINGS: t } = ni;
3405
3414
  this.s = {};
3406
3415
  function e(o) {
3407
3416
  let a = !!o;
@@ -3415,20 +3424,20 @@ lt = new WeakSet(), Ne = function() {
3415
3424
  hover: this.getAttribute("r4-hover") ? e(this.getAttribute("r4-hover")) : t.hover,
3416
3425
  click: this.getAttribute("r4-hover-click") ? e(this.getAttribute("r4-hover-click")) : t.click
3417
3426
  };
3418
- this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, Te, Ts).call(this);
3419
- }, Te = new WeakSet(), Ts = function() {
3420
- d(this, Ee, Es).call(this), d(this, Le, Ls).call(this), this.classList.add("r4-initialize");
3421
- }, Ee = new WeakSet(), Es = function() {
3427
+ this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, Ee, As).call(this);
3428
+ }, Ee = new WeakSet(), As = function() {
3429
+ d(this, Ae, Ls).call(this), d(this, Le, Ss).call(this), this.classList.add("r4-initialize");
3430
+ }, Ae = new WeakSet(), Ls = function() {
3422
3431
  const t = this, e = document.createElement("i");
3423
3432
  e.classList.add("hover-ball"), e.style.transitionDuration = `${t.s.options.speed}ms`, t.appendChild(e);
3424
- }, Le = new WeakSet(), Ls = function() {
3433
+ }, Le = new WeakSet(), Ss = function() {
3425
3434
  const t = this.querySelector("i.hover-ball"), e = this;
3426
3435
  e.addEventListener("click", function(a) {
3427
- a.stopPropagation(), e.s.options.click && an(a, e);
3436
+ a.stopPropagation(), e.s.options.click && ln(a, e);
3428
3437
  });
3429
3438
  let s = "ontouchstart" in document.documentElement ? "touchstart" : "mouseenter", o = "ontouchend" in document.documentElement ? "touchend" : "mouseleave";
3430
3439
  e.addEventListener(s, function(a) {
3431
- if (s === "touchstart" && ws(), e.s.options.hover) {
3440
+ if (s === "touchstart" && Es(), e.s.options.hover) {
3432
3441
  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, p = Math.max(c, u);
3433
3442
  t.style.width = p * 2 + "px", t.style.height = p * 2 + "px", t.style.left = r + "px", t.style.top = l + "px", e.classList.add("entered");
3434
3443
  }
@@ -3439,8 +3448,8 @@ lt = new WeakSet(), Ne = function() {
3439
3448
  }
3440
3449
  });
3441
3450
  };
3442
- customElements.define("ripple-btn", rn);
3443
- class ln {
3451
+ customElements.define("ripple-btn", cn);
3452
+ class dn {
3444
3453
  constructor() {
3445
3454
  this.init();
3446
3455
  }
@@ -3492,12 +3501,12 @@ class ln {
3492
3501
  this.init();
3493
3502
  }
3494
3503
  }
3495
- function Ve(n, i) {
3504
+ function Ke(n, i) {
3496
3505
  return n ? function(t, e) {
3497
3506
  Function(n)(t, e);
3498
3507
  } : i;
3499
3508
  }
3500
- function cn(n, i, t, e) {
3509
+ function un(n, i, t, e) {
3501
3510
  const s = i.params, o = n.closest("[data-upload-item]").querySelector("[data-preview]");
3502
3511
  o.querySelector("img") && o.querySelector("img").remove(), o.appendChild(e.imgElement);
3503
3512
  const a = n.dataset.group, r = document.querySelector(i.el).dataset.index;
@@ -3520,7 +3529,7 @@ function cn(n, i, t, e) {
3520
3529
  info: e
3521
3530
  }, s.on.changeAfter && typeof s.on.changeAfter == "function" && s.on.changeAfter(n, e);
3522
3531
  }
3523
- function dn(n, i, t, e) {
3532
+ function hn(n, i, t, e) {
3524
3533
  const s = document.createElement("canvas"), o = s.getContext("2d"), a = i.width, l = i.height / a * 100, c = e / t * 100;
3525
3534
  let u = 0, p = 0;
3526
3535
  switch (s.width = t, s.height = e, n.previewSize) {
@@ -3534,14 +3543,14 @@ function dn(n, i, t, e) {
3534
3543
  const g = (s.width - u) * 0.5, m = (s.height - p) * 0.5;
3535
3544
  return o.drawImage(i, g, m, u, p), s;
3536
3545
  }
3537
- function un(n, i) {
3546
+ function pn(n, i) {
3538
3547
  return new Promise((t, e) => {
3539
3548
  if (i) {
3540
3549
  const s = new Image();
3541
3550
  s.src = i, s.classList.add(n.previewSize), s.onload = () => {
3542
3551
  let o = {
3543
3552
  imgElement: s,
3544
- originalCanvas: dn(n, s, s.width, s.height),
3553
+ originalCanvas: hn(n, s, s.width, s.height),
3545
3554
  info: {
3546
3555
  originalWidth: s.width,
3547
3556
  originalHeight: s.height,
@@ -3554,31 +3563,31 @@ function un(n, i) {
3554
3563
  t();
3555
3564
  });
3556
3565
  }
3557
- function hn(n, i) {
3566
+ function mn(n, i) {
3558
3567
  const t = Math.pow(10, i);
3559
3568
  return Math.round(n * t) / t;
3560
3569
  }
3561
- function pn(n, i) {
3570
+ function gn(n, i) {
3562
3571
  let t = n.size / 1024 / 1024;
3563
- return `${hn(t, 2)}` <= i;
3572
+ return `${mn(t, 2)}` <= i;
3564
3573
  }
3565
- function mn(n, i, t) {
3574
+ function fn(n, i, t) {
3566
3575
  if (n.target.files.length <= 0)
3567
3576
  return;
3568
3577
  const e = n.target.files[0], s = i.closest("[data-upload-item]");
3569
3578
  let o = new FileReader();
3570
3579
  o.onload = (a) => {
3571
3580
  const r = e.type.split("/")[0] === "image" ? a.target.result : null;
3572
- if (t.params.sizeLimit && !pn(e, t.params.sizeLimit)) {
3581
+ if (t.params.sizeLimit && !gn(e, t.params.sizeLimit)) {
3573
3582
  i.value = "", s.classList.add("over-limit"), t.params.on.overLimit && typeof t.params.on.overLimit == "function" && t.params.on.overLimit(i, t.params.sizeLimit);
3574
3583
  return;
3575
3584
  } else
3576
- s.classList.remove("over-limit"), s.classList.add("uploaded"), un(t.params, r).then((l) => {
3577
- cn(i, t, e, l);
3585
+ s.classList.remove("over-limit"), s.classList.add("uploaded"), pn(t.params, r).then((l) => {
3586
+ un(i, t, e, l);
3578
3587
  });
3579
3588
  }, o.readAsDataURL(e);
3580
3589
  }
3581
- class gn {
3590
+ class vn {
3582
3591
  constructor(i, t) {
3583
3592
  const e = this;
3584
3593
  e.el = i, e.params = {
@@ -3606,67 +3615,67 @@ class gn {
3606
3615
  previewSize: e.dataset.previewSize || i.params.previewSize,
3607
3616
  compress: e.dataset.compress || i.params.compress,
3608
3617
  on: {
3609
- changeAfter: Ve(e.dataset.changeAfter, i.params.on.changeAfter),
3610
- overLimit: Ve(e.dataset.overLimit, i.params.on.overLimit)
3618
+ changeAfter: Ke(e.dataset.changeAfter, i.params.on.changeAfter),
3619
+ overLimit: Ke(e.dataset.overLimit, i.params.on.overLimit)
3611
3620
  }
3612
3621
  };
3613
3622
  i.params = o, typeof uploadImage[`${o.group}`] > "u" && (uploadImage[`${o.group}`] = []), e.dataset.group || (e.dataset.group = o.group), e.dataset.index = document.querySelectorAll(`[data-group="${o.group}"]`).length - 1, e.addEventListener("change", function(a) {
3614
- mn(a, e, i);
3623
+ fn(a, e, i);
3615
3624
  });
3616
3625
  }));
3617
3626
  }
3618
3627
  }
3619
3628
  export {
3620
- ni as A,
3621
- Cn as B,
3622
- on as C,
3623
- Oi as D,
3624
- Hn as E,
3625
- Mn as F,
3626
- In as G,
3627
- qn as H,
3628
- ln as I,
3629
- On as J,
3630
- Nn as K,
3631
- Pn as L,
3632
- Q as M,
3633
- jn as N,
3634
- zn as O,
3635
- Bn as P,
3636
- Wn as Q,
3637
- rn as R,
3638
- Gn as S,
3639
- es as T,
3640
- Rn as U,
3641
- Xn as V,
3642
- Yn as W,
3643
- Fn as X,
3644
- Un as Y,
3629
+ oi as A,
3630
+ Mn as B,
3631
+ rn as C,
3632
+ Pi as D,
3633
+ In as E,
3634
+ qn as F,
3635
+ On as G,
3636
+ Nn as H,
3637
+ dn as I,
3638
+ Pn as J,
3639
+ jn as K,
3640
+ zn as L,
3641
+ V as M,
3642
+ Bn as N,
3643
+ Wn as O,
3644
+ Gn as P,
3645
+ Rn as Q,
3646
+ cn as R,
3647
+ Xn as S,
3648
+ ss as T,
3649
+ Fn as U,
3650
+ Yn as V,
3651
+ Un as W,
3652
+ Jn as X,
3653
+ Zn as Y,
3645
3654
  E as a,
3646
- dt as b,
3647
- Cs as c,
3648
- _s as d,
3649
- je as e,
3655
+ ut as b,
3656
+ Ms as c,
3657
+ Hs as d,
3658
+ ze as e,
3650
3659
  S as f,
3651
- x as g,
3652
- An as h,
3653
- ct as i,
3654
- bi as j,
3655
- Vs as k,
3656
- en as l,
3657
- gn as m,
3658
- Ws as n,
3659
- Jn as o,
3660
- Sn as p,
3661
- _i as q,
3662
- Ci as r,
3663
- xs as s,
3664
- Dn as t,
3665
- kn as u,
3666
- xe as v,
3667
- $n as w,
3668
- Bs as x,
3669
- xn as y,
3670
- _n as z
3660
+ $ as g,
3661
+ Dn as h,
3662
+ dt as i,
3663
+ yi as j,
3664
+ tn as k,
3665
+ nn as l,
3666
+ vn as m,
3667
+ Rs as n,
3668
+ Qn as o,
3669
+ Hi as p,
3670
+ Mi as q,
3671
+ kn as r,
3672
+ Cs as s,
3673
+ xn as t,
3674
+ $n as u,
3675
+ _e as v,
3676
+ Gs as w,
3677
+ _n as x,
3678
+ Cn as y,
3679
+ Hn as z
3671
3680
  };
3672
3681
  //# sourceMappingURL=image-preview-bundle.js.map