@xwadex/fesd 0.0.29 → 0.0.30

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.
@@ -8,9 +8,9 @@ var m = (r, t, e) => {
8
8
  t instanceof WeakSet ? t.add(r) : t.set(r, e);
9
9
  };
10
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";
11
+ import { i as tt, a as V, g as T, v as ft, c as wt, b as vt, d as yt, e as $t, f as xt, s as At } from "./image-preview-bundle.js";
12
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";
13
+ import { m as C, S as St, p as Et } from "./vendor-bundle.js";
14
14
  const E = () => {
15
15
  const r = navigator.userAgent, t = {
16
16
  // Firefox 1.0+
@@ -64,26 +64,26 @@ const E = () => {
64
64
  if (r[t])
65
65
  return r[t];
66
66
  });
67
- }, qt = () => console.dir(E());
67
+ }, Tt = () => console.dir(E());
68
68
  function Rt() {
69
69
  return {
70
70
  init: E,
71
71
  isBrowser4: Lt,
72
72
  isMobile4: Ct,
73
73
  isOs4: kt,
74
- logs: qt
74
+ logs: Tt
75
75
  };
76
76
  }
77
77
  const f = (r, t, e) => {
78
78
  r && (vt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
79
79
  };
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;
80
+ var q, et, W, st, x, Y, _, rt, O, it, M, ot, R, at, B, nt, N, lt, I, ct, X, dt, A, G, z, ut, S, J;
81
81
  class Bt {
82
82
  constructor(t, e = {}) {
83
- m(this, T);
83
+ m(this, q);
84
84
  m(this, W);
85
85
  // 取得元件上的設定值
86
- m(this, A);
86
+ m(this, x);
87
87
  // 設置設定值的 CSS 樣式
88
88
  m(this, _);
89
89
  // 表格拖曳功能
@@ -97,35 +97,35 @@ class Bt {
97
97
  m(this, I);
98
98
  // Navigation 設置
99
99
  m(this, X);
100
- m(this, S);
100
+ m(this, A);
101
101
  m(this, z);
102
- m(this, x);
102
+ m(this, S);
103
103
  !tt(t) || !V(t) || (this.__storage__ = {
104
104
  el: t,
105
105
  options: e
106
- }, this.active = "data-article-active", p(this, T, et).call(this));
106
+ }, this.active = "data-article-active", p(this, q, et).call(this));
107
107
  }
108
108
  update() {
109
109
  const { elements: t } = this;
110
110
  t.forEach((e) => {
111
111
  e.querySelectorAll("._article").forEach((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);
112
+ s.article = {}, s.article.parent = e, s.article.params = p(this, x, Y).call(this, s), p(this, A, G).call(this, s), p(this, S, J).call(this, s);
113
113
  });
114
114
  });
115
115
  }
116
116
  }
117
- T = new WeakSet(), et = function() {
117
+ q = new WeakSet(), et = function() {
118
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);
119
+ 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, W, st).call(this);
120
120
  }, W = new WeakSet(), st = function() {
121
121
  const { elements: t } = this;
122
122
  t.forEach((e) => {
123
123
  e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((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
+ var o, n;
125
+ s.article = {}, s.article.parent = e, s.article.params = p(this, x, Y).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(n = p(o = p(this, _, rt).call(this, s), A, G).call(o, s), z, ut).call(n, s), p(this, S, J).call(this, s);
126
126
  });
127
127
  });
128
- }, A = new WeakSet(), Y = function(t) {
128
+ }, x = new WeakSet(), Y = function(t) {
129
129
  return {
130
130
  // 元件本身
131
131
  $selector: t,
@@ -166,178 +166,230 @@ T = new WeakSet(), et = function() {
166
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
167
  }, O = new WeakSet(), it = function(t) {
168
168
  const { params: e } = t.article, s = e.$table;
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
+ let o = !1, n, a, d, u;
170
+ s.addEventListener("mousedown", function(i) {
171
+ i.preventDefault(), o = !0;
172
+ const l = s.getBoundingClientRect();
173
+ n = i.pageX - l.left, a = i.pageY - l.top, d = s.scrollLeft, u = s.scrollTop;
174
174
  }), s.addEventListener("mouseleave", function() {
175
- i = !1;
175
+ o = !1;
176
176
  }), s.addEventListener("mouseup", function() {
177
- i = !1;
178
- }), s.addEventListener("mousemove", function(o) {
179
- if (!i)
177
+ o = !1;
178
+ }), s.addEventListener("mousemove", function(i) {
179
+ if (!o)
180
180
  return;
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;
181
+ i.preventDefault();
182
+ const l = s.getBoundingClientRect(), c = i.pageX - l.left, h = i.pageY - l.top, g = c - n, b = h - a;
183
+ s.scrollLeft = d - g, s.scrollTop = u - b;
184
184
  });
185
185
  }, M = new WeakSet(), ot = function(t, e, s) {
186
- const { basic_rwd: i } = this.options, n = window.innerWidth < i, a = [...t.querySelectorAll("tr")];
186
+ const { basic_rwd: o } = this.options, n = window.innerWidth < o, a = [...t.querySelectorAll("tr")];
187
187
  if (n || !a.length)
188
188
  return;
189
- const c = p(this, R, at).call(this, a);
190
- p(this, N, lt).call(this, t, c, e, s);
189
+ const d = p(this, R, at).call(this, a);
190
+ p(this, N, lt).call(this, t, d, e, s);
191
191
  }, R = new WeakSet(), at = function(t) {
192
192
  const e = [], s = /* @__PURE__ */ new Set();
193
- return t.forEach((i, n) => {
194
- const a = [...i.children];
193
+ return t.forEach((o, n) => {
194
+ const a = [...o.children];
195
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;
196
+ let d = 0;
197
+ a.forEach((u) => {
198
+ const i = +u.getAttribute("rowspan") || 1, l = +u.getAttribute("colspan") || 1;
199
+ for (; e[n][d] || s.has(`${n},${d}`); )
200
+ d++;
201
+ for (let c = 0; c < i; c++) {
202
+ const h = n + c;
203
203
  e[h] ?? (e[h] = []);
204
- for (let g = 0; g < d; g++) {
205
- const b = c + g;
204
+ for (let g = 0; g < l; g++) {
205
+ const b = d + g;
206
206
  e[h][b] = {
207
- el: u === 0 && g === 0 ? l : null,
207
+ el: c === 0 && g === 0 ? u : null,
208
208
  topRow: n,
209
- leftCol: c,
210
- rowspan: o,
211
- colspan: d
212
- }, u > 0 && s.add(`${h},${b}`);
209
+ leftCol: d,
210
+ rowspan: i,
211
+ colspan: l
212
+ }, c > 0 && s.add(`${h},${b}`);
213
213
  }
214
214
  }
215
- c += d;
215
+ d += l;
216
216
  });
217
217
  }), e;
218
218
  }, B = new WeakSet(), nt = function(t, e) {
219
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;
220
+ const s = e.length, o = Array(s).fill(0), n = t.getBoundingClientRect().top;
221
+ for (let d = 0; d < s; d++)
222
+ for (let u = 0; u < (((a = e[d]) == null ? void 0 : a.length) || 0); u++) {
223
+ const i = e[d][u];
224
+ if (i != null && i.el) {
225
+ const l = i.el.getBoundingClientRect().top;
226
+ o[d] = l - n;
227
227
  break;
228
228
  }
229
229
  }
230
- return i;
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;
230
+ return o;
231
+ }, N = new WeakSet(), lt = function(t, e, s, o) {
232
+ var u;
233
+ const n = p(this, B, nt).call(this, t, e), a = ((u = e[0]) == null ? void 0 : u.length) ?? 0, d = Array(a).fill(0);
234
+ for (let i = 0; i < a; i++)
235
+ for (let l = 0; l < e.length; l++) {
236
+ const c = e[l][i];
237
+ if (c != null && c.el) {
238
+ d[i] = c.el.offsetLeft;
239
239
  break;
240
240
  }
241
241
  }
242
242
  e.forEach(
243
- (o) => o.forEach((d) => {
244
- if (!(d != null && d.el))
243
+ (i) => i.forEach((l) => {
244
+ if (!(l != null && l.el))
245
245
  return;
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`);
246
+ const { el: c, topRow: h, leftCol: g } = l, b = h < s, v = g < o;
247
+ c.style.position = "sticky", c.style.zIndex = b && v ? 3 : b ? 2 : v ? 1 : 0, c.style.backgroundColor = getComputedStyle(c).backgroundColor, b && (c.style.top = `${n[h]}px`), v && (c.style.left = `${d[g]}px`);
248
248
  })
249
249
  );
250
250
  }, I = new WeakSet(), ct = function(t) {
251
- const { markdownLink: e } = this.options;
251
+ const { markdownLink: e, markdownImg: s } = this.options;
252
252
  if (t.hasAttribute("data-markdown-rendered"))
253
253
  return;
254
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;
255
+ extensions: [
256
+ {
257
+ name: "center",
258
+ level: "block",
259
+ start(i) {
260
+ var l;
261
+ return (l = i.match(/@center@/)) == null ? void 0 : l.index;
262
+ },
263
+ tokenizer(i) {
264
+ const c = /^@center@(.+?)@center@/s.exec(i);
265
+ if (c)
266
+ return {
267
+ type: "center",
268
+ raw: c[0],
269
+ text: c[1],
270
+ tokens: this.lexer.inlineTokens(c[1])
271
+ };
272
+ },
273
+ renderer(i) {
274
+ return `<div data-center="true">${C.parser(i.tokens)}</div>`;
275
+ }
261
276
  },
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
- };
277
+ {
278
+ name: "sup",
279
+ level: "inline",
280
+ start(i) {
281
+ var l;
282
+ return (l = i.match(/@sup@/)) == null ? void 0 : l.index;
283
+ },
284
+ tokenizer(i) {
285
+ const c = /^@sup@(.+?)@sup@/.exec(i);
286
+ if (c)
287
+ return {
288
+ type: "sup",
289
+ raw: c[0],
290
+ text: c[1],
291
+ tokens: this.lexer.inlineTokens(c[1])
292
+ };
293
+ },
294
+ renderer(i) {
295
+ return `<sup>${i.text}</sup>`;
296
+ }
271
297
  },
272
- renderer(l) {
273
- return `<div data-center='true'>${C.parser(l.tokens)}</div>`;
298
+ {
299
+ name: "sub",
300
+ level: "inline",
301
+ start(i) {
302
+ var l;
303
+ return (l = i.match(/@sub@/)) == null ? void 0 : l.index;
304
+ },
305
+ tokenizer(i) {
306
+ const c = /^@sub@(.+?)@sub@/.exec(i);
307
+ if (c)
308
+ return {
309
+ type: "sub",
310
+ raw: c[0],
311
+ text: c[1],
312
+ tokens: this.lexer.inlineTokens(c[1])
313
+ };
314
+ },
315
+ renderer(i) {
316
+ return `<sub>${i.text}</sub>`;
317
+ }
274
318
  }
275
- }]
319
+ ]
276
320
  });
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,
321
+ const o = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center"], a = (i) => Et.sanitize(i, {
322
+ ALLOWED_TAGS: [
323
+ ...o,
324
+ ...e ? ["a"] : [],
325
+ ...s ? ["img"] : []
326
+ ],
327
+ ALLOWED_ATTR: [
328
+ ...n,
329
+ ...e ? ["href", "title", "target"] : [],
330
+ ...s ? ["src", "alt", "title"] : []
331
+ ],
280
332
  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);
333
+ }), d = (i) => a(C.parse(i));
334
+ t.querySelectorAll("td,th").forEach((i) => {
335
+ i.innerHTML = i.textContent;
336
+ const l = i.textContent.trim().replace(/<[^>]*>/g, "");
337
+ i.innerHTML = d(l);
286
338
  }), t.setAttribute("data-markdown-rendered", "true");
287
339
  }, 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"))
340
+ const { scrollStep: e } = this.options, s = t.querySelector("._contentWrap"), o = t.querySelector("._tableCover"), n = t.querySelector("._table"), a = typeof e == "number" ? e : s.clientWidth * 0.5;
341
+ if (!s || !o || o.querySelector(".table_navigation"))
290
342
  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);
343
+ const d = document.createElement("div");
344
+ d.className = "table_navigation";
345
+ const u = document.createElement("div"), i = document.createElement("div");
346
+ u.className = "table-nav-left", i.className = "table-nav-right", d.appendChild(u), d.appendChild(i), o.appendChild(d);
347
+ const l = () => {
348
+ const c = n.scrollLeft, h = n.scrollWidth - n.clientWidth;
349
+ u.classList.toggle("disabled", c <= 0), i.classList.toggle("disabled", c >= h - 1);
298
350
  };
299
- l.addEventListener("click", () => {
351
+ u.addEventListener("click", () => {
300
352
  n.scrollBy({ left: -a, behavior: "smooth" });
301
- }), o.addEventListener("click", () => {
353
+ }), i.addEventListener("click", () => {
302
354
  n.scrollBy({ left: a, behavior: "smooth" });
303
- }), n.addEventListener("scroll", d), window.addEventListener("resize", d), d();
304
- }, S = new WeakSet(), G = function(t) {
355
+ }), n.addEventListener("scroll", l), window.addEventListener("resize", l), l();
356
+ }, A = new WeakSet(), G = function(t) {
305
357
  const { params: e } = t.article;
306
358
  return e.$video.length && new ft(e.$video), this;
307
359
  }, z = new WeakSet(), ut = function(t) {
308
360
  const { basic_rwd: e } = this.options, { params: s } = t.article;
309
361
  if (!s.$swiper)
310
362
  return;
311
- const i = wt(), n = this;
363
+ const o = wt(), n = this;
312
364
  let a = {
313
365
  on: {
314
- init(o) {
315
- const d = o.$el[0];
316
- s.$video.length && ([...d.querySelectorAll("[video4-active]")].forEach((h) => {
366
+ init(i) {
367
+ const l = i.$el[0];
368
+ s.$video.length && ([...l.querySelectorAll("[video4-active]")].forEach((h) => {
317
369
  var g, b;
318
370
  (g = h.querySelector($t.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
319
371
  }), n.update());
320
372
  },
321
- observerUpdate(o) {
322
- o.params.autoplay.enabled && (o.autoplay.start(), o.update());
373
+ observerUpdate(i) {
374
+ i.params.autoplay.enabled && (i.autoplay.start(), i.update());
323
375
  }
324
376
  },
325
377
  observer: !0,
326
378
  breakpoints: {}
327
379
  };
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")) {
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 = {
333
- nextEl: `.swiper-button-next.swiper-${i}`,
334
- prevEl: `.swiper-button-prev.swiper-${i}`
380
+ if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${o}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
381
+ const i = document.createElement("div");
382
+ i.className = `swiper-button-next swiper-${o}`, s.$swiperButtonCover.appendChild(i);
383
+ const l = document.createElement("div");
384
+ l.className = `swiper-button-prev swiper-${o}`, s.$swiperButtonCover.appendChild(l), a.navigation = {
385
+ nextEl: `.swiper-button-next.swiper-${o}`,
386
+ prevEl: `.swiper-button-prev.swiper-${o}`
335
387
  };
336
388
  }
337
389
  if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
338
- const o = document.createElement("div");
339
- o.className = `swiper-pagination swiper-${i}`, s.$swiper.appendChild(o), a.pagination = {
340
- el: `.swiper-pagination.swiper-${i}`,
390
+ const i = document.createElement("div");
391
+ i.className = `swiper-pagination swiper-${o}`, s.$swiper.appendChild(i), a.pagination = {
392
+ el: `.swiper-pagination.swiper-${o}`,
341
393
  clickable: !0
342
394
  };
343
395
  }
@@ -347,16 +399,16 @@ T = new WeakSet(), et = function() {
347
399
  delay: 3e3,
348
400
  disableOnInteraction: !1
349
401
  }), (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) {
402
+ let d = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
403
+ s.$swiper.querySelectorAll(".swiper-slide").length <= d() && (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"));
404
+ const u = new St(s.$swiper, a);
405
+ return t.article.swiperList = [], t.article.swiperList.push(u), this;
406
+ }, S = new WeakSet(), J = function(t) {
355
407
  const { navigation: e } = this.options, { params: s } = t.article;
356
408
  if (!s.$table)
357
409
  return;
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");
410
+ const o = t.getAttribute("freeze-table") === "on", n = parseInt(t.getAttribute("freeze-table-row") ?? "1", 10), a = parseInt(t.getAttribute("freeze-table-col") ?? "1", 10), d = t.querySelector("table"), u = t.querySelector("._tipText"), i = t.offsetWidth, l = d.offsetWidth, c = i < l, h = s.markdown === "on", g = () => {
411
+ o && p(this, M, ot).call(this, d, n, a), (o || c) && p(this, O, it).call(this, t), h && p(this, I, ct).call(this, d), e && c && p(this, X, dt).call(this, t), c ? (t.classList.add("overflow"), u.style.display = "flex") : (t.classList.remove("overflow"), u.style.display = "none");
360
412
  };
361
413
  return g(), window.addEventListener("resize", g), this;
362
414
  };
@@ -369,26 +421,26 @@ function w(r) {
369
421
  y: 0,
370
422
  z: 0
371
423
  };
372
- const s = e.includes("3d") ? "3d" : "2d", i = e.match(/matrix.*\((.+)\)/)[1].split(", ");
424
+ const s = e.includes("3d") ? "3d" : "2d", o = e.match(/matrix.*\((.+)\)/)[1].split(", ");
373
425
  if (s === "2d")
374
426
  return {
375
- x: Number(i[4]),
376
- y: Number(i[5]),
427
+ x: Number(o[4]),
428
+ y: Number(o[5]),
377
429
  z: 0
378
430
  };
379
431
  if (s === "3d")
380
432
  return {
381
- x: Number(i[12]),
382
- y: Number(i[13]),
383
- z: Number(i[14])
433
+ x: Number(o[12]),
434
+ y: Number(o[13]),
435
+ z: Number(o[14])
384
436
  };
385
437
  }
386
438
  function k(r) {
387
439
  const e = r.querySelector(".wrapper").querySelectorAll(".item");
388
440
  let s = 0;
389
- return e.forEach((i) => {
390
- const n = getComputedStyle(i), a = parseInt(n.marginLeft), c = parseInt(n.marginRight);
391
- s += i.getBoundingClientRect().width + a + c;
441
+ return e.forEach((o) => {
442
+ const n = getComputedStyle(o), a = parseInt(n.marginLeft), d = parseInt(n.marginRight);
443
+ s += o.getBoundingClientRect().width + a + d;
392
444
  }), s;
393
445
  }
394
446
  function U(r) {
@@ -399,7 +451,7 @@ function U(r) {
399
451
  if (w(r.slideWrapEl).x < r.translateMin && w(r.slideWrapEl).x > r.translateMax)
400
452
  return "is-middle";
401
453
  }
402
- function Tt(r) {
454
+ function qt(r) {
403
455
  const t = r.el, e = t.querySelector(".wrapper");
404
456
  e.addEventListener(K, function(s) {
405
457
  switch (r.isDown = !0, r.slidable && e.classList.add("dragging"), K) {
@@ -413,16 +465,16 @@ function Tt(r) {
413
465
  r.nowTranslateX = w(e).x;
414
466
  }), e.addEventListener(Q, function(s) {
415
467
  r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving");
416
- let i;
468
+ let o;
417
469
  switch (F) {
418
470
  case "mousemove":
419
- i = s.pageX - r.startX;
471
+ o = s.pageX - r.startX;
420
472
  break;
421
473
  case "touchmove":
422
- i = s.changedTouches[0].pageX - r.startX;
474
+ o = s.changedTouches[0].pageX - r.startX;
423
475
  break;
424
476
  }
425
- if (i === 0 && s.target.closest(".item")) {
477
+ if (o === 0 && s.target.closest(".item")) {
426
478
  if (Q === "mouseup" && s.button !== 0)
427
479
  return;
428
480
  e.querySelectorAll(".item").forEach((a) => {
@@ -437,20 +489,20 @@ function Tt(r) {
437
489
  if (!r.isDown)
438
490
  return;
439
491
  s.preventDefault();
440
- let i;
492
+ let o;
441
493
  switch (F) {
442
494
  case "mousemove":
443
- i = s.pageX - r.startX;
495
+ o = s.pageX - r.startX;
444
496
  break;
445
497
  case "touchmove":
446
- i = s.changedTouches[0].pageX - r.startX;
498
+ o = s.changedTouches[0].pageX - r.startX;
447
499
  break;
448
500
  }
449
- if (i !== 0) {
501
+ if (o !== 0) {
450
502
  e.classList.add("moving");
451
503
  const n = {
452
504
  transition: "all 0ms ease 0s",
453
- transform: `translate3d(${r.nowTranslateX + i}px,0,0)`
505
+ transform: `translate3d(${r.nowTranslateX + o}px,0,0)`
454
506
  };
455
507
  Object.assign(e.style, n);
456
508
  }
@@ -478,7 +530,7 @@ class Nt {
478
530
  const t = this;
479
531
  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() {
480
532
  t.update();
481
- }), Tt(t), Wt(t.el);
533
+ }), qt(t), Wt(t.el);
482
534
  }
483
535
  moveActive(t) {
484
536
  const e = this, s = e.slideWrapEl.querySelector(".item.active"), n = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
@@ -588,17 +640,17 @@ class It {
588
640
  }
589
641
  }
590
642
  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));
643
+ const { el: t, options: e } = this.__storage__, { SETTINGS: s } = At;
644
+ !tt(t) || !V(t) || (this.elements = T(t), this.options = Object.assign({}, s, e), p(this, H, ht).call(this));
593
645
  }, H = new WeakSet(), ht = function() {
594
646
  const { elements: t, options: e } = this;
595
647
  t.forEach((s) => {
596
- s.querySelectorAll("[share-target]").forEach((i) => {
597
- i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this, j, mt), i.addEventListener("click", i.share.eventHandler);
648
+ s.querySelectorAll("[share-target]").forEach((o) => {
649
+ o.share = {}, o.share.instance = this, o.share.params = e, o.share.eventHandler = p(this, j, mt), o.addEventListener("click", o.share.eventHandler);
598
650
  });
599
651
  });
600
652
  }, j = new WeakSet(), mt = function() {
601
- const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
653
+ const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), o = {
602
654
  source: this.getAttribute("utm-source"),
603
655
  medium: this.getAttribute("utm-medium"),
604
656
  campaign: this.getAttribute("utm-campaign")
@@ -608,7 +660,7 @@ D = new WeakSet(), pt = function() {
608
660
  className: this.getAttribute("copy-class") || e.className,
609
661
  duration: this.getAttribute("copy-duration") || e.duration
610
662
  }, a = encodeURIComponent(document.URL);
611
- let c = a;
663
+ let d = a;
612
664
  if (s == "wechat") {
613
665
  window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${a}&size=250x250`, "share to wechat", "width=300,height=300");
614
666
  return;
@@ -616,20 +668,20 @@ D = new WeakSet(), pt = function() {
616
668
  if (s == "url") {
617
669
  if (V(".copied-wrapper"))
618
670
  return;
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")) {
671
+ document.querySelector("body").insertAdjacentHTML(xt.append, `<div class='copied-wrapper'><div class='text'>${n.success ? n.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
672
+ const u = document.querySelector(".copied-wrapper");
673
+ n.className && u.classList.add(n.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";
674
+ const i = document.querySelector("#clipboard");
675
+ if (i.value = n.text ?? window.location.href, i.setSelectionRange(0, 9999), i.select(), document.execCommand("copy")) {
624
676
  document.execCommand("copy");
625
- const d = document.querySelector(".copied-wrapper"), u = document.querySelector(".copied-wrapper .text");
626
- u.style.display = "block", u.style.opacity = 0;
677
+ const l = document.querySelector(".copied-wrapper"), c = document.querySelector(".copied-wrapper .text");
678
+ c.style.display = "block", c.style.opacity = 0;
627
679
  const h = (b, v) => {
628
680
  let y = 0;
629
681
  const $ = 50, L = $ / v, P = setInterval(function() {
630
682
  y += L, b.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
631
683
  g(b, 300, function() {
632
- d.remove();
684
+ l.remove();
633
685
  });
634
686
  }, n.duration));
635
687
  }, $);
@@ -639,11 +691,11 @@ D = new WeakSet(), pt = function() {
639
691
  $ -= P, b.style.opacity = $, $ <= 0 && (clearInterval(gt), b.style.display = "none", y && y());
640
692
  }, L);
641
693
  };
642
- h(u, 300);
694
+ h(c, 300);
643
695
  }
644
696
  return;
645
697
  }
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(() => {
698
+ d = `${d}${o.source ? `?utm_source=${o.source}` : ""}${o.medium ? `&utm_medium${o.medium}` : ""}${o.campaign ? `&utm_campaign${o.campaign}` : ""}`, d = d.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${Z(s)}${a}`) : window.open(`${Z(s)}${d}&quote=${d}`), this.removeEventListener("click", t), setTimeout(() => {
647
699
  this.addEventListener("click", t);
648
700
  }, 100);
649
701
  };