@xwadex/fesd 0.0.62 → 0.0.64
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 +160 -156
- package/dist/fesd-bundle.js.map +1 -1
- package/dist/image-preview-bundle.js +275 -265
- package/dist/image-preview-bundle.js.map +1 -1
- package/package.json +7 -7
package/dist/fesd-bundle.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ve = (s, e, t) => {
|
|
2
2
|
if (!e.has(s))
|
|
3
3
|
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
5
|
+
var g = (s, e, t) => {
|
|
6
6
|
if (e.has(s))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
|
9
9
|
};
|
|
10
|
-
var h = (s, e, t) => (
|
|
11
|
-
import { i as
|
|
12
|
-
import { A as
|
|
13
|
-
import
|
|
14
|
-
import { m as
|
|
15
|
-
const
|
|
10
|
+
var h = (s, e, t) => (ve(s, e, "access private method"), t);
|
|
11
|
+
import { i as se, a as G, g as q, v as ye, c as $e, b as xe, d as Ae, e as ke, f as Se, s as Le } from "./image-preview-bundle.js";
|
|
12
|
+
import { A as Fe, j as Ue, C as Ve, h as Ye, D as Ge, m as Je, I as Ke, k as Qe, M as Ze, l as et, R as tt, T as rt } from "./image-preview-bundle.js";
|
|
13
|
+
import Z from "jquery";
|
|
14
|
+
import { m as $, S as Ee, p as Ce } from "./vendor-bundle.js";
|
|
15
|
+
const E = () => {
|
|
16
16
|
const s = navigator.userAgent, e = {
|
|
17
17
|
// Firefox 1.0+
|
|
18
18
|
isFirefox: typeof InstallTrigger < "u",
|
|
@@ -47,86 +47,86 @@ const L = () => {
|
|
|
47
47
|
isLinux: s.indexOf("Linux") > -1
|
|
48
48
|
};
|
|
49
49
|
return { browser: e, mobile: t, os: r };
|
|
50
|
-
},
|
|
51
|
-
const { browser: s } =
|
|
50
|
+
}, Te = () => {
|
|
51
|
+
const { browser: s } = E();
|
|
52
52
|
return Object.keys(s).find((e) => {
|
|
53
53
|
if (s[e])
|
|
54
54
|
return s[e];
|
|
55
55
|
});
|
|
56
|
-
},
|
|
57
|
-
const { mobile: s } =
|
|
56
|
+
}, qe = () => {
|
|
57
|
+
const { mobile: s } = E();
|
|
58
58
|
return Object.keys(s).some((e) => {
|
|
59
59
|
if (s[e])
|
|
60
60
|
return s[e];
|
|
61
61
|
});
|
|
62
|
-
},
|
|
63
|
-
const { os: s } =
|
|
62
|
+
}, We = () => {
|
|
63
|
+
const { os: s } = E();
|
|
64
64
|
return Object.keys(s).find((e) => {
|
|
65
65
|
if (s[e])
|
|
66
66
|
return s[e];
|
|
67
67
|
});
|
|
68
|
-
},
|
|
69
|
-
function
|
|
68
|
+
}, _e = () => console.dir(E());
|
|
69
|
+
function ze() {
|
|
70
70
|
return {
|
|
71
|
-
init:
|
|
72
|
-
isBrowser4:
|
|
73
|
-
isMobile4:
|
|
74
|
-
isOs4:
|
|
75
|
-
logs:
|
|
71
|
+
init: E,
|
|
72
|
+
isBrowser4: Te,
|
|
73
|
+
isMobile4: qe,
|
|
74
|
+
isOs4: We,
|
|
75
|
+
logs: _e
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
const b = (s, e, t) => {
|
|
79
|
-
s && (
|
|
79
|
+
s && (xe(s) ? s.forEach((r) => r.style[e] = t) : s.style[e] = t);
|
|
80
80
|
};
|
|
81
|
-
var
|
|
82
|
-
class
|
|
81
|
+
var W, ie, _, oe, k, J, O, ae, M, ne, R, le, B, ce, I, de, N, ue, z, pe, X, he, S, K, D, me, L, Q;
|
|
82
|
+
class Xe {
|
|
83
83
|
constructor(e, t = {}) {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
g(this, W);
|
|
85
|
+
g(this, _);
|
|
86
86
|
// 取得元件上的設定值
|
|
87
|
-
|
|
87
|
+
g(this, k);
|
|
88
88
|
// 設置設定值的 CSS 樣式
|
|
89
|
-
|
|
89
|
+
g(this, O);
|
|
90
90
|
// 表格拖曳功能
|
|
91
|
-
|
|
91
|
+
g(this, M);
|
|
92
92
|
// 設置表格凍結
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
g(this, R);
|
|
94
|
+
g(this, B);
|
|
95
|
+
g(this, I);
|
|
96
|
+
g(this, N);
|
|
97
97
|
// Markdown 設置
|
|
98
|
-
|
|
98
|
+
g(this, z);
|
|
99
99
|
// Navigation 設置
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
!
|
|
100
|
+
g(this, X);
|
|
101
|
+
g(this, S);
|
|
102
|
+
g(this, D);
|
|
103
|
+
g(this, L);
|
|
104
|
+
!se(e) || !G(e) || (this.__storage__ = {
|
|
105
105
|
el: e,
|
|
106
106
|
options: t
|
|
107
|
-
}, this.active = "data-article-active", h(this,
|
|
107
|
+
}, this.active = "data-article-active", h(this, W, ie).call(this));
|
|
108
108
|
}
|
|
109
109
|
update() {
|
|
110
110
|
const { elements: e } = this;
|
|
111
111
|
e.forEach((t) => {
|
|
112
112
|
t.querySelectorAll("._article").forEach((r) => {
|
|
113
|
-
r.article = {}, r.article.parent = t, r.article.params = h(this,
|
|
113
|
+
r.article = {}, r.article.parent = t, r.article.params = h(this, k, J).call(this, r), h(this, S, K).call(this, r), h(this, L, Q).call(this, r);
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
const { el: e, options: t } = this.__storage__, { SETTINGS: r } =
|
|
120
|
-
this.elements = t.state == "not active" ?
|
|
121
|
-
},
|
|
118
|
+
W = new WeakSet(), ie = function() {
|
|
119
|
+
const { el: e, options: t } = this.__storage__, { SETTINGS: r } = Ae;
|
|
120
|
+
this.elements = t.state == "not active" ? q(e + `:not([${this.active}])`) : q(e), this.elements = q(e), this.options = Object.assign({}, r, t), h(this, _, oe).call(this);
|
|
121
|
+
}, _ = new WeakSet(), oe = function() {
|
|
122
122
|
const { elements: e } = this;
|
|
123
123
|
e.forEach((t) => {
|
|
124
124
|
t.setAttribute(this.active, ""), t.querySelectorAll("._article").forEach((r) => {
|
|
125
125
|
var o, l;
|
|
126
|
-
r.article = {}, r.article.parent = t, r.article.params = h(this,
|
|
126
|
+
r.article = {}, r.article.parent = t, r.article.params = h(this, k, J).call(this, r), r.article.methods = {}, r.article.methods.update = this.update, h(l = h(o = h(this, O, ae).call(this, r), S, K).call(o, r), D, me).call(l, r), h(this, L, Q).call(this, r);
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
|
-
},
|
|
129
|
+
}, k = new WeakSet(), J = function(e) {
|
|
130
130
|
return {
|
|
131
131
|
// 元件本身
|
|
132
132
|
$selector: e,
|
|
@@ -162,10 +162,10 @@ q = new WeakSet(), re = function() {
|
|
|
162
162
|
quoteColor: e.getAttribute("quote-color"),
|
|
163
163
|
markdown: e.getAttribute("data-table-markdown") ?? !1
|
|
164
164
|
};
|
|
165
|
-
},
|
|
165
|
+
}, O = new WeakSet(), ae = function(e) {
|
|
166
166
|
const { params: t } = e.article;
|
|
167
167
|
return b(t.$h, "color", t.hColor), b(t.$subH, "color", t.subHColor), b(t.$p, "color", t.pColor), b(t.$description, "color", t.descriptionColor), b(t.$button, "backgroundColor", t.buttonColor), b(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), b(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), b(t.$backgroundWrap, "backgroundColor", t.typeFullColor), b(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), b(t.$quote, "color", t.quoteColor), this;
|
|
168
|
-
},
|
|
168
|
+
}, M = new WeakSet(), ne = function(e) {
|
|
169
169
|
const { params: t } = e.article, r = t.$table;
|
|
170
170
|
let o = !1, l, n, u, p;
|
|
171
171
|
r.addEventListener("mousedown", function(c) {
|
|
@@ -180,16 +180,16 @@ q = new WeakSet(), re = function() {
|
|
|
180
180
|
if (!o)
|
|
181
181
|
return;
|
|
182
182
|
c.preventDefault();
|
|
183
|
-
const i = r.getBoundingClientRect(), a = c.pageX - i.left, d = c.pageY - i.top,
|
|
184
|
-
r.scrollLeft = u -
|
|
183
|
+
const i = r.getBoundingClientRect(), a = c.pageX - i.left, d = c.pageY - i.top, m = a - l, f = d - n;
|
|
184
|
+
r.scrollLeft = u - m, r.scrollTop = p - f;
|
|
185
185
|
});
|
|
186
|
-
},
|
|
186
|
+
}, R = new WeakSet(), le = function(e, t, r) {
|
|
187
187
|
const { basic_rwd: o } = this.options, l = window.innerWidth < o, n = [...e.querySelectorAll("tr")];
|
|
188
188
|
if (l || !n.length)
|
|
189
189
|
return;
|
|
190
|
-
const u = h(this,
|
|
191
|
-
h(this, N,
|
|
192
|
-
},
|
|
190
|
+
const u = h(this, B, ce).call(this, n);
|
|
191
|
+
h(this, N, ue).call(this, e, u, t, r);
|
|
192
|
+
}, B = new WeakSet(), ce = function(e) {
|
|
193
193
|
const t = [], r = /* @__PURE__ */ new Set();
|
|
194
194
|
return e.forEach((o, l) => {
|
|
195
195
|
const n = [...o.children];
|
|
@@ -202,10 +202,10 @@ q = new WeakSet(), re = function() {
|
|
|
202
202
|
for (let a = 0; a < c; a++) {
|
|
203
203
|
const d = l + a;
|
|
204
204
|
t[d] ?? (t[d] = []);
|
|
205
|
-
for (let
|
|
206
|
-
const f = u +
|
|
205
|
+
for (let m = 0; m < i; m++) {
|
|
206
|
+
const f = u + m;
|
|
207
207
|
t[d][f] = {
|
|
208
|
-
el: a === 0 &&
|
|
208
|
+
el: a === 0 && m === 0 ? p : null,
|
|
209
209
|
topRow: l,
|
|
210
210
|
leftCol: u,
|
|
211
211
|
rowspan: c,
|
|
@@ -216,7 +216,7 @@ q = new WeakSet(), re = function() {
|
|
|
216
216
|
u += i;
|
|
217
217
|
});
|
|
218
218
|
}), t;
|
|
219
|
-
},
|
|
219
|
+
}, I = new WeakSet(), de = function(e, t) {
|
|
220
220
|
var n;
|
|
221
221
|
const r = t.length, o = Array(r).fill(0), l = e.getBoundingClientRect().top;
|
|
222
222
|
for (let u = 0; u < r; u++)
|
|
@@ -229,9 +229,9 @@ q = new WeakSet(), re = function() {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
return o;
|
|
232
|
-
}, N = new WeakSet(),
|
|
232
|
+
}, N = new WeakSet(), ue = function(e, t, r, o) {
|
|
233
233
|
var p;
|
|
234
|
-
const l = h(this,
|
|
234
|
+
const l = h(this, I, de).call(this, e, t), n = ((p = t[0]) == null ? void 0 : p.length) ?? 0, u = Array(n).fill(0);
|
|
235
235
|
for (let c = 0; c < n; c++)
|
|
236
236
|
for (let i = 0; i < t.length; i++) {
|
|
237
237
|
const a = t[i][c];
|
|
@@ -244,15 +244,15 @@ q = new WeakSet(), re = function() {
|
|
|
244
244
|
(c) => c.forEach((i) => {
|
|
245
245
|
if (!(i != null && i.el))
|
|
246
246
|
return;
|
|
247
|
-
const { el: a, topRow: d, leftCol:
|
|
248
|
-
a.style.position = "sticky", a.style.zIndex = f &&
|
|
247
|
+
const { el: a, topRow: d, leftCol: m } = i, f = d < r, x = m < o;
|
|
248
|
+
a.style.position = "sticky", a.style.zIndex = f && x ? 3 : f ? 2 : x ? 1 : 0, a.style.backgroundColor = getComputedStyle(a).backgroundColor, f && (a.style.top = `${l[d]}px`), x && (a.style.left = `${u[m]}px`);
|
|
249
249
|
})
|
|
250
250
|
);
|
|
251
|
-
}, z = new WeakSet(),
|
|
251
|
+
}, z = new WeakSet(), pe = function(e) {
|
|
252
252
|
const { markdownLink: t, markdownImg: r, markdownLinkBlank: o } = this.options;
|
|
253
253
|
if (e.hasAttribute("data-markdown-rendered"))
|
|
254
254
|
return;
|
|
255
|
-
new
|
|
255
|
+
new $.Renderer(), $.use({
|
|
256
256
|
extensions: [
|
|
257
257
|
{
|
|
258
258
|
name: "center",
|
|
@@ -272,7 +272,7 @@ q = new WeakSet(), re = function() {
|
|
|
272
272
|
};
|
|
273
273
|
},
|
|
274
274
|
renderer(i) {
|
|
275
|
-
return `<div data-center="true">${
|
|
275
|
+
return `<div data-center="true">${$.parser(i.tokens)}</div>`;
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
{
|
|
@@ -293,7 +293,7 @@ q = new WeakSet(), re = function() {
|
|
|
293
293
|
};
|
|
294
294
|
},
|
|
295
295
|
renderer(i) {
|
|
296
|
-
return `<div data-left="true">${
|
|
296
|
+
return `<div data-left="true">${$.parser(i.tokens)}</div>`;
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
299
|
{
|
|
@@ -314,7 +314,7 @@ q = new WeakSet(), re = function() {
|
|
|
314
314
|
};
|
|
315
315
|
},
|
|
316
316
|
renderer(i) {
|
|
317
|
-
return `<div data-right="true">${
|
|
317
|
+
return `<div data-right="true">${$.parser(i.tokens)}</div>`;
|
|
318
318
|
}
|
|
319
319
|
},
|
|
320
320
|
{
|
|
@@ -361,7 +361,7 @@ q = new WeakSet(), re = function() {
|
|
|
361
361
|
}
|
|
362
362
|
]
|
|
363
363
|
});
|
|
364
|
-
const l = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center", "data-right", "data-left"], u = (i) =>
|
|
364
|
+
const l = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center", "data-right", "data-left"], u = (i) => Ce.sanitize(i, {
|
|
365
365
|
ALLOWED_TAGS: [
|
|
366
366
|
...l,
|
|
367
367
|
...t ? ["a"] : [],
|
|
@@ -373,16 +373,16 @@ q = new WeakSet(), re = function() {
|
|
|
373
373
|
...r ? ["src", "alt", "title"] : []
|
|
374
374
|
],
|
|
375
375
|
RETURN_TRUSTED_TYPE: !1
|
|
376
|
-
}), p = (i) => u(
|
|
376
|
+
}), p = (i) => u($.parse(i));
|
|
377
377
|
e.querySelectorAll("td,th").forEach((i) => {
|
|
378
378
|
i.innerHTML = i.textContent;
|
|
379
379
|
const a = i.textContent.trim().replace(/<[^>]*>/g, "");
|
|
380
|
-
i.innerHTML = p(a), o &&
|
|
380
|
+
i.innerHTML = p(a), o && Z(i).find("a") && Z(i).find("a").attr({
|
|
381
381
|
target: "_blank",
|
|
382
382
|
rel: "noopener noreferrer"
|
|
383
383
|
});
|
|
384
384
|
}), e.setAttribute("data-markdown-rendered", "true");
|
|
385
|
-
},
|
|
385
|
+
}, X = new WeakSet(), he = function(e) {
|
|
386
386
|
const { scrollStep: t } = this.options, r = e.querySelector("._contentWrap"), o = e.querySelector("._tableCover"), l = e.querySelector("._table"), n = typeof t == "number" ? t : r.clientWidth * 0.5;
|
|
387
387
|
if (!r || !o || o.querySelector(".table_navigation"))
|
|
388
388
|
return;
|
|
@@ -399,21 +399,21 @@ q = new WeakSet(), re = function() {
|
|
|
399
399
|
}), c.addEventListener("click", () => {
|
|
400
400
|
l.scrollBy({ left: n, behavior: "smooth" });
|
|
401
401
|
}), l.addEventListener("scroll", i), window.addEventListener("resize", i), i();
|
|
402
|
-
},
|
|
402
|
+
}, S = new WeakSet(), K = function(e) {
|
|
403
403
|
const { params: t } = e.article;
|
|
404
|
-
return t.$video.length && new
|
|
405
|
-
},
|
|
404
|
+
return t.$video.length && new ye(t.$video, this.options.videoOptions), this;
|
|
405
|
+
}, D = new WeakSet(), me = function(e) {
|
|
406
406
|
const { basic_rwd: t } = this.options, { params: r } = e.article;
|
|
407
407
|
if (!r.$swiper)
|
|
408
408
|
return;
|
|
409
|
-
const o =
|
|
409
|
+
const o = $e(), l = this;
|
|
410
410
|
let n = {
|
|
411
411
|
on: {
|
|
412
412
|
init(c) {
|
|
413
413
|
const i = c.$el[0];
|
|
414
414
|
r.$video.length && ([...i.querySelectorAll("[video4-active]")].forEach((d) => {
|
|
415
|
-
var
|
|
416
|
-
(
|
|
415
|
+
var m, f;
|
|
416
|
+
(m = d.querySelector(ke.SETTINGS.videoButton)) == null || m.remove(), (f = d.querySelector(".overlay")) == null || f.remove(), d.removeAttribute("video4-active");
|
|
417
417
|
}), l.update());
|
|
418
418
|
},
|
|
419
419
|
observerUpdate(c) {
|
|
@@ -447,18 +447,18 @@ q = new WeakSet(), re = function() {
|
|
|
447
447
|
}), (r.$selector.getAttribute("swiper-loop") !== "off" || !r.$selector.getAttribute("swiper-loop")) && (n.loop = !0), r.$selector.getAttribute("swiper-speed") && (n.speed = parseInt(r.$selector.getAttribute("swiper-speed"))), r.$selector.getAttribute("swiper-parallax") !== "off" && !r.$selector.getAttribute("swiper-loop") && (n.parallax = !0), r.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (n.pagination.dynamicBullets = !0, n.pagination ? n.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
|
|
448
448
|
let u = () => window.innerWidth > t && Number(r.$selector.getAttribute("swiper-num")) || 1;
|
|
449
449
|
r.$swiper.querySelectorAll(".swiper-slide").length <= u() && (n.navigation = !1, n.pagination = !1, n.autoplay = !1, n.loop = !1, r.$selector.querySelector(".swiper-button-cover").style.display = "none", r.$selector.querySelector(".swiper-pagination").style.display = "none", r.$swiper.classList.add("swiper-no-swiping"));
|
|
450
|
-
const p = new
|
|
450
|
+
const p = new Ee(r.$swiper, n);
|
|
451
451
|
return e.article.swiperList = [], e.article.swiperList.push(p), this;
|
|
452
|
-
},
|
|
452
|
+
}, L = new WeakSet(), Q = function(e) {
|
|
453
453
|
const { navigation: t } = this.options, { params: r } = e.article;
|
|
454
454
|
if (!r.$table)
|
|
455
455
|
return;
|
|
456
|
-
const o = e.getAttribute("freeze-table") === "on", l = parseInt(e.getAttribute("freeze-table-row") ?? "0", 10), n = parseInt(e.getAttribute("freeze-table-col") ?? "0", 10), u = e.querySelector("table"), p = e.querySelector("._tipText"), c = e.offsetWidth, i = u.offsetWidth, a = c < i, d = r.markdown === "on",
|
|
457
|
-
o && h(this,
|
|
456
|
+
const o = e.getAttribute("freeze-table") === "on", l = parseInt(e.getAttribute("freeze-table-row") ?? "0", 10), n = parseInt(e.getAttribute("freeze-table-col") ?? "0", 10), u = e.querySelector("table"), p = e.querySelector("._tipText"), c = e.offsetWidth, i = u.offsetWidth, a = c < i, d = r.markdown === "on", m = () => {
|
|
457
|
+
o && h(this, R, le).call(this, u, l, n), (o || a) && h(this, M, ne).call(this, e), d && h(this, z, pe).call(this, u), t && a && h(this, X, he).call(this, e), a ? (e.classList.add("overflow"), p.style.display = "flex") : (e.classList.remove("overflow"), p.style.display = "none");
|
|
458
458
|
};
|
|
459
|
-
return
|
|
459
|
+
return m(), window.addEventListener("resize", m), this;
|
|
460
460
|
};
|
|
461
|
-
let
|
|
461
|
+
let ee = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", te = "ontouchend" in document.documentElement ? "touchend" : "mouseup", V = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
|
|
462
462
|
function w(s) {
|
|
463
463
|
const e = window.getComputedStyle(s), t = e.transform || e.mozTransform;
|
|
464
464
|
if (t === "none")
|
|
@@ -481,7 +481,7 @@ function w(s) {
|
|
|
481
481
|
z: Number(o[14])
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function T(s) {
|
|
485
485
|
const t = s.querySelector(".wrapper").querySelectorAll(".item");
|
|
486
486
|
let r = 0;
|
|
487
487
|
return t.forEach((o) => {
|
|
@@ -489,7 +489,7 @@ function C(s) {
|
|
|
489
489
|
r += o.getBoundingClientRect().width + n + u;
|
|
490
490
|
}), r;
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Y(s) {
|
|
493
493
|
if (w(s.slideWrapEl).x >= s.translateMin)
|
|
494
494
|
return "is-start";
|
|
495
495
|
if (w(s.slideWrapEl).x <= s.translateMax)
|
|
@@ -497,10 +497,10 @@ function U(s) {
|
|
|
497
497
|
if (w(s.slideWrapEl).x < s.translateMin && w(s.slideWrapEl).x > s.translateMax)
|
|
498
498
|
return "is-middle";
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function Oe(s) {
|
|
501
501
|
const e = s.el, t = e.querySelector(".wrapper");
|
|
502
|
-
t.addEventListener(
|
|
503
|
-
switch (s.isDown = !0, s.slidable && t.classList.add("dragging"),
|
|
502
|
+
t.addEventListener(ee, function(r) {
|
|
503
|
+
switch (s.isDown = !0, s.slidable && t.classList.add("dragging"), ee) {
|
|
504
504
|
case "mousedown":
|
|
505
505
|
s.startX = r.pageX;
|
|
506
506
|
break;
|
|
@@ -509,10 +509,10 @@ function We(s) {
|
|
|
509
509
|
break;
|
|
510
510
|
}
|
|
511
511
|
s.nowTranslateX = w(t).x;
|
|
512
|
-
}), t.addEventListener(
|
|
512
|
+
}), t.addEventListener(te, function(r) {
|
|
513
513
|
s.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
|
|
514
514
|
let o;
|
|
515
|
-
switch (
|
|
515
|
+
switch (V) {
|
|
516
516
|
case "mousemove":
|
|
517
517
|
o = r.pageX - s.startX;
|
|
518
518
|
break;
|
|
@@ -521,7 +521,7 @@ function We(s) {
|
|
|
521
521
|
break;
|
|
522
522
|
}
|
|
523
523
|
if (o === 0 && r.target.closest(".item")) {
|
|
524
|
-
if (
|
|
524
|
+
if (te === "mouseup" && r.button !== 0)
|
|
525
525
|
return;
|
|
526
526
|
t.querySelectorAll(".item").forEach((n) => {
|
|
527
527
|
n.classList.remove("active");
|
|
@@ -530,13 +530,13 @@ function We(s) {
|
|
|
530
530
|
s.slidable && s.resetPos(e);
|
|
531
531
|
}), t.addEventListener("mouseleave", function() {
|
|
532
532
|
s.isDown && s.slidable && (s.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), s.resetPos(e));
|
|
533
|
-
}), t.addEventListener(
|
|
533
|
+
}), t.addEventListener(V, function(r) {
|
|
534
534
|
if (s.draggable && s.slidable) {
|
|
535
535
|
if (!s.isDown)
|
|
536
536
|
return;
|
|
537
537
|
r.preventDefault();
|
|
538
538
|
let o;
|
|
539
|
-
switch (
|
|
539
|
+
switch (V) {
|
|
540
540
|
case "mousemove":
|
|
541
541
|
o = r.pageX - s.startX;
|
|
542
542
|
break;
|
|
@@ -555,20 +555,20 @@ function We(s) {
|
|
|
555
555
|
}
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function Me(s) {
|
|
559
559
|
const e = s.querySelectorAll("a");
|
|
560
560
|
for (var t = 0, r = e.length; t < r; t++)
|
|
561
561
|
e[t].draggable = !1;
|
|
562
562
|
}
|
|
563
|
-
class
|
|
563
|
+
class De {
|
|
564
564
|
constructor(e, t) {
|
|
565
565
|
this.el = typeof e == "string" ? document.querySelector(e) : e, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
|
|
566
566
|
speed: 300,
|
|
567
567
|
clickSwitch: !0,
|
|
568
568
|
breakpoint: !1
|
|
569
|
-
}, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth =
|
|
569
|
+
}, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = T(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
|
|
570
570
|
Math.abs(
|
|
571
|
-
|
|
571
|
+
T(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
|
|
572
572
|
)
|
|
573
573
|
), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
|
|
574
574
|
}
|
|
@@ -576,7 +576,7 @@ class Ie {
|
|
|
576
576
|
const e = this;
|
|
577
577
|
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() {
|
|
578
578
|
e.update();
|
|
579
|
-
}),
|
|
579
|
+
}), Oe(e), Me(e.el);
|
|
580
580
|
}
|
|
581
581
|
moveActive(e) {
|
|
582
582
|
const t = this, r = t.slideWrapEl.querySelector(".item.active"), l = r.previousElementSibling ? r.offsetLeft - t.el.clientWidth / 2 + r.clientWidth / 2 : 0;
|
|
@@ -604,7 +604,7 @@ class Ie {
|
|
|
604
604
|
t.slideWrapEl.addEventListener(
|
|
605
605
|
"transitionend",
|
|
606
606
|
function() {
|
|
607
|
-
switch (t.nowTranslateX = w(t.slideWrapEl).x,
|
|
607
|
+
switch (t.nowTranslateX = w(t.slideWrapEl).x, Y(t)) {
|
|
608
608
|
case "is-start":
|
|
609
609
|
t.el.classList.add("is-start"), t.el.classList.remove("is-end");
|
|
610
610
|
break;
|
|
@@ -619,7 +619,7 @@ class Ie {
|
|
|
619
619
|
!1
|
|
620
620
|
);
|
|
621
621
|
else
|
|
622
|
-
switch (t.nowTranslateX = w(t.slideWrapEl).x,
|
|
622
|
+
switch (t.nowTranslateX = w(t.slideWrapEl).x, Y(t)) {
|
|
623
623
|
case "is-start":
|
|
624
624
|
t.el.classList.add("is-start"), t.el.classList.remove("is-end");
|
|
625
625
|
break;
|
|
@@ -634,7 +634,7 @@ class Ie {
|
|
|
634
634
|
}
|
|
635
635
|
resetPos() {
|
|
636
636
|
const e = this;
|
|
637
|
-
switch (
|
|
637
|
+
switch (Y(e)) {
|
|
638
638
|
case "is-start":
|
|
639
639
|
e.el.classList.add("is-start"), e.el.classList.remove("is-end"), Object.assign(e.slideWrapEl.style, {
|
|
640
640
|
transition: `all ${e.params.speed}ms ease 0s`,
|
|
@@ -654,14 +654,14 @@ class Ie {
|
|
|
654
654
|
}
|
|
655
655
|
update() {
|
|
656
656
|
const e = this;
|
|
657
|
-
e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth =
|
|
657
|
+
e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = T(e.el), e.translateMax = -Math.floor(
|
|
658
658
|
Math.abs(
|
|
659
|
-
|
|
659
|
+
T(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
|
|
660
660
|
)
|
|
661
661
|
), 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"));
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
const
|
|
664
|
+
const re = (s) => {
|
|
665
665
|
if (s == "facebook")
|
|
666
666
|
return "https://www.facebook.com/sharer/sharer.php?u=";
|
|
667
667
|
if (s == "line")
|
|
@@ -675,29 +675,29 @@ const ee = (s) => {
|
|
|
675
675
|
if (s == "weibo")
|
|
676
676
|
return "https://service.weibo.com/share/share.php?url=";
|
|
677
677
|
};
|
|
678
|
-
var
|
|
679
|
-
class
|
|
678
|
+
var H, ge, P, fe, j, be;
|
|
679
|
+
class He {
|
|
680
680
|
constructor(e, t = {}) {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
681
|
+
g(this, H);
|
|
682
|
+
g(this, P);
|
|
683
|
+
g(this, j);
|
|
684
684
|
this.__storage__ = {
|
|
685
685
|
el: e,
|
|
686
686
|
options: t
|
|
687
|
-
}, h(this,
|
|
687
|
+
}, h(this, H, ge).call(this);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
|
|
691
|
-
const { el: e, options: t } = this.__storage__, { SETTINGS: r } =
|
|
692
|
-
!
|
|
693
|
-
},
|
|
690
|
+
H = new WeakSet(), ge = function() {
|
|
691
|
+
const { el: e, options: t } = this.__storage__, { SETTINGS: r } = Le;
|
|
692
|
+
!se(e) || !G(e) || (this.elements = q(e), this.options = Object.assign({}, r, t), h(this, P, fe).call(this));
|
|
693
|
+
}, P = new WeakSet(), fe = function() {
|
|
694
694
|
const { elements: e, options: t } = this;
|
|
695
695
|
e.forEach((r) => {
|
|
696
696
|
r.querySelectorAll("[share-target]").forEach((o) => {
|
|
697
|
-
o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = h(this, j,
|
|
697
|
+
o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = h(this, j, be), o.addEventListener("click", o.share.eventHandler);
|
|
698
698
|
});
|
|
699
699
|
});
|
|
700
|
-
}, j = new WeakSet(),
|
|
700
|
+
}, j = new WeakSet(), be = function() {
|
|
701
701
|
const { eventHandler: e, params: t } = this.share, r = this.getAttribute("share-target"), o = {
|
|
702
702
|
source: this.getAttribute("utm-source"),
|
|
703
703
|
medium: this.getAttribute("utm-medium"),
|
|
@@ -714,56 +714,60 @@ D = new WeakSet(), he = function() {
|
|
|
714
714
|
return;
|
|
715
715
|
}
|
|
716
716
|
if (r == "url") {
|
|
717
|
-
if (
|
|
717
|
+
if (G(".copied-wrapper"))
|
|
718
718
|
return;
|
|
719
|
-
document.querySelector("body").insertAdjacentHTML(
|
|
720
|
-
const
|
|
721
|
-
l.className &&
|
|
722
|
-
const
|
|
723
|
-
if (
|
|
719
|
+
document.querySelector("body").insertAdjacentHTML(Se.append, `<div class='copied-wrapper'><div class='text'>${l.success ? l.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
|
|
720
|
+
const i = document.querySelector(".copied-wrapper");
|
|
721
|
+
l.className && i.classList.add(l.className), i.style.top = this.getBoundingClientRect().top + window.scrollY + "px", i.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", i.style.display = "block";
|
|
722
|
+
const a = document.querySelector("#clipboard");
|
|
723
|
+
if (a.value = l.text ?? window.location.href, a.setSelectionRange(0, 9999), a.select(), document.execCommand("copy")) {
|
|
724
724
|
document.execCommand("copy");
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
let
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
725
|
+
const d = document.querySelector(".copied-wrapper"), m = document.querySelector(".copied-wrapper .text");
|
|
726
|
+
m.style.display = "block", m.style.opacity = 0;
|
|
727
|
+
const f = (A, F) => {
|
|
728
|
+
let v = 0;
|
|
729
|
+
const y = 50, C = y / F, U = setInterval(function() {
|
|
730
|
+
v += C, A.style.opacity = v, v >= 1 && (clearInterval(U), setTimeout(function() {
|
|
731
|
+
x(A, 300, function() {
|
|
732
|
+
d.remove();
|
|
733
733
|
});
|
|
734
734
|
}, l.duration));
|
|
735
|
-
},
|
|
736
|
-
},
|
|
737
|
-
let
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
},
|
|
735
|
+
}, y);
|
|
736
|
+
}, x = (A, F, v) => {
|
|
737
|
+
let y = 1;
|
|
738
|
+
const C = 50, U = C / F, we = setInterval(() => {
|
|
739
|
+
y -= U, A.style.opacity = y, y <= 0 && (clearInterval(we), A.style.display = "none", v && v());
|
|
740
|
+
}, C);
|
|
741
741
|
};
|
|
742
|
-
|
|
742
|
+
f(m, 300);
|
|
743
743
|
}
|
|
744
744
|
return;
|
|
745
745
|
}
|
|
746
|
-
u = `${u}${o.source ? `?utm_source=${o.source}` : ""}${o.medium ? `&utm_medium${o.medium}` : ""}${o.campaign ? `&utm_campaign${o.campaign}` : ""}`, u = u.replace("?", "%3F").replace(new RegExp("&", "g"), "%26")
|
|
746
|
+
u = `${u}${o.source ? `?utm_source=${o.source}` : ""}${o.medium ? `&utm_medium${o.medium}` : ""}${o.campaign ? `&utm_campaign${o.campaign}` : ""}`, u = u.replace("?", "%3F").replace(new RegExp("&", "g"), "%26");
|
|
747
|
+
const p = /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, c = (i) => {
|
|
748
|
+
p ? window.location.href = i : window.open(i);
|
|
749
|
+
};
|
|
750
|
+
r == "line" ? c(`${re(r)}${n}`) : c(`${re(r)}${u}`), this.removeEventListener("click", e), setTimeout(() => {
|
|
747
751
|
this.addEventListener("click", e);
|
|
748
752
|
}, 100);
|
|
749
753
|
};
|
|
750
754
|
export {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
755
|
+
Fe as Anchor4,
|
|
756
|
+
Ue as Aost4,
|
|
757
|
+
Xe as Article4,
|
|
758
|
+
De as CategorySlider,
|
|
759
|
+
Ve as Collapse4,
|
|
760
|
+
Ye as Configs,
|
|
761
|
+
ze as Detect4,
|
|
762
|
+
Ge as Dropdown4,
|
|
763
|
+
Je as ImagePreview,
|
|
764
|
+
Ke as ImageValidate,
|
|
765
|
+
Qe as Marquee4,
|
|
766
|
+
Ze as Modal4,
|
|
767
|
+
et as Multipurpose4,
|
|
768
|
+
tt as Ripple4,
|
|
769
|
+
He as Share4,
|
|
770
|
+
rt as Tab4,
|
|
771
|
+
ye as Video4
|
|
768
772
|
};
|
|
769
773
|
//# sourceMappingURL=fesd-bundle.js.map
|