@curiouslearning/gdl-player-core 1.1.0 → 1.2.1
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/Image-C1iSgNcV.js +11 -0
- package/dist/Image-CJI9T-SB.cjs +1 -0
- package/dist/components/Player.d.ts +3 -1
- package/dist/{dolottie-_lFr9NOP.cjs → dolottie-C2YAu2UJ.cjs} +2 -2
- package/dist/{dolottie-D6pmgIXi.js → dolottie-NQiBiHTe.js} +428 -427
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1215 -3569
- package/dist/lib/utils.d.ts +13 -3
- package/dist/utils-CYohLPB4.js +30 -0
- package/dist/utils-DkVRHjf3.cjs +1 -0
- package/package.json +7 -2
- package/dist/Image-BUpmrK8U.cjs +0 -1
- package/dist/Image-Bwx-qXJQ.js +0 -10
- package/dist/utils-DTI6gl3r.cjs +0 -18
- package/dist/utils-Dm7P4Nnv.js +0 -1116
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { a as e,
|
|
1
|
+
import { a as e, n as t } from "./utils-CYohLPB4.js";
|
|
2
|
+
import n, { useCallback as r, useEffect as i, useRef as a } from "react";
|
|
3
|
+
import { Fragment as o, jsx as s } from "react/jsx-runtime";
|
|
2
4
|
//#region node_modules/@lottiefiles/dotlottie-web/dist/index.js
|
|
3
|
-
|
|
4
|
-
function o(e) {
|
|
5
|
+
function c(e) {
|
|
5
6
|
"@babel/helpers - typeof";
|
|
6
|
-
return
|
|
7
|
+
return c = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
7
8
|
return typeof e;
|
|
8
9
|
} : function(e) {
|
|
9
10
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
10
|
-
},
|
|
11
|
+
}, c(e);
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
if (
|
|
13
|
+
function l(e, t) {
|
|
14
|
+
if (c(e) != "object" || !e) return e;
|
|
14
15
|
var n = e[Symbol.toPrimitive];
|
|
15
16
|
if (n !== void 0) {
|
|
16
17
|
var r = n.call(e, t || "default");
|
|
17
|
-
if (
|
|
18
|
+
if (c(r) != "object") return r;
|
|
18
19
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
19
20
|
}
|
|
20
21
|
return (t === "string" ? String : Number)(e);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
var t =
|
|
24
|
-
return
|
|
23
|
+
function u(e) {
|
|
24
|
+
var t = l(e, "string");
|
|
25
|
+
return c(t) == "symbol" ? t : t + "";
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
return (t =
|
|
27
|
+
function d(e, t, n) {
|
|
28
|
+
return (t = u(t)) in e ? Object.defineProperty(e, t, {
|
|
28
29
|
value: n,
|
|
29
30
|
enumerable: !0,
|
|
30
31
|
configurable: !0,
|
|
31
32
|
writable: !0
|
|
32
33
|
}) : e[t] = n, e;
|
|
33
34
|
}
|
|
34
|
-
var
|
|
35
|
+
var f = class {
|
|
35
36
|
requestAnimationFrame(e) {
|
|
36
37
|
return requestAnimationFrame(e);
|
|
37
38
|
}
|
|
38
39
|
cancelAnimationFrame(e) {
|
|
39
40
|
cancelAnimationFrame(e);
|
|
40
41
|
}
|
|
41
|
-
},
|
|
42
|
+
}, p = class {
|
|
42
43
|
constructor() {
|
|
43
|
-
|
|
44
|
+
d(this, "_lastHandleId", 0), d(this, "_lastImmediate", null);
|
|
44
45
|
}
|
|
45
46
|
requestAnimationFrame(e) {
|
|
46
47
|
return this._lastHandleId >= 2 ** 53 - 1 && (this._lastHandleId = 0), this._lastHandleId += 1, this._lastImmediate = setImmediate(() => {
|
|
@@ -50,9 +51,9 @@ var u = class {
|
|
|
50
51
|
cancelAnimationFrame(e) {
|
|
51
52
|
this._lastImmediate && clearImmediate(this._lastImmediate);
|
|
52
53
|
}
|
|
53
|
-
},
|
|
54
|
+
}, m = class {
|
|
54
55
|
constructor() {
|
|
55
|
-
|
|
56
|
+
d(this, "_strategy", void 0), this._strategy = typeof requestAnimationFrame == "function" ? new f() : new p();
|
|
56
57
|
}
|
|
57
58
|
requestAnimationFrame(e) {
|
|
58
59
|
return this._strategy.requestAnimationFrame(e);
|
|
@@ -60,12 +61,12 @@ var u = class {
|
|
|
60
61
|
cancelAnimationFrame(e) {
|
|
61
62
|
this._strategy.cancelAnimationFrame(e);
|
|
62
63
|
}
|
|
63
|
-
},
|
|
64
|
+
}, h = typeof window < "u" && window.document !== void 0, g = new Uint8Array([
|
|
64
65
|
80,
|
|
65
66
|
75,
|
|
66
67
|
3,
|
|
67
68
|
4
|
|
68
|
-
]),
|
|
69
|
+
]), _ = [
|
|
69
70
|
"v",
|
|
70
71
|
"ip",
|
|
71
72
|
"op",
|
|
@@ -73,49 +74,49 @@ var u = class {
|
|
|
73
74
|
"fr",
|
|
74
75
|
"w",
|
|
75
76
|
"h"
|
|
76
|
-
],
|
|
77
|
+
], v = "0.74.0", y = "@lottiefiles/dotlottie-web", b, x = typeof TextDecoder < "u" ? new TextDecoder("utf-8", {
|
|
77
78
|
ignoreBOM: !0,
|
|
78
79
|
fatal: !0
|
|
79
80
|
}) : { decode: () => {
|
|
80
81
|
throw Error("TextDecoder not available");
|
|
81
82
|
} };
|
|
82
|
-
typeof TextDecoder < "u" &&
|
|
83
|
-
var
|
|
84
|
-
function
|
|
85
|
-
return (
|
|
83
|
+
typeof TextDecoder < "u" && x.decode();
|
|
84
|
+
var S = null;
|
|
85
|
+
function C() {
|
|
86
|
+
return (S === null || S.byteLength === 0) && (S = new Uint8Array(b.memory.buffer)), S;
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
return e >>>= 0,
|
|
88
|
+
function w(e, t) {
|
|
89
|
+
return e >>>= 0, x.decode(C().subarray(e, e + t));
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
-
let t =
|
|
92
|
-
return
|
|
91
|
+
function T(e) {
|
|
92
|
+
let t = b.__externref_table_alloc_command_export();
|
|
93
|
+
return b.__wbindgen_export_3.set(t, e), t;
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function E(e, t) {
|
|
95
96
|
try {
|
|
96
97
|
return e.apply(this, t);
|
|
97
98
|
} catch (e) {
|
|
98
|
-
let t =
|
|
99
|
-
|
|
99
|
+
let t = T(e);
|
|
100
|
+
b.__wbindgen_exn_store_command_export(t);
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
var
|
|
103
|
+
var D = 0, O = typeof TextEncoder < "u" ? new TextEncoder("utf-8") : { encode: () => {
|
|
103
104
|
throw Error("TextEncoder not available");
|
|
104
|
-
} },
|
|
105
|
-
return
|
|
105
|
+
} }, k = typeof O.encodeInto == "function" ? function(e, t) {
|
|
106
|
+
return O.encodeInto(e, t);
|
|
106
107
|
} : function(e, t) {
|
|
107
|
-
let n =
|
|
108
|
+
let n = O.encode(e);
|
|
108
109
|
return t.set(n), {
|
|
109
110
|
read: e.length,
|
|
110
111
|
written: n.length
|
|
111
112
|
};
|
|
112
113
|
};
|
|
113
|
-
function
|
|
114
|
+
function A(e, t, n) {
|
|
114
115
|
if (n === void 0) {
|
|
115
|
-
let n =
|
|
116
|
-
return
|
|
116
|
+
let n = O.encode(e), r = t(n.length, 1) >>> 0;
|
|
117
|
+
return C().subarray(r, r + n.length).set(n), D = n.length, r;
|
|
117
118
|
}
|
|
118
|
-
let r = e.length, i = t(r, 1) >>> 0, a =
|
|
119
|
+
let r = e.length, i = t(r, 1) >>> 0, a = C(), o = 0;
|
|
119
120
|
for (; o < r; o++) {
|
|
120
121
|
let t = e.charCodeAt(o);
|
|
121
122
|
if (t > 127) break;
|
|
@@ -123,43 +124,43 @@ function O(e, t, n) {
|
|
|
123
124
|
}
|
|
124
125
|
if (o !== r) {
|
|
125
126
|
o !== 0 && (e = e.slice(o)), i = n(i, r, r = o + e.length * 3, 1) >>> 0;
|
|
126
|
-
let t =
|
|
127
|
+
let t = C().subarray(i + o, i + r), a = k(e, t);
|
|
127
128
|
o += a.written, i = n(i, r, o, 1) >>> 0;
|
|
128
129
|
}
|
|
129
|
-
return
|
|
130
|
+
return D = o, i;
|
|
130
131
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
-
return (
|
|
132
|
+
var j = null;
|
|
133
|
+
function M() {
|
|
134
|
+
return (j === null || j.buffer.detached === !0 || j.buffer.detached === void 0 && j.buffer !== b.memory.buffer) && (j = new DataView(b.memory.buffer)), j;
|
|
134
135
|
}
|
|
135
136
|
function ee(e) {
|
|
136
137
|
return e == null;
|
|
137
138
|
}
|
|
138
|
-
var
|
|
139
|
+
var N = null;
|
|
139
140
|
function te() {
|
|
140
|
-
return (
|
|
141
|
+
return (N === null || N.byteLength === 0) && (N = new Float32Array(b.memory.buffer)), N;
|
|
141
142
|
}
|
|
142
143
|
function ne(e, t) {
|
|
143
144
|
let n = t(e.length * 4, 4) >>> 0;
|
|
144
|
-
return te().set(e, n / 4),
|
|
145
|
+
return te().set(e, n / 4), D = e.length, n;
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function P(e, t) {
|
|
147
148
|
let n = t(e.length * 1, 1) >>> 0;
|
|
148
|
-
return
|
|
149
|
+
return C().set(e, n / 1), D = e.length, n;
|
|
149
150
|
}
|
|
150
151
|
function re(e, t) {
|
|
151
152
|
let n = t(e.length * 4, 4) >>> 0;
|
|
152
153
|
for (let t = 0; t < e.length; t++) {
|
|
153
|
-
let r =
|
|
154
|
-
|
|
154
|
+
let r = T(e[t]);
|
|
155
|
+
M().setUint32(n + 4 * t, r, !0);
|
|
155
156
|
}
|
|
156
|
-
return
|
|
157
|
+
return D = e.length, n;
|
|
157
158
|
}
|
|
158
159
|
function ie(e, t) {
|
|
159
|
-
let n =
|
|
160
|
-
return
|
|
160
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D, i = P(t, b.__wbindgen_malloc_command_export), a = D;
|
|
161
|
+
return b.register_font(n, r, i, a) !== 0;
|
|
161
162
|
}
|
|
162
|
-
var
|
|
163
|
+
var F = Object.freeze({
|
|
163
164
|
Forward: 0,
|
|
164
165
|
0: "Forward",
|
|
165
166
|
Reverse: 1,
|
|
@@ -168,437 +169,437 @@ var N = Object.freeze({
|
|
|
168
169
|
2: "Bounce",
|
|
169
170
|
ReverseBounce: 3,
|
|
170
171
|
3: "ReverseBounce"
|
|
171
|
-
}),
|
|
172
|
+
}), ae = typeof FinalizationRegistry > "u" ? {
|
|
172
173
|
register: () => {},
|
|
173
174
|
unregister: () => {}
|
|
174
|
-
} : new FinalizationRegistry((e) =>
|
|
175
|
+
} : new FinalizationRegistry((e) => b.__wbg_dotlottieplayerwasm_free(e >>> 0, 1)), oe = class {
|
|
175
176
|
__destroy_into_raw() {
|
|
176
177
|
let e = this.__wbg_ptr;
|
|
177
|
-
return this.__wbg_ptr = 0,
|
|
178
|
+
return this.__wbg_ptr = 0, ae.unregister(this), e;
|
|
178
179
|
}
|
|
179
180
|
free() {
|
|
180
181
|
let e = this.__destroy_into_raw();
|
|
181
|
-
|
|
182
|
+
b.__wbg_dotlottieplayerwasm_free(e, 0);
|
|
182
183
|
}
|
|
183
184
|
clear_slot(e) {
|
|
184
|
-
let t =
|
|
185
|
-
return
|
|
185
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
186
|
+
return b.dotlottieplayerwasm_clear_slot(this.__wbg_ptr, t, n) !== 0;
|
|
186
187
|
}
|
|
187
188
|
is_playing() {
|
|
188
|
-
return
|
|
189
|
+
return b.dotlottieplayerwasm_is_playing(this.__wbg_ptr) !== 0;
|
|
189
190
|
}
|
|
190
191
|
is_stopped() {
|
|
191
|
-
return
|
|
192
|
+
return b.dotlottieplayerwasm_is_stopped(this.__wbg_ptr) !== 0;
|
|
192
193
|
}
|
|
193
194
|
layout_fit() {
|
|
194
195
|
let e, t;
|
|
195
196
|
try {
|
|
196
|
-
let n =
|
|
197
|
-
return e = n[0], t = n[1],
|
|
197
|
+
let n = b.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);
|
|
198
|
+
return e = n[0], t = n[1], w(n[0], n[1]);
|
|
198
199
|
} finally {
|
|
199
|
-
|
|
200
|
+
b.__wbindgen_free_command_export(e, t, 1);
|
|
200
201
|
}
|
|
201
202
|
}
|
|
202
203
|
loop_count() {
|
|
203
|
-
return
|
|
204
|
+
return b.dotlottieplayerwasm_loop_count(this.__wbg_ptr) >>> 0;
|
|
204
205
|
}
|
|
205
206
|
poll_event() {
|
|
206
|
-
return
|
|
207
|
+
return b.dotlottieplayerwasm_poll_event(this.__wbg_ptr);
|
|
207
208
|
}
|
|
208
209
|
reset_slot(e) {
|
|
209
|
-
let t =
|
|
210
|
-
return
|
|
210
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
211
|
+
return b.dotlottieplayerwasm_reset_slot(this.__wbg_ptr, t, n) !== 0;
|
|
211
212
|
}
|
|
212
213
|
set_layout(e, t, n) {
|
|
213
|
-
let r =
|
|
214
|
-
return
|
|
214
|
+
let r = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), i = D;
|
|
215
|
+
return b.dotlottieplayerwasm_set_layout(this.__wbg_ptr, r, i, t, n) !== 0;
|
|
215
216
|
}
|
|
216
217
|
set_marker(e) {
|
|
217
|
-
let t =
|
|
218
|
-
|
|
218
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
219
|
+
b.dotlottieplayerwasm_set_marker(this.__wbg_ptr, t, n);
|
|
219
220
|
}
|
|
220
221
|
clear_slots() {
|
|
221
|
-
return
|
|
222
|
+
return b.dotlottieplayerwasm_clear_slots(this.__wbg_ptr) !== 0;
|
|
222
223
|
}
|
|
223
224
|
is_complete() {
|
|
224
|
-
return
|
|
225
|
+
return b.dotlottieplayerwasm_is_complete(this.__wbg_ptr) !== 0;
|
|
225
226
|
}
|
|
226
227
|
is_tweening() {
|
|
227
|
-
return
|
|
228
|
+
return b.dotlottieplayerwasm_is_tweening(this.__wbg_ptr) !== 0;
|
|
228
229
|
}
|
|
229
230
|
reset_slots() {
|
|
230
|
-
return
|
|
231
|
+
return b.dotlottieplayerwasm_reset_slots(this.__wbg_ptr) !== 0;
|
|
231
232
|
}
|
|
232
233
|
reset_theme() {
|
|
233
|
-
return
|
|
234
|
+
return b.dotlottieplayerwasm_reset_theme(this.__wbg_ptr) !== 0;
|
|
234
235
|
}
|
|
235
236
|
segment_end() {
|
|
236
|
-
return
|
|
237
|
+
return b.dotlottieplayerwasm_segment_end(this.__wbg_ptr);
|
|
237
238
|
}
|
|
238
239
|
set_quality(e) {
|
|
239
|
-
return
|
|
240
|
+
return b.dotlottieplayerwasm_set_quality(this.__wbg_ptr, e) !== 0;
|
|
240
241
|
}
|
|
241
242
|
set_segment(e, t) {
|
|
242
|
-
return
|
|
243
|
+
return b.dotlottieplayerwasm_set_segment(this.__wbg_ptr, e, t) !== 0;
|
|
243
244
|
}
|
|
244
245
|
static unload_font(e) {
|
|
245
|
-
let t =
|
|
246
|
-
return
|
|
246
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
247
|
+
return b.dotlottieplayerwasm_unload_font(t, n) !== 0;
|
|
247
248
|
}
|
|
248
249
|
animation_id() {
|
|
249
|
-
let e =
|
|
250
|
-
return e[0] !== 0 && (t =
|
|
250
|
+
let e = b.dotlottieplayerwasm_animation_id(this.__wbg_ptr), t;
|
|
251
|
+
return e[0] !== 0 && (t = w(e[0], e[1]).slice(), b.__wbindgen_free_command_export(e[0], e[1] * 1, 1)), t;
|
|
251
252
|
}
|
|
252
253
|
audio_volume() {
|
|
253
|
-
return
|
|
254
|
+
return b.dotlottieplayerwasm_audio_volume(this.__wbg_ptr);
|
|
254
255
|
}
|
|
255
256
|
background_a() {
|
|
256
|
-
return
|
|
257
|
+
return b.dotlottieplayerwasm_background_a(this.__wbg_ptr);
|
|
257
258
|
}
|
|
258
259
|
background_b() {
|
|
259
|
-
return
|
|
260
|
+
return b.dotlottieplayerwasm_background_b(this.__wbg_ptr);
|
|
260
261
|
}
|
|
261
262
|
background_g() {
|
|
262
|
-
return
|
|
263
|
+
return b.dotlottieplayerwasm_background_g(this.__wbg_ptr);
|
|
263
264
|
}
|
|
264
265
|
background_r() {
|
|
265
|
-
return
|
|
266
|
+
return b.dotlottieplayerwasm_background_r(this.__wbg_ptr);
|
|
266
267
|
}
|
|
267
268
|
clear_marker() {
|
|
268
|
-
|
|
269
|
+
b.dotlottieplayerwasm_clear_marker(this.__wbg_ptr);
|
|
269
270
|
}
|
|
270
271
|
emit_on_loop() {
|
|
271
|
-
|
|
272
|
+
b.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr);
|
|
272
273
|
}
|
|
273
274
|
get_slot_ids() {
|
|
274
|
-
return
|
|
275
|
+
return b.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr);
|
|
275
276
|
}
|
|
276
277
|
get_slot_str(e) {
|
|
277
|
-
let t =
|
|
278
|
-
return r[0] !== 0 && (i =
|
|
278
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D, r = b.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr, t, n), i;
|
|
279
|
+
return r[0] !== 0 && (i = w(r[0], r[1]).slice(), b.__wbindgen_free_command_export(r[0], r[1] * 1, 1)), i;
|
|
279
280
|
}
|
|
280
281
|
marker_names() {
|
|
281
|
-
return
|
|
282
|
+
return b.dotlottieplayerwasm_marker_names(this.__wbg_ptr);
|
|
282
283
|
}
|
|
283
284
|
set_autoplay(e) {
|
|
284
|
-
|
|
285
|
+
b.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr, e);
|
|
285
286
|
}
|
|
286
287
|
set_slot_str(e, t) {
|
|
287
|
-
let n =
|
|
288
|
-
return
|
|
288
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D, i = A(t, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), a = D;
|
|
289
|
+
return b.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
289
290
|
}
|
|
290
291
|
set_viewport(e, t, n, r) {
|
|
291
|
-
return
|
|
292
|
+
return b.dotlottieplayerwasm_set_viewport(this.__wbg_ptr, e, t, n, r) !== 0;
|
|
292
293
|
}
|
|
293
294
|
total_frames() {
|
|
294
|
-
return
|
|
295
|
+
return b.dotlottieplayerwasm_total_frames(this.__wbg_ptr);
|
|
295
296
|
}
|
|
296
297
|
clear_segment() {
|
|
297
|
-
return
|
|
298
|
+
return b.dotlottieplayerwasm_clear_segment(this.__wbg_ptr) !== 0;
|
|
298
299
|
}
|
|
299
300
|
current_frame() {
|
|
300
|
-
return
|
|
301
|
+
return b.dotlottieplayerwasm_current_frame(this.__wbg_ptr);
|
|
301
302
|
}
|
|
302
303
|
get_slot_type(e) {
|
|
303
|
-
let t =
|
|
304
|
-
return r[0] !== 0 && (i =
|
|
304
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D, r = b.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr, t, n), i;
|
|
305
|
+
return r[0] !== 0 && (i = w(r[0], r[1]).slice(), b.__wbindgen_free_command_export(r[0], r[1] * 1, 1)), i;
|
|
305
306
|
}
|
|
306
307
|
get_slots_str() {
|
|
307
308
|
let e, t;
|
|
308
309
|
try {
|
|
309
|
-
let n =
|
|
310
|
-
return e = n[0], t = n[1],
|
|
310
|
+
let n = b.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);
|
|
311
|
+
return e = n[0], t = n[1], w(n[0], n[1]);
|
|
311
312
|
} finally {
|
|
312
|
-
|
|
313
|
+
b.__wbindgen_free_command_export(e, t, 1);
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
get_transform() {
|
|
316
|
-
return
|
|
317
|
+
return b.dotlottieplayerwasm_get_transform(this.__wbg_ptr);
|
|
317
318
|
}
|
|
318
319
|
segment_start() {
|
|
319
|
-
return
|
|
320
|
+
return b.dotlottieplayerwasm_segment_start(this.__wbg_ptr);
|
|
320
321
|
}
|
|
321
322
|
set_slots_str(e) {
|
|
322
|
-
let t =
|
|
323
|
-
return
|
|
323
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
324
|
+
return b.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr, t, n) !== 0;
|
|
324
325
|
}
|
|
325
326
|
set_text_slot(e, t) {
|
|
326
|
-
let n =
|
|
327
|
-
return
|
|
327
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D, i = A(t, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), a = D;
|
|
328
|
+
return b.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
328
329
|
}
|
|
329
330
|
set_transform(e) {
|
|
330
|
-
let t = ne(e,
|
|
331
|
-
return
|
|
331
|
+
let t = ne(e, b.__wbindgen_malloc_command_export), n = D;
|
|
332
|
+
return b.dotlottieplayerwasm_set_transform(this.__wbg_ptr, t, n) !== 0;
|
|
332
333
|
}
|
|
333
334
|
sm_get_inputs() {
|
|
334
|
-
return
|
|
335
|
+
return b.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr);
|
|
335
336
|
}
|
|
336
337
|
sm_poll_event() {
|
|
337
|
-
return
|
|
338
|
+
return b.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr);
|
|
338
339
|
}
|
|
339
340
|
sm_post_click(e, t) {
|
|
340
|
-
|
|
341
|
+
b.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr, e, t);
|
|
341
342
|
}
|
|
342
343
|
animation_size() {
|
|
343
|
-
return
|
|
344
|
+
return b.dotlottieplayerwasm_animation_size(this.__wbg_ptr);
|
|
344
345
|
}
|
|
345
346
|
current_marker() {
|
|
346
|
-
let e =
|
|
347
|
-
return e[0] !== 0 && (t =
|
|
347
|
+
let e = b.dotlottieplayerwasm_current_marker(this.__wbg_ptr), t;
|
|
348
|
+
return e[0] !== 0 && (t = w(e[0], e[1]).slice(), b.__wbindgen_free_command_export(e[0], e[1] * 1, 1)), t;
|
|
348
349
|
}
|
|
349
350
|
layout_align_x() {
|
|
350
|
-
return
|
|
351
|
+
return b.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr);
|
|
351
352
|
}
|
|
352
353
|
layout_align_y() {
|
|
353
|
-
return
|
|
354
|
+
return b.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr);
|
|
354
355
|
}
|
|
355
356
|
load_animation(e) {
|
|
356
|
-
let t =
|
|
357
|
-
return
|
|
357
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
358
|
+
return b.dotlottieplayerwasm_load_animation(this.__wbg_ptr, t, n) !== 0;
|
|
358
359
|
}
|
|
359
360
|
loop_animation() {
|
|
360
|
-
return
|
|
361
|
+
return b.dotlottieplayerwasm_loop_animation(this.__wbg_ptr) !== 0;
|
|
361
362
|
}
|
|
362
363
|
set_background(e, t, n, r) {
|
|
363
|
-
return
|
|
364
|
+
return b.dotlottieplayerwasm_set_background(this.__wbg_ptr, e, t, n, r) !== 0;
|
|
364
365
|
}
|
|
365
366
|
set_color_slot(e, t, n, r) {
|
|
366
|
-
let i =
|
|
367
|
-
return
|
|
367
|
+
let i = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), a = D;
|
|
368
|
+
return b.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr, i, a, t, n, r) !== 0;
|
|
368
369
|
}
|
|
369
370
|
set_loop_count(e) {
|
|
370
|
-
|
|
371
|
+
b.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr, e);
|
|
371
372
|
}
|
|
372
373
|
set_theme_data(e) {
|
|
373
|
-
let t =
|
|
374
|
-
return
|
|
374
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
375
|
+
return b.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr, t, n) !== 0;
|
|
375
376
|
}
|
|
376
377
|
sm_reset_input(e) {
|
|
377
|
-
let t =
|
|
378
|
-
|
|
378
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
379
|
+
b.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr, t, n);
|
|
379
380
|
}
|
|
380
381
|
manifest_string() {
|
|
381
382
|
let e, t;
|
|
382
383
|
try {
|
|
383
|
-
let n =
|
|
384
|
-
return e = n[0], t = n[1],
|
|
384
|
+
let n = b.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);
|
|
385
|
+
return e = n[0], t = n[1], w(n[0], n[1]);
|
|
385
386
|
} finally {
|
|
386
|
-
|
|
387
|
+
b.__wbindgen_free_command_export(e, t, 1);
|
|
387
388
|
}
|
|
388
389
|
}
|
|
389
390
|
set_scalar_slot(e, t) {
|
|
390
|
-
let n =
|
|
391
|
-
return
|
|
391
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D;
|
|
392
|
+
return b.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr, n, r, t) !== 0;
|
|
392
393
|
}
|
|
393
394
|
set_vector_slot(e, t, n) {
|
|
394
|
-
let r =
|
|
395
|
-
return
|
|
395
|
+
let r = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), i = D;
|
|
396
|
+
return b.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr, r, i, t, n) !== 0;
|
|
396
397
|
}
|
|
397
398
|
setup_sw_target(e, t) {
|
|
398
|
-
return
|
|
399
|
+
return b.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr, e, t) !== 0;
|
|
399
400
|
}
|
|
400
401
|
get_pixel_buffer() {
|
|
401
|
-
return
|
|
402
|
+
return b.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr);
|
|
402
403
|
}
|
|
403
404
|
set_audio_volume(e) {
|
|
404
|
-
|
|
405
|
+
b.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr, e);
|
|
405
406
|
}
|
|
406
407
|
sm_current_state() {
|
|
407
408
|
let e, t;
|
|
408
409
|
try {
|
|
409
|
-
let n =
|
|
410
|
-
return e = n[0], t = n[1],
|
|
410
|
+
let n = b.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);
|
|
411
|
+
return e = n[0], t = n[1], w(n[0], n[1]);
|
|
411
412
|
} finally {
|
|
412
|
-
|
|
413
|
+
b.__wbindgen_free_command_export(e, t, 1);
|
|
413
414
|
}
|
|
414
415
|
}
|
|
415
416
|
state_machine_id() {
|
|
416
|
-
let e =
|
|
417
|
-
return e[0] !== 0 && (t =
|
|
417
|
+
let e = b.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr), t;
|
|
418
|
+
return e[0] !== 0 && (t = w(e[0], e[1]).slice(), b.__wbindgen_free_command_export(e[0], e[1] * 1, 1)), t;
|
|
418
419
|
}
|
|
419
420
|
get_state_machine(e) {
|
|
420
|
-
let t =
|
|
421
|
-
return r[0] !== 0 && (i =
|
|
421
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D, r = b.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr, t, n), i;
|
|
422
|
+
return r[0] !== 0 && (i = w(r[0], r[1]).slice(), b.__wbindgen_free_command_export(r[0], r[1] * 1, 1)), i;
|
|
422
423
|
}
|
|
423
424
|
set_position_slot(e, t, n) {
|
|
424
|
-
let r =
|
|
425
|
-
return
|
|
425
|
+
let r = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), i = D;
|
|
426
|
+
return b.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr, r, i, t, n) !== 0;
|
|
426
427
|
}
|
|
427
428
|
current_loop_count() {
|
|
428
|
-
return
|
|
429
|
+
return b.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr) >>> 0;
|
|
429
430
|
}
|
|
430
431
|
sm_framework_setup() {
|
|
431
|
-
return
|
|
432
|
+
return b.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr);
|
|
432
433
|
}
|
|
433
434
|
sm_post_pointer_up(e, t) {
|
|
434
|
-
|
|
435
|
+
b.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr, e, t);
|
|
435
436
|
}
|
|
436
437
|
state_machine_load(e) {
|
|
437
|
-
let t =
|
|
438
|
-
return
|
|
438
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
439
|
+
return b.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr, t, n) !== 0;
|
|
439
440
|
}
|
|
440
441
|
load_dotlottie_data(e) {
|
|
441
|
-
let t =
|
|
442
|
-
return
|
|
442
|
+
let t = P(e, b.__wbindgen_malloc_command_export), n = D;
|
|
443
|
+
return b.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr, t, n) !== 0;
|
|
443
444
|
}
|
|
444
445
|
sm_get_string_input(e) {
|
|
445
|
-
let t =
|
|
446
|
-
return r[0] !== 0 && (i =
|
|
446
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D, r = b.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr, t, n), i;
|
|
447
|
+
return r[0] !== 0 && (i = w(r[0], r[1]).slice(), b.__wbindgen_free_command_export(r[0], r[1] * 1, 1)), i;
|
|
447
448
|
}
|
|
448
449
|
sm_set_string_input(e, t) {
|
|
449
|
-
let n =
|
|
450
|
-
return
|
|
450
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D, i = A(t, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), a = D;
|
|
451
|
+
return b.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
451
452
|
}
|
|
452
453
|
sm_get_boolean_input(e) {
|
|
453
|
-
let t =
|
|
454
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D, r = b.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr, t, n);
|
|
454
455
|
return r === 16777215 ? void 0 : r !== 0;
|
|
455
456
|
}
|
|
456
457
|
sm_get_numeric_input(e) {
|
|
457
|
-
let t =
|
|
458
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D, r = b.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr, t, n);
|
|
458
459
|
return r === 4294967297 ? void 0 : r;
|
|
459
460
|
}
|
|
460
461
|
sm_post_pointer_down(e, t) {
|
|
461
|
-
|
|
462
|
+
b.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr, e, t);
|
|
462
463
|
}
|
|
463
464
|
sm_post_pointer_exit(e, t) {
|
|
464
|
-
|
|
465
|
+
b.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr, e, t);
|
|
465
466
|
}
|
|
466
467
|
sm_post_pointer_move(e, t) {
|
|
467
|
-
|
|
468
|
+
b.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr, e, t);
|
|
468
469
|
}
|
|
469
470
|
sm_set_boolean_input(e, t) {
|
|
470
|
-
let n =
|
|
471
|
-
return
|
|
471
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D;
|
|
472
|
+
return b.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr, n, r, t) !== 0;
|
|
472
473
|
}
|
|
473
474
|
sm_set_numeric_input(e, t) {
|
|
474
|
-
let n =
|
|
475
|
-
return
|
|
475
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D;
|
|
476
|
+
return b.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr, n, r, t) !== 0;
|
|
476
477
|
}
|
|
477
478
|
state_machine_unload() {
|
|
478
|
-
|
|
479
|
+
b.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr);
|
|
479
480
|
}
|
|
480
481
|
sm_post_pointer_enter(e, t) {
|
|
481
|
-
|
|
482
|
+
b.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr, e, t);
|
|
482
483
|
}
|
|
483
484
|
load_animation_from_id(e) {
|
|
484
|
-
let t =
|
|
485
|
-
return
|
|
485
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
486
|
+
return b.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr, t, n) !== 0;
|
|
486
487
|
}
|
|
487
488
|
sm_poll_internal_event() {
|
|
488
|
-
return
|
|
489
|
+
return b.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr);
|
|
489
490
|
}
|
|
490
491
|
use_frame_interpolation() {
|
|
491
|
-
return
|
|
492
|
+
return b.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr) !== 0;
|
|
492
493
|
}
|
|
493
494
|
reset_current_loop_count() {
|
|
494
|
-
|
|
495
|
+
b.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr);
|
|
495
496
|
}
|
|
496
497
|
sm_override_current_state(e, t) {
|
|
497
|
-
let n =
|
|
498
|
-
return
|
|
498
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D;
|
|
499
|
+
return b.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr, n, r, t) !== 0;
|
|
499
500
|
}
|
|
500
501
|
state_machine_load_from_id(e) {
|
|
501
|
-
let t =
|
|
502
|
-
return
|
|
502
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
503
|
+
return b.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr, t, n) !== 0;
|
|
503
504
|
}
|
|
504
505
|
set_use_frame_interpolation(e) {
|
|
505
|
-
|
|
506
|
+
b.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr, e);
|
|
506
507
|
}
|
|
507
508
|
constructor() {
|
|
508
|
-
let e =
|
|
509
|
-
return this.__wbg_ptr = e >>> 0,
|
|
509
|
+
let e = b.dotlottieplayerwasm_new();
|
|
510
|
+
return this.__wbg_ptr = e >>> 0, ae.register(this, this.__wbg_ptr, this), this;
|
|
510
511
|
}
|
|
511
512
|
mode() {
|
|
512
|
-
return
|
|
513
|
+
return b.dotlottieplayerwasm_mode(this.__wbg_ptr);
|
|
513
514
|
}
|
|
514
515
|
play() {
|
|
515
|
-
return
|
|
516
|
+
return b.dotlottieplayerwasm_play(this.__wbg_ptr) !== 0;
|
|
516
517
|
}
|
|
517
518
|
stop() {
|
|
518
|
-
return
|
|
519
|
+
return b.dotlottieplayerwasm_stop(this.__wbg_ptr) !== 0;
|
|
519
520
|
}
|
|
520
521
|
tick(e) {
|
|
521
|
-
return
|
|
522
|
+
return b.dotlottieplayerwasm_tick(this.__wbg_ptr, e) !== 0;
|
|
522
523
|
}
|
|
523
524
|
pause() {
|
|
524
|
-
return
|
|
525
|
+
return b.dotlottieplayerwasm_pause(this.__wbg_ptr) !== 0;
|
|
525
526
|
}
|
|
526
527
|
speed() {
|
|
527
|
-
return
|
|
528
|
+
return b.dotlottieplayerwasm_speed(this.__wbg_ptr);
|
|
528
529
|
}
|
|
529
530
|
width() {
|
|
530
|
-
return
|
|
531
|
+
return b.dotlottieplayerwasm_width(this.__wbg_ptr) >>> 0;
|
|
531
532
|
}
|
|
532
533
|
height() {
|
|
533
|
-
return
|
|
534
|
+
return b.dotlottieplayerwasm_height(this.__wbg_ptr) >>> 0;
|
|
534
535
|
}
|
|
535
536
|
render() {
|
|
536
|
-
return
|
|
537
|
+
return b.dotlottieplayerwasm_render(this.__wbg_ptr) !== 0;
|
|
537
538
|
}
|
|
538
539
|
markers() {
|
|
539
|
-
return
|
|
540
|
+
return b.dotlottieplayerwasm_markers(this.__wbg_ptr);
|
|
540
541
|
}
|
|
541
542
|
sm_fire(e) {
|
|
542
|
-
let t =
|
|
543
|
-
return
|
|
543
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
544
|
+
return b.dotlottieplayerwasm_sm_fire(this.__wbg_ptr, t, n) !== 0;
|
|
544
545
|
}
|
|
545
546
|
sm_stop() {
|
|
546
|
-
return
|
|
547
|
+
return b.dotlottieplayerwasm_sm_stop(this.__wbg_ptr) !== 0;
|
|
547
548
|
}
|
|
548
549
|
sm_tick(e) {
|
|
549
|
-
return
|
|
550
|
+
return b.dotlottieplayerwasm_sm_tick(this.__wbg_ptr, e) !== 0;
|
|
550
551
|
}
|
|
551
552
|
autoplay() {
|
|
552
|
-
return
|
|
553
|
+
return b.dotlottieplayerwasm_autoplay(this.__wbg_ptr) !== 0;
|
|
553
554
|
}
|
|
554
555
|
duration() {
|
|
555
|
-
return
|
|
556
|
+
return b.dotlottieplayerwasm_duration(this.__wbg_ptr);
|
|
556
557
|
}
|
|
557
558
|
set_loop(e) {
|
|
558
|
-
|
|
559
|
+
b.dotlottieplayerwasm_set_loop(this.__wbg_ptr, e);
|
|
559
560
|
}
|
|
560
561
|
set_mode(e) {
|
|
561
|
-
|
|
562
|
+
b.dotlottieplayerwasm_set_mode(this.__wbg_ptr, e);
|
|
562
563
|
}
|
|
563
564
|
sm_start(e, t) {
|
|
564
|
-
let n = re(t,
|
|
565
|
-
return
|
|
565
|
+
let n = re(t, b.__wbindgen_malloc_command_export), r = D;
|
|
566
|
+
return b.dotlottieplayerwasm_sm_start(this.__wbg_ptr, e, n, r) !== 0;
|
|
566
567
|
}
|
|
567
568
|
theme_id() {
|
|
568
|
-
let e =
|
|
569
|
-
return e[0] !== 0 && (t =
|
|
569
|
+
let e = b.dotlottieplayerwasm_theme_id(this.__wbg_ptr), t;
|
|
570
|
+
return e[0] !== 0 && (t = w(e[0], e[1]).slice(), b.__wbindgen_free_command_export(e[0], e[1] * 1, 1)), t;
|
|
570
571
|
}
|
|
571
572
|
is_loaded() {
|
|
572
|
-
return
|
|
573
|
+
return b.dotlottieplayerwasm_is_loaded(this.__wbg_ptr) !== 0;
|
|
573
574
|
}
|
|
574
575
|
is_paused() {
|
|
575
|
-
return
|
|
576
|
+
return b.dotlottieplayerwasm_is_paused(this.__wbg_ptr) !== 0;
|
|
576
577
|
}
|
|
577
578
|
load_font(e, t) {
|
|
578
|
-
let n =
|
|
579
|
-
return
|
|
579
|
+
let n = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), r = D, i = P(t, b.__wbindgen_malloc_command_export), a = D;
|
|
580
|
+
return b.dotlottieplayerwasm_load_font(this.__wbg_ptr, n, r, i, a) !== 0;
|
|
580
581
|
}
|
|
581
582
|
set_frame(e) {
|
|
582
|
-
return
|
|
583
|
+
return b.dotlottieplayerwasm_set_frame(this.__wbg_ptr, e) !== 0;
|
|
583
584
|
}
|
|
584
585
|
set_speed(e) {
|
|
585
|
-
|
|
586
|
+
b.dotlottieplayerwasm_set_speed(this.__wbg_ptr, e);
|
|
586
587
|
}
|
|
587
588
|
set_theme(e) {
|
|
588
|
-
let t =
|
|
589
|
-
return
|
|
589
|
+
let t = A(e, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), n = D;
|
|
590
|
+
return b.dotlottieplayerwasm_set_theme(this.__wbg_ptr, t, n) !== 0;
|
|
590
591
|
}
|
|
591
592
|
sm_status() {
|
|
592
593
|
let e, t;
|
|
593
594
|
try {
|
|
594
|
-
let n =
|
|
595
|
-
return e = n[0], t = n[1],
|
|
595
|
+
let n = b.dotlottieplayerwasm_sm_status(this.__wbg_ptr);
|
|
596
|
+
return e = n[0], t = n[1], w(n[0], n[1]);
|
|
596
597
|
} finally {
|
|
597
|
-
|
|
598
|
+
b.__wbindgen_free_command_export(e, t, 1);
|
|
598
599
|
}
|
|
599
600
|
}
|
|
600
601
|
};
|
|
601
|
-
async function
|
|
602
|
+
async function se(e, t) {
|
|
602
603
|
if (typeof Response == "function" && e instanceof Response) {
|
|
603
604
|
if (typeof WebAssembly.instantiateStreaming == "function") try {
|
|
604
605
|
return await WebAssembly.instantiateStreaming(e, t);
|
|
@@ -616,16 +617,16 @@ async function oe(e, t) {
|
|
|
616
617
|
} : n;
|
|
617
618
|
}
|
|
618
619
|
}
|
|
619
|
-
function
|
|
620
|
+
function ce() {
|
|
620
621
|
let e = {};
|
|
621
622
|
return e.wbg = {}, e.wbg.__wbg_buffer_609cc3eee51ed158 = function(e) {
|
|
622
623
|
return e.buffer;
|
|
623
624
|
}, e.wbg.__wbg_error_7534b8e9a36f1ab4 = function(e, t) {
|
|
624
625
|
let n, r;
|
|
625
626
|
try {
|
|
626
|
-
n = e, r = t, console.error(
|
|
627
|
+
n = e, r = t, console.error(w(e, t));
|
|
627
628
|
} finally {
|
|
628
|
-
|
|
629
|
+
b.__wbindgen_free_command_export(n, r, 1);
|
|
629
630
|
}
|
|
630
631
|
}, e.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
631
632
|
return {};
|
|
@@ -640,45 +641,45 @@ function se() {
|
|
|
640
641
|
}, e.wbg.__wbg_push_737cfc8c1432c2c6 = function(e, t) {
|
|
641
642
|
return e.push(t);
|
|
642
643
|
}, e.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
|
|
643
|
-
return
|
|
644
|
+
return E(function(e, t, n) {
|
|
644
645
|
return Reflect.set(e, t, n);
|
|
645
646
|
}, arguments);
|
|
646
647
|
}, e.wbg.__wbg_setindex_4e73afdcd9bb95cd = function(e, t, n) {
|
|
647
648
|
e[t >>> 0] = n;
|
|
648
649
|
}, e.wbg.__wbg_stack_0ed75d68575b0f3c = function(e, t) {
|
|
649
|
-
let n = t.stack, r =
|
|
650
|
-
|
|
650
|
+
let n = t.stack, r = A(n, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), i = D;
|
|
651
|
+
M().setInt32(e + 4, i, !0), M().setInt32(e + 0, r, !0);
|
|
651
652
|
}, e.wbg.__wbindgen_init_externref_table = function() {
|
|
652
|
-
let e =
|
|
653
|
+
let e = b.__wbindgen_export_3, t = e.grow(4);
|
|
653
654
|
e.set(0, void 0), e.set(t + 0, void 0), e.set(t + 1, null), e.set(t + 2, !0), e.set(t + 3, !1);
|
|
654
655
|
}, e.wbg.__wbindgen_memory = function() {
|
|
655
|
-
return
|
|
656
|
+
return b.memory;
|
|
656
657
|
}, e.wbg.__wbindgen_number_new = function(e) {
|
|
657
658
|
return e;
|
|
658
659
|
}, e.wbg.__wbindgen_string_get = function(e, t) {
|
|
659
660
|
let n = t, r = typeof n == "string" ? n : void 0;
|
|
660
|
-
var i = ee(r) ? 0 :
|
|
661
|
-
|
|
661
|
+
var i = ee(r) ? 0 : A(r, b.__wbindgen_malloc_command_export, b.__wbindgen_realloc_command_export), a = D;
|
|
662
|
+
M().setInt32(e + 4, a, !0), M().setInt32(e + 0, i, !0);
|
|
662
663
|
}, e.wbg.__wbindgen_string_new = function(e, t) {
|
|
663
|
-
return
|
|
664
|
+
return w(e, t);
|
|
664
665
|
}, e.wbg.__wbindgen_throw = function(e, t) {
|
|
665
|
-
throw Error(
|
|
666
|
+
throw Error(w(e, t));
|
|
666
667
|
}, e;
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
-
return
|
|
669
|
+
function le(e, t) {
|
|
670
|
+
return b = e.exports, I.__wbindgen_wasm_module = t, j = null, N = null, S = null, b.__wbindgen_start(), b;
|
|
670
671
|
}
|
|
671
|
-
async function
|
|
672
|
-
if (
|
|
672
|
+
async function I(e) {
|
|
673
|
+
if (b !== void 0) return b;
|
|
673
674
|
if (e !== void 0 && (Object.getPrototypeOf(e) === Object.prototype ? {module_or_path: e} = e : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), e === void 0) throw Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");
|
|
674
|
-
let t =
|
|
675
|
+
let t = ce();
|
|
675
676
|
(typeof e == "string" || typeof Request == "function" && e instanceof Request || typeof URL == "function" && e instanceof URL) && (e = fetch(e));
|
|
676
|
-
let { instance: n, module: r } = await
|
|
677
|
-
return
|
|
677
|
+
let { instance: n, module: r } = await se(await e, t);
|
|
678
|
+
return le(n, r);
|
|
678
679
|
}
|
|
679
|
-
var
|
|
680
|
+
var L = class {
|
|
680
681
|
constructor() {
|
|
681
|
-
|
|
682
|
+
d(this, "_eventListeners", /* @__PURE__ */ new Map());
|
|
682
683
|
}
|
|
683
684
|
addEventListener(e, t) {
|
|
684
685
|
let n = this._eventListeners.get(e);
|
|
@@ -694,7 +695,7 @@ var I = class {
|
|
|
694
695
|
removeAllEventListeners() {
|
|
695
696
|
this._eventListeners.clear();
|
|
696
697
|
}
|
|
697
|
-
},
|
|
698
|
+
}, R = class e {
|
|
698
699
|
static _initializeObserver() {
|
|
699
700
|
e._observer ||= new IntersectionObserver((t) => {
|
|
700
701
|
t.forEach((t) => {
|
|
@@ -710,8 +711,8 @@ var I = class {
|
|
|
710
711
|
e._observer?.unobserve(t), e._observedCanvases.delete(t), e._observedCanvases.size === 0 && (e._observer?.disconnect(), e._observer = null);
|
|
711
712
|
}
|
|
712
713
|
};
|
|
713
|
-
|
|
714
|
-
var
|
|
714
|
+
d(R, "_observer", null), d(R, "_observedCanvases", /* @__PURE__ */ new Map());
|
|
715
|
+
var z = class e {
|
|
715
716
|
static _initializeObserver() {
|
|
716
717
|
e._observer ||= new ResizeObserver((t) => {
|
|
717
718
|
t.forEach((t) => {
|
|
@@ -738,12 +739,12 @@ var R = class e {
|
|
|
738
739
|
e._observer?.unobserve(t), e._observedCanvases.delete(t), !e._observedCanvases.size && e._observer && (e._observer.disconnect(), e._observer = null);
|
|
739
740
|
}
|
|
740
741
|
};
|
|
741
|
-
|
|
742
|
-
function
|
|
742
|
+
d(z, "_observer", null), d(z, "_observedCanvases", /* @__PURE__ */ new Map());
|
|
743
|
+
function ue(e) {
|
|
743
744
|
return /^#([\da-f]{6}|[\da-f]{8})$/iu.test(e);
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
-
if (!
|
|
746
|
+
function de(e) {
|
|
747
|
+
if (!ue(e)) return [
|
|
747
748
|
0,
|
|
748
749
|
0,
|
|
749
750
|
0,
|
|
@@ -757,31 +758,31 @@ function ue(e) {
|
|
|
757
758
|
parseInt(t.slice(6, 8), 16) / 255
|
|
758
759
|
];
|
|
759
760
|
}
|
|
760
|
-
function
|
|
761
|
+
function B(e) {
|
|
761
762
|
if (e.byteLength < 4) return !1;
|
|
762
|
-
let t = new Uint8Array(e.slice(0,
|
|
763
|
-
for (let e = 0; e <
|
|
763
|
+
let t = new Uint8Array(e.slice(0, g.byteLength));
|
|
764
|
+
for (let e = 0; e < g.length; e += 1) if (g[e] !== t[e]) return !1;
|
|
764
765
|
return !0;
|
|
765
766
|
}
|
|
766
|
-
function B(e) {
|
|
767
|
-
return h.every((t) => Object.hasOwn(e, t));
|
|
768
|
-
}
|
|
769
767
|
function V(e) {
|
|
768
|
+
return _.every((t) => Object.hasOwn(e, t));
|
|
769
|
+
}
|
|
770
|
+
function H(e) {
|
|
770
771
|
if (typeof e == "string") try {
|
|
771
|
-
return
|
|
772
|
+
return V(JSON.parse(e));
|
|
772
773
|
} catch {
|
|
773
774
|
return !1;
|
|
774
775
|
}
|
|
775
|
-
else return
|
|
776
|
+
else return V(e);
|
|
776
777
|
}
|
|
777
|
-
function
|
|
778
|
-
return 1 + ((
|
|
778
|
+
function U() {
|
|
779
|
+
return 1 + ((h ? window.devicePixelRatio : 1) - 1) * .75;
|
|
779
780
|
}
|
|
780
|
-
function
|
|
781
|
+
function W(e) {
|
|
781
782
|
let t = e.getBoundingClientRect(), n = window.innerHeight || document.documentElement.clientHeight, r = window.innerWidth || document.documentElement.clientWidth;
|
|
782
783
|
return !(t.bottom < 0 || t.top > n || t.right < 0 || t.left > r);
|
|
783
784
|
}
|
|
784
|
-
function
|
|
785
|
+
function G(e) {
|
|
785
786
|
let t = e.target;
|
|
786
787
|
if (t instanceof HTMLCanvasElement) {
|
|
787
788
|
let n = t.getBoundingClientRect();
|
|
@@ -794,11 +795,11 @@ function W(e) {
|
|
|
794
795
|
}
|
|
795
796
|
return null;
|
|
796
797
|
}
|
|
797
|
-
function
|
|
798
|
+
function K(e) {
|
|
798
799
|
let t = e.replace("OpenUrl: ", ""), n = t.indexOf(" | Target: "), r, i;
|
|
799
800
|
n === -1 ? (r = t, i = "_blank") : (r = t.substring(0, n), i = t.substring(n + 11)), window.open(r, i);
|
|
800
801
|
}
|
|
801
|
-
function
|
|
802
|
+
function fe(e, t, n) {
|
|
802
803
|
let r = null, i = t;
|
|
803
804
|
async function a(t) {
|
|
804
805
|
await e({ module_or_path: t });
|
|
@@ -848,21 +849,21 @@ function de(e, t, n) {
|
|
|
848
849
|
}
|
|
849
850
|
};
|
|
850
851
|
}
|
|
851
|
-
var
|
|
852
|
+
var q = fe(I, `https://cdn.jsdelivr.net/npm/${y}@${v}/dist/dotlottie-player.wasm`, `https://unpkg.com/${y}@${v}/dist/dotlottie-player.wasm`), J = (e) => {
|
|
852
853
|
switch (e) {
|
|
853
|
-
case "reverse": return
|
|
854
|
-
case "bounce": return
|
|
855
|
-
case "reverse-bounce": return
|
|
856
|
-
default: return
|
|
854
|
+
case "reverse": return F.Reverse;
|
|
855
|
+
case "bounce": return F.Bounce;
|
|
856
|
+
case "reverse-bounce": return F.ReverseBounce;
|
|
857
|
+
default: return F.Forward;
|
|
857
858
|
}
|
|
858
|
-
},
|
|
859
|
+
}, Y = (e) => {
|
|
859
860
|
switch (e) {
|
|
860
|
-
case
|
|
861
|
-
case
|
|
862
|
-
case
|
|
861
|
+
case F.Reverse: return "reverse";
|
|
862
|
+
case F.Bounce: return "bounce";
|
|
863
|
+
case F.ReverseBounce: return "reverse-bounce";
|
|
863
864
|
default: return "forward";
|
|
864
865
|
}
|
|
865
|
-
},
|
|
866
|
+
}, pe = (e) => {
|
|
866
867
|
switch (e) {
|
|
867
868
|
case "contain": return "contain";
|
|
868
869
|
case "cover": return "cover";
|
|
@@ -872,14 +873,14 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
872
873
|
case "none": return "none";
|
|
873
874
|
default: return "contain";
|
|
874
875
|
}
|
|
875
|
-
},
|
|
876
|
+
}, me = class {
|
|
876
877
|
constructor(e) {
|
|
877
|
-
|
|
878
|
+
d(this, "_canvas", null), d(this, "_pendingLoad", null), d(this, "_context", null), d(this, "_eventManager", void 0), d(this, "_animationFrameId", null), d(this, "_frameManager", void 0), d(this, "_boundAnimationLoop", void 0), d(this, "_dotLottieCore", null), d(this, "_stateMachineId", ""), d(this, "_stateMachineConfig", null), d(this, "_isStateMachineRunning", !1), d(this, "_renderConfig", {}), d(this, "_isFrozen", !1), d(this, "_backgroundColor", null), d(this, "_lastFrameTime", null), d(this, "_boundOnClick", null), d(this, "_boundOnPointerUp", null), d(this, "_boundOnPointerDown", null), d(this, "_boundOnPointerMove", null), d(this, "_boundOnPointerEnter", null), d(this, "_boundOnPointerLeave", null), d(this, "_bufferMismatchCount", 0), d(this, "_lastExpectedBufferSize", 0), d(this, "_cachedImageData", null), d(this, "_cachedImageDataBuffer", null), d(this, "_cachedImageDataByteOffset", 0), d(this, "_marker", ""), d(this, "_segment", null), this._canvas = e.canvas ?? null, this._eventManager = new L(), this._frameManager = new m(), this._boundAnimationLoop = this._animationLoop.bind(this), this._renderConfig = {
|
|
878
879
|
...e.renderConfig,
|
|
879
|
-
devicePixelRatio: e.renderConfig?.devicePixelRatio ||
|
|
880
|
+
devicePixelRatio: e.renderConfig?.devicePixelRatio || U(),
|
|
880
881
|
freezeOnOffscreen: e.renderConfig?.freezeOnOffscreen ?? !0
|
|
881
882
|
}, this._initWasm().then(() => {
|
|
882
|
-
this._dotLottieCore = this._createCore(), this._dotLottieCore.set_autoplay(e.autoplay ?? !1), this._dotLottieCore.set_loop(e.loop ?? !1), this._dotLottieCore.set_loop_count(e.loopCount ?? 0), this._dotLottieCore.set_mode(
|
|
883
|
+
this._dotLottieCore = this._createCore(), this._dotLottieCore.set_autoplay(e.autoplay ?? !1), this._dotLottieCore.set_loop(e.loop ?? !1), this._dotLottieCore.set_loop_count(e.loopCount ?? 0), this._dotLottieCore.set_mode(J(e.mode ?? "forward")), this._dotLottieCore.set_speed(e.speed ?? 1), this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation ?? !0), e.segment && e.segment.length === 2 && (this._segment = [e.segment[0], e.segment[1]], this._dotLottieCore.set_segment(this._segment[0], this._segment[1])), this._marker = e.marker ?? "", this._marker && this._dotLottieCore.set_marker(this._marker), this._dotLottieCore.set_layout(e.layout?.fit ?? "contain", e.layout?.align?.[0] ?? .5, e.layout?.align?.[1] ?? .5), this._stateMachineId = e.stateMachineId ?? "", this._stateMachineConfig = e.stateMachineConfig ?? null, this._onCoreCreated(), this._eventManager.dispatch({ type: "ready" }), e.data ? this._canvas ? this._loadFromData(e.data) : this._pendingLoad = { data: e.data } : e.src && (this._canvas ? this._loadFromSrc(e.src) : this._pendingLoad = { src: e.src }), e.backgroundColor && this.setBackgroundColor(e.backgroundColor);
|
|
883
884
|
}).catch((e) => {
|
|
884
885
|
console.error("[dotlottie-web] Initialization failed:", e), this._eventManager.dispatch({
|
|
885
886
|
type: "loadError",
|
|
@@ -888,10 +889,10 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
888
889
|
});
|
|
889
890
|
}
|
|
890
891
|
async _initWasm() {
|
|
891
|
-
return
|
|
892
|
+
return q.load();
|
|
892
893
|
}
|
|
893
894
|
_createCore() {
|
|
894
|
-
return new
|
|
895
|
+
return new oe();
|
|
895
896
|
}
|
|
896
897
|
_onCoreCreated() {}
|
|
897
898
|
_setupTarget(e, t) {
|
|
@@ -1031,7 +1032,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1031
1032
|
let e = t;
|
|
1032
1033
|
if (e.type === "Message") {
|
|
1033
1034
|
let t = e.message ?? "";
|
|
1034
|
-
|
|
1035
|
+
h && t.startsWith("OpenUrl: ") ? K(t) : this._eventManager.dispatch({
|
|
1035
1036
|
type: "stateMachineInternalMessage",
|
|
1036
1037
|
message: t
|
|
1037
1038
|
});
|
|
@@ -1048,7 +1049,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1048
1049
|
let t = await fetch(e);
|
|
1049
1050
|
if (!t.ok) throw Error(`Failed to fetch animation data from URL: ${e}. ${t.status}: ${t.statusText}`);
|
|
1050
1051
|
let n = await t.arrayBuffer();
|
|
1051
|
-
return
|
|
1052
|
+
return B(n) ? n : new TextDecoder().decode(n);
|
|
1052
1053
|
}
|
|
1053
1054
|
_loadFromData(e) {
|
|
1054
1055
|
if (this._dotLottieCore === null) return;
|
|
@@ -1060,19 +1061,19 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1060
1061
|
this._setupTarget(t, n);
|
|
1061
1062
|
let r = !1;
|
|
1062
1063
|
if (typeof e == "string") {
|
|
1063
|
-
if (!
|
|
1064
|
+
if (!H(e)) {
|
|
1064
1065
|
this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");
|
|
1065
1066
|
return;
|
|
1066
1067
|
}
|
|
1067
1068
|
r = this._dotLottieCore.load_animation(e);
|
|
1068
1069
|
} else if (e instanceof ArrayBuffer) {
|
|
1069
|
-
if (!
|
|
1070
|
+
if (!B(e)) {
|
|
1070
1071
|
this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");
|
|
1071
1072
|
return;
|
|
1072
1073
|
}
|
|
1073
1074
|
r = this._dotLottieCore.load_dotlottie_data(new Uint8Array(e));
|
|
1074
1075
|
} else if (typeof e == "object") {
|
|
1075
|
-
if (!
|
|
1076
|
+
if (!H(e)) {
|
|
1076
1077
|
this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");
|
|
1077
1078
|
return;
|
|
1078
1079
|
}
|
|
@@ -1086,9 +1087,9 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1086
1087
|
return;
|
|
1087
1088
|
}
|
|
1088
1089
|
if (r) {
|
|
1089
|
-
if (this._renderConfig.quality !== void 0 && this._dotLottieCore.set_quality(this._renderConfig.quality),
|
|
1090
|
+
if (this._renderConfig.quality !== void 0 && this._dotLottieCore.set_quality(this._renderConfig.quality), h && this.resize(), this._drainPlayerEvents({ skipFrame: !!this._marker || !!this._segment }), this._marker && this._dotLottieCore.set_marker(this._marker), this._segment) {
|
|
1090
1091
|
this._dotLottieCore.set_segment(this._segment[0], this._segment[1]);
|
|
1091
|
-
let e =
|
|
1092
|
+
let e = Y(this._dotLottieCore.mode()), t = e === "reverse" || e === "reverse-bounce" ? this._segment[1] : this._segment[0];
|
|
1092
1093
|
this._dotLottieCore.set_frame(t);
|
|
1093
1094
|
}
|
|
1094
1095
|
setTimeout(() => {
|
|
@@ -1096,7 +1097,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1096
1097
|
type: "frame",
|
|
1097
1098
|
currentFrame: this.currentFrame
|
|
1098
1099
|
});
|
|
1099
|
-
}, 0), this._dotLottieCore.render(), this._drainPlayerEvents(), this._draw(), this._stateMachineId ? this.stateMachineLoad(this._stateMachineId) && this.stateMachineStart() && this._startAnimationLoop() : this._dotLottieCore.is_playing() && this._startAnimationLoop(),
|
|
1100
|
+
}, 0), this._dotLottieCore.render(), this._drainPlayerEvents(), this._draw(), this._stateMachineId ? this.stateMachineLoad(this._stateMachineId) && this.stateMachineStart() && this._startAnimationLoop() : this._dotLottieCore.is_playing() && this._startAnimationLoop(), h && this._canvas instanceof HTMLCanvasElement && (this._renderConfig.freezeOnOffscreen && (R.observe(this._canvas, this), W(this._canvas) || this.freeze()), this._renderConfig.autoResize && z.observe(this._canvas, this));
|
|
1100
1101
|
} else this._drainPlayerEvents();
|
|
1101
1102
|
}
|
|
1102
1103
|
_loadFromSrc(e) {
|
|
@@ -1114,7 +1115,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1114
1115
|
get layout() {
|
|
1115
1116
|
if (this._dotLottieCore) return {
|
|
1116
1117
|
align: [this._dotLottieCore.layout_align_x(), this._dotLottieCore.layout_align_y()],
|
|
1117
|
-
fit:
|
|
1118
|
+
fit: pe(this._dotLottieCore.layout_fit())
|
|
1118
1119
|
};
|
|
1119
1120
|
}
|
|
1120
1121
|
get marker() {
|
|
@@ -1140,7 +1141,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1140
1141
|
return this._dotLottieCore?.loop_animation() ?? !1;
|
|
1141
1142
|
}
|
|
1142
1143
|
get mode() {
|
|
1143
|
-
return this._dotLottieCore ?
|
|
1144
|
+
return this._dotLottieCore ? Y(this._dotLottieCore.mode()) : "forward";
|
|
1144
1145
|
}
|
|
1145
1146
|
get isFrozen() {
|
|
1146
1147
|
return this._isFrozen;
|
|
@@ -1191,7 +1192,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1191
1192
|
return this._canvas;
|
|
1192
1193
|
}
|
|
1193
1194
|
load(e) {
|
|
1194
|
-
this._dotLottieCore !== null && (this._stopAnimationLoop(), this._cleanupCanvas(), this._isFrozen = !1, this._dotLottieCore.set_autoplay(e.autoplay ?? !1), this._dotLottieCore.set_loop(e.loop ?? !1), this._dotLottieCore.set_loop_count(e.loopCount ?? 0), this._dotLottieCore.set_mode(
|
|
1195
|
+
this._dotLottieCore !== null && (this._stopAnimationLoop(), this._cleanupCanvas(), this._isFrozen = !1, this._dotLottieCore.set_autoplay(e.autoplay ?? !1), this._dotLottieCore.set_loop(e.loop ?? !1), this._dotLottieCore.set_loop_count(e.loopCount ?? 0), this._dotLottieCore.set_mode(J(e.mode ?? "forward")), this._dotLottieCore.set_speed(e.speed ?? 1), this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation ?? !0), e.segment && e.segment.length === 2 ? (this._segment = [e.segment[0], e.segment[1]], this._dotLottieCore.set_segment(this._segment[0], this._segment[1])) : (this._segment = null, this._dotLottieCore.clear_segment()), this._marker = e.marker ?? "", this._marker ? this._dotLottieCore.set_marker(this._marker) : this._dotLottieCore.clear_marker(), this._dotLottieCore.set_layout(e.layout?.fit ?? "contain", e.layout?.align?.[0] ?? .5, e.layout?.align?.[1] ?? .5), e.data ? this._canvas ? this._loadFromData(e.data) : this._pendingLoad = { data: e.data } : e.src && (this._canvas ? this._loadFromSrc(e.src) : this._pendingLoad = { src: e.src }), e.backgroundColor && this.setBackgroundColor(e.backgroundColor));
|
|
1195
1196
|
}
|
|
1196
1197
|
_draw() {
|
|
1197
1198
|
if (this._dotLottieCore === null || this._canvas === null || (!this._context && "getContext" in this._canvas && typeof this._canvas.getContext == "function" && (typeof HTMLCanvasElement < "u" && this._canvas instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && this._canvas instanceof OffscreenCanvas) && (this._context = this._canvas.getContext("2d")), !this._context)) return;
|
|
@@ -1217,10 +1218,10 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1217
1218
|
this._context.putImageData(this._cachedImageData, 0, 0);
|
|
1218
1219
|
}
|
|
1219
1220
|
_cleanupCanvas() {
|
|
1220
|
-
this._canvas &&
|
|
1221
|
+
this._canvas && h && this._canvas instanceof HTMLCanvasElement && (R.unobserve(this._canvas), z.unobserve(this._canvas), this._cleanupStateMachineListeners());
|
|
1221
1222
|
}
|
|
1222
1223
|
_initializeCanvas() {
|
|
1223
|
-
this._setupRendererOnCanvas(), this._canvas &&
|
|
1224
|
+
this._setupRendererOnCanvas(), this._canvas && h && this._canvas instanceof HTMLCanvasElement && this.isLoaded && (this._renderConfig.freezeOnOffscreen && (R.observe(this._canvas, this), W(this._canvas) || this.freeze()), this._renderConfig.autoResize && z.observe(this._canvas, this), this._isStateMachineRunning && this._setupStateMachineListeners()), this._canvas && this._dotLottieCore && this.isLoaded && this._setupTarget(this._canvas.width, this._canvas.height) && (this._dotLottieCore.render(), this._draw());
|
|
1224
1225
|
}
|
|
1225
1226
|
_setupRendererOnCanvas() {
|
|
1226
1227
|
this._context = null;
|
|
@@ -1256,7 +1257,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1256
1257
|
if (this._dotLottieCore === null || !this.isLoaded) return;
|
|
1257
1258
|
this._stopAnimationLoop();
|
|
1258
1259
|
let e = this._dotLottieCore.play();
|
|
1259
|
-
this._drainPlayerEvents(), (e || this._dotLottieCore.is_playing()) && (this._isFrozen = !1, this._startAnimationLoop()), this._canvas &&
|
|
1260
|
+
this._drainPlayerEvents(), (e || this._dotLottieCore.is_playing()) && (this._isFrozen = !1, this._startAnimationLoop()), this._canvas && h && this._canvas instanceof HTMLCanvasElement && this._renderConfig.freezeOnOffscreen && !W(this._canvas) && this.freeze();
|
|
1260
1261
|
}
|
|
1261
1262
|
pause() {
|
|
1262
1263
|
this._dotLottieCore !== null && (this._dotLottieCore.pause(), this._drainPlayerEvents(), this._stopAnimationLoop());
|
|
@@ -1280,9 +1281,9 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1280
1281
|
}
|
|
1281
1282
|
setBackgroundColor(e) {
|
|
1282
1283
|
if (this._dotLottieCore !== null) {
|
|
1283
|
-
if (
|
|
1284
|
+
if (h && this._canvas instanceof HTMLCanvasElement) this._canvas.style.backgroundColor = e;
|
|
1284
1285
|
else {
|
|
1285
|
-
let [t, n, r, i] =
|
|
1286
|
+
let [t, n, r, i] = de(e);
|
|
1286
1287
|
this._dotLottieCore.set_background(t, n, r, i);
|
|
1287
1288
|
}
|
|
1288
1289
|
this._backgroundColor = e;
|
|
@@ -1321,7 +1322,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1321
1322
|
}
|
|
1322
1323
|
resize() {
|
|
1323
1324
|
if (!(!this._dotLottieCore || !this.isLoaded || !this._canvas)) {
|
|
1324
|
-
if (
|
|
1325
|
+
if (h && this._canvas instanceof HTMLCanvasElement) {
|
|
1325
1326
|
let e = this._renderConfig.devicePixelRatio || window.devicePixelRatio || 1, { height: t, width: n } = this._canvas.getBoundingClientRect();
|
|
1326
1327
|
t !== 0 && n !== 0 && (this._canvas.width = n * e, this._canvas.height = t * e);
|
|
1327
1328
|
}
|
|
@@ -1351,17 +1352,17 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1351
1352
|
this._dotLottieCore !== null && (this._segment = null, this._dotLottieCore.clear_segment());
|
|
1352
1353
|
}
|
|
1353
1354
|
setMode(e) {
|
|
1354
|
-
this._dotLottieCore !== null && this._dotLottieCore.set_mode(
|
|
1355
|
+
this._dotLottieCore !== null && this._dotLottieCore.set_mode(J(e));
|
|
1355
1356
|
}
|
|
1356
1357
|
setRenderConfig(e) {
|
|
1357
1358
|
let { devicePixelRatio: t, freezeOnOffscreen: n, quality: r, ...i } = e;
|
|
1358
1359
|
this._renderConfig = {
|
|
1359
1360
|
...this._renderConfig,
|
|
1360
1361
|
...i,
|
|
1361
|
-
devicePixelRatio: t ||
|
|
1362
|
+
devicePixelRatio: t || U(),
|
|
1362
1363
|
freezeOnOffscreen: n ?? !0,
|
|
1363
1364
|
...r !== void 0 && { quality: r }
|
|
1364
|
-
}, r !== void 0 && this._dotLottieCore && this._dotLottieCore.set_quality(r),
|
|
1365
|
+
}, r !== void 0 && this._dotLottieCore && this._dotLottieCore.set_quality(r), h && this._canvas instanceof HTMLCanvasElement && (this._renderConfig.autoResize ? z.observe(this._canvas, this) : z.unobserve(this._canvas), this._renderConfig.freezeOnOffscreen ? (R.observe(this._canvas, this), W(this._canvas) || this.freeze()) : (R.unobserve(this._canvas), this._isFrozen && this.unfreeze()));
|
|
1365
1366
|
}
|
|
1366
1367
|
loadAnimation(e) {
|
|
1367
1368
|
this._dotLottieCore === null || this._dotLottieCore.animation_id() === e || !this._canvas || (this._setupTarget(this._canvas.width, this._canvas.height), this._dotLottieCore.load_animation_from_id(e) ? (this._renderConfig.quality !== void 0 && this._dotLottieCore.set_quality(this._renderConfig.quality), this.resize(), this._drainPlayerEvents(), this._dotLottieCore.render(), this._draw()) : this._dispatchError(`Failed to load animation with id: ${e}`));
|
|
@@ -1505,11 +1506,11 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1505
1506
|
return this._dotLottieCore === null ? !1 : this._dotLottieCore.set_viewport(e, t, n, r);
|
|
1506
1507
|
}
|
|
1507
1508
|
static setWasmUrl(e) {
|
|
1508
|
-
|
|
1509
|
+
q.setWasmUrl(e);
|
|
1509
1510
|
}
|
|
1510
1511
|
static async registerFont(e, t) {
|
|
1511
1512
|
try {
|
|
1512
|
-
await
|
|
1513
|
+
await q.load();
|
|
1513
1514
|
let n;
|
|
1514
1515
|
if (typeof t == "string") {
|
|
1515
1516
|
let e = await fetch(t);
|
|
@@ -1613,39 +1614,39 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
1613
1614
|
this._dotLottieCore?.sm_post_pointer_exit(e, t);
|
|
1614
1615
|
}
|
|
1615
1616
|
_onClick(e) {
|
|
1616
|
-
let t =
|
|
1617
|
+
let t = G(e);
|
|
1617
1618
|
t && this.stateMachinePostClickEvent(t.x, t.y);
|
|
1618
1619
|
}
|
|
1619
1620
|
_onPointerUp(e) {
|
|
1620
|
-
let t =
|
|
1621
|
+
let t = G(e);
|
|
1621
1622
|
t && this.stateMachinePostPointerUpEvent(t.x, t.y);
|
|
1622
1623
|
}
|
|
1623
1624
|
_onPointerDown(e) {
|
|
1624
|
-
let t =
|
|
1625
|
+
let t = G(e);
|
|
1625
1626
|
t && this.stateMachinePostPointerDownEvent(t.x, t.y);
|
|
1626
1627
|
}
|
|
1627
1628
|
_onPointerMove(e) {
|
|
1628
|
-
let t =
|
|
1629
|
+
let t = G(e);
|
|
1629
1630
|
t && this.stateMachinePostPointerMoveEvent(t.x, t.y);
|
|
1630
1631
|
}
|
|
1631
1632
|
_onPointerEnter(e) {
|
|
1632
|
-
let t =
|
|
1633
|
+
let t = G(e);
|
|
1633
1634
|
t && this.stateMachinePostPointerEnterEvent(t.x, t.y);
|
|
1634
1635
|
}
|
|
1635
1636
|
_onPointerLeave(e) {
|
|
1636
|
-
let t =
|
|
1637
|
+
let t = G(e);
|
|
1637
1638
|
t && this.stateMachinePostPointerExitEvent(t.x, t.y);
|
|
1638
1639
|
}
|
|
1639
1640
|
_setupStateMachineListeners() {
|
|
1640
|
-
if (
|
|
1641
|
+
if (h && this._canvas instanceof HTMLCanvasElement && this._dotLottieCore !== null && this.isLoaded) {
|
|
1641
1642
|
let e = this.stateMachineGetListeners();
|
|
1642
1643
|
this._cleanupStateMachineListeners(), e.includes("Click") && (this._boundOnClick = this._onClick.bind(this), this._canvas.addEventListener("click", this._boundOnClick)), e.includes("PointerUp") && (this._boundOnPointerUp = this._onPointerUp.bind(this), this._canvas.addEventListener("pointerup", this._boundOnPointerUp)), e.includes("PointerDown") && (this._boundOnPointerDown = this._onPointerDown.bind(this), this._canvas.addEventListener("pointerdown", this._boundOnPointerDown)), e.includes("PointerMove") && (this._boundOnPointerMove = this._onPointerMove.bind(this), this._canvas.addEventListener("pointermove", this._boundOnPointerMove)), e.includes("PointerEnter") && (this._boundOnPointerEnter = this._onPointerEnter.bind(this), this._canvas.addEventListener("pointerenter", this._boundOnPointerEnter)), e.includes("PointerExit") && (this._boundOnPointerLeave = this._onPointerLeave.bind(this), this._canvas.addEventListener("pointerleave", this._boundOnPointerLeave));
|
|
1643
1644
|
}
|
|
1644
1645
|
}
|
|
1645
1646
|
_cleanupStateMachineListeners() {
|
|
1646
|
-
|
|
1647
|
+
h && this._canvas instanceof HTMLCanvasElement && (this._boundOnClick &&= (this._canvas.removeEventListener("click", this._boundOnClick), null), this._boundOnPointerUp &&= (this._canvas.removeEventListener("pointerup", this._boundOnPointerUp), null), this._boundOnPointerDown &&= (this._canvas.removeEventListener("pointerdown", this._boundOnPointerDown), null), this._boundOnPointerMove &&= (this._canvas.removeEventListener("pointermove", this._boundOnPointerMove), null), this._boundOnPointerEnter &&= (this._canvas.removeEventListener("pointerenter", this._boundOnPointerEnter), null), this._boundOnPointerLeave &&= (this._canvas.removeEventListener("pointerleave", this._boundOnPointerLeave), null));
|
|
1647
1648
|
}
|
|
1648
|
-
},
|
|
1649
|
+
}, he = class {
|
|
1649
1650
|
constructor() {
|
|
1650
1651
|
if (typeof Worker > "u") throw Error("Worker is not supported in this environment.");
|
|
1651
1652
|
let e = new Blob([new Uint8Array([
|
|
@@ -70501,9 +70502,9 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
70501
70502
|
])], { type: "application/javascript" }), t = URL.createObjectURL(e), n = new Worker(t);
|
|
70502
70503
|
return URL.revokeObjectURL(t), n;
|
|
70503
70504
|
}
|
|
70504
|
-
},
|
|
70505
|
+
}, ge = class {
|
|
70505
70506
|
constructor() {
|
|
70506
|
-
|
|
70507
|
+
d(this, "_workers", /* @__PURE__ */ new Map()), d(this, "_animationWorkerMap", /* @__PURE__ */ new Map()), d(this, "_eventHandlers", /* @__PURE__ */ new Map()), d(this, "_rpcHandlers", /* @__PURE__ */ new Map()), d(this, "_routeMessage", (e) => {
|
|
70507
70508
|
let t = e.data;
|
|
70508
70509
|
if (t.id) {
|
|
70509
70510
|
let n = this._rpcHandlers.get(t.id);
|
|
@@ -70519,7 +70520,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
70519
70520
|
}
|
|
70520
70521
|
getWorker(e) {
|
|
70521
70522
|
let t = this._workers.get(e);
|
|
70522
|
-
return t || (t = new
|
|
70523
|
+
return t || (t = new he(), t.addEventListener("message", this._routeMessage), this._workers.set(e, t)), t;
|
|
70523
70524
|
}
|
|
70524
70525
|
assignAnimationToWorker(e, t) {
|
|
70525
70526
|
this._animationWorkerMap.set(e, t);
|
|
@@ -70552,7 +70553,7 @@ var K = de(F, `https://cdn.jsdelivr.net/npm/${_}@${g}/dist/dotlottie-player.wasm
|
|
|
70552
70553
|
this._rpcHandlers.delete(e);
|
|
70553
70554
|
}
|
|
70554
70555
|
};
|
|
70555
|
-
function
|
|
70556
|
+
function X(e, t) {
|
|
70556
70557
|
if (typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement) {
|
|
70557
70558
|
let { height: n, width: r } = e.getBoundingClientRect();
|
|
70558
70559
|
if (n !== 0 && r !== 0) return {
|
|
@@ -70565,12 +70566,12 @@ function Y(e, t) {
|
|
|
70565
70566
|
height: e.height
|
|
70566
70567
|
};
|
|
70567
70568
|
}
|
|
70568
|
-
function
|
|
70569
|
+
function Z() {
|
|
70569
70570
|
return Date.now().toString(36) + Math.random().toString(36).substr(2, 9);
|
|
70570
70571
|
}
|
|
70571
|
-
var
|
|
70572
|
+
var Q = class e {
|
|
70572
70573
|
constructor(t) {
|
|
70573
|
-
if (
|
|
70574
|
+
if (d(this, "_eventManager", new L()), d(this, "_id", void 0), d(this, "_worker", void 0), d(this, "_canvas", void 0), d(this, "_dotLottieInstanceState", {
|
|
70574
70575
|
loopCount: 0,
|
|
70575
70576
|
markers: [],
|
|
70576
70577
|
autoplay: !1,
|
|
@@ -70588,25 +70589,25 @@ var Z = class e {
|
|
|
70588
70589
|
isStopped: !0,
|
|
70589
70590
|
isFrozen: !1,
|
|
70590
70591
|
useFrameInterpolation: !1,
|
|
70591
|
-
renderConfig: { devicePixelRatio:
|
|
70592
|
+
renderConfig: { devicePixelRatio: U() },
|
|
70592
70593
|
activeAnimationId: "",
|
|
70593
70594
|
activeThemeId: "",
|
|
70594
70595
|
layout: void 0,
|
|
70595
70596
|
marker: "",
|
|
70596
70597
|
isReady: !1,
|
|
70597
70598
|
manifest: null
|
|
70598
|
-
}),
|
|
70599
|
+
}), d(this, "_created", !1), d(this, "_boundOnClick", null), d(this, "_boundOnPointerUp", null), d(this, "_boundOnPointerDown", null), d(this, "_boundOnPointerMove", null), d(this, "_boundOnPointerEnter", null), d(this, "_boundOnPointerLeave", null), d(this, "_pendingConfig", null), t.canvas) {
|
|
70599
70600
|
let e = typeof HTMLCanvasElement < "u" && t.canvas instanceof HTMLCanvasElement, n = typeof OffscreenCanvas < "u" && t.canvas instanceof OffscreenCanvas;
|
|
70600
70601
|
if (!e && !n) throw Error("Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas");
|
|
70601
70602
|
}
|
|
70602
|
-
this._canvas = t.canvas ?? null, this._id = `dotlottie-${
|
|
70603
|
+
this._canvas = t.canvas ?? null, this._id = `dotlottie-${Z()}`;
|
|
70603
70604
|
let n = t.workerId || "defaultWorker";
|
|
70604
70605
|
this._worker = e._workerManager.getWorker(n), e._workerManager.assignAnimationToWorker(this._id, n), e._wasmUrl && this._sendMessage("setWasmUrl", { url: e._wasmUrl });
|
|
70605
70606
|
let r = {
|
|
70606
70607
|
...t,
|
|
70607
70608
|
renderConfig: {
|
|
70608
70609
|
...t.renderConfig,
|
|
70609
|
-
devicePixelRatio: t.renderConfig?.devicePixelRatio ||
|
|
70610
|
+
devicePixelRatio: t.renderConfig?.devicePixelRatio || U(),
|
|
70610
70611
|
freezeOnOffscreen: t.renderConfig?.freezeOnOffscreen ?? !0
|
|
70611
70612
|
}
|
|
70612
70613
|
};
|
|
@@ -70614,10 +70615,10 @@ var Z = class e {
|
|
|
70614
70615
|
}
|
|
70615
70616
|
async _handleWorkerEvent(e) {
|
|
70616
70617
|
let t = e.data;
|
|
70617
|
-
if (!t.id && (t.method === "onLoad" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event),
|
|
70618
|
+
if (!t.id && (t.method === "onLoad" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event), h && this._canvas instanceof HTMLCanvasElement && (this._dotLottieInstanceState.renderConfig.freezeOnOffscreen && (R.observe(this._canvas, this), W(this._canvas) || await this.freeze()), this._dotLottieInstanceState.renderConfig.autoResize && z.observe(this._canvas, this))), t.method === "onComplete" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onDestroy" && t.result.instanceId === this._id && this._eventManager.dispatch(t.result.event), t.method === "onUnfreeze" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._dotLottieInstanceState.isFrozen = !1, this._eventManager.dispatch(t.result.event)), t.method === "onFrame" && t.result.instanceId === this._id && (this._dotLottieInstanceState.currentFrame = t.result.event.currentFrame, this._eventManager.dispatch(t.result.event)), t.method === "onRender" && t.result.instanceId === this._id && this._eventManager.dispatch(t.result.event), t.method === "onFreeze" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onPause" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onPlay" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStop" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onLoadError" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onRenderError" && t.result.instanceId === this._id && this._eventManager.dispatch(t.result.event), t.method === "onReady" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onLoop" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineStart" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._setupStateMachineListeners(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineStop" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._cleanupStateMachineListeners(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineTransition" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineStateEntered" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineStateExit" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineCustomEvent" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineError" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineBooleanInputValueChange" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineNumericInputValueChange" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineStringInputValueChange" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineInputFired" && t.result.instanceId === this._id && (await this._updateDotLottieInstanceState(), this._eventManager.dispatch(t.result.event)), t.method === "onStateMachineInternalMessage" && t.result.instanceId === this._id)) {
|
|
70618
70619
|
await this._updateDotLottieInstanceState();
|
|
70619
70620
|
let e = t.result.event;
|
|
70620
|
-
e.message.startsWith("OpenUrl: ") &&
|
|
70621
|
+
e.message.startsWith("OpenUrl: ") && K(e.message);
|
|
70621
70622
|
}
|
|
70622
70623
|
}
|
|
70623
70624
|
async _create(e) {
|
|
@@ -70630,7 +70631,7 @@ var Z = class e {
|
|
|
70630
70631
|
...e,
|
|
70631
70632
|
canvas: t
|
|
70632
70633
|
},
|
|
70633
|
-
...
|
|
70634
|
+
...X(this._canvas, e.renderConfig?.devicePixelRatio || U())
|
|
70634
70635
|
}, [t]);
|
|
70635
70636
|
if (n !== this._id) throw Error("Instance ID mismatch");
|
|
70636
70637
|
this._created = !0, await this._updateDotLottieInstanceState();
|
|
@@ -70716,7 +70717,7 @@ var Z = class e {
|
|
|
70716
70717
|
return this._dotLottieInstanceState.layout;
|
|
70717
70718
|
}
|
|
70718
70719
|
async play() {
|
|
70719
|
-
this._created && (await this._sendMessage("play", { instanceId: this._id }), await this._updateDotLottieInstanceState(),
|
|
70720
|
+
this._created && (await this._sendMessage("play", { instanceId: this._id }), await this._updateDotLottieInstanceState(), h && this._canvas instanceof HTMLCanvasElement && this._dotLottieInstanceState.renderConfig.freezeOnOffscreen && !W(this._canvas) && await this.freeze());
|
|
70720
70721
|
}
|
|
70721
70722
|
async pause() {
|
|
70722
70723
|
this._created && (await this._sendMessage("pause", { instanceId: this._id }), await this._updateDotLottieInstanceState());
|
|
@@ -70759,11 +70760,11 @@ var Z = class e {
|
|
|
70759
70760
|
renderConfig: {
|
|
70760
70761
|
...this._dotLottieInstanceState.renderConfig,
|
|
70761
70762
|
...i,
|
|
70762
|
-
devicePixelRatio: t ||
|
|
70763
|
+
devicePixelRatio: t || U(),
|
|
70763
70764
|
freezeOnOffscreen: n ?? !0,
|
|
70764
70765
|
...r !== void 0 && { quality: r }
|
|
70765
70766
|
}
|
|
70766
|
-
}), await this._updateDotLottieInstanceState(),
|
|
70767
|
+
}), await this._updateDotLottieInstanceState(), h && this._canvas instanceof HTMLCanvasElement && (this._dotLottieInstanceState.renderConfig.autoResize ? z.observe(this._canvas, this) : z.unobserve(this._canvas), this._dotLottieInstanceState.renderConfig.freezeOnOffscreen ? (R.observe(this._canvas, this), W(this._canvas) || await this.freeze()) : (R.unobserve(this._canvas), this._dotLottieInstanceState.isFrozen && await this.unfreeze()));
|
|
70767
70768
|
}
|
|
70768
70769
|
async setUseFrameInterpolation(e) {
|
|
70769
70770
|
this._created && (await this._sendMessage("setUseFrameInterpolation", {
|
|
@@ -70806,7 +70807,7 @@ var Z = class e {
|
|
|
70806
70807
|
}
|
|
70807
70808
|
async resize() {
|
|
70808
70809
|
if (!this._created || !this._canvas) return;
|
|
70809
|
-
let { height: e, width: t } =
|
|
70810
|
+
let { height: e, width: t } = X(this._canvas, this._dotLottieInstanceState.renderConfig.devicePixelRatio || U());
|
|
70810
70811
|
await this._sendMessage("resize", {
|
|
70811
70812
|
height: e,
|
|
70812
70813
|
instanceId: this._id,
|
|
@@ -70814,7 +70815,7 @@ var Z = class e {
|
|
|
70814
70815
|
}), await this._updateDotLottieInstanceState();
|
|
70815
70816
|
}
|
|
70816
70817
|
async destroy() {
|
|
70817
|
-
this._created && (this._created = !1, await this._sendMessage("destroy", { instanceId: this._id }), this._cleanupStateMachineListeners(), e._workerManager.unregisterEventHandler(this._id), e._workerManager.unassignAnimationFromWorker(this._id), this._eventManager.removeAllEventListeners(),
|
|
70818
|
+
this._created && (this._created = !1, await this._sendMessage("destroy", { instanceId: this._id }), this._cleanupStateMachineListeners(), e._workerManager.unregisterEventHandler(this._id), e._workerManager.unassignAnimationFromWorker(this._id), this._eventManager.removeAllEventListeners(), h && this._canvas instanceof HTMLCanvasElement && (R.unobserve(this._canvas), z.unobserve(this._canvas)));
|
|
70818
70819
|
}
|
|
70819
70820
|
async freeze() {
|
|
70820
70821
|
this._created && (await this._sendMessage("freeze", { instanceId: this._id }), await this._updateDotLottieInstanceState());
|
|
@@ -70966,7 +70967,7 @@ var Z = class e {
|
|
|
70966
70967
|
}
|
|
70967
70968
|
async _sendMessage(t, n, r) {
|
|
70968
70969
|
let i = {
|
|
70969
|
-
id: `dotlottie-request-${
|
|
70970
|
+
id: `dotlottie-request-${Z()}`,
|
|
70970
70971
|
method: t,
|
|
70971
70972
|
params: n
|
|
70972
70973
|
};
|
|
@@ -70989,7 +70990,7 @@ var Z = class e {
|
|
|
70989
70990
|
}
|
|
70990
70991
|
static async registerFont(t, n) {
|
|
70991
70992
|
try {
|
|
70992
|
-
let r =
|
|
70993
|
+
let r = Z();
|
|
70993
70994
|
return e._workerManager.broadcastMessage({
|
|
70994
70995
|
id: r,
|
|
70995
70996
|
method: "registerFont",
|
|
@@ -71148,7 +71149,7 @@ var Z = class e {
|
|
|
71148
71149
|
});
|
|
71149
71150
|
}
|
|
71150
71151
|
_onClick(e) {
|
|
71151
|
-
let t =
|
|
71152
|
+
let t = G(e);
|
|
71152
71153
|
t && this._sendMessage("stateMachinePostClickEvent", {
|
|
71153
71154
|
instanceId: this._id,
|
|
71154
71155
|
x: t.x,
|
|
@@ -71156,7 +71157,7 @@ var Z = class e {
|
|
|
71156
71157
|
});
|
|
71157
71158
|
}
|
|
71158
71159
|
_onPointerUp(e) {
|
|
71159
|
-
let t =
|
|
71160
|
+
let t = G(e);
|
|
71160
71161
|
t && this._sendMessage("stateMachinePostPointerUpEvent", {
|
|
71161
71162
|
instanceId: this._id,
|
|
71162
71163
|
x: t.x,
|
|
@@ -71164,7 +71165,7 @@ var Z = class e {
|
|
|
71164
71165
|
});
|
|
71165
71166
|
}
|
|
71166
71167
|
_onPointerDown(e) {
|
|
71167
|
-
let t =
|
|
71168
|
+
let t = G(e);
|
|
71168
71169
|
t && this._sendMessage("stateMachinePostPointerDownEvent", {
|
|
71169
71170
|
instanceId: this._id,
|
|
71170
71171
|
x: t.x,
|
|
@@ -71172,7 +71173,7 @@ var Z = class e {
|
|
|
71172
71173
|
});
|
|
71173
71174
|
}
|
|
71174
71175
|
_onPointerMove(e) {
|
|
71175
|
-
let t =
|
|
71176
|
+
let t = G(e);
|
|
71176
71177
|
t && this._sendMessage("stateMachinePostPointerMoveEvent", {
|
|
71177
71178
|
instanceId: this._id,
|
|
71178
71179
|
x: t.x,
|
|
@@ -71180,7 +71181,7 @@ var Z = class e {
|
|
|
71180
71181
|
});
|
|
71181
71182
|
}
|
|
71182
71183
|
_onPointerEnter(e) {
|
|
71183
|
-
let t =
|
|
71184
|
+
let t = G(e);
|
|
71184
71185
|
t && this._sendMessage("stateMachinePostPointerEnterEvent", {
|
|
71185
71186
|
instanceId: this._id,
|
|
71186
71187
|
x: t.x,
|
|
@@ -71188,7 +71189,7 @@ var Z = class e {
|
|
|
71188
71189
|
});
|
|
71189
71190
|
}
|
|
71190
71191
|
_onPointerLeave(e) {
|
|
71191
|
-
let t =
|
|
71192
|
+
let t = G(e);
|
|
71192
71193
|
t && this._sendMessage("stateMachinePostPointerExitEvent", {
|
|
71193
71194
|
instanceId: this._id,
|
|
71194
71195
|
x: t.x,
|
|
@@ -71196,135 +71197,135 @@ var Z = class e {
|
|
|
71196
71197
|
});
|
|
71197
71198
|
}
|
|
71198
71199
|
async _setupStateMachineListeners() {
|
|
71199
|
-
if (
|
|
71200
|
+
if (h && this._canvas instanceof HTMLCanvasElement && this.isLoaded) {
|
|
71200
71201
|
let e = await this._sendMessage("stateMachineGetListeners", { instanceId: this._id });
|
|
71201
71202
|
if (e.length === 0) return;
|
|
71202
71203
|
this._cleanupStateMachineListeners(), e.includes("Click") && (this._boundOnClick = this._onClick.bind(this), this._canvas.addEventListener("click", this._boundOnClick)), e.includes("PointerUp") && (this._boundOnPointerUp = this._onPointerUp.bind(this), this._canvas.addEventListener("pointerup", this._boundOnPointerUp)), e.includes("PointerDown") && (this._boundOnPointerDown = this._onPointerDown.bind(this), this._canvas.addEventListener("pointerdown", this._boundOnPointerDown)), e.includes("PointerMove") && (this._boundOnPointerMove = this._onPointerMove.bind(this), this._canvas.addEventListener("pointermove", this._boundOnPointerMove)), e.includes("PointerEnter") && (this._boundOnPointerEnter = this._onPointerEnter.bind(this), this._canvas.addEventListener("pointerenter", this._boundOnPointerEnter)), e.includes("PointerExit") && (this._boundOnPointerLeave = this._onPointerLeave.bind(this), this._canvas.addEventListener("pointerleave", this._boundOnPointerLeave));
|
|
71203
71204
|
}
|
|
71204
71205
|
}
|
|
71205
71206
|
_cleanupStateMachineListeners() {
|
|
71206
|
-
|
|
71207
|
+
h && this._canvas instanceof HTMLCanvasElement && (this._boundOnClick &&= (this._canvas.removeEventListener("click", this._boundOnClick), null), this._boundOnPointerUp &&= (this._canvas.removeEventListener("pointerup", this._boundOnPointerUp), null), this._boundOnPointerDown &&= (this._canvas.removeEventListener("pointerdown", this._boundOnPointerDown), null), this._boundOnPointerMove &&= (this._canvas.removeEventListener("pointermove", this._boundOnPointerMove), null), this._boundOnPointerEnter &&= (this._canvas.removeEventListener("pointerenter", this._boundOnPointerEnter), null), this._boundOnPointerLeave &&= (this._canvas.removeEventListener("pointerleave", this._boundOnPointerLeave), null));
|
|
71207
71208
|
}
|
|
71208
71209
|
};
|
|
71209
|
-
|
|
71210
|
+
d(Q, "_workerManager", new ge()), d(Q, "_wasmUrl", "");
|
|
71210
71211
|
//#endregion
|
|
71211
71212
|
//#region node_modules/@lottiefiles/dotlottie-react/dist/index.js
|
|
71212
|
-
var
|
|
71213
|
-
let
|
|
71214
|
-
speed:
|
|
71215
|
-
mode:
|
|
71216
|
-
loop:
|
|
71217
|
-
useFrameInterpolation:
|
|
71218
|
-
segment:
|
|
71213
|
+
var _e = ({ animationId: e, autoplay: t, backgroundColor: n, className: o, createDotLottie: c, data: l, dotLottieRefCallback: u, layout: d, loop: f, mode: p, playOnHover: m, renderConfig: h, segment: g, speed: _, src: v, stateMachineConfig: y, stateMachineId: b, style: x, themeData: S, themeId: C, useFrameInterpolation: w, workerId: T, ...E }) => {
|
|
71214
|
+
let D = a(null), O = a(null), k = a(u), A = {
|
|
71215
|
+
speed: _,
|
|
71216
|
+
mode: p,
|
|
71217
|
+
loop: f,
|
|
71218
|
+
useFrameInterpolation: w,
|
|
71219
|
+
segment: g,
|
|
71219
71220
|
backgroundColor: n,
|
|
71220
71221
|
autoplay: t,
|
|
71221
|
-
themeId:
|
|
71222
|
-
workerId:
|
|
71223
|
-
src:
|
|
71224
|
-
data:
|
|
71225
|
-
layout:
|
|
71226
|
-
renderConfig:
|
|
71222
|
+
themeId: C,
|
|
71223
|
+
workerId: T,
|
|
71224
|
+
src: v,
|
|
71225
|
+
data: l,
|
|
71226
|
+
layout: d,
|
|
71227
|
+
renderConfig: h,
|
|
71227
71228
|
animationId: e,
|
|
71228
|
-
stateMachineConfig:
|
|
71229
|
-
stateMachineId:
|
|
71230
|
-
},
|
|
71231
|
-
|
|
71232
|
-
let
|
|
71233
|
-
|
|
71234
|
-
...
|
|
71229
|
+
stateMachineConfig: y,
|
|
71230
|
+
stateMachineId: b
|
|
71231
|
+
}, j = a(A);
|
|
71232
|
+
k.current = u, j.current = A;
|
|
71233
|
+
let M = r((e) => {
|
|
71234
|
+
O.current = e, e ? D.current = c({
|
|
71235
|
+
...j.current,
|
|
71235
71236
|
canvas: e
|
|
71236
|
-
}) : (
|
|
71237
|
+
}) : (D.current?.destroy(), D.current = null), k.current?.(D.current);
|
|
71237
71238
|
}, []);
|
|
71238
|
-
return (
|
|
71239
|
+
return i(() => {
|
|
71239
71240
|
let e = (e) => {
|
|
71240
|
-
|
|
71241
|
+
m && (e.type === "mouseenter" && D.current?.play(), e.type === "mouseleave" && D.current?.pause());
|
|
71241
71242
|
};
|
|
71242
|
-
return
|
|
71243
|
-
|
|
71243
|
+
return O.current?.addEventListener("mouseenter", e), O.current?.addEventListener("mouseleave", e), () => {
|
|
71244
|
+
O.current?.removeEventListener("mouseenter", e), O.current?.removeEventListener("mouseleave", e);
|
|
71244
71245
|
};
|
|
71245
|
-
}, [
|
|
71246
|
-
|
|
71247
|
-
}, [
|
|
71248
|
-
|
|
71249
|
-
}, [
|
|
71250
|
-
|
|
71251
|
-
}, [
|
|
71252
|
-
|
|
71253
|
-
}, [
|
|
71254
|
-
typeof
|
|
71255
|
-
}, [
|
|
71256
|
-
|
|
71257
|
-
}, [n]), (
|
|
71258
|
-
|
|
71259
|
-
}, [JSON.stringify(
|
|
71260
|
-
typeof
|
|
71261
|
-
data:
|
|
71262
|
-
...
|
|
71246
|
+
}, [m]), i(() => {
|
|
71247
|
+
D.current?.setSpeed(_ ?? 1);
|
|
71248
|
+
}, [_]), i(() => {
|
|
71249
|
+
D.current?.setMode(p ?? "forward");
|
|
71250
|
+
}, [p]), i(() => {
|
|
71251
|
+
D.current?.setLoop(f ?? !1);
|
|
71252
|
+
}, [f]), i(() => {
|
|
71253
|
+
D.current?.setUseFrameInterpolation(w ?? !0);
|
|
71254
|
+
}, [w]), i(() => {
|
|
71255
|
+
typeof g?.[0] == "number" && typeof g[1] == "number" ? D.current?.setSegment(g[0], g[1]) : D.current?.resetSegment();
|
|
71256
|
+
}, [g]), i(() => {
|
|
71257
|
+
D.current?.setBackgroundColor(n ?? "");
|
|
71258
|
+
}, [n]), i(() => {
|
|
71259
|
+
D.current?.setRenderConfig(h ?? {});
|
|
71260
|
+
}, [JSON.stringify(h)]), i(() => {
|
|
71261
|
+
typeof l != "string" && typeof l != "object" || D.current?.load({
|
|
71262
|
+
data: l,
|
|
71263
|
+
...j.current
|
|
71263
71264
|
});
|
|
71264
|
-
}, [
|
|
71265
|
-
typeof
|
|
71266
|
-
src:
|
|
71267
|
-
...
|
|
71265
|
+
}, [l]), i(() => {
|
|
71266
|
+
typeof v == "string" && D.current?.load({
|
|
71267
|
+
src: v,
|
|
71268
|
+
...j.current
|
|
71268
71269
|
});
|
|
71269
|
-
}, [
|
|
71270
|
-
|
|
71271
|
-
}, [
|
|
71272
|
-
|
|
71273
|
-
}, [e]), (
|
|
71274
|
-
typeof
|
|
71275
|
-
}, [
|
|
71276
|
-
|
|
71277
|
-
}, [
|
|
71278
|
-
|
|
71270
|
+
}, [v]), i(() => {
|
|
71271
|
+
D.current?.setMarker(E.marker ?? "");
|
|
71272
|
+
}, [E.marker]), i(() => {
|
|
71273
|
+
D.current?.isLoaded && D.current.activeAnimationId !== e && D.current.loadAnimation(e ?? "");
|
|
71274
|
+
}, [e]), i(() => {
|
|
71275
|
+
typeof C == "string" && D.current?.setTheme(C);
|
|
71276
|
+
}, [C]), i(() => {
|
|
71277
|
+
D.current?.setThemeData(S ?? "");
|
|
71278
|
+
}, [S]), i(() => {
|
|
71279
|
+
D.current?.setLayout(d ?? {});
|
|
71279
71280
|
}, [
|
|
71280
|
-
|
|
71281
|
-
|
|
71282
|
-
|
|
71283
|
-
]), (
|
|
71284
|
-
|
|
71285
|
-
}, [
|
|
71286
|
-
|
|
71287
|
-
}, [
|
|
71288
|
-
className:
|
|
71289
|
-
...!
|
|
71281
|
+
d?.fit,
|
|
71282
|
+
d?.align?.[0],
|
|
71283
|
+
d?.align?.[1]
|
|
71284
|
+
]), i(() => {
|
|
71285
|
+
D.current?.isLoaded && (typeof b == "string" && b ? D.current.stateMachineLoad(b) && D.current.stateMachineStart() : D.current.stateMachineStop());
|
|
71286
|
+
}, [b]), i(() => {
|
|
71287
|
+
D.current?.stateMachineSetConfig(y ?? null);
|
|
71288
|
+
}, [y]), s("div", {
|
|
71289
|
+
className: o,
|
|
71290
|
+
...!o && { style: {
|
|
71290
71291
|
width: "100%",
|
|
71291
71292
|
height: "100%",
|
|
71292
71293
|
lineHeight: 0,
|
|
71293
|
-
...
|
|
71294
|
+
...x
|
|
71294
71295
|
} },
|
|
71295
|
-
children: (
|
|
71296
|
-
ref:
|
|
71296
|
+
children: s("canvas", {
|
|
71297
|
+
ref: M,
|
|
71297
71298
|
style: {
|
|
71298
71299
|
width: "100%",
|
|
71299
71300
|
height: "100%"
|
|
71300
71301
|
},
|
|
71301
|
-
...
|
|
71302
|
+
...E
|
|
71302
71303
|
})
|
|
71303
71304
|
});
|
|
71304
|
-
},
|
|
71305
|
+
}, ve = (e) => new me(e), ye = (e) => s(_e, {
|
|
71305
71306
|
...e,
|
|
71306
|
-
createDotLottie:
|
|
71307
|
-
}), $ =
|
|
71307
|
+
createDotLottie: ve
|
|
71308
|
+
}), $ = n.memo(({ item: n, play: r = !1, setDotLottie: i }) => {
|
|
71308
71309
|
let a = (e) => {
|
|
71309
71310
|
i(e);
|
|
71310
|
-
},
|
|
71311
|
-
return /* @__PURE__ */ (
|
|
71312
|
-
src:
|
|
71311
|
+
}, c = e(), { lottieConfig: l } = n;
|
|
71312
|
+
return /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s(ye, {
|
|
71313
|
+
src: t(c, n),
|
|
71313
71314
|
style: {
|
|
71314
71315
|
width: "auto",
|
|
71315
71316
|
height: "auto"
|
|
71316
71317
|
},
|
|
71317
71318
|
width: "100%",
|
|
71318
71319
|
height: "100%",
|
|
71319
|
-
autoplay:
|
|
71320
|
-
mode:
|
|
71321
|
-
loop:
|
|
71320
|
+
autoplay: l?.autoplay,
|
|
71321
|
+
mode: l?.mode ? l.mode : "forward",
|
|
71322
|
+
loop: l?.autoplay && l?.loop,
|
|
71322
71323
|
dotLottieRefCallback: a,
|
|
71323
|
-
speed:
|
|
71324
|
+
speed: l?.speed || 1,
|
|
71324
71325
|
renderConfig: { freezeOnOffscreen: r === !1 }
|
|
71325
71326
|
}) });
|
|
71326
71327
|
});
|
|
71327
71328
|
$.displayName = "LottieFile";
|
|
71328
|
-
var
|
|
71329
|
+
var be = n.memo($);
|
|
71329
71330
|
//#endregion
|
|
71330
|
-
export { $ as LottieFile,
|
|
71331
|
+
export { $ as LottieFile, be as default };
|