@xwadex/fesd 0.0.33 → 0.0.35
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 +376 -334
- package/dist/fesd-bundle.js.map +1 -1
- package/dist/image-preview-bundle.js +6 -6
- package/dist/image-preview-bundle.js.map +1 -1
- package/dist/tools-bundle.js +180 -188
- package/dist/tools-bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/fesd-bundle.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
var
|
2
|
-
if (!
|
3
|
-
throw TypeError("Cannot " +
|
1
|
+
var be = (r, e, t) => {
|
2
|
+
if (!e.has(r))
|
3
|
+
throw TypeError("Cannot " + t);
|
4
4
|
};
|
5
|
-
var m = (r,
|
6
|
-
if (
|
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
|
-
|
8
|
+
e instanceof WeakSet ? e.add(r) : e.set(r, t);
|
9
9
|
};
|
10
|
-
var p = (r,
|
11
|
-
import { i as
|
12
|
-
import { A as
|
13
|
-
import { m as
|
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
14
|
const E = () => {
|
15
|
-
const r = navigator.userAgent,
|
15
|
+
const r = navigator.userAgent, e = {
|
16
16
|
// Firefox 1.0+
|
17
17
|
isFirefox: typeof InstallTrigger < "u",
|
18
18
|
// Opera 8.0+
|
@@ -30,7 +30,7 @@ const E = () => {
|
|
30
30
|
isSafari: !/chrome|crios|crmo/i.test(r) && /safari/i.test(r),
|
31
31
|
// Chrome 1 - 79
|
32
32
|
isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(r)
|
33
|
-
},
|
33
|
+
}, t = {
|
34
34
|
// Android
|
35
35
|
isAndroid: r.indexOf("Android") > -1 || r.indexOf("Adr") > -1,
|
36
36
|
// iOS | ipad
|
@@ -45,45 +45,45 @@ const E = () => {
|
|
45
45
|
// Linux
|
46
46
|
isLinux: r.indexOf("Linux") > -1
|
47
47
|
};
|
48
|
-
return { browser:
|
49
|
-
},
|
48
|
+
return { browser: e, mobile: t, os: s };
|
49
|
+
}, Ee = () => {
|
50
50
|
const { browser: r } = E();
|
51
|
-
return Object.keys(r).find((
|
52
|
-
if (r[
|
53
|
-
return r[
|
51
|
+
return Object.keys(r).find((e) => {
|
52
|
+
if (r[e])
|
53
|
+
return r[e];
|
54
54
|
});
|
55
|
-
},
|
55
|
+
}, Le = () => {
|
56
56
|
const { mobile: r } = E();
|
57
|
-
return Object.keys(r).some((
|
58
|
-
if (r[
|
59
|
-
return r[
|
57
|
+
return Object.keys(r).some((e) => {
|
58
|
+
if (r[e])
|
59
|
+
return r[e];
|
60
60
|
});
|
61
|
-
},
|
61
|
+
}, Ce = () => {
|
62
62
|
const { os: r } = E();
|
63
|
-
return Object.keys(r).find((
|
64
|
-
if (r[
|
65
|
-
return r[
|
63
|
+
return Object.keys(r).find((e) => {
|
64
|
+
if (r[e])
|
65
|
+
return r[e];
|
66
66
|
});
|
67
|
-
},
|
68
|
-
function
|
67
|
+
}, Te = () => console.dir(E());
|
68
|
+
function Re() {
|
69
69
|
return {
|
70
70
|
init: E,
|
71
|
-
isBrowser4:
|
72
|
-
isMobile4:
|
73
|
-
isOs4:
|
74
|
-
logs:
|
71
|
+
isBrowser4: Ee,
|
72
|
+
isMobile4: Le,
|
73
|
+
isOs4: Ce,
|
74
|
+
logs: Te
|
75
75
|
};
|
76
76
|
}
|
77
|
-
const f = (r,
|
78
|
-
r && (
|
77
|
+
const f = (r, e, t) => {
|
78
|
+
r && (ve(r) ? r.forEach((s) => s.style[e] = t) : r.style[e] = t);
|
79
79
|
};
|
80
|
-
var q,
|
81
|
-
class
|
82
|
-
constructor(
|
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 = {}) {
|
83
83
|
m(this, q);
|
84
84
|
m(this, W);
|
85
85
|
// 取得元件上的設定值
|
86
|
-
m(this,
|
86
|
+
m(this, A);
|
87
87
|
// 設置設定值的 CSS 樣式
|
88
88
|
m(this, _);
|
89
89
|
// 表格拖曳功能
|
@@ -94,83 +94,83 @@ class Bt {
|
|
94
94
|
m(this, B);
|
95
95
|
m(this, N);
|
96
96
|
// Markdown 設置
|
97
|
-
m(this, I);
|
98
|
-
// Navigation 設置
|
99
|
-
m(this, X);
|
100
|
-
m(this, A);
|
101
97
|
m(this, z);
|
98
|
+
// Navigation 設置
|
99
|
+
m(this, I);
|
102
100
|
m(this, S);
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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));
|
107
107
|
}
|
108
108
|
update() {
|
109
|
-
const { elements:
|
110
|
-
|
111
|
-
|
112
|
-
s.article = {}, s.article.parent =
|
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);
|
113
113
|
});
|
114
114
|
});
|
115
115
|
}
|
116
116
|
}
|
117
|
-
q = new WeakSet(),
|
118
|
-
const { el:
|
119
|
-
this.elements =
|
120
|
-
}, W = new WeakSet(),
|
121
|
-
const { elements:
|
122
|
-
|
123
|
-
|
124
|
-
var o,
|
125
|
-
s.article = {}, s.article.parent =
|
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);
|
126
126
|
});
|
127
127
|
});
|
128
|
-
},
|
128
|
+
}, A = new WeakSet(), Y = function(e) {
|
129
129
|
return {
|
130
130
|
// 元件本身
|
131
|
-
$selector:
|
131
|
+
$selector: e,
|
132
132
|
// 父層元件
|
133
|
-
$backgroundWrap:
|
134
|
-
$contentWrap:
|
135
|
-
$wordCover:
|
136
|
-
$buttonCover:
|
137
|
-
$imgCover:
|
138
|
-
$cover:
|
139
|
-
$swiper:
|
140
|
-
$table:
|
141
|
-
$quote:
|
142
|
-
$swiperButtonCover:
|
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"),
|
143
143
|
// 子層元件
|
144
|
-
$h:
|
145
|
-
$subH:
|
146
|
-
$p:
|
147
|
-
$button:
|
148
|
-
$description:
|
149
|
-
$video:
|
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]"),
|
150
150
|
// 父層設定
|
151
|
-
typeFullColor:
|
152
|
-
typeFullBoxColor:
|
151
|
+
typeFullColor: e.getAttribute("typeFull-color"),
|
152
|
+
typeFullBoxColor: e.getAttribute("typeFull-boxcolor"),
|
153
153
|
// 子層設定
|
154
|
-
hColor:
|
155
|
-
subHColor:
|
156
|
-
pColor:
|
157
|
-
buttonColor:
|
158
|
-
buttonColorHover:
|
159
|
-
buttonTextColor:
|
160
|
-
descriptionColor:
|
161
|
-
quoteColor:
|
162
|
-
markdown:
|
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
|
163
163
|
};
|
164
|
-
}, _ = new WeakSet(),
|
165
|
-
const { params:
|
166
|
-
return f(
|
167
|
-
}, O = new WeakSet(),
|
168
|
-
const { params:
|
169
|
-
let o = !1,
|
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
170
|
s.addEventListener("mousedown", function(i) {
|
171
171
|
i.preventDefault(), o = !0;
|
172
|
-
const
|
173
|
-
|
172
|
+
const n = s.getBoundingClientRect();
|
173
|
+
c = i.pageX - n.left, l = i.pageY - n.top, d = s.scrollLeft, u = s.scrollTop;
|
174
174
|
}), s.addEventListener("mouseleave", function() {
|
175
175
|
o = !1;
|
176
176
|
}), s.addEventListener("mouseup", function() {
|
@@ -179,116 +179,158 @@ q = new WeakSet(), et = function() {
|
|
179
179
|
if (!o)
|
180
180
|
return;
|
181
181
|
i.preventDefault();
|
182
|
-
const
|
182
|
+
const n = s.getBoundingClientRect(), a = i.pageX - n.left, h = i.pageY - n.top, g = a - c, b = h - l;
|
183
183
|
s.scrollLeft = d - g, s.scrollTop = u - b;
|
184
184
|
});
|
185
|
-
}, M = new WeakSet(),
|
186
|
-
const { basic_rwd: o } = this.options,
|
187
|
-
if (
|
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)
|
188
188
|
return;
|
189
|
-
const d = p(this, R,
|
190
|
-
p(this, N,
|
191
|
-
}, R = new WeakSet(),
|
192
|
-
const
|
193
|
-
return
|
194
|
-
const
|
195
|
-
|
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] = [];
|
196
196
|
let d = 0;
|
197
|
-
|
198
|
-
const i = +u.getAttribute("rowspan") || 1,
|
199
|
-
for (;
|
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}`); )
|
200
200
|
d++;
|
201
|
-
for (let
|
202
|
-
const h =
|
203
|
-
|
204
|
-
for (let g = 0; 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++) {
|
205
205
|
const b = d + g;
|
206
|
-
|
207
|
-
el:
|
208
|
-
topRow:
|
206
|
+
t[h][b] = {
|
207
|
+
el: a === 0 && g === 0 ? u : null,
|
208
|
+
topRow: c,
|
209
209
|
leftCol: d,
|
210
210
|
rowspan: i,
|
211
|
-
colspan:
|
212
|
-
},
|
211
|
+
colspan: n
|
212
|
+
}, a > 0 && s.add(`${h},${b}`);
|
213
213
|
}
|
214
214
|
}
|
215
|
-
d +=
|
215
|
+
d += n;
|
216
216
|
});
|
217
|
-
}),
|
218
|
-
}, B = new WeakSet(),
|
219
|
-
var
|
220
|
-
const s =
|
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;
|
221
221
|
for (let d = 0; d < s; d++)
|
222
|
-
for (let u = 0; u < (((
|
223
|
-
const i =
|
222
|
+
for (let u = 0; u < (((l = t[d]) == null ? void 0 : l.length) || 0); u++) {
|
223
|
+
const i = t[d][u];
|
224
224
|
if (i != null && i.el) {
|
225
|
-
const
|
226
|
-
o[d] =
|
225
|
+
const n = i.el.getBoundingClientRect().top;
|
226
|
+
o[d] = n - c;
|
227
227
|
break;
|
228
228
|
}
|
229
229
|
}
|
230
230
|
return o;
|
231
|
-
}, N = new WeakSet(),
|
231
|
+
}, N = new WeakSet(), le = function(e, t, s, o) {
|
232
232
|
var u;
|
233
|
-
const
|
234
|
-
for (let i = 0; i <
|
235
|
-
for (let
|
236
|
-
const
|
237
|
-
if (
|
238
|
-
d[i] =
|
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;
|
239
239
|
break;
|
240
240
|
}
|
241
241
|
}
|
242
|
-
|
243
|
-
(i) => i.forEach((
|
244
|
-
if (!(
|
242
|
+
t.forEach(
|
243
|
+
(i) => i.forEach((n) => {
|
244
|
+
if (!(n != null && n.el))
|
245
245
|
return;
|
246
|
-
const { el:
|
247
|
-
|
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`);
|
248
248
|
})
|
249
249
|
);
|
250
|
-
},
|
251
|
-
const { markdownLink:
|
252
|
-
if (
|
250
|
+
}, z = new WeakSet(), ce = function(e) {
|
251
|
+
const { markdownLink: t, markdownImg: s } = this.options;
|
252
|
+
if (e.hasAttribute("data-markdown-rendered"))
|
253
253
|
return;
|
254
|
-
new
|
254
|
+
new x.Renderer(), x.use({
|
255
255
|
extensions: [
|
256
256
|
{
|
257
257
|
name: "center",
|
258
258
|
level: "block",
|
259
259
|
start(i) {
|
260
|
-
var
|
261
|
-
return (
|
260
|
+
var n;
|
261
|
+
return (n = i.match(/@center@/)) == null ? void 0 : n.index;
|
262
262
|
},
|
263
263
|
tokenizer(i) {
|
264
|
-
const
|
265
|
-
if (
|
264
|
+
const a = /^@center@(.+?)@center@/s.exec(i);
|
265
|
+
if (a)
|
266
266
|
return {
|
267
267
|
type: "center",
|
268
|
-
raw:
|
269
|
-
text:
|
270
|
-
tokens: this.lexer.inlineTokens(
|
268
|
+
raw: a[0],
|
269
|
+
text: a[1],
|
270
|
+
tokens: this.lexer.inlineTokens(a[1])
|
271
|
+
};
|
272
|
+
},
|
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])
|
271
292
|
};
|
272
293
|
},
|
273
294
|
renderer(i) {
|
274
|
-
return `<div data-
|
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>`;
|
275
317
|
}
|
276
318
|
},
|
277
319
|
{
|
278
320
|
name: "sup",
|
279
321
|
level: "inline",
|
280
322
|
start(i) {
|
281
|
-
var
|
282
|
-
return (
|
323
|
+
var n;
|
324
|
+
return (n = i.match(/@sup@/)) == null ? void 0 : n.index;
|
283
325
|
},
|
284
326
|
tokenizer(i) {
|
285
|
-
const
|
286
|
-
if (
|
327
|
+
const a = /^@sup@(.+?)@sup@/.exec(i);
|
328
|
+
if (a)
|
287
329
|
return {
|
288
330
|
type: "sup",
|
289
|
-
raw:
|
290
|
-
text:
|
291
|
-
tokens: this.lexer.inlineTokens(
|
331
|
+
raw: a[0],
|
332
|
+
text: a[1],
|
333
|
+
tokens: this.lexer.inlineTokens(a[1])
|
292
334
|
};
|
293
335
|
},
|
294
336
|
renderer(i) {
|
@@ -299,17 +341,17 @@ q = new WeakSet(), et = function() {
|
|
299
341
|
name: "sub",
|
300
342
|
level: "inline",
|
301
343
|
start(i) {
|
302
|
-
var
|
303
|
-
return (
|
344
|
+
var n;
|
345
|
+
return (n = i.match(/@sub@/)) == null ? void 0 : n.index;
|
304
346
|
},
|
305
347
|
tokenizer(i) {
|
306
|
-
const
|
307
|
-
if (
|
348
|
+
const a = /^@sub@(.+?)@sub@/.exec(i);
|
349
|
+
if (a)
|
308
350
|
return {
|
309
351
|
type: "sub",
|
310
|
-
raw:
|
311
|
-
text:
|
312
|
-
tokens: this.lexer.inlineTokens(
|
352
|
+
raw: a[0],
|
353
|
+
text: a[1],
|
354
|
+
tokens: this.lexer.inlineTokens(a[1])
|
313
355
|
};
|
314
356
|
},
|
315
357
|
renderer(i) {
|
@@ -318,57 +360,57 @@ q = new WeakSet(), et = function() {
|
|
318
360
|
}
|
319
361
|
]
|
320
362
|
});
|
321
|
-
const o = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"],
|
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, {
|
322
364
|
ALLOWED_TAGS: [
|
323
365
|
...o,
|
324
|
-
...
|
366
|
+
...t ? ["a"] : [],
|
325
367
|
...s ? ["img"] : []
|
326
368
|
],
|
327
369
|
ALLOWED_ATTR: [
|
328
|
-
...
|
329
|
-
...
|
370
|
+
...c,
|
371
|
+
...t ? ["href", "title", "target"] : [],
|
330
372
|
...s ? ["src", "alt", "title"] : []
|
331
373
|
],
|
332
374
|
RETURN_TRUSTED_TYPE: !1
|
333
|
-
}), d = (i) =>
|
334
|
-
|
375
|
+
}), d = (i) => l(x.parse(i));
|
376
|
+
e.querySelectorAll("td,th").forEach((i) => {
|
335
377
|
i.innerHTML = i.textContent;
|
336
|
-
const
|
337
|
-
i.innerHTML = d(
|
338
|
-
}),
|
339
|
-
},
|
340
|
-
const { scrollStep:
|
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;
|
341
383
|
if (!s || !o || o.querySelector(".table_navigation"))
|
342
384
|
return;
|
343
385
|
const d = document.createElement("div");
|
344
386
|
d.className = "table_navigation";
|
345
387
|
const u = document.createElement("div"), i = document.createElement("div");
|
346
388
|
u.className = "table-nav-left", i.className = "table-nav-right", d.appendChild(u), d.appendChild(i), o.appendChild(d);
|
347
|
-
const
|
348
|
-
const
|
349
|
-
u.classList.toggle("disabled",
|
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);
|
350
392
|
};
|
351
393
|
u.addEventListener("click", () => {
|
352
|
-
|
394
|
+
c.scrollBy({ left: -l, behavior: "smooth" });
|
353
395
|
}), i.addEventListener("click", () => {
|
354
|
-
|
355
|
-
}),
|
356
|
-
},
|
357
|
-
const { params:
|
358
|
-
return
|
359
|
-
},
|
360
|
-
const { basic_rwd:
|
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;
|
361
403
|
if (!s.$swiper)
|
362
404
|
return;
|
363
|
-
const o =
|
364
|
-
let
|
405
|
+
const o = we(), c = this;
|
406
|
+
let l = {
|
365
407
|
on: {
|
366
408
|
init(i) {
|
367
|
-
const
|
368
|
-
s.$video.length && ([...
|
409
|
+
const n = i.$el[0];
|
410
|
+
s.$video.length && ([...n.querySelectorAll("[video4-active]")].forEach((h) => {
|
369
411
|
var g, b;
|
370
|
-
(g = h.querySelector($
|
371
|
-
}),
|
412
|
+
(g = h.querySelector($e.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
|
413
|
+
}), c.update());
|
372
414
|
},
|
373
415
|
observerUpdate(i) {
|
374
416
|
i.params.autoplay.enabled && (i.autoplay.start(), i.update());
|
@@ -380,48 +422,48 @@ q = new WeakSet(), et = function() {
|
|
380
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")) {
|
381
423
|
const i = document.createElement("div");
|
382
424
|
i.className = `swiper-button-next swiper-${o}`, s.$swiperButtonCover.appendChild(i);
|
383
|
-
const
|
384
|
-
|
425
|
+
const n = document.createElement("div");
|
426
|
+
n.className = `swiper-button-prev swiper-${o}`, s.$swiperButtonCover.appendChild(n), l.navigation = {
|
385
427
|
nextEl: `.swiper-button-next.swiper-${o}`,
|
386
428
|
prevEl: `.swiper-button-prev.swiper-${o}`
|
387
429
|
};
|
388
430
|
}
|
389
431
|
if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
|
390
432
|
const i = document.createElement("div");
|
391
|
-
i.className = `swiper-pagination swiper-${o}`, s.$swiper.appendChild(i),
|
433
|
+
i.className = `swiper-pagination swiper-${o}`, s.$swiper.appendChild(i), l.pagination = {
|
392
434
|
el: `.swiper-pagination.swiper-${o}`,
|
393
435
|
clickable: !0
|
394
436
|
};
|
395
437
|
}
|
396
|
-
Number.parseInt(s.$selector.getAttribute("swiper-num")) && (
|
438
|
+
Number.parseInt(s.$selector.getAttribute("swiper-num")) && (l.breakpoints[t] = {
|
397
439
|
slidesPerView: s.$selector.getAttribute("swiper-num") ? Number.parseInt(s.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(s.$selector.getAttribute("swiper-num")) : 1
|
398
|
-
}), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (
|
440
|
+
}), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (l.autoplay = {
|
399
441
|
delay: 3e3,
|
400
442
|
disableOnInteraction: !1
|
401
|
-
}), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (
|
402
|
-
let d = () => window.innerWidth >
|
403
|
-
s.$swiper.querySelectorAll(".swiper-slide").length <= d() && (
|
404
|
-
const u = new
|
405
|
-
return
|
406
|
-
},
|
407
|
-
const { navigation:
|
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;
|
408
450
|
if (!s.$table)
|
409
451
|
return;
|
410
|
-
const o =
|
411
|
-
o && p(this, M,
|
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");
|
412
454
|
};
|
413
455
|
return g(), window.addEventListener("resize", g), this;
|
414
456
|
};
|
415
457
|
let K = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", Q = "ontouchend" in document.documentElement ? "touchend" : "mouseup", F = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
|
416
458
|
function w(r) {
|
417
|
-
const
|
418
|
-
if (
|
459
|
+
const e = window.getComputedStyle(r), t = e.transform || e.mozTransform;
|
460
|
+
if (t === "none")
|
419
461
|
return {
|
420
462
|
x: 0,
|
421
463
|
y: 0,
|
422
464
|
z: 0
|
423
465
|
};
|
424
|
-
const s =
|
466
|
+
const s = t.includes("3d") ? "3d" : "2d", o = t.match(/matrix.*\((.+)\)/)[1].split(", ");
|
425
467
|
if (s === "2d")
|
426
468
|
return {
|
427
469
|
x: Number(o[4]),
|
@@ -435,12 +477,12 @@ function w(r) {
|
|
435
477
|
z: Number(o[14])
|
436
478
|
};
|
437
479
|
}
|
438
|
-
function
|
439
|
-
const
|
480
|
+
function C(r) {
|
481
|
+
const t = r.querySelector(".wrapper").querySelectorAll(".item");
|
440
482
|
let s = 0;
|
441
|
-
return
|
442
|
-
const
|
443
|
-
s += o.getBoundingClientRect().width +
|
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;
|
444
486
|
}), s;
|
445
487
|
}
|
446
488
|
function U(r) {
|
@@ -451,10 +493,10 @@ function U(r) {
|
|
451
493
|
if (w(r.slideWrapEl).x < r.translateMin && w(r.slideWrapEl).x > r.translateMax)
|
452
494
|
return "is-middle";
|
453
495
|
}
|
454
|
-
function
|
455
|
-
const
|
456
|
-
|
457
|
-
switch (r.isDown = !0, r.slidable &&
|
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) {
|
458
500
|
case "mousedown":
|
459
501
|
r.startX = s.pageX;
|
460
502
|
break;
|
@@ -462,9 +504,9 @@ function qt(r) {
|
|
462
504
|
r.startX = s.changedTouches[0].pageX;
|
463
505
|
break;
|
464
506
|
}
|
465
|
-
r.nowTranslateX = w(
|
466
|
-
}),
|
467
|
-
r.isDown = !1,
|
507
|
+
r.nowTranslateX = w(t).x;
|
508
|
+
}), t.addEventListener(Q, function(s) {
|
509
|
+
r.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
|
468
510
|
let o;
|
469
511
|
switch (F) {
|
470
512
|
case "mousemove":
|
@@ -477,14 +519,14 @@ function qt(r) {
|
|
477
519
|
if (o === 0 && s.target.closest(".item")) {
|
478
520
|
if (Q === "mouseup" && s.button !== 0)
|
479
521
|
return;
|
480
|
-
|
481
|
-
|
522
|
+
t.querySelectorAll(".item").forEach((l) => {
|
523
|
+
l.classList.remove("active");
|
482
524
|
}), s.target.closest(".item").classList.add("active"), r.moveActive(r.params.speed);
|
483
525
|
} else
|
484
|
-
r.slidable && r.resetPos(
|
485
|
-
}),
|
486
|
-
r.isDown && r.slidable && (r.isDown = !1,
|
487
|
-
}),
|
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) {
|
488
530
|
if (r.draggable && r.slidable) {
|
489
531
|
if (!r.isDown)
|
490
532
|
return;
|
@@ -499,120 +541,120 @@ function qt(r) {
|
|
499
541
|
break;
|
500
542
|
}
|
501
543
|
if (o !== 0) {
|
502
|
-
|
503
|
-
const
|
544
|
+
t.classList.add("moving");
|
545
|
+
const c = {
|
504
546
|
transition: "all 0ms ease 0s",
|
505
547
|
transform: `translate3d(${r.nowTranslateX + o}px,0,0)`
|
506
548
|
};
|
507
|
-
Object.assign(
|
549
|
+
Object.assign(t.style, c);
|
508
550
|
}
|
509
551
|
}
|
510
552
|
});
|
511
553
|
}
|
512
|
-
function
|
513
|
-
const
|
514
|
-
for (var
|
515
|
-
t
|
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;
|
516
558
|
}
|
517
|
-
class
|
518
|
-
constructor(
|
519
|
-
this.el = typeof
|
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 = {
|
520
562
|
speed: 300,
|
521
563
|
clickSwitch: !0,
|
522
564
|
breakpoint: !1
|
523
|
-
}, Object.assign(this.params,
|
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(
|
524
566
|
Math.abs(
|
525
|
-
|
567
|
+
C(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
|
526
568
|
)
|
527
569
|
), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
|
528
570
|
}
|
529
571
|
init() {
|
530
|
-
const
|
531
|
-
|
532
|
-
|
533
|
-
}),
|
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);
|
534
576
|
}
|
535
|
-
moveActive(
|
536
|
-
const
|
537
|
-
if (
|
538
|
-
if (-
|
539
|
-
const
|
540
|
-
transition: `all ${
|
541
|
-
transform: `translate3d(-${
|
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)`
|
542
584
|
};
|
543
|
-
Object.assign(
|
544
|
-
} else if (-
|
545
|
-
const
|
546
|
-
transition: `all ${
|
585
|
+
Object.assign(t.slideWrapEl.style, l);
|
586
|
+
} else if (-c >= 0) {
|
587
|
+
const l = {
|
588
|
+
transition: `all ${e || 0}ms ease 0s`,
|
547
589
|
transform: "translate3d(0,0,0)"
|
548
590
|
};
|
549
|
-
Object.assign(
|
591
|
+
Object.assign(t.slideWrapEl.style, l);
|
550
592
|
} else {
|
551
|
-
const
|
552
|
-
transition: `all ${
|
553
|
-
transform: `translate3d(${
|
593
|
+
const l = {
|
594
|
+
transition: `all ${e || 0}ms ease 0s`,
|
595
|
+
transform: `translate3d(${t.translateMax}px,0,0)`
|
554
596
|
};
|
555
|
-
Object.assign(
|
597
|
+
Object.assign(t.slideWrapEl.style, l);
|
556
598
|
}
|
557
|
-
if (
|
558
|
-
|
599
|
+
if (e)
|
600
|
+
t.slideWrapEl.addEventListener(
|
559
601
|
"transitionend",
|
560
602
|
function() {
|
561
|
-
switch (
|
603
|
+
switch (t.nowTranslateX = w(t.slideWrapEl).x, U(t)) {
|
562
604
|
case "is-start":
|
563
|
-
|
605
|
+
t.el.classList.add("is-start"), t.el.classList.remove("is-end");
|
564
606
|
break;
|
565
607
|
case "is-middle":
|
566
|
-
|
608
|
+
t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
|
567
609
|
break;
|
568
610
|
case "is-end":
|
569
|
-
|
611
|
+
t.el.classList.remove("is-start"), t.el.classList.add("is-end");
|
570
612
|
break;
|
571
613
|
}
|
572
614
|
},
|
573
615
|
!1
|
574
616
|
);
|
575
617
|
else
|
576
|
-
switch (
|
618
|
+
switch (t.nowTranslateX = w(t.slideWrapEl).x, U(t)) {
|
577
619
|
case "is-start":
|
578
|
-
|
620
|
+
t.el.classList.add("is-start"), t.el.classList.remove("is-end");
|
579
621
|
break;
|
580
622
|
case "is-middle":
|
581
|
-
|
623
|
+
t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
|
582
624
|
break;
|
583
625
|
case "is-end":
|
584
|
-
|
626
|
+
t.el.classList.remove("is-start"), t.el.classList.add("is-end");
|
585
627
|
break;
|
586
628
|
}
|
587
629
|
}
|
588
630
|
}
|
589
631
|
resetPos() {
|
590
|
-
const
|
591
|
-
switch (U(
|
632
|
+
const e = this;
|
633
|
+
switch (U(e)) {
|
592
634
|
case "is-start":
|
593
|
-
|
594
|
-
transition: `all ${
|
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`,
|
595
637
|
transform: "translate3d(0,0,0)"
|
596
638
|
});
|
597
639
|
break;
|
598
640
|
case "is-middle":
|
599
|
-
|
641
|
+
e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
|
600
642
|
break;
|
601
643
|
case "is-end":
|
602
|
-
|
603
|
-
transition: `all ${
|
604
|
-
transform: `translate3d(${
|
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)`
|
605
647
|
});
|
606
648
|
break;
|
607
649
|
}
|
608
650
|
}
|
609
651
|
update() {
|
610
|
-
const
|
611
|
-
|
652
|
+
const e = this;
|
653
|
+
e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = C(e.el), e.translateMax = -Math.floor(
|
612
654
|
Math.abs(
|
613
|
-
|
655
|
+
C(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
|
614
656
|
)
|
615
|
-
),
|
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"));
|
616
658
|
}
|
617
659
|
}
|
618
660
|
const Z = (r) => {
|
@@ -627,95 +669,95 @@ const Z = (r) => {
|
|
627
669
|
if (r == "telegram")
|
628
670
|
return "https://telegram.me/share/url?url=";
|
629
671
|
};
|
630
|
-
var D,
|
631
|
-
class
|
632
|
-
constructor(
|
672
|
+
var D, pe, H, he, j, me;
|
673
|
+
class ze {
|
674
|
+
constructor(e, t = {}) {
|
633
675
|
m(this, D);
|
634
676
|
m(this, H);
|
635
677
|
m(this, j);
|
636
678
|
this.__storage__ = {
|
637
|
-
el:
|
638
|
-
options:
|
639
|
-
}, p(this, D,
|
679
|
+
el: e,
|
680
|
+
options: t
|
681
|
+
}, p(this, D, pe).call(this);
|
640
682
|
}
|
641
683
|
}
|
642
|
-
D = new WeakSet(),
|
643
|
-
const { el:
|
644
|
-
!
|
645
|
-
}, H = new WeakSet(),
|
646
|
-
const { elements:
|
647
|
-
|
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) => {
|
648
690
|
s.querySelectorAll("[share-target]").forEach((o) => {
|
649
|
-
o.share = {}, o.share.instance = this, o.share.params =
|
691
|
+
o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = p(this, j, me), o.addEventListener("click", o.share.eventHandler);
|
650
692
|
});
|
651
693
|
});
|
652
|
-
}, j = new WeakSet(),
|
653
|
-
const { eventHandler:
|
694
|
+
}, j = new WeakSet(), me = function() {
|
695
|
+
const { eventHandler: e, params: t } = this.share, s = this.getAttribute("share-target"), o = {
|
654
696
|
source: this.getAttribute("utm-source"),
|
655
697
|
medium: this.getAttribute("utm-medium"),
|
656
698
|
campaign: this.getAttribute("utm-campaign")
|
657
|
-
},
|
658
|
-
success: this.getAttribute("copy-success") ||
|
659
|
-
text: this.getAttribute("copy-text") ||
|
660
|
-
className: this.getAttribute("copy-class") ||
|
661
|
-
duration: this.getAttribute("copy-duration") ||
|
662
|
-
},
|
663
|
-
let d =
|
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;
|
664
706
|
if (s == "wechat") {
|
665
|
-
window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${
|
707
|
+
window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${l}&size=250x250`, "share to wechat", "width=300,height=300");
|
666
708
|
return;
|
667
709
|
}
|
668
710
|
if (s == "url") {
|
669
711
|
if (V(".copied-wrapper"))
|
670
712
|
return;
|
671
|
-
document.querySelector("body").insertAdjacentHTML(
|
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>`);
|
672
714
|
const u = document.querySelector(".copied-wrapper");
|
673
|
-
|
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";
|
674
716
|
const i = document.querySelector("#clipboard");
|
675
|
-
if (i.value =
|
717
|
+
if (i.value = c.text ?? window.location.href, i.setSelectionRange(0, 9999), i.select(), document.execCommand("copy")) {
|
676
718
|
document.execCommand("copy");
|
677
|
-
const
|
678
|
-
|
719
|
+
const n = document.querySelector(".copied-wrapper"), a = document.querySelector(".copied-wrapper .text");
|
720
|
+
a.style.display = "block", a.style.opacity = 0;
|
679
721
|
const h = (b, v) => {
|
680
722
|
let y = 0;
|
681
723
|
const $ = 50, L = $ / v, P = setInterval(function() {
|
682
724
|
y += L, b.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
|
683
725
|
g(b, 300, function() {
|
684
|
-
|
726
|
+
n.remove();
|
685
727
|
});
|
686
|
-
},
|
728
|
+
}, c.duration));
|
687
729
|
}, $);
|
688
730
|
}, g = (b, v, y) => {
|
689
731
|
let $ = 1;
|
690
|
-
const L = 50, P = L / v,
|
691
|
-
$ -= P, b.style.opacity = $, $ <= 0 && (clearInterval(
|
732
|
+
const L = 50, P = L / v, ge = setInterval(() => {
|
733
|
+
$ -= P, b.style.opacity = $, $ <= 0 && (clearInterval(ge), b.style.display = "none", y && y());
|
692
734
|
}, L);
|
693
735
|
};
|
694
|
-
h(
|
736
|
+
h(a, 300);
|
695
737
|
}
|
696
738
|
return;
|
697
739
|
}
|
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)}${
|
699
|
-
this.addEventListener("click",
|
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}"e=${d}`), this.removeEventListener("click", e), setTimeout(() => {
|
741
|
+
this.addEventListener("click", e);
|
700
742
|
}, 100);
|
701
743
|
};
|
702
744
|
export {
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
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
|
720
762
|
};
|
721
763
|
//# sourceMappingURL=fesd-bundle.js.map
|