@xwadex/fesd 0.0.34 → 0.0.36

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,658 +1,763 @@
1
- var gt = (o, t, e) => {
2
- if (!t.has(o))
3
- throw TypeError("Cannot " + e);
1
+ var be = (r, e, t) => {
2
+ if (!e.has(r))
3
+ throw TypeError("Cannot " + t);
4
4
  };
5
- var m = (o, t, e) => {
6
- if (t.has(o))
5
+ var m = (r, e, t) => {
6
+ if (e.has(r))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- t instanceof WeakSet ? t.add(o) : t.set(o, e);
8
+ e instanceof WeakSet ? e.add(r) : e.set(r, t);
9
9
  };
10
- var p = (o, t, e) => (gt(o, t, "access private method"), e);
11
- import { i as Z, a as U, g as k, v as bt, c as ft, b as wt, d as vt, e as yt, f as $t, s as At } from "./image-preview-bundle.js";
12
- import { A as Mt, j as Nt, C as zt, h as It, D as Xt, k as Dt, n as Ht, I as Ot, l as jt, M as Pt, m as Ft, R as Ut, T as Vt } from "./image-preview-bundle.js";
13
- import { m as C, S as xt, p as St } from "./vendor-bundle.js";
14
- const f = (o, t, e) => {
15
- o && (wt(o) ? o.forEach((s) => s.style[t] = e) : o.style[t] = e);
10
+ var p = (r, e, t) => (be(r, e, "access private method"), t);
11
+ import { i as ee, a as V, g as T, v as fe, c as we, b as ve, d as ye, e as $e, f as xe, s as Ae } from "./image-preview-bundle.js";
12
+ import { A as De, j as He, C as je, h as Pe, D as Fe, m as Ue, I as Ve, k as Ye, M as Ge, l as Je, R as Ke, T as Qe } from "./image-preview-bundle.js";
13
+ import { m as x, S as Se, p as ke } from "./vendor-bundle.js";
14
+ const E = () => {
15
+ const r = navigator.userAgent, e = {
16
+ // Firefox 1.0+
17
+ isFirefox: typeof InstallTrigger < "u",
18
+ // Opera 8.0+
19
+ isOpera: !!window.opr && !!opr.addons || !!window.opera || r.indexOf(" OPR/") >= 0,
20
+ // Internet Explorer 6-11
21
+ isIE: (
22
+ /*@cc_on!@*/
23
+ !!document.documentMode
24
+ ),
25
+ // Edge 20+
26
+ isEdge: !document.documentMode && !!window.StyleMedia,
27
+ // Edge (based on chromium) detection
28
+ isEdgeChromium: /\sedg\//i.test(r) || /edg([ea]|ios)/i.test(r),
29
+ // Safari 3.0+ "[object HTMLElementConstructor]"
30
+ isSafari: !/chrome|crios|crmo/i.test(r) && /safari/i.test(r),
31
+ // Chrome 1 - 79
32
+ isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(r)
33
+ }, t = {
34
+ // Android
35
+ isAndroid: r.indexOf("Android") > -1 || r.indexOf("Adr") > -1,
36
+ // iOS | ipad
37
+ isiOS: r.indexOf("Mac") > -1 && "ontouchend" in document
38
+ }, s = {
39
+ // window
40
+ isWindows: r.indexOf("Win") > -1,
41
+ // macos
42
+ isMacOS: r.indexOf("Mac") > -1,
43
+ // UNIX
44
+ isUNIX: r.indexOf("X11") > -1,
45
+ // Linux
46
+ isLinux: r.indexOf("Linux") > -1
47
+ };
48
+ return { browser: e, mobile: t, os: s };
49
+ }, Ee = () => {
50
+ const { browser: r } = E();
51
+ return Object.keys(r).find((e) => {
52
+ if (r[e])
53
+ return r[e];
54
+ });
55
+ }, Le = () => {
56
+ const { mobile: r } = E();
57
+ return Object.keys(r).some((e) => {
58
+ if (r[e])
59
+ return r[e];
60
+ });
61
+ }, Ce = () => {
62
+ const { os: r } = E();
63
+ return Object.keys(r).find((e) => {
64
+ if (r[e])
65
+ return r[e];
66
+ });
67
+ }, Te = () => console.dir(E());
68
+ function Re() {
69
+ return {
70
+ init: E,
71
+ isBrowser4: Ee,
72
+ isMobile4: Le,
73
+ isOs4: Ce,
74
+ logs: Te
75
+ };
76
+ }
77
+ const f = (r, e, t) => {
78
+ r && (ve(r) ? r.forEach((s) => s.style[e] = t) : r.style[e] = t);
16
79
  };
17
- var T, tt, q, et, A, V, W, st, _, rt, R, it, B, ot, M, at, N, nt, z, lt, I, ct, x, Y, X, dt, S, G;
18
- class qt {
19
- constructor(t, e = {}) {
20
- m(this, T);
80
+ var q, te, W, se, A, Y, _, re, O, ie, M, oe, R, ae, B, ne, N, le, z, ce, I, de, S, G, X, ue, k, J;
81
+ class Be {
82
+ constructor(e, t = {}) {
21
83
  m(this, q);
84
+ m(this, W);
22
85
  // 取得元件上的設定值
23
86
  m(this, A);
24
87
  // 設置設定值的 CSS 樣式
25
- m(this, W);
26
- // 表格拖曳功能
27
88
  m(this, _);
89
+ // 表格拖曳功能
90
+ m(this, O);
28
91
  // 設置表格凍結
92
+ m(this, M);
29
93
  m(this, R);
30
94
  m(this, B);
31
- m(this, M);
32
95
  m(this, N);
33
96
  // Markdown 設置
34
97
  m(this, z);
35
98
  // Navigation 設置
36
99
  m(this, I);
37
- m(this, x);
38
- m(this, X);
39
100
  m(this, S);
40
- !Z(t) || !U(t) || (this.__storage__ = {
41
- el: t,
42
- options: e
43
- }, this.active = "data-article-active", p(this, T, tt).call(this));
101
+ m(this, X);
102
+ m(this, k);
103
+ !ee(e) || !V(e) || (this.__storage__ = {
104
+ el: e,
105
+ options: t
106
+ }, this.active = "data-article-active", p(this, q, te).call(this));
44
107
  }
45
108
  update() {
46
- const { elements: t } = this;
47
- t.forEach((e) => {
48
- e.querySelectorAll("._article").forEach((s) => {
49
- s.article = {}, s.article.parent = e, s.article.params = p(this, A, V).call(this, s), p(this, x, Y).call(this, s), p(this, S, G).call(this, s);
109
+ const { elements: e } = this;
110
+ e.forEach((t) => {
111
+ t.querySelectorAll("._article").forEach((s) => {
112
+ s.article = {}, s.article.parent = t, s.article.params = p(this, A, Y).call(this, s), p(this, S, G).call(this, s), p(this, k, J).call(this, s);
50
113
  });
51
114
  });
52
115
  }
53
116
  }
54
- T = new WeakSet(), tt = function() {
55
- const { el: t, options: e } = this.__storage__, { SETTINGS: s } = vt;
56
- this.elements = e.state == "not active" ? k(t + `:not([${this.active}])`) : k(t), this.elements = k(t), this.options = Object.assign({}, s, e), p(this, q, et).call(this);
57
- }, q = new WeakSet(), et = function() {
58
- const { elements: t } = this;
59
- t.forEach((e) => {
60
- e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((s) => {
61
- var i, n;
62
- s.article = {}, s.article.parent = e, s.article.params = p(this, A, V).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(n = p(i = p(this, W, st).call(this, s), x, Y).call(i, s), X, dt).call(n, s), p(this, S, G).call(this, s);
117
+ q = new WeakSet(), te = function() {
118
+ const { el: e, options: t } = this.__storage__, { SETTINGS: s } = ye;
119
+ this.elements = t.state == "not active" ? T(e + `:not([${this.active}])`) : T(e), this.elements = T(e), this.options = Object.assign({}, s, t), p(this, W, se).call(this);
120
+ }, W = new WeakSet(), se = function() {
121
+ const { elements: e } = this;
122
+ e.forEach((t) => {
123
+ t.setAttribute(this.active, ""), t.querySelectorAll("._article").forEach((s) => {
124
+ var o, c;
125
+ s.article = {}, s.article.parent = t, s.article.params = p(this, A, Y).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(c = p(o = p(this, _, re).call(this, s), S, G).call(o, s), X, ue).call(c, s), p(this, k, J).call(this, s);
63
126
  });
64
127
  });
65
- }, A = new WeakSet(), V = function(t) {
128
+ }, A = new WeakSet(), Y = function(e) {
66
129
  return {
67
130
  // 元件本身
68
- $selector: t,
131
+ $selector: e,
69
132
  // 父層元件
70
- $backgroundWrap: t.querySelector("._backgroundWrap"),
71
- $contentWrap: t.querySelector("._contentWrap"),
72
- $wordCover: t.querySelector("._wordCover"),
73
- $buttonCover: t.querySelector("._buttonCover"),
74
- $imgCover: t.querySelector("._imgCover"),
75
- $cover: t.querySelectorAll("._cover"),
76
- $swiper: t.querySelector(".swiper"),
77
- $table: t.querySelector("._table"),
78
- $quote: t.querySelector("._quote"),
79
- $swiperButtonCover: t.querySelector(".swiper-button-cover"),
133
+ $backgroundWrap: e.querySelector("._backgroundWrap"),
134
+ $contentWrap: e.querySelector("._contentWrap"),
135
+ $wordCover: e.querySelector("._wordCover"),
136
+ $buttonCover: e.querySelector("._buttonCover"),
137
+ $imgCover: e.querySelector("._imgCover"),
138
+ $cover: e.querySelectorAll("._cover"),
139
+ $swiper: e.querySelector(".swiper"),
140
+ $table: e.querySelector("._table"),
141
+ $quote: e.querySelector("._quote"),
142
+ $swiperButtonCover: e.querySelector(".swiper-button-cover"),
80
143
  // 子層元件
81
- $h: t.querySelector("._H"),
82
- $subH: t.querySelector("._subH"),
83
- $p: t.querySelector("._P"),
84
- $button: t.querySelector("._button"),
85
- $description: t.querySelectorAll("._description"),
86
- $video: t.querySelectorAll("[video-id]"),
144
+ $h: e.querySelector("._H"),
145
+ $subH: e.querySelector("._subH"),
146
+ $p: e.querySelector("._P"),
147
+ $button: e.querySelector("._button"),
148
+ $description: e.querySelectorAll("._description"),
149
+ $video: e.querySelectorAll("[video-id]"),
87
150
  // 父層設定
88
- typeFullColor: t.getAttribute("typeFull-color"),
89
- typeFullBoxColor: t.getAttribute("typeFull-boxcolor"),
151
+ typeFullColor: e.getAttribute("typeFull-color"),
152
+ typeFullBoxColor: e.getAttribute("typeFull-boxcolor"),
90
153
  // 子層設定
91
- hColor: t.getAttribute("h-color"),
92
- subHColor: t.getAttribute("subh-color"),
93
- pColor: t.getAttribute("p-color"),
94
- buttonColor: t.getAttribute("button-color"),
95
- buttonColorHover: t.getAttribute("button-color-hover"),
96
- buttonTextColor: t.getAttribute("button-textcolor"),
97
- descriptionColor: t.getAttribute("description-color"),
98
- quoteColor: t.getAttribute("quote-color"),
99
- markdown: t.getAttribute("data-table-markdown") ?? !1
154
+ hColor: e.getAttribute("h-color"),
155
+ subHColor: e.getAttribute("subh-color"),
156
+ pColor: e.getAttribute("p-color"),
157
+ buttonColor: e.getAttribute("button-color"),
158
+ buttonColorHover: e.getAttribute("button-color-hover"),
159
+ buttonTextColor: e.getAttribute("button-textcolor"),
160
+ descriptionColor: e.getAttribute("description-color"),
161
+ quoteColor: e.getAttribute("quote-color"),
162
+ markdown: e.getAttribute("data-table-markdown") ?? !1
100
163
  };
101
- }, W = new WeakSet(), st = function(t) {
102
- const { params: e } = t.article;
103
- 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;
104
- }, _ = new WeakSet(), rt = function(t) {
105
- const { params: e } = t.article, s = e.$table;
106
- let i = !1, n, a, d, u;
107
- s.addEventListener("mousedown", function(r) {
108
- r.preventDefault(), i = !0;
109
- const l = s.getBoundingClientRect();
110
- n = r.pageX - l.left, a = r.pageY - l.top, d = s.scrollLeft, u = s.scrollTop;
164
+ }, _ = new WeakSet(), re = function(e) {
165
+ const { params: t } = e.article;
166
+ return f(t.$h, "color", t.hColor), f(t.$subH, "color", t.subHColor), f(t.$p, "color", t.pColor), f(t.$description, "color", t.descriptionColor), f(t.$button, "backgroundColor", t.buttonColor), f(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), f(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), f(t.$backgroundWrap, "backgroundColor", t.typeFullColor), f(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), f(t.$quote, "color", t.quoteColor), this;
167
+ }, O = new WeakSet(), ie = function(e) {
168
+ const { params: t } = e.article, s = t.$table;
169
+ let o = !1, c, l, d, u;
170
+ s.addEventListener("mousedown", function(i) {
171
+ i.preventDefault(), o = !0;
172
+ const n = s.getBoundingClientRect();
173
+ c = i.pageX - n.left, l = i.pageY - n.top, d = s.scrollLeft, u = s.scrollTop;
111
174
  }), s.addEventListener("mouseleave", function() {
112
- i = !1;
175
+ o = !1;
113
176
  }), s.addEventListener("mouseup", function() {
114
- i = !1;
115
- }), s.addEventListener("mousemove", function(r) {
116
- if (!i)
177
+ o = !1;
178
+ }), s.addEventListener("mousemove", function(i) {
179
+ if (!o)
117
180
  return;
118
- r.preventDefault();
119
- const l = s.getBoundingClientRect(), c = r.pageX - l.left, h = r.pageY - l.top, g = c - n, b = h - a;
181
+ i.preventDefault();
182
+ const n = s.getBoundingClientRect(), a = i.pageX - n.left, h = i.pageY - n.top, g = a - c, b = h - l;
120
183
  s.scrollLeft = d - g, s.scrollTop = u - b;
121
184
  });
122
- }, R = new WeakSet(), it = function(t, e, s) {
123
- const { basic_rwd: i } = this.options, n = window.innerWidth < i, a = [...t.querySelectorAll("tr")];
124
- if (n || !a.length)
185
+ }, M = new WeakSet(), oe = function(e, t, s) {
186
+ const { basic_rwd: o } = this.options, c = window.innerWidth < o, l = [...e.querySelectorAll("tr")];
187
+ if (c || !l.length)
125
188
  return;
126
- const d = p(this, B, ot).call(this, a);
127
- p(this, N, nt).call(this, t, d, e, s);
128
- }, B = new WeakSet(), ot = function(t) {
129
- const e = [], s = /* @__PURE__ */ new Set();
130
- return t.forEach((i, n) => {
131
- const a = [...i.children];
132
- e[n] = [];
189
+ const d = p(this, R, ae).call(this, l);
190
+ p(this, N, le).call(this, e, d, t, s);
191
+ }, R = new WeakSet(), ae = function(e) {
192
+ const t = [], s = /* @__PURE__ */ new Set();
193
+ return e.forEach((o, c) => {
194
+ const l = [...o.children];
195
+ t[c] = [];
133
196
  let d = 0;
134
- a.forEach((u) => {
135
- const r = +u.getAttribute("rowspan") || 1, l = +u.getAttribute("colspan") || 1;
136
- for (; e[n][d] || s.has(`${n},${d}`); )
197
+ l.forEach((u) => {
198
+ const i = +u.getAttribute("rowspan") || 1, n = +u.getAttribute("colspan") || 1;
199
+ for (; t[c][d] || s.has(`${c},${d}`); )
137
200
  d++;
138
- for (let c = 0; c < r; c++) {
139
- const h = n + c;
140
- e[h] ?? (e[h] = []);
141
- for (let g = 0; g < l; g++) {
201
+ for (let a = 0; a < i; a++) {
202
+ const h = c + a;
203
+ t[h] ?? (t[h] = []);
204
+ for (let g = 0; g < n; g++) {
142
205
  const b = d + g;
143
- e[h][b] = {
144
- el: c === 0 && g === 0 ? u : null,
145
- topRow: n,
206
+ t[h][b] = {
207
+ el: a === 0 && g === 0 ? u : null,
208
+ topRow: c,
146
209
  leftCol: d,
147
- rowspan: r,
148
- colspan: l
149
- }, c > 0 && s.add(`${h},${b}`);
210
+ rowspan: i,
211
+ colspan: n
212
+ }, a > 0 && s.add(`${h},${b}`);
150
213
  }
151
214
  }
152
- d += l;
215
+ d += n;
153
216
  });
154
- }), e;
155
- }, M = new WeakSet(), at = function(t, e) {
156
- var a;
157
- const s = e.length, i = Array(s).fill(0), n = t.getBoundingClientRect().top;
217
+ }), t;
218
+ }, B = new WeakSet(), ne = function(e, t) {
219
+ var l;
220
+ const s = t.length, o = Array(s).fill(0), c = e.getBoundingClientRect().top;
158
221
  for (let d = 0; d < s; d++)
159
- for (let u = 0; u < (((a = e[d]) == null ? void 0 : a.length) || 0); u++) {
160
- const r = e[d][u];
161
- if (r != null && r.el) {
162
- const l = r.el.getBoundingClientRect().top;
163
- i[d] = l - n;
222
+ for (let u = 0; u < (((l = t[d]) == null ? void 0 : l.length) || 0); u++) {
223
+ const i = t[d][u];
224
+ if (i != null && i.el) {
225
+ const n = i.el.getBoundingClientRect().top;
226
+ o[d] = n - c;
164
227
  break;
165
228
  }
166
229
  }
167
- return i;
168
- }, N = new WeakSet(), nt = function(t, e, s, i) {
230
+ return o;
231
+ }, N = new WeakSet(), le = function(e, t, s, o) {
169
232
  var u;
170
- const n = p(this, M, at).call(this, t, e), a = ((u = e[0]) == null ? void 0 : u.length) ?? 0, d = Array(a).fill(0);
171
- for (let r = 0; r < a; r++)
172
- for (let l = 0; l < e.length; l++) {
173
- const c = e[l][r];
174
- if (c != null && c.el) {
175
- d[r] = c.el.offsetLeft;
233
+ const c = p(this, B, ne).call(this, e, t), l = ((u = t[0]) == null ? void 0 : u.length) ?? 0, d = Array(l).fill(0);
234
+ for (let i = 0; i < l; i++)
235
+ for (let n = 0; n < t.length; n++) {
236
+ const a = t[n][i];
237
+ if (a != null && a.el) {
238
+ d[i] = a.el.offsetLeft;
176
239
  break;
177
240
  }
178
241
  }
179
- e.forEach(
180
- (r) => r.forEach((l) => {
181
- if (!(l != null && l.el))
242
+ t.forEach(
243
+ (i) => i.forEach((n) => {
244
+ if (!(n != null && n.el))
182
245
  return;
183
- const { el: c, topRow: h, leftCol: g } = l, b = h < s, v = g < i;
184
- 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`);
246
+ const { el: a, topRow: h, leftCol: g } = n, b = h < s, v = g < o;
247
+ a.style.position = "sticky", a.style.zIndex = b && v ? 3 : b ? 2 : v ? 1 : 0, a.style.backgroundColor = getComputedStyle(a).backgroundColor, b && (a.style.top = `${c[h]}px`), v && (a.style.left = `${d[g]}px`);
185
248
  })
186
249
  );
187
- }, z = new WeakSet(), lt = function(t) {
188
- const { markdownLink: e, markdownImg: s } = this.options;
189
- if (t.hasAttribute("data-markdown-rendered"))
250
+ }, z = new WeakSet(), ce = function(e) {
251
+ const { markdownLink: t, markdownImg: s } = this.options;
252
+ if (e.hasAttribute("data-markdown-rendered"))
190
253
  return;
191
- new C.Renderer(), C.use({
254
+ new x.Renderer(), x.use({
192
255
  extensions: [
193
256
  {
194
257
  name: "center",
195
258
  level: "block",
196
- start(r) {
197
- var l;
198
- return (l = r.match(/@center@/)) == null ? void 0 : l.index;
259
+ start(i) {
260
+ var n;
261
+ return (n = i.match(/@center@/)) == null ? void 0 : n.index;
199
262
  },
200
- tokenizer(r) {
201
- const c = /^@center@(.+?)@center@/s.exec(r);
202
- if (c)
263
+ tokenizer(i) {
264
+ const a = /^@center@(.+?)@center@/s.exec(i);
265
+ if (a)
203
266
  return {
204
267
  type: "center",
205
- raw: c[0],
206
- text: c[1],
207
- tokens: this.lexer.inlineTokens(c[1])
268
+ raw: a[0],
269
+ text: a[1],
270
+ tokens: this.lexer.inlineTokens(a[1])
208
271
  };
209
272
  },
210
- renderer(r) {
211
- return `<div data-center="true">${C.parser(r.tokens)}</div>`;
273
+ renderer(i) {
274
+ return `<div data-center="true">${x.parser(i.tokens)}</div>`;
275
+ }
276
+ },
277
+ {
278
+ name: "left",
279
+ level: "block",
280
+ start(i) {
281
+ var n;
282
+ return (n = i.match(/@left@/)) == null ? void 0 : n.index;
283
+ },
284
+ tokenizer(i) {
285
+ const a = /^@left@(.+?)@left@/s.exec(i);
286
+ if (a)
287
+ return {
288
+ type: "left",
289
+ raw: a[0],
290
+ text: a[1],
291
+ tokens: this.lexer.inlineTokens(a[1])
292
+ };
293
+ },
294
+ renderer(i) {
295
+ return `<div data-left="true">${x.parser(i.tokens)}</div>`;
296
+ }
297
+ },
298
+ {
299
+ name: "right",
300
+ level: "block",
301
+ start(i) {
302
+ var n;
303
+ return (n = i.match(/@right@/)) == null ? void 0 : n.index;
304
+ },
305
+ tokenizer(i) {
306
+ const a = /^@right@(.+?)@right@/s.exec(i);
307
+ if (a)
308
+ return {
309
+ type: "right",
310
+ raw: a[0],
311
+ text: a[1],
312
+ tokens: this.lexer.inlineTokens(a[1])
313
+ };
314
+ },
315
+ renderer(i) {
316
+ return `<div data-right="true">${x.parser(i.tokens)}</div>`;
212
317
  }
213
318
  },
214
319
  {
215
320
  name: "sup",
216
321
  level: "inline",
217
- start(r) {
218
- var l;
219
- return (l = r.match(/@sup@/)) == null ? void 0 : l.index;
322
+ start(i) {
323
+ var n;
324
+ return (n = i.match(/@sup@/)) == null ? void 0 : n.index;
220
325
  },
221
- tokenizer(r) {
222
- const c = /^@sup@(.+?)@sup@/.exec(r);
223
- if (c)
326
+ tokenizer(i) {
327
+ const a = /^@sup@(.+?)@sup@/.exec(i);
328
+ if (a)
224
329
  return {
225
330
  type: "sup",
226
- raw: c[0],
227
- text: c[1],
228
- tokens: this.lexer.inlineTokens(c[1])
331
+ raw: a[0],
332
+ text: a[1],
333
+ tokens: this.lexer.inlineTokens(a[1])
229
334
  };
230
335
  },
231
- renderer(r) {
232
- return `<sup>${r.text}</sup>`;
336
+ renderer(i) {
337
+ return `<sup>${i.text}</sup>`;
233
338
  }
234
339
  },
235
340
  {
236
341
  name: "sub",
237
342
  level: "inline",
238
- start(r) {
239
- var l;
240
- return (l = r.match(/@sub@/)) == null ? void 0 : l.index;
343
+ start(i) {
344
+ var n;
345
+ return (n = i.match(/@sub@/)) == null ? void 0 : n.index;
241
346
  },
242
- tokenizer(r) {
243
- const c = /^@sub@(.+?)@sub@/.exec(r);
244
- if (c)
347
+ tokenizer(i) {
348
+ const a = /^@sub@(.+?)@sub@/.exec(i);
349
+ if (a)
245
350
  return {
246
351
  type: "sub",
247
- raw: c[0],
248
- text: c[1],
249
- tokens: this.lexer.inlineTokens(c[1])
352
+ raw: a[0],
353
+ text: a[1],
354
+ tokens: this.lexer.inlineTokens(a[1])
250
355
  };
251
356
  },
252
- renderer(r) {
253
- return `<sub>${r.text}</sub>`;
357
+ renderer(i) {
358
+ return `<sub>${i.text}</sub>`;
254
359
  }
255
360
  }
256
361
  ]
257
362
  });
258
- const i = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center"], a = (r) => St.sanitize(r, {
363
+ const o = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], c = ["data-center", "data-right", "data-left"], l = (i) => ke.sanitize(i, {
259
364
  ALLOWED_TAGS: [
260
- ...i,
261
- ...e ? ["a"] : [],
365
+ ...o,
366
+ ...t ? ["a"] : [],
262
367
  ...s ? ["img"] : []
263
368
  ],
264
369
  ALLOWED_ATTR: [
265
- ...n,
266
- ...e ? ["href", "title", "target"] : [],
370
+ ...c,
371
+ ...t ? ["href", "title", "target"] : [],
267
372
  ...s ? ["src", "alt", "title"] : []
268
373
  ],
269
374
  RETURN_TRUSTED_TYPE: !1
270
- }), d = (r) => a(C.parse(r));
271
- t.querySelectorAll("td,th").forEach((r) => {
272
- r.innerHTML = r.textContent;
273
- const l = r.textContent.trim().replace(/<[^>]*>/g, "");
274
- r.innerHTML = d(l);
275
- }), t.setAttribute("data-markdown-rendered", "true");
276
- }, I = new WeakSet(), ct = function(t) {
277
- 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;
278
- if (!s || !i || i.querySelector(".table_navigation"))
375
+ }), d = (i) => l(x.parse(i));
376
+ e.querySelectorAll("td,th").forEach((i) => {
377
+ i.innerHTML = i.textContent;
378
+ const n = i.textContent.trim().replace(/<[^>]*>/g, "");
379
+ i.innerHTML = d(n);
380
+ }), e.setAttribute("data-markdown-rendered", "true");
381
+ }, I = new WeakSet(), de = function(e) {
382
+ const { scrollStep: t } = this.options, s = e.querySelector("._contentWrap"), o = e.querySelector("._tableCover"), c = e.querySelector("._table"), l = typeof t == "number" ? t : s.clientWidth * 0.5;
383
+ if (!s || !o || o.querySelector(".table_navigation"))
279
384
  return;
280
385
  const d = document.createElement("div");
281
386
  d.className = "table_navigation";
282
- const u = document.createElement("div"), r = document.createElement("div");
283
- u.className = "table-nav-left", r.className = "table-nav-right", d.appendChild(u), d.appendChild(r), i.appendChild(d);
284
- const l = () => {
285
- const c = n.scrollLeft, h = n.scrollWidth - n.clientWidth;
286
- u.classList.toggle("disabled", c <= 0), r.classList.toggle("disabled", c >= h - 1);
387
+ const u = document.createElement("div"), i = document.createElement("div");
388
+ u.className = "table-nav-left", i.className = "table-nav-right", d.appendChild(u), d.appendChild(i), o.appendChild(d);
389
+ const n = () => {
390
+ const a = c.scrollLeft, h = c.scrollWidth - c.clientWidth;
391
+ u.classList.toggle("disabled", a <= 0), i.classList.toggle("disabled", a >= h - 1);
287
392
  };
288
393
  u.addEventListener("click", () => {
289
- n.scrollBy({ left: -a, behavior: "smooth" });
290
- }), r.addEventListener("click", () => {
291
- n.scrollBy({ left: a, behavior: "smooth" });
292
- }), n.addEventListener("scroll", l), window.addEventListener("resize", l), l();
293
- }, x = new WeakSet(), Y = function(t) {
294
- const { params: e } = t.article;
295
- return e.$video.length && new bt(e.$video), this;
296
- }, X = new WeakSet(), dt = function(t) {
297
- const { basic_rwd: e } = this.options, { params: s } = t.article;
394
+ c.scrollBy({ left: -l, behavior: "smooth" });
395
+ }), i.addEventListener("click", () => {
396
+ c.scrollBy({ left: l, behavior: "smooth" });
397
+ }), c.addEventListener("scroll", n), window.addEventListener("resize", n), n();
398
+ }, S = new WeakSet(), G = function(e) {
399
+ const { params: t } = e.article;
400
+ return t.$video.length && new fe(t.$video), this;
401
+ }, X = new WeakSet(), ue = function(e) {
402
+ const { basic_rwd: t } = this.options, { params: s } = e.article;
298
403
  if (!s.$swiper)
299
404
  return;
300
- const i = ft(), n = this;
301
- let a = {
405
+ const o = we(), c = this;
406
+ let l = {
302
407
  on: {
303
- init(r) {
304
- const l = r.$el[0];
305
- s.$video.length && ([...l.querySelectorAll("[video4-active]")].forEach((h) => {
408
+ init(i) {
409
+ const n = i.$el[0];
410
+ s.$video.length && ([...n.querySelectorAll("[video4-active]")].forEach((h) => {
306
411
  var g, b;
307
- (g = h.querySelector(yt.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
308
- }), n.update());
412
+ (g = h.querySelector($e.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
413
+ }), c.update());
309
414
  },
310
- observerUpdate(r) {
311
- r.params.autoplay.enabled && (r.autoplay.start(), r.update());
415
+ observerUpdate(i) {
416
+ i.params.autoplay.enabled && (i.autoplay.start(), i.update());
312
417
  }
313
418
  },
314
419
  observer: !0,
315
420
  breakpoints: {}
316
421
  };
317
- if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${i}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
318
- const r = document.createElement("div");
319
- r.className = `swiper-button-next swiper-${i}`, s.$swiperButtonCover.appendChild(r);
320
- const l = document.createElement("div");
321
- l.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(l), a.navigation = {
322
- nextEl: `.swiper-button-next.swiper-${i}`,
323
- prevEl: `.swiper-button-prev.swiper-${i}`
422
+ if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${o}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
423
+ const i = document.createElement("div");
424
+ i.className = `swiper-button-next swiper-${o}`, s.$swiperButtonCover.appendChild(i);
425
+ const n = document.createElement("div");
426
+ n.className = `swiper-button-prev swiper-${o}`, s.$swiperButtonCover.appendChild(n), l.navigation = {
427
+ nextEl: `.swiper-button-next.swiper-${o}`,
428
+ prevEl: `.swiper-button-prev.swiper-${o}`
324
429
  };
325
430
  }
326
431
  if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
327
- const r = document.createElement("div");
328
- r.className = `swiper-pagination swiper-${i}`, s.$swiper.appendChild(r), a.pagination = {
329
- el: `.swiper-pagination.swiper-${i}`,
432
+ const i = document.createElement("div");
433
+ i.className = `swiper-pagination swiper-${o}`, s.$swiper.appendChild(i), l.pagination = {
434
+ el: `.swiper-pagination.swiper-${o}`,
330
435
  clickable: !0
331
436
  };
332
437
  }
333
- Number.parseInt(s.$selector.getAttribute("swiper-num")) && (a.breakpoints[e] = {
438
+ Number.parseInt(s.$selector.getAttribute("swiper-num")) && (l.breakpoints[t] = {
334
439
  slidesPerView: s.$selector.getAttribute("swiper-num") ? Number.parseInt(s.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(s.$selector.getAttribute("swiper-num")) : 1
335
- }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (a.autoplay = {
440
+ }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (l.autoplay = {
336
441
  delay: 3e3,
337
442
  disableOnInteraction: !1
338
- }), (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"));
339
- let d = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
340
- 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"));
341
- const u = new xt(s.$swiper, a);
342
- return t.article.swiperList = [], t.article.swiperList.push(u), this;
343
- }, S = new WeakSet(), G = function(t) {
344
- const { navigation: e } = this.options, { params: s } = t.article;
443
+ }), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (l.loop = !0), s.$selector.getAttribute("swiper-speed") && (l.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (l.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (l.pagination.dynamicBullets = !0, l.pagination ? l.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
444
+ let d = () => window.innerWidth > t && Number(s.$selector.getAttribute("swiper-num")) || 1;
445
+ s.$swiper.querySelectorAll(".swiper-slide").length <= d() && (l.navigation = !1, l.pagination = !1, l.autoplay = !1, l.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"));
446
+ const u = new Se(s.$swiper, l);
447
+ return e.article.swiperList = [], e.article.swiperList.push(u), this;
448
+ }, k = new WeakSet(), J = function(e) {
449
+ const { navigation: t } = this.options, { params: s } = e.article;
345
450
  if (!s.$table)
346
451
  return;
347
- 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), d = t.querySelector("table"), u = t.querySelector("._tipText"), r = t.offsetWidth, l = d.offsetWidth, c = r < l, h = s.markdown === "on", g = () => {
348
- i && p(this, R, it).call(this, d, n, a), (i || c) && p(this, _, rt).call(this, t), h && p(this, z, lt).call(this, d), e && c && p(this, I, ct).call(this, t), c ? (t.classList.add("overflow"), u.style.display = "flex") : (t.classList.remove("overflow"), u.style.display = "none");
452
+ const o = e.getAttribute("freeze-table") === "on", c = parseInt(e.getAttribute("freeze-table-row") ?? "1", 10), l = parseInt(e.getAttribute("freeze-table-col") ?? "1", 10), d = e.querySelector("table"), u = e.querySelector("._tipText"), i = e.offsetWidth, n = d.offsetWidth, a = i < n, h = s.markdown === "on", g = () => {
453
+ o && p(this, M, oe).call(this, d, c, l), (o || a) && p(this, O, ie).call(this, e), h && p(this, z, ce).call(this, d), t && a && p(this, I, de).call(this, e), a ? (e.classList.add("overflow"), u.style.display = "flex") : (e.classList.remove("overflow"), u.style.display = "none");
349
454
  };
350
455
  return g(), window.addEventListener("resize", g), this;
351
456
  };
352
- let J = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", K = "ontouchend" in document.documentElement ? "touchend" : "mouseup", P = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
353
- function w(o) {
354
- const t = window.getComputedStyle(o), e = t.transform || t.mozTransform;
355
- if (e === "none")
457
+ let K = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", Q = "ontouchend" in document.documentElement ? "touchend" : "mouseup", F = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
458
+ function w(r) {
459
+ const e = window.getComputedStyle(r), t = e.transform || e.mozTransform;
460
+ if (t === "none")
356
461
  return {
357
462
  x: 0,
358
463
  y: 0,
359
464
  z: 0
360
465
  };
361
- const s = e.includes("3d") ? "3d" : "2d", i = e.match(/matrix.*\((.+)\)/)[1].split(", ");
466
+ const s = t.includes("3d") ? "3d" : "2d", o = t.match(/matrix.*\((.+)\)/)[1].split(", ");
362
467
  if (s === "2d")
363
468
  return {
364
- x: Number(i[4]),
365
- y: Number(i[5]),
469
+ x: Number(o[4]),
470
+ y: Number(o[5]),
366
471
  z: 0
367
472
  };
368
473
  if (s === "3d")
369
474
  return {
370
- x: Number(i[12]),
371
- y: Number(i[13]),
372
- z: Number(i[14])
475
+ x: Number(o[12]),
476
+ y: Number(o[13]),
477
+ z: Number(o[14])
373
478
  };
374
479
  }
375
- function E(o) {
376
- const e = o.querySelector(".wrapper").querySelectorAll(".item");
480
+ function C(r) {
481
+ const t = r.querySelector(".wrapper").querySelectorAll(".item");
377
482
  let s = 0;
378
- return e.forEach((i) => {
379
- const n = getComputedStyle(i), a = parseInt(n.marginLeft), d = parseInt(n.marginRight);
380
- s += i.getBoundingClientRect().width + a + d;
483
+ return t.forEach((o) => {
484
+ const c = getComputedStyle(o), l = parseInt(c.marginLeft), d = parseInt(c.marginRight);
485
+ s += o.getBoundingClientRect().width + l + d;
381
486
  }), s;
382
487
  }
383
- function F(o) {
384
- if (w(o.slideWrapEl).x >= o.translateMin)
488
+ function U(r) {
489
+ if (w(r.slideWrapEl).x >= r.translateMin)
385
490
  return "is-start";
386
- if (w(o.slideWrapEl).x <= o.translateMax)
491
+ if (w(r.slideWrapEl).x <= r.translateMax)
387
492
  return "is-end";
388
- if (w(o.slideWrapEl).x < o.translateMin && w(o.slideWrapEl).x > o.translateMax)
493
+ if (w(r.slideWrapEl).x < r.translateMin && w(r.slideWrapEl).x > r.translateMax)
389
494
  return "is-middle";
390
495
  }
391
- function Lt(o) {
392
- const t = o.el, e = t.querySelector(".wrapper");
393
- e.addEventListener(J, function(s) {
394
- switch (o.isDown = !0, o.slidable && e.classList.add("dragging"), J) {
496
+ function qe(r) {
497
+ const e = r.el, t = e.querySelector(".wrapper");
498
+ t.addEventListener(K, function(s) {
499
+ switch (r.isDown = !0, r.slidable && t.classList.add("dragging"), K) {
395
500
  case "mousedown":
396
- o.startX = s.pageX;
501
+ r.startX = s.pageX;
397
502
  break;
398
503
  case "touchstart":
399
- o.startX = s.changedTouches[0].pageX;
504
+ r.startX = s.changedTouches[0].pageX;
400
505
  break;
401
506
  }
402
- o.nowTranslateX = w(e).x;
403
- }), e.addEventListener(K, function(s) {
404
- o.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving");
405
- let i;
406
- switch (P) {
507
+ r.nowTranslateX = w(t).x;
508
+ }), t.addEventListener(Q, function(s) {
509
+ r.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
510
+ let o;
511
+ switch (F) {
407
512
  case "mousemove":
408
- i = s.pageX - o.startX;
513
+ o = s.pageX - r.startX;
409
514
  break;
410
515
  case "touchmove":
411
- i = s.changedTouches[0].pageX - o.startX;
516
+ o = s.changedTouches[0].pageX - r.startX;
412
517
  break;
413
518
  }
414
- if (i === 0 && s.target.closest(".item")) {
415
- if (K === "mouseup" && s.button !== 0)
519
+ if (o === 0 && s.target.closest(".item")) {
520
+ if (Q === "mouseup" && s.button !== 0)
416
521
  return;
417
- e.querySelectorAll(".item").forEach((a) => {
418
- a.classList.remove("active");
419
- }), s.target.closest(".item").classList.add("active"), o.moveActive(o.params.speed);
522
+ t.querySelectorAll(".item").forEach((l) => {
523
+ l.classList.remove("active");
524
+ }), s.target.closest(".item").classList.add("active"), r.moveActive(r.params.speed);
420
525
  } else
421
- o.slidable && o.resetPos(t);
422
- }), e.addEventListener("mouseleave", function() {
423
- o.isDown && o.slidable && (o.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving"), o.resetPos(t));
424
- }), e.addEventListener(P, function(s) {
425
- if (o.draggable && o.slidable) {
426
- if (!o.isDown)
526
+ r.slidable && r.resetPos(e);
527
+ }), t.addEventListener("mouseleave", function() {
528
+ r.isDown && r.slidable && (r.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), r.resetPos(e));
529
+ }), t.addEventListener(F, function(s) {
530
+ if (r.draggable && r.slidable) {
531
+ if (!r.isDown)
427
532
  return;
428
533
  s.preventDefault();
429
- let i;
430
- switch (P) {
534
+ let o;
535
+ switch (F) {
431
536
  case "mousemove":
432
- i = s.pageX - o.startX;
537
+ o = s.pageX - r.startX;
433
538
  break;
434
539
  case "touchmove":
435
- i = s.changedTouches[0].pageX - o.startX;
540
+ o = s.changedTouches[0].pageX - r.startX;
436
541
  break;
437
542
  }
438
- if (i !== 0) {
439
- e.classList.add("moving");
440
- const n = {
543
+ if (o !== 0) {
544
+ t.classList.add("moving");
545
+ const c = {
441
546
  transition: "all 0ms ease 0s",
442
- transform: `translate3d(${o.nowTranslateX + i}px,0,0)`
547
+ transform: `translate3d(${r.nowTranslateX + o}px,0,0)`
443
548
  };
444
- Object.assign(e.style, n);
549
+ Object.assign(t.style, c);
445
550
  }
446
551
  }
447
552
  });
448
553
  }
449
- function Ct(o) {
450
- const t = o.querySelectorAll("a");
451
- for (var e = 0, s = t.length; e < s; e++)
452
- t[e].draggable = !1;
554
+ function We(r) {
555
+ const e = r.querySelectorAll("a");
556
+ for (var t = 0, s = e.length; t < s; t++)
557
+ e[t].draggable = !1;
453
558
  }
454
- class Wt {
455
- constructor(t, e) {
456
- this.el = typeof t == "string" ? document.querySelector(t) : t, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
559
+ class Ne {
560
+ constructor(e, t) {
561
+ this.el = typeof e == "string" ? document.querySelector(e) : e, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
457
562
  speed: 300,
458
563
  clickSwitch: !0,
459
564
  breakpoint: !1
460
- }, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = E(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
565
+ }, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = C(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
461
566
  Math.abs(
462
- E(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
567
+ C(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
463
568
  )
464
569
  ), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
465
570
  }
466
571
  init() {
467
- const t = this;
468
- 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() {
469
- t.update();
470
- }), Lt(t), Ct(t.el);
572
+ const e = this;
573
+ e.slidable && (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()), window.addEventListener("resize", function() {
574
+ e.update();
575
+ }), qe(e), We(e.el);
471
576
  }
472
- moveActive(t) {
473
- const e = this, s = e.slideWrapEl.querySelector(".item.active"), n = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
474
- if (e.slidable) {
475
- if (-n < 0 && -n > e.translateMax) {
476
- const a = {
477
- transition: `all ${t || 0}ms ease 0s`,
478
- transform: `translate3d(-${n}px,0,0)`
577
+ moveActive(e) {
578
+ const t = this, s = t.slideWrapEl.querySelector(".item.active"), c = s.previousElementSibling ? s.offsetLeft - t.el.clientWidth / 2 + s.clientWidth / 2 : 0;
579
+ if (t.slidable) {
580
+ if (-c < 0 && -c > t.translateMax) {
581
+ const l = {
582
+ transition: `all ${e || 0}ms ease 0s`,
583
+ transform: `translate3d(-${c}px,0,0)`
479
584
  };
480
- Object.assign(e.slideWrapEl.style, a);
481
- } else if (-n >= 0) {
482
- const a = {
483
- transition: `all ${t || 0}ms ease 0s`,
585
+ Object.assign(t.slideWrapEl.style, l);
586
+ } else if (-c >= 0) {
587
+ const l = {
588
+ transition: `all ${e || 0}ms ease 0s`,
484
589
  transform: "translate3d(0,0,0)"
485
590
  };
486
- Object.assign(e.slideWrapEl.style, a);
591
+ Object.assign(t.slideWrapEl.style, l);
487
592
  } else {
488
- const a = {
489
- transition: `all ${t || 0}ms ease 0s`,
490
- transform: `translate3d(${e.translateMax}px,0,0)`
593
+ const l = {
594
+ transition: `all ${e || 0}ms ease 0s`,
595
+ transform: `translate3d(${t.translateMax}px,0,0)`
491
596
  };
492
- Object.assign(e.slideWrapEl.style, a);
597
+ Object.assign(t.slideWrapEl.style, l);
493
598
  }
494
- if (t)
495
- e.slideWrapEl.addEventListener(
599
+ if (e)
600
+ t.slideWrapEl.addEventListener(
496
601
  "transitionend",
497
602
  function() {
498
- switch (e.nowTranslateX = w(e.slideWrapEl).x, F(e)) {
603
+ switch (t.nowTranslateX = w(t.slideWrapEl).x, U(t)) {
499
604
  case "is-start":
500
- e.el.classList.add("is-start"), e.el.classList.remove("is-end");
605
+ t.el.classList.add("is-start"), t.el.classList.remove("is-end");
501
606
  break;
502
607
  case "is-middle":
503
- e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
608
+ t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
504
609
  break;
505
610
  case "is-end":
506
- e.el.classList.remove("is-start"), e.el.classList.add("is-end");
611
+ t.el.classList.remove("is-start"), t.el.classList.add("is-end");
507
612
  break;
508
613
  }
509
614
  },
510
615
  !1
511
616
  );
512
617
  else
513
- switch (e.nowTranslateX = w(e.slideWrapEl).x, F(e)) {
618
+ switch (t.nowTranslateX = w(t.slideWrapEl).x, U(t)) {
514
619
  case "is-start":
515
- e.el.classList.add("is-start"), e.el.classList.remove("is-end");
620
+ t.el.classList.add("is-start"), t.el.classList.remove("is-end");
516
621
  break;
517
622
  case "is-middle":
518
- e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
623
+ t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
519
624
  break;
520
625
  case "is-end":
521
- e.el.classList.remove("is-start"), e.el.classList.add("is-end");
626
+ t.el.classList.remove("is-start"), t.el.classList.add("is-end");
522
627
  break;
523
628
  }
524
629
  }
525
630
  }
526
631
  resetPos() {
527
- const t = this;
528
- switch (F(t)) {
632
+ const e = this;
633
+ switch (U(e)) {
529
634
  case "is-start":
530
- t.el.classList.add("is-start"), t.el.classList.remove("is-end"), Object.assign(t.slideWrapEl.style, {
531
- transition: `all ${t.params.speed}ms ease 0s`,
635
+ e.el.classList.add("is-start"), e.el.classList.remove("is-end"), Object.assign(e.slideWrapEl.style, {
636
+ transition: `all ${e.params.speed}ms ease 0s`,
532
637
  transform: "translate3d(0,0,0)"
533
638
  });
534
639
  break;
535
640
  case "is-middle":
536
- t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
641
+ e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
537
642
  break;
538
643
  case "is-end":
539
- t.el.classList.remove("is-start"), t.el.classList.add("is-end"), Object.assign(t.slideWrapEl.style, {
540
- transition: `all ${t.params.speed}ms ease 0s`,
541
- transform: `translate3d(${t.translateMax}px,0,0)`
644
+ e.el.classList.remove("is-start"), e.el.classList.add("is-end"), Object.assign(e.slideWrapEl.style, {
645
+ transition: `all ${e.params.speed}ms ease 0s`,
646
+ transform: `translate3d(${e.translateMax}px,0,0)`
542
647
  });
543
648
  break;
544
649
  }
545
650
  }
546
651
  update() {
547
- const t = this;
548
- t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = E(t.el), t.translateMax = -Math.floor(
652
+ const e = this;
653
+ e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = C(e.el), e.translateMax = -Math.floor(
549
654
  Math.abs(
550
- E(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
655
+ C(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
551
656
  )
552
- ), 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"));
657
+ ), e.slidable = e.slideTotalWidth > Math.round(e.el.getBoundingClientRect().width) && (!e.params.breakpoint || window.innerWidth <= e.params.breakpoint), e.slidable ? (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()) : (e.el.classList.remove("slidable"), e.el.classList.remove("is-start"), e.el.classList.remove("is-end"), e.slideWrapEl.removeAttribute("style"));
553
658
  }
554
659
  }
555
- const Q = (o) => {
556
- if (o == "facebook")
660
+ const Z = (r) => {
661
+ if (r == "facebook")
557
662
  return "https://www.facebook.com/sharer/sharer.php?u=";
558
- if (o == "line")
663
+ if (r == "line")
559
664
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "http://line.naver.jp/R/msg/text/?" : "https://lineit.line.me/share/ui?url=";
560
- if (o == "twitter")
665
+ if (r == "twitter")
561
666
  return "https://twitter.com/intent/tweet?url=";
562
- if (o == "linkedin")
667
+ if (r == "linkedin")
563
668
  return `http://www.linkedin.com/shareArticle?mini=true&title=${document.title}&source=${document.title}&url=`;
564
- if (o == "telegram")
669
+ if (r == "telegram")
565
670
  return "https://telegram.me/share/url?url=";
566
671
  };
567
- var D, ut, H, pt, O, ht;
568
- class _t {
569
- constructor(t, e = {}) {
672
+ var D, pe, H, he, j, me;
673
+ class ze {
674
+ constructor(e, t = {}) {
570
675
  m(this, D);
571
676
  m(this, H);
572
- m(this, O);
677
+ m(this, j);
573
678
  this.__storage__ = {
574
- el: t,
575
- options: e
576
- }, p(this, D, ut).call(this);
679
+ el: e,
680
+ options: t
681
+ }, p(this, D, pe).call(this);
577
682
  }
578
683
  }
579
- D = new WeakSet(), ut = function() {
580
- const { el: t, options: e } = this.__storage__, { SETTINGS: s } = At;
581
- !Z(t) || !U(t) || (this.elements = k(t), this.options = Object.assign({}, s, e), p(this, H, pt).call(this));
582
- }, H = new WeakSet(), pt = function() {
583
- const { elements: t, options: e } = this;
584
- t.forEach((s) => {
585
- s.querySelectorAll("[share-target]").forEach((i) => {
586
- i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this, O, ht), i.addEventListener("click", i.share.eventHandler);
684
+ D = new WeakSet(), pe = function() {
685
+ const { el: e, options: t } = this.__storage__, { SETTINGS: s } = Ae;
686
+ !ee(e) || !V(e) || (this.elements = T(e), this.options = Object.assign({}, s, t), p(this, H, he).call(this));
687
+ }, H = new WeakSet(), he = function() {
688
+ const { elements: e, options: t } = this;
689
+ e.forEach((s) => {
690
+ s.querySelectorAll("[share-target]").forEach((o) => {
691
+ o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = p(this, j, me), o.addEventListener("click", o.share.eventHandler);
587
692
  });
588
693
  });
589
- }, O = new WeakSet(), ht = function() {
590
- const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
694
+ }, j = new WeakSet(), me = function() {
695
+ const { eventHandler: e, params: t } = this.share, s = this.getAttribute("share-target"), o = {
591
696
  source: this.getAttribute("utm-source"),
592
697
  medium: this.getAttribute("utm-medium"),
593
698
  campaign: this.getAttribute("utm-campaign")
594
- }, n = {
595
- success: this.getAttribute("copy-success") || e.success,
596
- text: this.getAttribute("copy-text") || e.text,
597
- className: this.getAttribute("copy-class") || e.className,
598
- duration: this.getAttribute("copy-duration") || e.duration
599
- }, a = encodeURIComponent(document.URL);
600
- let d = a;
699
+ }, c = {
700
+ success: this.getAttribute("copy-success") || t.success,
701
+ text: this.getAttribute("copy-text") || t.text,
702
+ className: this.getAttribute("copy-class") || t.className,
703
+ duration: this.getAttribute("copy-duration") || t.duration
704
+ }, l = encodeURIComponent(document.URL);
705
+ let d = l;
601
706
  if (s == "wechat") {
602
- window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${a}&size=250x250`, "share to wechat", "width=300,height=300");
707
+ window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${l}&size=250x250`, "share to wechat", "width=300,height=300");
603
708
  return;
604
709
  }
605
710
  if (s == "url") {
606
- if (U(".copied-wrapper"))
711
+ if (V(".copied-wrapper"))
607
712
  return;
608
- document.querySelector("body").insertAdjacentHTML($t.append, `<div class='copied-wrapper'><div class='text'>${n.success ? n.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
713
+ document.querySelector("body").insertAdjacentHTML(xe.append, `<div class='copied-wrapper'><div class='text'>${c.success ? c.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
609
714
  const u = document.querySelector(".copied-wrapper");
610
- 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";
611
- const r = document.querySelector("#clipboard");
612
- if (r.value = n.text ?? window.location.href, r.setSelectionRange(0, 9999), r.select(), document.execCommand("copy")) {
715
+ c.className && u.classList.add(c.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";
716
+ const i = document.querySelector("#clipboard");
717
+ if (i.value = c.text ?? window.location.href, i.setSelectionRange(0, 9999), i.select(), document.execCommand("copy")) {
613
718
  document.execCommand("copy");
614
- const l = document.querySelector(".copied-wrapper"), c = document.querySelector(".copied-wrapper .text");
615
- c.style.display = "block", c.style.opacity = 0;
719
+ const n = document.querySelector(".copied-wrapper"), a = document.querySelector(".copied-wrapper .text");
720
+ a.style.display = "block", a.style.opacity = 0;
616
721
  const h = (b, v) => {
617
722
  let y = 0;
618
- const $ = 50, L = $ / v, j = setInterval(function() {
619
- y += L, b.style.opacity = y, y >= 1 && (clearInterval(j), setTimeout(function() {
723
+ const $ = 50, L = $ / v, P = setInterval(function() {
724
+ y += L, b.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
620
725
  g(b, 300, function() {
621
- l.remove();
726
+ n.remove();
622
727
  });
623
- }, n.duration));
728
+ }, c.duration));
624
729
  }, $);
625
730
  }, g = (b, v, y) => {
626
731
  let $ = 1;
627
- const L = 50, j = L / v, mt = setInterval(() => {
628
- $ -= j, b.style.opacity = $, $ <= 0 && (clearInterval(mt), b.style.display = "none", y && y());
732
+ const L = 50, P = L / v, ge = setInterval(() => {
733
+ $ -= P, b.style.opacity = $, $ <= 0 && (clearInterval(ge), b.style.display = "none", y && y());
629
734
  }, L);
630
735
  };
631
- h(c, 300);
736
+ h(a, 300);
632
737
  }
633
738
  return;
634
739
  }
635
- d = `${d}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, d = d.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${Q(s)}${a}`) : window.open(`${Q(s)}${d}&quote=${d}`), this.removeEventListener("click", t), setTimeout(() => {
636
- this.addEventListener("click", t);
740
+ 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)}${l}`) : window.open(`${Z(s)}${d}&quote=${d}`), this.removeEventListener("click", e), setTimeout(() => {
741
+ this.addEventListener("click", e);
637
742
  }, 100);
638
743
  };
639
744
  export {
640
- Mt as Anchor4,
641
- Nt as Aost4,
642
- qt as Article4,
643
- Wt as CategorySlider,
644
- zt as Collapse4,
645
- It as Configs,
646
- Xt as Detect4,
647
- Dt as Dropdown4,
648
- Ht as ImagePreview,
649
- Ot as ImageValidate,
650
- jt as Marquee4,
651
- Pt as Modal4,
652
- Ft as Multipurpose4,
653
- Ut as Ripple4,
654
- _t as Share4,
655
- Vt as Tab4,
656
- bt as Video4
745
+ De as Anchor4,
746
+ He as Aost4,
747
+ Be as Article4,
748
+ Ne as CategorySlider,
749
+ je as Collapse4,
750
+ Pe as Configs,
751
+ Re as Detect4,
752
+ Fe as Dropdown4,
753
+ Ue as ImagePreview,
754
+ Ve as ImageValidate,
755
+ Ye as Marquee4,
756
+ Ge as Modal4,
757
+ Je as Multipurpose4,
758
+ Ke as Ripple4,
759
+ ze as Share4,
760
+ Qe as Tab4,
761
+ fe as Video4
657
762
  };
658
763
  //# sourceMappingURL=fesd-bundle.js.map