@xwadex/fesd 0.0.32 → 0.0.34
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.
- package/dist/fesd-bundle.js +221 -284
- package/dist/fesd-bundle.js.map +1 -1
- package/dist/image-preview-bundle.js +964 -895
- package/dist/image-preview-bundle.js.map +1 -1
- package/dist/tools-bundle.js +2 -2
- package/package.json +1 -1
package/dist/fesd-bundle.js
CHANGED
@@ -1,131 +1,68 @@
|
|
1
|
-
var
|
2
|
-
if (!t.has(
|
1
|
+
var gt = (o, t, e) => {
|
2
|
+
if (!t.has(o))
|
3
3
|
throw TypeError("Cannot " + e);
|
4
4
|
};
|
5
|
-
var m = (
|
6
|
-
if (t.has(
|
5
|
+
var m = (o, t, e) => {
|
6
|
+
if (t.has(o))
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
8
|
-
t instanceof WeakSet ? t.add(
|
8
|
+
t instanceof WeakSet ? t.add(o) : t.set(o, e);
|
9
9
|
};
|
10
|
-
var p = (
|
11
|
-
import { i as
|
12
|
-
import { A as
|
13
|
-
import { m as C, S as
|
14
|
-
const
|
15
|
-
|
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
|
-
}, e = {
|
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: t, mobile: e, os: s };
|
49
|
-
}, Lt = () => {
|
50
|
-
const { browser: r } = E();
|
51
|
-
return Object.keys(r).find((t) => {
|
52
|
-
if (r[t])
|
53
|
-
return r[t];
|
54
|
-
});
|
55
|
-
}, Ct = () => {
|
56
|
-
const { mobile: r } = E();
|
57
|
-
return Object.keys(r).some((t) => {
|
58
|
-
if (r[t])
|
59
|
-
return r[t];
|
60
|
-
});
|
61
|
-
}, kt = () => {
|
62
|
-
const { os: r } = E();
|
63
|
-
return Object.keys(r).find((t) => {
|
64
|
-
if (r[t])
|
65
|
-
return r[t];
|
66
|
-
});
|
67
|
-
}, Tt = () => console.dir(E());
|
68
|
-
function Rt() {
|
69
|
-
return {
|
70
|
-
init: E,
|
71
|
-
isBrowser4: Lt,
|
72
|
-
isMobile4: Ct,
|
73
|
-
isOs4: kt,
|
74
|
-
logs: Tt
|
75
|
-
};
|
76
|
-
}
|
77
|
-
const f = (r, t, e) => {
|
78
|
-
r && (vt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
|
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);
|
79
16
|
};
|
80
|
-
var q, et,
|
81
|
-
class
|
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 {
|
82
19
|
constructor(t, e = {}) {
|
20
|
+
m(this, T);
|
83
21
|
m(this, q);
|
84
|
-
m(this, W);
|
85
22
|
// 取得元件上的設定值
|
86
|
-
m(this,
|
23
|
+
m(this, A);
|
87
24
|
// 設置設定值的 CSS 樣式
|
88
|
-
m(this,
|
25
|
+
m(this, W);
|
89
26
|
// 表格拖曳功能
|
90
|
-
m(this,
|
27
|
+
m(this, _);
|
91
28
|
// 設置表格凍結
|
92
|
-
m(this, M);
|
93
29
|
m(this, R);
|
94
30
|
m(this, B);
|
31
|
+
m(this, M);
|
95
32
|
m(this, N);
|
96
33
|
// Markdown 設置
|
97
|
-
m(this,
|
34
|
+
m(this, z);
|
98
35
|
// Navigation 設置
|
36
|
+
m(this, I);
|
37
|
+
m(this, x);
|
99
38
|
m(this, X);
|
100
|
-
m(this, A);
|
101
|
-
m(this, z);
|
102
39
|
m(this, S);
|
103
|
-
!
|
40
|
+
!Z(t) || !U(t) || (this.__storage__ = {
|
104
41
|
el: t,
|
105
42
|
options: e
|
106
|
-
}, this.active = "data-article-active", p(this,
|
43
|
+
}, this.active = "data-article-active", p(this, T, tt).call(this));
|
107
44
|
}
|
108
45
|
update() {
|
109
46
|
const { elements: t } = this;
|
110
47
|
t.forEach((e) => {
|
111
48
|
e.querySelectorAll("._article").forEach((s) => {
|
112
|
-
s.article = {}, s.article.parent = e, s.article.params = p(this,
|
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);
|
113
50
|
});
|
114
51
|
});
|
115
52
|
}
|
116
53
|
}
|
117
|
-
|
118
|
-
const { el: t, options: e } = this.__storage__, { SETTINGS: s } =
|
119
|
-
this.elements = e.state == "not active" ?
|
120
|
-
},
|
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() {
|
121
58
|
const { elements: t } = this;
|
122
59
|
t.forEach((e) => {
|
123
60
|
e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((s) => {
|
124
|
-
var
|
125
|
-
s.article = {}, s.article.parent = e, s.article.params = p(this,
|
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);
|
126
63
|
});
|
127
64
|
});
|
128
|
-
},
|
65
|
+
}, A = new WeakSet(), V = function(t) {
|
129
66
|
return {
|
130
67
|
// 元件本身
|
131
68
|
$selector: t,
|
@@ -161,44 +98,44 @@ q = new WeakSet(), et = function() {
|
|
161
98
|
quoteColor: t.getAttribute("quote-color"),
|
162
99
|
markdown: t.getAttribute("data-table-markdown") ?? !1
|
163
100
|
};
|
164
|
-
},
|
101
|
+
}, W = new WeakSet(), st = function(t) {
|
165
102
|
const { params: e } = t.article;
|
166
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;
|
167
|
-
},
|
104
|
+
}, _ = new WeakSet(), rt = function(t) {
|
168
105
|
const { params: e } = t.article, s = e.$table;
|
169
|
-
let
|
170
|
-
s.addEventListener("mousedown", function(
|
171
|
-
|
106
|
+
let i = !1, n, a, d, u;
|
107
|
+
s.addEventListener("mousedown", function(r) {
|
108
|
+
r.preventDefault(), i = !0;
|
172
109
|
const l = s.getBoundingClientRect();
|
173
|
-
n =
|
110
|
+
n = r.pageX - l.left, a = r.pageY - l.top, d = s.scrollLeft, u = s.scrollTop;
|
174
111
|
}), s.addEventListener("mouseleave", function() {
|
175
|
-
|
112
|
+
i = !1;
|
176
113
|
}), s.addEventListener("mouseup", function() {
|
177
|
-
|
178
|
-
}), s.addEventListener("mousemove", function(
|
179
|
-
if (!
|
114
|
+
i = !1;
|
115
|
+
}), s.addEventListener("mousemove", function(r) {
|
116
|
+
if (!i)
|
180
117
|
return;
|
181
|
-
|
182
|
-
const l = s.getBoundingClientRect(), c =
|
118
|
+
r.preventDefault();
|
119
|
+
const l = s.getBoundingClientRect(), c = r.pageX - l.left, h = r.pageY - l.top, g = c - n, b = h - a;
|
183
120
|
s.scrollLeft = d - g, s.scrollTop = u - b;
|
184
121
|
});
|
185
|
-
},
|
186
|
-
const { basic_rwd:
|
122
|
+
}, R = new WeakSet(), it = function(t, e, s) {
|
123
|
+
const { basic_rwd: i } = this.options, n = window.innerWidth < i, a = [...t.querySelectorAll("tr")];
|
187
124
|
if (n || !a.length)
|
188
125
|
return;
|
189
|
-
const d = p(this,
|
190
|
-
p(this, N,
|
191
|
-
},
|
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) {
|
192
129
|
const e = [], s = /* @__PURE__ */ new Set();
|
193
|
-
return t.forEach((
|
194
|
-
const a = [...
|
130
|
+
return t.forEach((i, n) => {
|
131
|
+
const a = [...i.children];
|
195
132
|
e[n] = [];
|
196
133
|
let d = 0;
|
197
134
|
a.forEach((u) => {
|
198
|
-
const
|
135
|
+
const r = +u.getAttribute("rowspan") || 1, l = +u.getAttribute("colspan") || 1;
|
199
136
|
for (; e[n][d] || s.has(`${n},${d}`); )
|
200
137
|
d++;
|
201
|
-
for (let c = 0; c <
|
138
|
+
for (let c = 0; c < r; c++) {
|
202
139
|
const h = n + c;
|
203
140
|
e[h] ?? (e[h] = []);
|
204
141
|
for (let g = 0; g < l; g++) {
|
@@ -207,7 +144,7 @@ q = new WeakSet(), et = function() {
|
|
207
144
|
el: c === 0 && g === 0 ? u : null,
|
208
145
|
topRow: n,
|
209
146
|
leftCol: d,
|
210
|
-
rowspan:
|
147
|
+
rowspan: r,
|
211
148
|
colspan: l
|
212
149
|
}, c > 0 && s.add(`${h},${b}`);
|
213
150
|
}
|
@@ -215,39 +152,39 @@ q = new WeakSet(), et = function() {
|
|
215
152
|
d += l;
|
216
153
|
});
|
217
154
|
}), e;
|
218
|
-
},
|
155
|
+
}, M = new WeakSet(), at = function(t, e) {
|
219
156
|
var a;
|
220
|
-
const s = e.length,
|
157
|
+
const s = e.length, i = Array(s).fill(0), n = t.getBoundingClientRect().top;
|
221
158
|
for (let d = 0; d < s; d++)
|
222
159
|
for (let u = 0; u < (((a = e[d]) == null ? void 0 : a.length) || 0); u++) {
|
223
|
-
const
|
224
|
-
if (
|
225
|
-
const l =
|
226
|
-
|
160
|
+
const r = e[d][u];
|
161
|
+
if (r != null && r.el) {
|
162
|
+
const l = r.el.getBoundingClientRect().top;
|
163
|
+
i[d] = l - n;
|
227
164
|
break;
|
228
165
|
}
|
229
166
|
}
|
230
|
-
return
|
231
|
-
}, N = new WeakSet(),
|
167
|
+
return i;
|
168
|
+
}, N = new WeakSet(), nt = function(t, e, s, i) {
|
232
169
|
var u;
|
233
|
-
const n = p(this,
|
234
|
-
for (let
|
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++)
|
235
172
|
for (let l = 0; l < e.length; l++) {
|
236
|
-
const c = e[l][
|
173
|
+
const c = e[l][r];
|
237
174
|
if (c != null && c.el) {
|
238
|
-
d[
|
175
|
+
d[r] = c.el.offsetLeft;
|
239
176
|
break;
|
240
177
|
}
|
241
178
|
}
|
242
179
|
e.forEach(
|
243
|
-
(
|
180
|
+
(r) => r.forEach((l) => {
|
244
181
|
if (!(l != null && l.el))
|
245
182
|
return;
|
246
|
-
const { el: c, topRow: h, leftCol: g } = l, b = h < s, v = g <
|
183
|
+
const { el: c, topRow: h, leftCol: g } = l, b = h < s, v = g < i;
|
247
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`);
|
248
185
|
})
|
249
186
|
);
|
250
|
-
},
|
187
|
+
}, z = new WeakSet(), lt = function(t) {
|
251
188
|
const { markdownLink: e, markdownImg: s } = this.options;
|
252
189
|
if (t.hasAttribute("data-markdown-rendered"))
|
253
190
|
return;
|
@@ -256,12 +193,12 @@ q = new WeakSet(), et = function() {
|
|
256
193
|
{
|
257
194
|
name: "center",
|
258
195
|
level: "block",
|
259
|
-
start(
|
196
|
+
start(r) {
|
260
197
|
var l;
|
261
|
-
return (l =
|
198
|
+
return (l = r.match(/@center@/)) == null ? void 0 : l.index;
|
262
199
|
},
|
263
|
-
tokenizer(
|
264
|
-
const c = /^@center@(.+?)@center@/s.exec(
|
200
|
+
tokenizer(r) {
|
201
|
+
const c = /^@center@(.+?)@center@/s.exec(r);
|
265
202
|
if (c)
|
266
203
|
return {
|
267
204
|
type: "center",
|
@@ -270,19 +207,19 @@ q = new WeakSet(), et = function() {
|
|
270
207
|
tokens: this.lexer.inlineTokens(c[1])
|
271
208
|
};
|
272
209
|
},
|
273
|
-
renderer(
|
274
|
-
return `<div data-center="true">${C.parser(
|
210
|
+
renderer(r) {
|
211
|
+
return `<div data-center="true">${C.parser(r.tokens)}</div>`;
|
275
212
|
}
|
276
213
|
},
|
277
214
|
{
|
278
215
|
name: "sup",
|
279
216
|
level: "inline",
|
280
|
-
start(
|
217
|
+
start(r) {
|
281
218
|
var l;
|
282
|
-
return (l =
|
219
|
+
return (l = r.match(/@sup@/)) == null ? void 0 : l.index;
|
283
220
|
},
|
284
|
-
tokenizer(
|
285
|
-
const c = /^@sup@(.+?)@sup@/.exec(
|
221
|
+
tokenizer(r) {
|
222
|
+
const c = /^@sup@(.+?)@sup@/.exec(r);
|
286
223
|
if (c)
|
287
224
|
return {
|
288
225
|
type: "sup",
|
@@ -291,19 +228,19 @@ q = new WeakSet(), et = function() {
|
|
291
228
|
tokens: this.lexer.inlineTokens(c[1])
|
292
229
|
};
|
293
230
|
},
|
294
|
-
renderer(
|
295
|
-
return `<sup>${
|
231
|
+
renderer(r) {
|
232
|
+
return `<sup>${r.text}</sup>`;
|
296
233
|
}
|
297
234
|
},
|
298
235
|
{
|
299
236
|
name: "sub",
|
300
237
|
level: "inline",
|
301
|
-
start(
|
238
|
+
start(r) {
|
302
239
|
var l;
|
303
|
-
return (l =
|
240
|
+
return (l = r.match(/@sub@/)) == null ? void 0 : l.index;
|
304
241
|
},
|
305
|
-
tokenizer(
|
306
|
-
const c = /^@sub@(.+?)@sub@/.exec(
|
242
|
+
tokenizer(r) {
|
243
|
+
const c = /^@sub@(.+?)@sub@/.exec(r);
|
307
244
|
if (c)
|
308
245
|
return {
|
309
246
|
type: "sub",
|
@@ -312,15 +249,15 @@ q = new WeakSet(), et = function() {
|
|
312
249
|
tokens: this.lexer.inlineTokens(c[1])
|
313
250
|
};
|
314
251
|
},
|
315
|
-
renderer(
|
316
|
-
return `<sub>${
|
252
|
+
renderer(r) {
|
253
|
+
return `<sub>${r.text}</sub>`;
|
317
254
|
}
|
318
255
|
}
|
319
256
|
]
|
320
257
|
});
|
321
|
-
const
|
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, {
|
322
259
|
ALLOWED_TAGS: [
|
323
|
-
...
|
260
|
+
...i,
|
324
261
|
...e ? ["a"] : [],
|
325
262
|
...s ? ["img"] : []
|
326
263
|
],
|
@@ -330,66 +267,66 @@ q = new WeakSet(), et = function() {
|
|
330
267
|
...s ? ["src", "alt", "title"] : []
|
331
268
|
],
|
332
269
|
RETURN_TRUSTED_TYPE: !1
|
333
|
-
}), d = (
|
334
|
-
t.querySelectorAll("td,th").forEach((
|
335
|
-
|
336
|
-
const l =
|
337
|
-
|
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);
|
338
275
|
}), t.setAttribute("data-markdown-rendered", "true");
|
339
|
-
},
|
340
|
-
const { scrollStep: e } = this.options, s = t.querySelector("._contentWrap"),
|
341
|
-
if (!s || !
|
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"))
|
342
279
|
return;
|
343
280
|
const d = document.createElement("div");
|
344
281
|
d.className = "table_navigation";
|
345
|
-
const u = document.createElement("div"),
|
346
|
-
u.className = "table-nav-left",
|
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);
|
347
284
|
const l = () => {
|
348
285
|
const c = n.scrollLeft, h = n.scrollWidth - n.clientWidth;
|
349
|
-
u.classList.toggle("disabled", c <= 0),
|
286
|
+
u.classList.toggle("disabled", c <= 0), r.classList.toggle("disabled", c >= h - 1);
|
350
287
|
};
|
351
288
|
u.addEventListener("click", () => {
|
352
289
|
n.scrollBy({ left: -a, behavior: "smooth" });
|
353
|
-
}),
|
290
|
+
}), r.addEventListener("click", () => {
|
354
291
|
n.scrollBy({ left: a, behavior: "smooth" });
|
355
292
|
}), n.addEventListener("scroll", l), window.addEventListener("resize", l), l();
|
356
|
-
},
|
293
|
+
}, x = new WeakSet(), Y = function(t) {
|
357
294
|
const { params: e } = t.article;
|
358
|
-
return e.$video.length && new
|
359
|
-
},
|
295
|
+
return e.$video.length && new bt(e.$video), this;
|
296
|
+
}, X = new WeakSet(), dt = function(t) {
|
360
297
|
const { basic_rwd: e } = this.options, { params: s } = t.article;
|
361
298
|
if (!s.$swiper)
|
362
299
|
return;
|
363
|
-
const
|
300
|
+
const i = ft(), n = this;
|
364
301
|
let a = {
|
365
302
|
on: {
|
366
|
-
init(
|
367
|
-
const l =
|
303
|
+
init(r) {
|
304
|
+
const l = r.$el[0];
|
368
305
|
s.$video.length && ([...l.querySelectorAll("[video4-active]")].forEach((h) => {
|
369
306
|
var g, b;
|
370
|
-
(g = h.querySelector(
|
307
|
+
(g = h.querySelector(yt.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
|
371
308
|
}), n.update());
|
372
309
|
},
|
373
|
-
observerUpdate(
|
374
|
-
|
310
|
+
observerUpdate(r) {
|
311
|
+
r.params.autoplay.enabled && (r.autoplay.start(), r.update());
|
375
312
|
}
|
376
313
|
},
|
377
314
|
observer: !0,
|
378
315
|
breakpoints: {}
|
379
316
|
};
|
380
|
-
if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${
|
381
|
-
const
|
382
|
-
|
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);
|
383
320
|
const l = document.createElement("div");
|
384
|
-
l.className = `swiper-button-prev swiper-${
|
385
|
-
nextEl: `.swiper-button-next.swiper-${
|
386
|
-
prevEl: `.swiper-button-prev.swiper-${
|
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}`
|
387
324
|
};
|
388
325
|
}
|
389
326
|
if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
|
390
|
-
const
|
391
|
-
|
392
|
-
el: `.swiper-pagination.swiper-${
|
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}`,
|
393
330
|
clickable: !0
|
394
331
|
};
|
395
332
|
}
|
@@ -401,128 +338,128 @@ q = new WeakSet(), et = function() {
|
|
401
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"));
|
402
339
|
let d = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
|
403
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"));
|
404
|
-
const u = new
|
341
|
+
const u = new xt(s.$swiper, a);
|
405
342
|
return t.article.swiperList = [], t.article.swiperList.push(u), this;
|
406
|
-
}, S = new WeakSet(),
|
343
|
+
}, S = new WeakSet(), G = function(t) {
|
407
344
|
const { navigation: e } = this.options, { params: s } = t.article;
|
408
345
|
if (!s.$table)
|
409
346
|
return;
|
410
|
-
const
|
411
|
-
|
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");
|
412
349
|
};
|
413
350
|
return g(), window.addEventListener("resize", g), this;
|
414
351
|
};
|
415
|
-
let
|
416
|
-
function w(
|
417
|
-
const t = window.getComputedStyle(
|
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;
|
418
355
|
if (e === "none")
|
419
356
|
return {
|
420
357
|
x: 0,
|
421
358
|
y: 0,
|
422
359
|
z: 0
|
423
360
|
};
|
424
|
-
const s = e.includes("3d") ? "3d" : "2d",
|
361
|
+
const s = e.includes("3d") ? "3d" : "2d", i = e.match(/matrix.*\((.+)\)/)[1].split(", ");
|
425
362
|
if (s === "2d")
|
426
363
|
return {
|
427
|
-
x: Number(
|
428
|
-
y: Number(
|
364
|
+
x: Number(i[4]),
|
365
|
+
y: Number(i[5]),
|
429
366
|
z: 0
|
430
367
|
};
|
431
368
|
if (s === "3d")
|
432
369
|
return {
|
433
|
-
x: Number(
|
434
|
-
y: Number(
|
435
|
-
z: Number(
|
370
|
+
x: Number(i[12]),
|
371
|
+
y: Number(i[13]),
|
372
|
+
z: Number(i[14])
|
436
373
|
};
|
437
374
|
}
|
438
|
-
function
|
439
|
-
const e =
|
375
|
+
function E(o) {
|
376
|
+
const e = o.querySelector(".wrapper").querySelectorAll(".item");
|
440
377
|
let s = 0;
|
441
|
-
return e.forEach((
|
442
|
-
const n = getComputedStyle(
|
443
|
-
s +=
|
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;
|
444
381
|
}), s;
|
445
382
|
}
|
446
|
-
function
|
447
|
-
if (w(
|
383
|
+
function F(o) {
|
384
|
+
if (w(o.slideWrapEl).x >= o.translateMin)
|
448
385
|
return "is-start";
|
449
|
-
if (w(
|
386
|
+
if (w(o.slideWrapEl).x <= o.translateMax)
|
450
387
|
return "is-end";
|
451
|
-
if (w(
|
388
|
+
if (w(o.slideWrapEl).x < o.translateMin && w(o.slideWrapEl).x > o.translateMax)
|
452
389
|
return "is-middle";
|
453
390
|
}
|
454
|
-
function
|
455
|
-
const t =
|
456
|
-
e.addEventListener(
|
457
|
-
switch (
|
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) {
|
458
395
|
case "mousedown":
|
459
|
-
|
396
|
+
o.startX = s.pageX;
|
460
397
|
break;
|
461
398
|
case "touchstart":
|
462
|
-
|
399
|
+
o.startX = s.changedTouches[0].pageX;
|
463
400
|
break;
|
464
401
|
}
|
465
|
-
|
466
|
-
}), e.addEventListener(
|
467
|
-
|
468
|
-
let
|
469
|
-
switch (
|
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) {
|
470
407
|
case "mousemove":
|
471
|
-
|
408
|
+
i = s.pageX - o.startX;
|
472
409
|
break;
|
473
410
|
case "touchmove":
|
474
|
-
|
411
|
+
i = s.changedTouches[0].pageX - o.startX;
|
475
412
|
break;
|
476
413
|
}
|
477
|
-
if (
|
478
|
-
if (
|
414
|
+
if (i === 0 && s.target.closest(".item")) {
|
415
|
+
if (K === "mouseup" && s.button !== 0)
|
479
416
|
return;
|
480
417
|
e.querySelectorAll(".item").forEach((a) => {
|
481
418
|
a.classList.remove("active");
|
482
|
-
}), s.target.closest(".item").classList.add("active"),
|
419
|
+
}), s.target.closest(".item").classList.add("active"), o.moveActive(o.params.speed);
|
483
420
|
} else
|
484
|
-
|
421
|
+
o.slidable && o.resetPos(t);
|
485
422
|
}), e.addEventListener("mouseleave", function() {
|
486
|
-
|
487
|
-
}), e.addEventListener(
|
488
|
-
if (
|
489
|
-
if (!
|
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)
|
490
427
|
return;
|
491
428
|
s.preventDefault();
|
492
|
-
let
|
493
|
-
switch (
|
429
|
+
let i;
|
430
|
+
switch (P) {
|
494
431
|
case "mousemove":
|
495
|
-
|
432
|
+
i = s.pageX - o.startX;
|
496
433
|
break;
|
497
434
|
case "touchmove":
|
498
|
-
|
435
|
+
i = s.changedTouches[0].pageX - o.startX;
|
499
436
|
break;
|
500
437
|
}
|
501
|
-
if (
|
438
|
+
if (i !== 0) {
|
502
439
|
e.classList.add("moving");
|
503
440
|
const n = {
|
504
441
|
transition: "all 0ms ease 0s",
|
505
|
-
transform: `translate3d(${
|
442
|
+
transform: `translate3d(${o.nowTranslateX + i}px,0,0)`
|
506
443
|
};
|
507
444
|
Object.assign(e.style, n);
|
508
445
|
}
|
509
446
|
}
|
510
447
|
});
|
511
448
|
}
|
512
|
-
function
|
513
|
-
const t =
|
449
|
+
function Ct(o) {
|
450
|
+
const t = o.querySelectorAll("a");
|
514
451
|
for (var e = 0, s = t.length; e < s; e++)
|
515
452
|
t[e].draggable = !1;
|
516
453
|
}
|
517
|
-
class
|
454
|
+
class Wt {
|
518
455
|
constructor(t, e) {
|
519
456
|
this.el = typeof t == "string" ? document.querySelector(t) : t, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
|
520
457
|
speed: 300,
|
521
458
|
clickSwitch: !0,
|
522
459
|
breakpoint: !1
|
523
|
-
}, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth =
|
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(
|
524
461
|
Math.abs(
|
525
|
-
|
462
|
+
E(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
|
526
463
|
)
|
527
464
|
), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
|
528
465
|
}
|
@@ -530,7 +467,7 @@ class Nt {
|
|
530
467
|
const t = this;
|
531
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() {
|
532
469
|
t.update();
|
533
|
-
}),
|
470
|
+
}), Lt(t), Ct(t.el);
|
534
471
|
}
|
535
472
|
moveActive(t) {
|
536
473
|
const e = this, s = e.slideWrapEl.querySelector(".item.active"), n = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
|
@@ -558,7 +495,7 @@ class Nt {
|
|
558
495
|
e.slideWrapEl.addEventListener(
|
559
496
|
"transitionend",
|
560
497
|
function() {
|
561
|
-
switch (e.nowTranslateX = w(e.slideWrapEl).x,
|
498
|
+
switch (e.nowTranslateX = w(e.slideWrapEl).x, F(e)) {
|
562
499
|
case "is-start":
|
563
500
|
e.el.classList.add("is-start"), e.el.classList.remove("is-end");
|
564
501
|
break;
|
@@ -573,7 +510,7 @@ class Nt {
|
|
573
510
|
!1
|
574
511
|
);
|
575
512
|
else
|
576
|
-
switch (e.nowTranslateX = w(e.slideWrapEl).x,
|
513
|
+
switch (e.nowTranslateX = w(e.slideWrapEl).x, F(e)) {
|
577
514
|
case "is-start":
|
578
515
|
e.el.classList.add("is-start"), e.el.classList.remove("is-end");
|
579
516
|
break;
|
@@ -588,7 +525,7 @@ class Nt {
|
|
588
525
|
}
|
589
526
|
resetPos() {
|
590
527
|
const t = this;
|
591
|
-
switch (
|
528
|
+
switch (F(t)) {
|
592
529
|
case "is-start":
|
593
530
|
t.el.classList.add("is-start"), t.el.classList.remove("is-end"), Object.assign(t.slideWrapEl.style, {
|
594
531
|
transition: `all ${t.params.speed}ms ease 0s`,
|
@@ -608,49 +545,49 @@ class Nt {
|
|
608
545
|
}
|
609
546
|
update() {
|
610
547
|
const t = this;
|
611
|
-
t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth =
|
548
|
+
t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = E(t.el), t.translateMax = -Math.floor(
|
612
549
|
Math.abs(
|
613
|
-
|
550
|
+
E(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
|
614
551
|
)
|
615
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"));
|
616
553
|
}
|
617
554
|
}
|
618
|
-
const
|
619
|
-
if (
|
555
|
+
const Q = (o) => {
|
556
|
+
if (o == "facebook")
|
620
557
|
return "https://www.facebook.com/sharer/sharer.php?u=";
|
621
|
-
if (
|
558
|
+
if (o == "line")
|
622
559
|
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=";
|
623
|
-
if (
|
560
|
+
if (o == "twitter")
|
624
561
|
return "https://twitter.com/intent/tweet?url=";
|
625
|
-
if (
|
562
|
+
if (o == "linkedin")
|
626
563
|
return `http://www.linkedin.com/shareArticle?mini=true&title=${document.title}&source=${document.title}&url=`;
|
627
|
-
if (
|
564
|
+
if (o == "telegram")
|
628
565
|
return "https://telegram.me/share/url?url=";
|
629
566
|
};
|
630
|
-
var D,
|
631
|
-
class
|
567
|
+
var D, ut, H, pt, O, ht;
|
568
|
+
class _t {
|
632
569
|
constructor(t, e = {}) {
|
633
570
|
m(this, D);
|
634
571
|
m(this, H);
|
635
|
-
m(this,
|
572
|
+
m(this, O);
|
636
573
|
this.__storage__ = {
|
637
574
|
el: t,
|
638
575
|
options: e
|
639
|
-
}, p(this, D,
|
576
|
+
}, p(this, D, ut).call(this);
|
640
577
|
}
|
641
578
|
}
|
642
|
-
D = new WeakSet(),
|
579
|
+
D = new WeakSet(), ut = function() {
|
643
580
|
const { el: t, options: e } = this.__storage__, { SETTINGS: s } = At;
|
644
|
-
!
|
645
|
-
}, H = new WeakSet(),
|
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() {
|
646
583
|
const { elements: t, options: e } = this;
|
647
584
|
t.forEach((s) => {
|
648
|
-
s.querySelectorAll("[share-target]").forEach((
|
649
|
-
|
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);
|
650
587
|
});
|
651
588
|
});
|
652
|
-
},
|
653
|
-
const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"),
|
589
|
+
}, O = new WeakSet(), ht = function() {
|
590
|
+
const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
|
654
591
|
source: this.getAttribute("utm-source"),
|
655
592
|
medium: this.getAttribute("utm-medium"),
|
656
593
|
campaign: this.getAttribute("utm-campaign")
|
@@ -666,20 +603,20 @@ D = new WeakSet(), pt = function() {
|
|
666
603
|
return;
|
667
604
|
}
|
668
605
|
if (s == "url") {
|
669
|
-
if (
|
606
|
+
if (U(".copied-wrapper"))
|
670
607
|
return;
|
671
|
-
document.querySelector("body").insertAdjacentHTML(
|
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>`);
|
672
609
|
const u = document.querySelector(".copied-wrapper");
|
673
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";
|
674
|
-
const
|
675
|
-
if (
|
611
|
+
const r = document.querySelector("#clipboard");
|
612
|
+
if (r.value = n.text ?? window.location.href, r.setSelectionRange(0, 9999), r.select(), document.execCommand("copy")) {
|
676
613
|
document.execCommand("copy");
|
677
614
|
const l = document.querySelector(".copied-wrapper"), c = document.querySelector(".copied-wrapper .text");
|
678
615
|
c.style.display = "block", c.style.opacity = 0;
|
679
616
|
const h = (b, v) => {
|
680
617
|
let y = 0;
|
681
|
-
const $ = 50, L = $ / v,
|
682
|
-
y += L, b.style.opacity = y, y >= 1 && (clearInterval(
|
618
|
+
const $ = 50, L = $ / v, j = setInterval(function() {
|
619
|
+
y += L, b.style.opacity = y, y >= 1 && (clearInterval(j), setTimeout(function() {
|
683
620
|
g(b, 300, function() {
|
684
621
|
l.remove();
|
685
622
|
});
|
@@ -687,35 +624,35 @@ D = new WeakSet(), pt = function() {
|
|
687
624
|
}, $);
|
688
625
|
}, g = (b, v, y) => {
|
689
626
|
let $ = 1;
|
690
|
-
const L = 50,
|
691
|
-
$ -=
|
627
|
+
const L = 50, j = L / v, mt = setInterval(() => {
|
628
|
+
$ -= j, b.style.opacity = $, $ <= 0 && (clearInterval(mt), b.style.display = "none", y && y());
|
692
629
|
}, L);
|
693
630
|
};
|
694
631
|
h(c, 300);
|
695
632
|
}
|
696
633
|
return;
|
697
634
|
}
|
698
|
-
d = `${d}${
|
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}"e=${d}`), this.removeEventListener("click", t), setTimeout(() => {
|
699
636
|
this.addEventListener("click", t);
|
700
637
|
}, 100);
|
701
638
|
};
|
702
639
|
export {
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
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
|
720
657
|
};
|
721
658
|
//# sourceMappingURL=fesd-bundle.js.map
|