@hbis-uni/components 2.8.0 → 2.9.0
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/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1046 -791
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode, createCommentVNode, computed, ref, onMounted, watch, Fragment, renderList, normalizeStyle, nextTick, onUnmounted, withModifiers, withDirectives, vModelText, useSlots, useCssVars,
|
|
2
|
-
const _sfc_main$
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode, createCommentVNode, computed, ref, onMounted, watch, Fragment, renderList, normalizeStyle, nextTick, onUnmounted, withModifiers, withDirectives, vModelText, useSlots, useCssVars, withKeys } from "vue";
|
|
2
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3
3
|
__name: "C1",
|
|
4
4
|
props: {
|
|
5
5
|
title: { default: "C1 Component" },
|
|
6
6
|
primary: { type: Boolean, default: !1 }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (
|
|
10
|
-
class: normalizeClass(["c1-container", { "c1-primary":
|
|
8
|
+
setup(n) {
|
|
9
|
+
return (b, i) => (openBlock(), createElementBlock("div", {
|
|
10
|
+
class: normalizeClass(["c1-container", { "c1-primary": n.primary }])
|
|
11
11
|
}, [
|
|
12
|
-
renderSlot(
|
|
13
|
-
createTextVNode(toDisplayString(
|
|
12
|
+
renderSlot(b.$slots, "default", {}, () => [
|
|
13
|
+
createTextVNode(toDisplayString(n.title), 1)
|
|
14
14
|
], !0)
|
|
15
15
|
], 2));
|
|
16
16
|
}
|
|
17
|
-
}), _export_sfc = (
|
|
18
|
-
const
|
|
19
|
-
for (const [
|
|
20
|
-
|
|
21
|
-
return
|
|
22
|
-
}, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17
|
+
}), _export_sfc = (n, b) => {
|
|
18
|
+
const i = n.__vccOpts || n;
|
|
19
|
+
for (const [r, t] of b)
|
|
20
|
+
i[r] = t;
|
|
21
|
+
return i;
|
|
22
|
+
}, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-e2028f64"]]), _hoisted_1$8 = { class: "c2-container" }, _hoisted_2$7 = { class: "c2-title" }, _hoisted_3$7 = { class: "c2-content" }, _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
23
23
|
__name: "C2",
|
|
24
24
|
props: {
|
|
25
25
|
title: { default: "C2 Component" },
|
|
@@ -27,33 +27,33 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
buttonText: { default: "Click Me" }
|
|
28
28
|
},
|
|
29
29
|
emits: ["click"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
32
|
-
|
|
30
|
+
setup(n, { emit: b }) {
|
|
31
|
+
const i = b, r = (t) => {
|
|
32
|
+
i("click", t);
|
|
33
33
|
};
|
|
34
|
-
return (
|
|
35
|
-
createElementVNode("h2", _hoisted_2$
|
|
36
|
-
createElementVNode("div", _hoisted_3$
|
|
37
|
-
renderSlot(
|
|
34
|
+
return (t, h) => (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
35
|
+
createElementVNode("h2", _hoisted_2$7, toDisplayString(n.title), 1),
|
|
36
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
37
|
+
renderSlot(t.$slots, "default", {}, void 0, !0)
|
|
38
38
|
]),
|
|
39
|
-
|
|
39
|
+
n.showButton ? (openBlock(), createElementBlock("button", {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "c2-button",
|
|
42
|
-
onClick:
|
|
43
|
-
}, toDisplayString(
|
|
42
|
+
onClick: r
|
|
43
|
+
}, toDisplayString(n.buttonText), 1)) : createCommentVNode("", !0)
|
|
44
44
|
]));
|
|
45
45
|
}
|
|
46
|
-
}), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
46
|
+
}), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-b1d573ae"]]), _hoisted_1$7 = { key: 0 }, _hoisted_2$6 = { class: "hbis-date-strip__weekdays" }, _hoisted_3$6 = { class: "hbis-date-strip__dates" }, _hoisted_4$5 = ["onClick"], _hoisted_5$4 = { class: "hbis-date-strip__date-number" }, _hoisted_6$4 = { class: "hbis-date-strip__date-slot" }, _hoisted_7$4 = {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: "hbis-date-strip__scroll-wrapper"
|
|
49
|
-
}, _hoisted_8$
|
|
49
|
+
}, _hoisted_8$2 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9$1 = { class: "hbis-date-strip__weekdays" }, _hoisted_10$1 = { class: "hbis-date-strip__dates" }, _hoisted_11$1 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
50
50
|
__name: "hbis-dateStrip",
|
|
51
51
|
props: {
|
|
52
52
|
modelValue: { default: () => /* @__PURE__ */ new Date() },
|
|
53
53
|
startDate: { default: () => /* @__PURE__ */ new Date() },
|
|
54
54
|
endDate: { default: () => {
|
|
55
|
-
const
|
|
56
|
-
return
|
|
55
|
+
const n = /* @__PURE__ */ new Date();
|
|
56
|
+
return n.setDate(n.getDate() + 30), n;
|
|
57
57
|
} },
|
|
58
58
|
highlightType: { default: "bg" },
|
|
59
59
|
showToday: { type: Boolean, default: !0 },
|
|
@@ -67,33 +67,33 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
visibleDays: { default: 7 }
|
|
68
68
|
},
|
|
69
69
|
emits: ["update:modelValue", "dateClick"],
|
|
70
|
-
setup(
|
|
71
|
-
const
|
|
70
|
+
setup(n, { emit: b }) {
|
|
71
|
+
const i = n, r = b, t = computed(() => {
|
|
72
72
|
if (console.log("props:", {
|
|
73
|
-
startDate:
|
|
74
|
-
endDate:
|
|
75
|
-
scrollable:
|
|
76
|
-
}),
|
|
73
|
+
startDate: i.startDate,
|
|
74
|
+
endDate: i.endDate,
|
|
75
|
+
scrollable: i.scrollable
|
|
76
|
+
}), i.scrollable)
|
|
77
77
|
return console.log("显式设置了scrollable为true,允许滚动"), !0;
|
|
78
78
|
try {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
79
|
+
const d = new Date(i.startDate);
|
|
80
|
+
d.setHours(0, 0, 0, 0);
|
|
81
|
+
const m = new Date(i.endDate);
|
|
82
|
+
if (m.setHours(0, 0, 0, 0), isNaN(d.getTime()) || isNaN(m.getTime()))
|
|
83
83
|
return console.log("无效的日期对象,使用默认滚动行为"), !1;
|
|
84
|
-
const e =
|
|
84
|
+
const e = m.getTime() - d.getTime(), E = Math.ceil(e / (1e3 * 60 * 60 * 24)), v = E + 1;
|
|
85
85
|
return console.log("日期范围天数计算:", {
|
|
86
|
-
start:
|
|
87
|
-
end:
|
|
86
|
+
start: d.toLocaleDateString(),
|
|
87
|
+
end: m.toLocaleDateString(),
|
|
88
88
|
diffTime: e,
|
|
89
|
-
diffDays:
|
|
89
|
+
diffDays: E,
|
|
90
90
|
totalDays: v,
|
|
91
91
|
shouldScroll: v > 7
|
|
92
92
|
}), v > 7;
|
|
93
|
-
} catch (
|
|
94
|
-
return console.error("计算日期范围时出错:",
|
|
93
|
+
} catch (d) {
|
|
94
|
+
return console.error("计算日期范围时出错:", d), !1;
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
96
|
+
}), h = [
|
|
97
97
|
{ value: 0, label: "日", isWeekend: !0 },
|
|
98
98
|
{ value: 1, label: "一", isWeekend: !1 },
|
|
99
99
|
{ value: 2, label: "二", isWeekend: !1 },
|
|
@@ -101,155 +101,155 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
{ value: 4, label: "四", isWeekend: !1 },
|
|
102
102
|
{ value: 5, label: "五", isWeekend: !1 },
|
|
103
103
|
{ value: 6, label: "六", isWeekend: !0 }
|
|
104
|
-
],
|
|
105
|
-
const
|
|
106
|
-
if (!
|
|
107
|
-
return
|
|
108
|
-
const
|
|
109
|
-
for (let
|
|
110
|
-
const v = (
|
|
111
|
-
e.push(
|
|
104
|
+
], c = computed(() => {
|
|
105
|
+
const d = l.value[0];
|
|
106
|
+
if (!d)
|
|
107
|
+
return h;
|
|
108
|
+
const m = d.weekday, e = [];
|
|
109
|
+
for (let E = 0; E < 7; E++) {
|
|
110
|
+
const v = (m + E) % 7;
|
|
111
|
+
e.push(h[v]);
|
|
112
112
|
}
|
|
113
113
|
return e;
|
|
114
114
|
});
|
|
115
115
|
ref((() => {
|
|
116
|
-
const
|
|
117
|
-
return
|
|
116
|
+
const d = i.startDate || /* @__PURE__ */ new Date(), m = d.getDay(), e = d.getDate() - (m === 0 ? 6 : m - 1), E = new Date(d);
|
|
117
|
+
return E.setDate(e), E;
|
|
118
118
|
})()), onMounted(() => {
|
|
119
|
-
console.log("props:",
|
|
119
|
+
console.log("props:", i), console.log("highlightType:", i.highlightType);
|
|
120
120
|
}), watch(
|
|
121
|
-
() =>
|
|
122
|
-
(
|
|
123
|
-
console.log("highlightType changed:",
|
|
121
|
+
() => i.highlightType,
|
|
122
|
+
(d) => {
|
|
123
|
+
console.log("highlightType changed:", d);
|
|
124
124
|
}
|
|
125
125
|
), watch(
|
|
126
|
-
() =>
|
|
127
|
-
(
|
|
128
|
-
console.log("modelValue changed:",
|
|
126
|
+
() => i.modelValue,
|
|
127
|
+
(d) => {
|
|
128
|
+
console.log("modelValue changed:", d);
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
|
-
const
|
|
132
|
-
const
|
|
131
|
+
const p = computed(() => {
|
|
132
|
+
const d = [];
|
|
133
133
|
try {
|
|
134
|
-
const
|
|
135
|
-
if (isNaN(
|
|
136
|
-
return console.log("无效的日期对象,返回空数组"),
|
|
137
|
-
const
|
|
138
|
-
for (let v = 0; v <
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
date:
|
|
142
|
-
dateString:
|
|
143
|
-
day:
|
|
144
|
-
month:
|
|
145
|
-
year:
|
|
146
|
-
isWeekend:
|
|
147
|
-
weekday:
|
|
134
|
+
const m = i.startDate, e = i.endDate;
|
|
135
|
+
if (isNaN(m.getTime()) || isNaN(e.getTime()))
|
|
136
|
+
return console.log("无效的日期对象,返回空数组"), d;
|
|
137
|
+
const E = Math.ceil((e.getTime() - m.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
138
|
+
for (let v = 0; v < E; v++) {
|
|
139
|
+
const w = new Date(m);
|
|
140
|
+
w.setDate(m.getDate() + v), isNaN(w.getTime()) || d.push({
|
|
141
|
+
date: w,
|
|
142
|
+
dateString: o(w),
|
|
143
|
+
day: w.getDate(),
|
|
144
|
+
month: w.getMonth() + 1,
|
|
145
|
+
year: w.getFullYear(),
|
|
146
|
+
isWeekend: w.getDay() === 0 || w.getDay() === 6,
|
|
147
|
+
weekday: w.getDay()
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
} catch (
|
|
151
|
-
console.error("生成日期数组时出错:",
|
|
150
|
+
} catch (m) {
|
|
151
|
+
console.error("生成日期数组时出错:", m);
|
|
152
152
|
}
|
|
153
|
-
return
|
|
154
|
-
}),
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
},
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
},
|
|
161
|
-
const
|
|
162
|
-
return
|
|
163
|
-
},
|
|
164
|
-
var
|
|
165
|
-
return ((
|
|
166
|
-
},
|
|
167
|
-
|
|
153
|
+
return d;
|
|
154
|
+
}), l = computed(() => p.value.filter((d) => !!(d && d.date && d.dateString && !isNaN(d.date.getTime()) && typeof d.dateString == "string" && typeof d.day == "number"))), o = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`, s = (d) => {
|
|
155
|
+
const m = d.dateString;
|
|
156
|
+
return i.modelValue ? Array.isArray(i.modelValue) ? i.modelValue.some((e) => !e || isNaN(e.getTime()) ? !1 : o(e) === m) : isNaN(i.modelValue.getTime()) ? !1 : o(i.modelValue) === m : !1;
|
|
157
|
+
}, f = (d) => {
|
|
158
|
+
const m = o(/* @__PURE__ */ new Date());
|
|
159
|
+
return d.dateString === m;
|
|
160
|
+
}, u = (d) => {
|
|
161
|
+
const m = d.date;
|
|
162
|
+
return i.disablePast && m < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || i.disableFuture && m > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : m >= i.startDate && m <= i.endDate;
|
|
163
|
+
}, g = (d) => {
|
|
164
|
+
var m;
|
|
165
|
+
return ((m = h.find((e) => e.value === d)) == null ? void 0 : m.label) || "";
|
|
166
|
+
}, _ = (d) => {
|
|
167
|
+
u(d) && (r("dateClick", d), r("update:modelValue", d.date));
|
|
168
168
|
};
|
|
169
|
-
return (
|
|
169
|
+
return (d, m) => (openBlock(), createElementBlock("div", {
|
|
170
170
|
class: normalizeClass(["hbis-date-strip", {
|
|
171
|
-
"hbis-date-strip--highlight-bg":
|
|
172
|
-
"hbis-date-strip--highlight-dot":
|
|
173
|
-
"hbis-date-strip--highlight-round":
|
|
174
|
-
"hbis-date-strip--scrollable":
|
|
171
|
+
"hbis-date-strip--highlight-bg": n.highlightType === "bg",
|
|
172
|
+
"hbis-date-strip--highlight-dot": n.highlightType === "dot",
|
|
173
|
+
"hbis-date-strip--highlight-round": n.highlightType === "round",
|
|
174
|
+
"hbis-date-strip--scrollable": t.value
|
|
175
175
|
}])
|
|
176
176
|
}, [
|
|
177
|
-
|
|
178
|
-
createElementVNode("div", _hoisted_8$
|
|
179
|
-
createElementVNode("div", _hoisted_9, [
|
|
180
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
177
|
+
t.value ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
|
|
178
|
+
createElementVNode("div", _hoisted_8$2, [
|
|
179
|
+
createElementVNode("div", _hoisted_9$1, [
|
|
180
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (e) => (openBlock(), createElementBlock("div", {
|
|
181
181
|
key: e.dateString + "-weekday",
|
|
182
182
|
class: normalizeClass(["hbis-date-strip__weekday", {
|
|
183
183
|
"hbis-date-strip__weekday--weekend": e.isWeekend
|
|
184
184
|
}])
|
|
185
|
-
}, toDisplayString(
|
|
185
|
+
}, toDisplayString(g(e.weekday)), 3))), 128))
|
|
186
186
|
]),
|
|
187
|
-
createElementVNode("div", _hoisted_10, [
|
|
188
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
187
|
+
createElementVNode("div", _hoisted_10$1, [
|
|
188
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (e) => (openBlock(), createElementBlock("div", {
|
|
189
189
|
key: e.dateString,
|
|
190
190
|
class: normalizeClass(["hbis-date-strip__date", {
|
|
191
|
-
"hbis-date-strip__date--selected":
|
|
192
|
-
"hbis-date-strip__date--today":
|
|
193
|
-
"hbis-date-strip__date--disabled": !
|
|
191
|
+
"hbis-date-strip__date--selected": s(e),
|
|
192
|
+
"hbis-date-strip__date--today": f(e),
|
|
193
|
+
"hbis-date-strip__date--disabled": !u(e),
|
|
194
194
|
"hbis-date-strip__date--weekend": e.isWeekend
|
|
195
195
|
}]),
|
|
196
196
|
style: normalizeStyle({
|
|
197
|
-
color:
|
|
198
|
-
backgroundColor:
|
|
197
|
+
color: s(e) ? n.selectedColor : n.normalColor,
|
|
198
|
+
backgroundColor: s(e) ? n.selectedBgColor : n.normalBgColor
|
|
199
199
|
}),
|
|
200
|
-
onClick: (
|
|
200
|
+
onClick: (E) => _(e)
|
|
201
201
|
}, [
|
|
202
202
|
createElementVNode("div", _hoisted_12, toDisplayString(e.day), 1),
|
|
203
203
|
createElementVNode("div", _hoisted_13, [
|
|
204
|
-
renderSlot(
|
|
204
|
+
renderSlot(d.$slots, "default", { date: e }, void 0, !0)
|
|
205
205
|
])
|
|
206
|
-
], 14, _hoisted_11))), 128))
|
|
206
|
+
], 14, _hoisted_11$1))), 128))
|
|
207
207
|
])
|
|
208
208
|
])
|
|
209
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
210
|
-
createElementVNode("div", _hoisted_2$
|
|
211
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
209
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
210
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
211
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (e) => (openBlock(), createElementBlock("div", {
|
|
212
212
|
key: e.value,
|
|
213
213
|
class: normalizeClass(["hbis-date-strip__weekday", {
|
|
214
214
|
"hbis-date-strip__weekday--weekend": e.isWeekend
|
|
215
215
|
}])
|
|
216
216
|
}, toDisplayString(e.label), 3))), 128))
|
|
217
217
|
]),
|
|
218
|
-
createElementVNode("div", _hoisted_3$
|
|
219
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
218
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
219
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (e) => (openBlock(), createElementBlock("div", {
|
|
220
220
|
key: e.dateString,
|
|
221
221
|
class: normalizeClass(["hbis-date-strip__date", {
|
|
222
|
-
"hbis-date-strip__date--selected":
|
|
223
|
-
"hbis-date-strip__date--today":
|
|
224
|
-
"hbis-date-strip__date--disabled": !
|
|
222
|
+
"hbis-date-strip__date--selected": s(e),
|
|
223
|
+
"hbis-date-strip__date--today": f(e),
|
|
224
|
+
"hbis-date-strip__date--disabled": !u(e),
|
|
225
225
|
"hbis-date-strip__date--weekend": e.isWeekend
|
|
226
226
|
}]),
|
|
227
227
|
style: normalizeStyle({
|
|
228
|
-
color:
|
|
229
|
-
backgroundColor:
|
|
228
|
+
color: s(e) ? n.selectedColor : n.normalColor,
|
|
229
|
+
backgroundColor: s(e) ? n.selectedBgColor : n.normalBgColor
|
|
230
230
|
}),
|
|
231
|
-
onClick: (
|
|
231
|
+
onClick: (E) => _(e)
|
|
232
232
|
}, [
|
|
233
|
-
createElementVNode("div", _hoisted_5$
|
|
234
|
-
createElementVNode("div", _hoisted_6$
|
|
235
|
-
renderSlot(
|
|
233
|
+
createElementVNode("div", _hoisted_5$4, toDisplayString(e.day), 1),
|
|
234
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
235
|
+
renderSlot(d.$slots, "default", { date: e }, void 0, !0)
|
|
236
236
|
])
|
|
237
|
-
], 14, _hoisted_4$
|
|
237
|
+
], 14, _hoisted_4$5))), 128))
|
|
238
238
|
])
|
|
239
239
|
]))
|
|
240
240
|
], 2));
|
|
241
241
|
}
|
|
242
|
-
}), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
242
|
+
}), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-2e8258eb"]]), _hoisted_1$6 = { class: "image-preview" }, _hoisted_2$5 = {
|
|
243
243
|
key: 0,
|
|
244
244
|
class: "counter"
|
|
245
|
-
}, _hoisted_3$
|
|
245
|
+
}, _hoisted_3$5 = { class: "counter-text" }, _hoisted_4$4 = { class: "swiper-container" }, _hoisted_5$3 = ["onWheel"], _hoisted_6$3 = ["src", "onLoad"], _hoisted_7$3 = ["disabled"], _hoisted_8$1 = ["disabled"], _sfc_main$8 = {
|
|
246
246
|
__name: "hbis-previewImage",
|
|
247
247
|
props: {
|
|
248
248
|
// 图片集合
|
|
249
249
|
images: {
|
|
250
250
|
type: Array,
|
|
251
251
|
required: !0,
|
|
252
|
-
validator: (
|
|
252
|
+
validator: (n) => n.every((b) => typeof b == "string")
|
|
253
253
|
},
|
|
254
254
|
// 当前显示的图片索引
|
|
255
255
|
initialIndex: {
|
|
@@ -278,128 +278,128 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
emits: ["close", "change", "update:initialIndex"],
|
|
281
|
-
setup(
|
|
282
|
-
const
|
|
281
|
+
setup(n, { emit: b }) {
|
|
282
|
+
const i = n, r = b, t = ref(i.initialIndex), h = ref(null), c = ref(!1), a = ref(!1), p = ref(0), l = ref(0), o = ref(0), s = ref(window.innerWidth), f = ref(window.innerHeight), u = ref(i.images.map(() => ({
|
|
283
283
|
scale: 1,
|
|
284
284
|
translateX: 0,
|
|
285
285
|
translateY: 0,
|
|
286
286
|
naturalWidth: 0,
|
|
287
287
|
naturalHeight: 0,
|
|
288
288
|
isLoaded: !1
|
|
289
|
-
}))),
|
|
290
|
-
transform: `translateX(${
|
|
291
|
-
transition:
|
|
289
|
+
}))), g = ref(0), _ = ref(0), d = ref(0), m = ref(0), e = ref(0), E = computed(() => ({
|
|
290
|
+
transform: `translateX(${o.value}px)`,
|
|
291
|
+
transition: c.value ? "none" : "transform 0.3s ease"
|
|
292
292
|
})), v = computed(() => ({
|
|
293
|
-
width: `${
|
|
294
|
-
height: `${
|
|
293
|
+
width: `${s.value}px`,
|
|
294
|
+
height: `${f.value}px`
|
|
295
295
|
}));
|
|
296
|
-
watch(() =>
|
|
297
|
-
y !==
|
|
296
|
+
watch(() => i.initialIndex, (y) => {
|
|
297
|
+
y !== t.value && (t.value = y, w());
|
|
298
298
|
}), onMounted(() => {
|
|
299
299
|
const y = () => {
|
|
300
|
-
|
|
300
|
+
s.value = window.innerWidth, f.value = window.innerHeight, w();
|
|
301
301
|
};
|
|
302
302
|
return window.addEventListener("resize", y), y(), () => {
|
|
303
303
|
window.removeEventListener("resize", y);
|
|
304
304
|
};
|
|
305
305
|
});
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
},
|
|
309
|
-
|
|
306
|
+
const w = () => {
|
|
307
|
+
o.value = -t.value * s.value;
|
|
308
|
+
}, x = () => {
|
|
309
|
+
t.value > 0 && (t.value--, w(), B(), r("change", t.value), r("update:initialIndex", t.value));
|
|
310
310
|
}, S = () => {
|
|
311
|
-
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
...
|
|
311
|
+
t.value < i.images.length - 1 && (t.value++, w(), B(), r("change", t.value), r("update:initialIndex", t.value));
|
|
312
|
+
}, B = () => {
|
|
313
|
+
u.value[t.value] = {
|
|
314
|
+
...u.value[t.value],
|
|
315
315
|
scale: 1,
|
|
316
316
|
translateX: 0,
|
|
317
317
|
translateY: 0
|
|
318
318
|
};
|
|
319
319
|
}, C = (y) => {
|
|
320
|
-
const k =
|
|
320
|
+
const k = u.value[y];
|
|
321
321
|
return {
|
|
322
322
|
transform: `scale(${k.scale}) translate(${k.translateX}px, ${k.translateY}px)`,
|
|
323
|
-
transition:
|
|
323
|
+
transition: a.value ? "none" : "transform 0.1s ease",
|
|
324
324
|
opacity: k.isLoaded ? 1 : 0
|
|
325
325
|
};
|
|
326
|
-
},
|
|
326
|
+
}, $ = (y) => {
|
|
327
327
|
const k = event.target;
|
|
328
|
-
|
|
329
|
-
...
|
|
328
|
+
u.value[y] = {
|
|
329
|
+
...u.value[y],
|
|
330
330
|
naturalWidth: k.naturalWidth,
|
|
331
331
|
naturalHeight: k.naturalHeight,
|
|
332
332
|
isLoaded: !0
|
|
333
333
|
};
|
|
334
|
-
}, B = (y) => {
|
|
335
|
-
y.target.tagName === "IMG" ? (n.value = !0, f.value = y.clientX - h.value[r.value].translateX, a.value = y.clientY - h.value[r.value].translateY) : (u.value = !0, f.value = y.clientX - d.value), y.preventDefault();
|
|
336
334
|
}, O = (y) => {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
y.target.tagName === "IMG" ? (a.value = !0, p.value = y.clientX - u.value[t.value].translateX, l.value = y.clientY - u.value[t.value].translateY) : (c.value = !0, p.value = y.clientX - o.value), y.preventDefault();
|
|
336
|
+
}, T = (y) => {
|
|
337
|
+
if (a.value) {
|
|
338
|
+
const k = y.clientX - p.value, A = y.clientY - l.value;
|
|
339
|
+
u.value[t.value] = {
|
|
340
|
+
...u.value[t.value],
|
|
341
341
|
translateX: k,
|
|
342
342
|
translateY: A
|
|
343
343
|
};
|
|
344
|
-
} else if (
|
|
345
|
-
const k = y.clientX -
|
|
346
|
-
|
|
344
|
+
} else if (c.value && i.enableSwipe) {
|
|
345
|
+
const k = y.clientX - p.value;
|
|
346
|
+
o.value = k;
|
|
347
347
|
}
|
|
348
|
-
},
|
|
349
|
-
if (
|
|
350
|
-
const y =
|
|
351
|
-
Math.abs(
|
|
348
|
+
}, M = () => {
|
|
349
|
+
if (c.value && i.enableSwipe) {
|
|
350
|
+
const y = s.value * 0.3;
|
|
351
|
+
Math.abs(o.value + t.value * s.value) > y ? o.value > 0 ? x() : S() : w();
|
|
352
352
|
}
|
|
353
|
-
|
|
353
|
+
c.value = !1, a.value = !1;
|
|
354
354
|
}, P = (y) => {
|
|
355
355
|
const k = y.touches[0];
|
|
356
|
-
|
|
357
|
-
},
|
|
356
|
+
g.value = k.clientX, _.value = k.clientY, d.value = Date.now();
|
|
357
|
+
}, L = (y) => {
|
|
358
358
|
const k = y.touches[0];
|
|
359
|
-
|
|
360
|
-
const A =
|
|
359
|
+
m.value = k.clientX, e.value = k.clientY;
|
|
360
|
+
const A = m.value - g.value, N = e.value - _.value;
|
|
361
361
|
if (Math.abs(A) > Math.abs(N))
|
|
362
|
-
y.preventDefault(),
|
|
363
|
-
else if (
|
|
364
|
-
y.preventDefault(),
|
|
365
|
-
const D = A +
|
|
366
|
-
|
|
367
|
-
...
|
|
362
|
+
y.preventDefault(), c.value = !0, o.value = -t.value * s.value + A;
|
|
363
|
+
else if (u.value[t.value].scale > 1) {
|
|
364
|
+
y.preventDefault(), a.value = !0;
|
|
365
|
+
const D = A + u.value[t.value].translateX, V = N + u.value[t.value].translateY;
|
|
366
|
+
u.value[t.value] = {
|
|
367
|
+
...u.value[t.value],
|
|
368
368
|
translateX: D,
|
|
369
|
-
translateY:
|
|
369
|
+
translateY: V
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
},
|
|
373
|
-
if (
|
|
374
|
-
const y =
|
|
375
|
-
Math.abs(y) > A || N > 0.5 ? y > 0 ?
|
|
372
|
+
}, I = () => {
|
|
373
|
+
if (c.value) {
|
|
374
|
+
const y = m.value - g.value, k = Date.now() - d.value, A = s.value * 0.2, N = Math.abs(y) / k;
|
|
375
|
+
Math.abs(y) > A || N > 0.5 ? y > 0 ? x() : S() : w();
|
|
376
376
|
}
|
|
377
|
-
|
|
377
|
+
c.value = !1, a.value = !1;
|
|
378
378
|
}, F = (y, k) => {
|
|
379
|
-
if (k !==
|
|
379
|
+
if (k !== t.value) return;
|
|
380
380
|
y.preventDefault();
|
|
381
381
|
const A = y.deltaY > 0 ? -0.1 : 0.1, N = y.clientX, D = y.clientY;
|
|
382
382
|
W(N, D, A);
|
|
383
383
|
}, W = (y, k, A) => {
|
|
384
|
-
const N =
|
|
385
|
-
|
|
386
|
-
Math.min(
|
|
387
|
-
),
|
|
388
|
-
|
|
384
|
+
const N = u.value[t.value], D = Math.max(
|
|
385
|
+
i.minScale,
|
|
386
|
+
Math.min(i.maxScale, N.scale + A)
|
|
387
|
+
), V = event.target.getBoundingClientRect(), R = y - V.left, j = k - V.top, z = D - N.scale, H = N.translateX + (R - N.translateX) * (z / N.scale), U = N.translateY + (j - N.translateY) * (z / N.scale);
|
|
388
|
+
u.value[t.value] = {
|
|
389
389
|
...N,
|
|
390
390
|
scale: D,
|
|
391
391
|
translateX: H,
|
|
392
392
|
translateY: U
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
return (y, k) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
396
|
-
|
|
397
|
-
createElementVNode("span", _hoisted_3$
|
|
395
|
+
return (y, k) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
396
|
+
n.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
397
|
+
createElementVNode("span", _hoisted_3$5, toDisplayString(t.value + 1) + "/" + toDisplayString(n.images.length), 1)
|
|
398
398
|
])) : createCommentVNode("", !0),
|
|
399
|
-
|
|
399
|
+
n.showCloseBtn ? (openBlock(), createElementBlock("button", {
|
|
400
400
|
key: 1,
|
|
401
401
|
class: "close-btn",
|
|
402
|
-
onClick: k[0] || (k[0] = (A) =>
|
|
402
|
+
onClick: k[0] || (k[0] = (A) => r("close"))
|
|
403
403
|
}, [...k[1] || (k[1] = [
|
|
404
404
|
createElementVNode("svg", {
|
|
405
405
|
width: "24",
|
|
@@ -423,21 +423,21 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
423
423
|
})
|
|
424
424
|
], -1)
|
|
425
425
|
])])) : createCommentVNode("", !0),
|
|
426
|
-
createElementVNode("div", _hoisted_4$
|
|
426
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
427
427
|
createElementVNode("div", {
|
|
428
428
|
class: "swiper-wrapper",
|
|
429
429
|
ref_key: "swiperWrapper",
|
|
430
|
-
ref:
|
|
431
|
-
style: normalizeStyle(
|
|
430
|
+
ref: h,
|
|
431
|
+
style: normalizeStyle(E.value),
|
|
432
432
|
onTouchstart: P,
|
|
433
|
-
onTouchmove:
|
|
434
|
-
onTouchend:
|
|
435
|
-
onMousedown:
|
|
436
|
-
onMousemove:
|
|
437
|
-
onMouseup:
|
|
438
|
-
onMouseleave:
|
|
433
|
+
onTouchmove: L,
|
|
434
|
+
onTouchend: I,
|
|
435
|
+
onMousedown: O,
|
|
436
|
+
onMousemove: T,
|
|
437
|
+
onMouseup: M,
|
|
438
|
+
onMouseleave: M
|
|
439
439
|
}, [
|
|
440
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
440
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.images, (A, N) => (openBlock(), createElementBlock("div", {
|
|
441
441
|
key: N,
|
|
442
442
|
class: "swiper-slide",
|
|
443
443
|
style: normalizeStyle(v.value)
|
|
@@ -451,17 +451,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
451
451
|
alt: "Preview image",
|
|
452
452
|
class: "preview-image",
|
|
453
453
|
style: normalizeStyle(C(N)),
|
|
454
|
-
onLoad: (D) =>
|
|
454
|
+
onLoad: (D) => $(N),
|
|
455
455
|
loading: "lazy"
|
|
456
|
-
}, null, 44, _hoisted_6$
|
|
457
|
-
], 40, _hoisted_5$
|
|
456
|
+
}, null, 44, _hoisted_6$3)
|
|
457
|
+
], 40, _hoisted_5$3)
|
|
458
458
|
], 4))), 128))
|
|
459
459
|
], 36)
|
|
460
460
|
]),
|
|
461
461
|
createElementVNode("button", {
|
|
462
462
|
class: "nav-btn prev-btn",
|
|
463
|
-
onClick:
|
|
464
|
-
disabled:
|
|
463
|
+
onClick: x,
|
|
464
|
+
disabled: t.value === 0
|
|
465
465
|
}, [...k[2] || (k[2] = [
|
|
466
466
|
createElementVNode("svg", {
|
|
467
467
|
width: "24",
|
|
@@ -473,11 +473,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
473
473
|
}, [
|
|
474
474
|
createElementVNode("polyline", { points: "15 18 9 12 15 6" })
|
|
475
475
|
], -1)
|
|
476
|
-
])], 8, _hoisted_7$
|
|
476
|
+
])], 8, _hoisted_7$3),
|
|
477
477
|
createElementVNode("button", {
|
|
478
478
|
class: "nav-btn next-btn",
|
|
479
479
|
onClick: S,
|
|
480
|
-
disabled:
|
|
480
|
+
disabled: t.value === n.images.length - 1
|
|
481
481
|
}, [...k[3] || (k[3] = [
|
|
482
482
|
createElementVNode("svg", {
|
|
483
483
|
width: "24",
|
|
@@ -489,10 +489,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
489
489
|
}, [
|
|
490
490
|
createElementVNode("polyline", { points: "9 18 15 12 9 6" })
|
|
491
491
|
], -1)
|
|
492
|
-
])], 8, _hoisted_8)
|
|
492
|
+
])], 8, _hoisted_8$1)
|
|
493
493
|
]));
|
|
494
494
|
}
|
|
495
|
-
}, _sfc_main$
|
|
495
|
+
}, _sfc_main$7 = {
|
|
496
496
|
__name: "hbis-auto-scroll-list",
|
|
497
497
|
props: {
|
|
498
498
|
// 列表数据数组
|
|
@@ -509,7 +509,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
509
509
|
direction: {
|
|
510
510
|
type: String,
|
|
511
511
|
default: "vertical",
|
|
512
|
-
validator: (
|
|
512
|
+
validator: (n) => ["vertical", "horizontal"].includes(n)
|
|
513
513
|
},
|
|
514
514
|
// 鼠标悬停是否暂停
|
|
515
515
|
pauseOnHover: {
|
|
@@ -553,16 +553,16 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
553
553
|
}
|
|
554
554
|
},
|
|
555
555
|
emits: ["scroll", "pause", "resume", "dragStart", "dragEnd"],
|
|
556
|
-
setup(
|
|
557
|
-
const
|
|
556
|
+
setup(n, { expose: b, emit: i }) {
|
|
557
|
+
const r = n, t = i, h = ref(null), c = ref(null), a = ref(!1), p = ref(null), l = ref(0), o = ref([]), s = ref(!1), f = ref(0), u = ref(0), g = ref(0), _ = ref(!1), d = computed(() => ({
|
|
558
558
|
// 动态设置容器高度和宽度
|
|
559
|
-
height: typeof
|
|
560
|
-
width: typeof
|
|
559
|
+
height: typeof r.containerHeight == "number" ? `${r.containerHeight}px` : r.containerHeight,
|
|
560
|
+
width: typeof r.containerWidth == "number" ? `${r.containerWidth}px` : r.containerWidth,
|
|
561
561
|
overflow: "hidden",
|
|
562
562
|
// 隐藏超出部分
|
|
563
563
|
position: "relative"
|
|
564
564
|
// 相对定位,为绝对定位的内容容器提供参考
|
|
565
|
-
})),
|
|
565
|
+
})), m = computed(() => {
|
|
566
566
|
const y = {
|
|
567
567
|
with: "100%",
|
|
568
568
|
position: "absolute",
|
|
@@ -572,170 +572,170 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
572
572
|
willChange: "transform"
|
|
573
573
|
// 告诉浏览器将要变化的属性,优化性能
|
|
574
574
|
};
|
|
575
|
-
return
|
|
575
|
+
return r.direction === "vertical" ? y.transform = `translateY(${l.value}px)` : y.transform = `translateX(${l.value}px)`, y;
|
|
576
576
|
}), e = () => {
|
|
577
|
-
if (!
|
|
578
|
-
|
|
577
|
+
if (!r.data || r.data.length === 0) {
|
|
578
|
+
o.value = [];
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
|
-
|
|
582
|
-
},
|
|
583
|
-
if (
|
|
584
|
-
|
|
581
|
+
r.loop ? o.value = [...r.data, ...r.data] : o.value = [...r.data];
|
|
582
|
+
}, E = () => {
|
|
583
|
+
if (a.value || s.value) {
|
|
584
|
+
p.value = requestAnimationFrame(E);
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
|
-
const y =
|
|
587
|
+
const y = h.value, k = c.value;
|
|
588
588
|
if (!y || !k) {
|
|
589
|
-
|
|
589
|
+
p.value = requestAnimationFrame(E);
|
|
590
590
|
return;
|
|
591
591
|
}
|
|
592
|
-
const A =
|
|
593
|
-
if (
|
|
594
|
-
Math.abs(
|
|
592
|
+
const A = r.direction === "vertical" ? y.offsetHeight : y.offsetWidth, D = (r.direction === "vertical" ? r.itemHeight : r.itemWidth) * r.data.length;
|
|
593
|
+
if (l.value -= r.speed, r.loop)
|
|
594
|
+
Math.abs(l.value) >= D && (l.value = 0);
|
|
595
595
|
else {
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
|
|
596
|
+
const V = -(D - A);
|
|
597
|
+
if (l.value <= V) {
|
|
598
|
+
l.value = V, a.value = !0, t("scroll", l.value);
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
|
|
602
|
+
t("scroll", l.value), p.value = requestAnimationFrame(E);
|
|
603
603
|
}, v = () => {
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
|
|
607
|
-
},
|
|
608
|
-
|
|
604
|
+
p.value && cancelAnimationFrame(p.value), p.value = requestAnimationFrame(E);
|
|
605
|
+
}, w = () => {
|
|
606
|
+
p.value && (cancelAnimationFrame(p.value), p.value = null);
|
|
607
|
+
}, x = () => {
|
|
608
|
+
a.value = !0, t("pause");
|
|
609
609
|
}, S = () => {
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
|
|
610
|
+
a.value = !1, t("resume");
|
|
611
|
+
}, B = () => {
|
|
612
|
+
r.pauseOnHover && x();
|
|
613
613
|
}, C = () => {
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
},
|
|
618
|
-
if (!
|
|
619
|
-
|
|
620
|
-
const k =
|
|
621
|
-
|
|
622
|
-
const A =
|
|
614
|
+
r.pauseOnHover && !s.value && S();
|
|
615
|
+
}, $ = (y) => {
|
|
616
|
+
s.value = !0, _.value = a.value, a.value = !0, f.value = r.direction === "vertical" ? y.clientY : y.clientX, u.value = f.value, g.value = l.value, t("dragStart"), document.addEventListener("mousemove", O), document.addEventListener("mouseup", T);
|
|
617
|
+
}, O = (y) => {
|
|
618
|
+
if (!s.value) return;
|
|
619
|
+
u.value = r.direction === "vertical" ? y.clientY : y.clientX;
|
|
620
|
+
const k = u.value - f.value;
|
|
621
|
+
l.value = g.value + k;
|
|
622
|
+
const A = h.value, N = c.value;
|
|
623
623
|
if (A && N) {
|
|
624
|
-
const D =
|
|
625
|
-
if (
|
|
626
|
-
|
|
624
|
+
const D = r.direction === "vertical" ? A.offsetHeight : A.offsetWidth, R = (r.direction === "vertical" ? r.itemHeight : r.itemWidth) * r.data.length;
|
|
625
|
+
if (r.loop)
|
|
626
|
+
l.value > 0 ? l.value = 0 : Math.abs(l.value) > R && (l.value = -R);
|
|
627
627
|
else {
|
|
628
|
-
const
|
|
629
|
-
|
|
628
|
+
const j = -(R - D);
|
|
629
|
+
l.value > 0 ? l.value = 0 : l.value < j && (l.value = j);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
|
|
633
|
-
},
|
|
634
|
-
|
|
635
|
-
},
|
|
632
|
+
t("scroll", l.value);
|
|
633
|
+
}, T = () => {
|
|
634
|
+
s.value && (s.value = !1, document.removeEventListener("mousemove", O), document.removeEventListener("mouseup", T), _.value || (a.value = !1), t("dragEnd"));
|
|
635
|
+
}, M = (y) => {
|
|
636
636
|
const k = y.touches[0];
|
|
637
|
-
|
|
637
|
+
s.value = !0, _.value = a.value, a.value = !0, f.value = r.direction === "vertical" ? k.clientY : k.clientX, u.value = f.value, g.value = l.value, t("dragStart");
|
|
638
638
|
}, P = (y) => {
|
|
639
|
-
if (!
|
|
639
|
+
if (!s.value) return;
|
|
640
640
|
y.preventDefault();
|
|
641
641
|
const k = y.touches[0];
|
|
642
|
-
|
|
643
|
-
const A =
|
|
644
|
-
|
|
645
|
-
const N =
|
|
642
|
+
u.value = r.direction === "vertical" ? k.clientY : k.clientX;
|
|
643
|
+
const A = u.value - f.value;
|
|
644
|
+
l.value = g.value + A;
|
|
645
|
+
const N = h.value, D = c.value;
|
|
646
646
|
if (N && D) {
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
|
|
647
|
+
const V = r.direction === "vertical" ? N.offsetHeight : N.offsetWidth, j = (r.direction === "vertical" ? r.itemHeight : r.itemWidth) * r.data.length;
|
|
648
|
+
if (r.loop)
|
|
649
|
+
l.value > 0 ? l.value = 0 : Math.abs(l.value) > j && (l.value = -j);
|
|
650
650
|
else {
|
|
651
|
-
const z = -(
|
|
652
|
-
|
|
651
|
+
const z = -(j - V);
|
|
652
|
+
l.value > 0 ? l.value = 0 : l.value < z && (l.value = z);
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
|
|
656
|
-
},
|
|
657
|
-
|
|
658
|
-
},
|
|
659
|
-
|
|
655
|
+
t("scroll", l.value);
|
|
656
|
+
}, L = () => {
|
|
657
|
+
s.value && (s.value = !1, _.value || (a.value = !1), t("dragEnd"));
|
|
658
|
+
}, I = (y) => {
|
|
659
|
+
l.value = y;
|
|
660
660
|
}, F = () => {
|
|
661
|
-
|
|
661
|
+
l.value = 0;
|
|
662
662
|
}, W = () => {
|
|
663
|
-
const y =
|
|
663
|
+
const y = h.value;
|
|
664
664
|
if (y) {
|
|
665
|
-
const k =
|
|
665
|
+
const k = c.value;
|
|
666
666
|
if (k) {
|
|
667
|
-
const A =
|
|
668
|
-
|
|
667
|
+
const A = r.direction === "vertical" ? k.offsetHeight : k.offsetWidth;
|
|
668
|
+
l.value = -(A - y.offsetHeight);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
return watch(() =>
|
|
673
|
-
e(),
|
|
674
|
-
}, { deep: !0 }), watch(() =>
|
|
675
|
-
|
|
672
|
+
return watch(() => r.data, () => {
|
|
673
|
+
e(), l.value = 0;
|
|
674
|
+
}, { deep: !0 }), watch(() => r.speed, () => {
|
|
675
|
+
a.value || (w(), v());
|
|
676
676
|
}), onMounted(() => {
|
|
677
677
|
e(), nextTick(() => {
|
|
678
678
|
v();
|
|
679
|
-
const y =
|
|
680
|
-
y && (y.addEventListener("mouseenter",
|
|
679
|
+
const y = h.value;
|
|
680
|
+
y && (y.addEventListener("mouseenter", B), y.addEventListener("mouseleave", C));
|
|
681
681
|
});
|
|
682
682
|
}), onUnmounted(() => {
|
|
683
|
-
|
|
684
|
-
const y =
|
|
685
|
-
y && (y.removeEventListener("mouseenter",
|
|
686
|
-
}),
|
|
687
|
-
pause:
|
|
683
|
+
w();
|
|
684
|
+
const y = h.value;
|
|
685
|
+
y && (y.removeEventListener("mouseenter", B), y.removeEventListener("mouseleave", C)), document.removeEventListener("mousemove", O), document.removeEventListener("mouseup", T);
|
|
686
|
+
}), b({
|
|
687
|
+
pause: x,
|
|
688
688
|
// 暂停滚动
|
|
689
689
|
resume: S,
|
|
690
690
|
// 恢复滚动
|
|
691
|
-
scrollTo:
|
|
691
|
+
scrollTo: I,
|
|
692
692
|
// 滚动到指定位置
|
|
693
693
|
scrollToTop: F,
|
|
694
694
|
// 滚动到顶部
|
|
695
695
|
scrollToBottom: W,
|
|
696
696
|
// 滚动到底部
|
|
697
|
-
isPaused:
|
|
697
|
+
isPaused: a,
|
|
698
698
|
// 是否暂停(响应式)
|
|
699
|
-
isDragging:
|
|
699
|
+
isDragging: s
|
|
700
700
|
// 是否正在拖拽(响应式)
|
|
701
701
|
}), (y, k) => (openBlock(), createElementBlock("div", {
|
|
702
702
|
class: "hbis-auto-scroll-list",
|
|
703
703
|
ref_key: "containerRef",
|
|
704
|
-
ref:
|
|
705
|
-
style: normalizeStyle(
|
|
706
|
-
onMousedown:
|
|
707
|
-
onTouchstart:
|
|
704
|
+
ref: h,
|
|
705
|
+
style: normalizeStyle(d.value),
|
|
706
|
+
onMousedown: $,
|
|
707
|
+
onTouchstart: M,
|
|
708
708
|
onTouchmove: P,
|
|
709
|
-
onTouchend:
|
|
709
|
+
onTouchend: L
|
|
710
710
|
}, [
|
|
711
711
|
createElementVNode("div", {
|
|
712
712
|
class: "scroll-content",
|
|
713
713
|
ref_key: "contentRef",
|
|
714
|
-
ref:
|
|
715
|
-
style: normalizeStyle(
|
|
714
|
+
ref: c,
|
|
715
|
+
style: normalizeStyle(m.value)
|
|
716
716
|
}, [
|
|
717
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
717
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (A, N) => renderSlot(y.$slots, "item", {
|
|
718
718
|
item: A,
|
|
719
719
|
index: N
|
|
720
720
|
}, () => [
|
|
721
721
|
createElementVNode("div", {
|
|
722
722
|
class: "default-item",
|
|
723
|
-
style: normalizeStyle(
|
|
723
|
+
style: normalizeStyle(n.itemStyle)
|
|
724
724
|
}, toDisplayString(A), 5)
|
|
725
725
|
], !0)), 256))
|
|
726
726
|
], 4)
|
|
727
727
|
], 36));
|
|
728
728
|
}
|
|
729
|
-
}, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
729
|
+
}, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-5b76d8eb"]]), _hoisted_1$5 = {
|
|
730
730
|
key: 0,
|
|
731
731
|
class: "circular-spinner"
|
|
732
|
-
}, _hoisted_2$
|
|
732
|
+
}, _hoisted_2$4 = {
|
|
733
733
|
key: 1,
|
|
734
734
|
class: "dots-spinner"
|
|
735
|
-
}, _hoisted_3$
|
|
735
|
+
}, _hoisted_3$4 = {
|
|
736
736
|
key: 2,
|
|
737
737
|
class: "bars-spinner"
|
|
738
|
-
}, _sfc_main$
|
|
738
|
+
}, _sfc_main$6 = {
|
|
739
739
|
__name: "hbis-loading",
|
|
740
740
|
props: {
|
|
741
741
|
// 控制加载组件是否显示
|
|
@@ -770,55 +770,55 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
770
770
|
}
|
|
771
771
|
},
|
|
772
772
|
emits: ["update:visible", "close"],
|
|
773
|
-
setup(
|
|
774
|
-
const
|
|
775
|
-
|
|
773
|
+
setup(n, { expose: b, emit: i }) {
|
|
774
|
+
const r = n, t = i, h = () => {
|
|
775
|
+
r.touchDismiss && (t("update:visible", !1), t("close"));
|
|
776
776
|
};
|
|
777
|
-
return watch(() =>
|
|
778
|
-
|
|
777
|
+
return watch(() => r.visible, (c) => {
|
|
778
|
+
c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
779
779
|
}), onUnmounted(() => {
|
|
780
780
|
document.body.style.overflow = "";
|
|
781
|
-
}),
|
|
782
|
-
show: () =>
|
|
781
|
+
}), b({
|
|
782
|
+
show: () => t("update:visible", !0),
|
|
783
783
|
hide: () => {
|
|
784
|
-
|
|
784
|
+
t("update:visible", !1), t("close");
|
|
785
785
|
}
|
|
786
|
-
}), (
|
|
786
|
+
}), (c, a) => n.visible ? (openBlock(), createElementBlock("div", {
|
|
787
787
|
key: 0,
|
|
788
|
-
class: normalizeClass(["hbis-loading-container", { "touch-dismissible":
|
|
789
|
-
onClick:
|
|
788
|
+
class: normalizeClass(["hbis-loading-container", { "touch-dismissible": n.touchDismiss }]),
|
|
789
|
+
onClick: h
|
|
790
790
|
}, [
|
|
791
791
|
createElementVNode("div", {
|
|
792
792
|
class: "hbis-loading-wrapper",
|
|
793
|
-
onClick:
|
|
793
|
+
onClick: a[0] || (a[0] = withModifiers(() => {
|
|
794
794
|
}, ["stop"]))
|
|
795
795
|
}, [
|
|
796
|
-
renderSlot(
|
|
796
|
+
renderSlot(c.$slots, "spinner", {}, () => [
|
|
797
797
|
createElementVNode("div", {
|
|
798
|
-
class: normalizeClass(["hbis-loading-spinner",
|
|
798
|
+
class: normalizeClass(["hbis-loading-spinner", n.spinnerType])
|
|
799
799
|
}, [
|
|
800
|
-
|
|
800
|
+
n.spinnerType === "circular" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [...a[1] || (a[1] = [
|
|
801
801
|
createElementVNode("div", { class: "circle" }, null, -1)
|
|
802
|
-
])])) :
|
|
802
|
+
])])) : n.spinnerType === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$4, [...a[2] || (a[2] = [
|
|
803
803
|
createElementVNode("div", { class: "dot" }, null, -1),
|
|
804
804
|
createElementVNode("div", { class: "dot" }, null, -1),
|
|
805
805
|
createElementVNode("div", { class: "dot" }, null, -1)
|
|
806
|
-
])])) :
|
|
806
|
+
])])) : n.spinnerType === "bars" ? (openBlock(), createElementBlock("div", _hoisted_3$4, [...a[3] || (a[3] = [
|
|
807
807
|
createElementVNode("div", { class: "bar" }, null, -1),
|
|
808
808
|
createElementVNode("div", { class: "bar" }, null, -1),
|
|
809
809
|
createElementVNode("div", { class: "bar" }, null, -1)
|
|
810
810
|
])])) : createCommentVNode("", !0)
|
|
811
811
|
], 2)
|
|
812
812
|
], !0),
|
|
813
|
-
|
|
813
|
+
n.text ? (openBlock(), createElementBlock("div", {
|
|
814
814
|
key: 0,
|
|
815
815
|
class: "hbis-loading-text",
|
|
816
|
-
style: normalizeStyle(
|
|
817
|
-
}, toDisplayString(
|
|
816
|
+
style: normalizeStyle(n.textStyle)
|
|
817
|
+
}, toDisplayString(n.text), 5)) : createCommentVNode("", !0)
|
|
818
818
|
])
|
|
819
819
|
], 2)) : createCommentVNode("", !0);
|
|
820
820
|
}
|
|
821
|
-
}, hbisLoading = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
821
|
+
}, hbisLoading = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-d5965f87"]]), _hoisted_1$4 = { class: "parent-view" }, _sfc_main$5 = {
|
|
822
822
|
__name: "hbis-sms-input",
|
|
823
823
|
props: {
|
|
824
824
|
/* 倒计时时间
|
|
@@ -877,56 +877,56 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
877
877
|
}
|
|
878
878
|
},
|
|
879
879
|
emits: ["custom-event"],
|
|
880
|
-
setup(
|
|
881
|
-
const
|
|
882
|
-
if (console.log("验证码isSendSMS:" +
|
|
883
|
-
console.log("请" +
|
|
880
|
+
setup(n, { expose: b, emit: i }) {
|
|
881
|
+
const r = n, t = i, h = ref(!0), c = ref(""), a = ref(r.countDownTime), p = () => {
|
|
882
|
+
if (console.log("验证码isSendSMS:" + h.value), !h.value) {
|
|
883
|
+
console.log("请" + r.countDownTime + "秒后再重试。");
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
t("custom-event");
|
|
887
887
|
};
|
|
888
|
-
return
|
|
888
|
+
return b({
|
|
889
889
|
countDown: () => {
|
|
890
|
-
|
|
891
|
-
let
|
|
892
|
-
|
|
890
|
+
a.value = r.countDownTime;
|
|
891
|
+
let o = setInterval(() => {
|
|
892
|
+
h.value = !1, a.value--, a.value === 0 && (h.value = !0, clearInterval(o));
|
|
893
893
|
}, 1e3);
|
|
894
894
|
},
|
|
895
|
-
smsCode:
|
|
896
|
-
}), (
|
|
895
|
+
smsCode: c
|
|
896
|
+
}), (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
897
897
|
createElementVNode("div", {
|
|
898
898
|
class: "input_view_sms_code",
|
|
899
|
-
style: normalizeStyle({ background:
|
|
899
|
+
style: normalizeStyle({ background: n.inputColor })
|
|
900
900
|
}, [
|
|
901
901
|
withDirectives(createElementVNode("input", {
|
|
902
902
|
type: "text",
|
|
903
903
|
class: "view_sms_code",
|
|
904
904
|
"placeholder-style": "color:#999",
|
|
905
905
|
placeholder: "请输入验证码",
|
|
906
|
-
"onUpdate:modelValue":
|
|
907
|
-
style: normalizeStyle({ color:
|
|
906
|
+
"onUpdate:modelValue": s[0] || (s[0] = (f) => c.value = f),
|
|
907
|
+
style: normalizeStyle({ color: n.inputTextColor })
|
|
908
908
|
}, null, 4), [
|
|
909
|
-
[vModelText,
|
|
909
|
+
[vModelText, c.value]
|
|
910
910
|
]),
|
|
911
|
-
|
|
911
|
+
h.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
|
|
912
912
|
key: 0,
|
|
913
|
-
class: normalizeClass(["sms_code_btn", { disabled: !
|
|
914
|
-
style: normalizeStyle({ color:
|
|
915
|
-
onClick:
|
|
916
|
-
}, toDisplayString(
|
|
917
|
-
|
|
913
|
+
class: normalizeClass(["sms_code_btn", { disabled: !h.value }]),
|
|
914
|
+
style: normalizeStyle({ color: n.smsCodeBtnTextColor, background: n.smsCodeBtnColor }),
|
|
915
|
+
onClick: p
|
|
916
|
+
}, toDisplayString(a.value) + " " + toDisplayString(n.smsCodeTimeText), 7)),
|
|
917
|
+
h.value ? (openBlock(), createElementBlock("div", {
|
|
918
918
|
key: 1,
|
|
919
919
|
class: "sms_code_btn",
|
|
920
|
-
style: normalizeStyle({ color:
|
|
921
|
-
onClick:
|
|
922
|
-
}, toDisplayString(
|
|
920
|
+
style: normalizeStyle({ color: n.smsCodeBtnTextColor, background: n.smsCodeBtnColor }),
|
|
921
|
+
onClick: p
|
|
922
|
+
}, toDisplayString(n.smsCodeBtnText), 5)) : createCommentVNode("", !0)
|
|
923
923
|
], 4)
|
|
924
924
|
]));
|
|
925
925
|
}
|
|
926
|
-
}, HbisSmsInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
926
|
+
}, HbisSmsInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3eedbbcc"]]), _hoisted_1$3 = { class: "waterfall-debug" }, _hoisted_2$3 = { class: "waterfall-container" }, _hoisted_3$3 = { class: "column-debug" }, _hoisted_4$3 = {
|
|
927
927
|
key: 0,
|
|
928
928
|
class: "waterfall-item-with-slot"
|
|
929
|
-
}, _hoisted_5$
|
|
929
|
+
}, _hoisted_5$2 = ["src"], _hoisted_6$2 = { class: "waterfall-content" }, _hoisted_7$2 = ["src"], _sfc_main$4 = /* @__PURE__ */ Object.assign({
|
|
930
930
|
name: "HbisWaterfall"
|
|
931
931
|
}, {
|
|
932
932
|
__name: "hbis-waterfall",
|
|
@@ -944,7 +944,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
944
944
|
column: {
|
|
945
945
|
type: Number,
|
|
946
946
|
default: 2,
|
|
947
|
-
validator: (
|
|
947
|
+
validator: (n) => n >= 2
|
|
948
948
|
},
|
|
949
949
|
/**
|
|
950
950
|
* 最大列数
|
|
@@ -983,101 +983,101 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
983
983
|
}
|
|
984
984
|
},
|
|
985
985
|
emits: ["load", "error"],
|
|
986
|
-
setup(
|
|
987
|
-
const
|
|
986
|
+
setup(n, { expose: b, emit: i }) {
|
|
987
|
+
const r = useSlots(), t = ref(null), h = n, c = i;
|
|
988
988
|
useCssVars(() => ({
|
|
989
|
-
columnGap: String(
|
|
990
|
-
rowGap: String(
|
|
989
|
+
columnGap: String(h.columnGap) + "px",
|
|
990
|
+
rowGap: String(h.rowGap) + "px"
|
|
991
991
|
}));
|
|
992
|
-
const
|
|
993
|
-
console.log("开始分配数据,总数据量:",
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
const
|
|
997
|
-
for (let
|
|
998
|
-
|
|
992
|
+
const a = ref([]), p = ref(2), l = computed(() => r.default !== void 0), o = (g) => (t.value && t.value.offsetWidth, Math.min(h.column, h.maxColumn), parseInt(h.columnGap), parseInt(h.rowGap), 200 + Math.floor(Math.random() * 100) + 20), s = () => {
|
|
993
|
+
console.log("开始分配数据,总数据量:", h.data.length);
|
|
994
|
+
const g = Math.min(h.column, h.maxColumn);
|
|
995
|
+
p.value = g;
|
|
996
|
+
const _ = [];
|
|
997
|
+
for (let d = 0; d < g; d++)
|
|
998
|
+
_.push({
|
|
999
999
|
items: [],
|
|
1000
1000
|
height: 0
|
|
1001
1001
|
});
|
|
1002
|
-
|
|
1003
|
-
const e =
|
|
1004
|
-
let
|
|
1005
|
-
for (let
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}), console.log("分配完成,各列数据量:",
|
|
1009
|
-
},
|
|
1010
|
-
|
|
1011
|
-
},
|
|
1012
|
-
|
|
1002
|
+
a.value = _, h.data.forEach((d, m) => {
|
|
1003
|
+
const e = o();
|
|
1004
|
+
let E = 1 / 0, v = 0;
|
|
1005
|
+
for (let w = 0; w < g; w++)
|
|
1006
|
+
a.value[w].height < E && (E = a.value[w].height, v = w);
|
|
1007
|
+
a.value[v].items.push(d), a.value[v].height += e, console.log("分配数据到列:", { itemIndex: m, columnIndex: v, itemHeight: e, columnHeight: a.value[v].height });
|
|
1008
|
+
}), console.log("分配完成,各列数据量:", a.value.map((d, m) => `列${m + 1}: ${d.items.length}个`)), console.log("分配完成,各列高度:", a.value.map((d, m) => `列${m + 1}: ${d.height}px`));
|
|
1009
|
+
}, f = (g) => {
|
|
1010
|
+
c("load", g);
|
|
1011
|
+
}, u = (g) => {
|
|
1012
|
+
c("error", g);
|
|
1013
1013
|
};
|
|
1014
|
-
return watch(() =>
|
|
1015
|
-
console.log("数据变化,重新分配数据"),
|
|
1016
|
-
}, { deep: !0 }), watch(() => [
|
|
1017
|
-
console.log("列数变化,更新列数"),
|
|
1018
|
-
}), watch(() => [
|
|
1019
|
-
console.log("间距变化,重新计算高度和分配数据"),
|
|
1014
|
+
return watch(() => h.data, () => {
|
|
1015
|
+
console.log("数据变化,重新分配数据"), s();
|
|
1016
|
+
}, { deep: !0 }), watch(() => [h.column, h.maxColumn], () => {
|
|
1017
|
+
console.log("列数变化,更新列数"), p.value = Math.min(h.column, h.maxColumn), s();
|
|
1018
|
+
}), watch(() => [h.columnGap, h.rowGap], () => {
|
|
1019
|
+
console.log("间距变化,重新计算高度和分配数据"), s();
|
|
1020
1020
|
}), onMounted(() => {
|
|
1021
|
-
console.log("===== 组件挂载 ====="), console.log("组件挂载,初始化数据"), console.log("初始数据量:",
|
|
1021
|
+
console.log("===== 组件挂载 ====="), console.log("组件挂载,初始化数据"), console.log("初始数据量:", h.data.length);
|
|
1022
1022
|
try {
|
|
1023
|
-
|
|
1024
|
-
} catch (
|
|
1025
|
-
console.error("refresh函数执行失败:",
|
|
1023
|
+
s(), console.log("===== 组件挂载完成 =====");
|
|
1024
|
+
} catch (g) {
|
|
1025
|
+
console.error("refresh函数执行失败:", g), console.log("===== 组件挂载失败 =====");
|
|
1026
1026
|
}
|
|
1027
|
-
}),
|
|
1028
|
-
refresh:
|
|
1029
|
-
}), (
|
|
1027
|
+
}), b({
|
|
1028
|
+
refresh: s
|
|
1029
|
+
}), (g, _) => (openBlock(), createElementBlock("div", {
|
|
1030
1030
|
ref_key: "waterfallRef",
|
|
1031
|
-
ref:
|
|
1031
|
+
ref: t
|
|
1032
1032
|
}, [
|
|
1033
|
-
createElementVNode("div", _hoisted_1$
|
|
1034
|
-
createTextVNode(" 列数: " + toDisplayString(
|
|
1035
|
-
|
|
1036
|
-
createTextVNode(" 数据总量: " + toDisplayString(
|
|
1037
|
-
|
|
1038
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1039
|
-
createTextVNode(" 列" + toDisplayString(
|
|
1040
|
-
|
|
1033
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
1034
|
+
createTextVNode(" 列数: " + toDisplayString(p.value) + " ", 1),
|
|
1035
|
+
_[1] || (_[1] = createElementVNode("br", null, null, -1)),
|
|
1036
|
+
createTextVNode(" 数据总量: " + toDisplayString(n.data.length) + " ", 1),
|
|
1037
|
+
_[2] || (_[2] = createElementVNode("br", null, null, -1)),
|
|
1038
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (d, m) => (openBlock(), createElementBlock(Fragment, { key: m }, [
|
|
1039
|
+
createTextVNode(" 列" + toDisplayString(m + 1) + "数据量: " + toDisplayString(d.items.length), 1),
|
|
1040
|
+
_[0] || (_[0] = createElementVNode("br", null, null, -1))
|
|
1041
1041
|
], 64))), 128))
|
|
1042
1042
|
]),
|
|
1043
|
-
createElementVNode("div", _hoisted_2$
|
|
1044
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1045
|
-
key:
|
|
1043
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
1044
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (d, m) => (openBlock(), createElementBlock("div", {
|
|
1045
|
+
key: m,
|
|
1046
1046
|
class: "waterfall-column"
|
|
1047
1047
|
}, [
|
|
1048
|
-
createElementVNode("div", _hoisted_3$
|
|
1049
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1050
|
-
key: e[
|
|
1048
|
+
createElementVNode("div", _hoisted_3$3, " 列" + toDisplayString(m + 1) + ": " + toDisplayString(d.items.length) + "个元素 ", 1),
|
|
1049
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.items, (e, E) => (openBlock(), createElementBlock("div", {
|
|
1050
|
+
key: e[n.itemKey] || `col${m}-${E}`,
|
|
1051
1051
|
class: "waterfall-item"
|
|
1052
1052
|
}, [
|
|
1053
|
-
|
|
1053
|
+
l.value ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
1054
1054
|
createElementVNode("img", {
|
|
1055
|
-
src: e[
|
|
1055
|
+
src: e[n.imageKey],
|
|
1056
1056
|
class: "waterfall-image",
|
|
1057
|
-
style: normalizeStyle({ height:
|
|
1058
|
-
onLoad:
|
|
1059
|
-
onError:
|
|
1060
|
-
}, null, 44, _hoisted_5$
|
|
1061
|
-
createElementVNode("div", _hoisted_6, [
|
|
1062
|
-
renderSlot(
|
|
1057
|
+
style: normalizeStyle({ height: o() + "px" }),
|
|
1058
|
+
onLoad: f,
|
|
1059
|
+
onError: u
|
|
1060
|
+
}, null, 44, _hoisted_5$2),
|
|
1061
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
1062
|
+
renderSlot(g.$slots, "default", {
|
|
1063
1063
|
item: e,
|
|
1064
|
-
index:
|
|
1064
|
+
index: E
|
|
1065
1065
|
}, void 0, !0)
|
|
1066
1066
|
])
|
|
1067
1067
|
])) : (openBlock(), createElementBlock("img", {
|
|
1068
1068
|
key: 1,
|
|
1069
|
-
src: e[
|
|
1069
|
+
src: e[n.imageKey],
|
|
1070
1070
|
class: "waterfall-image",
|
|
1071
|
-
style: normalizeStyle({ height:
|
|
1072
|
-
onLoad:
|
|
1073
|
-
onError:
|
|
1074
|
-
}, null, 44, _hoisted_7))
|
|
1071
|
+
style: normalizeStyle({ height: o() + "px" }),
|
|
1072
|
+
onLoad: f,
|
|
1073
|
+
onError: u
|
|
1074
|
+
}, null, 44, _hoisted_7$2))
|
|
1075
1075
|
]))), 128))
|
|
1076
1076
|
]))), 128))
|
|
1077
1077
|
])
|
|
1078
1078
|
], 512));
|
|
1079
1079
|
}
|
|
1080
|
-
}), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1080
|
+
}), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-20459ccd"]]);
|
|
1081
1081
|
var svga_lite_min = { exports: {} };
|
|
1082
1082
|
/*!
|
|
1083
1083
|
* svga.lite
|
|
@@ -1088,71 +1088,71 @@ var svga_lite_min = { exports: {} };
|
|
|
1088
1088
|
* Released under the MIT License.
|
|
1089
1089
|
*/
|
|
1090
1090
|
(function(module, exports$1) {
|
|
1091
|
-
(function(
|
|
1092
|
-
module.exports =
|
|
1091
|
+
(function(n, b) {
|
|
1092
|
+
module.exports = b();
|
|
1093
1093
|
})(window, function() {
|
|
1094
|
-
return function(
|
|
1095
|
-
var
|
|
1096
|
-
function
|
|
1097
|
-
if (
|
|
1098
|
-
var
|
|
1099
|
-
return
|
|
1094
|
+
return function(n) {
|
|
1095
|
+
var b = {};
|
|
1096
|
+
function i(r) {
|
|
1097
|
+
if (b[r]) return b[r].exports;
|
|
1098
|
+
var t = b[r] = { i: r, l: !1, exports: {} };
|
|
1099
|
+
return n[r].call(t.exports, t, t.exports, i), t.l = !0, t.exports;
|
|
1100
1100
|
}
|
|
1101
|
-
return
|
|
1102
|
-
|
|
1103
|
-
},
|
|
1104
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(
|
|
1105
|
-
},
|
|
1106
|
-
if (1 &
|
|
1107
|
-
var
|
|
1108
|
-
if (
|
|
1109
|
-
return
|
|
1110
|
-
}).bind(null,
|
|
1111
|
-
return
|
|
1112
|
-
},
|
|
1113
|
-
var
|
|
1114
|
-
return
|
|
1101
|
+
return i.m = n, i.c = b, i.d = function(r, t, h) {
|
|
1102
|
+
i.o(r, t) || Object.defineProperty(r, t, { enumerable: !0, get: h });
|
|
1103
|
+
}, i.r = function(r) {
|
|
1104
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(r, "__esModule", { value: !0 });
|
|
1105
|
+
}, i.t = function(r, t) {
|
|
1106
|
+
if (1 & t && (r = i(r)), 8 & t || 4 & t && typeof r == "object" && r && r.__esModule) return r;
|
|
1107
|
+
var h = /* @__PURE__ */ Object.create(null);
|
|
1108
|
+
if (i.r(h), Object.defineProperty(h, "default", { enumerable: !0, value: r }), 2 & t && typeof r != "string") for (var c in r) i.d(h, c, (function(a) {
|
|
1109
|
+
return r[a];
|
|
1110
|
+
}).bind(null, c));
|
|
1111
|
+
return h;
|
|
1112
|
+
}, i.n = function(r) {
|
|
1113
|
+
var t = r && r.__esModule ? function() {
|
|
1114
|
+
return r.default;
|
|
1115
1115
|
} : function() {
|
|
1116
|
-
return
|
|
1116
|
+
return r;
|
|
1117
1117
|
};
|
|
1118
|
-
return
|
|
1119
|
-
},
|
|
1120
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1121
|
-
},
|
|
1122
|
-
}([function(
|
|
1123
|
-
Object.defineProperty(
|
|
1124
|
-
var
|
|
1125
|
-
this._d =
|
|
1118
|
+
return i.d(t, "a", t), t;
|
|
1119
|
+
}, i.o = function(r, t) {
|
|
1120
|
+
return Object.prototype.hasOwnProperty.call(r, t);
|
|
1121
|
+
}, i.p = "", i(i.s = 1);
|
|
1122
|
+
}([function(n, b, i) {
|
|
1123
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1124
|
+
var r = function(t, h, c) {
|
|
1125
|
+
this._d = t, this._transform = h, this._styles = c;
|
|
1126
1126
|
};
|
|
1127
|
-
|
|
1128
|
-
}, function(
|
|
1129
|
-
Object.defineProperty(
|
|
1130
|
-
var
|
|
1131
|
-
|
|
1132
|
-
}, function(
|
|
1133
|
-
Object.defineProperty(
|
|
1134
|
-
var
|
|
1135
|
-
function
|
|
1127
|
+
b.default = r;
|
|
1128
|
+
}, function(n, b, i) {
|
|
1129
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1130
|
+
var r = i(2), t = i(3), h = i(4), c = { Downloader: r.default, Parser: t.default, Player: h.default };
|
|
1131
|
+
b.default = c;
|
|
1132
|
+
}, function(n, b, i) {
|
|
1133
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1134
|
+
var r = function() {
|
|
1135
|
+
function t() {
|
|
1136
1136
|
this.request = null;
|
|
1137
1137
|
}
|
|
1138
|
-
return
|
|
1139
|
-
var
|
|
1140
|
-
if (!
|
|
1141
|
-
return new Promise(function(
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1144
|
-
!
|
|
1145
|
-
},
|
|
1146
|
-
return
|
|
1147
|
-
},
|
|
1138
|
+
return t.prototype.get = function(h) {
|
|
1139
|
+
var c = this;
|
|
1140
|
+
if (!h) throw new Error("download link undefined");
|
|
1141
|
+
return new Promise(function(a, p) {
|
|
1142
|
+
var l = new XMLHttpRequest();
|
|
1143
|
+
l.open("GET", h, !0), l.responseType = "arraybuffer", l.onloadend = function() {
|
|
1144
|
+
!l.response || l.status !== 200 && l.status !== 304 ? p(l) : a(l.response);
|
|
1145
|
+
}, l.onerror = function() {
|
|
1146
|
+
return p(l.response);
|
|
1147
|
+
}, l.send(), c.request = l;
|
|
1148
1148
|
});
|
|
1149
|
-
},
|
|
1149
|
+
}, t.prototype.cancel = function() {
|
|
1150
1150
|
this.request && this.request.abort();
|
|
1151
|
-
},
|
|
1151
|
+
}, t.prototype.destroy = function() {
|
|
1152
1152
|
this.request && this.request.abort();
|
|
1153
|
-
},
|
|
1153
|
+
}, t;
|
|
1154
1154
|
}();
|
|
1155
|
-
|
|
1155
|
+
b.default = r;
|
|
1156
1156
|
}, function(module, exports$1, __webpack_require__) {
|
|
1157
1157
|
Object.defineProperty(exports$1, "__esModule", { value: !0 });
|
|
1158
1158
|
var WORKER = `!function(t){var e={};function r(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(i,s,function(e){return t[e]}.bind(null,s));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=8)}([function(t,e,r){"use strict";var i=t.exports=r(6);i.codegen=r(16),i.toArray=function(t){if(t){for(var e=Object.keys(t),r=new Array(e.length),i=0;i<e.length;)r[i]=t[e[i++]];return r}return[]};var s=/\\\\/g,n=/"/g;i.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},i.safeProp=function(t){return!/^[$\\w_]+$/.test(t)||i.isReserved(t)?'["'+t.replace(s,"\\\\\\\\").replace(n,'\\\\"')+'"]':"."+t}},function(t,e,r){"use strict";t.exports=h;var i=r(2);((h.prototype=Object.create(i.prototype)).constructor=h).className="Field";var s,n=r(3),o=r(5),a=r(0),f=/^required|optional|repeated$/;function h(t,e,r,s,n,h,l){if(a.isObject(s)?(l=n,h=s,s=n=void 0):a.isObject(n)&&(l=h,h=n,n=void 0),i.call(this,t,h),!a.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!f.test(s=s.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==n&&!a.isString(n))throw TypeError("extend must be a string");this.rule=s&&"optional"!==s?s:void 0,this.type=r,this.id=e,this.extend=n||void 0,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==o.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}h.fromJSON=function(t,e){return new h(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)},h.prototype.setOption=function(t,e,r){return"packed"===t&&(this._packed=null),i.prototype.setOption.call(this,t,e,r)},h.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof s?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof n&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof n)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof s&&(this.parent.ctor.prototype[this.name]=this.defaultValue),i.prototype.resolve.call(this)},h._configure=function(t){s=t}},function(t,e,r){"use strict";var i;function s(t,e){this.options=e,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}t.exports=s,s.className="ReflectionObject",s.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof i&&e._handleAdd(this)},s.prototype.resolve=function(){return this.resolved?this:(this.root instanceof i&&(this.resolved=!0),this)},s.prototype.getOption=function(t){if(this.options)return this.options[t]},s._configure=function(t){i=t}},function(t,e,r){"use strict";t.exports=s;var i=r(2);function s(t,e,r,s,n){if(i.call(this,t,r),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=s,this.comments=n||{},this.reserved=void 0,e)for(var o=Object.keys(e),a=0;a<o.length;++a)"number"==typeof e[o[a]]&&(this.valuesById[this.values[o[a]]=e[o[a]]]=o[a])}((s.prototype=Object.create(i.prototype)).constructor=s).className="Enum",s.fromJSON=function(t,e){var r=new s(t,e.values,e.options,e.comment,e.comments);return r.reserved=e.reserved,r}},function(t,e,r){"use strict";t.exports=h;var i=r(2);((h.prototype=Object.create(i.prototype)).constructor=h).className="Namespace";var s,n,o,a=r(1),f=r(0);function h(t,e){i.call(this,t,e),this.nested=void 0,this._nestedArray=null}h.fromJSON=function(t,e){return new h(t,e.options).addJSON(e.nested)},h.isReservedId=function(t,e){if(t)for(var r=0;r<t.length;++r)if("string"!=typeof t[r]&&t[r][0]<=e&&t[r][1]>=e)return!0;return!1},h.isReservedName=function(t,e){if(t)for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1},Object.defineProperty(h.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=f.toArray(this.nested))}}),h.prototype.addJSON=function(t){if(t)for(var e,r=Object.keys(t),i=0;i<r.length;++i)e=t[r[i]],this.add((void 0!==e.fields?s.fromJSON:void 0!==e.values?o.fromJSON:void 0!==e.methods?n.fromJSON:void 0!==e.id?a.fromJSON:h.fromJSON)(r[i],e));return this},h.prototype.get=function(t){return this.nested&&this.nested[t]||null},h.prototype.add=function(t){if(!(t instanceof a&&void 0!==t.extend||t instanceof s||t instanceof o||t instanceof n||t instanceof h))throw TypeError("object must be a valid nested object");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof h&&t instanceof h)||e instanceof s||e instanceof n)throw Error("duplicate name '"+t.name+"' in "+this);for(var r=e.nestedArray,i=0;i<r.length;++i)t.add(r[i]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),(f=this)._nestedArray=null,f;var f},h.prototype.lookup=function(t,e,r){if("boolean"==typeof e?(r=e,e=void 0):e&&!Array.isArray(e)&&(e=[e]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),e);var i=this.get(t[0]);if(i){if(1===t.length){if(!e||e.indexOf(i.constructor)>-1)return i}else if(i instanceof h&&(i=i.lookup(t.slice(1),e,!0)))return i}else for(var s=0;s<this.nestedArray.length;++s)if(this._nestedArray[s]instanceof h&&(i=this._nestedArray[s].lookup(t,e,!0)))return i;return null===this.parent||r?null:this.parent.lookup(t,e)},h.prototype.lookupType=function(t){var e=this.lookup(t,[s]);if(!e)throw Error("no such type: "+t);return e},h.prototype.lookupTypeOrEnum=function(t){var e=this.lookup(t,[s,o]);if(!e)throw Error("no such Type or Enum '"+t+"' in "+this);return e},h._configure=function(t,e,r){s=t,n=e,o=r}},function(t,e,r){"use strict";var i=e,s=r(0),n=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(t,e){var r=0,i={};for(e|=0;r<t.length;)i[n[r+e]]=t[r++];return i}i.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=o([0,0,0,1,1],7),i.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(t,e,r){"use strict";var i=e;i.float=r(14),i.utf8=r(15),i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i._configure=function(){var t=i.Buffer;t?(i._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,r){return new t(e,r)},i._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):i._Buffer_from=i._Buffer_allocUnsafe=null}},function(t,e,r){"use strict";t.exports=s;var i=r(4);function s(t,e){i.call(this,t,e),this.methods={},this._methodsArray=null}((s.prototype=Object.create(i.prototype)).constructor=s).className="Service"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),r(9);var i,s=r(10),n=r(23),o=r(24),a=r(25),f=r(26);self.document?((i=self.SVGAParserMockWorker={}).disableWorker=!0,i.postMessage=function(t){i.onmessageCallback&&i.onmessageCallback(t)}):i=self;var h=s.Root.fromJSON(n.default).lookupType("com.opensource.svga.MovieEntity");i.onmessage=function(t){var e=new o.Zlib.Inflate(new Uint8Array(t.data)).decompress(),r=h.decode(e),s={};for(var n in r.images){var l=r.images[n],u=a.default(l);s[n]=btoa(u)}var p=new f.default(r,s);i.postMessage(p)}},function(t,e,r){"use strict";var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";!self.btoa&&(self.btoa=function(t){for(var e,r,s,n,o="",a=0,f=(t=String(t)).length%3;a<t.length;){if((r=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");o+=i.charAt((e=r<<16|s<<8|n)>>18&63)+i.charAt(e>>12&63)+i.charAt(e>>6&63)+i.charAt(63&e)}return f?o.slice(0,f-3)+"===".substring(f):o})},function(t,e,r){"use strict";t.exports=r(11)},function(t,e,r){"use strict";(t.exports=r(12)).build="full"},function(t,e,r){"use strict";var i=t.exports=r(13);i.build="light",i.ReflectionObject=r(2),i.Namespace=r(4),i.Root=r(17),i.Enum=r(3),i.Type=r(19),i.Field=r(1),i.Service=r(7),i.ReflectionObject._configure(i.Root),i.Namespace._configure(i.Type,i.Service,i.Enum),i.Root._configure(i.Type),i.Field._configure(i.Type)},function(t,e,r){"use strict";e.build="minimal"},function(t,e,r){"use strict";function i(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),i=128===r[3];function s(t,i,s){e[0]=t,i[s]=r[0],i[s+1]=r[1],i[s+2]=r[2],i[s+3]=r[3]}function n(t,i,s){e[0]=t,i[s]=r[3],i[s+1]=r[2],i[s+2]=r[1],i[s+3]=r[0]}function o(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],e[0]}function a(t,i){return r[3]=t[i],r[2]=t[i+1],r[1]=t[i+2],r[0]=t[i+3],e[0]}t.writeFloatLE=i?s:n,t.writeFloatBE=i?n:s,t.readFloatLE=i?o:a,t.readFloatBE=i?a:o}():function(){function e(t,e,r,i){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,r,i);else if(isNaN(e))t(2143289344,r,i);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,r,i);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,r,i);else{var n=Math.floor(Math.log(e)/Math.LN2);t((s<<31|n+127<<23|8388607&Math.round(e*Math.pow(2,-n)*8388608))>>>0,r,i)}}function r(t,e,r){var i=t(e,r),s=2*(i>>31)+1,n=i>>>23&255,o=8388607&i;return 255===n?o?NaN:s*(1/0):0===n?1401298464324817e-60*s*o:s*Math.pow(2,n-150)*(o+8388608)}t.writeFloatLE=e.bind(null,s),t.writeFloatBE=e.bind(null,n),t.readFloatLE=r.bind(null,o),t.readFloatBE=r.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),i=128===r[7];function s(t,i,s){e[0]=t,i[s]=r[0],i[s+1]=r[1],i[s+2]=r[2],i[s+3]=r[3],i[s+4]=r[4],i[s+5]=r[5],i[s+6]=r[6],i[s+7]=r[7]}function n(t,i,s){e[0]=t,i[s]=r[7],i[s+1]=r[6],i[s+2]=r[5],i[s+3]=r[4],i[s+4]=r[3],i[s+5]=r[2],i[s+6]=r[1],i[s+7]=r[0]}function o(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],r[4]=t[i+4],r[5]=t[i+5],r[6]=t[i+6],r[7]=t[i+7],e[0]}function a(t,i){return r[7]=t[i],r[6]=t[i+1],r[5]=t[i+2],r[4]=t[i+3],r[3]=t[i+4],r[2]=t[i+5],r[1]=t[i+6],r[0]=t[i+7],e[0]}t.writeDoubleLE=i?s:n,t.writeDoubleBE=i?n:s,t.readDoubleLE=i?o:a,t.readDoubleBE=i?a:o}():function(){function e(t,e,r,i,s,n){var o=i<0?1:0;if(o&&(i=-i),0===i)t(0,s,n+e),t(1/i>0?0:2147483648,s,n+r);else if(isNaN(i))t(0,s,n+e),t(2146959360,s,n+r);else if(i>17976931348623157e292)t(0,s,n+e),t((o<<31|2146435072)>>>0,s,n+r);else{var a;if(i<22250738585072014e-324)t((a=i/5e-324)>>>0,s,n+e),t((o<<31|a/4294967296)>>>0,s,n+r);else{var f=Math.floor(Math.log(i)/Math.LN2);1024===f&&(f=1023),t(4503599627370496*(a=i*Math.pow(2,-f))>>>0,s,n+e),t((o<<31|f+1023<<20|1048576*a&1048575)>>>0,s,n+r)}}}function r(t,e,r,i,s){var n=t(i,s+e),o=t(i,s+r),a=2*(o>>31)+1,f=o>>>20&2047,h=4294967296*(1048575&o)+n;return 2047===f?h?NaN:a*(1/0):0===f?5e-324*a*h:a*Math.pow(2,f-1075)*(h+4503599627370496)}t.writeDoubleLE=e.bind(null,s,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=r.bind(null,o,0,4),t.readDoubleBE=r.bind(null,a,4,0)}(),t}function s(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function a(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=i(i)},function(t,e,r){"use strict";var i=e;i.length=function(t){for(var e=0,r=0,i=0;i<t.length;++i)(r=t.charCodeAt(i))<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(i+1))?(++i,e+=4):e+=3;return e},i.read=function(t,e,r){if(r-e<1)return"";for(var i,s=null,n=[],o=0;e<r;)(i=t[e++])<128?n[o++]=i:i>191&&i<224?n[o++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,n[o++]=55296+(i>>10),n[o++]=56320+(1023&i)):n[o++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],o>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),o=0);return s?(o&&s.push(String.fromCharCode.apply(String,n.slice(0,o))),s.join("")):String.fromCharCode.apply(String,n.slice(0,o))},i.write=function(t,e,r){for(var i,s,n=r,o=0;o<t.length;++o)(i=t.charCodeAt(o))<128?e[r++]=i:i<2048?(e[r++]=i>>6|192,e[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(s=t.charCodeAt(o+1)))?(i=65536+((1023&i)<<10)+(1023&s),++o,e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128);return r-n}},function(t,e,r){"use strict";function i(t,e){"string"==typeof t&&(e=t,t=void 0);var r=[];function s(t){if("string"!=typeof t){var e=n();if(i.verbose&&console.log("codegen: "+e),e="return "+e,t){for(var o=Object.keys(t),a=new Array(o.length+1),f=new Array(o.length),h=0;h<o.length;)a[h]=o[h],f[h]=t[o[h++]];return a[h]=e,Function.apply(null,a).apply(null,f)}return Function(e)()}for(var l=new Array(arguments.length-1),u=0;u<l.length;)l[u]=arguments[++u];if(u=0,t=t.replace(/%([%dfijs])/g,function(t,e){var r=l[u++];switch(e){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),u!==l.length)throw Error("parameter count mismatch");return r.push(t),s}function n(i){return"function "+(i||e||"")+"("+(t&&t.join(",")||"")+"){\\n "+r.join("\\n ")+"\\n}"}return s.toString=n,s}t.exports=i,i.verbose=!1},function(t,e,r){"use strict";t.exports=f;var i=r(4);((f.prototype=Object.create(i.prototype)).constructor=f).className="Root";var s,n=r(1),o=r(3),a=r(18);function f(t){i.call(this,"",t),this.deferred=[],this.files=[]}f.fromJSON=function(t,e){return e||(e=new f),t.options&&e.setOptions(t.options),e.addJSON(t.nested)};var h=/^[A-Z]/;function l(t,e){var r=e.parent.lookup(e.extend);if(r){var i=new n(e.fullName,e.id,e.type,e.rule,void 0,e.options);return i.declaringField=e,e.extensionField=i,r.add(i),!0}return!1}f.prototype._handleAdd=function(t){if(t instanceof n)void 0===t.extend||t.extensionField||l(0,t)||this.deferred.push(t);else if(t instanceof o)h.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof a)){if(t instanceof s)for(var e=0;e<this.deferred.length;)l(0,this.deferred[e])?this.deferred.splice(e,1):++e;for(var r=0;r<t.nestedArray.length;++r)this._handleAdd(t._nestedArray[r]);h.test(t.name)&&(t.parent[t.name]=t)}},f._configure=function(t,e,r){s=t,e,r}},function(t,e,r){"use strict";t.exports=o;var i=r(2);((o.prototype=Object.create(i.prototype)).constructor=o).className="OneOf";var s=r(1),n=r(0);function o(t,e,r,s){if(Array.isArray(e)||(r=e,e=void 0),i.call(this,t,r),void 0!==e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=s}function a(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}o.fromJSON=function(t,e){return new o(t,e.oneof,e.options,e.comment)},o.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return n.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])},o.prototype.add=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,a(this),this},o.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),(e=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(e,1),t.partOf=null,this},o.prototype.onAdd=function(t){i.prototype.onAdd.call(this,t);for(var e=0;e<this.oneof.length;++e){var r=t.get(this.oneof[e]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},o.prototype.onRemove=function(t){for(var e,r=0;r<this.fieldsArray.length;++r)(e=this.fieldsArray[r]).parent&&e.parent.remove(e);i.prototype.onRemove.call(this,t)},o.d=function(){for(var t=new Array(arguments.length),e=0;e<arguments.length;)t[e]=arguments[e++];return function(e,r){n.decorateType(e.constructor).add(new o(r,t)),Object.defineProperty(e,r,{get:n.oneOfGetter(t),set:n.oneOfSetter(t)})}}},function(t,e,r){"use strict";t.exports=u;var i=r(4);((u.prototype=Object.create(i.prototype)).constructor=u).className="Type";var s=r(3),n=r(1),o=r(20),a=r(7),f=r(21),h=r(0),l=r(22);function u(t,e){i.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(u.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=u.generateConstructor(this)())},set:function(t){t.prototype;t.$type=t.prototype.$type=this,this._ctor=t;for(var e=0;e<this.fieldsArray.length;++e)this._fieldsArray[e].resolve();var r={};for(e=0;e<this.oneofsArray.length;++e)r[this._oneofsArray[e].resolve().name]={get:h.oneOfGetter(this._oneofsArray[e].oneof),set:h.oneOfSetter(this._oneofsArray[e].oneof)};e&&Object.defineProperties(t.prototype,r)}}}),u.generateConstructor=function(t){for(var e,r=h.codegen(["p"],t.name),i=0;i<t.fieldsArray.length;++i)(e=t._fieldsArray[i]).map?r("this%s={}",h.safeProp(e.name)):e.repeated&&r("this%s=[]",h.safeProp(e.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},u.fromJSON=function(t,e){var r=new u(t,e.options);r.extensions=e.extensions,r.reserved=e.reserved;for(var f=Object.keys(e.fields),h=0;h<f.length;++h)r.add((void 0!==e.fields[f[h]].keyType?o.fromJSON:n.fromJSON)(f[h],e.fields[f[h]]));if(e.nested)for(f=Object.keys(e.nested),h=0;h<f.length;++h){var l=e.nested[f[h]];r.add((void 0!==l.id?n.fromJSON:void 0!==l.fields?u.fromJSON:void 0!==l.values?s.fromJSON:void 0!==l.methods?a.fromJSON:i.fromJSON)(f[h],l))}return e.extensions&&e.extensions.length&&(r.extensions=e.extensions),e.reserved&&e.reserved.length&&(r.reserved=e.reserved),e.group&&(r.group=!0),e.comment&&(r.comment=e.comment),r},u.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof n&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),(e=this)._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}var e;return i.prototype.add.call(this,t)},u.prototype.isReservedId=function(t){return i.isReservedId(this.reserved,t)},u.prototype.isReservedName=function(t){return i.isReservedName(this.reserved,t)},u.prototype.setup=function(){this.fullName;for(var t=[],e=0;e<this.fieldsArray.length;++e)t.push(this._fieldsArray[e].resolve().resolvedType);return this.decode=l(this)({Reader:f,types:t,util:h}),this},u.prototype.decode=function(t,e){return this.setup().decode(t,e)}},function(t,e,r){"use strict";t.exports=n;var i=r(1);((n.prototype=Object.create(i.prototype)).constructor=n).className="MapField";r(5);var s=r(0);function n(t,e,r,n,o,a){if(i.call(this,t,e,n,void 0,void 0,o,a),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options,e.comment)}},function(t,e,r){"use strict";t.exports=o;var i=r(6),s=(i.LongBits,i.utf8);function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}var a,f="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")};function h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}o.create=i.Buffer?function(t){return(o.create=function(t){return i.Buffer.isBuffer(t)?new(void 0)(t):f(t)})(t)}:f,o.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,o.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return a;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return a}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return h(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|h(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw n(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},o.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this}},function(t,e,r){"use strict";t.exports=function(t){var e=n.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&e("if((t&7)===4)")("break");e("switch(t>>>3){");for(var r=0;r<t.fieldsArray.length;++r){var a=t._fieldsArray[r].resolve(),f=a.resolvedType instanceof i?"int32":a.type,h="m"+n.safeProp(a.name);e("case %i:",a.id),a.map?(e("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("k=r.%s()",a.keyType)("r.pos++"),void 0!==s.long[a.keyType]?void 0===s.basic[f]?e('%s[typeof k==="object"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())',h,r):e('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,f):void 0===s.basic[f]?e("%s[k]=types[%i].decode(r,r.uint32())",h,r):e("%s[k]=r.%s()",h,f)):a.repeated?(e("if(!(%s&&%s.length))",h,h)("%s=[]",h),void 0!==s.packed[f]&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,f)("}else"),void 0===s.basic[f]?e(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",h,r):e("%s.push(r.%s())",h,f)):void 0===s.basic[f]?e(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",h,r):e("%s=r.%s()",h,f),e("break")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<t._fieldsArray.length;++r){var l=t._fieldsArray[r];l.required&&e("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",o(l))}return e("return m")};var i=r(3),s=r(5),n=r(0);function o(t){return"missing required '"+t.name+"'"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={nested:{com:{nested:{opensource:{nested:{svga:{options:{objc_class_prefix:"SVGAProto",java_package:"com.opensource.svgaplayer"},nested:{MovieParams:{fields:{viewBoxWidth:{type:"float",id:1},viewBoxHeight:{type:"float",id:2},fps:{type:"int32",id:3},frames:{type:"int32",id:4}}},SpriteEntity:{fields:{imageKey:{type:"string",id:1},frames:{rule:"repeated",type:"FrameEntity",id:2}}},Layout:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},width:{type:"float",id:3},height:{type:"float",id:4}}},Transform:{fields:{a:{type:"float",id:1},b:{type:"float",id:2},c:{type:"float",id:3},d:{type:"float",id:4},tx:{type:"float",id:5},ty:{type:"float",id:6}}},ShapeEntity:{oneofs:{args:{oneof:["shape","rect","ellipse"]}},fields:{type:{type:"ShapeType",id:1},shape:{type:"ShapeArgs",id:2},rect:{type:"RectArgs",id:3},ellipse:{type:"EllipseArgs",id:4},styles:{type:"ShapeStyle",id:10},transform:{type:"Transform",id:11}},nested:{ShapeType:{values:{SHAPE:0,RECT:1,ELLIPSE:2,KEEP:3}},ShapeArgs:{fields:{d:{type:"string",id:1}}},RectArgs:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},width:{type:"float",id:3},height:{type:"float",id:4},cornerRadius:{type:"float",id:5}}},EllipseArgs:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},radiusX:{type:"float",id:3},radiusY:{type:"float",id:4}}},ShapeStyle:{fields:{fill:{type:"RGBAColor",id:1},stroke:{type:"RGBAColor",id:2},strokeWidth:{type:"float",id:3},lineCap:{type:"LineCap",id:4},lineJoin:{type:"LineJoin",id:5},miterLimit:{type:"float",id:6},lineDashI:{type:"float",id:7},lineDashII:{type:"float",id:8},lineDashIII:{type:"float",id:9}},nested:{RGBAColor:{fields:{r:{type:"float",id:1},g:{type:"float",id:2},b:{type:"float",id:3},a:{type:"float",id:4}}},LineCap:{values:{LineCap_BUTT:0,LineCap_ROUND:1,LineCap_SQUARE:2}},LineJoin:{values:{LineJoin_MITER:0,LineJoin_ROUND:1,LineJoin_BEVEL:2}}}}}},FrameEntity:{fields:{alpha:{type:"float",id:1},layout:{type:"Layout",id:2},transform:{type:"Transform",id:3},clipPath:{type:"string",id:4},shapes:{rule:"repeated",type:"ShapeEntity",id:5}}},MovieEntity:{fields:{version:{type:"string",id:1},params:{type:"MovieParams",id:2},images:{keyType:"string",type:"bytes",id:3},sprites:{rule:"repeated",type:"SpriteEntity",id:4}}}}}}}}}}}},function(t,e){
|
|
@@ -1162,286 +1162,286 @@ var svga_lite_min = { exports: {} };
|
|
|
1162
1162
|
var disableWorker = (_a === void 0 ? { disableWorker: !1 } : _a).disableWorker;
|
|
1163
1163
|
disableWorker ? (eval(WORKER), this.worker = window.SVGAParserMockWorker) : this.worker = new Worker(window.URL.createObjectURL(new Blob([WORKER])));
|
|
1164
1164
|
}
|
|
1165
|
-
return Parser.prototype.do = function(
|
|
1166
|
-
var
|
|
1167
|
-
if (
|
|
1168
|
-
if (!
|
|
1165
|
+
return Parser.prototype.do = function(n) {
|
|
1166
|
+
var b = this, i = new Uint8Array(n, 0, 4);
|
|
1167
|
+
if (i[0] == 80 && i[1] == 75 && i[2] == 3 && i[3] == 4) throw "this parser not support version@1.x of svga.";
|
|
1168
|
+
if (!n) throw new Error("Parser Data not found");
|
|
1169
1169
|
if (!this.worker) throw new Error("Parser Worker not found");
|
|
1170
|
-
return new Promise(function(
|
|
1171
|
-
var
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1175
|
-
var
|
|
1176
|
-
|
|
1170
|
+
return new Promise(function(r, t) {
|
|
1171
|
+
var h;
|
|
1172
|
+
b.worker.disableWorker ? ((h = b.worker).onmessageCallback = function(c) {
|
|
1173
|
+
r(c);
|
|
1174
|
+
}, h.onmessage({ data: n })) : ((h = b.worker).postMessage(n), h.onmessage = function(c) {
|
|
1175
|
+
var a = c.data;
|
|
1176
|
+
r(a);
|
|
1177
1177
|
});
|
|
1178
1178
|
});
|
|
1179
1179
|
}, Parser.prototype.destroy = function() {
|
|
1180
|
-
var
|
|
1181
|
-
|
|
1180
|
+
var n = this.worker;
|
|
1181
|
+
n.terminate && n.terminate();
|
|
1182
1182
|
}, Parser;
|
|
1183
1183
|
}();
|
|
1184
1184
|
exports$1.default = Parser;
|
|
1185
|
-
}, function(
|
|
1186
|
-
Object.defineProperty(
|
|
1187
|
-
var t,
|
|
1188
|
-
(function(
|
|
1189
|
-
|
|
1190
|
-
})(
|
|
1191
|
-
|
|
1192
|
-
}(
|
|
1193
|
-
|
|
1194
|
-
}(
|
|
1195
|
-
var
|
|
1196
|
-
function
|
|
1197
|
-
if (this.videoItem =
|
|
1185
|
+
}, function(n, b, i) {
|
|
1186
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1187
|
+
var r, t, h, c = i(5), a = i(9);
|
|
1188
|
+
(function(o) {
|
|
1189
|
+
o.START = "start", o.RESUME = "resume", o.PROCESS = "process", o.PAUSE = "pause", o.STOP = "stop", o.END = "end", o.CLEAR = "clear";
|
|
1190
|
+
})(r || (r = {})), function(o) {
|
|
1191
|
+
o.FORWARDS = "forwards", o.BACKWARDS = "backwards";
|
|
1192
|
+
}(t || (t = {})), function(o) {
|
|
1193
|
+
o.FORWARDS = "forwards", o.FALLBACKS = "fallbacks";
|
|
1194
|
+
}(h || (h = {}));
|
|
1195
|
+
var p = typeof window < "u" && "IntersectionObserver" in window, l = function() {
|
|
1196
|
+
function o(s, f, u) {
|
|
1197
|
+
if (this.videoItem = f, this.loop = !0, this.fillMode = t.FORWARDS, this.playMode = h.FORWARDS, this.progress = 0, this.currentFrame = 0, this.totalFramesCount = 0, this.startFrame = 0, this.endFrame = 0, this.cacheFrames = !1, this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0, this._intersectionObserver = null, this.$onEvent = { start: function() {
|
|
1198
1198
|
}, resume: function() {
|
|
1199
1199
|
}, process: function() {
|
|
1200
1200
|
}, pause: function() {
|
|
1201
1201
|
}, stop: function() {
|
|
1202
1202
|
}, end: function() {
|
|
1203
1203
|
}, clear: function() {
|
|
1204
|
-
} }, this.container = typeof
|
|
1204
|
+
} }, this.container = typeof s == "string" ? document.body.querySelector(s) : s, !this.container) throw new Error("container undefined.");
|
|
1205
1205
|
if (!this.container.getContext) throw new Error("container should be HTMLCanvasElement.");
|
|
1206
|
-
this._renderer = new
|
|
1206
|
+
this._renderer = new c.default(this), this._animator = new a.default(), this.videoItem && this.mount(f), u && this.set(u);
|
|
1207
1207
|
}
|
|
1208
|
-
return
|
|
1209
|
-
var
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
}, { rootMargin: "0px", threshold: [0, 0.5, 1] }), this._intersectionObserver.observe(this.container)) : (this._intersectionObserver && this._intersectionObserver.disconnect(), this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0), this._animator.noExecutionDelay =
|
|
1213
|
-
},
|
|
1214
|
-
var
|
|
1215
|
-
return new Promise(function(
|
|
1216
|
-
|
|
1208
|
+
return o.prototype.set = function(s) {
|
|
1209
|
+
var f = this;
|
|
1210
|
+
s.loop !== void 0 && (this.loop = s.loop), s.fillMode && (this.fillMode = s.fillMode), s.playMode && (this.playMode = s.playMode), s.cacheFrames !== void 0 && (this.cacheFrames = s.cacheFrames), this.startFrame = s.startFrame ? s.startFrame : this.startFrame, this.endFrame = s.endFrame ? s.endFrame : this.endFrame, s.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = s.intersectionObserverRender), p && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(u) {
|
|
1211
|
+
u[0].intersectionRatio <= 0 ? f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !1) : !f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !0);
|
|
1212
|
+
}, { rootMargin: "0px", threshold: [0, 0.5, 1] }), this._intersectionObserver.observe(this.container)) : (this._intersectionObserver && this._intersectionObserver.disconnect(), this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0), this._animator.noExecutionDelay = s.noExecutionDelay;
|
|
1213
|
+
}, o.prototype.mount = function(s) {
|
|
1214
|
+
var f = this;
|
|
1215
|
+
return new Promise(function(u, g) {
|
|
1216
|
+
f.currentFrame = 0, f.progress = 0, f.totalFramesCount = s.frames - 1, f.videoItem = s, f._renderer.prepare().then(u), f._renderer.clear(), f._setSize();
|
|
1217
1217
|
});
|
|
1218
|
-
},
|
|
1218
|
+
}, o.prototype.start = function() {
|
|
1219
1219
|
if (!this.videoItem) throw new Error("video item undefined.");
|
|
1220
1220
|
this._renderer.clear(), this._startAnimation(), this.$onEvent.start();
|
|
1221
|
-
},
|
|
1221
|
+
}, o.prototype.resume = function() {
|
|
1222
1222
|
if (!this.videoItem) throw new Error("video item undefined.");
|
|
1223
1223
|
this._startAnimation(), this.$onEvent.resume();
|
|
1224
|
-
},
|
|
1224
|
+
}, o.prototype.pause = function() {
|
|
1225
1225
|
this._animator && this._animator.stop(), this.$onEvent.pause();
|
|
1226
|
-
},
|
|
1226
|
+
}, o.prototype.stop = function() {
|
|
1227
1227
|
this._animator && this._animator.stop(), this.currentFrame = 0, this._renderer.drawFrame(this.currentFrame), this.$onEvent.stop();
|
|
1228
|
-
},
|
|
1228
|
+
}, o.prototype.clear = function() {
|
|
1229
1229
|
this._animator && this._animator.stop(), this._renderer.clear(), this.$onEvent.clear();
|
|
1230
|
-
},
|
|
1230
|
+
}, o.prototype.destroy = function() {
|
|
1231
1231
|
this._animator && this._animator.stop(), this._renderer.clear(), this._animator = null, this._renderer = null, this.videoItem = null;
|
|
1232
|
-
},
|
|
1233
|
-
var
|
|
1234
|
-
return this.$onEvent[
|
|
1235
|
-
return
|
|
1232
|
+
}, o.prototype.$on = function(s, f) {
|
|
1233
|
+
var u = this;
|
|
1234
|
+
return this.$onEvent[s] = f, s === "end" && (this._animator.onEnd = function() {
|
|
1235
|
+
return u.$onEvent.end();
|
|
1236
1236
|
}), this;
|
|
1237
|
-
},
|
|
1238
|
-
var
|
|
1239
|
-
this.currentFrame ===
|
|
1240
|
-
var e =
|
|
1241
|
-
|
|
1242
|
-
|
|
1237
|
+
}, o.prototype._startAnimation = function() {
|
|
1238
|
+
var s = this, f = this, u = f.playMode, g = f.totalFramesCount, _ = f.startFrame, d = f.endFrame, m = f.videoItem;
|
|
1239
|
+
this.currentFrame === g && (this.currentFrame = _ || 0), this._animator.startValue = u === "fallbacks" ? d || g : _ || 0, this._animator.endValue = u === "fallbacks" ? _ || 0 : d || g;
|
|
1240
|
+
var e = m.frames;
|
|
1241
|
+
d > 0 && d > _ ? e = d - _ : d <= 0 && _ > 0 && (e = m.frames - _), this._animator.duration = e * (1 / m.FPS) * 1e3, this._animator.loop = this.loop === !0 || this.loop <= 0 ? 1 / 0 : this.loop === !1 ? 1 : this.loop, this._animator.fillRule = this.fillMode === "backwards" ? 1 : 0, this._animator.onUpdate = function(E) {
|
|
1242
|
+
E = Math.floor(E), s.currentFrame !== E && (s.currentFrame = E, s.progress = parseFloat((E + 1).toString()) / parseFloat(m.frames.toString()) * 100, s._renderer.drawFrame(s.currentFrame), s.$onEvent.process());
|
|
1243
1243
|
}, this._animator.start(this.currentFrame);
|
|
1244
|
-
},
|
|
1245
|
-
var
|
|
1246
|
-
this.container.width =
|
|
1247
|
-
},
|
|
1244
|
+
}, o.prototype._setSize = function() {
|
|
1245
|
+
var s = this.videoItem.videoSize;
|
|
1246
|
+
this.container.width = s.width, this.container.height = s.height;
|
|
1247
|
+
}, o;
|
|
1248
1248
|
}();
|
|
1249
|
-
|
|
1250
|
-
}, function(
|
|
1251
|
-
Object.defineProperty(
|
|
1252
|
-
var
|
|
1253
|
-
function c
|
|
1254
|
-
this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player =
|
|
1255
|
-
var
|
|
1256
|
-
this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(
|
|
1249
|
+
b.default = l;
|
|
1250
|
+
}, function(n, b, i) {
|
|
1251
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1252
|
+
var r = i(6), t = function() {
|
|
1253
|
+
function h(c) {
|
|
1254
|
+
this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = c;
|
|
1255
|
+
var a = this._player.container;
|
|
1256
|
+
this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(a.width, a.height) : document.createElement("canvas");
|
|
1257
1257
|
}
|
|
1258
|
-
return
|
|
1259
|
-
var
|
|
1260
|
-
return new Promise(function(
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1263
|
-
var
|
|
1264
|
-
for (var
|
|
1265
|
-
var
|
|
1266
|
-
if (typeof
|
|
1258
|
+
return h.prototype.prepare = function() {
|
|
1259
|
+
var c = this;
|
|
1260
|
+
return new Promise(function(a, p) {
|
|
1261
|
+
if (c._bitmapCache = {}, c._player.videoItem.images && Object.keys(c._player.videoItem.images).length != 0) {
|
|
1262
|
+
c._player.videoItem.dynamicElements && (c._dynamicElements = c._player.videoItem.dynamicElements);
|
|
1263
|
+
var l = 0, o = 0;
|
|
1264
|
+
for (var s in c._player.videoItem.images) {
|
|
1265
|
+
var f = c._player.videoItem.images[s];
|
|
1266
|
+
if (typeof f != "string" || f.indexOf("iVBO") !== 0 && f.indexOf("/9j/2w") !== 0) c._bitmapCache[s] = f;
|
|
1267
1267
|
else {
|
|
1268
|
-
|
|
1269
|
-
var
|
|
1270
|
-
|
|
1271
|
-
++
|
|
1268
|
+
l++;
|
|
1269
|
+
var u = document.createElement("img");
|
|
1270
|
+
u.src = "data:image/png;base64," + f, c._bitmapCache[s] = u, u.onload = function() {
|
|
1271
|
+
++o === l && a();
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
} else
|
|
1275
|
+
} else a();
|
|
1276
1276
|
});
|
|
1277
|
-
},
|
|
1277
|
+
}, h.prototype.clear = function() {
|
|
1278
1278
|
this._player.container.width = this._player.container.width;
|
|
1279
|
-
},
|
|
1280
|
-
var
|
|
1281
|
-
if (!
|
|
1279
|
+
}, h.prototype.drawFrame = function(c) {
|
|
1280
|
+
var a = this._player;
|
|
1281
|
+
if (!a.intersectionObserverRender || a.intersectionObserverRenderShow) {
|
|
1282
1282
|
this.clear();
|
|
1283
|
-
var
|
|
1284
|
-
if (this._player.cacheFrames && this._frames[
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1283
|
+
var p = a.container.getContext("2d");
|
|
1284
|
+
if (this._player.cacheFrames && this._frames[c]) {
|
|
1285
|
+
var l = this._frames[c];
|
|
1286
|
+
p.drawImage(l, 0, 0, l.width, l.height, 0, 0, l.width, l.height);
|
|
1287
1287
|
} else {
|
|
1288
|
-
var
|
|
1289
|
-
if (
|
|
1290
|
-
var
|
|
1291
|
-
|
|
1292
|
-
} else this._frames[
|
|
1288
|
+
var o = this._ofsCanvas;
|
|
1289
|
+
if (o.width = this._player.container.width, o.height = this._player.container.height, r.default(o, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), p.drawImage(o, 0, 0, o.width, o.height, 0, 0, o.width, o.height), this._player.cacheFrames) if ("toDataURL" in o) {
|
|
1290
|
+
var s = o.toDataURL(), f = new Image();
|
|
1291
|
+
f.src = s, this._frames[c] = f;
|
|
1292
|
+
} else this._frames[c] = o.transferToImageBitmap();
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
},
|
|
1295
|
+
}, h;
|
|
1296
1296
|
}();
|
|
1297
|
-
|
|
1298
|
-
}, function(
|
|
1299
|
-
Object.defineProperty(
|
|
1300
|
-
var
|
|
1301
|
-
function
|
|
1302
|
-
return
|
|
1297
|
+
b.default = t;
|
|
1298
|
+
}, function(n, b, i) {
|
|
1299
|
+
Object.defineProperty(b, "__esModule", { value: !0 }), b.default = void 0;
|
|
1300
|
+
var r = c(i(0)), t = c(i(7)), h = c(i(8));
|
|
1301
|
+
function c(s) {
|
|
1302
|
+
return s && s.__esModule ? s : { default: s };
|
|
1303
1303
|
}
|
|
1304
|
-
var
|
|
1305
|
-
function
|
|
1306
|
-
var
|
|
1307
|
-
|
|
1304
|
+
var a = "MLHVCSQRZmlhvcsqrz";
|
|
1305
|
+
function p(s, f) {
|
|
1306
|
+
var u = f._styles;
|
|
1307
|
+
u !== void 0 && (u && u.stroke ? s.strokeStyle = "rgba(".concat(parseInt((255 * u.stroke[0]).toString()), ", ").concat(parseInt((255 * u.stroke[1]).toString()), ", ").concat(parseInt((255 * u.stroke[2]).toString()), ", ").concat(u.stroke[3], ")") : s.strokeStyle = "transparent", u && (s.lineWidth = u.strokeWidth || void 0, s.lineCap = u.lineCap || void 0, s.lineJoin = u.lineJoin || void 0, s.miterLimit = u.miterLimit || void 0), u && u.fill ? s.fillStyle = "rgba(".concat(parseInt((255 * u.fill[0]).toString()), ", ").concat(parseInt((255 * u.fill[1]).toString()), ", ").concat(parseInt((255 * u.fill[2]).toString()), ", ").concat(u.fill[3], ")") : s.fillStyle = "transparent", u && u.lineDash && s.setLineDash(u.lineDash));
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1311
|
-
var
|
|
1312
|
-
|
|
1313
|
-
if (
|
|
1314
|
-
var
|
|
1315
|
-
if (
|
|
1316
|
-
var
|
|
1317
|
-
(function(
|
|
1318
|
-
switch (
|
|
1309
|
+
function l(s, f) {
|
|
1310
|
+
s.save(), p(s, f), f._transform !== void 0 && f._transform !== null && s.transform(f._transform.a || 1, f._transform.b || 0, f._transform.c || 0, f._transform.d || 1, f._transform.tx || 0, f._transform.ty || 0);
|
|
1311
|
+
var u = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
|
|
1312
|
+
s.beginPath(), f._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(g) {
|
|
1313
|
+
if (g.length != 0) {
|
|
1314
|
+
var _ = g.substr(0, 1);
|
|
1315
|
+
if (a.indexOf(_) >= 0) {
|
|
1316
|
+
var d = g.substr(1).trim().split(" ");
|
|
1317
|
+
(function(m, e, E, v) {
|
|
1318
|
+
switch (E) {
|
|
1319
1319
|
case "M":
|
|
1320
|
-
e.x = Number(v[0]), e.y = Number(v[1]),
|
|
1320
|
+
e.x = Number(v[0]), e.y = Number(v[1]), m.moveTo(e.x, e.y);
|
|
1321
1321
|
break;
|
|
1322
1322
|
case "m":
|
|
1323
|
-
e.x += Number(v[0]), e.y += Number(v[1]),
|
|
1323
|
+
e.x += Number(v[0]), e.y += Number(v[1]), m.moveTo(e.x, e.y);
|
|
1324
1324
|
break;
|
|
1325
1325
|
case "L":
|
|
1326
|
-
e.x = Number(v[0]), e.y = Number(v[1]),
|
|
1326
|
+
e.x = Number(v[0]), e.y = Number(v[1]), m.lineTo(e.x, e.y);
|
|
1327
1327
|
break;
|
|
1328
1328
|
case "l":
|
|
1329
|
-
e.x += Number(v[0]), e.y += Number(v[1]),
|
|
1329
|
+
e.x += Number(v[0]), e.y += Number(v[1]), m.lineTo(e.x, e.y);
|
|
1330
1330
|
break;
|
|
1331
1331
|
case "H":
|
|
1332
|
-
e.x = Number(v[0]),
|
|
1332
|
+
e.x = Number(v[0]), m.lineTo(e.x, e.y);
|
|
1333
1333
|
break;
|
|
1334
1334
|
case "h":
|
|
1335
|
-
e.x += Number(v[0]),
|
|
1335
|
+
e.x += Number(v[0]), m.lineTo(e.x, e.y);
|
|
1336
1336
|
break;
|
|
1337
1337
|
case "V":
|
|
1338
|
-
e.y = Number(v[0]),
|
|
1338
|
+
e.y = Number(v[0]), m.lineTo(e.x, e.y);
|
|
1339
1339
|
break;
|
|
1340
1340
|
case "v":
|
|
1341
|
-
e.y += Number(v[0]),
|
|
1341
|
+
e.y += Number(v[0]), m.lineTo(e.x, e.y);
|
|
1342
1342
|
break;
|
|
1343
1343
|
case "C":
|
|
1344
|
-
e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x2 = Number(v[2]), e.y2 = Number(v[3]), e.x = Number(v[4]), e.y = Number(v[5]),
|
|
1344
|
+
e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x2 = Number(v[2]), e.y2 = Number(v[3]), e.x = Number(v[4]), e.y = Number(v[5]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
|
|
1345
1345
|
break;
|
|
1346
1346
|
case "c":
|
|
1347
|
-
e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x2 = e.x + Number(v[2]), e.y2 = e.y + Number(v[3]), e.x += Number(v[4]), e.y += Number(v[5]),
|
|
1347
|
+
e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x2 = e.x + Number(v[2]), e.y2 = e.y + Number(v[3]), e.x += Number(v[4]), e.y += Number(v[5]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
|
|
1348
1348
|
break;
|
|
1349
1349
|
case "S":
|
|
1350
|
-
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = Number(v[0]), e.y2 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]),
|
|
1350
|
+
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = Number(v[0]), e.y2 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
|
|
1351
1351
|
break;
|
|
1352
1352
|
case "s":
|
|
1353
|
-
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = e.x + Number(v[0]), e.y2 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]),
|
|
1353
|
+
e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = e.x + Number(v[0]), e.y2 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]), m.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
|
|
1354
1354
|
break;
|
|
1355
1355
|
case "Q":
|
|
1356
|
-
e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]),
|
|
1356
|
+
e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
|
|
1357
1357
|
break;
|
|
1358
1358
|
case "q":
|
|
1359
|
-
e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]),
|
|
1359
|
+
e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]), m.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
|
|
1360
1360
|
break;
|
|
1361
1361
|
case "A":
|
|
1362
1362
|
case "a":
|
|
1363
1363
|
break;
|
|
1364
1364
|
case "Z":
|
|
1365
1365
|
case "z":
|
|
1366
|
-
|
|
1366
|
+
m.closePath();
|
|
1367
1367
|
}
|
|
1368
|
-
})(
|
|
1368
|
+
})(s, u, _, d);
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
|
-
}),
|
|
1371
|
+
}), f._styles && f._styles.fill ? s.fill() : f._styles && f._styles.stroke && s.stroke(), s.restore();
|
|
1372
1372
|
}
|
|
1373
|
-
var
|
|
1374
|
-
var
|
|
1375
|
-
return
|
|
1376
|
-
var e =
|
|
1373
|
+
var o = function(s, f, u, g, _) {
|
|
1374
|
+
var d = s.getContext("2d");
|
|
1375
|
+
return g.sprites.forEach(function(m) {
|
|
1376
|
+
var e = m.frames[_];
|
|
1377
1377
|
if (!(e.alpha < 0.05)) {
|
|
1378
|
-
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1381
|
-
var v =
|
|
1382
|
-
v &&
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
var
|
|
1386
|
-
|
|
1387
|
-
}(
|
|
1388
|
-
|
|
1389
|
-
var
|
|
1390
|
-
|
|
1391
|
-
}(
|
|
1392
|
-
}),
|
|
1378
|
+
d.save(), d.globalAlpha = e.alpha, d.transform(e.transform.a || 1, e.transform.b || 0, e.transform.c || 0, e.transform.d || 1, e.transform.tx || 0, e.transform.ty || 0);
|
|
1379
|
+
var E = f[m.imageKey];
|
|
1380
|
+
E && (e.maskPath !== void 0 && e.maskPath !== null && (e.maskPath._styles = void 0, l(d, e.maskPath), d.clip()), d.drawImage(E, 0, 0));
|
|
1381
|
+
var v = u[m.imageKey];
|
|
1382
|
+
v && d.drawImage(v, (e.layout.width - v.width) / 2, (e.layout.height - v.height) / 2), e.shapes && e.shapes.forEach(function(w) {
|
|
1383
|
+
w.type === "shape" && w.pathArgs && w.pathArgs.d ? l(d, new r.default(w.pathArgs.d, w.transform, w.styles)) : w.type === "ellipse" && w.pathArgs ? function(x, S) {
|
|
1384
|
+
x.save(), p(x, S), S._transform !== void 0 && S._transform !== null && x.transform(S._transform.a || 1, S._transform.b || 0, S._transform.c || 0, S._transform.d || 1, S._transform.tx || 0, S._transform.ty || 0);
|
|
1385
|
+
var B = S._x - S._radiusX, C = S._y - S._radiusY, $ = 2 * S._radiusX, O = 2 * S._radiusY, T = $ / 2 * 0.5522848, M = O / 2 * 0.5522848, P = B + $, L = C + O, I = B + $ / 2, F = C + O / 2;
|
|
1386
|
+
x.beginPath(), x.moveTo(B, F), x.bezierCurveTo(B, F - M, I - T, C, I, C), x.bezierCurveTo(I + T, C, P, F - M, P, F), x.bezierCurveTo(P, F + M, I + T, L, I, L), x.bezierCurveTo(I - T, L, B, F + M, B, F), S._styles && S._styles.fill ? x.fill() : S._styles && S._styles.stroke && x.stroke(), x.restore();
|
|
1387
|
+
}(d, new t.default(parseFloat(w.pathArgs.x) || 0, parseFloat(w.pathArgs.y) || 0, parseFloat(w.pathArgs.radiusX) || 0, parseFloat(w.pathArgs.radiusY) || 0, w.transform, w.styles)) : w.type === "rect" && w.pathArgs && function(x, S) {
|
|
1388
|
+
x.save(), p(x, S), S._transform !== void 0 && S._transform !== null && x.transform(S._transform.a || 1, S._transform.b || 0, S._transform.c || 0, S._transform.d || 1, S._transform.tx || 0, S._transform.ty || 0);
|
|
1389
|
+
var B = S._x, C = S._y, $ = S._width, O = S._height, T = S._cornerRadius;
|
|
1390
|
+
$ < 2 * T && (T = $ / 2), O < 2 * T && (T = O / 2), x.beginPath(), x.moveTo(B + T, C), x.arcTo(B + $, C, B + $, C + O, T), x.arcTo(B + $, C + O, B, C + O, T), x.arcTo(B, C + O, B, C, T), x.arcTo(B, C, B + $, C, T), x.closePath(), S._styles && S._styles.fill ? x.fill() : S._styles && S._styles.stroke && x.stroke(), x.restore();
|
|
1391
|
+
}(d, new h.default(parseFloat(w.pathArgs.x) || 0, parseFloat(w.pathArgs.y) || 0, parseFloat(w.pathArgs.width) || 0, parseFloat(w.pathArgs.height) || 0, parseFloat(w.pathArgs.cornerRadius) || 0, w.transform, w.styles));
|
|
1392
|
+
}), d.restore();
|
|
1393
1393
|
}
|
|
1394
|
-
}),
|
|
1394
|
+
}), s;
|
|
1395
1395
|
};
|
|
1396
|
-
|
|
1397
|
-
}, function(
|
|
1398
|
-
var
|
|
1399
|
-
return (
|
|
1400
|
-
|
|
1401
|
-
} || function(
|
|
1402
|
-
for (var
|
|
1403
|
-
})(
|
|
1404
|
-
}, function(
|
|
1405
|
-
function
|
|
1406
|
-
this.constructor =
|
|
1396
|
+
b.default = o;
|
|
1397
|
+
}, function(n, b, i) {
|
|
1398
|
+
var r, t = (r = function(c, a) {
|
|
1399
|
+
return (r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, l) {
|
|
1400
|
+
p.__proto__ = l;
|
|
1401
|
+
} || function(p, l) {
|
|
1402
|
+
for (var o in l) Object.prototype.hasOwnProperty.call(l, o) && (p[o] = l[o]);
|
|
1403
|
+
})(c, a);
|
|
1404
|
+
}, function(c, a) {
|
|
1405
|
+
function p() {
|
|
1406
|
+
this.constructor = c;
|
|
1407
1407
|
}
|
|
1408
|
-
|
|
1408
|
+
r(c, a), c.prototype = a === null ? Object.create(a) : (p.prototype = a.prototype, new p());
|
|
1409
1409
|
});
|
|
1410
|
-
Object.defineProperty(
|
|
1411
|
-
var
|
|
1412
|
-
function
|
|
1413
|
-
var
|
|
1414
|
-
return
|
|
1410
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1411
|
+
var h = function(c) {
|
|
1412
|
+
function a(p, l, o, s, f, u) {
|
|
1413
|
+
var g = c.call(this) || this;
|
|
1414
|
+
return g._x = p, g._y = l, g._radiusX = o, g._radiusY = s, g._transform = f, g._styles = u, g;
|
|
1415
1415
|
}
|
|
1416
|
-
return
|
|
1417
|
-
}(
|
|
1418
|
-
|
|
1419
|
-
}, function(
|
|
1420
|
-
var
|
|
1421
|
-
return (
|
|
1422
|
-
|
|
1423
|
-
} || function(
|
|
1424
|
-
for (var
|
|
1425
|
-
})(
|
|
1426
|
-
}, function(
|
|
1427
|
-
function
|
|
1428
|
-
this.constructor =
|
|
1416
|
+
return t(a, c), a;
|
|
1417
|
+
}(i(0).default);
|
|
1418
|
+
b.default = h;
|
|
1419
|
+
}, function(n, b, i) {
|
|
1420
|
+
var r, t = (r = function(c, a) {
|
|
1421
|
+
return (r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, l) {
|
|
1422
|
+
p.__proto__ = l;
|
|
1423
|
+
} || function(p, l) {
|
|
1424
|
+
for (var o in l) Object.prototype.hasOwnProperty.call(l, o) && (p[o] = l[o]);
|
|
1425
|
+
})(c, a);
|
|
1426
|
+
}, function(c, a) {
|
|
1427
|
+
function p() {
|
|
1428
|
+
this.constructor = c;
|
|
1429
1429
|
}
|
|
1430
|
-
|
|
1430
|
+
r(c, a), c.prototype = a === null ? Object.create(a) : (p.prototype = a.prototype, new p());
|
|
1431
1431
|
});
|
|
1432
|
-
Object.defineProperty(
|
|
1433
|
-
var
|
|
1434
|
-
function
|
|
1435
|
-
var
|
|
1436
|
-
return
|
|
1432
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1433
|
+
var h = function(c) {
|
|
1434
|
+
function a(p, l, o, s, f, u, g) {
|
|
1435
|
+
var _ = c.call(this) || this;
|
|
1436
|
+
return _._x = p, _._y = l, _._width = o, _._height = s, _._cornerRadius = f, _._transform = u, _._styles = g, _;
|
|
1437
1437
|
}
|
|
1438
|
-
return
|
|
1439
|
-
}(
|
|
1440
|
-
|
|
1441
|
-
}, function(
|
|
1442
|
-
Object.defineProperty(
|
|
1443
|
-
var
|
|
1444
|
-
function
|
|
1438
|
+
return t(a, c), a;
|
|
1439
|
+
}(i(0).default);
|
|
1440
|
+
b.default = h;
|
|
1441
|
+
}, function(n, b, i) {
|
|
1442
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
1443
|
+
var r = function() {
|
|
1444
|
+
function t() {
|
|
1445
1445
|
this._currentTimeMillsecond = function() {
|
|
1446
1446
|
return typeof performance > "u" ? (/* @__PURE__ */ new Date()).getTime() : performance.now();
|
|
1447
1447
|
}, this.noExecutionDelay = !1, this.startValue = 0, this.endValue = 0, this.duration = 0, this.loop = 1, this.fillRule = 0, this.onStart = function() {
|
|
@@ -1449,30 +1449,30 @@ var svga_lite_min = { exports: {} };
|
|
|
1449
1449
|
}, this.onEnd = function() {
|
|
1450
1450
|
}, this._isRunning = !1, this._mStartTime = 0, this._currentFrication = 0, this._worker = null;
|
|
1451
1451
|
}
|
|
1452
|
-
return
|
|
1453
|
-
this.doStart(
|
|
1454
|
-
},
|
|
1452
|
+
return t.prototype.start = function(h) {
|
|
1453
|
+
this.doStart(h);
|
|
1454
|
+
}, t.prototype.stop = function() {
|
|
1455
1455
|
this._doStop();
|
|
1456
|
-
}, Object.defineProperty(
|
|
1456
|
+
}, Object.defineProperty(t.prototype, "animatedValue", { get: function() {
|
|
1457
1457
|
return (this.endValue - this.startValue) * this._currentFrication + this.startValue;
|
|
1458
|
-
}, enumerable: !1, configurable: !0 }),
|
|
1459
|
-
this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(),
|
|
1458
|
+
}, enumerable: !1, configurable: !0 }), t.prototype.doStart = function(h) {
|
|
1459
|
+
this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(), h && (this._mStartTime -= h / (this.endValue - this.startValue) * this.duration), this._currentFrication = 0, this.noExecutionDelay && this._worker === null && (this._worker = new Worker(window.URL.createObjectURL(new Blob([`onmessage = function () {
|
|
1460
1460
|
setTimeout(function() {postMessage(null)}, 1 / 60)
|
|
1461
1461
|
}`])))), this.onStart(), this._doFrame();
|
|
1462
|
-
},
|
|
1462
|
+
}, t.prototype._doStop = function() {
|
|
1463
1463
|
this._isRunning = !1, this._worker !== null && (this._worker.terminate(), this._worker = null);
|
|
1464
|
-
},
|
|
1464
|
+
}, t.prototype._doFrame = function() {
|
|
1465
1465
|
this._isRunning && (this._doDeltaTime(this._currentTimeMillsecond() - this._mStartTime), this._isRunning && (this._worker ? (this._worker.onmessage = this._doFrame.bind(this), this._worker.postMessage(null)) : window.requestAnimationFrame(this._doFrame.bind(this))));
|
|
1466
|
-
},
|
|
1467
|
-
|
|
1468
|
-
},
|
|
1466
|
+
}, t.prototype._doDeltaTime = function(h) {
|
|
1467
|
+
h >= this.duration * this.loop ? (this._currentFrication = this.fillRule === 1 ? 0 : 1, this._isRunning = !1) : this._currentFrication = h % this.duration / this.duration, this.onUpdate(this.animatedValue), this._isRunning === !1 && (this._worker !== null && (this._worker.terminate(), this._worker = null), this.onEnd());
|
|
1468
|
+
}, t;
|
|
1469
1469
|
}();
|
|
1470
|
-
|
|
1470
|
+
b.default = r;
|
|
1471
1471
|
}]).default;
|
|
1472
1472
|
});
|
|
1473
1473
|
})(svga_lite_min);
|
|
1474
1474
|
var svga_lite_minExports = svga_lite_min.exports;
|
|
1475
|
-
const _sfc_main$
|
|
1475
|
+
const _sfc_main$3 = {
|
|
1476
1476
|
__name: "hbis-svgaPlayer",
|
|
1477
1477
|
props: {
|
|
1478
1478
|
/**
|
|
@@ -1551,70 +1551,67 @@ const _sfc_main$1 = {
|
|
|
1551
1551
|
*/
|
|
1552
1552
|
"error"
|
|
1553
1553
|
],
|
|
1554
|
-
setup(
|
|
1554
|
+
setup(n, { expose: b, emit: i }) {
|
|
1555
1555
|
useCssVars((e) => ({
|
|
1556
|
-
|
|
1557
|
-
|
|
1556
|
+
v5ce75b7f: n.width,
|
|
1557
|
+
v26351a8e: n.height
|
|
1558
1558
|
}));
|
|
1559
|
-
const
|
|
1560
|
-
let
|
|
1561
|
-
const
|
|
1559
|
+
const r = n, t = i, h = ref(null), c = ref(null);
|
|
1560
|
+
let a = null, p = null, l = null;
|
|
1561
|
+
const o = async () => {
|
|
1562
1562
|
try {
|
|
1563
|
-
|
|
1563
|
+
a = new svga_lite_minExports.Parser(), l = await a.load(r.src), p = new svga_lite_minExports.Player(c.value), p.loop = r.loop, p.speed = r.speed, p.onStart = () => t("play"), p.onPause = () => t("pause"), p.onEnd = () => t("ended"), p.onFrame = () => t("progress", p.progress), await p.setAnimationData(l), r.progress > 0 && (p.progress = r.progress), r.autoplay && p.start(), t("loaded");
|
|
1564
1564
|
} catch (e) {
|
|
1565
|
-
console.error("SVGA 加载失败:", e),
|
|
1565
|
+
console.error("SVGA 加载失败:", e), t("error", e);
|
|
1566
1566
|
}
|
|
1567
|
-
},
|
|
1568
|
-
|
|
1569
|
-
},
|
|
1570
|
-
|
|
1571
|
-
},
|
|
1572
|
-
|
|
1573
|
-
},
|
|
1574
|
-
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1579
|
-
},
|
|
1580
|
-
|
|
1567
|
+
}, s = () => {
|
|
1568
|
+
p && p.start();
|
|
1569
|
+
}, f = () => {
|
|
1570
|
+
p && p.pause();
|
|
1571
|
+
}, u = () => {
|
|
1572
|
+
p && p.stop();
|
|
1573
|
+
}, g = () => {
|
|
1574
|
+
p && (p.stop(), p.start());
|
|
1575
|
+
}, _ = (e) => {
|
|
1576
|
+
p && (p.progress = e);
|
|
1577
|
+
}, d = (e) => {
|
|
1578
|
+
p && (p.speed = e);
|
|
1579
|
+
}, m = (e) => {
|
|
1580
|
+
p && (p.loop = e);
|
|
1581
1581
|
};
|
|
1582
|
-
return
|
|
1583
|
-
play:
|
|
1584
|
-
pause:
|
|
1585
|
-
stop:
|
|
1586
|
-
restart:
|
|
1587
|
-
setProgress:
|
|
1588
|
-
setSpeed:
|
|
1589
|
-
setLoop:
|
|
1590
|
-
}), watch(() =>
|
|
1591
|
-
e && await
|
|
1592
|
-
}), watch(() =>
|
|
1593
|
-
|
|
1594
|
-
}), watch(() =>
|
|
1595
|
-
|
|
1596
|
-
}), watch(() =>
|
|
1597
|
-
|
|
1582
|
+
return b({
|
|
1583
|
+
play: s,
|
|
1584
|
+
pause: f,
|
|
1585
|
+
stop: u,
|
|
1586
|
+
restart: g,
|
|
1587
|
+
setProgress: _,
|
|
1588
|
+
setSpeed: d,
|
|
1589
|
+
setLoop: m
|
|
1590
|
+
}), watch(() => r.src, async (e) => {
|
|
1591
|
+
e && await o();
|
|
1592
|
+
}), watch(() => r.loop, (e) => {
|
|
1593
|
+
m(e);
|
|
1594
|
+
}), watch(() => r.speed, (e) => {
|
|
1595
|
+
d(e);
|
|
1596
|
+
}), watch(() => r.progress, (e) => {
|
|
1597
|
+
_(e);
|
|
1598
1598
|
}), onMounted(async () => {
|
|
1599
|
-
await nextTick(), await
|
|
1599
|
+
await nextTick(), await o();
|
|
1600
1600
|
}), onUnmounted(() => {
|
|
1601
|
-
|
|
1602
|
-
}), (e,
|
|
1601
|
+
p && (p.stop(), p = null), a && (a = null), l = null;
|
|
1602
|
+
}), (e, E) => (openBlock(), createElementBlock("div", {
|
|
1603
1603
|
ref_key: "containerRef",
|
|
1604
|
-
ref:
|
|
1604
|
+
ref: h,
|
|
1605
1605
|
class: "svga-player-container"
|
|
1606
1606
|
}, [
|
|
1607
1607
|
createElementVNode("canvas", {
|
|
1608
1608
|
ref_key: "canvasRef",
|
|
1609
|
-
ref:
|
|
1609
|
+
ref: c,
|
|
1610
1610
|
class: "svga-player-canvas"
|
|
1611
1611
|
}, null, 512)
|
|
1612
1612
|
], 512));
|
|
1613
1613
|
}
|
|
1614
|
-
}, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1615
|
-
key: 0,
|
|
1616
|
-
class: "dropdown-list"
|
|
1617
|
-
}, _hoisted_4 = ["onClick"], _hoisted_5 = { class: "item-text" }, _sfc_main = {
|
|
1614
|
+
}, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-6b83dcf1"]]), _hoisted_1$2 = { class: "search-dropdown" }, _hoisted_2$2 = ["placeholder"], _hoisted_3$2 = ["onClick"], _hoisted_4$2 = { class: "item-text" }, _sfc_main$2 = {
|
|
1618
1615
|
__name: "hbis-search-input",
|
|
1619
1616
|
props: {
|
|
1620
1617
|
list: {
|
|
@@ -1631,83 +1628,339 @@ const _sfc_main$1 = {
|
|
|
1631
1628
|
},
|
|
1632
1629
|
maxHeight: {
|
|
1633
1630
|
type: Number,
|
|
1634
|
-
default:
|
|
1631
|
+
default: 200
|
|
1635
1632
|
},
|
|
1636
1633
|
showClear: {
|
|
1637
1634
|
type: Boolean,
|
|
1638
1635
|
default: !0
|
|
1636
|
+
},
|
|
1637
|
+
onFocusShowList: {
|
|
1638
|
+
type: Boolean,
|
|
1639
|
+
default: !0
|
|
1640
|
+
},
|
|
1641
|
+
enterSearch: {
|
|
1642
|
+
//点击搜索后再筛选列表
|
|
1643
|
+
type: Boolean,
|
|
1644
|
+
default: !1
|
|
1639
1645
|
}
|
|
1640
1646
|
},
|
|
1641
1647
|
emits: ["clearIcon", "search", "select"],
|
|
1642
|
-
setup(
|
|
1643
|
-
const
|
|
1644
|
-
function
|
|
1645
|
-
|
|
1648
|
+
setup(n, { emit: b }) {
|
|
1649
|
+
const i = n, r = b, t = ref(i.defaultValue), h = ref(!1), c = ref(!1), a = ref([]);
|
|
1650
|
+
function p() {
|
|
1651
|
+
t.value = "", a.value = [], c.value = !1, r("clearIcon", "", []);
|
|
1652
|
+
}
|
|
1653
|
+
function l() {
|
|
1654
|
+
if (!i.enterSearch)
|
|
1655
|
+
return;
|
|
1656
|
+
const g = t.value;
|
|
1657
|
+
a.value = i.list.filter(
|
|
1658
|
+
(_) => _.label && _.label.includes(g)
|
|
1659
|
+
), c.value = a.value.length > 0, r("search", g, a.value);
|
|
1646
1660
|
}
|
|
1647
|
-
function
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1661
|
+
function o() {
|
|
1662
|
+
if (i.enterSearch)
|
|
1663
|
+
return;
|
|
1664
|
+
const g = t.value;
|
|
1665
|
+
a.value = i.list.filter(
|
|
1666
|
+
(_) => _.label && _.label.includes(g)
|
|
1667
|
+
), c.value = a.value.length > 0, r("search", g, a.value);
|
|
1652
1668
|
}
|
|
1653
|
-
function
|
|
1654
|
-
|
|
1655
|
-
(
|
|
1656
|
-
), c.value = !0,
|
|
1669
|
+
function s() {
|
|
1670
|
+
i.onFocusShowList && (a.value = i.list.filter(
|
|
1671
|
+
(g) => g.label && g.label.includes(t.value)
|
|
1672
|
+
), c.value = !0), h.value = !0;
|
|
1657
1673
|
}
|
|
1658
|
-
function
|
|
1674
|
+
function f() {
|
|
1659
1675
|
setTimeout(() => {
|
|
1660
|
-
|
|
1676
|
+
h.value = !1, c.value = !1;
|
|
1661
1677
|
}, 150);
|
|
1662
1678
|
}
|
|
1663
|
-
function
|
|
1664
|
-
|
|
1679
|
+
function u(g) {
|
|
1680
|
+
t.value = g.label, c.value = !1, r("select", g);
|
|
1665
1681
|
}
|
|
1666
1682
|
return onMounted(() => {
|
|
1667
|
-
|
|
1668
|
-
}), (
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1683
|
+
i.defaultValue && (t.value = i.defaultValue);
|
|
1684
|
+
}), (g, _) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1685
|
+
createElementVNode("div", {
|
|
1686
|
+
class: normalizeClass(["input-wrapper", { focus: h.value }])
|
|
1687
|
+
}, [
|
|
1688
|
+
withDirectives(createElementVNode("input", {
|
|
1689
|
+
class: "search-input",
|
|
1690
|
+
placeholder: n.placeholder,
|
|
1691
|
+
"onUpdate:modelValue": _[0] || (_[0] = (d) => t.value = d),
|
|
1692
|
+
onInput: o,
|
|
1693
|
+
onFocus: s,
|
|
1694
|
+
onBlur: f,
|
|
1695
|
+
onKeyup: withKeys(l, ["enter"])
|
|
1696
|
+
}, null, 40, _hoisted_2$2), [
|
|
1697
|
+
[vModelText, t.value]
|
|
1698
|
+
]),
|
|
1699
|
+
t.value && n.showClear ? (openBlock(), createElementBlock("div", {
|
|
1700
|
+
key: 0,
|
|
1701
|
+
class: "clear-icon",
|
|
1702
|
+
onClick: p
|
|
1703
|
+
}, "×")) : createCommentVNode("", !0)
|
|
1704
|
+
], 2),
|
|
1705
|
+
c.value && a.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1706
|
+
key: 0,
|
|
1707
|
+
class: "dropdown-list",
|
|
1708
|
+
style: normalizeStyle({ maxHeight: n.maxHeight + "px" })
|
|
1709
|
+
}, [
|
|
1710
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (d, m) => (openBlock(), createElementBlock("div", {
|
|
1711
|
+
key: m,
|
|
1712
|
+
class: "dropdown-item",
|
|
1713
|
+
onClick: (e) => u(d)
|
|
1673
1714
|
}, [
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1715
|
+
createElementVNode("span", _hoisted_4$2, toDisplayString(d.label), 1)
|
|
1716
|
+
], 8, _hoisted_3$2))), 128))
|
|
1717
|
+
], 4)) : createCommentVNode("", !0)
|
|
1718
|
+
]));
|
|
1719
|
+
}
|
|
1720
|
+
}, _hoisted_1$1 = { class: "dropdown-filter" }, _hoisted_2$1 = { class: "filter-container" }, _hoisted_3$1 = ["onClick"], _hoisted_4$1 = { class: "filter-label" }, _hoisted_5$1 = { class: "filter-value-group" }, _hoisted_6$1 = { class: "filter-value" }, _hoisted_7$1 = ["onClick"], _sfc_main$1 = {
|
|
1721
|
+
__name: "hbis-dropdown-select",
|
|
1722
|
+
props: {
|
|
1723
|
+
// 筛选配置项
|
|
1724
|
+
options: {
|
|
1725
|
+
type: Array,
|
|
1726
|
+
default: () => []
|
|
1727
|
+
},
|
|
1728
|
+
// 当前选中值
|
|
1729
|
+
modelValue: {
|
|
1730
|
+
type: Object,
|
|
1731
|
+
default: () => ({})
|
|
1732
|
+
},
|
|
1733
|
+
// 是否显示箭头
|
|
1734
|
+
showArrow: {
|
|
1735
|
+
type: Boolean,
|
|
1736
|
+
default: !0
|
|
1737
|
+
},
|
|
1738
|
+
// 下拉列表高度
|
|
1739
|
+
listHeight: {
|
|
1740
|
+
type: Number,
|
|
1741
|
+
default: 0
|
|
1742
|
+
},
|
|
1743
|
+
// 选中颜色
|
|
1744
|
+
chosenColor: {
|
|
1745
|
+
type: String,
|
|
1746
|
+
default: "#ee0a24"
|
|
1747
|
+
},
|
|
1748
|
+
// 未选中颜色
|
|
1749
|
+
unChosenColor: {
|
|
1750
|
+
type: String,
|
|
1751
|
+
default: "#000"
|
|
1752
|
+
},
|
|
1753
|
+
// 是否显示下拉列表滚动条
|
|
1754
|
+
showScrollBar: {
|
|
1755
|
+
type: Boolean,
|
|
1756
|
+
default: !1
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
emits: ["update:modelValue", "change"],
|
|
1760
|
+
setup(n, { emit: b }) {
|
|
1761
|
+
const i = n, r = b, t = ref(-1), h = ref(i.options), c = (o) => {
|
|
1762
|
+
t.value === o ? t.value = -1 : t.value = o;
|
|
1763
|
+
}, a = (o, s, f) => {
|
|
1764
|
+
const u = {
|
|
1765
|
+
...i.modelValue
|
|
1766
|
+
};
|
|
1767
|
+
u[o.key] = s.value, r("update:modelValue", u), r("change", {
|
|
1768
|
+
item: o,
|
|
1769
|
+
option: s,
|
|
1770
|
+
index: f
|
|
1771
|
+
}), t.value = -1;
|
|
1772
|
+
}, p = (o) => {
|
|
1773
|
+
const s = i.modelValue[o.key];
|
|
1774
|
+
if (s !== void 0) {
|
|
1775
|
+
const f = o.options.find((u) => u.value === s);
|
|
1776
|
+
return f ? f.label : "请选择";
|
|
1777
|
+
}
|
|
1778
|
+
return "请选择";
|
|
1779
|
+
}, l = (o, s) => i.modelValue[o.key] === s.value;
|
|
1780
|
+
return (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
1781
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
1782
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (f, u) => (openBlock(), createElementBlock("div", {
|
|
1783
|
+
key: u,
|
|
1784
|
+
class: normalizeClass(["filter-item", { active: t.value === u }])
|
|
1785
|
+
}, [
|
|
1786
|
+
createElementVNode("div", {
|
|
1787
|
+
class: "filter-header",
|
|
1788
|
+
onClick: (g) => c(u)
|
|
1789
|
+
}, [
|
|
1790
|
+
createElementVNode("span", _hoisted_4$1, toDisplayString(f.label), 1),
|
|
1791
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
1792
|
+
createElementVNode("span", _hoisted_6$1, toDisplayString(p(f)), 1),
|
|
1793
|
+
i.showArrow ? (openBlock(), createElementBlock("div", {
|
|
1794
|
+
key: 0,
|
|
1795
|
+
class: normalizeClass(["arrow", { up: t.value === u }])
|
|
1796
|
+
}, null, 2)) : createCommentVNode("", !0)
|
|
1797
|
+
])
|
|
1798
|
+
], 8, _hoisted_3$1),
|
|
1799
|
+
t.value === u ? (openBlock(), createElementBlock("div", {
|
|
1685
1800
|
key: 0,
|
|
1686
|
-
class: "
|
|
1687
|
-
|
|
1688
|
-
},
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1801
|
+
class: normalizeClass([i.showScrollBar ? "dropdown-menu-show" : "dropdown-menu-hide"]),
|
|
1802
|
+
style: normalizeStyle(i.listHeight ? `height: ${i.listHeight}px;` : `height: ${f.options.length * 40}px;`)
|
|
1803
|
+
}, [
|
|
1804
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(f.options, (g, _) => (openBlock(), createElementBlock("div", {
|
|
1805
|
+
key: _,
|
|
1806
|
+
class: normalizeClass(["dropdown-item", { selected: l(f, g) }]),
|
|
1807
|
+
onClick: (d) => a(f, g, u)
|
|
1808
|
+
}, [
|
|
1809
|
+
createElementVNode("span", {
|
|
1810
|
+
style: normalizeStyle(l(f, g) ? `color: ${i.chosenColor};` : `color: ${i.unChosenColor};`)
|
|
1811
|
+
}, toDisplayString(g.label), 5)
|
|
1812
|
+
], 10, _hoisted_7$1))), 128))
|
|
1813
|
+
], 6)) : createCommentVNode("", !0)
|
|
1814
|
+
], 2))), 128))
|
|
1815
|
+
])
|
|
1816
|
+
]));
|
|
1817
|
+
}
|
|
1818
|
+
}, hbisDropdownSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1a98ef80"]]), _hoisted_1 = {
|
|
1819
|
+
key: 0,
|
|
1820
|
+
class: "hbis-password-input"
|
|
1821
|
+
}, _hoisted_2 = { class: "password-dialog" }, _hoisted_3 = { class: "password-header" }, _hoisted_4 = { class: "password-title" }, _hoisted_5 = { class: "password-body" }, _hoisted_6 = { class: "password-input-container" }, _hoisted_7 = {
|
|
1822
|
+
key: 0,
|
|
1823
|
+
class: "password-visible"
|
|
1824
|
+
}, _hoisted_8 = {
|
|
1825
|
+
key: 1,
|
|
1826
|
+
class: "password-hidden"
|
|
1827
|
+
}, _hoisted_9 = { class: "password-keyboard" }, _hoisted_10 = ["onClick"], _hoisted_11 = { class: "password-footer" }, _sfc_main = {
|
|
1828
|
+
__name: "hbis-password-input",
|
|
1829
|
+
props: {
|
|
1830
|
+
/**
|
|
1831
|
+
* 是否显示弹窗
|
|
1832
|
+
*/
|
|
1833
|
+
visible: {
|
|
1834
|
+
type: Boolean,
|
|
1835
|
+
default: !1
|
|
1836
|
+
},
|
|
1837
|
+
/**
|
|
1838
|
+
* 弹窗标题
|
|
1839
|
+
*/
|
|
1840
|
+
title: {
|
|
1841
|
+
type: String,
|
|
1842
|
+
default: "请输入密码"
|
|
1843
|
+
},
|
|
1844
|
+
/**
|
|
1845
|
+
* 确认按钮文本
|
|
1846
|
+
*/
|
|
1847
|
+
confirmText: {
|
|
1848
|
+
type: String,
|
|
1849
|
+
default: "确定"
|
|
1850
|
+
},
|
|
1851
|
+
/**
|
|
1852
|
+
* 密码最大长度
|
|
1853
|
+
*/
|
|
1854
|
+
maxLength: {
|
|
1855
|
+
type: Number,
|
|
1856
|
+
default: 6
|
|
1857
|
+
},
|
|
1858
|
+
/**
|
|
1859
|
+
* 是否明文显示密码
|
|
1860
|
+
*/
|
|
1861
|
+
showPassword: {
|
|
1862
|
+
type: Boolean,
|
|
1863
|
+
default: !1
|
|
1864
|
+
},
|
|
1865
|
+
/**
|
|
1866
|
+
* 自定义数字键盘布局
|
|
1867
|
+
*/
|
|
1868
|
+
keyboardLayout: {
|
|
1869
|
+
type: Array,
|
|
1870
|
+
default: () => [
|
|
1871
|
+
["1", "2", "3"],
|
|
1872
|
+
["4", "5", "6"],
|
|
1873
|
+
["7", "8", "9"],
|
|
1874
|
+
["清除", "0", "删除"]
|
|
1875
|
+
]
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1878
|
+
emits: [
|
|
1879
|
+
/**
|
|
1880
|
+
* 密码输入完成事件
|
|
1881
|
+
* @param {string} password - 输入的密码
|
|
1882
|
+
*/
|
|
1883
|
+
"complete",
|
|
1884
|
+
/**
|
|
1885
|
+
* 关闭弹窗事件
|
|
1886
|
+
*/
|
|
1887
|
+
"close",
|
|
1888
|
+
/**
|
|
1889
|
+
* 确认按钮点击事件
|
|
1890
|
+
* @param {string} password - 输入的密码
|
|
1891
|
+
*/
|
|
1892
|
+
"confirm"
|
|
1893
|
+
],
|
|
1894
|
+
setup(n, { emit: b }) {
|
|
1895
|
+
const i = n, r = b, t = ref([]), h = (o) => ["清除", "删除"].includes(o);
|
|
1896
|
+
watch(t, (o) => {
|
|
1897
|
+
if (o.length === i.maxLength) {
|
|
1898
|
+
const s = o.join("");
|
|
1899
|
+
r("complete", s);
|
|
1900
|
+
}
|
|
1901
|
+
}, { deep: !0 });
|
|
1902
|
+
const c = (o) => {
|
|
1903
|
+
o === "清除" ? t.value = [] : o === "删除" ? t.value = t.value.slice(0, -1) : /^[0-9]$/.test(o) && t.value.length < i.maxLength && t.value.push(o);
|
|
1904
|
+
}, a = () => {
|
|
1905
|
+
}, p = () => {
|
|
1906
|
+
r("close"), r("update:visible", !1);
|
|
1907
|
+
}, l = () => {
|
|
1908
|
+
const o = t.value.join("");
|
|
1909
|
+
r("confirm", o);
|
|
1708
1910
|
};
|
|
1911
|
+
return onMounted(() => {
|
|
1912
|
+
t.value = [];
|
|
1913
|
+
}), watch(() => i.visible, (o) => {
|
|
1914
|
+
o && (t.value = []);
|
|
1915
|
+
}), (o, s) => n.visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1916
|
+
createElementVNode("div", {
|
|
1917
|
+
class: "password-overlay",
|
|
1918
|
+
onClick: a
|
|
1919
|
+
}),
|
|
1920
|
+
createElementVNode("div", _hoisted_2, [
|
|
1921
|
+
createElementVNode("div", _hoisted_3, [
|
|
1922
|
+
createElementVNode("h3", _hoisted_4, toDisplayString(n.title), 1),
|
|
1923
|
+
createElementVNode("button", {
|
|
1924
|
+
class: "password-close",
|
|
1925
|
+
onClick: p
|
|
1926
|
+
}, "×")
|
|
1927
|
+
]),
|
|
1928
|
+
createElementVNode("div", _hoisted_5, [
|
|
1929
|
+
createElementVNode("div", _hoisted_6, [
|
|
1930
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.maxLength, (f, u) => (openBlock(), createElementBlock("div", {
|
|
1931
|
+
key: u,
|
|
1932
|
+
class: "password-input-item"
|
|
1933
|
+
}, [
|
|
1934
|
+
n.showPassword ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(t.value[u] || ""), 1)) : (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(t.value[u] ? "●" : ""), 1))
|
|
1935
|
+
]))), 128))
|
|
1936
|
+
]),
|
|
1937
|
+
createElementVNode("div", _hoisted_9, [
|
|
1938
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.keyboardLayout, (f, u) => (openBlock(), createElementBlock("div", {
|
|
1939
|
+
key: u,
|
|
1940
|
+
class: "keyboard-row"
|
|
1941
|
+
}, [
|
|
1942
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(f, (g, _) => (openBlock(), createElementBlock("button", {
|
|
1943
|
+
key: _,
|
|
1944
|
+
class: normalizeClass(["keyboard-key", { "keyboard-key-action": h(g) }]),
|
|
1945
|
+
onClick: (d) => c(g)
|
|
1946
|
+
}, toDisplayString(g), 11, _hoisted_10))), 128))
|
|
1947
|
+
]))), 128))
|
|
1948
|
+
])
|
|
1949
|
+
]),
|
|
1950
|
+
createElementVNode("div", _hoisted_11, [
|
|
1951
|
+
createElementVNode("button", {
|
|
1952
|
+
class: "password-cancel",
|
|
1953
|
+
onClick: p
|
|
1954
|
+
}, "取消"),
|
|
1955
|
+
createElementVNode("button", {
|
|
1956
|
+
class: "password-confirm",
|
|
1957
|
+
onClick: l
|
|
1958
|
+
}, toDisplayString(n.confirmText), 1)
|
|
1959
|
+
])
|
|
1960
|
+
])
|
|
1961
|
+
])) : createCommentVNode("", !0);
|
|
1709
1962
|
}
|
|
1710
|
-
};
|
|
1963
|
+
}, hbisPasswordInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-32ee9eeb"]]);
|
|
1711
1964
|
export {
|
|
1712
1965
|
C1,
|
|
1713
1966
|
C2,
|
|
@@ -1717,9 +1970,11 @@ export {
|
|
|
1717
1970
|
HbisWaterfall,
|
|
1718
1971
|
HbisAutoScrollList as hbisAutoScrollList,
|
|
1719
1972
|
hbisDateStrip,
|
|
1973
|
+
hbisDropdownSelect as hbisDropDownSelect,
|
|
1720
1974
|
hbisLoading,
|
|
1721
|
-
|
|
1722
|
-
_sfc_main as
|
|
1975
|
+
hbisPasswordInput,
|
|
1976
|
+
_sfc_main$8 as hbisPreviewImage,
|
|
1977
|
+
_sfc_main$2 as hbisSearchInput,
|
|
1723
1978
|
HbisSmsInput as hbisSmsInput,
|
|
1724
1979
|
HbisSvgaPlayer as hbisSvgaPlayer,
|
|
1725
1980
|
HbisWaterfall as hbisWaterfall
|