@xwadex/fesd 0.0.26 → 0.0.28

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,4 +1,4 @@
1
- var ht = (r, t, e) => {
1
+ var bt = (r, t, e) => {
2
2
  if (!t.has(r))
3
3
  throw TypeError("Cannot " + e);
4
4
  };
@@ -7,10 +7,10 @@ var m = (r, t, e) => {
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  t instanceof WeakSet ? t.add(r) : t.set(r, e);
9
9
  };
10
- var p = (r, t, e) => (ht(r, t, "access private method"), e);
11
- import { i as Q, a as F, g as T, v as mt, c as gt, b as bt, d as ft, e as wt, f as vt, s as yt } from "./image-preview-bundle.js";
12
- import { A as Nt, j as Dt, C as zt, h as Ht, D as jt, m as Pt, I as Ft, k as Ut, M as Vt, l as Yt, R as Gt, T as Jt } from "./image-preview-bundle.js";
13
- import { S as $t, m as At, p as St } from "./vendor-bundle.js";
10
+ var p = (r, t, e) => (bt(r, t, "access private method"), e);
11
+ import { i as tt, a as V, g as q, v as ft, c as wt, b as vt, d as yt, e as $t, f as At, s as St } from "./image-preview-bundle.js";
12
+ import { A as Dt, j as Ht, C as jt, h as Pt, D as Ft, m as Ut, I as Vt, k as Yt, M as Gt, l as Jt, R as Kt, T as Qt } from "./image-preview-bundle.js";
13
+ import { m as C, S as xt, p as Et } from "./vendor-bundle.js";
14
14
  const E = () => {
15
15
  const r = navigator.userAgent, t = {
16
16
  // Firefox 1.0+
@@ -46,84 +46,86 @@ const E = () => {
46
46
  isLinux: r.indexOf("Linux") > -1
47
47
  };
48
48
  return { browser: t, mobile: e, os: s };
49
- }, xt = () => {
49
+ }, Lt = () => {
50
50
  const { browser: r } = E();
51
51
  return Object.keys(r).find((t) => {
52
52
  if (r[t])
53
53
  return r[t];
54
54
  });
55
- }, Et = () => {
55
+ }, Ct = () => {
56
56
  const { mobile: r } = E();
57
57
  return Object.keys(r).some((t) => {
58
58
  if (r[t])
59
59
  return r[t];
60
60
  });
61
- }, Ct = () => {
61
+ }, kt = () => {
62
62
  const { os: r } = E();
63
63
  return Object.keys(r).find((t) => {
64
64
  if (r[t])
65
65
  return r[t];
66
66
  });
67
- }, Lt = () => console.dir(E());
68
- function Ot() {
67
+ }, qt = () => console.dir(E());
68
+ function Rt() {
69
69
  return {
70
70
  init: E,
71
- isBrowser4: xt,
72
- isMobile4: Et,
73
- isOs4: Ct,
74
- logs: Lt
71
+ isBrowser4: Lt,
72
+ isMobile4: Ct,
73
+ isOs4: kt,
74
+ logs: qt
75
75
  };
76
76
  }
77
77
  const f = (r, t, e) => {
78
- r && (bt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
78
+ r && (vt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
79
79
  };
80
- var k, Z, q, tt, A, U, W, et, _, st, O, rt, M, it, R, ot, I, at, X, nt, S, V, B, lt, x, Y;
81
- class Mt {
80
+ var T, et, W, st, A, Y, _, rt, O, it, M, ot, R, at, B, nt, N, lt, I, ct, X, dt, S, G, z, ut, x, J;
81
+ class Bt {
82
82
  constructor(t, e = {}) {
83
- m(this, k);
84
- m(this, q);
83
+ m(this, T);
84
+ m(this, W);
85
85
  // 取得元件上的設定值
86
86
  m(this, A);
87
87
  // 設置設定值的 CSS 樣式
88
- m(this, W);
89
- // 表格拖曳功能
90
88
  m(this, _);
91
- // 設置表格凍結
89
+ // 表格拖曳功能
92
90
  m(this, O);
91
+ // 設置表格凍結
93
92
  m(this, M);
94
93
  m(this, R);
95
- m(this, I);
94
+ m(this, B);
95
+ m(this, N);
96
96
  // Markdown 設置
97
+ m(this, I);
98
+ // Navigation 設置
97
99
  m(this, X);
98
100
  m(this, S);
99
- m(this, B);
101
+ m(this, z);
100
102
  m(this, x);
101
- !Q(t) || !F(t) || (this.__storage__ = {
103
+ !tt(t) || !V(t) || (this.__storage__ = {
102
104
  el: t,
103
105
  options: e
104
- }, this.active = "data-article-active", p(this, k, Z).call(this));
106
+ }, this.active = "data-article-active", p(this, T, et).call(this));
105
107
  }
106
108
  update() {
107
109
  const { elements: t } = this;
108
110
  t.forEach((e) => {
109
111
  e.querySelectorAll("._article").forEach((s) => {
110
- s.article = {}, s.article.parent = e, s.article.params = p(this, A, U).call(this, s), p(this, S, V).call(this, s), p(this, x, Y).call(this, s);
112
+ s.article = {}, s.article.parent = e, s.article.params = p(this, A, Y).call(this, s), p(this, S, G).call(this, s), p(this, x, J).call(this, s);
111
113
  });
112
114
  });
113
115
  }
114
116
  }
115
- k = new WeakSet(), Z = function() {
116
- const { el: t, options: e } = this.__storage__, { SETTINGS: s } = ft;
117
- this.elements = e.state == "not active" ? T(t + `:not([${this.active}])`) : T(t), this.elements = T(t), this.options = Object.assign({}, s, e), p(this, q, tt).call(this);
118
- }, q = new WeakSet(), tt = function() {
117
+ T = new WeakSet(), et = function() {
118
+ const { el: t, options: e } = this.__storage__, { SETTINGS: s } = yt;
119
+ this.elements = e.state == "not active" ? q(t + `:not([${this.active}])`) : q(t), this.elements = q(t), this.options = Object.assign({}, s, e), p(this, W, st).call(this);
120
+ }, W = new WeakSet(), st = function() {
119
121
  const { elements: t } = this;
120
122
  t.forEach((e) => {
121
123
  e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((s) => {
122
- var i, a;
123
- s.article = {}, s.article.parent = e, s.article.params = p(this, A, U).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(a = p(i = p(this, W, et).call(this, s), S, V).call(i, s), B, lt).call(a, s), p(this, x, Y).call(this, s);
124
+ var i, n;
125
+ s.article = {}, s.article.parent = e, s.article.params = p(this, A, Y).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(n = p(i = p(this, _, rt).call(this, s), S, G).call(i, s), z, ut).call(n, s), p(this, x, J).call(this, s);
124
126
  });
125
127
  });
126
- }, A = new WeakSet(), U = function(t) {
128
+ }, A = new WeakSet(), Y = function(t) {
127
129
  return {
128
130
  // 元件本身
129
131
  $selector: t,
@@ -136,6 +138,7 @@ k = new WeakSet(), Z = function() {
136
138
  $cover: t.querySelectorAll("._cover"),
137
139
  $swiper: t.querySelector(".swiper"),
138
140
  $table: t.querySelector("._table"),
141
+ $quote: t.querySelector("._quote"),
139
142
  $swiperButtonCover: t.querySelector(".swiper-button-cover"),
140
143
  // 子層元件
141
144
  $h: t.querySelector("._H"),
@@ -154,163 +157,210 @@ k = new WeakSet(), Z = function() {
154
157
  buttonColor: t.getAttribute("button-color"),
155
158
  buttonColorHover: t.getAttribute("button-color-hover"),
156
159
  buttonTextColor: t.getAttribute("button-textcolor"),
157
- descriptionColor: t.getAttribute("description-color")
160
+ descriptionColor: t.getAttribute("description-color"),
161
+ quoteColor: t.getAttribute("quote-color"),
162
+ markdown: t.getAttribute("data-table-markdown") ?? !1
158
163
  };
159
- }, W = new WeakSet(), et = function(t) {
164
+ }, _ = new WeakSet(), rt = function(t) {
160
165
  const { params: e } = t.article;
161
- return f(e.$h, "color", e.hColor), f(e.$subH, "color", e.subHColor), f(e.$p, "color", e.pColor), f(e.$description, "color", e.descriptionColor), f(e.$button, "backgroundColor", e.buttonColor), f(e.$button, "color", e.buttonTextColor), e.buttonColorHover && e.$button && (e.$button.appendChild(document.createElement("span")), f(e.$button.querySelector("span"), "backgroundColor", e.buttonColorHover)), f(e.$backgroundWrap, "backgroundColor", e.typeFullColor), f(e.$contentWrap, "backgroundColor", e.typeFullBoxColor), this;
162
- }, _ = new WeakSet(), st = function(t) {
166
+ return f(e.$h, "color", e.hColor), f(e.$subH, "color", e.subHColor), f(e.$p, "color", e.pColor), f(e.$description, "color", e.descriptionColor), f(e.$button, "backgroundColor", e.buttonColor), f(e.$button, "color", e.buttonTextColor), e.buttonColorHover && e.$button && (e.$button.appendChild(document.createElement("span")), f(e.$button.querySelector("span"), "backgroundColor", e.buttonColorHover)), f(e.$backgroundWrap, "backgroundColor", e.typeFullColor), f(e.$contentWrap, "backgroundColor", e.typeFullBoxColor), f(e.$quote, "color", e.quoteColor), this;
167
+ }, O = new WeakSet(), it = function(t) {
163
168
  const { params: e } = t.article, s = e.$table;
164
- let i = !1, a, o, l, u;
165
- s.addEventListener("mousedown", function(n) {
166
- n.preventDefault(), i = !0;
167
- const c = s.getBoundingClientRect();
168
- a = n.pageX - c.left, o = n.pageY - c.top, l = s.scrollLeft, u = s.scrollTop;
169
+ let i = !1, n, a, c, l;
170
+ s.addEventListener("mousedown", function(o) {
171
+ o.preventDefault(), i = !0;
172
+ const d = s.getBoundingClientRect();
173
+ n = o.pageX - d.left, a = o.pageY - d.top, c = s.scrollLeft, l = s.scrollTop;
169
174
  }), s.addEventListener("mouseleave", function() {
170
175
  i = !1;
171
176
  }), s.addEventListener("mouseup", function() {
172
177
  i = !1;
173
- }), s.addEventListener("mousemove", function(n) {
178
+ }), s.addEventListener("mousemove", function(o) {
174
179
  if (!i)
175
180
  return;
176
- n.preventDefault();
177
- const c = s.getBoundingClientRect(), d = n.pageX - c.left, g = n.pageY - c.top, b = d - a, h = g - o;
178
- s.scrollLeft = l - b, s.scrollTop = u - h;
181
+ o.preventDefault();
182
+ const d = s.getBoundingClientRect(), u = o.pageX - d.left, h = o.pageY - d.top, g = u - n, b = h - a;
183
+ s.scrollLeft = c - g, s.scrollTop = l - b;
179
184
  });
180
- }, O = new WeakSet(), rt = function(t, e, s) {
181
- const { basic_rwd: i } = this.options, a = window.innerWidth < i, o = [...t.querySelectorAll("tr")];
182
- if (a || !o.length)
185
+ }, M = new WeakSet(), ot = function(t, e, s) {
186
+ const { basic_rwd: i } = this.options, n = window.innerWidth < i, a = [...t.querySelectorAll("tr")];
187
+ if (n || !a.length)
183
188
  return;
184
- const l = p(this, M, it).call(this, o);
185
- p(this, I, at).call(this, t, l, e, s);
186
- }, M = new WeakSet(), it = function(t) {
189
+ const c = p(this, R, at).call(this, a);
190
+ p(this, N, lt).call(this, t, c, e, s);
191
+ }, R = new WeakSet(), at = function(t) {
187
192
  const e = [], s = /* @__PURE__ */ new Set();
188
- return t.forEach((i, a) => {
189
- const o = [...i.children];
190
- e[a] = [];
191
- let l = 0;
192
- o.forEach((u) => {
193
- const n = +u.getAttribute("rowspan") || 1, c = +u.getAttribute("colspan") || 1;
194
- for (; e[a][l] || s.has(`${a},${l}`); )
195
- l++;
196
- for (let d = 0; d < n; d++) {
197
- const g = a + d;
198
- e[g] ?? (e[g] = []);
199
- for (let b = 0; b < c; b++) {
200
- const h = l + b;
201
- e[g][h] = {
202
- el: d === 0 && b === 0 ? u : null,
203
- topRow: a,
204
- leftCol: l,
205
- rowspan: n,
206
- colspan: c
207
- }, d > 0 && s.add(`${g},${h}`);
193
+ return t.forEach((i, n) => {
194
+ const a = [...i.children];
195
+ e[n] = [];
196
+ let c = 0;
197
+ a.forEach((l) => {
198
+ const o = +l.getAttribute("rowspan") || 1, d = +l.getAttribute("colspan") || 1;
199
+ for (; e[n][c] || s.has(`${n},${c}`); )
200
+ c++;
201
+ for (let u = 0; u < o; u++) {
202
+ const h = n + u;
203
+ e[h] ?? (e[h] = []);
204
+ for (let g = 0; g < d; g++) {
205
+ const b = c + g;
206
+ e[h][b] = {
207
+ el: u === 0 && g === 0 ? l : null,
208
+ topRow: n,
209
+ leftCol: c,
210
+ rowspan: o,
211
+ colspan: d
212
+ }, u > 0 && s.add(`${h},${b}`);
208
213
  }
209
214
  }
210
- l += c;
215
+ c += d;
211
216
  });
212
217
  }), e;
213
- }, R = new WeakSet(), ot = function(t, e) {
214
- var o;
215
- const s = e.length, i = Array(s).fill(0), a = t.getBoundingClientRect().top;
216
- for (let l = 0; l < s; l++)
217
- for (let u = 0; u < (((o = e[l]) == null ? void 0 : o.length) || 0); u++) {
218
- const n = e[l][u];
219
- if (n != null && n.el) {
220
- const c = n.el.getBoundingClientRect().top;
221
- i[l] = c - a;
218
+ }, B = new WeakSet(), nt = function(t, e) {
219
+ var a;
220
+ const s = e.length, i = Array(s).fill(0), n = t.getBoundingClientRect().top;
221
+ for (let c = 0; c < s; c++)
222
+ for (let l = 0; l < (((a = e[c]) == null ? void 0 : a.length) || 0); l++) {
223
+ const o = e[c][l];
224
+ if (o != null && o.el) {
225
+ const d = o.el.getBoundingClientRect().top;
226
+ i[c] = d - n;
222
227
  break;
223
228
  }
224
229
  }
225
230
  return i;
226
- }, I = new WeakSet(), at = function(t, e, s, i) {
227
- var u;
228
- const a = p(this, R, ot).call(this, t, e), o = ((u = e[0]) == null ? void 0 : u.length) ?? 0, l = Array(o).fill(0);
229
- for (let n = 0; n < o; n++)
230
- for (let c = 0; c < e.length; c++) {
231
- const d = e[c][n];
232
- if (d != null && d.el) {
233
- l[n] = d.el.offsetLeft;
231
+ }, N = new WeakSet(), lt = function(t, e, s, i) {
232
+ var l;
233
+ const n = p(this, B, nt).call(this, t, e), a = ((l = e[0]) == null ? void 0 : l.length) ?? 0, c = Array(a).fill(0);
234
+ for (let o = 0; o < a; o++)
235
+ for (let d = 0; d < e.length; d++) {
236
+ const u = e[d][o];
237
+ if (u != null && u.el) {
238
+ c[o] = u.el.offsetLeft;
234
239
  break;
235
240
  }
236
241
  }
237
242
  e.forEach(
238
- (n) => n.forEach((c) => {
239
- if (!(c != null && c.el))
243
+ (o) => o.forEach((d) => {
244
+ if (!(d != null && d.el))
240
245
  return;
241
- const { el: d, topRow: g, leftCol: b } = c, h = g < s, v = b < i;
242
- d.style.position = "sticky", d.style.zIndex = h && v ? 3 : h ? 2 : v ? 1 : 0, d.style.backgroundColor = getComputedStyle(d).backgroundColor, h && (d.style.top = `${a[g]}px`), v && (d.style.left = `${l[b]}px`);
246
+ const { el: u, topRow: h, leftCol: g } = d, b = h < s, v = g < i;
247
+ u.style.position = "sticky", u.style.zIndex = b && v ? 3 : b ? 2 : v ? 1 : 0, u.style.backgroundColor = getComputedStyle(u).backgroundColor, b && (u.style.top = `${n[h]}px`), v && (u.style.left = `${c[g]}px`);
243
248
  })
244
249
  );
245
- }, X = new WeakSet(), nt = function(t) {
246
- const e = ["h1", "h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br"], s = (o) => St.sanitize(o, {
247
- ALLOWED_TAGS: e,
248
- RETURN_TRUSTED_TYPE: !1
249
- }), i = (o) => s(At.parse(o));
250
- t.querySelectorAll("td,th").forEach((o) => {
251
- const l = o.textContent.trim();
252
- o.innerHTML = i(l);
250
+ }, I = new WeakSet(), ct = function(t) {
251
+ const { markdownLink: e } = this.options;
252
+ if (t.hasAttribute("data-markdown-rendered"))
253
+ return;
254
+ new C.Renderer(), C.use({
255
+ extensions: [{
256
+ name: "center",
257
+ level: "block",
258
+ start(l) {
259
+ var o;
260
+ return (o = l.match(/==/)) == null ? void 0 : o.index;
261
+ },
262
+ tokenizer(l) {
263
+ const d = /^@center@(.+?)@center@/.exec(l);
264
+ if (d)
265
+ return {
266
+ type: "center",
267
+ raw: d[0],
268
+ text: d[1],
269
+ tokens: this.lexer.inlineTokens(d[1])
270
+ };
271
+ },
272
+ renderer(l) {
273
+ return `<div data-center='true'>${C.parser(l.tokens)}</div>`;
274
+ }
275
+ }]
253
276
  });
254
- }, S = new WeakSet(), V = function(t) {
277
+ const s = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div"], i = ["data-center"], n = (l) => Et.sanitize(l, {
278
+ ALLOWED_TAGS: e ? [...s, "a"] : s,
279
+ ALLOWED_ATTR: e ? [...i, "href", "title", "target"] : i,
280
+ RETURN_TRUSTED_TYPE: !1
281
+ }), a = (l) => n(C.parse(l));
282
+ t.querySelectorAll("td,th").forEach((l) => {
283
+ l.innerHTML = l.textContent;
284
+ const o = l.textContent.trim().replace(/<[^>]*>/g, "");
285
+ l.innerHTML = a(o);
286
+ }), t.setAttribute("data-markdown-rendered", "true");
287
+ }, X = new WeakSet(), dt = function(t) {
288
+ const { scrollStep: e } = this.options, s = t.querySelector("._contentWrap"), i = t.querySelector("._tableCover"), n = t.querySelector("._table"), a = typeof e == "number" ? e : s.clientWidth * 0.5;
289
+ if (!s || !i || i.querySelector(".table_navigation"))
290
+ return;
291
+ const c = document.createElement("div");
292
+ c.className = "table_navigation";
293
+ const l = document.createElement("div"), o = document.createElement("div");
294
+ l.className = "table-nav-left", o.className = "table-nav-right", c.appendChild(l), c.appendChild(o), i.appendChild(c);
295
+ const d = () => {
296
+ const u = n.scrollLeft, h = n.scrollWidth - n.clientWidth;
297
+ l.classList.toggle("disabled", u <= 0), o.classList.toggle("disabled", u >= h - 1);
298
+ };
299
+ l.addEventListener("click", () => {
300
+ n.scrollBy({ left: -a, behavior: "smooth" });
301
+ }), o.addEventListener("click", () => {
302
+ n.scrollBy({ left: a, behavior: "smooth" });
303
+ }), n.addEventListener("scroll", d), window.addEventListener("resize", d), d();
304
+ }, S = new WeakSet(), G = function(t) {
255
305
  const { params: e } = t.article;
256
- return e.$video.length && new mt(e.$video), this;
257
- }, B = new WeakSet(), lt = function(t) {
306
+ return e.$video.length && new ft(e.$video), this;
307
+ }, z = new WeakSet(), ut = function(t) {
258
308
  const { basic_rwd: e } = this.options, { params: s } = t.article;
259
309
  if (!s.$swiper)
260
310
  return;
261
- const i = gt(), a = this;
262
- let o = {
311
+ const i = wt(), n = this;
312
+ let a = {
263
313
  on: {
264
- init(n) {
265
- const c = n.$el[0];
266
- s.$video.length && ([...c.querySelectorAll("[video4-active]")].forEach((g) => {
267
- var b, h;
268
- (b = g.querySelector(wt.SETTINGS.videoButton)) == null || b.remove(), (h = g.querySelector(".overlay")) == null || h.remove(), g.removeAttribute("video4-active");
269
- }), a.update());
314
+ init(o) {
315
+ const d = o.$el[0];
316
+ s.$video.length && ([...d.querySelectorAll("[video4-active]")].forEach((h) => {
317
+ var g, b;
318
+ (g = h.querySelector($t.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
319
+ }), n.update());
270
320
  },
271
- observerUpdate(n) {
272
- n.params.autoplay.enabled && (n.autoplay.start(), n.update());
321
+ observerUpdate(o) {
322
+ o.params.autoplay.enabled && (o.autoplay.start(), o.update());
273
323
  }
274
324
  },
275
325
  observer: !0,
276
326
  breakpoints: {}
277
327
  };
278
328
  if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${i}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
279
- const n = document.createElement("div");
280
- n.className = `swiper-button-next swiper-${i}`, s.$swiperButtonCover.appendChild(n);
281
- const c = document.createElement("div");
282
- c.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(c), o.navigation = {
329
+ const o = document.createElement("div");
330
+ o.className = `swiper-button-next swiper-${i}`, s.$swiperButtonCover.appendChild(o);
331
+ const d = document.createElement("div");
332
+ d.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(d), a.navigation = {
283
333
  nextEl: `.swiper-button-next.swiper-${i}`,
284
334
  prevEl: `.swiper-button-prev.swiper-${i}`
285
335
  };
286
336
  }
287
337
  if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
288
- const n = document.createElement("div");
289
- n.className = `swiper-pagination swiper-${i}`, s.$swiper.appendChild(n), o.pagination = {
338
+ const o = document.createElement("div");
339
+ o.className = `swiper-pagination swiper-${i}`, s.$swiper.appendChild(o), a.pagination = {
290
340
  el: `.swiper-pagination.swiper-${i}`,
291
341
  clickable: !0
292
342
  };
293
343
  }
294
- Number.parseInt(s.$selector.getAttribute("swiper-num")) && (o.breakpoints[e] = {
344
+ Number.parseInt(s.$selector.getAttribute("swiper-num")) && (a.breakpoints[e] = {
295
345
  slidesPerView: s.$selector.getAttribute("swiper-num") ? Number.parseInt(s.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(s.$selector.getAttribute("swiper-num")) : 1
296
- }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (o.autoplay = {
346
+ }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (a.autoplay = {
297
347
  delay: 3e3,
298
348
  disableOnInteraction: !1
299
- }), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (o.loop = !0), s.$selector.getAttribute("swiper-speed") && (o.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (o.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (o.pagination.dynamicBullets = !0, o.pagination ? o.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
300
- let l = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
301
- s.$swiper.querySelectorAll(".swiper-slide").length <= l() && (o.navigation = !1, o.pagination = !1, o.autoplay = !1, o.loop = !1, s.$selector.querySelector(".swiper-button-cover").style.display = "none", s.$selector.querySelector(".swiper-pagination").style.display = "none", s.$swiper.classList.add("swiper-no-swiping"));
302
- const u = new $t(s.$swiper, o);
303
- return t.article.swiperList = [], t.article.swiperList.push(u), this;
304
- }, x = new WeakSet(), Y = function(t) {
305
- const { params: e } = t.article;
306
- if (!e.$table)
349
+ }), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (a.loop = !0), s.$selector.getAttribute("swiper-speed") && (a.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (a.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (a.pagination.dynamicBullets = !0, a.pagination ? a.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
350
+ let c = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
351
+ s.$swiper.querySelectorAll(".swiper-slide").length <= c() && (a.navigation = !1, a.pagination = !1, a.autoplay = !1, a.loop = !1, s.$selector.querySelector(".swiper-button-cover").style.display = "none", s.$selector.querySelector(".swiper-pagination").style.display = "none", s.$swiper.classList.add("swiper-no-swiping"));
352
+ const l = new xt(s.$swiper, a);
353
+ return t.article.swiperList = [], t.article.swiperList.push(l), this;
354
+ }, x = new WeakSet(), J = function(t) {
355
+ const { navigation: e } = this.options, { params: s } = t.article;
356
+ if (!s.$table)
307
357
  return;
308
- const s = t.getAttribute("freeze-table") === "on", i = parseInt(t.getAttribute("freeze-table-row") ?? "1", 10), a = parseInt(t.getAttribute("freeze-table-col") ?? "1", 10), o = t.querySelector("table"), l = t.querySelector("._tipText"), u = t.offsetWidth, n = o.offsetWidth, c = u < n, d = () => {
309
- s && p(this, O, rt).call(this, o, i, a), (s || c) && p(this, _, st).call(this, t), c ? (t.classList.add("overflow"), l.style.display = "flex") : (t.classList.remove("overflow"), l.style.display = "none"), p(this, X, nt).call(this, o);
358
+ const i = t.getAttribute("freeze-table") === "on", n = parseInt(t.getAttribute("freeze-table-row") ?? "1", 10), a = parseInt(t.getAttribute("freeze-table-col") ?? "1", 10), c = t.querySelector("table"), l = t.querySelector("._tipText"), o = t.offsetWidth, d = c.offsetWidth, u = o < d, h = s.markdown === "on", g = () => {
359
+ i && p(this, M, ot).call(this, c, n, a), (i || u) && p(this, O, it).call(this, t), h && p(this, I, ct).call(this, c), e && u && p(this, X, dt).call(this, t), u ? (t.classList.add("overflow"), l.style.display = "flex") : (t.classList.remove("overflow"), l.style.display = "none");
310
360
  };
311
- return d(), window.addEventListener("resize", d), this;
361
+ return g(), window.addEventListener("resize", g), this;
312
362
  };
313
- let G = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", J = "ontouchend" in document.documentElement ? "touchend" : "mouseup", j = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
363
+ let K = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", Q = "ontouchend" in document.documentElement ? "touchend" : "mouseup", F = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
314
364
  function w(r) {
315
365
  const t = window.getComputedStyle(r), e = t.transform || t.mozTransform;
316
366
  if (e === "none")
@@ -333,15 +383,15 @@ function w(r) {
333
383
  z: Number(i[14])
334
384
  };
335
385
  }
336
- function L(r) {
386
+ function k(r) {
337
387
  const e = r.querySelector(".wrapper").querySelectorAll(".item");
338
388
  let s = 0;
339
389
  return e.forEach((i) => {
340
- const a = getComputedStyle(i), o = parseInt(a.marginLeft), l = parseInt(a.marginRight);
341
- s += i.getBoundingClientRect().width + o + l;
390
+ const n = getComputedStyle(i), a = parseInt(n.marginLeft), c = parseInt(n.marginRight);
391
+ s += i.getBoundingClientRect().width + a + c;
342
392
  }), s;
343
393
  }
344
- function P(r) {
394
+ function U(r) {
345
395
  if (w(r.slideWrapEl).x >= r.translateMin)
346
396
  return "is-start";
347
397
  if (w(r.slideWrapEl).x <= r.translateMax)
@@ -351,8 +401,8 @@ function P(r) {
351
401
  }
352
402
  function Tt(r) {
353
403
  const t = r.el, e = t.querySelector(".wrapper");
354
- e.addEventListener(G, function(s) {
355
- switch (r.isDown = !0, r.slidable && e.classList.add("dragging"), G) {
404
+ e.addEventListener(K, function(s) {
405
+ switch (r.isDown = !0, r.slidable && e.classList.add("dragging"), K) {
356
406
  case "mousedown":
357
407
  r.startX = s.pageX;
358
408
  break;
@@ -361,10 +411,10 @@ function Tt(r) {
361
411
  break;
362
412
  }
363
413
  r.nowTranslateX = w(e).x;
364
- }), e.addEventListener(J, function(s) {
414
+ }), e.addEventListener(Q, function(s) {
365
415
  r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving");
366
416
  let i;
367
- switch (j) {
417
+ switch (F) {
368
418
  case "mousemove":
369
419
  i = s.pageX - r.startX;
370
420
  break;
@@ -373,22 +423,22 @@ function Tt(r) {
373
423
  break;
374
424
  }
375
425
  if (i === 0 && s.target.closest(".item")) {
376
- if (J === "mouseup" && s.button !== 0)
426
+ if (Q === "mouseup" && s.button !== 0)
377
427
  return;
378
- e.querySelectorAll(".item").forEach((o) => {
379
- o.classList.remove("active");
428
+ e.querySelectorAll(".item").forEach((a) => {
429
+ a.classList.remove("active");
380
430
  }), s.target.closest(".item").classList.add("active"), r.moveActive(r.params.speed);
381
431
  } else
382
432
  r.slidable && r.resetPos(t);
383
433
  }), e.addEventListener("mouseleave", function() {
384
434
  r.isDown && r.slidable && (r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving"), r.resetPos(t));
385
- }), e.addEventListener(j, function(s) {
435
+ }), e.addEventListener(F, function(s) {
386
436
  if (r.draggable && r.slidable) {
387
437
  if (!r.isDown)
388
438
  return;
389
439
  s.preventDefault();
390
440
  let i;
391
- switch (j) {
441
+ switch (F) {
392
442
  case "mousemove":
393
443
  i = s.pageX - r.startX;
394
444
  break;
@@ -398,29 +448,29 @@ function Tt(r) {
398
448
  }
399
449
  if (i !== 0) {
400
450
  e.classList.add("moving");
401
- const a = {
451
+ const n = {
402
452
  transition: "all 0ms ease 0s",
403
453
  transform: `translate3d(${r.nowTranslateX + i}px,0,0)`
404
454
  };
405
- Object.assign(e.style, a);
455
+ Object.assign(e.style, n);
406
456
  }
407
457
  }
408
458
  });
409
459
  }
410
- function kt(r) {
460
+ function Wt(r) {
411
461
  const t = r.querySelectorAll("a");
412
462
  for (var e = 0, s = t.length; e < s; e++)
413
463
  t[e].draggable = !1;
414
464
  }
415
- class Rt {
465
+ class Nt {
416
466
  constructor(t, e) {
417
467
  this.el = typeof t == "string" ? document.querySelector(t) : t, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
418
468
  speed: 300,
419
469
  clickSwitch: !0,
420
470
  breakpoint: !1
421
- }, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = L(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
471
+ }, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = k(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
422
472
  Math.abs(
423
- L(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
473
+ k(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
424
474
  )
425
475
  ), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
426
476
  }
@@ -428,35 +478,35 @@ class Rt {
428
478
  const t = this;
429
479
  t.slidable && (t.slideWrapEl.style.width = `${t.slideTotalWidth}px`, t.el.classList.add("slidable"), t.slideWrapEl.querySelector(".item.active") && t.moveActive()), window.addEventListener("resize", function() {
430
480
  t.update();
431
- }), Tt(t), kt(t.el);
481
+ }), Tt(t), Wt(t.el);
432
482
  }
433
483
  moveActive(t) {
434
- const e = this, s = e.slideWrapEl.querySelector(".item.active"), a = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
484
+ const e = this, s = e.slideWrapEl.querySelector(".item.active"), n = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
435
485
  if (e.slidable) {
436
- if (-a < 0 && -a > e.translateMax) {
437
- const o = {
486
+ if (-n < 0 && -n > e.translateMax) {
487
+ const a = {
438
488
  transition: `all ${t || 0}ms ease 0s`,
439
- transform: `translate3d(-${a}px,0,0)`
489
+ transform: `translate3d(-${n}px,0,0)`
440
490
  };
441
- Object.assign(e.slideWrapEl.style, o);
442
- } else if (-a >= 0) {
443
- const o = {
491
+ Object.assign(e.slideWrapEl.style, a);
492
+ } else if (-n >= 0) {
493
+ const a = {
444
494
  transition: `all ${t || 0}ms ease 0s`,
445
495
  transform: "translate3d(0,0,0)"
446
496
  };
447
- Object.assign(e.slideWrapEl.style, o);
497
+ Object.assign(e.slideWrapEl.style, a);
448
498
  } else {
449
- const o = {
499
+ const a = {
450
500
  transition: `all ${t || 0}ms ease 0s`,
451
501
  transform: `translate3d(${e.translateMax}px,0,0)`
452
502
  };
453
- Object.assign(e.slideWrapEl.style, o);
503
+ Object.assign(e.slideWrapEl.style, a);
454
504
  }
455
505
  if (t)
456
506
  e.slideWrapEl.addEventListener(
457
507
  "transitionend",
458
508
  function() {
459
- switch (e.nowTranslateX = w(e.slideWrapEl).x, P(e)) {
509
+ switch (e.nowTranslateX = w(e.slideWrapEl).x, U(e)) {
460
510
  case "is-start":
461
511
  e.el.classList.add("is-start"), e.el.classList.remove("is-end");
462
512
  break;
@@ -471,7 +521,7 @@ class Rt {
471
521
  !1
472
522
  );
473
523
  else
474
- switch (e.nowTranslateX = w(e.slideWrapEl).x, P(e)) {
524
+ switch (e.nowTranslateX = w(e.slideWrapEl).x, U(e)) {
475
525
  case "is-start":
476
526
  e.el.classList.add("is-start"), e.el.classList.remove("is-end");
477
527
  break;
@@ -486,7 +536,7 @@ class Rt {
486
536
  }
487
537
  resetPos() {
488
538
  const t = this;
489
- switch (P(t)) {
539
+ switch (U(t)) {
490
540
  case "is-start":
491
541
  t.el.classList.add("is-start"), t.el.classList.remove("is-end"), Object.assign(t.slideWrapEl.style, {
492
542
  transition: `all ${t.params.speed}ms ease 0s`,
@@ -506,14 +556,14 @@ class Rt {
506
556
  }
507
557
  update() {
508
558
  const t = this;
509
- t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = L(t.el), t.translateMax = -Math.floor(
559
+ t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = k(t.el), t.translateMax = -Math.floor(
510
560
  Math.abs(
511
- L(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
561
+ k(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
512
562
  )
513
563
  ), t.slidable = t.slideTotalWidth > Math.round(t.el.getBoundingClientRect().width) && (!t.params.breakpoint || window.innerWidth <= t.params.breakpoint), t.slidable ? (t.slideWrapEl.style.width = `${t.slideTotalWidth}px`, t.el.classList.add("slidable"), t.slideWrapEl.querySelector(".item.active") && t.moveActive()) : (t.el.classList.remove("slidable"), t.el.classList.remove("is-start"), t.el.classList.remove("is-end"), t.slideWrapEl.removeAttribute("style"));
514
564
  }
515
565
  }
516
- const K = (r) => {
566
+ const Z = (r) => {
517
567
  if (r == "facebook")
518
568
  return "https://www.facebook.com/sharer/sharer.php?u=";
519
569
  if (r == "line")
@@ -525,95 +575,95 @@ const K = (r) => {
525
575
  if (r == "telegram")
526
576
  return "https://telegram.me/share/url?url=";
527
577
  };
528
- var N, ct, D, dt, z, ut;
578
+ var D, pt, H, ht, j, mt;
529
579
  class It {
530
580
  constructor(t, e = {}) {
531
- m(this, N);
532
581
  m(this, D);
533
- m(this, z);
582
+ m(this, H);
583
+ m(this, j);
534
584
  this.__storage__ = {
535
585
  el: t,
536
586
  options: e
537
- }, p(this, N, ct).call(this);
587
+ }, p(this, D, pt).call(this);
538
588
  }
539
589
  }
540
- N = new WeakSet(), ct = function() {
541
- const { el: t, options: e } = this.__storage__, { SETTINGS: s } = yt;
542
- !Q(t) || !F(t) || (this.elements = T(t), this.options = Object.assign({}, s, e), p(this, D, dt).call(this));
543
- }, D = new WeakSet(), dt = function() {
590
+ D = new WeakSet(), pt = function() {
591
+ const { el: t, options: e } = this.__storage__, { SETTINGS: s } = St;
592
+ !tt(t) || !V(t) || (this.elements = q(t), this.options = Object.assign({}, s, e), p(this, H, ht).call(this));
593
+ }, H = new WeakSet(), ht = function() {
544
594
  const { elements: t, options: e } = this;
545
595
  t.forEach((s) => {
546
596
  s.querySelectorAll("[share-target]").forEach((i) => {
547
- i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this, z, ut), i.addEventListener("click", i.share.eventHandler);
597
+ i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this, j, mt), i.addEventListener("click", i.share.eventHandler);
548
598
  });
549
599
  });
550
- }, z = new WeakSet(), ut = function() {
600
+ }, j = new WeakSet(), mt = function() {
551
601
  const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
552
602
  source: this.getAttribute("utm-source"),
553
603
  medium: this.getAttribute("utm-medium"),
554
604
  campaign: this.getAttribute("utm-campaign")
555
- }, a = {
605
+ }, n = {
556
606
  success: this.getAttribute("copy-success") || e.success,
557
607
  text: this.getAttribute("copy-text") || e.text,
558
608
  className: this.getAttribute("copy-class") || e.className,
559
609
  duration: this.getAttribute("copy-duration") || e.duration
560
- }, o = encodeURIComponent(document.URL);
561
- let l = o;
610
+ }, a = encodeURIComponent(document.URL);
611
+ let c = a;
562
612
  if (s == "wechat") {
563
- window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${o}&size=250x250`, "share to wechat", "width=300,height=300");
613
+ window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${a}&size=250x250`, "share to wechat", "width=300,height=300");
564
614
  return;
565
615
  }
566
616
  if (s == "url") {
567
- if (F(".copied-wrapper"))
617
+ if (V(".copied-wrapper"))
568
618
  return;
569
- document.querySelector("body").insertAdjacentHTML(vt.append, `<div class='copied-wrapper'><div class='text'>${a.success ? a.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
570
- const u = document.querySelector(".copied-wrapper");
571
- a.className && u.classList.add(a.className), u.style.top = this.getBoundingClientRect().top + window.scrollY + "px", u.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", u.style.display = "block";
572
- const n = document.querySelector("#clipboard");
573
- if (n.value = a.text ?? window.location.href, n.setSelectionRange(0, 9999), n.select(), document.execCommand("copy")) {
619
+ document.querySelector("body").insertAdjacentHTML(At.append, `<div class='copied-wrapper'><div class='text'>${n.success ? n.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
620
+ const l = document.querySelector(".copied-wrapper");
621
+ n.className && l.classList.add(n.className), l.style.top = this.getBoundingClientRect().top + window.scrollY + "px", l.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", l.style.display = "block";
622
+ const o = document.querySelector("#clipboard");
623
+ if (o.value = n.text ?? window.location.href, o.setSelectionRange(0, 9999), o.select(), document.execCommand("copy")) {
574
624
  document.execCommand("copy");
575
- const c = document.querySelector(".copied-wrapper"), d = document.querySelector(".copied-wrapper .text");
576
- d.style.display = "block", d.style.opacity = 0;
577
- const g = (h, v) => {
625
+ const d = document.querySelector(".copied-wrapper"), u = document.querySelector(".copied-wrapper .text");
626
+ u.style.display = "block", u.style.opacity = 0;
627
+ const h = (b, v) => {
578
628
  let y = 0;
579
- const $ = 50, C = $ / v, H = setInterval(function() {
580
- y += C, h.style.opacity = y, y >= 1 && (clearInterval(H), setTimeout(function() {
581
- b(h, 300, function() {
582
- c.remove();
629
+ const $ = 50, L = $ / v, P = setInterval(function() {
630
+ y += L, b.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
631
+ g(b, 300, function() {
632
+ d.remove();
583
633
  });
584
- }, a.duration));
634
+ }, n.duration));
585
635
  }, $);
586
- }, b = (h, v, y) => {
636
+ }, g = (b, v, y) => {
587
637
  let $ = 1;
588
- const C = 50, H = C / v, pt = setInterval(() => {
589
- $ -= H, h.style.opacity = $, $ <= 0 && (clearInterval(pt), h.style.display = "none", y && y());
590
- }, C);
638
+ const L = 50, P = L / v, gt = setInterval(() => {
639
+ $ -= P, b.style.opacity = $, $ <= 0 && (clearInterval(gt), b.style.display = "none", y && y());
640
+ }, L);
591
641
  };
592
- g(d, 300);
642
+ h(u, 300);
593
643
  }
594
644
  return;
595
645
  }
596
- l = `${l}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, l = l.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${K(s)}${o}`) : window.open(`${K(s)}${l}&quote=${l}`), this.removeEventListener("click", t), setTimeout(() => {
646
+ c = `${c}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, c = c.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${Z(s)}${a}`) : window.open(`${Z(s)}${c}&quote=${c}`), this.removeEventListener("click", t), setTimeout(() => {
597
647
  this.addEventListener("click", t);
598
648
  }, 100);
599
649
  };
600
650
  export {
601
- Nt as Anchor4,
602
- Dt as Aost4,
603
- Mt as Article4,
604
- Rt as CategorySlider,
605
- zt as Collapse4,
606
- Ht as Configs,
607
- Ot as Detect4,
608
- jt as Dropdown4,
609
- Pt as ImagePreview,
610
- Ft as ImageValidate,
611
- Ut as Marquee4,
612
- Vt as Modal4,
613
- Yt as Multipurpose4,
614
- Gt as Ripple4,
651
+ Dt as Anchor4,
652
+ Ht as Aost4,
653
+ Bt as Article4,
654
+ Nt as CategorySlider,
655
+ jt as Collapse4,
656
+ Pt as Configs,
657
+ Rt as Detect4,
658
+ Ft as Dropdown4,
659
+ Ut as ImagePreview,
660
+ Vt as ImageValidate,
661
+ Yt as Marquee4,
662
+ Gt as Modal4,
663
+ Jt as Multipurpose4,
664
+ Kt as Ripple4,
615
665
  It as Share4,
616
- Jt as Tab4,
617
- mt as Video4
666
+ Qt as Tab4,
667
+ ft as Video4
618
668
  };
619
669
  //# sourceMappingURL=fesd-bundle.js.map