@hbis-uni/components 2.0.1 → 2.0.3

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.es.js CHANGED
@@ -1,25 +1,25 @@
1
1
  import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode, createCommentVNode, computed, ref, onMounted, watch, Fragment, renderList, normalizeStyle, useCssVars, nextTick, onUnmounted } from "vue";
2
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2
+ const _sfc_main$5 = /* @__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(c) {
9
- return (y, i) => (openBlock(), createElementBlock("div", {
10
- class: normalizeClass(["c1-container", { "c1-primary": c.primary }])
8
+ setup(y) {
9
+ return (g, n) => (openBlock(), createElementBlock("div", {
10
+ class: normalizeClass(["c1-container", { "c1-primary": y.primary }])
11
11
  }, [
12
- renderSlot(y.$slots, "default", {}, () => [
13
- createTextVNode(toDisplayString(c.title), 1)
12
+ renderSlot(g.$slots, "default", {}, () => [
13
+ createTextVNode(toDisplayString(y.title), 1)
14
14
  ], !0)
15
15
  ], 2));
16
16
  }
17
- }), _export_sfc = (c, y) => {
18
- const i = c.__vccOpts || c;
19
- for (const [r, n] of y)
20
- i[r] = n;
21
- return i;
22
- }, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e2028f64"]]), _hoisted_1$1 = { class: "c2-container" }, _hoisted_2$1 = { class: "c2-title" }, _hoisted_3$1 = { class: "c2-content" }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
17
+ }), _export_sfc = (y, g) => {
18
+ const n = y.__vccOpts || y;
19
+ for (const [t, r] of g)
20
+ n[t] = r;
21
+ return n;
22
+ }, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e2250793"]]), _hoisted_1$2 = { class: "c2-container" }, _hoisted_2$2 = { class: "c2-title" }, _hoisted_3$2 = { class: "c2-content" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
23
23
  __name: "C2",
24
24
  props: {
25
25
  title: { default: "C2 Component" },
@@ -27,33 +27,33 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
27
27
  buttonText: { default: "Click Me" }
28
28
  },
29
29
  emits: ["click"],
30
- setup(c, { emit: y }) {
31
- const i = y, r = (n) => {
32
- i("click", n);
30
+ setup(y, { emit: g }) {
31
+ const n = g, t = (r) => {
32
+ n("click", r);
33
33
  };
34
- return (n, m) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
35
- createElementVNode("h2", _hoisted_2$1, toDisplayString(c.title), 1),
36
- createElementVNode("div", _hoisted_3$1, [
37
- renderSlot(n.$slots, "default", {}, void 0, !0)
34
+ return (r, v) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
35
+ createElementVNode("h2", _hoisted_2$2, toDisplayString(y.title), 1),
36
+ createElementVNode("div", _hoisted_3$2, [
37
+ renderSlot(r.$slots, "default", {}, void 0, !0)
38
38
  ]),
39
- c.showButton ? (openBlock(), createElementBlock("button", {
39
+ y.showButton ? (openBlock(), createElementBlock("button", {
40
40
  key: 0,
41
41
  class: "c2-button",
42
- onClick: r
43
- }, toDisplayString(c.buttonText), 1)) : createCommentVNode("", !0)
42
+ onClick: t
43
+ }, toDisplayString(y.buttonText), 1)) : createCommentVNode("", !0)
44
44
  ]));
45
45
  }
46
- }), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b1d573ae"]]), _hoisted_1 = { key: 0 }, _hoisted_2 = { class: "hbis-date-strip__weekdays" }, _hoisted_3 = { class: "hbis-date-strip__dates" }, _hoisted_4 = ["onClick"], _hoisted_5 = { class: "hbis-date-strip__date-number" }, _hoisted_6 = { class: "hbis-date-strip__date-slot" }, _hoisted_7 = {
46
+ }), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ed1086ed"]]), _hoisted_1$1 = { key: 0 }, _hoisted_2$1 = { class: "hbis-date-strip__weekdays" }, _hoisted_3$1 = { class: "hbis-date-strip__dates" }, _hoisted_4$1 = ["onClick"], _hoisted_5$1 = { class: "hbis-date-strip__date-number" }, _hoisted_6$1 = { class: "hbis-date-strip__date-slot" }, _hoisted_7$1 = {
47
47
  key: 1,
48
48
  class: "hbis-date-strip__scroll-wrapper"
49
- }, _hoisted_8 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9 = { class: "hbis-date-strip__weekdays" }, _hoisted_10 = { class: "hbis-date-strip__dates" }, _hoisted_11 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
49
+ }, _hoisted_8$1 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9 = { class: "hbis-date-strip__weekdays" }, _hoisted_10 = { class: "hbis-date-strip__dates" }, _hoisted_11 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$3 = /* @__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 c = /* @__PURE__ */ new Date();
56
- return c.setDate(c.getDate() + 30), c;
55
+ const y = /* @__PURE__ */ new Date();
56
+ return y.setDate(y.getDate() + 30), y;
57
57
  } },
58
58
  highlightType: { default: "bg" },
59
59
  showToday: { type: Boolean, default: !0 },
@@ -67,33 +67,33 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
67
67
  visibleDays: { default: 7 }
68
68
  },
69
69
  emits: ["update:modelValue", "dateClick"],
70
- setup(c, { emit: y }) {
71
- const i = c, r = y, n = computed(() => {
70
+ setup(y, { emit: g }) {
71
+ const n = y, t = g, r = computed(() => {
72
72
  if (console.log("props:", {
73
- startDate: i.startDate,
74
- endDate: i.endDate,
75
- scrollable: i.scrollable
76
- }), i.scrollable)
73
+ startDate: n.startDate,
74
+ endDate: n.endDate,
75
+ scrollable: n.scrollable
76
+ }), n.scrollable)
77
77
  return console.log("显式设置了scrollable为true,允许滚动"), !0;
78
78
  try {
79
- const s = new Date(i.startDate);
80
- s.setHours(0, 0, 0, 0);
81
- const u = new Date(i.endDate);
82
- if (u.setHours(0, 0, 0, 0), isNaN(s.getTime()) || isNaN(u.getTime()))
79
+ const a = new Date(n.startDate);
80
+ a.setHours(0, 0, 0, 0);
81
+ const p = new Date(n.endDate);
82
+ if (p.setHours(0, 0, 0, 0), isNaN(a.getTime()) || isNaN(p.getTime()))
83
83
  return console.log("无效的日期对象,使用默认滚动行为"), !1;
84
- const e = u.getTime() - s.getTime(), k = Math.ceil(e / (1e3 * 60 * 60 * 24)), o = k + 1;
84
+ const e = p.getTime() - a.getTime(), A = Math.ceil(e / (1e3 * 60 * 60 * 24)), d = A + 1;
85
85
  return console.log("日期范围天数计算:", {
86
- start: s.toLocaleDateString(),
87
- end: u.toLocaleDateString(),
86
+ start: a.toLocaleDateString(),
87
+ end: p.toLocaleDateString(),
88
88
  diffTime: e,
89
- diffDays: k,
90
- totalDays: o,
91
- shouldScroll: o > 7
92
- }), o > 7;
93
- } catch (s) {
94
- return console.error("计算日期范围时出错:", s), !1;
89
+ diffDays: A,
90
+ totalDays: d,
91
+ shouldScroll: d > 7
92
+ }), d > 7;
93
+ } catch (a) {
94
+ return console.error("计算日期范围时出错:", a), !1;
95
95
  }
96
- }), m = [
96
+ }), v = [
97
97
  { value: 0, label: "日", isWeekend: !0 },
98
98
  { value: 1, label: "一", isWeekend: !1 },
99
99
  { value: 2, label: "二", isWeekend: !1 },
@@ -101,145 +101,398 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
101
101
  { value: 4, label: "四", isWeekend: !1 },
102
102
  { value: 5, label: "五", isWeekend: !1 },
103
103
  { value: 6, label: "六", isWeekend: !0 }
104
- ], f = computed(() => {
105
- const s = d.value[0];
106
- if (!s)
107
- return m;
108
- const u = s.weekday, e = [];
109
- for (let k = 0; k < 7; k++) {
110
- const o = (u + k) % 7;
111
- e.push(m[o]);
104
+ ], h = computed(() => {
105
+ const a = s.value[0];
106
+ if (!a)
107
+ return v;
108
+ const p = a.weekday, e = [];
109
+ for (let A = 0; A < 7; A++) {
110
+ const d = (p + A) % 7;
111
+ e.push(v[d]);
112
112
  }
113
113
  return e;
114
114
  });
115
115
  ref((() => {
116
- const s = i.startDate || /* @__PURE__ */ new Date(), u = s.getDay(), e = s.getDate() - (u === 0 ? 6 : u - 1), k = new Date(s);
117
- return k.setDate(e), k;
116
+ const a = n.startDate || /* @__PURE__ */ new Date(), p = a.getDay(), e = a.getDate() - (p === 0 ? 6 : p - 1), A = new Date(a);
117
+ return A.setDate(e), A;
118
118
  })()), onMounted(() => {
119
- console.log("props:", i), console.log("highlightType:", i.highlightType);
119
+ console.log("props:", n), console.log("highlightType:", n.highlightType);
120
120
  }), watch(
121
- () => i.highlightType,
122
- (s) => {
123
- console.log("highlightType changed:", s);
121
+ () => n.highlightType,
122
+ (a) => {
123
+ console.log("highlightType changed:", a);
124
124
  }
125
125
  ), watch(
126
- () => i.modelValue,
127
- (s) => {
128
- console.log("modelValue changed:", s);
126
+ () => n.modelValue,
127
+ (a) => {
128
+ console.log("modelValue changed:", a);
129
129
  }
130
130
  );
131
- const a = computed(() => {
132
- const s = [];
131
+ const o = computed(() => {
132
+ const a = [];
133
133
  try {
134
- const u = i.startDate, e = i.endDate;
135
- if (isNaN(u.getTime()) || isNaN(e.getTime()))
136
- return console.log("无效的日期对象,返回空数组"), s;
137
- const k = Math.ceil((e.getTime() - u.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
138
- for (let o = 0; o < k; o++) {
139
- const g = new Date(u);
140
- g.setDate(u.getDate() + o), isNaN(g.getTime()) || s.push({
141
- date: g,
142
- dateString: l(g),
143
- day: g.getDate(),
144
- month: g.getMonth() + 1,
145
- year: g.getFullYear(),
146
- isWeekend: g.getDay() === 0 || g.getDay() === 6,
147
- weekday: g.getDay()
134
+ const p = n.startDate, e = n.endDate;
135
+ if (isNaN(p.getTime()) || isNaN(e.getTime()))
136
+ return console.log("无效的日期对象,返回空数组"), a;
137
+ const A = Math.ceil((e.getTime() - p.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
138
+ for (let d = 0; d < A; d++) {
139
+ const w = new Date(p);
140
+ w.setDate(p.getDate() + d), isNaN(w.getTime()) || a.push({
141
+ date: w,
142
+ dateString: l(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 (u) {
151
- console.error("生成日期数组时出错:", u);
150
+ } catch (p) {
151
+ console.error("生成日期数组时出错:", p);
152
152
  }
153
- return s;
154
- }), d = computed(() => a.value.filter((s) => !!(s && s.date && s.dateString && !isNaN(s.date.getTime()) && typeof s.dateString == "string" && typeof s.day == "number"))), l = (s) => `${s.getFullYear()}-${String(s.getMonth() + 1).padStart(2, "0")}-${String(s.getDate()).padStart(2, "0")}`, t = (s) => {
155
- const u = s.dateString;
156
- return i.modelValue ? Array.isArray(i.modelValue) ? i.modelValue.some((e) => !e || isNaN(e.getTime()) ? !1 : l(e) === u) : isNaN(i.modelValue.getTime()) ? !1 : l(i.modelValue) === u : !1;
157
- }, h = (s) => {
158
- const u = l(/* @__PURE__ */ new Date());
159
- return s.dateString === u;
160
- }, p = (s) => {
161
- const u = s.date;
162
- return i.disablePast && u < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || i.disableFuture && u > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : u >= i.startDate && u <= i.endDate;
163
- }, x = (s) => {
164
- var u;
165
- return ((u = m.find((e) => e.value === s)) == null ? void 0 : u.label) || "";
166
- }, _ = (s) => {
167
- p(s) && (r("dateClick", s), r("update:modelValue", s.date));
153
+ return a;
154
+ }), s = computed(() => o.value.filter((a) => !!(a && a.date && a.dateString && !isNaN(a.date.getTime()) && typeof a.dateString == "string" && typeof a.day == "number"))), l = (a) => `${a.getFullYear()}-${String(a.getMonth() + 1).padStart(2, "0")}-${String(a.getDate()).padStart(2, "0")}`, i = (a) => {
155
+ const p = a.dateString;
156
+ return n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue.some((e) => !e || isNaN(e.getTime()) ? !1 : l(e) === p) : isNaN(n.modelValue.getTime()) ? !1 : l(n.modelValue) === p : !1;
157
+ }, f = (a) => {
158
+ const p = l(/* @__PURE__ */ new Date());
159
+ return a.dateString === p;
160
+ }, u = (a) => {
161
+ const p = a.date;
162
+ return n.disablePast && p < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || n.disableFuture && p > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : p >= n.startDate && p <= n.endDate;
163
+ }, S = (a) => {
164
+ var p;
165
+ return ((p = v.find((e) => e.value === a)) == null ? void 0 : p.label) || "";
166
+ }, k = (a) => {
167
+ u(a) && (t("dateClick", a), t("update:modelValue", a.date));
168
168
  };
169
- return (s, u) => (openBlock(), createElementBlock("div", {
169
+ return (a, p) => (openBlock(), createElementBlock("div", {
170
170
  class: normalizeClass(["hbis-date-strip", {
171
- "hbis-date-strip--highlight-bg": c.highlightType === "bg",
172
- "hbis-date-strip--highlight-dot": c.highlightType === "dot",
173
- "hbis-date-strip--highlight-round": c.highlightType === "round",
174
- "hbis-date-strip--scrollable": n.value
171
+ "hbis-date-strip--highlight-bg": y.highlightType === "bg",
172
+ "hbis-date-strip--highlight-dot": y.highlightType === "dot",
173
+ "hbis-date-strip--highlight-round": y.highlightType === "round",
174
+ "hbis-date-strip--scrollable": r.value
175
175
  }])
176
176
  }, [
177
- n.value ? (openBlock(), createElementBlock("div", _hoisted_7, [
178
- createElementVNode("div", _hoisted_8, [
177
+ r.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
178
+ createElementVNode("div", _hoisted_8$1, [
179
179
  createElementVNode("div", _hoisted_9, [
180
- (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (e) => (openBlock(), createElementBlock("div", {
180
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(s.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(x(e.weekday)), 3))), 128))
185
+ }, toDisplayString(S(e.weekday)), 3))), 128))
186
186
  ]),
187
187
  createElementVNode("div", _hoisted_10, [
188
- (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (e) => (openBlock(), createElementBlock("div", {
188
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e) => (openBlock(), createElementBlock("div", {
189
189
  key: e.dateString,
190
190
  class: normalizeClass(["hbis-date-strip__date", {
191
- "hbis-date-strip__date--selected": t(e),
192
- "hbis-date-strip__date--today": h(e),
193
- "hbis-date-strip__date--disabled": !p(e),
191
+ "hbis-date-strip__date--selected": i(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: t(e) ? c.selectedColor : c.normalColor,
198
- backgroundColor: t(e) ? c.selectedBgColor : c.normalBgColor
197
+ color: i(e) ? y.selectedColor : y.normalColor,
198
+ backgroundColor: i(e) ? y.selectedBgColor : y.normalBgColor
199
199
  }),
200
- onClick: (k) => _(e)
200
+ onClick: (A) => k(e)
201
201
  }, [
202
202
  createElementVNode("div", _hoisted_12, toDisplayString(e.day), 1),
203
203
  createElementVNode("div", _hoisted_13, [
204
- renderSlot(s.$slots, "default", { date: e }, void 0, !0)
204
+ renderSlot(a.$slots, "default", { date: e }, void 0, !0)
205
205
  ])
206
206
  ], 14, _hoisted_11))), 128))
207
207
  ])
208
208
  ])
209
- ])) : (openBlock(), createElementBlock("div", _hoisted_1, [
210
- createElementVNode("div", _hoisted_2, [
211
- (openBlock(!0), createElementBlock(Fragment, null, renderList(f.value, (e) => (openBlock(), createElementBlock("div", {
209
+ ])) : (openBlock(), createElementBlock("div", _hoisted_1$1, [
210
+ createElementVNode("div", _hoisted_2$1, [
211
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(h.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(d.value, (e) => (openBlock(), createElementBlock("div", {
218
+ createElementVNode("div", _hoisted_3$1, [
219
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e) => (openBlock(), createElementBlock("div", {
220
220
  key: e.dateString,
221
221
  class: normalizeClass(["hbis-date-strip__date", {
222
- "hbis-date-strip__date--selected": t(e),
223
- "hbis-date-strip__date--today": h(e),
224
- "hbis-date-strip__date--disabled": !p(e),
222
+ "hbis-date-strip__date--selected": i(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: t(e) ? c.selectedColor : c.normalColor,
229
- backgroundColor: t(e) ? c.selectedBgColor : c.normalBgColor
228
+ color: i(e) ? y.selectedColor : y.normalColor,
229
+ backgroundColor: i(e) ? y.selectedBgColor : y.normalBgColor
230
230
  }),
231
- onClick: (k) => _(e)
231
+ onClick: (A) => k(e)
232
232
  }, [
233
- createElementVNode("div", _hoisted_5, toDisplayString(e.day), 1),
234
- createElementVNode("div", _hoisted_6, [
235
- renderSlot(s.$slots, "default", { date: e }, void 0, !0)
233
+ createElementVNode("div", _hoisted_5$1, toDisplayString(e.day), 1),
234
+ createElementVNode("div", _hoisted_6$1, [
235
+ renderSlot(a.$slots, "default", { date: e }, void 0, !0)
236
236
  ])
237
- ], 14, _hoisted_4))), 128))
237
+ ], 14, _hoisted_4$1))), 128))
238
238
  ])
239
239
  ]))
240
240
  ], 2));
241
241
  }
242
- }), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2e8258eb"]]);
242
+ }), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f7fe6423"]]), _hoisted_1 = { class: "image-preview" }, _hoisted_2 = {
243
+ key: 0,
244
+ class: "counter"
245
+ }, _hoisted_3 = { class: "counter-text" }, _hoisted_4 = { class: "swiper-container" }, _hoisted_5 = ["onWheel"], _hoisted_6 = ["src", "onLoad"], _hoisted_7 = ["disabled"], _hoisted_8 = ["disabled"], _sfc_main$2 = {
246
+ __name: "hbis-previewImage",
247
+ props: {
248
+ // 图片集合
249
+ images: {
250
+ type: Array,
251
+ required: !0,
252
+ validator: (y) => y.every((g) => typeof g == "string")
253
+ },
254
+ // 当前显示的图片索引
255
+ initialIndex: {
256
+ type: Number,
257
+ default: 0
258
+ },
259
+ // 最小缩放倍数
260
+ minScale: {
261
+ type: Number,
262
+ default: 0.5
263
+ },
264
+ // 最大缩放倍数
265
+ maxScale: {
266
+ type: Number,
267
+ default: 5
268
+ },
269
+ // 是否显示关闭按钮
270
+ showCloseBtn: {
271
+ type: Boolean,
272
+ default: !0
273
+ },
274
+ // 是否启用滑动
275
+ enableSwipe: {
276
+ type: Boolean,
277
+ default: !0
278
+ }
279
+ },
280
+ emits: ["close", "change", "update:initialIndex"],
281
+ setup(y, { emit: g }) {
282
+ const n = y, t = g, r = ref(n.initialIndex), v = ref(null), h = ref(!1), m = ref(!1), o = ref(0), s = ref(0), l = ref(0), i = ref(window.innerWidth), f = ref(window.innerHeight), u = ref(n.images.map(() => ({
283
+ scale: 1,
284
+ translateX: 0,
285
+ translateY: 0,
286
+ naturalWidth: 0,
287
+ naturalHeight: 0,
288
+ isLoaded: !1
289
+ }))), S = ref(0), k = ref(0), a = ref(0), p = ref(0), e = ref(0), A = computed(() => ({
290
+ transform: `translateX(${l.value}px)`,
291
+ transition: h.value ? "none" : "transform 0.3s ease"
292
+ })), d = computed(() => ({
293
+ width: `${i.value}px`,
294
+ height: `${f.value}px`
295
+ }));
296
+ watch(() => n.initialIndex, (c) => {
297
+ c !== r.value && (r.value = c, w());
298
+ }), onMounted(() => {
299
+ const c = () => {
300
+ i.value = window.innerWidth, f.value = window.innerHeight, w();
301
+ };
302
+ return window.addEventListener("resize", c), c(), () => {
303
+ window.removeEventListener("resize", c);
304
+ };
305
+ });
306
+ const w = () => {
307
+ l.value = -r.value * i.value;
308
+ }, x = () => {
309
+ r.value > 0 && (r.value--, w(), N(), t("change", r.value), t("update:initialIndex", r.value));
310
+ }, _ = () => {
311
+ r.value < n.images.length - 1 && (r.value++, w(), N(), t("change", r.value), t("update:initialIndex", r.value));
312
+ }, N = () => {
313
+ u.value[r.value] = {
314
+ ...u.value[r.value],
315
+ scale: 1,
316
+ translateX: 0,
317
+ translateY: 0
318
+ };
319
+ }, T = (c) => {
320
+ const b = u.value[c];
321
+ return {
322
+ transform: `scale(${b.scale}) translate(${b.translateX}px, ${b.translateY}px)`,
323
+ transition: m.value ? "none" : "transform 0.1s ease",
324
+ opacity: b.isLoaded ? 1 : 0
325
+ };
326
+ }, F = (c) => {
327
+ const b = event.target;
328
+ u.value[c] = {
329
+ ...u.value[c],
330
+ naturalWidth: b.naturalWidth,
331
+ naturalHeight: b.naturalHeight,
332
+ isLoaded: !0
333
+ };
334
+ }, C = (c) => {
335
+ c.target.tagName === "IMG" ? (m.value = !0, o.value = c.clientX - u.value[r.value].translateX, s.value = c.clientY - u.value[r.value].translateY) : (h.value = !0, o.value = c.clientX - l.value), c.preventDefault();
336
+ }, D = (c) => {
337
+ if (m.value) {
338
+ const b = c.clientX - o.value, O = c.clientY - s.value;
339
+ u.value[r.value] = {
340
+ ...u.value[r.value],
341
+ translateX: b,
342
+ translateY: O
343
+ };
344
+ } else if (h.value && n.enableSwipe) {
345
+ const b = c.clientX - o.value;
346
+ l.value = b;
347
+ }
348
+ }, P = () => {
349
+ if (h.value && n.enableSwipe) {
350
+ const c = i.value * 0.3;
351
+ Math.abs(l.value + r.value * i.value) > c ? l.value > 0 ? x() : _() : w();
352
+ }
353
+ h.value = !1, m.value = !1;
354
+ }, L = (c) => {
355
+ const b = c.touches[0];
356
+ S.value = b.clientX, k.value = b.clientY, a.value = Date.now();
357
+ }, V = (c) => {
358
+ const b = c.touches[0];
359
+ p.value = b.clientX, e.value = b.clientY;
360
+ const O = p.value - S.value, E = e.value - k.value;
361
+ if (Math.abs(O) > Math.abs(E))
362
+ c.preventDefault(), h.value = !0, l.value = -r.value * i.value + O;
363
+ else if (u.value[r.value].scale > 1) {
364
+ c.preventDefault(), m.value = !0;
365
+ const B = O + u.value[r.value].translateX, j = E + u.value[r.value].translateY;
366
+ u.value[r.value] = {
367
+ ...u.value[r.value],
368
+ translateX: B,
369
+ translateY: j
370
+ };
371
+ }
372
+ }, M = () => {
373
+ if (h.value) {
374
+ const c = p.value - S.value, b = Date.now() - a.value, O = i.value * 0.2, E = Math.abs(c) / b;
375
+ Math.abs(c) > O || E > 0.5 ? c > 0 ? x() : _() : w();
376
+ }
377
+ h.value = !1, m.value = !1;
378
+ }, I = (c, b) => {
379
+ if (b !== r.value) return;
380
+ c.preventDefault();
381
+ const O = c.deltaY > 0 ? -0.1 : 0.1, E = c.clientX, B = c.clientY;
382
+ W(E, B, O);
383
+ }, W = (c, b, O) => {
384
+ const E = u.value[r.value], B = Math.max(
385
+ n.minScale,
386
+ Math.min(n.maxScale, E.scale + O)
387
+ ), j = event.target.getBoundingClientRect(), $ = c - j.left, R = b - j.top, z = B - E.scale, U = E.translateX + ($ - E.translateX) * (z / E.scale), X = E.translateY + (R - E.translateY) * (z / E.scale);
388
+ u.value[r.value] = {
389
+ ...E,
390
+ scale: B,
391
+ translateX: U,
392
+ translateY: X
393
+ };
394
+ };
395
+ return (c, b) => (openBlock(), createElementBlock("div", _hoisted_1, [
396
+ y.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2, [
397
+ createElementVNode("span", _hoisted_3, toDisplayString(r.value + 1) + "/" + toDisplayString(y.images.length), 1)
398
+ ])) : createCommentVNode("", !0),
399
+ y.showCloseBtn ? (openBlock(), createElementBlock("button", {
400
+ key: 1,
401
+ class: "close-btn",
402
+ onClick: b[0] || (b[0] = (O) => t("close"))
403
+ }, [...b[1] || (b[1] = [
404
+ createElementVNode("svg", {
405
+ width: "24",
406
+ height: "24",
407
+ viewBox: "0 0 24 24",
408
+ fill: "none",
409
+ stroke: "currentColor",
410
+ "stroke-width": "2"
411
+ }, [
412
+ createElementVNode("line", {
413
+ x1: "18",
414
+ y1: "6",
415
+ x2: "6",
416
+ y2: "18"
417
+ }),
418
+ createElementVNode("line", {
419
+ x1: "6",
420
+ y1: "6",
421
+ x2: "18",
422
+ y2: "18"
423
+ })
424
+ ], -1)
425
+ ])])) : createCommentVNode("", !0),
426
+ createElementVNode("div", _hoisted_4, [
427
+ createElementVNode("div", {
428
+ class: "swiper-wrapper",
429
+ ref_key: "swiperWrapper",
430
+ ref: v,
431
+ style: normalizeStyle(A.value),
432
+ onTouchstart: L,
433
+ onTouchmove: V,
434
+ onTouchend: M,
435
+ onMousedown: C,
436
+ onMousemove: D,
437
+ onMouseup: P,
438
+ onMouseleave: P
439
+ }, [
440
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(y.images, (O, E) => (openBlock(), createElementBlock("div", {
441
+ key: E,
442
+ class: "swiper-slide",
443
+ style: normalizeStyle(d.value)
444
+ }, [
445
+ createElementVNode("div", {
446
+ class: "image-container",
447
+ onWheel: (B) => I(B, E)
448
+ }, [
449
+ createElementVNode("img", {
450
+ src: O,
451
+ alt: "Preview image",
452
+ class: "preview-image",
453
+ style: normalizeStyle(T(E)),
454
+ onLoad: (B) => F(E),
455
+ loading: "lazy"
456
+ }, null, 44, _hoisted_6)
457
+ ], 40, _hoisted_5)
458
+ ], 4))), 128))
459
+ ], 36)
460
+ ]),
461
+ createElementVNode("button", {
462
+ class: "nav-btn prev-btn",
463
+ onClick: x,
464
+ disabled: r.value === 0
465
+ }, [...b[2] || (b[2] = [
466
+ createElementVNode("svg", {
467
+ width: "24",
468
+ height: "24",
469
+ viewBox: "0 0 24 24",
470
+ fill: "none",
471
+ stroke: "currentColor",
472
+ "stroke-width": "2"
473
+ }, [
474
+ createElementVNode("polyline", { points: "15 18 9 12 15 6" })
475
+ ], -1)
476
+ ])], 8, _hoisted_7),
477
+ createElementVNode("button", {
478
+ class: "nav-btn next-btn",
479
+ onClick: _,
480
+ disabled: r.value === y.images.length - 1
481
+ }, [...b[3] || (b[3] = [
482
+ createElementVNode("svg", {
483
+ width: "24",
484
+ height: "24",
485
+ viewBox: "0 0 24 24",
486
+ fill: "none",
487
+ stroke: "currentColor",
488
+ "stroke-width": "2"
489
+ }, [
490
+ createElementVNode("polyline", { points: "9 18 15 12 9 6" })
491
+ ], -1)
492
+ ])], 8, _hoisted_8)
493
+ ]));
494
+ }
495
+ };
243
496
  var svga_lite_min = { exports: {} };
244
497
  /*!
245
498
  * svga.lite
@@ -250,71 +503,71 @@ var svga_lite_min = { exports: {} };
250
503
  * Released under the MIT License.
251
504
  */
252
505
  (function(module, exports$1) {
253
- (function(c, y) {
254
- module.exports = y();
506
+ (function(y, g) {
507
+ module.exports = g();
255
508
  })(window, function() {
256
- return function(c) {
257
- var y = {};
258
- function i(r) {
259
- if (y[r]) return y[r].exports;
260
- var n = y[r] = { i: r, l: !1, exports: {} };
261
- return c[r].call(n.exports, n, n.exports, i), n.l = !0, n.exports;
509
+ return function(y) {
510
+ var g = {};
511
+ function n(t) {
512
+ if (g[t]) return g[t].exports;
513
+ var r = g[t] = { i: t, l: !1, exports: {} };
514
+ return y[t].call(r.exports, r, r.exports, n), r.l = !0, r.exports;
262
515
  }
263
- return i.m = c, i.c = y, i.d = function(r, n, m) {
264
- i.o(r, n) || Object.defineProperty(r, n, { enumerable: !0, get: m });
265
- }, i.r = function(r) {
266
- typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(r, "__esModule", { value: !0 });
267
- }, i.t = function(r, n) {
268
- if (1 & n && (r = i(r)), 8 & n || 4 & n && typeof r == "object" && r && r.__esModule) return r;
269
- var m = /* @__PURE__ */ Object.create(null);
270
- if (i.r(m), Object.defineProperty(m, "default", { enumerable: !0, value: r }), 2 & n && typeof r != "string") for (var f in r) i.d(m, f, (function(v) {
271
- return r[v];
272
- }).bind(null, f));
273
- return m;
274
- }, i.n = function(r) {
275
- var n = r && r.__esModule ? function() {
276
- return r.default;
516
+ return n.m = y, n.c = g, n.d = function(t, r, v) {
517
+ n.o(t, r) || Object.defineProperty(t, r, { enumerable: !0, get: v });
518
+ }, n.r = function(t) {
519
+ typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 });
520
+ }, n.t = function(t, r) {
521
+ if (1 & r && (t = n(t)), 8 & r || 4 & r && typeof t == "object" && t && t.__esModule) return t;
522
+ var v = /* @__PURE__ */ Object.create(null);
523
+ if (n.r(v), Object.defineProperty(v, "default", { enumerable: !0, value: t }), 2 & r && typeof t != "string") for (var h in t) n.d(v, h, (function(m) {
524
+ return t[m];
525
+ }).bind(null, h));
526
+ return v;
527
+ }, n.n = function(t) {
528
+ var r = t && t.__esModule ? function() {
529
+ return t.default;
277
530
  } : function() {
278
- return r;
531
+ return t;
279
532
  };
280
- return i.d(n, "a", n), n;
281
- }, i.o = function(r, n) {
282
- return Object.prototype.hasOwnProperty.call(r, n);
283
- }, i.p = "", i(i.s = 1);
284
- }([function(c, y, i) {
285
- Object.defineProperty(y, "__esModule", { value: !0 });
286
- var r = function(n, m, f) {
287
- this._d = n, this._transform = m, this._styles = f;
533
+ return n.d(r, "a", r), r;
534
+ }, n.o = function(t, r) {
535
+ return Object.prototype.hasOwnProperty.call(t, r);
536
+ }, n.p = "", n(n.s = 1);
537
+ }([function(y, g, n) {
538
+ Object.defineProperty(g, "__esModule", { value: !0 });
539
+ var t = function(r, v, h) {
540
+ this._d = r, this._transform = v, this._styles = h;
288
541
  };
289
- y.default = r;
290
- }, function(c, y, i) {
291
- Object.defineProperty(y, "__esModule", { value: !0 });
292
- var r = i(2), n = i(3), m = i(4), f = { Downloader: r.default, Parser: n.default, Player: m.default };
293
- y.default = f;
294
- }, function(c, y, i) {
295
- Object.defineProperty(y, "__esModule", { value: !0 });
296
- var r = function() {
297
- function n() {
542
+ g.default = t;
543
+ }, function(y, g, n) {
544
+ Object.defineProperty(g, "__esModule", { value: !0 });
545
+ var t = n(2), r = n(3), v = n(4), h = { Downloader: t.default, Parser: r.default, Player: v.default };
546
+ g.default = h;
547
+ }, function(y, g, n) {
548
+ Object.defineProperty(g, "__esModule", { value: !0 });
549
+ var t = function() {
550
+ function r() {
298
551
  this.request = null;
299
552
  }
300
- return n.prototype.get = function(m) {
301
- var f = this;
302
- if (!m) throw new Error("download link undefined");
303
- return new Promise(function(v, a) {
304
- var d = new XMLHttpRequest();
305
- d.open("GET", m, !0), d.responseType = "arraybuffer", d.onloadend = function() {
306
- !d.response || d.status !== 200 && d.status !== 304 ? a(d) : v(d.response);
307
- }, d.onerror = function() {
308
- return a(d.response);
309
- }, d.send(), f.request = d;
553
+ return r.prototype.get = function(v) {
554
+ var h = this;
555
+ if (!v) throw new Error("download link undefined");
556
+ return new Promise(function(m, o) {
557
+ var s = new XMLHttpRequest();
558
+ s.open("GET", v, !0), s.responseType = "arraybuffer", s.onloadend = function() {
559
+ !s.response || s.status !== 200 && s.status !== 304 ? o(s) : m(s.response);
560
+ }, s.onerror = function() {
561
+ return o(s.response);
562
+ }, s.send(), h.request = s;
310
563
  });
311
- }, n.prototype.cancel = function() {
564
+ }, r.prototype.cancel = function() {
312
565
  this.request && this.request.abort();
313
- }, n.prototype.destroy = function() {
566
+ }, r.prototype.destroy = function() {
314
567
  this.request && this.request.abort();
315
- }, n;
568
+ }, r;
316
569
  }();
317
- y.default = r;
570
+ g.default = t;
318
571
  }, function(module, exports$1, __webpack_require__) {
319
572
  Object.defineProperty(exports$1, "__esModule", { value: !0 });
320
573
  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){
@@ -324,58 +577,58 @@ var svga_lite_min = { exports: {} };
324
577
  var disableWorker = (_a === void 0 ? { disableWorker: !1 } : _a).disableWorker;
325
578
  disableWorker ? (eval(WORKER), this.worker = window.SVGAParserMockWorker) : this.worker = new Worker(window.URL.createObjectURL(new Blob([WORKER])));
326
579
  }
327
- return Parser.prototype.do = function(c) {
328
- var y = this, i = new Uint8Array(c, 0, 4);
329
- if (i[0] == 80 && i[1] == 75 && i[2] == 3 && i[3] == 4) throw "this parser not support version@1.x of svga.";
330
- if (!c) throw new Error("Parser Data not found");
580
+ return Parser.prototype.do = function(y) {
581
+ var g = this, n = new Uint8Array(y, 0, 4);
582
+ if (n[0] == 80 && n[1] == 75 && n[2] == 3 && n[3] == 4) throw "this parser not support version@1.x of svga.";
583
+ if (!y) throw new Error("Parser Data not found");
331
584
  if (!this.worker) throw new Error("Parser Worker not found");
332
- return new Promise(function(r, n) {
333
- var m;
334
- y.worker.disableWorker ? ((m = y.worker).onmessageCallback = function(f) {
335
- r(f);
336
- }, m.onmessage({ data: c })) : ((m = y.worker).postMessage(c), m.onmessage = function(f) {
337
- var v = f.data;
338
- r(v);
585
+ return new Promise(function(t, r) {
586
+ var v;
587
+ g.worker.disableWorker ? ((v = g.worker).onmessageCallback = function(h) {
588
+ t(h);
589
+ }, v.onmessage({ data: y })) : ((v = g.worker).postMessage(y), v.onmessage = function(h) {
590
+ var m = h.data;
591
+ t(m);
339
592
  });
340
593
  });
341
594
  }, Parser.prototype.destroy = function() {
342
- var c = this.worker;
343
- c.terminate && c.terminate();
595
+ var y = this.worker;
596
+ y.terminate && y.terminate();
344
597
  }, Parser;
345
598
  }();
346
599
  exports$1.default = Parser;
347
- }, function(c, y, i) {
348
- Object.defineProperty(y, "__esModule", { value: !0 });
349
- var r, n, m, f = i(5), v = i(9);
600
+ }, function(y, g, n) {
601
+ Object.defineProperty(g, "__esModule", { value: !0 });
602
+ var t, r, v, h = n(5), m = n(9);
350
603
  (function(l) {
351
604
  l.START = "start", l.RESUME = "resume", l.PROCESS = "process", l.PAUSE = "pause", l.STOP = "stop", l.END = "end", l.CLEAR = "clear";
352
- })(r || (r = {})), function(l) {
605
+ })(t || (t = {})), function(l) {
353
606
  l.FORWARDS = "forwards", l.BACKWARDS = "backwards";
354
- }(n || (n = {})), function(l) {
607
+ }(r || (r = {})), function(l) {
355
608
  l.FORWARDS = "forwards", l.FALLBACKS = "fallbacks";
356
- }(m || (m = {}));
357
- var a = typeof window < "u" && "IntersectionObserver" in window, d = function() {
358
- function l(t, h, p) {
359
- if (this.videoItem = h, this.loop = !0, this.fillMode = n.FORWARDS, this.playMode = m.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() {
609
+ }(v || (v = {}));
610
+ var o = typeof window < "u" && "IntersectionObserver" in window, s = function() {
611
+ function l(i, f, u) {
612
+ if (this.videoItem = f, this.loop = !0, this.fillMode = r.FORWARDS, this.playMode = v.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() {
360
613
  }, resume: function() {
361
614
  }, process: function() {
362
615
  }, pause: function() {
363
616
  }, stop: function() {
364
617
  }, end: function() {
365
618
  }, clear: function() {
366
- } }, this.container = typeof t == "string" ? document.body.querySelector(t) : t, !this.container) throw new Error("container undefined.");
619
+ } }, this.container = typeof i == "string" ? document.body.querySelector(i) : i, !this.container) throw new Error("container undefined.");
367
620
  if (!this.container.getContext) throw new Error("container should be HTMLCanvasElement.");
368
- this._renderer = new f.default(this), this._animator = new v.default(), this.videoItem && this.mount(h), p && this.set(p);
621
+ this._renderer = new h.default(this), this._animator = new m.default(), this.videoItem && this.mount(f), u && this.set(u);
369
622
  }
370
- return l.prototype.set = function(t) {
371
- var h = this;
372
- t.loop !== void 0 && (this.loop = t.loop), t.fillMode && (this.fillMode = t.fillMode), t.playMode && (this.playMode = t.playMode), t.cacheFrames !== void 0 && (this.cacheFrames = t.cacheFrames), this.startFrame = t.startFrame ? t.startFrame : this.startFrame, this.endFrame = t.endFrame ? t.endFrame : this.endFrame, t.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = t.intersectionObserverRender), a && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(p) {
373
- p[0].intersectionRatio <= 0 ? h.intersectionObserverRenderShow && (h.intersectionObserverRenderShow = !1) : !h.intersectionObserverRenderShow && (h.intersectionObserverRenderShow = !0);
374
- }, { 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 = t.noExecutionDelay;
375
- }, l.prototype.mount = function(t) {
376
- var h = this;
377
- return new Promise(function(p, x) {
378
- h.currentFrame = 0, h.progress = 0, h.totalFramesCount = t.frames - 1, h.videoItem = t, h._renderer.prepare().then(p), h._renderer.clear(), h._setSize();
623
+ return l.prototype.set = function(i) {
624
+ var f = this;
625
+ i.loop !== void 0 && (this.loop = i.loop), i.fillMode && (this.fillMode = i.fillMode), i.playMode && (this.playMode = i.playMode), i.cacheFrames !== void 0 && (this.cacheFrames = i.cacheFrames), this.startFrame = i.startFrame ? i.startFrame : this.startFrame, this.endFrame = i.endFrame ? i.endFrame : this.endFrame, i.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = i.intersectionObserverRender), o && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(u) {
626
+ u[0].intersectionRatio <= 0 ? f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !1) : !f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !0);
627
+ }, { 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 = i.noExecutionDelay;
628
+ }, l.prototype.mount = function(i) {
629
+ var f = this;
630
+ return new Promise(function(u, S) {
631
+ f.currentFrame = 0, f.progress = 0, f.totalFramesCount = i.frames - 1, f.videoItem = i, f._renderer.prepare().then(u), f._renderer.clear(), f._setSize();
379
632
  });
380
633
  }, l.prototype.start = function() {
381
634
  if (!this.videoItem) throw new Error("video item undefined.");
@@ -391,219 +644,219 @@ var svga_lite_min = { exports: {} };
391
644
  this._animator && this._animator.stop(), this._renderer.clear(), this.$onEvent.clear();
392
645
  }, l.prototype.destroy = function() {
393
646
  this._animator && this._animator.stop(), this._renderer.clear(), this._animator = null, this._renderer = null, this.videoItem = null;
394
- }, l.prototype.$on = function(t, h) {
395
- var p = this;
396
- return this.$onEvent[t] = h, t === "end" && (this._animator.onEnd = function() {
397
- return p.$onEvent.end();
647
+ }, l.prototype.$on = function(i, f) {
648
+ var u = this;
649
+ return this.$onEvent[i] = f, i === "end" && (this._animator.onEnd = function() {
650
+ return u.$onEvent.end();
398
651
  }), this;
399
652
  }, l.prototype._startAnimation = function() {
400
- var t = this, h = this, p = h.playMode, x = h.totalFramesCount, _ = h.startFrame, s = h.endFrame, u = h.videoItem;
401
- this.currentFrame === x && (this.currentFrame = _ || 0), this._animator.startValue = p === "fallbacks" ? s || x : _ || 0, this._animator.endValue = p === "fallbacks" ? _ || 0 : s || x;
402
- var e = u.frames;
403
- s > 0 && s > _ ? e = s - _ : s <= 0 && _ > 0 && (e = u.frames - _), this._animator.duration = e * (1 / u.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(k) {
404
- k = Math.floor(k), t.currentFrame !== k && (t.currentFrame = k, t.progress = parseFloat((k + 1).toString()) / parseFloat(u.frames.toString()) * 100, t._renderer.drawFrame(t.currentFrame), t.$onEvent.process());
653
+ var i = this, f = this, u = f.playMode, S = f.totalFramesCount, k = f.startFrame, a = f.endFrame, p = f.videoItem;
654
+ this.currentFrame === S && (this.currentFrame = k || 0), this._animator.startValue = u === "fallbacks" ? a || S : k || 0, this._animator.endValue = u === "fallbacks" ? k || 0 : a || S;
655
+ var e = p.frames;
656
+ a > 0 && a > k ? e = a - k : a <= 0 && k > 0 && (e = p.frames - k), this._animator.duration = e * (1 / p.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(A) {
657
+ A = Math.floor(A), i.currentFrame !== A && (i.currentFrame = A, i.progress = parseFloat((A + 1).toString()) / parseFloat(p.frames.toString()) * 100, i._renderer.drawFrame(i.currentFrame), i.$onEvent.process());
405
658
  }, this._animator.start(this.currentFrame);
406
659
  }, l.prototype._setSize = function() {
407
- var t = this.videoItem.videoSize;
408
- this.container.width = t.width, this.container.height = t.height;
660
+ var i = this.videoItem.videoSize;
661
+ this.container.width = i.width, this.container.height = i.height;
409
662
  }, l;
410
663
  }();
411
- y.default = d;
412
- }, function(c, y, i) {
413
- Object.defineProperty(y, "__esModule", { value: !0 });
414
- var r = i(6), n = function() {
415
- function m(f) {
416
- this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = f;
417
- var v = this._player.container;
418
- this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(v.width, v.height) : document.createElement("canvas");
664
+ g.default = s;
665
+ }, function(y, g, n) {
666
+ Object.defineProperty(g, "__esModule", { value: !0 });
667
+ var t = n(6), r = function() {
668
+ function v(h) {
669
+ this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = h;
670
+ var m = this._player.container;
671
+ this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(m.width, m.height) : document.createElement("canvas");
419
672
  }
420
- return m.prototype.prepare = function() {
421
- var f = this;
422
- return new Promise(function(v, a) {
423
- if (f._bitmapCache = {}, f._player.videoItem.images && Object.keys(f._player.videoItem.images).length != 0) {
424
- f._player.videoItem.dynamicElements && (f._dynamicElements = f._player.videoItem.dynamicElements);
425
- var d = 0, l = 0;
426
- for (var t in f._player.videoItem.images) {
427
- var h = f._player.videoItem.images[t];
428
- if (typeof h != "string" || h.indexOf("iVBO") !== 0 && h.indexOf("/9j/2w") !== 0) f._bitmapCache[t] = h;
673
+ return v.prototype.prepare = function() {
674
+ var h = this;
675
+ return new Promise(function(m, o) {
676
+ if (h._bitmapCache = {}, h._player.videoItem.images && Object.keys(h._player.videoItem.images).length != 0) {
677
+ h._player.videoItem.dynamicElements && (h._dynamicElements = h._player.videoItem.dynamicElements);
678
+ var s = 0, l = 0;
679
+ for (var i in h._player.videoItem.images) {
680
+ var f = h._player.videoItem.images[i];
681
+ if (typeof f != "string" || f.indexOf("iVBO") !== 0 && f.indexOf("/9j/2w") !== 0) h._bitmapCache[i] = f;
429
682
  else {
430
- d++;
431
- var p = document.createElement("img");
432
- p.src = "data:image/png;base64," + h, f._bitmapCache[t] = p, p.onload = function() {
433
- ++l === d && v();
683
+ s++;
684
+ var u = document.createElement("img");
685
+ u.src = "data:image/png;base64," + f, h._bitmapCache[i] = u, u.onload = function() {
686
+ ++l === s && m();
434
687
  };
435
688
  }
436
689
  }
437
- } else v();
690
+ } else m();
438
691
  });
439
- }, m.prototype.clear = function() {
692
+ }, v.prototype.clear = function() {
440
693
  this._player.container.width = this._player.container.width;
441
- }, m.prototype.drawFrame = function(f) {
442
- var v = this._player;
443
- if (!v.intersectionObserverRender || v.intersectionObserverRenderShow) {
694
+ }, v.prototype.drawFrame = function(h) {
695
+ var m = this._player;
696
+ if (!m.intersectionObserverRender || m.intersectionObserverRenderShow) {
444
697
  this.clear();
445
- var a = v.container.getContext("2d");
446
- if (this._player.cacheFrames && this._frames[f]) {
447
- var d = this._frames[f];
448
- a.drawImage(d, 0, 0, d.width, d.height, 0, 0, d.width, d.height);
698
+ var o = m.container.getContext("2d");
699
+ if (this._player.cacheFrames && this._frames[h]) {
700
+ var s = this._frames[h];
701
+ o.drawImage(s, 0, 0, s.width, s.height, 0, 0, s.width, s.height);
449
702
  } else {
450
703
  var l = this._ofsCanvas;
451
- if (l.width = this._player.container.width, l.height = this._player.container.height, r.default(l, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), a.drawImage(l, 0, 0, l.width, l.height, 0, 0, l.width, l.height), this._player.cacheFrames) if ("toDataURL" in l) {
452
- var t = l.toDataURL(), h = new Image();
453
- h.src = t, this._frames[f] = h;
454
- } else this._frames[f] = l.transferToImageBitmap();
704
+ if (l.width = this._player.container.width, l.height = this._player.container.height, t.default(l, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), o.drawImage(l, 0, 0, l.width, l.height, 0, 0, l.width, l.height), this._player.cacheFrames) if ("toDataURL" in l) {
705
+ var i = l.toDataURL(), f = new Image();
706
+ f.src = i, this._frames[h] = f;
707
+ } else this._frames[h] = l.transferToImageBitmap();
455
708
  }
456
709
  }
457
- }, m;
710
+ }, v;
458
711
  }();
459
- y.default = n;
460
- }, function(c, y, i) {
461
- Object.defineProperty(y, "__esModule", { value: !0 }), y.default = void 0;
462
- var r = f(i(0)), n = f(i(7)), m = f(i(8));
463
- function f(t) {
464
- return t && t.__esModule ? t : { default: t };
712
+ g.default = r;
713
+ }, function(y, g, n) {
714
+ Object.defineProperty(g, "__esModule", { value: !0 }), g.default = void 0;
715
+ var t = h(n(0)), r = h(n(7)), v = h(n(8));
716
+ function h(i) {
717
+ return i && i.__esModule ? i : { default: i };
465
718
  }
466
- var v = "MLHVCSQRZmlhvcsqrz";
467
- function a(t, h) {
468
- var p = h._styles;
469
- p !== void 0 && (p && p.stroke ? t.strokeStyle = "rgba(".concat(parseInt((255 * p.stroke[0]).toString()), ", ").concat(parseInt((255 * p.stroke[1]).toString()), ", ").concat(parseInt((255 * p.stroke[2]).toString()), ", ").concat(p.stroke[3], ")") : t.strokeStyle = "transparent", p && (t.lineWidth = p.strokeWidth || void 0, t.lineCap = p.lineCap || void 0, t.lineJoin = p.lineJoin || void 0, t.miterLimit = p.miterLimit || void 0), p && p.fill ? t.fillStyle = "rgba(".concat(parseInt((255 * p.fill[0]).toString()), ", ").concat(parseInt((255 * p.fill[1]).toString()), ", ").concat(parseInt((255 * p.fill[2]).toString()), ", ").concat(p.fill[3], ")") : t.fillStyle = "transparent", p && p.lineDash && t.setLineDash(p.lineDash));
719
+ var m = "MLHVCSQRZmlhvcsqrz";
720
+ function o(i, f) {
721
+ var u = f._styles;
722
+ u !== void 0 && (u && u.stroke ? i.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], ")") : i.strokeStyle = "transparent", u && (i.lineWidth = u.strokeWidth || void 0, i.lineCap = u.lineCap || void 0, i.lineJoin = u.lineJoin || void 0, i.miterLimit = u.miterLimit || void 0), u && u.fill ? i.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], ")") : i.fillStyle = "transparent", u && u.lineDash && i.setLineDash(u.lineDash));
470
723
  }
471
- function d(t, h) {
472
- t.save(), a(t, h), h._transform !== void 0 && h._transform !== null && t.transform(h._transform.a || 1, h._transform.b || 0, h._transform.c || 0, h._transform.d || 1, h._transform.tx || 0, h._transform.ty || 0);
473
- var p = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
474
- t.beginPath(), h._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(x) {
475
- if (x.length != 0) {
476
- var _ = x.substr(0, 1);
477
- if (v.indexOf(_) >= 0) {
478
- var s = x.substr(1).trim().split(" ");
479
- (function(u, e, k, o) {
480
- switch (k) {
724
+ function s(i, f) {
725
+ i.save(), o(i, f), f._transform !== void 0 && f._transform !== null && i.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);
726
+ var u = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
727
+ i.beginPath(), f._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(S) {
728
+ if (S.length != 0) {
729
+ var k = S.substr(0, 1);
730
+ if (m.indexOf(k) >= 0) {
731
+ var a = S.substr(1).trim().split(" ");
732
+ (function(p, e, A, d) {
733
+ switch (A) {
481
734
  case "M":
482
- e.x = Number(o[0]), e.y = Number(o[1]), u.moveTo(e.x, e.y);
735
+ e.x = Number(d[0]), e.y = Number(d[1]), p.moveTo(e.x, e.y);
483
736
  break;
484
737
  case "m":
485
- e.x += Number(o[0]), e.y += Number(o[1]), u.moveTo(e.x, e.y);
738
+ e.x += Number(d[0]), e.y += Number(d[1]), p.moveTo(e.x, e.y);
486
739
  break;
487
740
  case "L":
488
- e.x = Number(o[0]), e.y = Number(o[1]), u.lineTo(e.x, e.y);
741
+ e.x = Number(d[0]), e.y = Number(d[1]), p.lineTo(e.x, e.y);
489
742
  break;
490
743
  case "l":
491
- e.x += Number(o[0]), e.y += Number(o[1]), u.lineTo(e.x, e.y);
744
+ e.x += Number(d[0]), e.y += Number(d[1]), p.lineTo(e.x, e.y);
492
745
  break;
493
746
  case "H":
494
- e.x = Number(o[0]), u.lineTo(e.x, e.y);
747
+ e.x = Number(d[0]), p.lineTo(e.x, e.y);
495
748
  break;
496
749
  case "h":
497
- e.x += Number(o[0]), u.lineTo(e.x, e.y);
750
+ e.x += Number(d[0]), p.lineTo(e.x, e.y);
498
751
  break;
499
752
  case "V":
500
- e.y = Number(o[0]), u.lineTo(e.x, e.y);
753
+ e.y = Number(d[0]), p.lineTo(e.x, e.y);
501
754
  break;
502
755
  case "v":
503
- e.y += Number(o[0]), u.lineTo(e.x, e.y);
756
+ e.y += Number(d[0]), p.lineTo(e.x, e.y);
504
757
  break;
505
758
  case "C":
506
- e.x1 = Number(o[0]), e.y1 = Number(o[1]), e.x2 = Number(o[2]), e.y2 = Number(o[3]), e.x = Number(o[4]), e.y = Number(o[5]), u.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
759
+ e.x1 = Number(d[0]), e.y1 = Number(d[1]), e.x2 = Number(d[2]), e.y2 = Number(d[3]), e.x = Number(d[4]), e.y = Number(d[5]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
507
760
  break;
508
761
  case "c":
509
- e.x1 = e.x + Number(o[0]), e.y1 = e.y + Number(o[1]), e.x2 = e.x + Number(o[2]), e.y2 = e.y + Number(o[3]), e.x += Number(o[4]), e.y += Number(o[5]), u.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
762
+ e.x1 = e.x + Number(d[0]), e.y1 = e.y + Number(d[1]), e.x2 = e.x + Number(d[2]), e.y2 = e.y + Number(d[3]), e.x += Number(d[4]), e.y += Number(d[5]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
510
763
  break;
511
764
  case "S":
512
- 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(o[0]), e.y2 = Number(o[1]), e.x = Number(o[2]), e.y = Number(o[3]), u.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = Number(o[0]), e.y1 = Number(o[1]), e.x = Number(o[2]), e.y = Number(o[3]), u.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
765
+ 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(d[0]), e.y2 = Number(d[1]), e.x = Number(d[2]), e.y = Number(d[3]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = Number(d[0]), e.y1 = Number(d[1]), e.x = Number(d[2]), e.y = Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
513
766
  break;
514
767
  case "s":
515
- 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(o[0]), e.y2 = e.y + Number(o[1]), e.x += Number(o[2]), e.y += Number(o[3]), u.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = e.x + Number(o[0]), e.y1 = e.y + Number(o[1]), e.x += Number(o[2]), e.y += Number(o[3]), u.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
768
+ 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(d[0]), e.y2 = e.y + Number(d[1]), e.x += Number(d[2]), e.y += Number(d[3]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = e.x + Number(d[0]), e.y1 = e.y + Number(d[1]), e.x += Number(d[2]), e.y += Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
516
769
  break;
517
770
  case "Q":
518
- e.x1 = Number(o[0]), e.y1 = Number(o[1]), e.x = Number(o[2]), e.y = Number(o[3]), u.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
771
+ e.x1 = Number(d[0]), e.y1 = Number(d[1]), e.x = Number(d[2]), e.y = Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
519
772
  break;
520
773
  case "q":
521
- e.x1 = e.x + Number(o[0]), e.y1 = e.y + Number(o[1]), e.x += Number(o[2]), e.y += Number(o[3]), u.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
774
+ e.x1 = e.x + Number(d[0]), e.y1 = e.y + Number(d[1]), e.x += Number(d[2]), e.y += Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
522
775
  break;
523
776
  case "A":
524
777
  case "a":
525
778
  break;
526
779
  case "Z":
527
780
  case "z":
528
- u.closePath();
781
+ p.closePath();
529
782
  }
530
- })(t, p, _, s);
783
+ })(i, u, k, a);
531
784
  }
532
785
  }
533
- }), h._styles && h._styles.fill ? t.fill() : h._styles && h._styles.stroke && t.stroke(), t.restore();
786
+ }), f._styles && f._styles.fill ? i.fill() : f._styles && f._styles.stroke && i.stroke(), i.restore();
534
787
  }
535
- var l = function(t, h, p, x, _) {
536
- var s = t.getContext("2d");
537
- return x.sprites.forEach(function(u) {
538
- var e = u.frames[_];
788
+ var l = function(i, f, u, S, k) {
789
+ var a = i.getContext("2d");
790
+ return S.sprites.forEach(function(p) {
791
+ var e = p.frames[k];
539
792
  if (!(e.alpha < 0.05)) {
540
- s.save(), s.globalAlpha = e.alpha, s.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);
541
- var k = h[u.imageKey];
542
- k && (e.maskPath !== void 0 && e.maskPath !== null && (e.maskPath._styles = void 0, d(s, e.maskPath), s.clip()), s.drawImage(k, 0, 0));
543
- var o = p[u.imageKey];
544
- o && s.drawImage(o, (e.layout.width - o.width) / 2, (e.layout.height - o.height) / 2), e.shapes && e.shapes.forEach(function(g) {
545
- g.type === "shape" && g.pathArgs && g.pathArgs.d ? d(s, new r.default(g.pathArgs.d, g.transform, g.styles)) : g.type === "ellipse" && g.pathArgs ? function(w, b) {
546
- w.save(), a(w, b), b._transform !== void 0 && b._transform !== null && w.transform(b._transform.a || 1, b._transform.b || 0, b._transform.c || 0, b._transform.d || 1, b._transform.tx || 0, b._transform.ty || 0);
547
- var A = b._x - b._radiusX, S = b._y - b._radiusY, E = 2 * b._radiusX, N = 2 * b._radiusY, O = E / 2 * 0.5522848, C = N / 2 * 0.5522848, F = A + E, j = S + N, D = A + E / 2, T = S + N / 2;
548
- w.beginPath(), w.moveTo(A, T), w.bezierCurveTo(A, T - C, D - O, S, D, S), w.bezierCurveTo(D + O, S, F, T - C, F, T), w.bezierCurveTo(F, T + C, D + O, j, D, j), w.bezierCurveTo(D - O, j, A, T + C, A, T), b._styles && b._styles.fill ? w.fill() : b._styles && b._styles.stroke && w.stroke(), w.restore();
549
- }(s, new n.default(parseFloat(g.pathArgs.x) || 0, parseFloat(g.pathArgs.y) || 0, parseFloat(g.pathArgs.radiusX) || 0, parseFloat(g.pathArgs.radiusY) || 0, g.transform, g.styles)) : g.type === "rect" && g.pathArgs && function(w, b) {
550
- w.save(), a(w, b), b._transform !== void 0 && b._transform !== null && w.transform(b._transform.a || 1, b._transform.b || 0, b._transform.c || 0, b._transform.d || 1, b._transform.tx || 0, b._transform.ty || 0);
551
- var A = b._x, S = b._y, E = b._width, N = b._height, O = b._cornerRadius;
552
- E < 2 * O && (O = E / 2), N < 2 * O && (O = N / 2), w.beginPath(), w.moveTo(A + O, S), w.arcTo(A + E, S, A + E, S + N, O), w.arcTo(A + E, S + N, A, S + N, O), w.arcTo(A, S + N, A, S, O), w.arcTo(A, S, A + E, S, O), w.closePath(), b._styles && b._styles.fill ? w.fill() : b._styles && b._styles.stroke && w.stroke(), w.restore();
553
- }(s, new m.default(parseFloat(g.pathArgs.x) || 0, parseFloat(g.pathArgs.y) || 0, parseFloat(g.pathArgs.width) || 0, parseFloat(g.pathArgs.height) || 0, parseFloat(g.pathArgs.cornerRadius) || 0, g.transform, g.styles));
554
- }), s.restore();
793
+ a.save(), a.globalAlpha = e.alpha, a.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);
794
+ var A = f[p.imageKey];
795
+ A && (e.maskPath !== void 0 && e.maskPath !== null && (e.maskPath._styles = void 0, s(a, e.maskPath), a.clip()), a.drawImage(A, 0, 0));
796
+ var d = u[p.imageKey];
797
+ d && a.drawImage(d, (e.layout.width - d.width) / 2, (e.layout.height - d.height) / 2), e.shapes && e.shapes.forEach(function(w) {
798
+ w.type === "shape" && w.pathArgs && w.pathArgs.d ? s(a, new t.default(w.pathArgs.d, w.transform, w.styles)) : w.type === "ellipse" && w.pathArgs ? function(x, _) {
799
+ x.save(), o(x, _), _._transform !== void 0 && _._transform !== null && x.transform(_._transform.a || 1, _._transform.b || 0, _._transform.c || 0, _._transform.d || 1, _._transform.tx || 0, _._transform.ty || 0);
800
+ var N = _._x - _._radiusX, T = _._y - _._radiusY, F = 2 * _._radiusX, C = 2 * _._radiusY, D = F / 2 * 0.5522848, P = C / 2 * 0.5522848, L = N + F, V = T + C, M = N + F / 2, I = T + C / 2;
801
+ x.beginPath(), x.moveTo(N, I), x.bezierCurveTo(N, I - P, M - D, T, M, T), x.bezierCurveTo(M + D, T, L, I - P, L, I), x.bezierCurveTo(L, I + P, M + D, V, M, V), x.bezierCurveTo(M - D, V, N, I + P, N, I), _._styles && _._styles.fill ? x.fill() : _._styles && _._styles.stroke && x.stroke(), x.restore();
802
+ }(a, new r.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, _) {
803
+ x.save(), o(x, _), _._transform !== void 0 && _._transform !== null && x.transform(_._transform.a || 1, _._transform.b || 0, _._transform.c || 0, _._transform.d || 1, _._transform.tx || 0, _._transform.ty || 0);
804
+ var N = _._x, T = _._y, F = _._width, C = _._height, D = _._cornerRadius;
805
+ F < 2 * D && (D = F / 2), C < 2 * D && (D = C / 2), x.beginPath(), x.moveTo(N + D, T), x.arcTo(N + F, T, N + F, T + C, D), x.arcTo(N + F, T + C, N, T + C, D), x.arcTo(N, T + C, N, T, D), x.arcTo(N, T, N + F, T, D), x.closePath(), _._styles && _._styles.fill ? x.fill() : _._styles && _._styles.stroke && x.stroke(), x.restore();
806
+ }(a, new v.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));
807
+ }), a.restore();
555
808
  }
556
- }), t;
809
+ }), i;
557
810
  };
558
- y.default = l;
559
- }, function(c, y, i) {
560
- var r, n = (r = function(f, v) {
561
- return (r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, d) {
562
- a.__proto__ = d;
563
- } || function(a, d) {
564
- for (var l in d) Object.prototype.hasOwnProperty.call(d, l) && (a[l] = d[l]);
565
- })(f, v);
566
- }, function(f, v) {
567
- function a() {
568
- this.constructor = f;
811
+ g.default = l;
812
+ }, function(y, g, n) {
813
+ var t, r = (t = function(h, m) {
814
+ return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, s) {
815
+ o.__proto__ = s;
816
+ } || function(o, s) {
817
+ for (var l in s) Object.prototype.hasOwnProperty.call(s, l) && (o[l] = s[l]);
818
+ })(h, m);
819
+ }, function(h, m) {
820
+ function o() {
821
+ this.constructor = h;
569
822
  }
570
- r(f, v), f.prototype = v === null ? Object.create(v) : (a.prototype = v.prototype, new a());
823
+ t(h, m), h.prototype = m === null ? Object.create(m) : (o.prototype = m.prototype, new o());
571
824
  });
572
- Object.defineProperty(y, "__esModule", { value: !0 });
573
- var m = function(f) {
574
- function v(a, d, l, t, h, p) {
575
- var x = f.call(this) || this;
576
- return x._x = a, x._y = d, x._radiusX = l, x._radiusY = t, x._transform = h, x._styles = p, x;
825
+ Object.defineProperty(g, "__esModule", { value: !0 });
826
+ var v = function(h) {
827
+ function m(o, s, l, i, f, u) {
828
+ var S = h.call(this) || this;
829
+ return S._x = o, S._y = s, S._radiusX = l, S._radiusY = i, S._transform = f, S._styles = u, S;
577
830
  }
578
- return n(v, f), v;
579
- }(i(0).default);
580
- y.default = m;
581
- }, function(c, y, i) {
582
- var r, n = (r = function(f, v) {
583
- return (r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, d) {
584
- a.__proto__ = d;
585
- } || function(a, d) {
586
- for (var l in d) Object.prototype.hasOwnProperty.call(d, l) && (a[l] = d[l]);
587
- })(f, v);
588
- }, function(f, v) {
589
- function a() {
590
- this.constructor = f;
831
+ return r(m, h), m;
832
+ }(n(0).default);
833
+ g.default = v;
834
+ }, function(y, g, n) {
835
+ var t, r = (t = function(h, m) {
836
+ return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, s) {
837
+ o.__proto__ = s;
838
+ } || function(o, s) {
839
+ for (var l in s) Object.prototype.hasOwnProperty.call(s, l) && (o[l] = s[l]);
840
+ })(h, m);
841
+ }, function(h, m) {
842
+ function o() {
843
+ this.constructor = h;
591
844
  }
592
- r(f, v), f.prototype = v === null ? Object.create(v) : (a.prototype = v.prototype, new a());
845
+ t(h, m), h.prototype = m === null ? Object.create(m) : (o.prototype = m.prototype, new o());
593
846
  });
594
- Object.defineProperty(y, "__esModule", { value: !0 });
595
- var m = function(f) {
596
- function v(a, d, l, t, h, p, x) {
597
- var _ = f.call(this) || this;
598
- return _._x = a, _._y = d, _._width = l, _._height = t, _._cornerRadius = h, _._transform = p, _._styles = x, _;
847
+ Object.defineProperty(g, "__esModule", { value: !0 });
848
+ var v = function(h) {
849
+ function m(o, s, l, i, f, u, S) {
850
+ var k = h.call(this) || this;
851
+ return k._x = o, k._y = s, k._width = l, k._height = i, k._cornerRadius = f, k._transform = u, k._styles = S, k;
599
852
  }
600
- return n(v, f), v;
601
- }(i(0).default);
602
- y.default = m;
603
- }, function(c, y, i) {
604
- Object.defineProperty(y, "__esModule", { value: !0 });
605
- var r = function() {
606
- function n() {
853
+ return r(m, h), m;
854
+ }(n(0).default);
855
+ g.default = v;
856
+ }, function(y, g, n) {
857
+ Object.defineProperty(g, "__esModule", { value: !0 });
858
+ var t = function() {
859
+ function r() {
607
860
  this._currentTimeMillsecond = function() {
608
861
  return typeof performance > "u" ? (/* @__PURE__ */ new Date()).getTime() : performance.now();
609
862
  }, this.noExecutionDelay = !1, this.startValue = 0, this.endValue = 0, this.duration = 0, this.loop = 1, this.fillRule = 0, this.onStart = function() {
@@ -611,30 +864,30 @@ var svga_lite_min = { exports: {} };
611
864
  }, this.onEnd = function() {
612
865
  }, this._isRunning = !1, this._mStartTime = 0, this._currentFrication = 0, this._worker = null;
613
866
  }
614
- return n.prototype.start = function(m) {
615
- this.doStart(m);
616
- }, n.prototype.stop = function() {
867
+ return r.prototype.start = function(v) {
868
+ this.doStart(v);
869
+ }, r.prototype.stop = function() {
617
870
  this._doStop();
618
- }, Object.defineProperty(n.prototype, "animatedValue", { get: function() {
871
+ }, Object.defineProperty(r.prototype, "animatedValue", { get: function() {
619
872
  return (this.endValue - this.startValue) * this._currentFrication + this.startValue;
620
- }, enumerable: !1, configurable: !0 }), n.prototype.doStart = function(m) {
621
- this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(), m && (this._mStartTime -= m / (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 () {
873
+ }, enumerable: !1, configurable: !0 }), r.prototype.doStart = function(v) {
874
+ this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(), v && (this._mStartTime -= v / (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 () {
622
875
  setTimeout(function() {postMessage(null)}, 1 / 60)
623
876
  }`])))), this.onStart(), this._doFrame();
624
- }, n.prototype._doStop = function() {
877
+ }, r.prototype._doStop = function() {
625
878
  this._isRunning = !1, this._worker !== null && (this._worker.terminate(), this._worker = null);
626
- }, n.prototype._doFrame = function() {
879
+ }, r.prototype._doFrame = function() {
627
880
  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))));
628
- }, n.prototype._doDeltaTime = function(m) {
629
- m >= this.duration * this.loop ? (this._currentFrication = this.fillRule === 1 ? 0 : 1, this._isRunning = !1) : this._currentFrication = m % this.duration / this.duration, this.onUpdate(this.animatedValue), this._isRunning === !1 && (this._worker !== null && (this._worker.terminate(), this._worker = null), this.onEnd());
630
- }, n;
881
+ }, r.prototype._doDeltaTime = function(v) {
882
+ v >= this.duration * this.loop ? (this._currentFrication = this.fillRule === 1 ? 0 : 1, this._isRunning = !1) : this._currentFrication = v % this.duration / this.duration, this.onUpdate(this.animatedValue), this._isRunning === !1 && (this._worker !== null && (this._worker.terminate(), this._worker = null), this.onEnd());
883
+ }, r;
631
884
  }();
632
- y.default = r;
885
+ g.default = t;
633
886
  }]).default;
634
887
  });
635
888
  })(svga_lite_min);
636
889
  var svga_lite_minExports = svga_lite_min.exports;
637
- const _sfc_main = {
890
+ const _sfc_main$1 = {
638
891
  __name: "hbis-svgaPlayer",
639
892
  props: {
640
893
  /**
@@ -713,72 +966,308 @@ const _sfc_main = {
713
966
  */
714
967
  "error"
715
968
  ],
716
- setup(c, { expose: y, emit: i }) {
969
+ setup(y, { expose: g, emit: n }) {
717
970
  useCssVars((e) => ({
718
- v5ce75b7f: c.width,
719
- v26351a8e: c.height
971
+ v404d30eb: y.width,
972
+ a0ec1abc: y.height
720
973
  }));
721
- const r = c, n = i, m = ref(null), f = ref(null);
722
- let v = null, a = null, d = null;
974
+ const t = y, r = n, v = ref(null), h = ref(null);
975
+ let m = null, o = null, s = null;
723
976
  const l = async () => {
724
977
  try {
725
- v = new svga_lite_minExports.Parser(), d = await v.load(r.src), a = new svga_lite_minExports.Player(f.value), a.loop = r.loop, a.speed = r.speed, a.onStart = () => n("play"), a.onPause = () => n("pause"), a.onEnd = () => n("ended"), a.onFrame = () => n("progress", a.progress), await a.setAnimationData(d), r.progress > 0 && (a.progress = r.progress), r.autoplay && a.start(), n("loaded");
978
+ m = new svga_lite_minExports.Parser(), s = await m.load(t.src), o = new svga_lite_minExports.Player(h.value), o.loop = t.loop, o.speed = t.speed, o.onStart = () => r("play"), o.onPause = () => r("pause"), o.onEnd = () => r("ended"), o.onFrame = () => r("progress", o.progress), await o.setAnimationData(s), t.progress > 0 && (o.progress = t.progress), t.autoplay && o.start(), r("loaded");
726
979
  } catch (e) {
727
- console.error("SVGA 加载失败:", e), n("error", e);
980
+ console.error("SVGA 加载失败:", e), r("error", e);
728
981
  }
729
- }, t = () => {
730
- a && a.start();
731
- }, h = () => {
732
- a && a.pause();
733
- }, p = () => {
734
- a && a.stop();
735
- }, x = () => {
736
- a && (a.stop(), a.start());
737
- }, _ = (e) => {
738
- a && (a.progress = e);
739
- }, s = (e) => {
740
- a && (a.speed = e);
741
- }, u = (e) => {
742
- a && (a.loop = e);
982
+ }, i = () => {
983
+ o && o.start();
984
+ }, f = () => {
985
+ o && o.pause();
986
+ }, u = () => {
987
+ o && o.stop();
988
+ }, S = () => {
989
+ o && (o.stop(), o.start());
990
+ }, k = (e) => {
991
+ o && (o.progress = e);
992
+ }, a = (e) => {
993
+ o && (o.speed = e);
994
+ }, p = (e) => {
995
+ o && (o.loop = e);
743
996
  };
744
- return y({
745
- play: t,
746
- pause: h,
747
- stop: p,
748
- restart: x,
749
- setProgress: _,
750
- setSpeed: s,
751
- setLoop: u
752
- }), watch(() => r.src, async (e) => {
997
+ return g({
998
+ play: i,
999
+ pause: f,
1000
+ stop: u,
1001
+ restart: S,
1002
+ setProgress: k,
1003
+ setSpeed: a,
1004
+ setLoop: p
1005
+ }), watch(() => t.src, async (e) => {
753
1006
  e && await l();
754
- }), watch(() => r.loop, (e) => {
755
- u(e);
756
- }), watch(() => r.speed, (e) => {
757
- s(e);
758
- }), watch(() => r.progress, (e) => {
759
- _(e);
1007
+ }), watch(() => t.loop, (e) => {
1008
+ p(e);
1009
+ }), watch(() => t.speed, (e) => {
1010
+ a(e);
1011
+ }), watch(() => t.progress, (e) => {
1012
+ k(e);
760
1013
  }), onMounted(async () => {
761
1014
  await nextTick(), await l();
762
1015
  }), onUnmounted(() => {
763
- a && (a.stop(), a = null), v && (v = null), d = null;
764
- }), (e, k) => (openBlock(), createElementBlock("div", {
1016
+ o && (o.stop(), o = null), m && (m = null), s = null;
1017
+ }), (e, A) => (openBlock(), createElementBlock("div", {
765
1018
  ref_key: "containerRef",
766
- ref: m,
1019
+ ref: v,
767
1020
  class: "svga-player-container"
768
1021
  }, [
769
1022
  createElementVNode("canvas", {
770
1023
  ref_key: "canvasRef",
771
- ref: f,
1024
+ ref: h,
772
1025
  class: "svga-player-canvas"
773
1026
  }, null, 512)
774
1027
  ], 512));
775
1028
  }
776
- }, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b83dcf1"]]);
1029
+ }, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-94c319f8"]]), _sfc_main = {
1030
+ __name: "hbis-auto-scroll-list",
1031
+ props: {
1032
+ // 列表数据数组
1033
+ data: {
1034
+ type: Array,
1035
+ default: () => []
1036
+ },
1037
+ // 滚动速度
1038
+ speed: {
1039
+ type: Number,
1040
+ default: 1
1041
+ },
1042
+ // 滚动方向:vertical(垂直)或horizontal(水平)
1043
+ direction: {
1044
+ type: String,
1045
+ default: "vertical",
1046
+ validator: (y) => ["vertical", "horizontal"].includes(y)
1047
+ },
1048
+ // 鼠标悬停是否暂停
1049
+ pauseOnHover: {
1050
+ type: Boolean,
1051
+ default: !0
1052
+ },
1053
+ // 列表项高度(垂直滚动时使用)
1054
+ itemHeight: {
1055
+ type: Number,
1056
+ default: 40
1057
+ },
1058
+ // 列表项宽度(水平滚动时使用)
1059
+ itemWidth: {
1060
+ type: Number,
1061
+ default: 200
1062
+ },
1063
+ // 容器高度
1064
+ containerHeight: {
1065
+ type: [Number, String],
1066
+ default: 300
1067
+ },
1068
+ // 容器宽度
1069
+ containerWidth: {
1070
+ type: [Number, String],
1071
+ default: "100%"
1072
+ },
1073
+ // 是否循环滚动
1074
+ loop: {
1075
+ type: Boolean,
1076
+ default: !0
1077
+ },
1078
+ // 自定义列表项类名
1079
+ customItemClass: {
1080
+ type: String,
1081
+ default: ""
1082
+ },
1083
+ // 自定义列表项样式
1084
+ itemStyle: {
1085
+ type: Object,
1086
+ default: () => ({})
1087
+ }
1088
+ },
1089
+ emits: ["scroll", "pause", "resume", "dragStart", "dragEnd"],
1090
+ setup(y, { expose: g, emit: n }) {
1091
+ const t = y, r = n, v = ref(null), h = ref(null), m = ref(!1), o = ref(null), s = ref(0), l = ref([]), i = ref(!1), f = ref(0), u = ref(0), S = ref(0), k = ref(!1), a = computed(() => ({
1092
+ // 动态设置容器高度和宽度
1093
+ height: typeof t.containerHeight == "number" ? `${t.containerHeight}px` : t.containerHeight,
1094
+ width: typeof t.containerWidth == "number" ? `${t.containerWidth}px` : t.containerWidth,
1095
+ overflow: "hidden",
1096
+ // 隐藏超出部分
1097
+ position: "relative"
1098
+ // 相对定位,为绝对定位的内容容器提供参考
1099
+ })), p = computed(() => {
1100
+ const c = {
1101
+ position: "absolute",
1102
+ // 绝对定位,实现自由移动
1103
+ transition: "none",
1104
+ // 禁用过渡,使用transform实现平滑滚动
1105
+ willChange: "transform"
1106
+ // 告诉浏览器将要变化的属性,优化性能
1107
+ };
1108
+ return t.direction === "vertical" ? c.transform = `translateY(${s.value}px)` : c.transform = `translateX(${s.value}px)`, c;
1109
+ }), e = () => {
1110
+ if (!t.data || t.data.length === 0) {
1111
+ l.value = [];
1112
+ return;
1113
+ }
1114
+ t.loop ? l.value = [...t.data, ...t.data] : l.value = [...t.data];
1115
+ }, A = () => {
1116
+ if (m.value || i.value) {
1117
+ o.value = requestAnimationFrame(A);
1118
+ return;
1119
+ }
1120
+ const c = v.value, b = h.value;
1121
+ if (!c || !b) {
1122
+ o.value = requestAnimationFrame(A);
1123
+ return;
1124
+ }
1125
+ const O = t.direction === "vertical" ? c.offsetHeight : c.offsetWidth, B = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
1126
+ if (s.value -= t.speed, t.loop)
1127
+ Math.abs(s.value) >= B && (s.value = 0);
1128
+ else {
1129
+ const j = -(B - O);
1130
+ if (s.value <= j) {
1131
+ s.value = j, m.value = !0, r("scroll", s.value);
1132
+ return;
1133
+ }
1134
+ }
1135
+ r("scroll", s.value), o.value = requestAnimationFrame(A);
1136
+ }, d = () => {
1137
+ o.value && cancelAnimationFrame(o.value), o.value = requestAnimationFrame(A);
1138
+ }, w = () => {
1139
+ o.value && (cancelAnimationFrame(o.value), o.value = null);
1140
+ }, x = () => {
1141
+ m.value = !0, r("pause");
1142
+ }, _ = () => {
1143
+ m.value = !1, r("resume");
1144
+ }, N = () => {
1145
+ t.pauseOnHover && x();
1146
+ }, T = () => {
1147
+ t.pauseOnHover && !i.value && _();
1148
+ }, F = (c) => {
1149
+ i.value = !0, k.value = m.value, m.value = !0, f.value = t.direction === "vertical" ? c.clientY : c.clientX, u.value = f.value, S.value = s.value, r("dragStart"), document.addEventListener("mousemove", C), document.addEventListener("mouseup", D);
1150
+ }, C = (c) => {
1151
+ if (!i.value) return;
1152
+ u.value = t.direction === "vertical" ? c.clientY : c.clientX;
1153
+ const b = u.value - f.value;
1154
+ s.value = S.value + b;
1155
+ const O = v.value, E = h.value;
1156
+ if (O && E) {
1157
+ const B = t.direction === "vertical" ? O.offsetHeight : O.offsetWidth, $ = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
1158
+ if (t.loop)
1159
+ s.value > 0 ? s.value = 0 : Math.abs(s.value) > $ && (s.value = -$);
1160
+ else {
1161
+ const R = -($ - B);
1162
+ s.value > 0 ? s.value = 0 : s.value < R && (s.value = R);
1163
+ }
1164
+ }
1165
+ r("scroll", s.value);
1166
+ }, D = () => {
1167
+ i.value && (i.value = !1, document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", D), k.value || (m.value = !1), r("dragEnd"));
1168
+ }, P = (c) => {
1169
+ const b = c.touches[0];
1170
+ i.value = !0, k.value = m.value, m.value = !0, f.value = t.direction === "vertical" ? b.clientY : b.clientX, u.value = f.value, S.value = s.value, r("dragStart");
1171
+ }, L = (c) => {
1172
+ if (!i.value) return;
1173
+ c.preventDefault();
1174
+ const b = c.touches[0];
1175
+ u.value = t.direction === "vertical" ? b.clientY : b.clientX;
1176
+ const O = u.value - f.value;
1177
+ s.value = S.value + O;
1178
+ const E = v.value, B = h.value;
1179
+ if (E && B) {
1180
+ const j = t.direction === "vertical" ? E.offsetHeight : E.offsetWidth, R = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
1181
+ if (t.loop)
1182
+ s.value > 0 ? s.value = 0 : Math.abs(s.value) > R && (s.value = -R);
1183
+ else {
1184
+ const z = -(R - j);
1185
+ s.value > 0 ? s.value = 0 : s.value < z && (s.value = z);
1186
+ }
1187
+ }
1188
+ r("scroll", s.value);
1189
+ }, V = () => {
1190
+ i.value && (i.value = !1, k.value || (m.value = !1), r("dragEnd"));
1191
+ }, M = (c) => {
1192
+ s.value = c;
1193
+ }, I = () => {
1194
+ s.value = 0;
1195
+ }, W = () => {
1196
+ const c = v.value;
1197
+ if (c) {
1198
+ const b = h.value;
1199
+ if (b) {
1200
+ const O = t.direction === "vertical" ? b.offsetHeight : b.offsetWidth;
1201
+ s.value = -(O - c.offsetHeight);
1202
+ }
1203
+ }
1204
+ };
1205
+ return watch(() => t.data, () => {
1206
+ e(), s.value = 0;
1207
+ }, { deep: !0 }), watch(() => t.speed, () => {
1208
+ m.value || (w(), d());
1209
+ }), onMounted(() => {
1210
+ e(), nextTick(() => {
1211
+ d();
1212
+ const c = v.value;
1213
+ c && (c.addEventListener("mouseenter", N), c.addEventListener("mouseleave", T));
1214
+ });
1215
+ }), onUnmounted(() => {
1216
+ w();
1217
+ const c = v.value;
1218
+ c && (c.removeEventListener("mouseenter", N), c.removeEventListener("mouseleave", T)), document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", D);
1219
+ }), g({
1220
+ pause: x,
1221
+ // 暂停滚动
1222
+ resume: _,
1223
+ // 恢复滚动
1224
+ scrollTo: M,
1225
+ // 滚动到指定位置
1226
+ scrollToTop: I,
1227
+ // 滚动到顶部
1228
+ scrollToBottom: W,
1229
+ // 滚动到底部
1230
+ isPaused: m,
1231
+ // 是否暂停(响应式)
1232
+ isDragging: i
1233
+ // 是否正在拖拽(响应式)
1234
+ }), (c, b) => (openBlock(), createElementBlock("div", {
1235
+ class: "hbis-auto-scroll-list",
1236
+ ref_key: "containerRef",
1237
+ ref: v,
1238
+ style: normalizeStyle(a.value),
1239
+ onMousedown: F,
1240
+ onTouchstart: P,
1241
+ onTouchmove: L,
1242
+ onTouchend: V
1243
+ }, [
1244
+ createElementVNode("div", {
1245
+ class: "scroll-content",
1246
+ ref_key: "contentRef",
1247
+ ref: h,
1248
+ style: normalizeStyle(p.value)
1249
+ }, [
1250
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (O, E) => renderSlot(c.$slots, "item", {
1251
+ item: O,
1252
+ index: E
1253
+ }, () => [
1254
+ createElementVNode("div", {
1255
+ class: "default-item",
1256
+ style: normalizeStyle(y.itemStyle)
1257
+ }, toDisplayString(O), 5)
1258
+ ], !0)), 256))
1259
+ ], 4)
1260
+ ], 36));
1261
+ }
1262
+ }, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5bc1d0d8"]]);
777
1263
  export {
778
1264
  C1,
779
1265
  C2,
1266
+ HbisAutoScrollList,
780
1267
  HbisSvgaPlayer,
1268
+ HbisAutoScrollList as hbisAutoScrollList,
781
1269
  hbisDateStrip,
1270
+ _sfc_main$2 as hbisPreviewImage,
782
1271
  HbisSvgaPlayer as hbisSvgaPlayer
783
1272
  };
784
1273
  //# sourceMappingURL=index.es.js.map