@justeattakeaway/pie-lottie-player 0.4.0 → 0.4.2

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.
@@ -1,3854 +0,0 @@
1
- function la(Tt, ze) {
2
- for (var ie = 0; ie < ze.length; ie++) {
3
- const It = ze[ie];
4
- if (typeof It != "string" && !Array.isArray(It)) {
5
- for (const Jt in It)
6
- if (Jt !== "default" && !(Jt in Tt)) {
7
- const dt = Object.getOwnPropertyDescriptor(It, Jt);
8
- dt && Object.defineProperty(Tt, Jt, dt.get ? dt : {
9
- enumerable: !0,
10
- get: () => It[Jt]
11
- });
12
- }
13
- }
14
- }
15
- return Object.freeze(Object.defineProperty(Tt, Symbol.toStringTag, { value: "Module" }));
16
- }
17
- var pa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
18
- function fa(Tt) {
19
- return Tt && Tt.__esModule && Object.prototype.hasOwnProperty.call(Tt, "default") ? Tt.default : Tt;
20
- }
21
- var As = { exports: {} };
22
- (function(Tt, ze) {
23
- typeof document < "u" && typeof navigator < "u" && function(ie, It) {
24
- Tt.exports = It();
25
- }(pa, function() {
26
- var ie = "", It = !1, Jt = -999999, dt = function() {
27
- return ie;
28
- };
29
- function Pt(t) {
30
- return document.createElement(t);
31
- }
32
- function W(t, e) {
33
- var s, i, a = t.length;
34
- for (s = 0; s < a; s += 1) for (var r in i = t[s].prototype) Object.prototype.hasOwnProperty.call(i, r) && (e.prototype[r] = i[r]);
35
- }
36
- function Ti(t) {
37
- function e() {
38
- }
39
- return e.prototype = t, e;
40
- }
41
- var Fi = function() {
42
- function t(e) {
43
- this.audios = [], this.audioFactory = e, this._volume = 1, this._isMuted = !1;
44
- }
45
- return t.prototype = { addAudio: function(e) {
46
- this.audios.push(e);
47
- }, pause: function() {
48
- var e, s = this.audios.length;
49
- for (e = 0; e < s; e += 1) this.audios[e].pause();
50
- }, resume: function() {
51
- var e, s = this.audios.length;
52
- for (e = 0; e < s; e += 1) this.audios[e].resume();
53
- }, setRate: function(e) {
54
- var s, i = this.audios.length;
55
- for (s = 0; s < i; s += 1) this.audios[s].setRate(e);
56
- }, createAudio: function(e) {
57
- return this.audioFactory ? this.audioFactory(e) : window.Howl ? new window.Howl({ src: [e] }) : { isPlaying: !1, play: function() {
58
- this.isPlaying = !0;
59
- }, seek: function() {
60
- this.isPlaying = !1;
61
- }, playing: function() {
62
- }, rate: function() {
63
- }, setVolume: function() {
64
- } };
65
- }, setAudioFactory: function(e) {
66
- this.audioFactory = e;
67
- }, setVolume: function(e) {
68
- this._volume = e, this._updateVolume();
69
- }, mute: function() {
70
- this._isMuted = !0, this._updateVolume();
71
- }, unmute: function() {
72
- this._isMuted = !1, this._updateVolume();
73
- }, getVolume: function() {
74
- return this._volume;
75
- }, _updateVolume: function() {
76
- var e, s = this.audios.length;
77
- for (e = 0; e < s; e += 1) this.audios[e].volume(this._volume * (this._isMuted ? 0 : 1));
78
- } }, function() {
79
- return new t();
80
- };
81
- }(), ht = /* @__PURE__ */ function() {
82
- function t(e, s) {
83
- var i, a = 0, r = [];
84
- switch (e) {
85
- case "int16":
86
- case "uint8c":
87
- i = 1;
88
- break;
89
- default:
90
- i = 1.1;
91
- }
92
- for (a = 0; a < s; a += 1) r.push(i);
93
- return r;
94
- }
95
- return typeof Uint8ClampedArray == "function" && typeof Float32Array == "function" ? function(e, s) {
96
- return e === "float32" ? new Float32Array(s) : e === "int16" ? new Int16Array(s) : e === "uint8c" ? new Uint8ClampedArray(s) : t(e, s);
97
- } : t;
98
- }();
99
- function K(t) {
100
- return Array.apply(null, { length: t });
101
- }
102
- var ws = !0, Ms = null, Ts = "", Ei = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), Vt = Math.pow, Fs = Math.sqrt, gt = Math.floor, Li = Math.min, Es = 150, et = Math.PI / 180, Kt = 0.5519;
103
- function as(t, e, s, i) {
104
- this.type = t, this.currentTime = e, this.totalTime = s, this.direction = i < 0 ? -1 : 1;
105
- }
106
- function Ls(t, e) {
107
- this.type = t, this.direction = e < 0 ? -1 : 1;
108
- }
109
- function Is(t, e, s, i) {
110
- this.type = t, this.currentLoop = s, this.totalLoops = e, this.direction = i < 0 ? -1 : 1;
111
- }
112
- function Vs(t, e, s) {
113
- this.type = t, this.firstFrame = e, this.totalFrames = s;
114
- }
115
- function Rs(t, e) {
116
- this.type = t, this.target = e;
117
- }
118
- function Ii(t, e) {
119
- this.type = "renderFrameError", this.nativeError = t, this.currentTime = e;
120
- }
121
- function Vi(t) {
122
- this.type = "configError", this.nativeError = t;
123
- }
124
- var zs, Ct = (zs = 0, function() {
125
- return Ts + "__lottie_element_" + (zs += 1);
126
- });
127
- function rs(t, e, s) {
128
- var i, a, r, h, n, g, y, o;
129
- switch (g = s * (1 - e), y = s * (1 - (n = 6 * t - (h = Math.floor(6 * t))) * e), o = s * (1 - (1 - n) * e), h % 6) {
130
- case 0:
131
- i = s, a = o, r = g;
132
- break;
133
- case 1:
134
- i = y, a = s, r = g;
135
- break;
136
- case 2:
137
- i = g, a = s, r = o;
138
- break;
139
- case 3:
140
- i = g, a = y, r = s;
141
- break;
142
- case 4:
143
- i = o, a = g, r = s;
144
- break;
145
- case 5:
146
- i = s, a = g, r = y;
147
- }
148
- return [i, a, r];
149
- }
150
- function ns(t, e, s) {
151
- var i, a = Math.max(t, e, s), r = Math.min(t, e, s), h = a - r, n = a === 0 ? 0 : h / a, g = a / 255;
152
- switch (a) {
153
- case r:
154
- i = 0;
155
- break;
156
- case t:
157
- i = e - s + h * (e < s ? 6 : 0), i /= 6 * h;
158
- break;
159
- case e:
160
- i = s - t + 2 * h, i /= 6 * h;
161
- break;
162
- case s:
163
- i = t - e + 4 * h, i /= 6 * h;
164
- }
165
- return [i, n, g];
166
- }
167
- function Os(t, e) {
168
- var s = ns(255 * t[0], 255 * t[1], 255 * t[2]);
169
- return s[1] += e, s[1] > 1 ? s[1] = 1 : s[1] <= 0 && (s[1] = 0), rs(s[0], s[1], s[2]);
170
- }
171
- function Ns(t, e) {
172
- var s = ns(255 * t[0], 255 * t[1], 255 * t[2]);
173
- return s[2] += e, s[2] > 1 ? s[2] = 1 : s[2] < 0 && (s[2] = 0), rs(s[0], s[1], s[2]);
174
- }
175
- function qs(t, e) {
176
- var s = ns(255 * t[0], 255 * t[1], 255 * t[2]);
177
- return s[0] += e / 360, s[0] > 1 ? s[0] -= 1 : s[0] < 0 && (s[0] += 1), rs(s[0], s[1], s[2]);
178
- }
179
- (function() {
180
- var t, e;
181
- for (t = 0; t < 256; t += 1) e = t.toString(16), e.length === 1 && "" + e;
182
- })();
183
- var Oe = function() {
184
- return Ms;
185
- }, Ne = function(t) {
186
- Es = t;
187
- }, qe = function() {
188
- return Es;
189
- };
190
- function z(t) {
191
- return document.createElementNS("http://www.w3.org/2000/svg", t);
192
- }
193
- function os(t) {
194
- return os = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
195
- return typeof e;
196
- } : function(e) {
197
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
198
- }, os(t);
199
- }
200
- var Ce = /* @__PURE__ */ function() {
201
- var t, e, s = 1, i = [], a = { onmessage: function() {
202
- }, postMessage: function(y) {
203
- t({ data: y });
204
- } }, r = { postMessage: function(y) {
205
- a.onmessage({ data: y });
206
- } };
207
- function h(y) {
208
- if (window.Worker && window.Blob && It) {
209
- var o = new Blob(["var _workerSelf = self; self.onmessage = ", y.toString()], { type: "text/javascript" }), d = URL.createObjectURL(o);
210
- return new Worker(d);
211
- }
212
- return t = y, a;
213
- }
214
- function n() {
215
- e || (e = h(function(y) {
216
- if (r.dataManager || (r.dataManager = function() {
217
- function d(x, T) {
218
- var M, _, D, w, P, V, O = x.length;
219
- for (_ = 0; _ < O; _ += 1) if ("ks" in (M = x[_]) && !M.completed) {
220
- if (M.completed = !0, M.hasMask) {
221
- var B = M.masksProperties;
222
- for (w = B.length, D = 0; D < w; D += 1) if (B[D].pt.k.i) l(B[D].pt.k);
223
- else for (V = B[D].pt.k.length, P = 0; P < V; P += 1) B[D].pt.k[P].s && l(B[D].pt.k[P].s[0]), B[D].pt.k[P].e && l(B[D].pt.k[P].e[0]);
224
- }
225
- M.ty === 0 ? (M.layers = c(M.refId, T), d(M.layers, T)) : M.ty === 4 ? m(M.shapes) : M.ty === 5 && F(M);
226
- }
227
- }
228
- function c(x, T) {
229
- var M = function(_, D) {
230
- for (var w = 0, P = D.length; w < P; ) {
231
- if (D[w].id === _) return D[w];
232
- w += 1;
233
- }
234
- return null;
235
- }(x, T);
236
- return M ? M.layers.__used ? JSON.parse(JSON.stringify(M.layers)) : (M.layers.__used = !0, M.layers) : null;
237
- }
238
- function m(x) {
239
- var T, M, _;
240
- for (T = x.length - 1; T >= 0; T -= 1) if (x[T].ty === "sh") if (x[T].ks.k.i) l(x[T].ks.k);
241
- else for (_ = x[T].ks.k.length, M = 0; M < _; M += 1) x[T].ks.k[M].s && l(x[T].ks.k[M].s[0]), x[T].ks.k[M].e && l(x[T].ks.k[M].e[0]);
242
- else x[T].ty === "gr" && m(x[T].it);
243
- }
244
- function l(x) {
245
- var T, M = x.i.length;
246
- for (T = 0; T < M; T += 1) x.i[T][0] += x.v[T][0], x.i[T][1] += x.v[T][1], x.o[T][0] += x.v[T][0], x.o[T][1] += x.v[T][1];
247
- }
248
- function f(x, T) {
249
- var M = T ? T.split(".") : [100, 100, 100];
250
- return x[0] > M[0] || !(M[0] > x[0]) && (x[1] > M[1] || !(M[1] > x[1]) && (x[2] > M[2] || !(M[2] > x[2]) && null));
251
- }
252
- var p, u = /* @__PURE__ */ function() {
253
- var x = [4, 4, 14];
254
- function T(M) {
255
- var _, D, w, P = M.length;
256
- for (_ = 0; _ < P; _ += 1) M[_].ty === 5 && (w = void 0, w = (D = M[_]).t.d, D.t.d = { k: [{ s: w, t: 0 }] });
257
- }
258
- return function(M) {
259
- if (f(x, M.v) && (T(M.layers), M.assets)) {
260
- var _, D = M.assets.length;
261
- for (_ = 0; _ < D; _ += 1) M.assets[_].layers && T(M.assets[_].layers);
262
- }
263
- };
264
- }(), v = (p = [4, 7, 99], function(x) {
265
- if (x.chars && !f(p, x.v)) {
266
- var T, M = x.chars.length;
267
- for (T = 0; T < M; T += 1) {
268
- var _ = x.chars[T];
269
- _.data && _.data.shapes && (m(_.data.shapes), _.data.ip = 0, _.data.op = 99999, _.data.st = 0, _.data.sr = 1, _.data.ks = { p: { k: [0, 0], a: 0 }, s: { k: [100, 100], a: 0 }, a: { k: [0, 0], a: 0 }, r: { k: 0, a: 0 }, o: { k: 100, a: 0 } }, x.chars[T].t || (_.data.shapes.push({ ty: "no" }), _.data.shapes[0].it.push({ p: { k: [0, 0], a: 0 }, s: { k: [100, 100], a: 0 }, a: { k: [0, 0], a: 0 }, r: { k: 0, a: 0 }, o: { k: 100, a: 0 }, sk: { k: 0, a: 0 }, sa: { k: 0, a: 0 }, ty: "tr" })));
270
- }
271
- }
272
- }), k = /* @__PURE__ */ function() {
273
- var x = [5, 7, 15];
274
- function T(M) {
275
- var _, D, w = M.length;
276
- for (_ = 0; _ < w; _ += 1) M[_].ty === 5 && (D = void 0, typeof (D = M[_].t.p).a == "number" && (D.a = { a: 0, k: D.a }), typeof D.p == "number" && (D.p = { a: 0, k: D.p }), typeof D.r == "number" && (D.r = { a: 0, k: D.r }));
277
- }
278
- return function(M) {
279
- if (f(x, M.v) && (T(M.layers), M.assets)) {
280
- var _, D = M.assets.length;
281
- for (_ = 0; _ < D; _ += 1) M.assets[_].layers && T(M.assets[_].layers);
282
- }
283
- };
284
- }(), C = /* @__PURE__ */ function() {
285
- var x = [4, 1, 9];
286
- function T(_) {
287
- var D, w, P, V = _.length;
288
- for (D = 0; D < V; D += 1) if (_[D].ty === "gr") T(_[D].it);
289
- else if (_[D].ty === "fl" || _[D].ty === "st") if (_[D].c.k && _[D].c.k[0].i) for (P = _[D].c.k.length, w = 0; w < P; w += 1) _[D].c.k[w].s && (_[D].c.k[w].s[0] /= 255, _[D].c.k[w].s[1] /= 255, _[D].c.k[w].s[2] /= 255, _[D].c.k[w].s[3] /= 255), _[D].c.k[w].e && (_[D].c.k[w].e[0] /= 255, _[D].c.k[w].e[1] /= 255, _[D].c.k[w].e[2] /= 255, _[D].c.k[w].e[3] /= 255);
290
- else _[D].c.k[0] /= 255, _[D].c.k[1] /= 255, _[D].c.k[2] /= 255, _[D].c.k[3] /= 255;
291
- }
292
- function M(_) {
293
- var D, w = _.length;
294
- for (D = 0; D < w; D += 1) _[D].ty === 4 && T(_[D].shapes);
295
- }
296
- return function(_) {
297
- if (f(x, _.v) && (M(_.layers), _.assets)) {
298
- var D, w = _.assets.length;
299
- for (D = 0; D < w; D += 1) _.assets[D].layers && M(_.assets[D].layers);
300
- }
301
- };
302
- }(), A = /* @__PURE__ */ function() {
303
- var x = [4, 4, 18];
304
- function T(_) {
305
- var D, w, P;
306
- for (D = _.length - 1; D >= 0; D -= 1) if (_[D].ty === "sh") if (_[D].ks.k.i) _[D].ks.k.c = _[D].closed;
307
- else for (P = _[D].ks.k.length, w = 0; w < P; w += 1) _[D].ks.k[w].s && (_[D].ks.k[w].s[0].c = _[D].closed), _[D].ks.k[w].e && (_[D].ks.k[w].e[0].c = _[D].closed);
308
- else _[D].ty === "gr" && T(_[D].it);
309
- }
310
- function M(_) {
311
- var D, w, P, V, O, B, b = _.length;
312
- for (w = 0; w < b; w += 1) {
313
- if ((D = _[w]).hasMask) {
314
- var S = D.masksProperties;
315
- for (V = S.length, P = 0; P < V; P += 1) if (S[P].pt.k.i) S[P].pt.k.c = S[P].cl;
316
- else for (B = S[P].pt.k.length, O = 0; O < B; O += 1) S[P].pt.k[O].s && (S[P].pt.k[O].s[0].c = S[P].cl), S[P].pt.k[O].e && (S[P].pt.k[O].e[0].c = S[P].cl);
317
- }
318
- D.ty === 4 && T(D.shapes);
319
- }
320
- }
321
- return function(_) {
322
- if (f(x, _.v) && (M(_.layers), _.assets)) {
323
- var D, w = _.assets.length;
324
- for (D = 0; D < w; D += 1) _.assets[D].layers && M(_.assets[D].layers);
325
- }
326
- };
327
- }();
328
- function F(x) {
329
- x.t.a.length === 0 && x.t.p;
330
- }
331
- var I = { completeData: function(x) {
332
- x.__complete || (C(x), u(x), v(x), k(x), A(x), d(x.layers, x.assets), function(T, M) {
333
- if (T) {
334
- var _ = 0, D = T.length;
335
- for (_ = 0; _ < D; _ += 1) T[_].t === 1 && (T[_].data.layers = c(T[_].data.refId, M), d(T[_].data.layers, M));
336
- }
337
- }(x.chars, x.assets), x.__complete = !0);
338
- } };
339
- return I.checkColors = C, I.checkChars = v, I.checkPathProperties = k, I.checkShapes = A, I.completeLayers = d, I;
340
- }()), r.assetLoader || (r.assetLoader = /* @__PURE__ */ function() {
341
- function d(c) {
342
- var m = c.getResponseHeader("content-type");
343
- return m && c.responseType === "json" && m.indexOf("json") !== -1 || c.response && os(c.response) === "object" ? c.response : c.response && typeof c.response == "string" ? JSON.parse(c.response) : c.responseText ? JSON.parse(c.responseText) : null;
344
- }
345
- return { load: function(c, m, l, f) {
346
- var p, u = new XMLHttpRequest();
347
- try {
348
- u.responseType = "json";
349
- } catch {
350
- }
351
- u.onreadystatechange = function() {
352
- if (u.readyState === 4) if (u.status === 200) p = d(u), l(p);
353
- else try {
354
- p = d(u), l(p);
355
- } catch (v) {
356
- f && f(v);
357
- }
358
- };
359
- try {
360
- u.open(["G", "E", "T"].join(""), c, !0);
361
- } catch {
362
- u.open(["G", "E", "T"].join(""), m + "/" + c, !0);
363
- }
364
- u.send();
365
- } };
366
- }()), y.data.type === "loadAnimation") r.assetLoader.load(y.data.path, y.data.fullPath, function(d) {
367
- r.dataManager.completeData(d), r.postMessage({ id: y.data.id, payload: d, status: "success" });
368
- }, function() {
369
- r.postMessage({ id: y.data.id, status: "error" });
370
- });
371
- else if (y.data.type === "complete") {
372
- var o = y.data.animation;
373
- r.dataManager.completeData(o), r.postMessage({ id: y.data.id, payload: o, status: "success" });
374
- } else y.data.type === "loadData" && r.assetLoader.load(y.data.path, y.data.fullPath, function(d) {
375
- r.postMessage({ id: y.data.id, payload: d, status: "success" });
376
- }, function() {
377
- r.postMessage({ id: y.data.id, status: "error" });
378
- });
379
- }), e.onmessage = function(y) {
380
- var o = y.data, d = o.id, c = i[d];
381
- i[d] = null, o.status === "success" ? c.onComplete(o.payload) : c.onError && c.onError();
382
- });
383
- }
384
- function g(y, o) {
385
- var d = "processId_" + (s += 1);
386
- return i[d] = { onComplete: y, onError: o }, d;
387
- }
388
- return { loadAnimation: function(y, o, d) {
389
- n();
390
- var c = g(o, d);
391
- e.postMessage({ type: "loadAnimation", path: y, fullPath: window.location.origin + window.location.pathname, id: c });
392
- }, loadData: function(y, o, d) {
393
- n();
394
- var c = g(o, d);
395
- e.postMessage({ type: "loadData", path: y, fullPath: window.location.origin + window.location.pathname, id: c });
396
- }, completeAnimation: function(y, o, d) {
397
- n();
398
- var c = g(o, d);
399
- e.postMessage({ type: "complete", animation: y, id: c });
400
- } };
401
- }(), Ri = function() {
402
- var t = function() {
403
- var n = Pt("canvas");
404
- n.width = 1, n.height = 1;
405
- var g = n.getContext("2d");
406
- return g.fillStyle = "rgba(0,0,0,0)", g.fillRect(0, 0, 1, 1), n;
407
- }();
408
- function e() {
409
- this.loadedAssets += 1, this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null);
410
- }
411
- function s() {
412
- this.loadedFootagesCount += 1, this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null);
413
- }
414
- function i(n, g, y) {
415
- var o = "";
416
- if (n.e) o = n.p;
417
- else if (g) {
418
- var d = n.p;
419
- d.indexOf("images/") !== -1 && (d = d.split("/")[1]), o = g + d;
420
- } else o = y, o += n.u ? n.u : "", o += n.p;
421
- return o;
422
- }
423
- function a(n) {
424
- var g = 0, y = setInterval((function() {
425
- (n.getBBox().width || g > 500) && (this._imageLoaded(), clearInterval(y)), g += 1;
426
- }).bind(this), 50);
427
- }
428
- function r(n) {
429
- var g = { assetData: n }, y = i(n, this.assetsPath, this.path);
430
- return Ce.loadData(y, (function(o) {
431
- g.img = o, this._footageLoaded();
432
- }).bind(this), (function() {
433
- g.img = {}, this._footageLoaded();
434
- }).bind(this)), g;
435
- }
436
- function h() {
437
- this._imageLoaded = e.bind(this), this._footageLoaded = s.bind(this), this.testImageLoaded = a.bind(this), this.createFootageData = r.bind(this), this.assetsPath = "", this.path = "", this.totalImages = 0, this.totalFootages = 0, this.loadedAssets = 0, this.loadedFootagesCount = 0, this.imagesLoadedCb = null, this.images = [];
438
- }
439
- return h.prototype = { loadAssets: function(n, g) {
440
- var y;
441
- this.imagesLoadedCb = g;
442
- var o = n.length;
443
- for (y = 0; y < o; y += 1) n[y].layers || (n[y].t && n[y].t !== "seq" ? n[y].t === 3 && (this.totalFootages += 1, this.images.push(this.createFootageData(n[y]))) : (this.totalImages += 1, this.images.push(this._createImageData(n[y]))));
444
- }, setAssetsPath: function(n) {
445
- this.assetsPath = n || "";
446
- }, setPath: function(n) {
447
- this.path = n || "";
448
- }, loadedImages: function() {
449
- return this.totalImages === this.loadedAssets;
450
- }, loadedFootages: function() {
451
- return this.totalFootages === this.loadedFootagesCount;
452
- }, destroy: function() {
453
- this.imagesLoadedCb = null, this.images.length = 0;
454
- }, getAsset: function(n) {
455
- for (var g = 0, y = this.images.length; g < y; ) {
456
- if (this.images[g].assetData === n) return this.images[g].img;
457
- g += 1;
458
- }
459
- return null;
460
- }, createImgData: function(n) {
461
- var g = i(n, this.assetsPath, this.path), y = Pt("img");
462
- y.crossOrigin = "anonymous", y.addEventListener("load", this._imageLoaded, !1), y.addEventListener("error", (function() {
463
- o.img = t, this._imageLoaded();
464
- }).bind(this), !1), y.src = g;
465
- var o = { img: y, assetData: n };
466
- return o;
467
- }, createImageData: function(n) {
468
- var g = i(n, this.assetsPath, this.path), y = z("image");
469
- Ei ? this.testImageLoaded(y) : y.addEventListener("load", this._imageLoaded, !1), y.addEventListener("error", (function() {
470
- o.img = t, this._imageLoaded();
471
- }).bind(this), !1), y.setAttributeNS("http://www.w3.org/1999/xlink", "href", g), this._elementHelper.append ? this._elementHelper.append(y) : this._elementHelper.appendChild(y);
472
- var o = { img: y, assetData: n };
473
- return o;
474
- }, imageLoaded: e, footageLoaded: s, setCacheType: function(n, g) {
475
- n === "svg" ? (this._elementHelper = g, this._createImageData = this.createImageData.bind(this)) : this._createImageData = this.createImgData.bind(this);
476
- } }, h;
477
- }();
478
- function Bs() {
479
- }
480
- Bs.prototype = { triggerEvent: function(t, e) {
481
- if (this._cbs[t]) for (var s = this._cbs[t], i = 0; i < s.length; i += 1) s[i](e);
482
- }, addEventListener: function(t, e) {
483
- return this._cbs[t] || (this._cbs[t] = []), this._cbs[t].push(e), (function() {
484
- this.removeEventListener(t, e);
485
- }).bind(this);
486
- }, removeEventListener: function(t, e) {
487
- if (e) {
488
- if (this._cbs[t]) {
489
- for (var s = 0, i = this._cbs[t].length; s < i; ) this._cbs[t][s] === e && (this._cbs[t].splice(s, 1), s -= 1, i -= 1), s += 1;
490
- this._cbs[t].length || (this._cbs[t] = null);
491
- }
492
- } else this._cbs[t] = null;
493
- } };
494
- var zi = /* @__PURE__ */ function() {
495
- function t(e) {
496
- for (var s, i = e.split(`\r
497
- `), a = {}, r = 0, h = 0; h < i.length; h += 1) (s = i[h].split(":")).length === 2 && (a[s[0]] = s[1].trim(), r += 1);
498
- if (r === 0) throw new Error();
499
- return a;
500
- }
501
- return function(e) {
502
- for (var s = [], i = 0; i < e.length; i += 1) {
503
- var a = e[i], r = { time: a.tm, duration: a.dr };
504
- try {
505
- r.payload = JSON.parse(e[i].cm);
506
- } catch {
507
- try {
508
- r.payload = t(e[i].cm);
509
- } catch {
510
- r.payload = { name: e[i].cm };
511
- }
512
- }
513
- s.push(r);
514
- }
515
- return s;
516
- };
517
- }(), Oi = /* @__PURE__ */ function() {
518
- function t(e) {
519
- this.compositions.push(e);
520
- }
521
- return function() {
522
- function e(s) {
523
- for (var i = 0, a = this.compositions.length; i < a; ) {
524
- if (this.compositions[i].data && this.compositions[i].data.nm === s) return this.compositions[i].prepareFrame && this.compositions[i].data.xt && this.compositions[i].prepareFrame(this.currentFrame), this.compositions[i].compInterface;
525
- i += 1;
526
- }
527
- return null;
528
- }
529
- return e.compositions = [], e.currentFrame = 0, e.registerComposition = t, e;
530
- };
531
- }(), xe = {};
532
- function Be(t) {
533
- return Be = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
534
- return typeof e;
535
- } : function(e) {
536
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
537
- }, Be(t);
538
- }
539
- var R = function() {
540
- this._cbs = [], this.name = "", this.path = "", this.isLoaded = !1, this.currentFrame = 0, this.currentRawFrame = 0, this.firstFrame = 0, this.totalFrames = 0, this.frameRate = 0, this.frameMult = 0, this.playSpeed = 1, this.playDirection = 1, this.playCount = 0, this.animationData = {}, this.assets = [], this.isPaused = !0, this.autoplay = !1, this.loop = !0, this.renderer = null, this.animationID = Ct(), this.assetsPath = "", this.timeCompleted = 0, this.segmentPos = 0, this.isSubframeEnabled = ws, this.segments = [], this._idle = !0, this._completedLoop = !1, this.projectInterface = Oi(), this.imagePreloader = new Ri(), this.audioController = Fi(), this.markers = [], this.configAnimation = this.configAnimation.bind(this), this.onSetupError = this.onSetupError.bind(this), this.onSegmentComplete = this.onSegmentComplete.bind(this), this.drawnFrameEvent = new as("drawnFrame", 0, 0, 0), this.expressionsPlugin = Oe();
541
- };
542
- W([Bs], R), R.prototype.setParams = function(t) {
543
- (t.wrapper || t.container) && (this.wrapper = t.wrapper || t.container);
544
- var e = "svg";
545
- t.animType ? e = t.animType : t.renderer && (e = t.renderer);
546
- var s = xe[e];
547
- this.renderer = new s(this, t.rendererSettings), this.imagePreloader.setCacheType(e, this.renderer.globalData.defs), this.renderer.setProjectInterface(this.projectInterface), this.animType = e, t.loop === "" || t.loop === null || t.loop === void 0 || t.loop === !0 ? this.loop = !0 : t.loop === !1 ? this.loop = !1 : this.loop = parseInt(t.loop, 10), this.autoplay = !("autoplay" in t) || t.autoplay, this.name = t.name ? t.name : "", this.autoloadSegments = !Object.prototype.hasOwnProperty.call(t, "autoloadSegments") || t.autoloadSegments, this.assetsPath = t.assetsPath, this.initialSegment = t.initialSegment, t.audioFactory && this.audioController.setAudioFactory(t.audioFactory), t.animationData ? this.setupAnimation(t.animationData) : t.path && (t.path.lastIndexOf("\\") !== -1 ? this.path = t.path.substr(0, t.path.lastIndexOf("\\") + 1) : this.path = t.path.substr(0, t.path.lastIndexOf("/") + 1), this.fileName = t.path.substr(t.path.lastIndexOf("/") + 1), this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf(".json")), Ce.loadAnimation(t.path, this.configAnimation, this.onSetupError));
548
- }, R.prototype.onSetupError = function() {
549
- this.trigger("data_failed");
550
- }, R.prototype.setupAnimation = function(t) {
551
- Ce.completeAnimation(t, this.configAnimation);
552
- }, R.prototype.setData = function(t, e) {
553
- e && Be(e) !== "object" && (e = JSON.parse(e));
554
- var s = { wrapper: t, animationData: e }, i = t.attributes;
555
- s.path = i.getNamedItem("data-animation-path") ? i.getNamedItem("data-animation-path").value : i.getNamedItem("data-bm-path") ? i.getNamedItem("data-bm-path").value : i.getNamedItem("bm-path") ? i.getNamedItem("bm-path").value : "", s.animType = i.getNamedItem("data-anim-type") ? i.getNamedItem("data-anim-type").value : i.getNamedItem("data-bm-type") ? i.getNamedItem("data-bm-type").value : i.getNamedItem("bm-type") ? i.getNamedItem("bm-type").value : i.getNamedItem("data-bm-renderer") ? i.getNamedItem("data-bm-renderer").value : i.getNamedItem("bm-renderer") ? i.getNamedItem("bm-renderer").value : function() {
556
- if (xe.canvas) return "canvas";
557
- for (var h in xe) if (xe[h]) return h;
558
- return "";
559
- }() || "canvas";
560
- var a = i.getNamedItem("data-anim-loop") ? i.getNamedItem("data-anim-loop").value : i.getNamedItem("data-bm-loop") ? i.getNamedItem("data-bm-loop").value : i.getNamedItem("bm-loop") ? i.getNamedItem("bm-loop").value : "";
561
- a === "false" ? s.loop = !1 : a === "true" ? s.loop = !0 : a !== "" && (s.loop = parseInt(a, 10));
562
- var r = i.getNamedItem("data-anim-autoplay") ? i.getNamedItem("data-anim-autoplay").value : i.getNamedItem("data-bm-autoplay") ? i.getNamedItem("data-bm-autoplay").value : !i.getNamedItem("bm-autoplay") || i.getNamedItem("bm-autoplay").value;
563
- s.autoplay = r !== "false", s.name = i.getNamedItem("data-name") ? i.getNamedItem("data-name").value : i.getNamedItem("data-bm-name") ? i.getNamedItem("data-bm-name").value : i.getNamedItem("bm-name") ? i.getNamedItem("bm-name").value : "", (i.getNamedItem("data-anim-prerender") ? i.getNamedItem("data-anim-prerender").value : i.getNamedItem("data-bm-prerender") ? i.getNamedItem("data-bm-prerender").value : i.getNamedItem("bm-prerender") ? i.getNamedItem("bm-prerender").value : "") === "false" && (s.prerender = !1), s.path ? this.setParams(s) : this.trigger("destroy");
564
- }, R.prototype.includeLayers = function(t) {
565
- t.op > this.animationData.op && (this.animationData.op = t.op, this.totalFrames = Math.floor(t.op - this.animationData.ip));
566
- var e, s, i = this.animationData.layers, a = i.length, r = t.layers, h = r.length;
567
- for (s = 0; s < h; s += 1) for (e = 0; e < a; ) {
568
- if (i[e].id === r[s].id) {
569
- i[e] = r[s];
570
- break;
571
- }
572
- e += 1;
573
- }
574
- if ((t.chars || t.fonts) && (this.renderer.globalData.fontManager.addChars(t.chars), this.renderer.globalData.fontManager.addFonts(t.fonts, this.renderer.globalData.defs)), t.assets) for (a = t.assets.length, e = 0; e < a; e += 1) this.animationData.assets.push(t.assets[e]);
575
- this.animationData.__complete = !1, Ce.completeAnimation(this.animationData, this.onSegmentComplete);
576
- }, R.prototype.onSegmentComplete = function(t) {
577
- this.animationData = t;
578
- var e = Oe();
579
- e && e.initExpressions(this), this.loadNextSegment();
580
- }, R.prototype.loadNextSegment = function() {
581
- var t = this.animationData.segments;
582
- if (!t || t.length === 0 || !this.autoloadSegments) return this.trigger("data_ready"), void (this.timeCompleted = this.totalFrames);
583
- var e = t.shift();
584
- this.timeCompleted = e.time * this.frameRate;
585
- var s = this.path + this.fileName + "_" + this.segmentPos + ".json";
586
- this.segmentPos += 1, Ce.loadData(s, this.includeLayers.bind(this), (function() {
587
- this.trigger("data_failed");
588
- }).bind(this));
589
- }, R.prototype.loadSegments = function() {
590
- this.animationData.segments || (this.timeCompleted = this.totalFrames), this.loadNextSegment();
591
- }, R.prototype.imagesLoaded = function() {
592
- this.trigger("loaded_images"), this.checkLoaded();
593
- }, R.prototype.preloadImages = function() {
594
- this.imagePreloader.setAssetsPath(this.assetsPath), this.imagePreloader.setPath(this.path), this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
595
- }, R.prototype.configAnimation = function(t) {
596
- if (this.renderer) try {
597
- this.animationData = t, this.initialSegment ? (this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]), this.firstFrame = Math.round(this.initialSegment[0])) : (this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip), this.firstFrame = Math.round(this.animationData.ip)), this.renderer.configAnimation(t), t.assets || (t.assets = []), this.assets = this.animationData.assets, this.frameRate = this.animationData.fr, this.frameMult = this.animationData.fr / 1e3, this.renderer.searchExtraCompositions(t.assets), this.markers = zi(t.markers || []), this.trigger("config_ready"), this.preloadImages(), this.loadSegments(), this.updaFrameModifier(), this.waitForFontsLoaded(), this.isPaused && this.audioController.pause();
598
- } catch (e) {
599
- this.triggerConfigError(e);
600
- }
601
- }, R.prototype.waitForFontsLoaded = function() {
602
- this.renderer && (this.renderer.globalData.fontManager.isLoaded ? this.checkLoaded() : setTimeout(this.waitForFontsLoaded.bind(this), 20));
603
- }, R.prototype.checkLoaded = function() {
604
- if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== "canvas") && this.imagePreloader.loadedFootages()) {
605
- this.isLoaded = !0;
606
- var t = Oe();
607
- t && t.initExpressions(this), this.renderer.initItems(), setTimeout((function() {
608
- this.trigger("DOMLoaded");
609
- }).bind(this), 0), this.gotoFrame(), this.autoplay && this.play();
610
- }
611
- }, R.prototype.resize = function(t, e) {
612
- var s = typeof t == "number" ? t : void 0, i = typeof e == "number" ? e : void 0;
613
- this.renderer.updateContainerSize(s, i);
614
- }, R.prototype.setSubframe = function(t) {
615
- this.isSubframeEnabled = !!t;
616
- }, R.prototype.gotoFrame = function() {
617
- this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame, this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted && (this.currentFrame = this.timeCompleted), this.trigger("enterFrame"), this.renderFrame(), this.trigger("drawnFrame");
618
- }, R.prototype.renderFrame = function() {
619
- if (this.isLoaded !== !1 && this.renderer) try {
620
- this.expressionsPlugin && this.expressionsPlugin.resetFrame(), this.renderer.renderFrame(this.currentFrame + this.firstFrame);
621
- } catch (t) {
622
- this.triggerRenderFrameError(t);
623
- }
624
- }, R.prototype.play = function(t) {
625
- t && this.name !== t || this.isPaused === !0 && (this.isPaused = !1, this.trigger("_play"), this.audioController.resume(), this._idle && (this._idle = !1, this.trigger("_active")));
626
- }, R.prototype.pause = function(t) {
627
- t && this.name !== t || this.isPaused === !1 && (this.isPaused = !0, this.trigger("_pause"), this._idle = !0, this.trigger("_idle"), this.audioController.pause());
628
- }, R.prototype.togglePause = function(t) {
629
- t && this.name !== t || (this.isPaused === !0 ? this.play() : this.pause());
630
- }, R.prototype.stop = function(t) {
631
- t && this.name !== t || (this.pause(), this.playCount = 0, this._completedLoop = !1, this.setCurrentRawFrameValue(0));
632
- }, R.prototype.getMarkerData = function(t) {
633
- for (var e, s = 0; s < this.markers.length; s += 1) if ((e = this.markers[s]).payload && e.payload.name === t) return e;
634
- return null;
635
- }, R.prototype.goToAndStop = function(t, e, s) {
636
- if (!s || this.name === s) {
637
- var i = Number(t);
638
- if (isNaN(i)) {
639
- var a = this.getMarkerData(t);
640
- a && this.goToAndStop(a.time, !0);
641
- } else e ? this.setCurrentRawFrameValue(t) : this.setCurrentRawFrameValue(t * this.frameModifier);
642
- this.pause();
643
- }
644
- }, R.prototype.goToAndPlay = function(t, e, s) {
645
- if (!s || this.name === s) {
646
- var i = Number(t);
647
- if (isNaN(i)) {
648
- var a = this.getMarkerData(t);
649
- a && (a.duration ? this.playSegments([a.time, a.time + a.duration], !0) : this.goToAndStop(a.time, !0));
650
- } else this.goToAndStop(i, e, s);
651
- this.play();
652
- }
653
- }, R.prototype.advanceTime = function(t) {
654
- if (this.isPaused !== !0 && this.isLoaded !== !1) {
655
- var e = this.currentRawFrame + t * this.frameModifier, s = !1;
656
- e >= this.totalFrames - 1 && this.frameModifier > 0 ? this.loop && this.playCount !== this.loop ? e >= this.totalFrames ? (this.playCount += 1, this.checkSegments(e % this.totalFrames) || (this.setCurrentRawFrameValue(e % this.totalFrames), this._completedLoop = !0, this.trigger("loopComplete"))) : this.setCurrentRawFrameValue(e) : this.checkSegments(e > this.totalFrames ? e % this.totalFrames : 0) || (s = !0, e = this.totalFrames - 1) : e < 0 ? this.checkSegments(e % this.totalFrames) || (!this.loop || this.playCount-- <= 0 && this.loop !== !0 ? (s = !0, e = 0) : (this.setCurrentRawFrameValue(this.totalFrames + e % this.totalFrames), this._completedLoop ? this.trigger("loopComplete") : this._completedLoop = !0)) : this.setCurrentRawFrameValue(e), s && (this.setCurrentRawFrameValue(e), this.pause(), this.trigger("complete"));
657
- }
658
- }, R.prototype.adjustSegment = function(t, e) {
659
- this.playCount = 0, t[1] < t[0] ? (this.frameModifier > 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(-1)), this.totalFrames = t[0] - t[1], this.timeCompleted = this.totalFrames, this.firstFrame = t[1], this.setCurrentRawFrameValue(this.totalFrames - 1e-3 - e)) : t[1] > t[0] && (this.frameModifier < 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(1)), this.totalFrames = t[1] - t[0], this.timeCompleted = this.totalFrames, this.firstFrame = t[0], this.setCurrentRawFrameValue(1e-3 + e)), this.trigger("segmentStart");
660
- }, R.prototype.setSegment = function(t, e) {
661
- var s = -1;
662
- this.isPaused && (this.currentRawFrame + this.firstFrame < t ? s = t : this.currentRawFrame + this.firstFrame > e && (s = e - t)), this.firstFrame = t, this.totalFrames = e - t, this.timeCompleted = this.totalFrames, s !== -1 && this.goToAndStop(s, !0);
663
- }, R.prototype.playSegments = function(t, e) {
664
- if (e && (this.segments.length = 0), Be(t[0]) === "object") {
665
- var s, i = t.length;
666
- for (s = 0; s < i; s += 1) this.segments.push(t[s]);
667
- } else this.segments.push(t);
668
- this.segments.length && e && this.adjustSegment(this.segments.shift(), 0), this.isPaused && this.play();
669
- }, R.prototype.resetSegments = function(t) {
670
- this.segments.length = 0, this.segments.push([this.animationData.ip, this.animationData.op]), t && this.checkSegments(0);
671
- }, R.prototype.checkSegments = function(t) {
672
- return !!this.segments.length && (this.adjustSegment(this.segments.shift(), t), !0);
673
- }, R.prototype.destroy = function(t) {
674
- t && this.name !== t || !this.renderer || (this.renderer.destroy(), this.imagePreloader.destroy(), this.trigger("destroy"), this._cbs = null, this.onEnterFrame = null, this.onLoopComplete = null, this.onComplete = null, this.onSegmentStart = null, this.onDestroy = null, this.renderer = null, this.expressionsPlugin = null, this.imagePreloader = null, this.projectInterface = null);
675
- }, R.prototype.setCurrentRawFrameValue = function(t) {
676
- this.currentRawFrame = t, this.gotoFrame();
677
- }, R.prototype.setSpeed = function(t) {
678
- this.playSpeed = t, this.updaFrameModifier();
679
- }, R.prototype.setDirection = function(t) {
680
- this.playDirection = t < 0 ? -1 : 1, this.updaFrameModifier();
681
- }, R.prototype.setLoop = function(t) {
682
- this.loop = t;
683
- }, R.prototype.setVolume = function(t, e) {
684
- e && this.name !== e || this.audioController.setVolume(t);
685
- }, R.prototype.getVolume = function() {
686
- return this.audioController.getVolume();
687
- }, R.prototype.mute = function(t) {
688
- t && this.name !== t || this.audioController.mute();
689
- }, R.prototype.unmute = function(t) {
690
- t && this.name !== t || this.audioController.unmute();
691
- }, R.prototype.updaFrameModifier = function() {
692
- this.frameModifier = this.frameMult * this.playSpeed * this.playDirection, this.audioController.setRate(this.playSpeed * this.playDirection);
693
- }, R.prototype.getPath = function() {
694
- return this.path;
695
- }, R.prototype.getAssetsPath = function(t) {
696
- var e = "";
697
- if (t.e) e = t.p;
698
- else if (this.assetsPath) {
699
- var s = t.p;
700
- s.indexOf("images/") !== -1 && (s = s.split("/")[1]), e = this.assetsPath + s;
701
- } else e = this.path, e += t.u ? t.u : "", e += t.p;
702
- return e;
703
- }, R.prototype.getAssetData = function(t) {
704
- for (var e = 0, s = this.assets.length; e < s; ) {
705
- if (t === this.assets[e].id) return this.assets[e];
706
- e += 1;
707
- }
708
- return null;
709
- }, R.prototype.hide = function() {
710
- this.renderer.hide();
711
- }, R.prototype.show = function() {
712
- this.renderer.show();
713
- }, R.prototype.getDuration = function(t) {
714
- return t ? this.totalFrames : this.totalFrames / this.frameRate;
715
- }, R.prototype.updateDocumentData = function(t, e, s) {
716
- try {
717
- this.renderer.getElementByPath(t).updateDocumentData(e, s);
718
- } catch {
719
- }
720
- }, R.prototype.trigger = function(t) {
721
- if (this._cbs && this._cbs[t]) switch (t) {
722
- case "enterFrame":
723
- this.triggerEvent(t, new as(t, this.currentFrame, this.totalFrames, this.frameModifier));
724
- break;
725
- case "drawnFrame":
726
- this.drawnFrameEvent.currentTime = this.currentFrame, this.drawnFrameEvent.totalTime = this.totalFrames, this.drawnFrameEvent.direction = this.frameModifier, this.triggerEvent(t, this.drawnFrameEvent);
727
- break;
728
- case "loopComplete":
729
- this.triggerEvent(t, new Is(t, this.loop, this.playCount, this.frameMult));
730
- break;
731
- case "complete":
732
- this.triggerEvent(t, new Ls(t, this.frameMult));
733
- break;
734
- case "segmentStart":
735
- this.triggerEvent(t, new Vs(t, this.firstFrame, this.totalFrames));
736
- break;
737
- case "destroy":
738
- this.triggerEvent(t, new Rs(t, this));
739
- break;
740
- default:
741
- this.triggerEvent(t);
742
- }
743
- t === "enterFrame" && this.onEnterFrame && this.onEnterFrame.call(this, new as(t, this.currentFrame, this.totalFrames, this.frameMult)), t === "loopComplete" && this.onLoopComplete && this.onLoopComplete.call(this, new Is(t, this.loop, this.playCount, this.frameMult)), t === "complete" && this.onComplete && this.onComplete.call(this, new Ls(t, this.frameMult)), t === "segmentStart" && this.onSegmentStart && this.onSegmentStart.call(this, new Vs(t, this.firstFrame, this.totalFrames)), t === "destroy" && this.onDestroy && this.onDestroy.call(this, new Rs(t, this));
744
- }, R.prototype.triggerRenderFrameError = function(t) {
745
- var e = new Ii(t, this.currentFrame);
746
- this.triggerEvent("error", e), this.onError && this.onError.call(this, e);
747
- }, R.prototype.triggerConfigError = function(t) {
748
- var e = new Vi(t, this.currentFrame);
749
- this.triggerEvent("error", e), this.onError && this.onError.call(this, e);
750
- };
751
- var lt = function() {
752
- var t = {}, e = [], s = 0, i = 0, a = 0, r = !0, h = !1;
753
- function n(f) {
754
- for (var p = 0, u = f.target; p < i; ) e[p].animation === u && (e.splice(p, 1), p -= 1, i -= 1, u.isPaused || o()), p += 1;
755
- }
756
- function g(f, p) {
757
- if (!f) return null;
758
- for (var u = 0; u < i; ) {
759
- if (e[u].elem === f && e[u].elem !== null) return e[u].animation;
760
- u += 1;
761
- }
762
- var v = new R();
763
- return d(v, f), v.setData(f, p), v;
764
- }
765
- function y() {
766
- a += 1, l();
767
- }
768
- function o() {
769
- a -= 1;
770
- }
771
- function d(f, p) {
772
- f.addEventListener("destroy", n), f.addEventListener("_active", y), f.addEventListener("_idle", o), e.push({ elem: p, animation: f }), i += 1;
773
- }
774
- function c(f) {
775
- var p, u = f - s;
776
- for (p = 0; p < i; p += 1) e[p].animation.advanceTime(u);
777
- s = f, a && !h ? window.requestAnimationFrame(c) : r = !0;
778
- }
779
- function m(f) {
780
- s = f, window.requestAnimationFrame(c);
781
- }
782
- function l() {
783
- !h && a && r && (window.requestAnimationFrame(m), r = !1);
784
- }
785
- return t.registerAnimation = g, t.loadAnimation = function(f) {
786
- var p = new R();
787
- return d(p, null), p.setParams(f), p;
788
- }, t.setSpeed = function(f, p) {
789
- var u;
790
- for (u = 0; u < i; u += 1) e[u].animation.setSpeed(f, p);
791
- }, t.setDirection = function(f, p) {
792
- var u;
793
- for (u = 0; u < i; u += 1) e[u].animation.setDirection(f, p);
794
- }, t.play = function(f) {
795
- var p;
796
- for (p = 0; p < i; p += 1) e[p].animation.play(f);
797
- }, t.pause = function(f) {
798
- var p;
799
- for (p = 0; p < i; p += 1) e[p].animation.pause(f);
800
- }, t.stop = function(f) {
801
- var p;
802
- for (p = 0; p < i; p += 1) e[p].animation.stop(f);
803
- }, t.togglePause = function(f) {
804
- var p;
805
- for (p = 0; p < i; p += 1) e[p].animation.togglePause(f);
806
- }, t.searchAnimations = function(f, p, u) {
807
- var v, k = [].concat([].slice.call(document.getElementsByClassName("lottie")), [].slice.call(document.getElementsByClassName("bodymovin"))), C = k.length;
808
- for (v = 0; v < C; v += 1) u && k[v].setAttribute("data-bm-type", u), g(k[v], f);
809
- if (p && C === 0) {
810
- u || (u = "svg");
811
- var A = document.getElementsByTagName("body")[0];
812
- A.innerText = "";
813
- var F = Pt("div");
814
- F.style.width = "100%", F.style.height = "100%", F.setAttribute("data-bm-type", u), A.appendChild(F), g(F, f);
815
- }
816
- }, t.resize = function() {
817
- var f;
818
- for (f = 0; f < i; f += 1) e[f].animation.resize();
819
- }, t.goToAndStop = function(f, p, u) {
820
- var v;
821
- for (v = 0; v < i; v += 1) e[v].animation.goToAndStop(f, p, u);
822
- }, t.destroy = function(f) {
823
- var p;
824
- for (p = i - 1; p >= 0; p -= 1) e[p].animation.destroy(f);
825
- }, t.freeze = function() {
826
- h = !0;
827
- }, t.unfreeze = function() {
828
- h = !1, l();
829
- }, t.setVolume = function(f, p) {
830
- var u;
831
- for (u = 0; u < i; u += 1) e[u].animation.setVolume(f, p);
832
- }, t.mute = function(f) {
833
- var p;
834
- for (p = 0; p < i; p += 1) e[p].animation.mute(f);
835
- }, t.unmute = function(f) {
836
- var p;
837
- for (p = 0; p < i; p += 1) e[p].animation.unmute(f);
838
- }, t.getRegisteredAnimations = function() {
839
- var f, p = e.length, u = [];
840
- for (f = 0; f < p; f += 1) u.push(e[f].animation);
841
- return u;
842
- }, t;
843
- }(), ke = function() {
844
- var t = { getBezierEasing: function(d, c, m, l, f) {
845
- var p = f || ("bez_" + d + "_" + c + "_" + m + "_" + l).replace(/\./g, "p");
846
- if (e[p]) return e[p];
847
- var u = new o([d, c, m, l]);
848
- return e[p] = u, u;
849
- } }, e = {}, s = 11, i = 1 / (s - 1), a = typeof Float32Array == "function";
850
- function r(d, c) {
851
- return 1 - 3 * c + 3 * d;
852
- }
853
- function h(d, c) {
854
- return 3 * c - 6 * d;
855
- }
856
- function n(d) {
857
- return 3 * d;
858
- }
859
- function g(d, c, m) {
860
- return ((r(c, m) * d + h(c, m)) * d + n(c)) * d;
861
- }
862
- function y(d, c, m) {
863
- return 3 * r(c, m) * d * d + 2 * h(c, m) * d + n(c);
864
- }
865
- function o(d) {
866
- this._p = d, this._mSampleValues = a ? new Float32Array(s) : new Array(s), this._precomputed = !1, this.get = this.get.bind(this);
867
- }
868
- return o.prototype = { get: function(d) {
869
- var c = this._p[0], m = this._p[1], l = this._p[2], f = this._p[3];
870
- return this._precomputed || this._precompute(), c === m && l === f ? d : d === 0 ? 0 : d === 1 ? 1 : g(this._getTForX(d), m, f);
871
- }, _precompute: function() {
872
- var d = this._p[0], c = this._p[1], m = this._p[2], l = this._p[3];
873
- this._precomputed = !0, d === c && m === l || this._calcSampleValues();
874
- }, _calcSampleValues: function() {
875
- for (var d = this._p[0], c = this._p[2], m = 0; m < s; ++m) this._mSampleValues[m] = g(m * i, d, c);
876
- }, _getTForX: function(d) {
877
- for (var c = this._p[0], m = this._p[2], l = this._mSampleValues, f = 0, p = 1, u = s - 1; p !== u && l[p] <= d; ++p) f += i;
878
- var v = f + (d - l[--p]) / (l[p + 1] - l[p]) * i, k = y(v, c, m);
879
- return k >= 1e-3 ? function(C, A, F, I) {
880
- for (var x = 0; x < 4; ++x) {
881
- var T = y(A, F, I);
882
- if (T === 0) return A;
883
- A -= (g(A, F, I) - C) / T;
884
- }
885
- return A;
886
- }(d, v, c, m) : k === 0 ? v : function(C, A, F, I, x) {
887
- var T, M, _ = 0;
888
- do
889
- (T = g(M = A + (F - A) / 2, I, x) - C) > 0 ? F = M : A = M;
890
- while (Math.abs(T) > 1e-7 && ++_ < 10);
891
- return M;
892
- }(d, f, f + i, c, m);
893
- } }, t;
894
- }(), Ws = { double: function(t) {
895
- return t.concat(K(t.length));
896
- } }, We = function(t, e, s) {
897
- var i = 0, a = t, r = K(a);
898
- return { newElement: function() {
899
- return i ? r[i -= 1] : e();
900
- }, release: function(h) {
901
- i === a && (r = Ws.double(r), a *= 2), s && s(h), r[i] = h, i += 1;
902
- } };
903
- }, js = We(8, function() {
904
- return { addedLength: 0, percents: ht("float32", qe()), lengths: ht("float32", qe()) };
905
- }), Js = We(8, function() {
906
- return { lengths: [], totalLength: 0 };
907
- }, function(t) {
908
- var e, s = t.lengths.length;
909
- for (e = 0; e < s; e += 1) js.release(t.lengths[e]);
910
- t.lengths.length = 0;
911
- }), Rt = function() {
912
- var t = Math;
913
- function e(y, o, d, c, m, l) {
914
- var f = y * c + o * m + d * l - m * c - l * y - d * o;
915
- return f > -1e-3 && f < 1e-3;
916
- }
917
- var s = function(y, o, d, c) {
918
- var m, l, f, p, u, v, k = qe(), C = 0, A = [], F = [], I = js.newElement();
919
- for (f = d.length, m = 0; m < k; m += 1) {
920
- for (u = m / (k - 1), v = 0, l = 0; l < f; l += 1) p = Vt(1 - u, 3) * y[l] + 3 * Vt(1 - u, 2) * u * d[l] + 3 * (1 - u) * Vt(u, 2) * c[l] + Vt(u, 3) * o[l], A[l] = p, F[l] !== null && (v += Vt(A[l] - F[l], 2)), F[l] = A[l];
921
- v && (C += v = Fs(v)), I.percents[m] = u, I.lengths[m] = C;
922
- }
923
- return I.addedLength = C, I;
924
- };
925
- function i(y) {
926
- this.segmentLength = 0, this.points = new Array(y);
927
- }
928
- function a(y, o) {
929
- this.partialLength = y, this.point = o;
930
- }
931
- var r, h = (r = {}, function(y, o, d, c) {
932
- var m = (y[0] + "_" + y[1] + "_" + o[0] + "_" + o[1] + "_" + d[0] + "_" + d[1] + "_" + c[0] + "_" + c[1]).replace(/\./g, "p");
933
- if (!r[m]) {
934
- var l, f, p, u, v, k, C, A = qe(), F = 0, I = null;
935
- y.length === 2 && (y[0] !== o[0] || y[1] !== o[1]) && e(y[0], y[1], o[0], o[1], y[0] + d[0], y[1] + d[1]) && e(y[0], y[1], o[0], o[1], o[0] + c[0], o[1] + c[1]) && (A = 2);
936
- var x = new i(A);
937
- for (p = d.length, l = 0; l < A; l += 1) {
938
- for (C = K(p), v = l / (A - 1), k = 0, f = 0; f < p; f += 1) u = Vt(1 - v, 3) * y[f] + 3 * Vt(1 - v, 2) * v * (y[f] + d[f]) + 3 * (1 - v) * Vt(v, 2) * (o[f] + c[f]) + Vt(v, 3) * o[f], C[f] = u, I !== null && (k += Vt(C[f] - I[f], 2));
939
- F += k = Fs(k), x.points[l] = new a(k, C), I = C;
940
- }
941
- x.segmentLength = F, r[m] = x;
942
- }
943
- return r[m];
944
- });
945
- function n(y, o) {
946
- var d = o.percents, c = o.lengths, m = d.length, l = gt((m - 1) * y), f = y * o.addedLength, p = 0;
947
- if (l === m - 1 || l === 0 || f === c[l]) return d[l];
948
- for (var u = c[l] > f ? -1 : 1, v = !0; v; ) if (c[l] <= f && c[l + 1] > f ? (p = (f - c[l]) / (c[l + 1] - c[l]), v = !1) : l += u, l < 0 || l >= m - 1) {
949
- if (l === m - 1) return d[l];
950
- v = !1;
951
- }
952
- return d[l] + (d[l + 1] - d[l]) * p;
953
- }
954
- var g = ht("float32", 8);
955
- return { getSegmentsLength: function(y) {
956
- var o, d = Js.newElement(), c = y.c, m = y.v, l = y.o, f = y.i, p = y._length, u = d.lengths, v = 0;
957
- for (o = 0; o < p - 1; o += 1) u[o] = s(m[o], m[o + 1], l[o], f[o + 1]), v += u[o].addedLength;
958
- return c && p && (u[o] = s(m[o], m[0], l[o], f[0]), v += u[o].addedLength), d.totalLength = v, d;
959
- }, getNewSegment: function(y, o, d, c, m, l, f) {
960
- m < 0 ? m = 0 : m > 1 && (m = 1);
961
- var p, u = n(m, f), v = n(l = l > 1 ? 1 : l, f), k = y.length, C = 1 - u, A = 1 - v, F = C * C * C, I = u * C * C * 3, x = u * u * C * 3, T = u * u * u, M = C * C * A, _ = u * C * A + C * u * A + C * C * v, D = u * u * A + C * u * v + u * C * v, w = u * u * v, P = C * A * A, V = u * A * A + C * v * A + C * A * v, O = u * v * A + C * v * v + u * A * v, B = u * v * v, b = A * A * A, S = v * A * A + A * v * A + A * A * v, L = v * v * A + A * v * v + v * A * v, N = v * v * v;
962
- for (p = 0; p < k; p += 1) g[4 * p] = t.round(1e3 * (F * y[p] + I * d[p] + x * c[p] + T * o[p])) / 1e3, g[4 * p + 1] = t.round(1e3 * (M * y[p] + _ * d[p] + D * c[p] + w * o[p])) / 1e3, g[4 * p + 2] = t.round(1e3 * (P * y[p] + V * d[p] + O * c[p] + B * o[p])) / 1e3, g[4 * p + 3] = t.round(1e3 * (b * y[p] + S * d[p] + L * c[p] + N * o[p])) / 1e3;
963
- return g;
964
- }, getPointInSegment: function(y, o, d, c, m, l) {
965
- var f = n(m, l), p = 1 - f;
966
- return [t.round(1e3 * (p * p * p * y[0] + (f * p * p + p * f * p + p * p * f) * d[0] + (f * f * p + p * f * f + f * p * f) * c[0] + f * f * f * o[0])) / 1e3, t.round(1e3 * (p * p * p * y[1] + (f * p * p + p * f * p + p * p * f) * d[1] + (f * f * p + p * f * f + f * p * f) * c[1] + f * f * f * o[1])) / 1e3];
967
- }, buildBezierData: h, pointOnLine2D: e, pointOnLine3D: function(y, o, d, c, m, l, f, p, u) {
968
- if (d === 0 && l === 0 && u === 0) return e(y, o, c, m, f, p);
969
- var v, k = t.sqrt(t.pow(c - y, 2) + t.pow(m - o, 2) + t.pow(l - d, 2)), C = t.sqrt(t.pow(f - y, 2) + t.pow(p - o, 2) + t.pow(u - d, 2)), A = t.sqrt(t.pow(f - c, 2) + t.pow(p - m, 2) + t.pow(u - l, 2));
970
- return (v = k > C ? k > A ? k - C - A : A - C - k : A > C ? A - C - k : C - k - A) > -1e-4 && v < 1e-4;
971
- } };
972
- }(), ae = Jt, Ys = Math.abs;
973
- function Xs(t, e) {
974
- var s, i = this.offsetTime;
975
- this.propType === "multidimensional" && (s = ht("float32", this.pv.length));
976
- for (var a, r, h, n, g, y, o, d, c, m = e.lastIndex, l = m, f = this.keyframes.length - 1, p = !0; p; ) {
977
- if (a = this.keyframes[l], r = this.keyframes[l + 1], l === f - 1 && t >= r.t - i) {
978
- a.h && (a = r), m = 0;
979
- break;
980
- }
981
- if (r.t - i > t) {
982
- m = l;
983
- break;
984
- }
985
- l < f - 1 ? l += 1 : (m = 0, p = !1);
986
- }
987
- h = this.keyframesMetadata[l] || {};
988
- var u, v, k, C, A, F, I, x, T, M, _ = r.t - i, D = a.t - i;
989
- if (a.to) {
990
- h.bezierData || (h.bezierData = Rt.buildBezierData(a.s, r.s || a.e, a.to, a.ti));
991
- var w = h.bezierData;
992
- if (t >= _ || t < D) {
993
- var P = t >= _ ? w.points.length - 1 : 0;
994
- for (g = w.points[P].point.length, n = 0; n < g; n += 1) s[n] = w.points[P].point[n];
995
- } else {
996
- h.__fnct ? c = h.__fnct : (c = ke.getBezierEasing(a.o.x, a.o.y, a.i.x, a.i.y, a.n).get, h.__fnct = c), y = c((t - D) / (_ - D));
997
- var V, O = w.segmentLength * y, B = e.lastFrame < t && e._lastKeyframeIndex === l ? e._lastAddedLength : 0;
998
- for (d = e.lastFrame < t && e._lastKeyframeIndex === l ? e._lastPoint : 0, p = !0, o = w.points.length; p; ) {
999
- if (B += w.points[d].partialLength, O === 0 || y === 0 || d === w.points.length - 1) {
1000
- for (g = w.points[d].point.length, n = 0; n < g; n += 1) s[n] = w.points[d].point[n];
1001
- break;
1002
- }
1003
- if (O >= B && O < B + w.points[d + 1].partialLength) {
1004
- for (V = (O - B) / w.points[d + 1].partialLength, g = w.points[d].point.length, n = 0; n < g; n += 1) s[n] = w.points[d].point[n] + (w.points[d + 1].point[n] - w.points[d].point[n]) * V;
1005
- break;
1006
- }
1007
- d < o - 1 ? d += 1 : p = !1;
1008
- }
1009
- e._lastPoint = d, e._lastAddedLength = B - w.points[d].partialLength, e._lastKeyframeIndex = l;
1010
- }
1011
- } else {
1012
- var b, S, L, N, U;
1013
- if (f = a.s.length, u = r.s || a.e, this.sh && a.h !== 1) if (t >= _) s[0] = u[0], s[1] = u[1], s[2] = u[2];
1014
- else if (t <= D) s[0] = a.s[0], s[1] = a.s[1], s[2] = a.s[2];
1015
- else {
1016
- var $ = Hs(a.s), Q = Hs(u);
1017
- v = s, k = function(J, tt, j) {
1018
- var Y, ct, bt, rt, nt, at = [], q = J[0], Ht = J[1], Gt = J[2], jt = J[3], _t = tt[0], kt = tt[1], ot = tt[2], St = tt[3];
1019
- return (ct = q * _t + Ht * kt + Gt * ot + jt * St) < 0 && (ct = -ct, _t = -_t, kt = -kt, ot = -ot, St = -St), 1 - ct > 1e-6 ? (Y = Math.acos(ct), bt = Math.sin(Y), rt = Math.sin((1 - j) * Y) / bt, nt = Math.sin(j * Y) / bt) : (rt = 1 - j, nt = j), at[0] = rt * q + nt * _t, at[1] = rt * Ht + nt * kt, at[2] = rt * Gt + nt * ot, at[3] = rt * jt + nt * St, at;
1020
- }($, Q, (t - D) / (_ - D)), C = k[0], A = k[1], F = k[2], I = k[3], x = Math.atan2(2 * A * I - 2 * C * F, 1 - 2 * A * A - 2 * F * F), T = Math.asin(2 * C * A + 2 * F * I), M = Math.atan2(2 * C * I - 2 * A * F, 1 - 2 * C * C - 2 * F * F), v[0] = x / et, v[1] = T / et, v[2] = M / et;
1021
- }
1022
- else for (l = 0; l < f; l += 1) a.h !== 1 && (t >= _ ? y = 1 : t < D ? y = 0 : (a.o.x.constructor === Array ? (h.__fnct || (h.__fnct = []), h.__fnct[l] ? c = h.__fnct[l] : (b = a.o.x[l] === void 0 ? a.o.x[0] : a.o.x[l], S = a.o.y[l] === void 0 ? a.o.y[0] : a.o.y[l], L = a.i.x[l] === void 0 ? a.i.x[0] : a.i.x[l], N = a.i.y[l] === void 0 ? a.i.y[0] : a.i.y[l], c = ke.getBezierEasing(b, S, L, N).get, h.__fnct[l] = c)) : h.__fnct ? c = h.__fnct : (b = a.o.x, S = a.o.y, L = a.i.x, N = a.i.y, c = ke.getBezierEasing(b, S, L, N).get, a.keyframeMetadata = c), y = c((t - D) / (_ - D)))), u = r.s || a.e, U = a.h === 1 ? a.s[l] : a.s[l] + (u[l] - a.s[l]) * y, this.propType === "multidimensional" ? s[l] = U : s = U;
1023
- }
1024
- return e.lastIndex = m, s;
1025
- }
1026
- function Hs(t) {
1027
- var e = t[0] * et, s = t[1] * et, i = t[2] * et, a = Math.cos(e / 2), r = Math.cos(s / 2), h = Math.cos(i / 2), n = Math.sin(e / 2), g = Math.sin(s / 2), y = Math.sin(i / 2);
1028
- return [n * g * h + a * r * y, n * r * h + a * g * y, a * g * h - n * r * y, a * r * h - n * g * y];
1029
- }
1030
- function Gs() {
1031
- var t = this.comp.renderedFrame - this.offsetTime, e = this.keyframes[0].t - this.offsetTime, s = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
1032
- if (!(t === this._caching.lastFrame || this._caching.lastFrame !== ae && (this._caching.lastFrame >= s && t >= s || this._caching.lastFrame < e && t < e))) {
1033
- this._caching.lastFrame >= t && (this._caching._lastKeyframeIndex = -1, this._caching.lastIndex = 0);
1034
- var i = this.interpolateValue(t, this._caching);
1035
- this.pv = i;
1036
- }
1037
- return this._caching.lastFrame = t, this.pv;
1038
- }
1039
- function je(t) {
1040
- var e;
1041
- if (this.propType === "unidimensional") e = t * this.mult, Ys(this.v - e) > 1e-5 && (this.v = e, this._mdf = !0);
1042
- else for (var s = 0, i = this.v.length; s < i; ) e = t[s] * this.mult, Ys(this.v[s] - e) > 1e-5 && (this.v[s] = e, this._mdf = !0), s += 1;
1043
- }
1044
- function Je() {
1045
- if (this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length) if (this.lock) this.setVValue(this.pv);
1046
- else {
1047
- var t;
1048
- this.lock = !0, this._mdf = this._isFirstFrame;
1049
- var e = this.effectsSequence.length, s = this.kf ? this.pv : this.data.k;
1050
- for (t = 0; t < e; t += 1) s = this.effectsSequence[t](s);
1051
- this.setVValue(s), this._isFirstFrame = !1, this.lock = !1, this.frameId = this.elem.globalData.frameId;
1052
- }
1053
- }
1054
- function Ye(t) {
1055
- this.effectsSequence.push(t), this.container.addDynamicProperty(this);
1056
- }
1057
- function Ni(t, e, s, i) {
1058
- this.propType = "unidimensional", this.mult = s || 1, this.data = e, this.v = s ? e.k * s : e.k, this.pv = e.k, this._mdf = !1, this.elem = t, this.container = i, this.comp = t.comp, this.k = !1, this.kf = !1, this.vel = 0, this.effectsSequence = [], this._isFirstFrame = !0, this.getValue = Je, this.setVValue = je, this.addEffect = Ye;
1059
- }
1060
- function qi(t, e, s, i) {
1061
- var a;
1062
- this.propType = "multidimensional", this.mult = s || 1, this.data = e, this._mdf = !1, this.elem = t, this.container = i, this.comp = t.comp, this.k = !1, this.kf = !1, this.frameId = -1;
1063
- var r = e.k.length;
1064
- for (this.v = ht("float32", r), this.pv = ht("float32", r), this.vel = ht("float32", r), a = 0; a < r; a += 1) this.v[a] = e.k[a] * this.mult, this.pv[a] = e.k[a];
1065
- this._isFirstFrame = !0, this.effectsSequence = [], this.getValue = Je, this.setVValue = je, this.addEffect = Ye;
1066
- }
1067
- function Bi(t, e, s, i) {
1068
- this.propType = "unidimensional", this.keyframes = e.k, this.keyframesMetadata = [], this.offsetTime = t.data.st, this.frameId = -1, this._caching = { lastFrame: ae, lastIndex: 0, value: 0, _lastKeyframeIndex: -1 }, this.k = !0, this.kf = !0, this.data = e, this.mult = s || 1, this.elem = t, this.container = i, this.comp = t.comp, this.v = ae, this.pv = ae, this._isFirstFrame = !0, this.getValue = Je, this.setVValue = je, this.interpolateValue = Xs, this.effectsSequence = [Gs.bind(this)], this.addEffect = Ye;
1069
- }
1070
- function Wi(t, e, s, i) {
1071
- var a;
1072
- this.propType = "multidimensional";
1073
- var r, h, n, g, y = e.k.length;
1074
- for (a = 0; a < y - 1; a += 1) e.k[a].to && e.k[a].s && e.k[a + 1] && e.k[a + 1].s && (r = e.k[a].s, h = e.k[a + 1].s, n = e.k[a].to, g = e.k[a].ti, (r.length === 2 && (r[0] !== h[0] || r[1] !== h[1]) && Rt.pointOnLine2D(r[0], r[1], h[0], h[1], r[0] + n[0], r[1] + n[1]) && Rt.pointOnLine2D(r[0], r[1], h[0], h[1], h[0] + g[0], h[1] + g[1]) || r.length === 3 && (r[0] !== h[0] || r[1] !== h[1] || r[2] !== h[2]) && Rt.pointOnLine3D(r[0], r[1], r[2], h[0], h[1], h[2], r[0] + n[0], r[1] + n[1], r[2] + n[2]) && Rt.pointOnLine3D(r[0], r[1], r[2], h[0], h[1], h[2], h[0] + g[0], h[1] + g[1], h[2] + g[2])) && (e.k[a].to = null, e.k[a].ti = null), r[0] === h[0] && r[1] === h[1] && n[0] === 0 && n[1] === 0 && g[0] === 0 && g[1] === 0 && (r.length === 2 || r[2] === h[2] && n[2] === 0 && g[2] === 0) && (e.k[a].to = null, e.k[a].ti = null));
1075
- this.effectsSequence = [Gs.bind(this)], this.data = e, this.keyframes = e.k, this.keyframesMetadata = [], this.offsetTime = t.data.st, this.k = !0, this.kf = !0, this._isFirstFrame = !0, this.mult = s || 1, this.elem = t, this.container = i, this.comp = t.comp, this.getValue = Je, this.setVValue = je, this.interpolateValue = Xs, this.frameId = -1;
1076
- var o = e.k[0].s.length;
1077
- for (this.v = ht("float32", o), this.pv = ht("float32", o), a = 0; a < o; a += 1) this.v[a] = ae, this.pv[a] = ae;
1078
- this._caching = { lastFrame: ae, lastIndex: 0, value: ht("float32", o) }, this.addEffect = Ye;
1079
- }
1080
- var E = { getProp: function(t, e, s, i, a) {
1081
- var r;
1082
- if (e.sid && (e = t.globalData.slotManager.getProp(e)), e.k.length) if (typeof e.k[0] == "number") r = new qi(t, e, i, a);
1083
- else switch (s) {
1084
- case 0:
1085
- r = new Bi(t, e, i, a);
1086
- break;
1087
- case 1:
1088
- r = new Wi(t, e, i, a);
1089
- }
1090
- else r = new Ni(t, e, i, a);
1091
- return r.effectsSequence.length && a.addDynamicProperty(r), r;
1092
- } };
1093
- function ut() {
1094
- }
1095
- ut.prototype = { addDynamicProperty: function(t) {
1096
- this.dynamicProperties.indexOf(t) === -1 && (this.dynamicProperties.push(t), this.container.addDynamicProperty(this), this._isAnimated = !0);
1097
- }, iterateDynamicProperties: function() {
1098
- var t;
1099
- this._mdf = !1;
1100
- var e = this.dynamicProperties.length;
1101
- for (t = 0; t < e; t += 1) this.dynamicProperties[t].getValue(), this.dynamicProperties[t]._mdf && (this._mdf = !0);
1102
- }, initDynamicPropertyContainer: function(t) {
1103
- this.container = t, this.dynamicProperties = [], this._mdf = !1, this._isAnimated = !1;
1104
- } };
1105
- var re = We(8, function() {
1106
- return ht("float32", 2);
1107
- });
1108
- function Yt() {
1109
- this.c = !1, this._length = 0, this._maxLength = 8, this.v = K(this._maxLength), this.o = K(this._maxLength), this.i = K(this._maxLength);
1110
- }
1111
- Yt.prototype.setPathData = function(t, e) {
1112
- this.c = t, this.setLength(e);
1113
- for (var s = 0; s < e; ) this.v[s] = re.newElement(), this.o[s] = re.newElement(), this.i[s] = re.newElement(), s += 1;
1114
- }, Yt.prototype.setLength = function(t) {
1115
- for (; this._maxLength < t; ) this.doubleArrayLength();
1116
- this._length = t;
1117
- }, Yt.prototype.doubleArrayLength = function() {
1118
- this.v = this.v.concat(K(this._maxLength)), this.i = this.i.concat(K(this._maxLength)), this.o = this.o.concat(K(this._maxLength)), this._maxLength *= 2;
1119
- }, Yt.prototype.setXYAt = function(t, e, s, i, a) {
1120
- var r;
1121
- switch (this._length = Math.max(this._length, i + 1), this._length >= this._maxLength && this.doubleArrayLength(), s) {
1122
- case "v":
1123
- r = this.v;
1124
- break;
1125
- case "i":
1126
- r = this.i;
1127
- break;
1128
- case "o":
1129
- r = this.o;
1130
- break;
1131
- default:
1132
- r = [];
1133
- }
1134
- (!r[i] || r[i] && !a) && (r[i] = re.newElement()), r[i][0] = t, r[i][1] = e;
1135
- }, Yt.prototype.setTripleAt = function(t, e, s, i, a, r, h, n) {
1136
- this.setXYAt(t, e, "v", h, n), this.setXYAt(s, i, "o", h, n), this.setXYAt(a, r, "i", h, n);
1137
- }, Yt.prototype.reverse = function() {
1138
- var t = new Yt();
1139
- t.setPathData(this.c, this._length);
1140
- var e = this.v, s = this.o, i = this.i, a = 0;
1141
- this.c && (t.setTripleAt(e[0][0], e[0][1], i[0][0], i[0][1], s[0][0], s[0][1], 0, !1), a = 1);
1142
- var r, h = this._length - 1, n = this._length;
1143
- for (r = a; r < n; r += 1) t.setTripleAt(e[h][0], e[h][1], i[h][0], i[h][1], s[h][0], s[h][1], r, !1), h -= 1;
1144
- return t;
1145
- }, Yt.prototype.length = function() {
1146
- return this._length;
1147
- };
1148
- var hs, yt = ((hs = We(4, function() {
1149
- return new Yt();
1150
- }, function(t) {
1151
- var e, s = t._length;
1152
- for (e = 0; e < s; e += 1) re.release(t.v[e]), re.release(t.i[e]), re.release(t.o[e]), t.v[e] = null, t.i[e] = null, t.o[e] = null;
1153
- t._length = 0, t.c = !1;
1154
- })).clone = function(t) {
1155
- var e, s = hs.newElement(), i = t._length === void 0 ? t.v.length : t._length;
1156
- for (s.setLength(i), s.c = t.c, e = 0; e < i; e += 1) s.setTripleAt(t.v[e][0], t.v[e][1], t.o[e][0], t.o[e][1], t.i[e][0], t.i[e][1], e);
1157
- return s;
1158
- }, hs);
1159
- function ls() {
1160
- this._length = 0, this._maxLength = 4, this.shapes = K(this._maxLength);
1161
- }
1162
- ls.prototype.addShape = function(t) {
1163
- this._length === this._maxLength && (this.shapes = this.shapes.concat(K(this._maxLength)), this._maxLength *= 2), this.shapes[this._length] = t, this._length += 1;
1164
- }, ls.prototype.releaseShapes = function() {
1165
- var t;
1166
- for (t = 0; t < this._length; t += 1) yt.release(this.shapes[t]);
1167
- this._length = 0;
1168
- };
1169
- var Ks, fe, ps, Pe, ce = (Ks = { newShapeCollection: function() {
1170
- return fe ? Pe[fe -= 1] : new ls();
1171
- }, release: function(t) {
1172
- var e, s = t._length;
1173
- for (e = 0; e < s; e += 1) yt.release(t.shapes[e]);
1174
- t._length = 0, fe === ps && (Pe = Ws.double(Pe), ps *= 2), Pe[fe] = t, fe += 1;
1175
- } }, fe = 0, Pe = K(ps = 4), Ks), de = function() {
1176
- var t = -999999;
1177
- function e(m, l, f) {
1178
- var p, u, v, k, C, A, F, I, x, T = f.lastIndex, M = this.keyframes;
1179
- if (m < M[0].t - this.offsetTime) p = M[0].s[0], v = !0, T = 0;
1180
- else if (m >= M[M.length - 1].t - this.offsetTime) p = M[M.length - 1].s ? M[M.length - 1].s[0] : M[M.length - 2].e[0], v = !0;
1181
- else {
1182
- for (var _, D, w, P = T, V = M.length - 1, O = !0; O && (_ = M[P], !((D = M[P + 1]).t - this.offsetTime > m)); ) P < V - 1 ? P += 1 : O = !1;
1183
- if (w = this.keyframesMetadata[P] || {}, T = P, !(v = _.h === 1)) {
1184
- if (m >= D.t - this.offsetTime) I = 1;
1185
- else if (m < _.t - this.offsetTime) I = 0;
1186
- else {
1187
- var B;
1188
- w.__fnct ? B = w.__fnct : (B = ke.getBezierEasing(_.o.x, _.o.y, _.i.x, _.i.y).get, w.__fnct = B), I = B((m - (_.t - this.offsetTime)) / (D.t - this.offsetTime - (_.t - this.offsetTime)));
1189
- }
1190
- u = D.s ? D.s[0] : _.e[0];
1191
- }
1192
- p = _.s[0];
1193
- }
1194
- for (A = l._length, F = p.i[0].length, f.lastIndex = T, k = 0; k < A; k += 1) for (C = 0; C < F; C += 1) x = v ? p.i[k][C] : p.i[k][C] + (u.i[k][C] - p.i[k][C]) * I, l.i[k][C] = x, x = v ? p.o[k][C] : p.o[k][C] + (u.o[k][C] - p.o[k][C]) * I, l.o[k][C] = x, x = v ? p.v[k][C] : p.v[k][C] + (u.v[k][C] - p.v[k][C]) * I, l.v[k][C] = x;
1195
- }
1196
- function s() {
1197
- var m = this.comp.renderedFrame - this.offsetTime, l = this.keyframes[0].t - this.offsetTime, f = this.keyframes[this.keyframes.length - 1].t - this.offsetTime, p = this._caching.lastFrame;
1198
- return p !== t && (p < l && m < l || p > f && m > f) || (this._caching.lastIndex = p < m ? this._caching.lastIndex : 0, this.interpolateShape(m, this.pv, this._caching)), this._caching.lastFrame = m, this.pv;
1199
- }
1200
- function i() {
1201
- this.paths = this.localShapeCollection;
1202
- }
1203
- function a(m) {
1204
- (function(l, f) {
1205
- if (l._length !== f._length || l.c !== f.c) return !1;
1206
- var p, u = l._length;
1207
- for (p = 0; p < u; p += 1) if (l.v[p][0] !== f.v[p][0] || l.v[p][1] !== f.v[p][1] || l.o[p][0] !== f.o[p][0] || l.o[p][1] !== f.o[p][1] || l.i[p][0] !== f.i[p][0] || l.i[p][1] !== f.i[p][1]) return !1;
1208
- return !0;
1209
- })(this.v, m) || (this.v = yt.clone(m), this.localShapeCollection.releaseShapes(), this.localShapeCollection.addShape(this.v), this._mdf = !0, this.paths = this.localShapeCollection);
1210
- }
1211
- function r() {
1212
- if (this.elem.globalData.frameId !== this.frameId) if (this.effectsSequence.length) if (this.lock) this.setVValue(this.pv);
1213
- else {
1214
- var m, l;
1215
- this.lock = !0, this._mdf = !1, m = this.kf ? this.pv : this.data.ks ? this.data.ks.k : this.data.pt.k;
1216
- var f = this.effectsSequence.length;
1217
- for (l = 0; l < f; l += 1) m = this.effectsSequence[l](m);
1218
- this.setVValue(m), this.lock = !1, this.frameId = this.elem.globalData.frameId;
1219
- }
1220
- else this._mdf = !1;
1221
- }
1222
- function h(m, l, f) {
1223
- this.propType = "shape", this.comp = m.comp, this.container = m, this.elem = m, this.data = l, this.k = !1, this.kf = !1, this._mdf = !1;
1224
- var p = f === 3 ? l.pt.k : l.ks.k;
1225
- this.v = yt.clone(p), this.pv = yt.clone(this.v), this.localShapeCollection = ce.newShapeCollection(), this.paths = this.localShapeCollection, this.paths.addShape(this.v), this.reset = i, this.effectsSequence = [];
1226
- }
1227
- function n(m) {
1228
- this.effectsSequence.push(m), this.container.addDynamicProperty(this);
1229
- }
1230
- function g(m, l, f) {
1231
- this.propType = "shape", this.comp = m.comp, this.elem = m, this.container = m, this.offsetTime = m.data.st, this.keyframes = f === 3 ? l.pt.k : l.ks.k, this.keyframesMetadata = [], this.k = !0, this.kf = !0;
1232
- var p = this.keyframes[0].s[0].i.length;
1233
- this.v = yt.newElement(), this.v.setPathData(this.keyframes[0].s[0].c, p), this.pv = yt.clone(this.v), this.localShapeCollection = ce.newShapeCollection(), this.paths = this.localShapeCollection, this.paths.addShape(this.v), this.lastFrame = t, this.reset = i, this._caching = { lastFrame: t, lastIndex: 0 }, this.effectsSequence = [s.bind(this)];
1234
- }
1235
- h.prototype.interpolateShape = e, h.prototype.getValue = r, h.prototype.setVValue = a, h.prototype.addEffect = n, g.prototype.getValue = r, g.prototype.interpolateShape = e, g.prototype.setVValue = a, g.prototype.addEffect = n;
1236
- var y = function() {
1237
- var m = Kt;
1238
- function l(f, p) {
1239
- this.v = yt.newElement(), this.v.setPathData(!0, 4), this.localShapeCollection = ce.newShapeCollection(), this.paths = this.localShapeCollection, this.localShapeCollection.addShape(this.v), this.d = p.d, this.elem = f, this.comp = f.comp, this.frameId = -1, this.initDynamicPropertyContainer(f), this.p = E.getProp(f, p.p, 1, 0, this), this.s = E.getProp(f, p.s, 1, 0, this), this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertEllToPath());
1240
- }
1241
- return l.prototype = { reset: i, getValue: function() {
1242
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertEllToPath());
1243
- }, convertEllToPath: function() {
1244
- var f = this.p.v[0], p = this.p.v[1], u = this.s.v[0] / 2, v = this.s.v[1] / 2, k = this.d !== 3, C = this.v;
1245
- C.v[0][0] = f, C.v[0][1] = p - v, C.v[1][0] = k ? f + u : f - u, C.v[1][1] = p, C.v[2][0] = f, C.v[2][1] = p + v, C.v[3][0] = k ? f - u : f + u, C.v[3][1] = p, C.i[0][0] = k ? f - u * m : f + u * m, C.i[0][1] = p - v, C.i[1][0] = k ? f + u : f - u, C.i[1][1] = p - v * m, C.i[2][0] = k ? f + u * m : f - u * m, C.i[2][1] = p + v, C.i[3][0] = k ? f - u : f + u, C.i[3][1] = p + v * m, C.o[0][0] = k ? f + u * m : f - u * m, C.o[0][1] = p - v, C.o[1][0] = k ? f + u : f - u, C.o[1][1] = p + v * m, C.o[2][0] = k ? f - u * m : f + u * m, C.o[2][1] = p + v, C.o[3][0] = k ? f - u : f + u, C.o[3][1] = p - v * m;
1246
- } }, W([ut], l), l;
1247
- }(), o = function() {
1248
- function m(l, f) {
1249
- this.v = yt.newElement(), this.v.setPathData(!0, 0), this.elem = l, this.comp = l.comp, this.data = f, this.frameId = -1, this.d = f.d, this.initDynamicPropertyContainer(l), f.sy === 1 ? (this.ir = E.getProp(l, f.ir, 0, 0, this), this.is = E.getProp(l, f.is, 0, 0.01, this), this.convertToPath = this.convertStarToPath) : this.convertToPath = this.convertPolygonToPath, this.pt = E.getProp(l, f.pt, 0, 0, this), this.p = E.getProp(l, f.p, 1, 0, this), this.r = E.getProp(l, f.r, 0, et, this), this.or = E.getProp(l, f.or, 0, 0, this), this.os = E.getProp(l, f.os, 0, 0.01, this), this.localShapeCollection = ce.newShapeCollection(), this.localShapeCollection.addShape(this.v), this.paths = this.localShapeCollection, this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertToPath());
1250
- }
1251
- return m.prototype = { reset: i, getValue: function() {
1252
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertToPath());
1253
- }, convertStarToPath: function() {
1254
- var l, f, p, u, v = 2 * Math.floor(this.pt.v), k = 2 * Math.PI / v, C = !0, A = this.or.v, F = this.ir.v, I = this.os.v, x = this.is.v, T = 2 * Math.PI * A / (2 * v), M = 2 * Math.PI * F / (2 * v), _ = -Math.PI / 2;
1255
- _ += this.r.v;
1256
- var D = this.data.d === 3 ? -1 : 1;
1257
- for (this.v._length = 0, l = 0; l < v; l += 1) {
1258
- p = C ? I : x, u = C ? T : M;
1259
- var w = (f = C ? A : F) * Math.cos(_), P = f * Math.sin(_), V = w === 0 && P === 0 ? 0 : P / Math.sqrt(w * w + P * P), O = w === 0 && P === 0 ? 0 : -w / Math.sqrt(w * w + P * P);
1260
- w += +this.p.v[0], P += +this.p.v[1], this.v.setTripleAt(w, P, w - V * u * p * D, P - O * u * p * D, w + V * u * p * D, P + O * u * p * D, l, !0), C = !C, _ += k * D;
1261
- }
1262
- }, convertPolygonToPath: function() {
1263
- var l, f = Math.floor(this.pt.v), p = 2 * Math.PI / f, u = this.or.v, v = this.os.v, k = 2 * Math.PI * u / (4 * f), C = 0.5 * -Math.PI, A = this.data.d === 3 ? -1 : 1;
1264
- for (C += this.r.v, this.v._length = 0, l = 0; l < f; l += 1) {
1265
- var F = u * Math.cos(C), I = u * Math.sin(C), x = F === 0 && I === 0 ? 0 : I / Math.sqrt(F * F + I * I), T = F === 0 && I === 0 ? 0 : -F / Math.sqrt(F * F + I * I);
1266
- F += +this.p.v[0], I += +this.p.v[1], this.v.setTripleAt(F, I, F - x * k * v * A, I - T * k * v * A, F + x * k * v * A, I + T * k * v * A, l, !0), C += p * A;
1267
- }
1268
- this.paths.length = 0, this.paths[0] = this.v;
1269
- } }, W([ut], m), m;
1270
- }(), d = function() {
1271
- function m(l, f) {
1272
- this.v = yt.newElement(), this.v.c = !0, this.localShapeCollection = ce.newShapeCollection(), this.localShapeCollection.addShape(this.v), this.paths = this.localShapeCollection, this.elem = l, this.comp = l.comp, this.frameId = -1, this.d = f.d, this.initDynamicPropertyContainer(l), this.p = E.getProp(l, f.p, 1, 0, this), this.s = E.getProp(l, f.s, 1, 0, this), this.r = E.getProp(l, f.r, 0, 0, this), this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertRectToPath());
1273
- }
1274
- return m.prototype = { convertRectToPath: function() {
1275
- var l = this.p.v[0], f = this.p.v[1], p = this.s.v[0] / 2, u = this.s.v[1] / 2, v = Li(p, u, this.r.v), k = v * (1 - Kt);
1276
- this.v._length = 0, this.d === 2 || this.d === 1 ? (this.v.setTripleAt(l + p, f - u + v, l + p, f - u + v, l + p, f - u + k, 0, !0), this.v.setTripleAt(l + p, f + u - v, l + p, f + u - k, l + p, f + u - v, 1, !0), v !== 0 ? (this.v.setTripleAt(l + p - v, f + u, l + p - v, f + u, l + p - k, f + u, 2, !0), this.v.setTripleAt(l - p + v, f + u, l - p + k, f + u, l - p + v, f + u, 3, !0), this.v.setTripleAt(l - p, f + u - v, l - p, f + u - v, l - p, f + u - k, 4, !0), this.v.setTripleAt(l - p, f - u + v, l - p, f - u + k, l - p, f - u + v, 5, !0), this.v.setTripleAt(l - p + v, f - u, l - p + v, f - u, l - p + k, f - u, 6, !0), this.v.setTripleAt(l + p - v, f - u, l + p - k, f - u, l + p - v, f - u, 7, !0)) : (this.v.setTripleAt(l - p, f + u, l - p + k, f + u, l - p, f + u, 2), this.v.setTripleAt(l - p, f - u, l - p, f - u + k, l - p, f - u, 3))) : (this.v.setTripleAt(l + p, f - u + v, l + p, f - u + k, l + p, f - u + v, 0, !0), v !== 0 ? (this.v.setTripleAt(l + p - v, f - u, l + p - v, f - u, l + p - k, f - u, 1, !0), this.v.setTripleAt(l - p + v, f - u, l - p + k, f - u, l - p + v, f - u, 2, !0), this.v.setTripleAt(l - p, f - u + v, l - p, f - u + v, l - p, f - u + k, 3, !0), this.v.setTripleAt(l - p, f + u - v, l - p, f + u - k, l - p, f + u - v, 4, !0), this.v.setTripleAt(l - p + v, f + u, l - p + v, f + u, l - p + k, f + u, 5, !0), this.v.setTripleAt(l + p - v, f + u, l + p - k, f + u, l + p - v, f + u, 6, !0), this.v.setTripleAt(l + p, f + u - v, l + p, f + u - v, l + p, f + u - k, 7, !0)) : (this.v.setTripleAt(l - p, f - u, l - p + k, f - u, l - p, f - u, 1, !0), this.v.setTripleAt(l - p, f + u, l - p, f + u - k, l - p, f + u, 2, !0), this.v.setTripleAt(l + p, f + u, l + p - k, f + u, l + p, f + u, 3, !0)));
1277
- }, getValue: function() {
1278
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertRectToPath());
1279
- }, reset: i }, W([ut], m), m;
1280
- }(), c = { getShapeProp: function(m, l, f) {
1281
- var p;
1282
- return f === 3 || f === 4 ? p = (f === 3 ? l.pt : l.ks).k.length ? new g(m, l, f) : new h(m, l, f) : f === 5 ? p = new d(m, l) : f === 6 ? p = new y(m, l) : f === 7 && (p = new o(m, l)), p.k && m.addDynamicProperty(p), p;
1283
- }, getConstructorFunction: function() {
1284
- return h;
1285
- }, getKeyframedConstructorFunction: function() {
1286
- return g;
1287
- } };
1288
- return c;
1289
- }(), st = /* @__PURE__ */ function() {
1290
- var t = Math.cos, e = Math.sin, s = Math.tan, i = Math.round;
1291
- function a() {
1292
- return this.props[0] = 1, this.props[1] = 0, this.props[2] = 0, this.props[3] = 0, this.props[4] = 0, this.props[5] = 1, this.props[6] = 0, this.props[7] = 0, this.props[8] = 0, this.props[9] = 0, this.props[10] = 1, this.props[11] = 0, this.props[12] = 0, this.props[13] = 0, this.props[14] = 0, this.props[15] = 1, this;
1293
- }
1294
- function r(b) {
1295
- if (b === 0) return this;
1296
- var S = t(b), L = e(b);
1297
- return this._t(S, -L, 0, 0, L, S, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1298
- }
1299
- function h(b) {
1300
- if (b === 0) return this;
1301
- var S = t(b), L = e(b);
1302
- return this._t(1, 0, 0, 0, 0, S, -L, 0, 0, L, S, 0, 0, 0, 0, 1);
1303
- }
1304
- function n(b) {
1305
- if (b === 0) return this;
1306
- var S = t(b), L = e(b);
1307
- return this._t(S, 0, L, 0, 0, 1, 0, 0, -L, 0, S, 0, 0, 0, 0, 1);
1308
- }
1309
- function g(b) {
1310
- if (b === 0) return this;
1311
- var S = t(b), L = e(b);
1312
- return this._t(S, -L, 0, 0, L, S, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1313
- }
1314
- function y(b, S) {
1315
- return this._t(1, S, b, 1, 0, 0);
1316
- }
1317
- function o(b, S) {
1318
- return this.shear(s(b), s(S));
1319
- }
1320
- function d(b, S) {
1321
- var L = t(S), N = e(S);
1322
- return this._t(L, N, 0, 0, -N, L, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, s(b), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(L, -N, 0, 0, N, L, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1323
- }
1324
- function c(b, S, L) {
1325
- return L || L === 0 || (L = 1), b === 1 && S === 1 && L === 1 ? this : this._t(b, 0, 0, 0, 0, S, 0, 0, 0, 0, L, 0, 0, 0, 0, 1);
1326
- }
1327
- function m(b, S, L, N, U, $, Q, J, tt, j, Y, ct, bt, rt, nt, at) {
1328
- return this.props[0] = b, this.props[1] = S, this.props[2] = L, this.props[3] = N, this.props[4] = U, this.props[5] = $, this.props[6] = Q, this.props[7] = J, this.props[8] = tt, this.props[9] = j, this.props[10] = Y, this.props[11] = ct, this.props[12] = bt, this.props[13] = rt, this.props[14] = nt, this.props[15] = at, this;
1329
- }
1330
- function l(b, S, L) {
1331
- return L = L || 0, b !== 0 || S !== 0 || L !== 0 ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, b, S, L, 1) : this;
1332
- }
1333
- function f(b, S, L, N, U, $, Q, J, tt, j, Y, ct, bt, rt, nt, at) {
1334
- var q = this.props;
1335
- if (b === 1 && S === 0 && L === 0 && N === 0 && U === 0 && $ === 1 && Q === 0 && J === 0 && tt === 0 && j === 0 && Y === 1 && ct === 0) return q[12] = q[12] * b + q[15] * bt, q[13] = q[13] * $ + q[15] * rt, q[14] = q[14] * Y + q[15] * nt, q[15] *= at, this._identityCalculated = !1, this;
1336
- var Ht = q[0], Gt = q[1], jt = q[2], _t = q[3], kt = q[4], ot = q[5], St = q[6], ee = q[7], Et = q[8], se = q[9], Lt = q[10], pe = q[11], ts = q[12], es = q[13], ss = q[14], is = q[15];
1337
- return q[0] = Ht * b + Gt * U + jt * tt + _t * bt, q[1] = Ht * S + Gt * $ + jt * j + _t * rt, q[2] = Ht * L + Gt * Q + jt * Y + _t * nt, q[3] = Ht * N + Gt * J + jt * ct + _t * at, q[4] = kt * b + ot * U + St * tt + ee * bt, q[5] = kt * S + ot * $ + St * j + ee * rt, q[6] = kt * L + ot * Q + St * Y + ee * nt, q[7] = kt * N + ot * J + St * ct + ee * at, q[8] = Et * b + se * U + Lt * tt + pe * bt, q[9] = Et * S + se * $ + Lt * j + pe * rt, q[10] = Et * L + se * Q + Lt * Y + pe * nt, q[11] = Et * N + se * J + Lt * ct + pe * at, q[12] = ts * b + es * U + ss * tt + is * bt, q[13] = ts * S + es * $ + ss * j + is * rt, q[14] = ts * L + es * Q + ss * Y + is * nt, q[15] = ts * N + es * J + ss * ct + is * at, this._identityCalculated = !1, this;
1338
- }
1339
- function p(b) {
1340
- var S = b.props;
1341
- return this.transform(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], S[8], S[9], S[10], S[11], S[12], S[13], S[14], S[15]);
1342
- }
1343
- function u() {
1344
- return this._identityCalculated || (this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1), this._identityCalculated = !0), this._identity;
1345
- }
1346
- function v(b) {
1347
- for (var S = 0; S < 16; ) {
1348
- if (b.props[S] !== this.props[S]) return !1;
1349
- S += 1;
1350
- }
1351
- return !0;
1352
- }
1353
- function k(b) {
1354
- var S;
1355
- for (S = 0; S < 16; S += 1) b.props[S] = this.props[S];
1356
- return b;
1357
- }
1358
- function C(b) {
1359
- var S;
1360
- for (S = 0; S < 16; S += 1) this.props[S] = b[S];
1361
- }
1362
- function A(b, S, L) {
1363
- return { x: b * this.props[0] + S * this.props[4] + L * this.props[8] + this.props[12], y: b * this.props[1] + S * this.props[5] + L * this.props[9] + this.props[13], z: b * this.props[2] + S * this.props[6] + L * this.props[10] + this.props[14] };
1364
- }
1365
- function F(b, S, L) {
1366
- return b * this.props[0] + S * this.props[4] + L * this.props[8] + this.props[12];
1367
- }
1368
- function I(b, S, L) {
1369
- return b * this.props[1] + S * this.props[5] + L * this.props[9] + this.props[13];
1370
- }
1371
- function x(b, S, L) {
1372
- return b * this.props[2] + S * this.props[6] + L * this.props[10] + this.props[14];
1373
- }
1374
- function T() {
1375
- var b = this.props[0] * this.props[5] - this.props[1] * this.props[4], S = this.props[5] / b, L = -this.props[1] / b, N = -this.props[4] / b, U = this.props[0] / b, $ = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / b, Q = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / b, J = new st();
1376
- return J.props[0] = S, J.props[1] = L, J.props[4] = N, J.props[5] = U, J.props[12] = $, J.props[13] = Q, J;
1377
- }
1378
- function M(b) {
1379
- return this.getInverseMatrix().applyToPointArray(b[0], b[1], b[2] || 0);
1380
- }
1381
- function _(b) {
1382
- var S, L = b.length, N = [];
1383
- for (S = 0; S < L; S += 1) N[S] = M(b[S]);
1384
- return N;
1385
- }
1386
- function D(b, S, L) {
1387
- var N = ht("float32", 6);
1388
- if (this.isIdentity()) N[0] = b[0], N[1] = b[1], N[2] = S[0], N[3] = S[1], N[4] = L[0], N[5] = L[1];
1389
- else {
1390
- var U = this.props[0], $ = this.props[1], Q = this.props[4], J = this.props[5], tt = this.props[12], j = this.props[13];
1391
- N[0] = b[0] * U + b[1] * Q + tt, N[1] = b[0] * $ + b[1] * J + j, N[2] = S[0] * U + S[1] * Q + tt, N[3] = S[0] * $ + S[1] * J + j, N[4] = L[0] * U + L[1] * Q + tt, N[5] = L[0] * $ + L[1] * J + j;
1392
- }
1393
- return N;
1394
- }
1395
- function w(b, S, L) {
1396
- return this.isIdentity() ? [b, S, L] : [b * this.props[0] + S * this.props[4] + L * this.props[8] + this.props[12], b * this.props[1] + S * this.props[5] + L * this.props[9] + this.props[13], b * this.props[2] + S * this.props[6] + L * this.props[10] + this.props[14]];
1397
- }
1398
- function P(b, S) {
1399
- if (this.isIdentity()) return b + "," + S;
1400
- var L = this.props;
1401
- return Math.round(100 * (b * L[0] + S * L[4] + L[12])) / 100 + "," + Math.round(100 * (b * L[1] + S * L[5] + L[13])) / 100;
1402
- }
1403
- function V() {
1404
- for (var b = 0, S = this.props, L = "matrix3d("; b < 16; ) L += i(1e4 * S[b]) / 1e4, L += b === 15 ? ")" : ",", b += 1;
1405
- return L;
1406
- }
1407
- function O(b) {
1408
- return b < 1e-6 && b > 0 || b > -1e-6 && b < 0 ? i(1e4 * b) / 1e4 : b;
1409
- }
1410
- function B() {
1411
- var b = this.props;
1412
- return "matrix(" + O(b[0]) + "," + O(b[1]) + "," + O(b[4]) + "," + O(b[5]) + "," + O(b[12]) + "," + O(b[13]) + ")";
1413
- }
1414
- return function() {
1415
- this.reset = a, this.rotate = r, this.rotateX = h, this.rotateY = n, this.rotateZ = g, this.skew = o, this.skewFromAxis = d, this.shear = y, this.scale = c, this.setTransform = m, this.translate = l, this.transform = f, this.multiply = p, this.applyToPoint = A, this.applyToX = F, this.applyToY = I, this.applyToZ = x, this.applyToPointArray = w, this.applyToTriplePoints = D, this.applyToPointStringified = P, this.toCSS = V, this.to2dCSS = B, this.clone = k, this.cloneFromProps = C, this.equals = v, this.inversePoints = _, this.inversePoint = M, this.getInverseMatrix = T, this._t = this.transform, this.isIdentity = u, this._identity = !0, this._identityCalculated = !1, this.props = ht("float32", 16), this.reset();
1416
- };
1417
- }();
1418
- function fs(t) {
1419
- return fs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1420
- return typeof e;
1421
- } : function(e) {
1422
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1423
- }, fs(t);
1424
- }
1425
- var H = {};
1426
- function Us() {
1427
- lt.searchAnimations();
1428
- }
1429
- H.play = lt.play, H.pause = lt.pause, H.setLocationHref = function(t) {
1430
- ie = t;
1431
- }, H.togglePause = lt.togglePause, H.setSpeed = lt.setSpeed, H.setDirection = lt.setDirection, H.stop = lt.stop, H.searchAnimations = Us, H.registerAnimation = lt.registerAnimation, H.loadAnimation = function(t) {
1432
- return lt.loadAnimation(t);
1433
- }, H.setSubframeRendering = function(t) {
1434
- (function(e) {
1435
- ws = !!e;
1436
- })(t);
1437
- }, H.resize = lt.resize, H.goToAndStop = lt.goToAndStop, H.destroy = lt.destroy, H.setQuality = function(t) {
1438
- if (typeof t == "string") switch (t) {
1439
- case "high":
1440
- Ne(200);
1441
- break;
1442
- default:
1443
- case "medium":
1444
- Ne(50);
1445
- break;
1446
- case "low":
1447
- Ne(10);
1448
- }
1449
- else !isNaN(t) && t > 1 && Ne(t);
1450
- }, H.inBrowser = function() {
1451
- return typeof navigator < "u";
1452
- }, H.installPlugin = function(t, e) {
1453
- t === "expressions" && (Ms = e);
1454
- }, H.freeze = lt.freeze, H.unfreeze = lt.unfreeze, H.setVolume = lt.setVolume, H.mute = lt.mute, H.unmute = lt.unmute, H.getRegisteredAnimations = lt.getRegisteredAnimations, H.useWebWorker = function(t) {
1455
- It = !!t;
1456
- }, H.setIDPrefix = function(t) {
1457
- Ts = t;
1458
- }, H.__getFactory = function(t) {
1459
- switch (t) {
1460
- case "propertyFactory":
1461
- return E;
1462
- case "shapePropertyFactory":
1463
- return de;
1464
- case "matrix":
1465
- return st;
1466
- default:
1467
- return null;
1468
- }
1469
- }, H.version = "5.13.0";
1470
- var Zs = "";
1471
- {
1472
- var $s = document.getElementsByTagName("script"), Qs = $s[$s.length - 1] || { src: "" };
1473
- Zs = Qs.src ? Qs.src.replace(/^[^\?]+\??/, "") : "", function(t) {
1474
- for (var e = Zs.split("&"), s = 0; s < e.length; s += 1) {
1475
- var i = e[s].split("=");
1476
- if (decodeURIComponent(i[0]) == t) return decodeURIComponent(i[1]);
1477
- }
1478
- return null;
1479
- }("renderer");
1480
- }
1481
- var ji = setInterval(function() {
1482
- document.readyState === "complete" && (clearInterval(ji), Us());
1483
- }, 100);
1484
- try {
1485
- fs(ze) === "object" || (window.bodymovin = H);
1486
- } catch {
1487
- }
1488
- var zt = function() {
1489
- var t = {}, e = {};
1490
- return t.registerModifier = function(s, i) {
1491
- e[s] || (e[s] = i);
1492
- }, t.getModifier = function(s, i, a) {
1493
- return new e[s](i, a);
1494
- }, t;
1495
- }();
1496
- function At() {
1497
- }
1498
- function Ft() {
1499
- }
1500
- function De() {
1501
- }
1502
- At.prototype.initModifierProperties = function() {
1503
- }, At.prototype.addShapeToModifier = function() {
1504
- }, At.prototype.addShape = function(t) {
1505
- if (!this.closed) {
1506
- t.sh.container.addDynamicProperty(t.sh);
1507
- var e = { shape: t.sh, data: t, localShapeCollection: ce.newShapeCollection() };
1508
- this.shapes.push(e), this.addShapeToModifier(e), this._isAnimated && t.setAsAnimated();
1509
- }
1510
- }, At.prototype.init = function(t, e) {
1511
- this.shapes = [], this.elem = t, this.initDynamicPropertyContainer(t), this.initModifierProperties(t, e), this.frameId = Jt, this.closed = !1, this.k = !1, this.dynamicProperties.length ? this.k = !0 : this.getValue(!0);
1512
- }, At.prototype.processKeys = function() {
1513
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties());
1514
- }, W([ut], At), W([At], Ft), Ft.prototype.initModifierProperties = function(t, e) {
1515
- this.s = E.getProp(t, e.s, 0, 0.01, this), this.e = E.getProp(t, e.e, 0, 0.01, this), this.o = E.getProp(t, e.o, 0, 0, this), this.sValue = 0, this.eValue = 0, this.getValue = this.processKeys, this.m = e.m, this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
1516
- }, Ft.prototype.addShapeToModifier = function(t) {
1517
- t.pathsData = [];
1518
- }, Ft.prototype.calculateShapeEdges = function(t, e, s, i, a) {
1519
- var r = [];
1520
- e <= 1 ? r.push({ s: t, e }) : t >= 1 ? r.push({ s: t - 1, e: e - 1 }) : (r.push({ s: t, e: 1 }), r.push({ s: 0, e: e - 1 }));
1521
- var h, n, g = [], y = r.length;
1522
- for (h = 0; h < y; h += 1) {
1523
- var o, d;
1524
- (n = r[h]).e * a < i || n.s * a > i + s || (o = n.s * a <= i ? 0 : (n.s * a - i) / s, d = n.e * a >= i + s ? 1 : (n.e * a - i) / s, g.push([o, d]));
1525
- }
1526
- return g.length || g.push([0, 0]), g;
1527
- }, Ft.prototype.releasePathsData = function(t) {
1528
- var e, s = t.length;
1529
- for (e = 0; e < s; e += 1) Js.release(t[e]);
1530
- return t.length = 0, t;
1531
- }, Ft.prototype.processShapes = function(t) {
1532
- var e, s, i, a;
1533
- if (this._mdf || t) {
1534
- var r = this.o.v % 360 / 360;
1535
- if (r < 0 && (r += 1), (e = this.s.v > 1 ? 1 + r : this.s.v < 0 ? 0 + r : this.s.v + r) > (s = this.e.v > 1 ? 1 + r : this.e.v < 0 ? 0 + r : this.e.v + r)) {
1536
- var h = e;
1537
- e = s, s = h;
1538
- }
1539
- e = 1e-4 * Math.round(1e4 * e), s = 1e-4 * Math.round(1e4 * s), this.sValue = e, this.eValue = s;
1540
- } else e = this.sValue, s = this.eValue;
1541
- var n, g, y, o, d, c = this.shapes.length, m = 0;
1542
- if (s === e) for (a = 0; a < c; a += 1) this.shapes[a].localShapeCollection.releaseShapes(), this.shapes[a].shape._mdf = !0, this.shapes[a].shape.paths = this.shapes[a].localShapeCollection, this._mdf && (this.shapes[a].pathsData.length = 0);
1543
- else if (s === 1 && e === 0 || s === 0 && e === 1) {
1544
- if (this._mdf) for (a = 0; a < c; a += 1) this.shapes[a].pathsData.length = 0, this.shapes[a].shape._mdf = !0;
1545
- } else {
1546
- var l, f, p = [];
1547
- for (a = 0; a < c; a += 1) if ((l = this.shapes[a]).shape._mdf || this._mdf || t || this.m === 2) {
1548
- if (g = (i = l.shape.paths)._length, d = 0, !l.shape._mdf && l.pathsData.length) d = l.totalShapeLength;
1549
- else {
1550
- for (y = this.releasePathsData(l.pathsData), n = 0; n < g; n += 1) o = Rt.getSegmentsLength(i.shapes[n]), y.push(o), d += o.totalLength;
1551
- l.totalShapeLength = d, l.pathsData = y;
1552
- }
1553
- m += d, l.shape._mdf = !0;
1554
- } else l.shape.paths = l.localShapeCollection;
1555
- var u, v = e, k = s, C = 0;
1556
- for (a = c - 1; a >= 0; a -= 1) if ((l = this.shapes[a]).shape._mdf) {
1557
- for ((f = l.localShapeCollection).releaseShapes(), this.m === 2 && c > 1 ? (u = this.calculateShapeEdges(e, s, l.totalShapeLength, C, m), C += l.totalShapeLength) : u = [[v, k]], g = u.length, n = 0; n < g; n += 1) {
1558
- v = u[n][0], k = u[n][1], p.length = 0, k <= 1 ? p.push({ s: l.totalShapeLength * v, e: l.totalShapeLength * k }) : v >= 1 ? p.push({ s: l.totalShapeLength * (v - 1), e: l.totalShapeLength * (k - 1) }) : (p.push({ s: l.totalShapeLength * v, e: l.totalShapeLength }), p.push({ s: 0, e: l.totalShapeLength * (k - 1) }));
1559
- var A = this.addShapes(l, p[0]);
1560
- if (p[0].s !== p[0].e) {
1561
- if (p.length > 1) if (l.shape.paths.shapes[l.shape.paths._length - 1].c) {
1562
- var F = A.pop();
1563
- this.addPaths(A, f), A = this.addShapes(l, p[1], F);
1564
- } else this.addPaths(A, f), A = this.addShapes(l, p[1]);
1565
- this.addPaths(A, f);
1566
- }
1567
- }
1568
- l.shape.paths = f;
1569
- }
1570
- }
1571
- }, Ft.prototype.addPaths = function(t, e) {
1572
- var s, i = t.length;
1573
- for (s = 0; s < i; s += 1) e.addShape(t[s]);
1574
- }, Ft.prototype.addSegment = function(t, e, s, i, a, r, h) {
1575
- a.setXYAt(e[0], e[1], "o", r), a.setXYAt(s[0], s[1], "i", r + 1), h && a.setXYAt(t[0], t[1], "v", r), a.setXYAt(i[0], i[1], "v", r + 1);
1576
- }, Ft.prototype.addSegmentFromArray = function(t, e, s, i) {
1577
- e.setXYAt(t[1], t[5], "o", s), e.setXYAt(t[2], t[6], "i", s + 1), i && e.setXYAt(t[0], t[4], "v", s), e.setXYAt(t[3], t[7], "v", s + 1);
1578
- }, Ft.prototype.addShapes = function(t, e, s) {
1579
- var i, a, r, h, n, g, y, o, d = t.pathsData, c = t.shape.paths.shapes, m = t.shape.paths._length, l = 0, f = [], p = !0;
1580
- for (s ? (n = s._length, o = s._length) : (s = yt.newElement(), n = 0, o = 0), f.push(s), i = 0; i < m; i += 1) {
1581
- for (g = d[i].lengths, s.c = c[i].c, r = c[i].c ? g.length : g.length + 1, a = 1; a < r; a += 1) if (l + (h = g[a - 1]).addedLength < e.s) l += h.addedLength, s.c = !1;
1582
- else {
1583
- if (l > e.e) {
1584
- s.c = !1;
1585
- break;
1586
- }
1587
- e.s <= l && e.e >= l + h.addedLength ? (this.addSegment(c[i].v[a - 1], c[i].o[a - 1], c[i].i[a], c[i].v[a], s, n, p), p = !1) : (y = Rt.getNewSegment(c[i].v[a - 1], c[i].v[a], c[i].o[a - 1], c[i].i[a], (e.s - l) / h.addedLength, (e.e - l) / h.addedLength, g[a - 1]), this.addSegmentFromArray(y, s, n, p), p = !1, s.c = !1), l += h.addedLength, n += 1;
1588
- }
1589
- if (c[i].c && g.length) {
1590
- if (h = g[a - 1], l <= e.e) {
1591
- var u = g[a - 1].addedLength;
1592
- e.s <= l && e.e >= l + u ? (this.addSegment(c[i].v[a - 1], c[i].o[a - 1], c[i].i[0], c[i].v[0], s, n, p), p = !1) : (y = Rt.getNewSegment(c[i].v[a - 1], c[i].v[0], c[i].o[a - 1], c[i].i[0], (e.s - l) / u, (e.e - l) / u, g[a - 1]), this.addSegmentFromArray(y, s, n, p), p = !1, s.c = !1);
1593
- } else s.c = !1;
1594
- l += h.addedLength, n += 1;
1595
- }
1596
- if (s._length && (s.setXYAt(s.v[o][0], s.v[o][1], "i", o), s.setXYAt(s.v[s._length - 1][0], s.v[s._length - 1][1], "o", s._length - 1)), l > e.e) break;
1597
- i < m - 1 && (s = yt.newElement(), p = !0, f.push(s), n = 0);
1598
- }
1599
- return f;
1600
- }, W([At], De), De.prototype.initModifierProperties = function(t, e) {
1601
- this.getValue = this.processKeys, this.amount = E.getProp(t, e.a, 0, null, this), this._isAnimated = !!this.amount.effectsSequence.length;
1602
- }, De.prototype.processPath = function(t, e) {
1603
- var s = e / 100, i = [0, 0], a = t._length, r = 0;
1604
- for (r = 0; r < a; r += 1) i[0] += t.v[r][0], i[1] += t.v[r][1];
1605
- i[0] /= a, i[1] /= a;
1606
- var h, n, g, y, o, d, c = yt.newElement();
1607
- for (c.c = t.c, r = 0; r < a; r += 1) h = t.v[r][0] + (i[0] - t.v[r][0]) * s, n = t.v[r][1] + (i[1] - t.v[r][1]) * s, g = t.o[r][0] + (i[0] - t.o[r][0]) * -s, y = t.o[r][1] + (i[1] - t.o[r][1]) * -s, o = t.i[r][0] + (i[0] - t.i[r][0]) * -s, d = t.i[r][1] + (i[1] - t.i[r][1]) * -s, c.setTripleAt(h, n, g, y, o, d, r);
1608
- return c;
1609
- }, De.prototype.processShapes = function(t) {
1610
- var e, s, i, a, r, h, n = this.shapes.length, g = this.amount.v;
1611
- if (g !== 0) for (s = 0; s < n; s += 1) {
1612
- if (h = (r = this.shapes[s]).localShapeCollection, r.shape._mdf || this._mdf || t) for (h.releaseShapes(), r.shape._mdf = !0, e = r.shape.paths.shapes, a = r.shape.paths._length, i = 0; i < a; i += 1) h.addShape(this.processPath(e[i], g));
1613
- r.shape.paths = r.localShapeCollection;
1614
- }
1615
- this.dynamicProperties.length || (this._mdf = !1);
1616
- };
1617
- var Xe = function() {
1618
- var t = [0, 0];
1619
- function e(s, i, a) {
1620
- if (this.elem = s, this.frameId = -1, this.propType = "transform", this.data = i, this.v = new st(), this.pre = new st(), this.appliedTransformations = 0, this.initDynamicPropertyContainer(a || s), i.p && i.p.s ? (this.px = E.getProp(s, i.p.x, 0, 0, this), this.py = E.getProp(s, i.p.y, 0, 0, this), i.p.z && (this.pz = E.getProp(s, i.p.z, 0, 0, this))) : this.p = E.getProp(s, i.p || { k: [0, 0, 0] }, 1, 0, this), i.rx) {
1621
- if (this.rx = E.getProp(s, i.rx, 0, et, this), this.ry = E.getProp(s, i.ry, 0, et, this), this.rz = E.getProp(s, i.rz, 0, et, this), i.or.k[0].ti) {
1622
- var r, h = i.or.k.length;
1623
- for (r = 0; r < h; r += 1) i.or.k[r].to = null, i.or.k[r].ti = null;
1624
- }
1625
- this.or = E.getProp(s, i.or, 1, et, this), this.or.sh = !0;
1626
- } else this.r = E.getProp(s, i.r || { k: 0 }, 0, et, this);
1627
- i.sk && (this.sk = E.getProp(s, i.sk, 0, et, this), this.sa = E.getProp(s, i.sa, 0, et, this)), this.a = E.getProp(s, i.a || { k: [0, 0, 0] }, 1, 0, this), this.s = E.getProp(s, i.s || { k: [100, 100, 100] }, 1, 0.01, this), i.o ? this.o = E.getProp(s, i.o, 0, 0.01, s) : this.o = { _mdf: !1, v: 1 }, this._isDirty = !0, this.dynamicProperties.length || this.getValue(!0);
1628
- }
1629
- return e.prototype = { applyToMatrix: function(s) {
1630
- var i = this._mdf;
1631
- this.iterateDynamicProperties(), this._mdf = this._mdf || i, this.a && s.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.s && s.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && s.skewFromAxis(-this.sk.v, this.sa.v), this.r ? s.rotate(-this.r.v) : s.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.data.p.s ? this.data.p.z ? s.translate(this.px.v, this.py.v, -this.pz.v) : s.translate(this.px.v, this.py.v, 0) : s.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
1632
- }, getValue: function(s) {
1633
- if (this.elem.globalData.frameId !== this.frameId) {
1634
- if (this._isDirty && (this.precalculateMatrix(), this._isDirty = !1), this.iterateDynamicProperties(), this._mdf || s) {
1635
- var i;
1636
- if (this.v.cloneFromProps(this.pre.props), this.appliedTransformations < 1 && this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations < 2 && this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && this.appliedTransformations < 3 && this.v.skewFromAxis(-this.sk.v, this.sa.v), this.r && this.appliedTransformations < 4 ? this.v.rotate(-this.r.v) : !this.r && this.appliedTransformations < 4 && this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.autoOriented) {
1637
- var a, r;
1638
- if (i = this.elem.globalData.frameRate, this.p && this.p.keyframes && this.p.getValueAtTime) this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t ? (a = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / i, 0), r = this.p.getValueAtTime(this.p.keyframes[0].t / i, 0)) : this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t ? (a = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / i, 0), r = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / i, 0)) : (a = this.p.pv, r = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / i, this.p.offsetTime));
1639
- else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
1640
- a = [], r = [];
1641
- var h = this.px, n = this.py;
1642
- h._caching.lastFrame + h.offsetTime <= h.keyframes[0].t ? (a[0] = h.getValueAtTime((h.keyframes[0].t + 0.01) / i, 0), a[1] = n.getValueAtTime((n.keyframes[0].t + 0.01) / i, 0), r[0] = h.getValueAtTime(h.keyframes[0].t / i, 0), r[1] = n.getValueAtTime(n.keyframes[0].t / i, 0)) : h._caching.lastFrame + h.offsetTime >= h.keyframes[h.keyframes.length - 1].t ? (a[0] = h.getValueAtTime(h.keyframes[h.keyframes.length - 1].t / i, 0), a[1] = n.getValueAtTime(n.keyframes[n.keyframes.length - 1].t / i, 0), r[0] = h.getValueAtTime((h.keyframes[h.keyframes.length - 1].t - 0.01) / i, 0), r[1] = n.getValueAtTime((n.keyframes[n.keyframes.length - 1].t - 0.01) / i, 0)) : (a = [h.pv, n.pv], r[0] = h.getValueAtTime((h._caching.lastFrame + h.offsetTime - 0.01) / i, h.offsetTime), r[1] = n.getValueAtTime((n._caching.lastFrame + n.offsetTime - 0.01) / i, n.offsetTime));
1643
- } else a = r = t;
1644
- this.v.rotate(-Math.atan2(a[1] - r[1], a[0] - r[0]));
1645
- }
1646
- this.data.p && this.data.p.s ? this.data.p.z ? this.v.translate(this.px.v, this.py.v, -this.pz.v) : this.v.translate(this.px.v, this.py.v, 0) : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
1647
- }
1648
- this.frameId = this.elem.globalData.frameId;
1649
- }
1650
- }, precalculateMatrix: function() {
1651
- if (this.appliedTransformations = 0, this.pre.reset(), !this.a.effectsSequence.length && (this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations = 1, !this.s.effectsSequence.length)) {
1652
- if (this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.appliedTransformations = 2, this.sk) {
1653
- if (this.sk.effectsSequence.length || this.sa.effectsSequence.length) return;
1654
- this.pre.skewFromAxis(-this.sk.v, this.sa.v), this.appliedTransformations = 3;
1655
- }
1656
- this.r ? this.r.effectsSequence.length || (this.pre.rotate(-this.r.v), this.appliedTransformations = 4) : this.rz.effectsSequence.length || this.ry.effectsSequence.length || this.rx.effectsSequence.length || this.or.effectsSequence.length || (this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.appliedTransformations = 4);
1657
- }
1658
- }, autoOrient: function() {
1659
- } }, W([ut], e), e.prototype.addDynamicProperty = function(s) {
1660
- this._addDynamicProperty(s), this.elem.addDynamicProperty(s), this._isDirty = !0;
1661
- }, e.prototype._addDynamicProperty = ut.prototype.addDynamicProperty, { getTransformProperty: function(s, i, a) {
1662
- return new e(s, i, a);
1663
- } };
1664
- }();
1665
- function Ot() {
1666
- }
1667
- function Se() {
1668
- }
1669
- function He(t, e) {
1670
- return 1e5 * Math.abs(t - e) <= Math.min(Math.abs(t), Math.abs(e));
1671
- }
1672
- function cs(t) {
1673
- return Math.abs(t) <= 1e-5;
1674
- }
1675
- function ti(t, e, s) {
1676
- return t * (1 - s) + e * s;
1677
- }
1678
- function Ut(t, e, s) {
1679
- return [ti(t[0], e[0], s), ti(t[1], e[1], s)];
1680
- }
1681
- function ei(t, e, s, i) {
1682
- return [3 * e - t - 3 * s + i, 3 * t - 6 * e + 3 * s, -3 * t + 3 * e, t];
1683
- }
1684
- function si(t) {
1685
- return new it(t, t, t, t, !1);
1686
- }
1687
- function it(t, e, s, i, a) {
1688
- a && me(t, e) && (e = Ut(t, i, 1 / 3)), a && me(s, i) && (s = Ut(t, i, 2 / 3));
1689
- var r = ei(t[0], e[0], s[0], i[0]), h = ei(t[1], e[1], s[1], i[1]);
1690
- this.a = [r[0], h[0]], this.b = [r[1], h[1]], this.c = [r[2], h[2]], this.d = [r[3], h[3]], this.points = [t, e, s, i];
1691
- }
1692
- function ii(t, e) {
1693
- var s = t.points[0][e], i = t.points[t.points.length - 1][e];
1694
- if (s > i) {
1695
- var a = i;
1696
- i = s, s = a;
1697
- }
1698
- for (var r = function(g, y, o) {
1699
- if (g === 0) return [];
1700
- var d = y * y - 4 * g * o;
1701
- if (d < 0) return [];
1702
- var c = -y / (2 * g);
1703
- if (d === 0) return [c];
1704
- var m = Math.sqrt(d) / (2 * g);
1705
- return [c - m, c + m];
1706
- }(3 * t.a[e], 2 * t.b[e], t.c[e]), h = 0; h < r.length; h += 1) if (r[h] > 0 && r[h] < 1) {
1707
- var n = t.point(r[h])[e];
1708
- n < s ? s = n : n > i && (i = n);
1709
- }
1710
- return { min: s, max: i };
1711
- }
1712
- function Ge(t, e, s) {
1713
- var i = t.boundingBox();
1714
- return { cx: i.cx, cy: i.cy, width: i.width, height: i.height, bez: t, t: (e + s) / 2, t1: e, t2: s };
1715
- }
1716
- function ai(t) {
1717
- var e = t.bez.split(0.5);
1718
- return [Ge(e[0], t.t1, t.t), Ge(e[1], t.t, t.t2)];
1719
- }
1720
- function Ae(t, e, s, i, a, r) {
1721
- var h, n;
1722
- if (h = t, n = e, 2 * Math.abs(h.cx - n.cx) < h.width + n.width && 2 * Math.abs(h.cy - n.cy) < h.height + n.height) if (s >= r || t.width <= i && t.height <= i && e.width <= i && e.height <= i) a.push([t.t, e.t]);
1723
- else {
1724
- var g = ai(t), y = ai(e);
1725
- Ae(g[0], y[0], s + 1, i, a, r), Ae(g[0], y[1], s + 1, i, a, r), Ae(g[1], y[0], s + 1, i, a, r), Ae(g[1], y[1], s + 1, i, a, r);
1726
- }
1727
- }
1728
- function ds(t, e) {
1729
- return [t[1] * e[2] - t[2] * e[1], t[2] * e[0] - t[0] * e[2], t[0] * e[1] - t[1] * e[0]];
1730
- }
1731
- function Ke(t, e, s, i) {
1732
- var a = [t[0], t[1], 1], r = [e[0], e[1], 1], h = [s[0], s[1], 1], n = [i[0], i[1], 1], g = ds(ds(a, r), ds(h, n));
1733
- return cs(g[2]) ? null : [g[0] / g[2], g[1] / g[2]];
1734
- }
1735
- function ue(t, e, s) {
1736
- return [t[0] + Math.cos(e) * s, t[1] - Math.sin(e) * s];
1737
- }
1738
- function us(t, e) {
1739
- return Math.hypot(t[0] - e[0], t[1] - e[1]);
1740
- }
1741
- function me(t, e) {
1742
- return He(t[0], e[0]) && He(t[1], e[1]);
1743
- }
1744
- function we() {
1745
- }
1746
- function ri(t, e, s, i, a, r, h) {
1747
- var n = s - Math.PI / 2, g = s + Math.PI / 2, y = e[0] + Math.cos(s) * i * a, o = e[1] - Math.sin(s) * i * a;
1748
- t.setTripleAt(y, o, y + Math.cos(n) * r, o - Math.sin(n) * r, y + Math.cos(g) * h, o - Math.sin(g) * h, t.length());
1749
- }
1750
- function Ji(t, e) {
1751
- var s, i, a, r, h = e === 0 ? t.length() - 1 : e - 1, n = (e + 1) % t.length(), g = t.v[h], y = t.v[n], o = (s = g, a = [(i = y)[0] - s[0], i[1] - s[1]], r = 0.5 * -Math.PI, [Math.cos(r) * a[0] - Math.sin(r) * a[1], Math.sin(r) * a[0] + Math.cos(r) * a[1]]);
1752
- return Math.atan2(0, 1) - Math.atan2(o[1], o[0]);
1753
- }
1754
- function ni(t, e, s, i, a, r, h) {
1755
- var n = Ji(e, s), g = e.v[s % e._length], y = e.v[s === 0 ? e._length - 1 : s - 1], o = e.v[(s + 1) % e._length], d = r === 2 ? Math.sqrt(Math.pow(g[0] - y[0], 2) + Math.pow(g[1] - y[1], 2)) : 0, c = r === 2 ? Math.sqrt(Math.pow(g[0] - o[0], 2) + Math.pow(g[1] - o[1], 2)) : 0;
1756
- ri(t, e.v[s % e._length], n, h, i, c / (2 * (a + 1)), d / (2 * (a + 1)));
1757
- }
1758
- function Yi(t, e, s, i, a, r) {
1759
- for (var h = 0; h < i; h += 1) {
1760
- var n = (h + 1) / (i + 1), g = a === 2 ? Math.sqrt(Math.pow(e.points[3][0] - e.points[0][0], 2) + Math.pow(e.points[3][1] - e.points[0][1], 2)) : 0, y = e.normalAngle(n);
1761
- ri(t, e.point(n), y, r, s, g / (2 * (i + 1)), g / (2 * (i + 1))), r = -r;
1762
- }
1763
- return r;
1764
- }
1765
- function ms(t, e, s) {
1766
- var i = Math.atan2(e[0] - t[0], e[1] - t[1]);
1767
- return [ue(t, i, s), ue(e, i, s)];
1768
- }
1769
- function ge(t, e) {
1770
- var s, i, a, r, h, n, g;
1771
- s = (g = ms(t.points[0], t.points[1], e))[0], i = g[1], a = (g = ms(t.points[1], t.points[2], e))[0], r = g[1], h = (g = ms(t.points[2], t.points[3], e))[0], n = g[1];
1772
- var y = Ke(s, i, a, r);
1773
- y === null && (y = i);
1774
- var o = Ke(h, n, a, r);
1775
- return o === null && (o = h), new it(s, y, o, n);
1776
- }
1777
- function oi(t, e, s, i, a) {
1778
- var r = e.points[3], h = s.points[0];
1779
- if (i === 3 || me(r, h)) return r;
1780
- if (i === 2) {
1781
- var n = -e.tangentAngle(1), g = -s.tangentAngle(0) + Math.PI, y = Ke(r, ue(r, n + Math.PI / 2, 100), h, ue(h, n + Math.PI / 2, 100)), o = y ? us(y, r) : us(r, h) / 2, d = ue(r, n, 2 * o * Kt);
1782
- return t.setXYAt(d[0], d[1], "o", t.length() - 1), d = ue(h, g, 2 * o * Kt), t.setTripleAt(h[0], h[1], h[0], h[1], d[0], d[1], t.length()), h;
1783
- }
1784
- var c = Ke(me(r, e.points[2]) ? e.points[0] : e.points[2], r, h, me(h, s.points[1]) ? s.points[3] : s.points[1]);
1785
- return c && us(c, r) < a ? (t.setTripleAt(c[0], c[1], c[0], c[1], c[0], c[1], t.length()), c) : r;
1786
- }
1787
- function hi(t, e) {
1788
- var s = t.intersections(e);
1789
- return s.length && He(s[0][0], 1) && s.shift(), s.length ? s[0] : null;
1790
- }
1791
- function li(t, e) {
1792
- var s = t.slice(), i = e.slice(), a = hi(t[t.length - 1], e[0]);
1793
- return a && (s[t.length - 1] = t[t.length - 1].split(a[0])[0], i[0] = e[0].split(a[1])[1]), t.length > 1 && e.length > 1 && (a = hi(t[0], e[e.length - 1])) ? [[t[0].split(a[0])[0]], [e[e.length - 1].split(a[1])[1]]] : [s, i];
1794
- }
1795
- function pi(t, e) {
1796
- var s, i, a, r, h = t.inflectionPoints();
1797
- if (h.length === 0) return [ge(t, e)];
1798
- if (h.length === 1 || He(h[1], 1)) return s = (a = t.split(h[0]))[0], i = a[1], [ge(s, e), ge(i, e)];
1799
- s = (a = t.split(h[0]))[0];
1800
- var n = (h[1] - h[0]) / (1 - h[0]);
1801
- return r = (a = a[1].split(n))[0], i = a[1], [ge(s, e), ge(r, e), ge(i, e)];
1802
- }
1803
- function Me() {
1804
- }
1805
- function fi(t) {
1806
- for (var e = t.fStyle ? t.fStyle.split(" ") : [], s = "normal", i = "normal", a = e.length, r = 0; r < a; r += 1) switch (e[r].toLowerCase()) {
1807
- case "italic":
1808
- i = "italic";
1809
- break;
1810
- case "bold":
1811
- s = "700";
1812
- break;
1813
- case "black":
1814
- s = "900";
1815
- break;
1816
- case "medium":
1817
- s = "500";
1818
- break;
1819
- case "regular":
1820
- case "normal":
1821
- s = "400";
1822
- break;
1823
- case "light":
1824
- case "thin":
1825
- s = "200";
1826
- }
1827
- return { style: i, weight: t.fWeight || s };
1828
- }
1829
- W([At], Ot), Ot.prototype.initModifierProperties = function(t, e) {
1830
- this.getValue = this.processKeys, this.c = E.getProp(t, e.c, 0, null, this), this.o = E.getProp(t, e.o, 0, null, this), this.tr = Xe.getTransformProperty(t, e.tr, this), this.so = E.getProp(t, e.tr.so, 0, 0.01, this), this.eo = E.getProp(t, e.tr.eo, 0, 0.01, this), this.data = e, this.dynamicProperties.length || this.getValue(!0), this._isAnimated = !!this.dynamicProperties.length, this.pMatrix = new st(), this.rMatrix = new st(), this.sMatrix = new st(), this.tMatrix = new st(), this.matrix = new st();
1831
- }, Ot.prototype.applyTransforms = function(t, e, s, i, a, r) {
1832
- var h = r ? -1 : 1, n = i.s.v[0] + (1 - i.s.v[0]) * (1 - a), g = i.s.v[1] + (1 - i.s.v[1]) * (1 - a);
1833
- t.translate(i.p.v[0] * h * a, i.p.v[1] * h * a, i.p.v[2]), e.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]), e.rotate(-i.r.v * h * a), e.translate(i.a.v[0], i.a.v[1], i.a.v[2]), s.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]), s.scale(r ? 1 / n : n, r ? 1 / g : g), s.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
1834
- }, Ot.prototype.init = function(t, e, s, i) {
1835
- for (this.elem = t, this.arr = e, this.pos = s, this.elemsData = i, this._currentCopies = 0, this._elements = [], this._groups = [], this.frameId = -1, this.initDynamicPropertyContainer(t), this.initModifierProperties(t, e[s]); s > 0; ) s -= 1, this._elements.unshift(e[s]);
1836
- this.dynamicProperties.length ? this.k = !0 : this.getValue(!0);
1837
- }, Ot.prototype.resetElements = function(t) {
1838
- var e, s = t.length;
1839
- for (e = 0; e < s; e += 1) t[e]._processed = !1, t[e].ty === "gr" && this.resetElements(t[e].it);
1840
- }, Ot.prototype.cloneElements = function(t) {
1841
- var e = JSON.parse(JSON.stringify(t));
1842
- return this.resetElements(e), e;
1843
- }, Ot.prototype.changeGroupRender = function(t, e) {
1844
- var s, i = t.length;
1845
- for (s = 0; s < i; s += 1) t[s]._render = e, t[s].ty === "gr" && this.changeGroupRender(t[s].it, e);
1846
- }, Ot.prototype.processShapes = function(t) {
1847
- var e, s, i, a, r, h = !1;
1848
- if (this._mdf || t) {
1849
- var n, g = Math.ceil(this.c.v);
1850
- if (this._groups.length < g) {
1851
- for (; this._groups.length < g; ) {
1852
- var y = { it: this.cloneElements(this._elements), ty: "gr" };
1853
- y.it.push({ a: { a: 0, ix: 1, k: [0, 0] }, nm: "Transform", o: { a: 0, ix: 7, k: 100 }, p: { a: 0, ix: 2, k: [0, 0] }, r: { a: 1, ix: 6, k: [{ s: 0, e: 0, t: 0 }, { s: 0, e: 0, t: 1 }] }, s: { a: 0, ix: 3, k: [100, 100] }, sa: { a: 0, ix: 5, k: 0 }, sk: { a: 0, ix: 4, k: 0 }, ty: "tr" }), this.arr.splice(0, 0, y), this._groups.splice(0, 0, y), this._currentCopies += 1;
1854
- }
1855
- this.elem.reloadShapes(), h = !0;
1856
- }
1857
- for (r = 0, i = 0; i <= this._groups.length - 1; i += 1) {
1858
- if (n = r < g, this._groups[i]._render = n, this.changeGroupRender(this._groups[i].it, n), !n) {
1859
- var o = this.elemsData[i].it, d = o[o.length - 1];
1860
- d.transform.op.v !== 0 ? (d.transform.op._mdf = !0, d.transform.op.v = 0) : d.transform.op._mdf = !1;
1861
- }
1862
- r += 1;
1863
- }
1864
- this._currentCopies = g;
1865
- var c = this.o.v, m = c % 1, l = c > 0 ? Math.floor(c) : Math.ceil(c), f = this.pMatrix.props, p = this.rMatrix.props, u = this.sMatrix.props;
1866
- this.pMatrix.reset(), this.rMatrix.reset(), this.sMatrix.reset(), this.tMatrix.reset(), this.matrix.reset();
1867
- var v, k, C = 0;
1868
- if (c > 0) {
1869
- for (; C < l; ) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1), C += 1;
1870
- m && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, m, !1), C += m);
1871
- } else if (c < 0) {
1872
- for (; C > l; ) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !0), C -= 1;
1873
- m && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -m, !0), C -= m);
1874
- }
1875
- for (i = this.data.m === 1 ? 0 : this._currentCopies - 1, a = this.data.m === 1 ? 1 : -1, r = this._currentCopies; r; ) {
1876
- if (k = (s = (e = this.elemsData[i].it)[e.length - 1].transform.mProps.v.props).length, e[e.length - 1].transform.mProps._mdf = !0, e[e.length - 1].transform.op._mdf = !0, e[e.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1)), C !== 0) {
1877
- for ((i !== 0 && a === 1 || i !== this._currentCopies - 1 && a === -1) && this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1), this.matrix.transform(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]), this.matrix.transform(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], u[9], u[10], u[11], u[12], u[13], u[14], u[15]), this.matrix.transform(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8], f[9], f[10], f[11], f[12], f[13], f[14], f[15]), v = 0; v < k; v += 1) s[v] = this.matrix.props[v];
1878
- this.matrix.reset();
1879
- } else for (this.matrix.reset(), v = 0; v < k; v += 1) s[v] = this.matrix.props[v];
1880
- C += 1, r -= 1, i += a;
1881
- }
1882
- } else for (r = this._currentCopies, i = 0, a = 1; r; ) s = (e = this.elemsData[i].it)[e.length - 1].transform.mProps.v.props, e[e.length - 1].transform.mProps._mdf = !1, e[e.length - 1].transform.op._mdf = !1, r -= 1, i += a;
1883
- return h;
1884
- }, Ot.prototype.addShape = function() {
1885
- }, W([At], Se), Se.prototype.initModifierProperties = function(t, e) {
1886
- this.getValue = this.processKeys, this.rd = E.getProp(t, e.r, 0, null, this), this._isAnimated = !!this.rd.effectsSequence.length;
1887
- }, Se.prototype.processPath = function(t, e) {
1888
- var s, i = yt.newElement();
1889
- i.c = t.c;
1890
- var a, r, h, n, g, y, o, d, c, m, l, f, p = t._length, u = 0;
1891
- for (s = 0; s < p; s += 1) a = t.v[s], h = t.o[s], r = t.i[s], a[0] === h[0] && a[1] === h[1] && a[0] === r[0] && a[1] === r[1] ? s !== 0 && s !== p - 1 || t.c ? (n = s === 0 ? t.v[p - 1] : t.v[s - 1], y = (g = Math.sqrt(Math.pow(a[0] - n[0], 2) + Math.pow(a[1] - n[1], 2))) ? Math.min(g / 2, e) / g : 0, o = l = a[0] + (n[0] - a[0]) * y, d = f = a[1] - (a[1] - n[1]) * y, c = o - (o - a[0]) * Kt, m = d - (d - a[1]) * Kt, i.setTripleAt(o, d, c, m, l, f, u), u += 1, n = s === p - 1 ? t.v[0] : t.v[s + 1], y = (g = Math.sqrt(Math.pow(a[0] - n[0], 2) + Math.pow(a[1] - n[1], 2))) ? Math.min(g / 2, e) / g : 0, o = c = a[0] + (n[0] - a[0]) * y, d = m = a[1] + (n[1] - a[1]) * y, l = o - (o - a[0]) * Kt, f = d - (d - a[1]) * Kt, i.setTripleAt(o, d, c, m, l, f, u), u += 1) : (i.setTripleAt(a[0], a[1], h[0], h[1], r[0], r[1], u), u += 1) : (i.setTripleAt(t.v[s][0], t.v[s][1], t.o[s][0], t.o[s][1], t.i[s][0], t.i[s][1], u), u += 1);
1892
- return i;
1893
- }, Se.prototype.processShapes = function(t) {
1894
- var e, s, i, a, r, h, n = this.shapes.length, g = this.rd.v;
1895
- if (g !== 0) for (s = 0; s < n; s += 1) {
1896
- if (h = (r = this.shapes[s]).localShapeCollection, r.shape._mdf || this._mdf || t) for (h.releaseShapes(), r.shape._mdf = !0, e = r.shape.paths.shapes, a = r.shape.paths._length, i = 0; i < a; i += 1) h.addShape(this.processPath(e[i], g));
1897
- r.shape.paths = r.localShapeCollection;
1898
- }
1899
- this.dynamicProperties.length || (this._mdf = !1);
1900
- }, it.prototype.point = function(t) {
1901
- return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]];
1902
- }, it.prototype.derivative = function(t) {
1903
- return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]];
1904
- }, it.prototype.tangentAngle = function(t) {
1905
- var e = this.derivative(t);
1906
- return Math.atan2(e[1], e[0]);
1907
- }, it.prototype.normalAngle = function(t) {
1908
- var e = this.derivative(t);
1909
- return Math.atan2(e[0], e[1]);
1910
- }, it.prototype.inflectionPoints = function() {
1911
- var t = this.a[1] * this.b[0] - this.a[0] * this.b[1];
1912
- if (cs(t)) return [];
1913
- var e = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / t, s = e * e - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / t;
1914
- if (s < 0) return [];
1915
- var i = Math.sqrt(s);
1916
- return cs(i) ? i > 0 && i < 1 ? [e] : [] : [e - i, e + i].filter(function(a) {
1917
- return a > 0 && a < 1;
1918
- });
1919
- }, it.prototype.split = function(t) {
1920
- if (t <= 0) return [si(this.points[0]), this];
1921
- if (t >= 1) return [this, si(this.points[this.points.length - 1])];
1922
- var e = Ut(this.points[0], this.points[1], t), s = Ut(this.points[1], this.points[2], t), i = Ut(this.points[2], this.points[3], t), a = Ut(e, s, t), r = Ut(s, i, t), h = Ut(a, r, t);
1923
- return [new it(this.points[0], e, a, h, !0), new it(h, r, i, this.points[3], !0)];
1924
- }, it.prototype.bounds = function() {
1925
- return { x: ii(this, 0), y: ii(this, 1) };
1926
- }, it.prototype.boundingBox = function() {
1927
- var t = this.bounds();
1928
- return { left: t.x.min, right: t.x.max, top: t.y.min, bottom: t.y.max, width: t.x.max - t.x.min, height: t.y.max - t.y.min, cx: (t.x.max + t.x.min) / 2, cy: (t.y.max + t.y.min) / 2 };
1929
- }, it.prototype.intersections = function(t, e, s) {
1930
- e === void 0 && (e = 2), s === void 0 && (s = 7);
1931
- var i = [];
1932
- return Ae(Ge(this, 0, 1), Ge(t, 0, 1), 0, e, i, s), i;
1933
- }, it.shapeSegment = function(t, e) {
1934
- var s = (e + 1) % t.length();
1935
- return new it(t.v[e], t.o[e], t.i[s], t.v[s], !0);
1936
- }, it.shapeSegmentInverted = function(t, e) {
1937
- var s = (e + 1) % t.length();
1938
- return new it(t.v[s], t.i[s], t.o[e], t.v[e], !0);
1939
- }, W([At], we), we.prototype.initModifierProperties = function(t, e) {
1940
- this.getValue = this.processKeys, this.amplitude = E.getProp(t, e.s, 0, null, this), this.frequency = E.getProp(t, e.r, 0, null, this), this.pointsType = E.getProp(t, e.pt, 0, null, this), this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;
1941
- }, we.prototype.processPath = function(t, e, s, i) {
1942
- var a = t._length, r = yt.newElement();
1943
- if (r.c = t.c, t.c || (a -= 1), a === 0) return r;
1944
- var h = -1, n = it.shapeSegment(t, 0);
1945
- ni(r, t, 0, e, s, i, h);
1946
- for (var g = 0; g < a; g += 1) h = Yi(r, n, e, s, i, -h), n = g !== a - 1 || t.c ? it.shapeSegment(t, (g + 1) % a) : null, ni(r, t, g + 1, e, s, i, h);
1947
- return r;
1948
- }, we.prototype.processShapes = function(t) {
1949
- var e, s, i, a, r, h, n = this.shapes.length, g = this.amplitude.v, y = Math.max(0, Math.round(this.frequency.v)), o = this.pointsType.v;
1950
- if (g !== 0) for (s = 0; s < n; s += 1) {
1951
- if (h = (r = this.shapes[s]).localShapeCollection, r.shape._mdf || this._mdf || t) for (h.releaseShapes(), r.shape._mdf = !0, e = r.shape.paths.shapes, a = r.shape.paths._length, i = 0; i < a; i += 1) h.addShape(this.processPath(e[i], g, y, o));
1952
- r.shape.paths = r.localShapeCollection;
1953
- }
1954
- this.dynamicProperties.length || (this._mdf = !1);
1955
- }, W([At], Me), Me.prototype.initModifierProperties = function(t, e) {
1956
- this.getValue = this.processKeys, this.amount = E.getProp(t, e.a, 0, null, this), this.miterLimit = E.getProp(t, e.ml, 0, null, this), this.lineJoin = e.lj, this._isAnimated = this.amount.effectsSequence.length !== 0;
1957
- }, Me.prototype.processPath = function(t, e, s, i) {
1958
- var a = yt.newElement();
1959
- a.c = t.c;
1960
- var r, h, n, g = t.length();
1961
- t.c || (g -= 1);
1962
- var y = [];
1963
- for (r = 0; r < g; r += 1) n = it.shapeSegment(t, r), y.push(pi(n, e));
1964
- if (!t.c) for (r = g - 1; r >= 0; r -= 1) n = it.shapeSegmentInverted(t, r), y.push(pi(n, e));
1965
- y = function(m) {
1966
- for (var l, f = 1; f < m.length; f += 1) l = li(m[f - 1], m[f]), m[f - 1] = l[0], m[f] = l[1];
1967
- return m.length > 1 && (l = li(m[m.length - 1], m[0]), m[m.length - 1] = l[0], m[0] = l[1]), m;
1968
- }(y);
1969
- var o = null, d = null;
1970
- for (r = 0; r < y.length; r += 1) {
1971
- var c = y[r];
1972
- for (d && (o = oi(a, d, c[0], s, i)), d = c[c.length - 1], h = 0; h < c.length; h += 1) n = c[h], o && me(n.points[0], o) ? a.setXYAt(n.points[1][0], n.points[1][1], "o", a.length() - 1) : a.setTripleAt(n.points[0][0], n.points[0][1], n.points[1][0], n.points[1][1], n.points[0][0], n.points[0][1], a.length()), a.setTripleAt(n.points[3][0], n.points[3][1], n.points[3][0], n.points[3][1], n.points[2][0], n.points[2][1], a.length()), o = n.points[3];
1973
- }
1974
- return y.length && oi(a, d, y[0][0], s, i), a;
1975
- }, Me.prototype.processShapes = function(t) {
1976
- var e, s, i, a, r, h, n = this.shapes.length, g = this.amount.v, y = this.miterLimit.v, o = this.lineJoin;
1977
- if (g !== 0) for (s = 0; s < n; s += 1) {
1978
- if (h = (r = this.shapes[s]).localShapeCollection, r.shape._mdf || this._mdf || t) for (h.releaseShapes(), r.shape._mdf = !0, e = r.shape.paths.shapes, a = r.shape.paths._length, i = 0; i < a; i += 1) h.addShape(this.processPath(e[i], g, o, y));
1979
- r.shape.paths = r.localShapeCollection;
1980
- }
1981
- this.dynamicProperties.length || (this._mdf = !1);
1982
- };
1983
- var ne = function() {
1984
- var t = { w: 0, size: 0, shapes: [], data: { shapes: [] } }, e = [];
1985
- e = e.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
1986
- var s = 127988, i = ["d83cdffb", "d83cdffc", "d83cdffd", "d83cdffe", "d83cdfff"];
1987
- function a(o, d) {
1988
- var c = Pt("span");
1989
- c.setAttribute("aria-hidden", !0), c.style.fontFamily = d;
1990
- var m = Pt("span");
1991
- m.innerText = "giItT1WQy@!-/#", c.style.position = "absolute", c.style.left = "-10000px", c.style.top = "-10000px", c.style.fontSize = "300px", c.style.fontVariant = "normal", c.style.fontStyle = "normal", c.style.fontWeight = "normal", c.style.letterSpacing = "0", c.appendChild(m), document.body.appendChild(c);
1992
- var l = m.offsetWidth;
1993
- return m.style.fontFamily = function(f) {
1994
- var p, u = f.split(","), v = u.length, k = [];
1995
- for (p = 0; p < v; p += 1) u[p] !== "sans-serif" && u[p] !== "monospace" && k.push(u[p]);
1996
- return k.join(",");
1997
- }(o) + ", " + d, { node: m, w: l, parent: c };
1998
- }
1999
- function r(o, d) {
2000
- var c, m = document.body && d ? "svg" : "canvas", l = fi(o);
2001
- if (m === "svg") {
2002
- var f = z("text");
2003
- f.style.fontSize = "100px", f.setAttribute("font-family", o.fFamily), f.setAttribute("font-style", l.style), f.setAttribute("font-weight", l.weight), f.textContent = "1", o.fClass ? (f.style.fontFamily = "inherit", f.setAttribute("class", o.fClass)) : f.style.fontFamily = o.fFamily, d.appendChild(f), c = f;
2004
- } else {
2005
- var p = new OffscreenCanvas(500, 500).getContext("2d");
2006
- p.font = l.style + " " + l.weight + " 100px " + o.fFamily, c = p;
2007
- }
2008
- return { measureText: function(u) {
2009
- return m === "svg" ? (c.textContent = u, c.getComputedTextLength()) : c.measureText(u).width;
2010
- } };
2011
- }
2012
- function h(o) {
2013
- var d = 0, c = o.charCodeAt(0);
2014
- if (c >= 55296 && c <= 56319) {
2015
- var m = o.charCodeAt(1);
2016
- m >= 56320 && m <= 57343 && (d = 1024 * (c - 55296) + m - 56320 + 65536);
2017
- }
2018
- return d;
2019
- }
2020
- function n(o) {
2021
- var d = h(o);
2022
- return d >= 127462 && d <= 127487;
2023
- }
2024
- var g = function() {
2025
- this.fonts = [], this.chars = null, this.typekitLoaded = 0, this.isLoaded = !1, this._warned = !1, this.initTime = Date.now(), this.setIsLoadedBinded = this.setIsLoaded.bind(this), this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
2026
- };
2027
- g.isModifier = function(o, d) {
2028
- var c = o.toString(16) + d.toString(16);
2029
- return i.indexOf(c) !== -1;
2030
- }, g.isZeroWidthJoiner = function(o) {
2031
- return o === 8205;
2032
- }, g.isFlagEmoji = function(o) {
2033
- return n(o.substr(0, 2)) && n(o.substr(2, 2));
2034
- }, g.isRegionalCode = n, g.isCombinedCharacter = function(o) {
2035
- return e.indexOf(o) !== -1;
2036
- }, g.isRegionalFlag = function(o, d) {
2037
- var c = h(o.substr(d, 2));
2038
- if (c !== s) return !1;
2039
- var m = 0;
2040
- for (d += 2; m < 5; ) {
2041
- if ((c = h(o.substr(d, 2))) < 917601 || c > 917626) return !1;
2042
- m += 1, d += 2;
2043
- }
2044
- return h(o.substr(d, 2)) === 917631;
2045
- }, g.isVariationSelector = function(o) {
2046
- return o === 65039;
2047
- }, g.BLACK_FLAG_CODE_POINT = s;
2048
- var y = { addChars: function(o) {
2049
- if (o) {
2050
- var d;
2051
- this.chars || (this.chars = []);
2052
- var c, m, l = o.length, f = this.chars.length;
2053
- for (d = 0; d < l; d += 1) {
2054
- for (c = 0, m = !1; c < f; ) this.chars[c].style === o[d].style && this.chars[c].fFamily === o[d].fFamily && this.chars[c].ch === o[d].ch && (m = !0), c += 1;
2055
- m || (this.chars.push(o[d]), f += 1);
2056
- }
2057
- }
2058
- }, addFonts: function(o, d) {
2059
- if (o) {
2060
- if (this.chars) return this.isLoaded = !0, void (this.fonts = o.list);
2061
- if (!document.body) return this.isLoaded = !0, o.list.forEach(function(F) {
2062
- F.helper = r(F), F.cache = {};
2063
- }), void (this.fonts = o.list);
2064
- var c, m = o.list, l = m.length, f = l;
2065
- for (c = 0; c < l; c += 1) {
2066
- var p, u, v = !0;
2067
- if (m[c].loaded = !1, m[c].monoCase = a(m[c].fFamily, "monospace"), m[c].sansCase = a(m[c].fFamily, "sans-serif"), m[c].fPath) {
2068
- if (m[c].fOrigin === "p" || m[c].origin === 3) {
2069
- if ((p = document.querySelectorAll('style[f-forigin="p"][f-family="' + m[c].fFamily + '"], style[f-origin="3"][f-family="' + m[c].fFamily + '"]')).length > 0 && (v = !1), v) {
2070
- var k = Pt("style");
2071
- k.setAttribute("f-forigin", m[c].fOrigin), k.setAttribute("f-origin", m[c].origin), k.setAttribute("f-family", m[c].fFamily), k.type = "text/css", k.innerText = "@font-face {font-family: " + m[c].fFamily + "; font-style: normal; src: url('" + m[c].fPath + "');}", d.appendChild(k);
2072
- }
2073
- } else if (m[c].fOrigin === "g" || m[c].origin === 1) {
2074
- for (p = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'), u = 0; u < p.length; u += 1) p[u].href.indexOf(m[c].fPath) !== -1 && (v = !1);
2075
- if (v) {
2076
- var C = Pt("link");
2077
- C.setAttribute("f-forigin", m[c].fOrigin), C.setAttribute("f-origin", m[c].origin), C.type = "text/css", C.rel = "stylesheet", C.href = m[c].fPath, document.body.appendChild(C);
2078
- }
2079
- } else if (m[c].fOrigin === "t" || m[c].origin === 2) {
2080
- for (p = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'), u = 0; u < p.length; u += 1) m[c].fPath === p[u].src && (v = !1);
2081
- if (v) {
2082
- var A = Pt("link");
2083
- A.setAttribute("f-forigin", m[c].fOrigin), A.setAttribute("f-origin", m[c].origin), A.setAttribute("rel", "stylesheet"), A.setAttribute("href", m[c].fPath), d.appendChild(A);
2084
- }
2085
- }
2086
- } else m[c].loaded = !0, f -= 1;
2087
- m[c].helper = r(m[c], d), m[c].cache = {}, this.fonts.push(m[c]);
2088
- }
2089
- f === 0 ? this.isLoaded = !0 : setTimeout(this.checkLoadedFonts.bind(this), 100);
2090
- } else this.isLoaded = !0;
2091
- }, getCharData: function(o, d, c) {
2092
- for (var m = 0, l = this.chars.length; m < l; ) {
2093
- if (this.chars[m].ch === o && this.chars[m].style === d && this.chars[m].fFamily === c) return this.chars[m];
2094
- m += 1;
2095
- }
2096
- return (typeof o == "string" && o.charCodeAt(0) !== 13 || !o) && console && console.warn && !this._warned && (this._warned = !0, console.warn("Missing character from exported characters list: ", o, d, c)), t;
2097
- }, getFontByName: function(o) {
2098
- for (var d = 0, c = this.fonts.length; d < c; ) {
2099
- if (this.fonts[d].fName === o) return this.fonts[d];
2100
- d += 1;
2101
- }
2102
- return this.fonts[0];
2103
- }, measureText: function(o, d, c) {
2104
- var m = this.getFontByName(d), l = o;
2105
- if (!m.cache[l]) {
2106
- var f = m.helper;
2107
- if (o === " ") {
2108
- var p = f.measureText("|" + o + "|"), u = f.measureText("||");
2109
- m.cache[l] = (p - u) / 100;
2110
- } else m.cache[l] = f.measureText(o) / 100;
2111
- }
2112
- return m.cache[l] * c;
2113
- }, checkLoadedFonts: function() {
2114
- var o, d, c, m = this.fonts.length, l = m;
2115
- for (o = 0; o < m; o += 1) this.fonts[o].loaded ? l -= 1 : this.fonts[o].fOrigin === "n" || this.fonts[o].origin === 0 ? this.fonts[o].loaded = !0 : (d = this.fonts[o].monoCase.node, c = this.fonts[o].monoCase.w, d.offsetWidth !== c ? (l -= 1, this.fonts[o].loaded = !0) : (d = this.fonts[o].sansCase.node, c = this.fonts[o].sansCase.w, d.offsetWidth !== c && (l -= 1, this.fonts[o].loaded = !0)), this.fonts[o].loaded && (this.fonts[o].sansCase.parent.parentNode.removeChild(this.fonts[o].sansCase.parent), this.fonts[o].monoCase.parent.parentNode.removeChild(this.fonts[o].monoCase.parent)));
2116
- l !== 0 && Date.now() - this.initTime < 5e3 ? setTimeout(this.checkLoadedFontsBinded, 20) : setTimeout(this.setIsLoadedBinded, 10);
2117
- }, setIsLoaded: function() {
2118
- this.isLoaded = !0;
2119
- } };
2120
- return g.prototype = y, g;
2121
- }();
2122
- function ci(t) {
2123
- this.animationData = t;
2124
- }
2125
- function Zt() {
2126
- }
2127
- ci.prototype.getProp = function(t) {
2128
- return this.animationData.slots && this.animationData.slots[t.sid] ? Object.assign(t, this.animationData.slots[t.sid].p) : t;
2129
- }, Zt.prototype = { initRenderable: function() {
2130
- this.isInRange = !1, this.hidden = !1, this.isTransparent = !1, this.renderableComponents = [];
2131
- }, addRenderableComponent: function(t) {
2132
- this.renderableComponents.indexOf(t) === -1 && this.renderableComponents.push(t);
2133
- }, removeRenderableComponent: function(t) {
2134
- this.renderableComponents.indexOf(t) !== -1 && this.renderableComponents.splice(this.renderableComponents.indexOf(t), 1);
2135
- }, prepareRenderableFrame: function(t) {
2136
- this.checkLayerLimits(t);
2137
- }, checkTransparency: function() {
2138
- this.finalTransform.mProp.o.v <= 0 ? !this.isTransparent && this.globalData.renderConfig.hideOnTransparent && (this.isTransparent = !0, this.hide()) : this.isTransparent && (this.isTransparent = !1, this.show());
2139
- }, checkLayerLimits: function(t) {
2140
- this.data.ip - this.data.st <= t && this.data.op - this.data.st > t ? this.isInRange !== !0 && (this.globalData._mdf = !0, this._mdf = !0, this.isInRange = !0, this.show()) : this.isInRange !== !1 && (this.globalData._mdf = !0, this.isInRange = !1, this.hide());
2141
- }, renderRenderable: function() {
2142
- var t, e = this.renderableComponents.length;
2143
- for (t = 0; t < e; t += 1) this.renderableComponents[t].renderFrame(this._isFirstFrame);
2144
- }, sourceRectAtTime: function() {
2145
- return { top: 0, left: 0, width: 100, height: 100 };
2146
- }, getLayerSize: function() {
2147
- return this.data.ty === 5 ? { w: this.data.textData.width, h: this.data.textData.height } : { w: this.data.width, h: this.data.height };
2148
- } };
2149
- var di, Ue = (di = { 0: "source-over", 1: "multiply", 2: "screen", 3: "overlay", 4: "darken", 5: "lighten", 6: "color-dodge", 7: "color-burn", 8: "hard-light", 9: "soft-light", 10: "difference", 11: "exclusion", 12: "hue", 13: "saturation", 14: "color", 15: "luminosity" }, function(t) {
2150
- return di[t] || "";
2151
- });
2152
- function Xi(t, e, s) {
2153
- this.p = E.getProp(e, t.v, 0, 0, s);
2154
- }
2155
- function Hi(t, e, s) {
2156
- this.p = E.getProp(e, t.v, 0, 0, s);
2157
- }
2158
- function Gi(t, e, s) {
2159
- this.p = E.getProp(e, t.v, 1, 0, s);
2160
- }
2161
- function Ki(t, e, s) {
2162
- this.p = E.getProp(e, t.v, 1, 0, s);
2163
- }
2164
- function Ui(t, e, s) {
2165
- this.p = E.getProp(e, t.v, 0, 0, s);
2166
- }
2167
- function Zi(t, e, s) {
2168
- this.p = E.getProp(e, t.v, 0, 0, s);
2169
- }
2170
- function $i(t, e, s) {
2171
- this.p = E.getProp(e, t.v, 0, 0, s);
2172
- }
2173
- function Qi() {
2174
- this.p = {};
2175
- }
2176
- function ui(t, e) {
2177
- var s, i = t.ef || [];
2178
- this.effectElements = [];
2179
- var a, r = i.length;
2180
- for (s = 0; s < r; s += 1) a = new Te(i[s], e), this.effectElements.push(a);
2181
- }
2182
- function Te(t, e) {
2183
- this.init(t, e);
2184
- }
2185
- function wt() {
2186
- }
2187
- function Mt() {
2188
- }
2189
- function $t(t, e, s) {
2190
- this.initFrame(), this.initRenderable(), this.assetData = e.getAssetData(t.refId), this.footageData = e.imageLoader.getAsset(this.assetData), this.initBaseData(t, e, s);
2191
- }
2192
- function xt(t, e, s) {
2193
- this.initFrame(), this.initRenderable(), this.assetData = e.getAssetData(t.refId), this.initBaseData(t, e, s), this._isPlaying = !1, this._canPlay = !1;
2194
- var i = this.globalData.getAssetsPath(this.assetData);
2195
- this.audio = this.globalData.audioController.createAudio(i), this._currentTime = 0, this.globalData.audioController.addAudio(this), this._volumeMultiplier = 1, this._volume = 1, this._previousVolume = null, this.tm = t.tm ? E.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 }, this.lv = E.getProp(this, t.au && t.au.lv ? t.au.lv : { k: [100] }, 1, 0.01, this);
2196
- }
2197
- function mt() {
2198
- }
2199
- W([ut], Te), Te.prototype.getValue = Te.prototype.iterateDynamicProperties, Te.prototype.init = function(t, e) {
2200
- var s;
2201
- this.data = t, this.effectElements = [], this.initDynamicPropertyContainer(e);
2202
- var i, a = this.data.ef.length, r = this.data.ef;
2203
- for (s = 0; s < a; s += 1) {
2204
- switch (i = null, r[s].ty) {
2205
- case 0:
2206
- i = new Xi(r[s], e, this);
2207
- break;
2208
- case 1:
2209
- i = new Hi(r[s], e, this);
2210
- break;
2211
- case 2:
2212
- i = new Gi(r[s], e, this);
2213
- break;
2214
- case 3:
2215
- i = new Ki(r[s], e, this);
2216
- break;
2217
- case 4:
2218
- case 7:
2219
- i = new $i(r[s], e, this);
2220
- break;
2221
- case 10:
2222
- i = new Ui(r[s], e, this);
2223
- break;
2224
- case 11:
2225
- i = new Zi(r[s], e, this);
2226
- break;
2227
- case 5:
2228
- i = new ui(r[s], e);
2229
- break;
2230
- default:
2231
- i = new Qi(r[s]);
2232
- }
2233
- i && this.effectElements.push(i);
2234
- }
2235
- }, wt.prototype = { checkMasks: function() {
2236
- if (!this.data.hasMask) return !1;
2237
- for (var t = 0, e = this.data.masksProperties.length; t < e; ) {
2238
- if (this.data.masksProperties[t].mode !== "n" && this.data.masksProperties[t].cl !== !1) return !0;
2239
- t += 1;
2240
- }
2241
- return !1;
2242
- }, initExpressions: function() {
2243
- }, setBlendMode: function() {
2244
- var t = Ue(this.data.bm);
2245
- (this.baseElement || this.layerElement).style["mix-blend-mode"] = t;
2246
- }, initBaseData: function(t, e, s) {
2247
- this.globalData = e, this.comp = s, this.data = t, this.layerId = Ct(), this.data.sr || (this.data.sr = 1), this.effectsManager = new ui(this.data, this, this.dynamicProperties);
2248
- }, getType: function() {
2249
- return this.type;
2250
- }, sourceRectAtTime: function() {
2251
- } }, Mt.prototype = { initFrame: function() {
2252
- this._isFirstFrame = !1, this.dynamicProperties = [], this._mdf = !1;
2253
- }, prepareProperties: function(t, e) {
2254
- var s, i = this.dynamicProperties.length;
2255
- for (s = 0; s < i; s += 1) (e || this._isParent && this.dynamicProperties[s].propType === "transform") && (this.dynamicProperties[s].getValue(), this.dynamicProperties[s]._mdf && (this.globalData._mdf = !0, this._mdf = !0));
2256
- }, addDynamicProperty: function(t) {
2257
- this.dynamicProperties.indexOf(t) === -1 && this.dynamicProperties.push(t);
2258
- } }, $t.prototype.prepareFrame = function() {
2259
- }, W([Zt, wt, Mt], $t), $t.prototype.getBaseElement = function() {
2260
- return null;
2261
- }, $t.prototype.renderFrame = function() {
2262
- }, $t.prototype.destroy = function() {
2263
- }, $t.prototype.initExpressions = function() {
2264
- }, $t.prototype.getFootageData = function() {
2265
- return this.footageData;
2266
- }, xt.prototype.prepareFrame = function(t) {
2267
- if (this.prepareRenderableFrame(t, !0), this.prepareProperties(t, !0), this.tm._placeholder) this._currentTime = t / this.data.sr;
2268
- else {
2269
- var e = this.tm.v;
2270
- this._currentTime = e;
2271
- }
2272
- this._volume = this.lv.v[0];
2273
- var s = this._volume * this._volumeMultiplier;
2274
- this._previousVolume !== s && (this._previousVolume = s, this.audio.volume(s));
2275
- }, W([Zt, wt, Mt], xt), xt.prototype.renderFrame = function() {
2276
- this.isInRange && this._canPlay && (this._isPlaying ? (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) && this.audio.seek(this._currentTime / this.globalData.frameRate) : (this.audio.play(), this.audio.seek(this._currentTime / this.globalData.frameRate), this._isPlaying = !0));
2277
- }, xt.prototype.show = function() {
2278
- }, xt.prototype.hide = function() {
2279
- this.audio.pause(), this._isPlaying = !1;
2280
- }, xt.prototype.pause = function() {
2281
- this.audio.pause(), this._isPlaying = !1, this._canPlay = !1;
2282
- }, xt.prototype.resume = function() {
2283
- this._canPlay = !0;
2284
- }, xt.prototype.setRate = function(t) {
2285
- this.audio.rate(t);
2286
- }, xt.prototype.volume = function(t) {
2287
- this._volumeMultiplier = t, this._previousVolume = t * this._volume, this.audio.volume(this._previousVolume);
2288
- }, xt.prototype.getBaseElement = function() {
2289
- return null;
2290
- }, xt.prototype.destroy = function() {
2291
- }, xt.prototype.sourceRectAtTime = function() {
2292
- }, xt.prototype.initExpressions = function() {
2293
- }, mt.prototype.checkLayers = function(t) {
2294
- var e, s, i = this.layers.length;
2295
- for (this.completeLayers = !0, e = i - 1; e >= 0; e -= 1) this.elements[e] || (s = this.layers[e]).ip - s.st <= t - this.layers[e].st && s.op - s.st > t - this.layers[e].st && this.buildItem(e), this.completeLayers = !!this.elements[e] && this.completeLayers;
2296
- this.checkPendingElements();
2297
- }, mt.prototype.createItem = function(t) {
2298
- switch (t.ty) {
2299
- case 2:
2300
- return this.createImage(t);
2301
- case 0:
2302
- return this.createComp(t);
2303
- case 1:
2304
- return this.createSolid(t);
2305
- case 3:
2306
- default:
2307
- return this.createNull(t);
2308
- case 4:
2309
- return this.createShape(t);
2310
- case 5:
2311
- return this.createText(t);
2312
- case 6:
2313
- return this.createAudio(t);
2314
- case 13:
2315
- return this.createCamera(t);
2316
- case 15:
2317
- return this.createFootage(t);
2318
- }
2319
- }, mt.prototype.createCamera = function() {
2320
- throw new Error("You're using a 3d camera. Try the html renderer.");
2321
- }, mt.prototype.createAudio = function(t) {
2322
- return new xt(t, this.globalData, this);
2323
- }, mt.prototype.createFootage = function(t) {
2324
- return new $t(t, this.globalData, this);
2325
- }, mt.prototype.buildAllItems = function() {
2326
- var t, e = this.layers.length;
2327
- for (t = 0; t < e; t += 1) this.buildItem(t);
2328
- this.checkPendingElements();
2329
- }, mt.prototype.includeLayers = function(t) {
2330
- var e;
2331
- this.completeLayers = !1;
2332
- var s, i = t.length, a = this.layers.length;
2333
- for (e = 0; e < i; e += 1) for (s = 0; s < a; ) {
2334
- if (this.layers[s].id === t[e].id) {
2335
- this.layers[s] = t[e];
2336
- break;
2337
- }
2338
- s += 1;
2339
- }
2340
- }, mt.prototype.setProjectInterface = function(t) {
2341
- this.globalData.projectInterface = t;
2342
- }, mt.prototype.initItems = function() {
2343
- this.globalData.progressiveLoad || this.buildAllItems();
2344
- }, mt.prototype.buildElementParenting = function(t, e, s) {
2345
- for (var i = this.elements, a = this.layers, r = 0, h = a.length; r < h; ) a[r].ind == e && (i[r] && i[r] !== !0 ? (s.push(i[r]), i[r].setAsParent(), a[r].parent !== void 0 ? this.buildElementParenting(t, a[r].parent, s) : t.setHierarchy(s)) : (this.buildItem(r), this.addPendingElement(t))), r += 1;
2346
- }, mt.prototype.addPendingElement = function(t) {
2347
- this.pendingElements.push(t);
2348
- }, mt.prototype.searchExtraCompositions = function(t) {
2349
- var e, s = t.length;
2350
- for (e = 0; e < s; e += 1) if (t[e].xt) {
2351
- var i = this.createComp(t[e]);
2352
- i.initExpressions(), this.globalData.projectInterface.registerComposition(i);
2353
- }
2354
- }, mt.prototype.getElementById = function(t) {
2355
- var e, s = this.elements.length;
2356
- for (e = 0; e < s; e += 1) if (this.elements[e].data.ind === t) return this.elements[e];
2357
- return null;
2358
- }, mt.prototype.getElementByPath = function(t) {
2359
- var e, s = t.shift();
2360
- if (typeof s == "number") e = this.elements[s];
2361
- else {
2362
- var i, a = this.elements.length;
2363
- for (i = 0; i < a; i += 1) if (this.elements[i].data.nm === s) {
2364
- e = this.elements[i];
2365
- break;
2366
- }
2367
- }
2368
- return t.length === 0 ? e : e.getElementByPath(t);
2369
- }, mt.prototype.setupGlobalData = function(t, e) {
2370
- this.globalData.fontManager = new ne(), this.globalData.slotManager = function(s) {
2371
- return new ci(s);
2372
- }(t), this.globalData.fontManager.addChars(t.chars), this.globalData.fontManager.addFonts(t.fonts, e), this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem), this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem), this.globalData.imageLoader = this.animationItem.imagePreloader, this.globalData.audioController = this.animationItem.audioController, this.globalData.frameId = 0, this.globalData.frameRate = t.fr, this.globalData.nm = t.nm, this.globalData.compSize = { w: t.w, h: t.h };
2373
- };
2374
- var mi = "transformEFfect";
2375
- function Nt() {
2376
- }
2377
- function Qt(t, e, s) {
2378
- this.data = t, this.element = e, this.globalData = s, this.storedData = [], this.masksProperties = this.data.masksProperties || [], this.maskElement = null;
2379
- var i, a, r = this.globalData.defs, h = this.masksProperties ? this.masksProperties.length : 0;
2380
- this.viewData = K(h), this.solidPath = "";
2381
- var n, g, y, o, d, c, m = this.masksProperties, l = 0, f = [], p = Ct(), u = "clipPath", v = "clip-path";
2382
- for (i = 0; i < h; i += 1) if ((m[i].mode !== "a" && m[i].mode !== "n" || m[i].inv || m[i].o.k !== 100 || m[i].o.x) && (u = "mask", v = "mask"), m[i].mode !== "s" && m[i].mode !== "i" || l !== 0 ? y = null : ((y = z("rect")).setAttribute("fill", "#ffffff"), y.setAttribute("width", this.element.comp.data.w || 0), y.setAttribute("height", this.element.comp.data.h || 0), f.push(y)), a = z("path"), m[i].mode === "n") this.viewData[i] = { op: E.getProp(this.element, m[i].o, 0, 0.01, this.element), prop: de.getShapeProp(this.element, m[i], 3), elem: a, lastPath: "" }, r.appendChild(a);
2383
- else {
2384
- var k;
2385
- if (l += 1, a.setAttribute("fill", m[i].mode === "s" ? "#000000" : "#ffffff"), a.setAttribute("clip-rule", "nonzero"), m[i].x.k !== 0 ? (u = "mask", v = "mask", c = E.getProp(this.element, m[i].x, 0, null, this.element), k = Ct(), (o = z("filter")).setAttribute("id", k), (d = z("feMorphology")).setAttribute("operator", "erode"), d.setAttribute("in", "SourceGraphic"), d.setAttribute("radius", "0"), o.appendChild(d), r.appendChild(o), a.setAttribute("stroke", m[i].mode === "s" ? "#000000" : "#ffffff")) : (d = null, c = null), this.storedData[i] = { elem: a, x: c, expan: d, lastPath: "", lastOperator: "", filterId: k, lastRadius: 0 }, m[i].mode === "i") {
2386
- g = f.length;
2387
- var C = z("g");
2388
- for (n = 0; n < g; n += 1) C.appendChild(f[n]);
2389
- var A = z("mask");
2390
- A.setAttribute("mask-type", "alpha"), A.setAttribute("id", p + "_" + l), A.appendChild(a), r.appendChild(A), C.setAttribute("mask", "url(" + dt() + "#" + p + "_" + l + ")"), f.length = 0, f.push(C);
2391
- } else f.push(a);
2392
- m[i].inv && !this.solidPath && (this.solidPath = this.createLayerSolidPath()), this.viewData[i] = { elem: a, lastPath: "", op: E.getProp(this.element, m[i].o, 0, 0.01, this.element), prop: de.getShapeProp(this.element, m[i], 3), invRect: y }, this.viewData[i].prop.k || this.drawPath(m[i], this.viewData[i].prop.v, this.viewData[i]);
2393
- }
2394
- for (this.maskElement = z(u), h = f.length, i = 0; i < h; i += 1) this.maskElement.appendChild(f[i]);
2395
- l > 0 && (this.maskElement.setAttribute("id", p), this.element.maskedElement.setAttribute(v, "url(" + dt() + "#" + p + ")"), r.appendChild(this.maskElement)), this.viewData.length && this.element.addRenderableComponent(this);
2396
- }
2397
- Nt.prototype = { initTransform: function() {
2398
- var t = new st();
2399
- this.finalTransform = { mProp: this.data.ks ? Xe.getTransformProperty(this, this.data.ks, this) : { o: 0 }, _matMdf: !1, _localMatMdf: !1, _opMdf: !1, mat: t, localMat: t, localOpacity: 1 }, this.data.ao && (this.finalTransform.mProp.autoOriented = !0), this.data.ty;
2400
- }, renderTransform: function() {
2401
- if (this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame, this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame, this.hierarchy) {
2402
- var t, e = this.finalTransform.mat, s = 0, i = this.hierarchy.length;
2403
- if (!this.finalTransform._matMdf) for (; s < i; ) {
2404
- if (this.hierarchy[s].finalTransform.mProp._mdf) {
2405
- this.finalTransform._matMdf = !0;
2406
- break;
2407
- }
2408
- s += 1;
2409
- }
2410
- if (this.finalTransform._matMdf) for (t = this.finalTransform.mProp.v.props, e.cloneFromProps(t), s = 0; s < i; s += 1) e.multiply(this.hierarchy[s].finalTransform.mProp.v);
2411
- }
2412
- this.localTransforms && !this.finalTransform._matMdf || (this.finalTransform._localMatMdf = this.finalTransform._matMdf), this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v);
2413
- }, renderLocalTransform: function() {
2414
- if (this.localTransforms) {
2415
- var t = 0, e = this.localTransforms.length;
2416
- if (this.finalTransform._localMatMdf = this.finalTransform._matMdf, !this.finalTransform._localMatMdf || !this.finalTransform._opMdf) for (; t < e; ) this.localTransforms[t]._mdf && (this.finalTransform._localMatMdf = !0), this.localTransforms[t]._opMdf && !this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v, this.finalTransform._opMdf = !0), t += 1;
2417
- if (this.finalTransform._localMatMdf) {
2418
- var s = this.finalTransform.localMat;
2419
- for (this.localTransforms[0].matrix.clone(s), t = 1; t < e; t += 1) {
2420
- var i = this.localTransforms[t].matrix;
2421
- s.multiply(i);
2422
- }
2423
- s.multiply(this.finalTransform.mat);
2424
- }
2425
- if (this.finalTransform._opMdf) {
2426
- var a = this.finalTransform.localOpacity;
2427
- for (t = 0; t < e; t += 1) a *= 0.01 * this.localTransforms[t].opacity;
2428
- this.finalTransform.localOpacity = a;
2429
- }
2430
- }
2431
- }, searchEffectTransforms: function() {
2432
- if (this.renderableEffectsManager) {
2433
- var t = this.renderableEffectsManager.getEffects(mi);
2434
- if (t.length) {
2435
- this.localTransforms = [], this.finalTransform.localMat = new st();
2436
- var e = 0, s = t.length;
2437
- for (e = 0; e < s; e += 1) this.localTransforms.push(t[e]);
2438
- }
2439
- }
2440
- }, globalToLocal: function(t) {
2441
- var e = [];
2442
- e.push(this.finalTransform);
2443
- for (var s, i = !0, a = this.comp; i; ) a.finalTransform ? (a.data.hasMask && e.splice(0, 0, a.finalTransform), a = a.comp) : i = !1;
2444
- var r, h = e.length;
2445
- for (s = 0; s < h; s += 1) r = e[s].mat.applyToPointArray(0, 0, 0), t = [t[0] - r[0], t[1] - r[1], 0];
2446
- return t;
2447
- }, mHelper: new st() }, Qt.prototype.getMaskProperty = function(t) {
2448
- return this.viewData[t].prop;
2449
- }, Qt.prototype.renderFrame = function(t) {
2450
- var e, s = this.element.finalTransform.mat, i = this.masksProperties.length;
2451
- for (e = 0; e < i; e += 1) if ((this.viewData[e].prop._mdf || t) && this.drawPath(this.masksProperties[e], this.viewData[e].prop.v, this.viewData[e]), (this.viewData[e].op._mdf || t) && this.viewData[e].elem.setAttribute("fill-opacity", this.viewData[e].op.v), this.masksProperties[e].mode !== "n" && (this.viewData[e].invRect && (this.element.finalTransform.mProp._mdf || t) && this.viewData[e].invRect.setAttribute("transform", s.getInverseMatrix().to2dCSS()), this.storedData[e].x && (this.storedData[e].x._mdf || t))) {
2452
- var a = this.storedData[e].expan;
2453
- this.storedData[e].x.v < 0 ? (this.storedData[e].lastOperator !== "erode" && (this.storedData[e].lastOperator = "erode", this.storedData[e].elem.setAttribute("filter", "url(" + dt() + "#" + this.storedData[e].filterId + ")")), a.setAttribute("radius", -this.storedData[e].x.v)) : (this.storedData[e].lastOperator !== "dilate" && (this.storedData[e].lastOperator = "dilate", this.storedData[e].elem.setAttribute("filter", null)), this.storedData[e].elem.setAttribute("stroke-width", 2 * this.storedData[e].x.v));
2454
- }
2455
- }, Qt.prototype.getMaskelement = function() {
2456
- return this.maskElement;
2457
- }, Qt.prototype.createLayerSolidPath = function() {
2458
- var t = "M0,0 ";
2459
- return t += " h" + this.globalData.compSize.w, t += " v" + this.globalData.compSize.h, t += " h-" + this.globalData.compSize.w, t += " v-" + this.globalData.compSize.h + " ";
2460
- }, Qt.prototype.drawPath = function(t, e, s) {
2461
- var i, a, r = " M" + e.v[0][0] + "," + e.v[0][1];
2462
- for (a = e._length, i = 1; i < a; i += 1) r += " C" + e.o[i - 1][0] + "," + e.o[i - 1][1] + " " + e.i[i][0] + "," + e.i[i][1] + " " + e.v[i][0] + "," + e.v[i][1];
2463
- if (e.c && a > 1 && (r += " C" + e.o[i - 1][0] + "," + e.o[i - 1][1] + " " + e.i[0][0] + "," + e.i[0][1] + " " + e.v[0][0] + "," + e.v[0][1]), s.lastPath !== r) {
2464
- var h = "";
2465
- s.elem && (e.c && (h = t.inv ? this.solidPath + r : r), s.elem.setAttribute("d", h)), s.lastPath = r;
2466
- }
2467
- }, Qt.prototype.destroy = function() {
2468
- this.element = null, this.globalData = null, this.maskElement = null, this.data = null, this.masksProperties = null;
2469
- };
2470
- var Fe = function() {
2471
- var t = {};
2472
- return t.createFilter = function(e, s) {
2473
- var i = z("filter");
2474
- return i.setAttribute("id", e), s !== !0 && (i.setAttribute("filterUnits", "objectBoundingBox"), i.setAttribute("x", "0%"), i.setAttribute("y", "0%"), i.setAttribute("width", "100%"), i.setAttribute("height", "100%")), i;
2475
- }, t.createAlphaToLuminanceFilter = function() {
2476
- var e = z("feColorMatrix");
2477
- return e.setAttribute("type", "matrix"), e.setAttribute("color-interpolation-filters", "sRGB"), e.setAttribute("values", "0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"), e;
2478
- }, t;
2479
- }(), Ze = function() {
2480
- var t = { maskType: !0, svgLumaHidden: !0, offscreenCanvas: typeof OffscreenCanvas < "u" };
2481
- return (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) && (t.maskType = !1), /firefox/i.test(navigator.userAgent) && (t.svgLumaHidden = !1), t;
2482
- }(), gs = {}, gi = "filter_result_";
2483
- function ys(t) {
2484
- var e, s, i = "SourceGraphic", a = t.data.ef ? t.data.ef.length : 0, r = Ct(), h = Fe.createFilter(r, !0), n = 0;
2485
- for (this.filters = [], e = 0; e < a; e += 1) {
2486
- s = null;
2487
- var g = t.data.ef[e].ty;
2488
- gs[g] && (s = new gs[g].effect(h, t.effectsManager.effectElements[e], t, gi + n, i), i = gi + n, gs[g].countsAsEffect && (n += 1)), s && this.filters.push(s);
2489
- }
2490
- n && (t.globalData.defs.appendChild(h), t.layerElement.setAttribute("filter", "url(" + dt() + "#" + r + ")")), this.filters.length && t.addRenderableComponent(this);
2491
- }
2492
- function Ee() {
2493
- }
2494
- function qt() {
2495
- }
2496
- function ye() {
2497
- }
2498
- function oe(t, e, s) {
2499
- this.assetData = e.getAssetData(t.refId), this.assetData && this.assetData.sid && (this.assetData = e.slotManager.getProp(this.assetData)), this.initElement(t, e, s), this.sourceRect = { top: 0, left: 0, width: this.assetData.w, height: this.assetData.h };
2500
- }
2501
- function ta(t, e) {
2502
- this.elem = t, this.pos = e;
2503
- }
2504
- function vs() {
2505
- }
2506
- ys.prototype.renderFrame = function(t) {
2507
- var e, s = this.filters.length;
2508
- for (e = 0; e < s; e += 1) this.filters[e].renderFrame(t);
2509
- }, ys.prototype.getEffects = function(t) {
2510
- var e, s = this.filters.length, i = [];
2511
- for (e = 0; e < s; e += 1) this.filters[e].type === t && i.push(this.filters[e]);
2512
- return i;
2513
- }, Ee.prototype = { initRendererElement: function() {
2514
- this.layerElement = z("g");
2515
- }, createContainerElements: function() {
2516
- this.matteElement = z("g"), this.transformedElement = this.layerElement, this.maskedElement = this.layerElement, this._sizeChanged = !1;
2517
- var t = null;
2518
- if (this.data.td) {
2519
- this.matteMasks = {};
2520
- var e = z("g");
2521
- e.setAttribute("id", this.layerId), e.appendChild(this.layerElement), t = e, this.globalData.defs.appendChild(e);
2522
- } else this.data.tt ? (this.matteElement.appendChild(this.layerElement), t = this.matteElement, this.baseElement = this.matteElement) : this.baseElement = this.layerElement;
2523
- if (this.data.ln && this.layerElement.setAttribute("id", this.data.ln), this.data.cl && this.layerElement.setAttribute("class", this.data.cl), this.data.ty === 0 && !this.data.hd) {
2524
- var s = z("clipPath"), i = z("path");
2525
- i.setAttribute("d", "M0,0 L" + this.data.w + ",0 L" + this.data.w + "," + this.data.h + " L0," + this.data.h + "z");
2526
- var a = Ct();
2527
- if (s.setAttribute("id", a), s.appendChild(i), this.globalData.defs.appendChild(s), this.checkMasks()) {
2528
- var r = z("g");
2529
- r.setAttribute("clip-path", "url(" + dt() + "#" + a + ")"), r.appendChild(this.layerElement), this.transformedElement = r, t ? t.appendChild(this.transformedElement) : this.baseElement = this.transformedElement;
2530
- } else this.layerElement.setAttribute("clip-path", "url(" + dt() + "#" + a + ")");
2531
- }
2532
- this.data.bm !== 0 && this.setBlendMode();
2533
- }, renderElement: function() {
2534
- this.finalTransform._localMatMdf && this.transformedElement.setAttribute("transform", this.finalTransform.localMat.to2dCSS()), this.finalTransform._opMdf && this.transformedElement.setAttribute("opacity", this.finalTransform.localOpacity);
2535
- }, destroyBaseElement: function() {
2536
- this.layerElement = null, this.matteElement = null, this.maskManager.destroy();
2537
- }, getBaseElement: function() {
2538
- return this.data.hd ? null : this.baseElement;
2539
- }, createRenderableComponents: function() {
2540
- this.maskManager = new Qt(this.data, this, this.globalData), this.renderableEffectsManager = new ys(this), this.searchEffectTransforms();
2541
- }, getMatte: function(t) {
2542
- if (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t]) {
2543
- var e, s, i, a, r = this.layerId + "_" + t;
2544
- if (t === 1 || t === 3) {
2545
- var h = z("mask");
2546
- h.setAttribute("id", r), h.setAttribute("mask-type", t === 3 ? "luminance" : "alpha"), (i = z("use")).setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), h.appendChild(i), this.globalData.defs.appendChild(h), Ze.maskType || t !== 1 || (h.setAttribute("mask-type", "luminance"), e = Ct(), s = Fe.createFilter(e), this.globalData.defs.appendChild(s), s.appendChild(Fe.createAlphaToLuminanceFilter()), (a = z("g")).appendChild(i), h.appendChild(a), a.setAttribute("filter", "url(" + dt() + "#" + e + ")"));
2547
- } else if (t === 2) {
2548
- var n = z("mask");
2549
- n.setAttribute("id", r), n.setAttribute("mask-type", "alpha");
2550
- var g = z("g");
2551
- n.appendChild(g), e = Ct(), s = Fe.createFilter(e);
2552
- var y = z("feComponentTransfer");
2553
- y.setAttribute("in", "SourceGraphic"), s.appendChild(y);
2554
- var o = z("feFuncA");
2555
- o.setAttribute("type", "table"), o.setAttribute("tableValues", "1.0 0.0"), y.appendChild(o), this.globalData.defs.appendChild(s);
2556
- var d = z("rect");
2557
- d.setAttribute("width", this.comp.data.w), d.setAttribute("height", this.comp.data.h), d.setAttribute("x", "0"), d.setAttribute("y", "0"), d.setAttribute("fill", "#ffffff"), d.setAttribute("opacity", "0"), g.setAttribute("filter", "url(" + dt() + "#" + e + ")"), g.appendChild(d), (i = z("use")).setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), g.appendChild(i), Ze.maskType || (n.setAttribute("mask-type", "luminance"), s.appendChild(Fe.createAlphaToLuminanceFilter()), a = z("g"), g.appendChild(d), a.appendChild(this.layerElement), g.appendChild(a)), this.globalData.defs.appendChild(n);
2558
- }
2559
- this.matteMasks[t] = r;
2560
- }
2561
- return this.matteMasks[t];
2562
- }, setMatte: function(t) {
2563
- this.matteElement && this.matteElement.setAttribute("mask", "url(" + dt() + "#" + t + ")");
2564
- } }, qt.prototype = { initHierarchy: function() {
2565
- this.hierarchy = [], this._isParent = !1, this.checkParenting();
2566
- }, setHierarchy: function(t) {
2567
- this.hierarchy = t;
2568
- }, setAsParent: function() {
2569
- this._isParent = !0;
2570
- }, checkParenting: function() {
2571
- this.data.parent !== void 0 && this.comp.buildElementParenting(this, this.data.parent, []);
2572
- } }, W([Zt, Ti({ initElement: function(t, e, s) {
2573
- this.initFrame(), this.initBaseData(t, e, s), this.initTransform(t, e, s), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide();
2574
- }, hide: function() {
2575
- this.hidden || this.isInRange && !this.isTransparent || ((this.baseElement || this.layerElement).style.display = "none", this.hidden = !0);
2576
- }, show: function() {
2577
- this.isInRange && !this.isTransparent && (this.data.hd || ((this.baseElement || this.layerElement).style.display = "block"), this.hidden = !1, this._isFirstFrame = !0);
2578
- }, renderFrame: function() {
2579
- this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame && (this._isFirstFrame = !1));
2580
- }, renderInnerContent: function() {
2581
- }, prepareFrame: function(t) {
2582
- this._mdf = !1, this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange), this.checkTransparency();
2583
- }, destroy: function() {
2584
- this.innerElem = null, this.destroyBaseElement();
2585
- } })], ye), W([wt, Nt, Ee, qt, Mt, ye], oe), oe.prototype.createContent = function() {
2586
- var t = this.globalData.getAssetsPath(this.assetData);
2587
- this.innerElem = z("image"), this.innerElem.setAttribute("width", this.assetData.w + "px"), this.innerElem.setAttribute("height", this.assetData.h + "px"), this.innerElem.setAttribute("preserveAspectRatio", this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio), this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink", "href", t), this.layerElement.appendChild(this.innerElem);
2588
- }, oe.prototype.sourceRectAtTime = function() {
2589
- return this.sourceRect;
2590
- }, vs.prototype = { addShapeToModifiers: function(t) {
2591
- var e, s = this.shapeModifiers.length;
2592
- for (e = 0; e < s; e += 1) this.shapeModifiers[e].addShape(t);
2593
- }, isShapeInAnimatedModifiers: function(t) {
2594
- for (var e = this.shapeModifiers.length; 0 < e; ) if (this.shapeModifiers[0].isAnimatedWithShape(t)) return !0;
2595
- return !1;
2596
- }, renderModifiers: function() {
2597
- if (this.shapeModifiers.length) {
2598
- var t, e = this.shapes.length;
2599
- for (t = 0; t < e; t += 1) this.shapes[t].sh.reset();
2600
- for (t = (e = this.shapeModifiers.length) - 1; t >= 0 && !this.shapeModifiers[t].processShapes(this._isFirstFrame); t -= 1) ;
2601
- }
2602
- }, searchProcessedElement: function(t) {
2603
- for (var e = this.processedElements, s = 0, i = e.length; s < i; ) {
2604
- if (e[s].elem === t) return e[s].pos;
2605
- s += 1;
2606
- }
2607
- return 0;
2608
- }, addProcessedElement: function(t, e) {
2609
- for (var s = this.processedElements, i = s.length; i; ) if (s[i -= 1].elem === t) return void (s[i].pos = e);
2610
- s.push(new ta(t, e));
2611
- }, prepareFrame: function(t) {
2612
- this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange);
2613
- } };
2614
- var bs = { 1: "butt", 2: "round", 3: "square" }, _s = { 1: "miter", 2: "round", 3: "bevel" };
2615
- function Cs(t, e, s) {
2616
- this.caches = [], this.styles = [], this.transformers = t, this.lStr = "", this.sh = s, this.lvl = e, this._isAnimated = !!s.k;
2617
- for (var i = 0, a = t.length; i < a; ) {
2618
- if (t[i].mProps.dynamicProperties.length) {
2619
- this._isAnimated = !0;
2620
- break;
2621
- }
2622
- i += 1;
2623
- }
2624
- }
2625
- function yi(t, e) {
2626
- this.data = t, this.type = t.ty, this.d = "", this.lvl = e, this._mdf = !1, this.closed = t.hd === !0, this.pElem = z("path"), this.msElem = null;
2627
- }
2628
- function Le(t, e, s, i) {
2629
- var a;
2630
- this.elem = t, this.frameId = -1, this.dataProps = K(e.length), this.renderer = s, this.k = !1, this.dashStr = "", this.dashArray = ht("float32", e.length ? e.length - 1 : 0), this.dashoffset = ht("float32", 1), this.initDynamicPropertyContainer(i);
2631
- var r, h = e.length || 0;
2632
- for (a = 0; a < h; a += 1) r = E.getProp(t, e[a].v, 0, 0, this), this.k = r.k || this.k, this.dataProps[a] = { n: e[a].n, p: r };
2633
- this.k || this.getValue(!0), this._isAnimated = this.k;
2634
- }
2635
- function vi(t, e, s) {
2636
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.o = E.getProp(t, e.o, 0, 0.01, this), this.w = E.getProp(t, e.w, 0, null, this), this.d = new Le(t, e.d || {}, "svg", this), this.c = E.getProp(t, e.c, 1, 255, this), this.style = s, this._isAnimated = !!this._isAnimated;
2637
- }
2638
- function bi(t, e, s) {
2639
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.o = E.getProp(t, e.o, 0, 0.01, this), this.c = E.getProp(t, e.c, 1, 255, this), this.style = s;
2640
- }
2641
- function _i(t, e, s) {
2642
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.style = s;
2643
- }
2644
- function ve(t, e, s) {
2645
- this.data = e, this.c = ht("uint8c", 4 * e.p);
2646
- var i = e.k.k[0].s ? e.k.k[0].s.length - 4 * e.p : e.k.k.length - 4 * e.p;
2647
- this.o = ht("float32", i), this._cmdf = !1, this._omdf = !1, this._collapsable = this.checkCollapsable(), this._hasOpacity = i, this.initDynamicPropertyContainer(s), this.prop = E.getProp(t, e.k, 1, null, this), this.k = this.prop.k, this.getValue(!0);
2648
- }
2649
- function be(t, e, s) {
2650
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.initGradientData(t, e, s);
2651
- }
2652
- function Ci(t, e, s) {
2653
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.w = E.getProp(t, e.w, 0, null, this), this.d = new Le(t, e.d || {}, "svg", this), this.initGradientData(t, e, s), this._isAnimated = !!this._isAnimated;
2654
- }
2655
- function ea() {
2656
- this.it = [], this.prevViewData = [], this.gr = z("g");
2657
- }
2658
- function sa(t, e, s) {
2659
- this.transform = { mProps: t, op: e, container: s }, this.elements = [], this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
2660
- }
2661
- Cs.prototype.setAsAnimated = function() {
2662
- this._isAnimated = !0;
2663
- }, yi.prototype.reset = function() {
2664
- this.d = "", this._mdf = !1;
2665
- }, Le.prototype.getValue = function(t) {
2666
- if ((this.elem.globalData.frameId !== this.frameId || t) && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf = this._mdf || t, this._mdf)) {
2667
- var e = 0, s = this.dataProps.length;
2668
- for (this.renderer === "svg" && (this.dashStr = ""), e = 0; e < s; e += 1) this.dataProps[e].n !== "o" ? this.renderer === "svg" ? this.dashStr += " " + this.dataProps[e].p.v : this.dashArray[e] = this.dataProps[e].p.v : this.dashoffset[0] = this.dataProps[e].p.v;
2669
- }
2670
- }, W([ut], Le), W([ut], vi), W([ut], bi), W([ut], _i), ve.prototype.comparePoints = function(t, e) {
2671
- for (var s = 0, i = this.o.length / 2; s < i; ) {
2672
- if (Math.abs(t[4 * s] - t[4 * e + 2 * s]) > 0.01) return !1;
2673
- s += 1;
2674
- }
2675
- return !0;
2676
- }, ve.prototype.checkCollapsable = function() {
2677
- if (this.o.length / 2 != this.c.length / 4) return !1;
2678
- if (this.data.k.k[0].s) for (var t = 0, e = this.data.k.k.length; t < e; ) {
2679
- if (!this.comparePoints(this.data.k.k[t].s, this.data.p)) return !1;
2680
- t += 1;
2681
- }
2682
- else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1;
2683
- return !0;
2684
- }, ve.prototype.getValue = function(t) {
2685
- if (this.prop.getValue(), this._mdf = !1, this._cmdf = !1, this._omdf = !1, this.prop._mdf || t) {
2686
- var e, s, i, a = 4 * this.data.p;
2687
- for (e = 0; e < a; e += 1) s = e % 4 == 0 ? 100 : 255, i = Math.round(this.prop.v[e] * s), this.c[e] !== i && (this.c[e] = i, this._cmdf = !t);
2688
- if (this.o.length) for (a = this.prop.v.length, e = 4 * this.data.p; e < a; e += 1) s = e % 2 == 0 ? 100 : 1, i = e % 2 == 0 ? Math.round(100 * this.prop.v[e]) : this.prop.v[e], this.o[e - 4 * this.data.p] !== i && (this.o[e - 4 * this.data.p] = i, this._omdf = !t);
2689
- this._mdf = !t;
2690
- }
2691
- }, W([ut], ve), be.prototype.initGradientData = function(t, e, s) {
2692
- this.o = E.getProp(t, e.o, 0, 0.01, this), this.s = E.getProp(t, e.s, 1, null, this), this.e = E.getProp(t, e.e, 1, null, this), this.h = E.getProp(t, e.h || { k: 0 }, 0, 0.01, this), this.a = E.getProp(t, e.a || { k: 0 }, 0, et, this), this.g = new ve(t, e.g, this), this.style = s, this.stops = [], this.setGradientData(s.pElem, e), this.setGradientOpacity(e, s), this._isAnimated = !!this._isAnimated;
2693
- }, be.prototype.setGradientData = function(t, e) {
2694
- var s = Ct(), i = z(e.t === 1 ? "linearGradient" : "radialGradient");
2695
- i.setAttribute("id", s), i.setAttribute("spreadMethod", "pad"), i.setAttribute("gradientUnits", "userSpaceOnUse");
2696
- var a, r, h, n = [];
2697
- for (h = 4 * e.g.p, r = 0; r < h; r += 4) a = z("stop"), i.appendChild(a), n.push(a);
2698
- t.setAttribute(e.ty === "gf" ? "fill" : "stroke", "url(" + dt() + "#" + s + ")"), this.gf = i, this.cst = n;
2699
- }, be.prototype.setGradientOpacity = function(t, e) {
2700
- if (this.g._hasOpacity && !this.g._collapsable) {
2701
- var s, i, a, r = z("mask"), h = z("path");
2702
- r.appendChild(h);
2703
- var n = Ct(), g = Ct();
2704
- r.setAttribute("id", g);
2705
- var y = z(t.t === 1 ? "linearGradient" : "radialGradient");
2706
- y.setAttribute("id", n), y.setAttribute("spreadMethod", "pad"), y.setAttribute("gradientUnits", "userSpaceOnUse"), a = t.g.k.k[0].s ? t.g.k.k[0].s.length : t.g.k.k.length;
2707
- var o = this.stops;
2708
- for (i = 4 * t.g.p; i < a; i += 2) (s = z("stop")).setAttribute("stop-color", "rgb(255,255,255)"), y.appendChild(s), o.push(s);
2709
- h.setAttribute(t.ty === "gf" ? "fill" : "stroke", "url(" + dt() + "#" + n + ")"), t.ty === "gs" && (h.setAttribute("stroke-linecap", bs[t.lc || 2]), h.setAttribute("stroke-linejoin", _s[t.lj || 2]), t.lj === 1 && h.setAttribute("stroke-miterlimit", t.ml)), this.of = y, this.ms = r, this.ost = o, this.maskId = g, e.msElem = h;
2710
- }
2711
- }, W([ut], be), W([be, ut], Ci);
2712
- var xi = function(t, e, s, i) {
2713
- if (e === 0) return "";
2714
- var a, r = t.o, h = t.i, n = t.v, g = " M" + i.applyToPointStringified(n[0][0], n[0][1]);
2715
- for (a = 1; a < e; a += 1) g += " C" + i.applyToPointStringified(r[a - 1][0], r[a - 1][1]) + " " + i.applyToPointStringified(h[a][0], h[a][1]) + " " + i.applyToPointStringified(n[a][0], n[a][1]);
2716
- return s && e && (g += " C" + i.applyToPointStringified(r[a - 1][0], r[a - 1][1]) + " " + i.applyToPointStringified(h[0][0], h[0][1]) + " " + i.applyToPointStringified(n[0][0], n[0][1]), g += "z"), g;
2717
- }, ia = function() {
2718
- var t = new st(), e = new st();
2719
- function s(y, o, d) {
2720
- (d || o.transform.op._mdf) && o.transform.container.setAttribute("opacity", o.transform.op.v), (d || o.transform.mProps._mdf) && o.transform.container.setAttribute("transform", o.transform.mProps.v.to2dCSS());
2721
- }
2722
- function i() {
2723
- }
2724
- function a(y, o, d) {
2725
- var c, m, l, f, p, u, v, k, C, A, F = o.styles.length, I = o.lvl;
2726
- for (u = 0; u < F; u += 1) {
2727
- if (f = o.sh._mdf || d, o.styles[u].lvl < I) {
2728
- for (k = e.reset(), C = I - o.styles[u].lvl, A = o.transformers.length - 1; !f && C > 0; ) f = o.transformers[A].mProps._mdf || f, C -= 1, A -= 1;
2729
- if (f) for (C = I - o.styles[u].lvl, A = o.transformers.length - 1; C > 0; ) k.multiply(o.transformers[A].mProps.v), C -= 1, A -= 1;
2730
- } else k = t;
2731
- if (m = (v = o.sh.paths)._length, f) {
2732
- for (l = "", c = 0; c < m; c += 1) (p = v.shapes[c]) && p._length && (l += xi(p, p._length, p.c, k));
2733
- o.caches[u] = l;
2734
- } else l = o.caches[u];
2735
- o.styles[u].d += y.hd === !0 ? "" : l, o.styles[u]._mdf = f || o.styles[u]._mdf;
2736
- }
2737
- }
2738
- function r(y, o, d) {
2739
- var c = o.style;
2740
- (o.c._mdf || d) && c.pElem.setAttribute("fill", "rgb(" + gt(o.c.v[0]) + "," + gt(o.c.v[1]) + "," + gt(o.c.v[2]) + ")"), (o.o._mdf || d) && c.pElem.setAttribute("fill-opacity", o.o.v);
2741
- }
2742
- function h(y, o, d) {
2743
- n(y, o, d), g(y, o, d);
2744
- }
2745
- function n(y, o, d) {
2746
- var c, m, l, f, p, u = o.gf, v = o.g._hasOpacity, k = o.s.v, C = o.e.v;
2747
- if (o.o._mdf || d) {
2748
- var A = y.ty === "gf" ? "fill-opacity" : "stroke-opacity";
2749
- o.style.pElem.setAttribute(A, o.o.v);
2750
- }
2751
- if (o.s._mdf || d) {
2752
- var F = y.t === 1 ? "x1" : "cx", I = F === "x1" ? "y1" : "cy";
2753
- u.setAttribute(F, k[0]), u.setAttribute(I, k[1]), v && !o.g._collapsable && (o.of.setAttribute(F, k[0]), o.of.setAttribute(I, k[1]));
2754
- }
2755
- if (o.g._cmdf || d) {
2756
- c = o.cst;
2757
- var x = o.g.c;
2758
- for (l = c.length, m = 0; m < l; m += 1) (f = c[m]).setAttribute("offset", x[4 * m] + "%"), f.setAttribute("stop-color", "rgb(" + x[4 * m + 1] + "," + x[4 * m + 2] + "," + x[4 * m + 3] + ")");
2759
- }
2760
- if (v && (o.g._omdf || d)) {
2761
- var T = o.g.o;
2762
- for (l = (c = o.g._collapsable ? o.cst : o.ost).length, m = 0; m < l; m += 1) f = c[m], o.g._collapsable || f.setAttribute("offset", T[2 * m] + "%"), f.setAttribute("stop-opacity", T[2 * m + 1]);
2763
- }
2764
- if (y.t === 1) (o.e._mdf || d) && (u.setAttribute("x2", C[0]), u.setAttribute("y2", C[1]), v && !o.g._collapsable && (o.of.setAttribute("x2", C[0]), o.of.setAttribute("y2", C[1])));
2765
- else if ((o.s._mdf || o.e._mdf || d) && (p = Math.sqrt(Math.pow(k[0] - C[0], 2) + Math.pow(k[1] - C[1], 2)), u.setAttribute("r", p), v && !o.g._collapsable && o.of.setAttribute("r", p)), o.s._mdf || o.e._mdf || o.h._mdf || o.a._mdf || d) {
2766
- p || (p = Math.sqrt(Math.pow(k[0] - C[0], 2) + Math.pow(k[1] - C[1], 2)));
2767
- var M = Math.atan2(C[1] - k[1], C[0] - k[0]), _ = o.h.v;
2768
- _ >= 1 ? _ = 0.99 : _ <= -1 && (_ = -0.99);
2769
- var D = p * _, w = Math.cos(M + o.a.v) * D + k[0], P = Math.sin(M + o.a.v) * D + k[1];
2770
- u.setAttribute("fx", w), u.setAttribute("fy", P), v && !o.g._collapsable && (o.of.setAttribute("fx", w), o.of.setAttribute("fy", P));
2771
- }
2772
- }
2773
- function g(y, o, d) {
2774
- var c = o.style, m = o.d;
2775
- m && (m._mdf || d) && m.dashStr && (c.pElem.setAttribute("stroke-dasharray", m.dashStr), c.pElem.setAttribute("stroke-dashoffset", m.dashoffset[0])), o.c && (o.c._mdf || d) && c.pElem.setAttribute("stroke", "rgb(" + gt(o.c.v[0]) + "," + gt(o.c.v[1]) + "," + gt(o.c.v[2]) + ")"), (o.o._mdf || d) && c.pElem.setAttribute("stroke-opacity", o.o.v), (o.w._mdf || d) && (c.pElem.setAttribute("stroke-width", o.w.v), c.msElem && c.msElem.setAttribute("stroke-width", o.w.v));
2776
- }
2777
- return { createRenderFunction: function(y) {
2778
- switch (y.ty) {
2779
- case "fl":
2780
- return r;
2781
- case "gf":
2782
- return n;
2783
- case "gs":
2784
- return h;
2785
- case "st":
2786
- return g;
2787
- case "sh":
2788
- case "el":
2789
- case "rc":
2790
- case "sr":
2791
- return a;
2792
- case "tr":
2793
- return s;
2794
- case "no":
2795
- return i;
2796
- default:
2797
- return null;
2798
- }
2799
- } };
2800
- }();
2801
- function Z(t, e, s) {
2802
- this.shapes = [], this.shapesData = t.shapes, this.stylesList = [], this.shapeModifiers = [], this.itemsData = [], this.processedElements = [], this.animatedContents = [], this.initElement(t, e, s), this.prevViewData = [];
2803
- }
2804
- function xs(t, e, s, i, a, r) {
2805
- this.o = t, this.sw = e, this.sc = s, this.fc = i, this.m = a, this.p = r, this._mdf = { o: !0, sw: !!e, sc: !!s, fc: !!i, m: !0, p: !0 };
2806
- }
2807
- function vt(t, e) {
2808
- this._frameId = Jt, this.pv = "", this.v = "", this.kf = !1, this._isFirstFrame = !0, this._mdf = !1, e.d && e.d.sid && (e.d = t.globalData.slotManager.getProp(e.d)), this.data = e, this.elem = t, this.comp = this.elem.comp, this.keysIndex = 0, this.canResize = !1, this.minimumFontSize = 1, this.effectsSequence = [], this.currentData = { ascent: 0, boxWidth: this.defaultBoxWidth, f: "", fStyle: "", fWeight: "", fc: "", j: "", justifyOffset: "", l: [], lh: 0, lineWidths: [], ls: "", of: "", s: "", sc: "", sw: 0, t: 0, tr: 0, sz: 0, ps: null, fillColorAnim: !1, strokeColorAnim: !1, strokeWidthAnim: !1, yOffset: 0, finalSize: 0, finalText: [], finalLineHeight: 0, __complete: !1 }, this.copyData(this.currentData, this.data.d.k[0].s), this.searchProperty() || this.completeTextData(this.currentData);
2809
- }
2810
- W([wt, Nt, Ee, vs, qt, Mt, ye], Z), Z.prototype.initSecondaryElement = function() {
2811
- }, Z.prototype.identityMatrix = new st(), Z.prototype.buildExpressionInterface = function() {
2812
- }, Z.prototype.createContent = function() {
2813
- this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0), this.filterUniqueShapes();
2814
- }, Z.prototype.filterUniqueShapes = function() {
2815
- var t, e, s, i, a = this.shapes.length, r = this.stylesList.length, h = [], n = !1;
2816
- for (s = 0; s < r; s += 1) {
2817
- for (i = this.stylesList[s], n = !1, h.length = 0, t = 0; t < a; t += 1) (e = this.shapes[t]).styles.indexOf(i) !== -1 && (h.push(e), n = e._isAnimated || n);
2818
- h.length > 1 && n && this.setShapesAsAnimated(h);
2819
- }
2820
- }, Z.prototype.setShapesAsAnimated = function(t) {
2821
- var e, s = t.length;
2822
- for (e = 0; e < s; e += 1) t[e].setAsAnimated();
2823
- }, Z.prototype.createStyleElement = function(t, e) {
2824
- var s, i = new yi(t, e), a = i.pElem;
2825
- return t.ty === "st" ? s = new vi(this, t, i) : t.ty === "fl" ? s = new bi(this, t, i) : t.ty === "gf" || t.ty === "gs" ? (s = new (t.ty === "gf" ? be : Ci)(this, t, i), this.globalData.defs.appendChild(s.gf), s.maskId && (this.globalData.defs.appendChild(s.ms), this.globalData.defs.appendChild(s.of), a.setAttribute("mask", "url(" + dt() + "#" + s.maskId + ")"))) : t.ty === "no" && (s = new _i(this, t, i)), t.ty !== "st" && t.ty !== "gs" || (a.setAttribute("stroke-linecap", bs[t.lc || 2]), a.setAttribute("stroke-linejoin", _s[t.lj || 2]), a.setAttribute("fill-opacity", "0"), t.lj === 1 && a.setAttribute("stroke-miterlimit", t.ml)), t.r === 2 && a.setAttribute("fill-rule", "evenodd"), t.ln && a.setAttribute("id", t.ln), t.cl && a.setAttribute("class", t.cl), t.bm && (a.style["mix-blend-mode"] = Ue(t.bm)), this.stylesList.push(i), this.addToAnimatedContents(t, s), s;
2826
- }, Z.prototype.createGroupElement = function(t) {
2827
- var e = new ea();
2828
- return t.ln && e.gr.setAttribute("id", t.ln), t.cl && e.gr.setAttribute("class", t.cl), t.bm && (e.gr.style["mix-blend-mode"] = Ue(t.bm)), e;
2829
- }, Z.prototype.createTransformElement = function(t, e) {
2830
- var s = Xe.getTransformProperty(this, t, this), i = new sa(s, s.o, e);
2831
- return this.addToAnimatedContents(t, i), i;
2832
- }, Z.prototype.createShapeElement = function(t, e, s) {
2833
- var i = 4;
2834
- t.ty === "rc" ? i = 5 : t.ty === "el" ? i = 6 : t.ty === "sr" && (i = 7);
2835
- var a = new Cs(e, s, de.getShapeProp(this, t, i, this));
2836
- return this.shapes.push(a), this.addShapeToModifiers(a), this.addToAnimatedContents(t, a), a;
2837
- }, Z.prototype.addToAnimatedContents = function(t, e) {
2838
- for (var s = 0, i = this.animatedContents.length; s < i; ) {
2839
- if (this.animatedContents[s].element === e) return;
2840
- s += 1;
2841
- }
2842
- this.animatedContents.push({ fn: ia.createRenderFunction(t), element: e, data: t });
2843
- }, Z.prototype.setElementStyles = function(t) {
2844
- var e, s = t.styles, i = this.stylesList.length;
2845
- for (e = 0; e < i; e += 1) s.indexOf(this.stylesList[e]) !== -1 || this.stylesList[e].closed || s.push(this.stylesList[e]);
2846
- }, Z.prototype.reloadShapes = function() {
2847
- var t;
2848
- this._isFirstFrame = !0;
2849
- var e = this.itemsData.length;
2850
- for (t = 0; t < e; t += 1) this.prevViewData[t] = this.itemsData[t];
2851
- for (this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0), this.filterUniqueShapes(), e = this.dynamicProperties.length, t = 0; t < e; t += 1) this.dynamicProperties[t].getValue();
2852
- this.renderModifiers();
2853
- }, Z.prototype.searchShapes = function(t, e, s, i, a, r, h) {
2854
- var n, g, y, o, d, c, m = [].concat(r), l = t.length - 1, f = [], p = [];
2855
- for (n = l; n >= 0; n -= 1) {
2856
- if ((c = this.searchProcessedElement(t[n])) ? e[n] = s[c - 1] : t[n]._render = h, t[n].ty === "fl" || t[n].ty === "st" || t[n].ty === "gf" || t[n].ty === "gs" || t[n].ty === "no") c ? e[n].style.closed = t[n].hd : e[n] = this.createStyleElement(t[n], a), t[n]._render && e[n].style.pElem.parentNode !== i && i.appendChild(e[n].style.pElem), f.push(e[n].style);
2857
- else if (t[n].ty === "gr") {
2858
- if (c) for (y = e[n].it.length, g = 0; g < y; g += 1) e[n].prevViewData[g] = e[n].it[g];
2859
- else e[n] = this.createGroupElement(t[n]);
2860
- this.searchShapes(t[n].it, e[n].it, e[n].prevViewData, e[n].gr, a + 1, m, h), t[n]._render && e[n].gr.parentNode !== i && i.appendChild(e[n].gr);
2861
- } else t[n].ty === "tr" ? (c || (e[n] = this.createTransformElement(t[n], i)), o = e[n].transform, m.push(o)) : t[n].ty === "sh" || t[n].ty === "rc" || t[n].ty === "el" || t[n].ty === "sr" ? (c || (e[n] = this.createShapeElement(t[n], m, a)), this.setElementStyles(e[n])) : t[n].ty === "tm" || t[n].ty === "rd" || t[n].ty === "ms" || t[n].ty === "pb" || t[n].ty === "zz" || t[n].ty === "op" ? (c ? (d = e[n]).closed = !1 : ((d = zt.getModifier(t[n].ty)).init(this, t[n]), e[n] = d, this.shapeModifiers.push(d)), p.push(d)) : t[n].ty === "rp" && (c ? (d = e[n]).closed = !0 : (d = zt.getModifier(t[n].ty), e[n] = d, d.init(this, t, n, e), this.shapeModifiers.push(d), h = !1), p.push(d));
2862
- this.addProcessedElement(t[n], n + 1);
2863
- }
2864
- for (l = f.length, n = 0; n < l; n += 1) f[n].closed = !0;
2865
- for (l = p.length, n = 0; n < l; n += 1) p[n].closed = !0;
2866
- }, Z.prototype.renderInnerContent = function() {
2867
- var t;
2868
- this.renderModifiers();
2869
- var e = this.stylesList.length;
2870
- for (t = 0; t < e; t += 1) this.stylesList[t].reset();
2871
- for (this.renderShape(), t = 0; t < e; t += 1) (this.stylesList[t]._mdf || this._isFirstFrame) && (this.stylesList[t].msElem && (this.stylesList[t].msElem.setAttribute("d", this.stylesList[t].d), this.stylesList[t].d = "M0 0" + this.stylesList[t].d), this.stylesList[t].pElem.setAttribute("d", this.stylesList[t].d || "M0 0"));
2872
- }, Z.prototype.renderShape = function() {
2873
- var t, e, s = this.animatedContents.length;
2874
- for (t = 0; t < s; t += 1) e = this.animatedContents[t], (this._isFirstFrame || e.element._isAnimated) && e.data !== !0 && e.fn(e.data, e.element, this._isFirstFrame);
2875
- }, Z.prototype.destroy = function() {
2876
- this.destroyBaseElement(), this.shapesData = null, this.itemsData = null;
2877
- }, xs.prototype.update = function(t, e, s, i, a, r) {
2878
- this._mdf.o = !1, this._mdf.sw = !1, this._mdf.sc = !1, this._mdf.fc = !1, this._mdf.m = !1, this._mdf.p = !1;
2879
- var h = !1;
2880
- return this.o !== t && (this.o = t, this._mdf.o = !0, h = !0), this.sw !== e && (this.sw = e, this._mdf.sw = !0, h = !0), this.sc !== s && (this.sc = s, this._mdf.sc = !0, h = !0), this.fc !== i && (this.fc = i, this._mdf.fc = !0, h = !0), this.m !== a && (this.m = a, this._mdf.m = !0, h = !0), !r.length || this.p[0] === r[0] && this.p[1] === r[1] && this.p[4] === r[4] && this.p[5] === r[5] && this.p[12] === r[12] && this.p[13] === r[13] || (this.p = r, this._mdf.p = !0, h = !0), h;
2881
- }, vt.prototype.defaultBoxWidth = [0, 0], vt.prototype.copyData = function(t, e) {
2882
- for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (t[s] = e[s]);
2883
- return t;
2884
- }, vt.prototype.setCurrentData = function(t) {
2885
- t.__complete || this.completeTextData(t), this.currentData = t, this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth, this._mdf = !0;
2886
- }, vt.prototype.searchProperty = function() {
2887
- return this.searchKeyframes();
2888
- }, vt.prototype.searchKeyframes = function() {
2889
- return this.kf = this.data.d.k.length > 1, this.kf && this.addEffect(this.getKeyframeValue.bind(this)), this.kf;
2890
- }, vt.prototype.addEffect = function(t) {
2891
- this.effectsSequence.push(t), this.elem.addDynamicProperty(this);
2892
- }, vt.prototype.getValue = function(t) {
2893
- if (this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length || t) {
2894
- this.currentData.t = this.data.d.k[this.keysIndex].s.t;
2895
- var e = this.currentData, s = this.keysIndex;
2896
- if (this.lock) this.setCurrentData(this.currentData);
2897
- else {
2898
- var i;
2899
- this.lock = !0, this._mdf = !1;
2900
- var a = this.effectsSequence.length, r = t || this.data.d.k[this.keysIndex].s;
2901
- for (i = 0; i < a; i += 1) r = s !== this.keysIndex ? this.effectsSequence[i](r, r.t) : this.effectsSequence[i](this.currentData, r.t);
2902
- e !== r && this.setCurrentData(r), this.v = this.currentData, this.pv = this.v, this.lock = !1, this.frameId = this.elem.globalData.frameId;
2903
- }
2904
- }
2905
- }, vt.prototype.getKeyframeValue = function() {
2906
- for (var t = this.data.d.k, e = this.elem.comp.renderedFrame, s = 0, i = t.length; s <= i - 1 && !(s === i - 1 || t[s + 1].t > e); ) s += 1;
2907
- return this.keysIndex !== s && (this.keysIndex = s), this.data.d.k[this.keysIndex].s;
2908
- }, vt.prototype.buildFinalText = function(t) {
2909
- for (var e, s, i = [], a = 0, r = t.length, h = !1, n = !1, g = ""; a < r; ) h = n, n = !1, e = t.charCodeAt(a), g = t.charAt(a), ne.isCombinedCharacter(e) ? h = !0 : e >= 55296 && e <= 56319 ? ne.isRegionalFlag(t, a) ? g = t.substr(a, 14) : (s = t.charCodeAt(a + 1)) >= 56320 && s <= 57343 && (ne.isModifier(e, s) ? (g = t.substr(a, 2), h = !0) : g = ne.isFlagEmoji(t.substr(a, 4)) ? t.substr(a, 4) : t.substr(a, 2)) : e > 56319 ? (s = t.charCodeAt(a + 1), ne.isVariationSelector(e) && (h = !0)) : ne.isZeroWidthJoiner(e) && (h = !0, n = !0), h ? (i[i.length - 1] += g, h = !1) : i.push(g), a += g.length;
2910
- return i;
2911
- }, vt.prototype.completeTextData = function(t) {
2912
- t.__complete = !0;
2913
- var e, s, i, a, r, h, n, g = this.elem.globalData.fontManager, y = this.data, o = [], d = 0, c = y.m.g, m = 0, l = 0, f = 0, p = [], u = 0, v = 0, k = g.getFontByName(t.f), C = 0, A = fi(k);
2914
- t.fWeight = A.weight, t.fStyle = A.style, t.finalSize = t.s, t.finalText = this.buildFinalText(t.t), s = t.finalText.length, t.finalLineHeight = t.lh;
2915
- var F, I = t.tr / 1e3 * t.finalSize;
2916
- if (t.sz) for (var x, T, M = !0, _ = t.sz[0], D = t.sz[1]; M; ) {
2917
- x = 0, u = 0, s = (T = this.buildFinalText(t.t)).length, I = t.tr / 1e3 * t.finalSize;
2918
- var w = -1;
2919
- for (e = 0; e < s; e += 1) F = T[e].charCodeAt(0), i = !1, T[e] === " " ? w = e : F !== 13 && F !== 3 || (u = 0, i = !0, x += t.finalLineHeight || 1.2 * t.finalSize), g.chars ? (n = g.getCharData(T[e], k.fStyle, k.fFamily), C = i ? 0 : n.w * t.finalSize / 100) : C = g.measureText(T[e], t.f, t.finalSize), u + C > _ && T[e] !== " " ? (w === -1 ? s += 1 : e = w, x += t.finalLineHeight || 1.2 * t.finalSize, T.splice(e, w === e ? 1 : 0, "\r"), w = -1, u = 0) : (u += C, u += I);
2920
- x += k.ascent * t.finalSize / 100, this.canResize && t.finalSize > this.minimumFontSize && D < x ? (t.finalSize -= 1, t.finalLineHeight = t.finalSize * t.lh / t.s) : (t.finalText = T, s = t.finalText.length, M = !1);
2921
- }
2922
- u = -I, C = 0;
2923
- var P, V = 0;
2924
- for (e = 0; e < s; e += 1) if (i = !1, (F = (P = t.finalText[e]).charCodeAt(0)) === 13 || F === 3 ? (V = 0, p.push(u), v = u > v ? u : v, u = -2 * I, a = "", i = !0, f += 1) : a = P, g.chars ? (n = g.getCharData(P, k.fStyle, g.getFontByName(t.f).fFamily), C = i ? 0 : n.w * t.finalSize / 100) : C = g.measureText(a, t.f, t.finalSize), P === " " ? V += C + I : (u += C + I + V, V = 0), o.push({ l: C, an: C, add: m, n: i, anIndexes: [], val: a, line: f, animatorJustifyOffset: 0 }), c == 2) {
2925
- if (m += C, a === "" || a === " " || e === s - 1) {
2926
- for (a !== "" && a !== " " || (m -= C); l <= e; ) o[l].an = m, o[l].ind = d, o[l].extra = C, l += 1;
2927
- d += 1, m = 0;
2928
- }
2929
- } else if (c == 3) {
2930
- if (m += C, a === "" || e === s - 1) {
2931
- for (a === "" && (m -= C); l <= e; ) o[l].an = m, o[l].ind = d, o[l].extra = C, l += 1;
2932
- m = 0, d += 1;
2933
- }
2934
- } else o[d].ind = d, o[d].extra = 0, d += 1;
2935
- if (t.l = o, v = u > v ? u : v, p.push(u), t.sz) t.boxWidth = t.sz[0], t.justifyOffset = 0;
2936
- else switch (t.boxWidth = v, t.j) {
2937
- case 1:
2938
- t.justifyOffset = -t.boxWidth;
2939
- break;
2940
- case 2:
2941
- t.justifyOffset = -t.boxWidth / 2;
2942
- break;
2943
- default:
2944
- t.justifyOffset = 0;
2945
- }
2946
- t.lineWidths = p;
2947
- var O, B, b, S, L = y.a;
2948
- h = L.length;
2949
- var N = [];
2950
- for (r = 0; r < h; r += 1) {
2951
- for ((O = L[r]).a.sc && (t.strokeColorAnim = !0), O.a.sw && (t.strokeWidthAnim = !0), (O.a.fc || O.a.fh || O.a.fs || O.a.fb) && (t.fillColorAnim = !0), S = 0, b = O.s.b, e = 0; e < s; e += 1) (B = o[e]).anIndexes[r] = S, (b == 1 && B.val !== "" || b == 2 && B.val !== "" && B.val !== " " || b == 3 && (B.n || B.val == " " || e == s - 1) || b == 4 && (B.n || e == s - 1)) && (O.s.rn === 1 && N.push(S), S += 1);
2952
- y.a[r].s.totalChars = S;
2953
- var U, $ = -1;
2954
- if (O.s.rn === 1) for (e = 0; e < s; e += 1) $ != (B = o[e]).anIndexes[r] && ($ = B.anIndexes[r], U = N.splice(Math.floor(Math.random() * N.length), 1)[0]), B.anIndexes[r] = U;
2955
- }
2956
- t.yOffset = t.finalLineHeight || 1.2 * t.finalSize, t.ls = t.ls || 0, t.ascent = k.ascent * t.finalSize / 100;
2957
- }, vt.prototype.updateDocumentData = function(t, e) {
2958
- e = e === void 0 ? this.keysIndex : e;
2959
- var s = this.copyData({}, this.data.d.k[e].s);
2960
- s = this.copyData(s, t), this.data.d.k[e].s = s, this.recalculate(e), this.setCurrentData(s), this.elem.addDynamicProperty(this);
2961
- }, vt.prototype.recalculate = function(t) {
2962
- var e = this.data.d.k[t].s;
2963
- e.__complete = !1, this.keysIndex = 0, this._isFirstFrame = !0, this.getValue(e);
2964
- }, vt.prototype.canResizeFont = function(t) {
2965
- this.canResize = t, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this);
2966
- }, vt.prototype.setMinimumFontSize = function(t) {
2967
- this.minimumFontSize = Math.floor(t) || 1, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this);
2968
- };
2969
- var aa = function() {
2970
- var t = Math.max, e = Math.min, s = Math.floor;
2971
- function i(a, r) {
2972
- this._currentTextLength = -1, this.k = !1, this.data = r, this.elem = a, this.comp = a.comp, this.finalS = 0, this.finalE = 0, this.initDynamicPropertyContainer(a), this.s = E.getProp(a, r.s || { k: 0 }, 0, 0, this), this.e = "e" in r ? E.getProp(a, r.e, 0, 0, this) : { v: 100 }, this.o = E.getProp(a, r.o || { k: 0 }, 0, 0, this), this.xe = E.getProp(a, r.xe || { k: 0 }, 0, 0, this), this.ne = E.getProp(a, r.ne || { k: 0 }, 0, 0, this), this.sm = E.getProp(a, r.sm || { k: 100 }, 0, 0, this), this.a = E.getProp(a, r.a, 0, 0.01, this), this.dynamicProperties.length || this.getValue();
2973
- }
2974
- return i.prototype = { getMult: function(a) {
2975
- this._currentTextLength !== this.elem.textProperty.currentData.l.length && this.getValue();
2976
- var r = 0, h = 0, n = 1, g = 1;
2977
- this.ne.v > 0 ? r = this.ne.v / 100 : h = -this.ne.v / 100, this.xe.v > 0 ? n = 1 - this.xe.v / 100 : g = 1 + this.xe.v / 100;
2978
- var y = ke.getBezierEasing(r, h, n, g).get, o = 0, d = this.finalS, c = this.finalE, m = this.data.sh;
2979
- if (m === 2) o = y(o = c === d ? a >= c ? 1 : 0 : t(0, e(0.5 / (c - d) + (a - d) / (c - d), 1)));
2980
- else if (m === 3) o = y(o = c === d ? a >= c ? 0 : 1 : 1 - t(0, e(0.5 / (c - d) + (a - d) / (c - d), 1)));
2981
- else if (m === 4) c === d ? o = 0 : (o = t(0, e(0.5 / (c - d) + (a - d) / (c - d), 1))) < 0.5 ? o *= 2 : o = 1 - 2 * (o - 0.5), o = y(o);
2982
- else if (m === 5) {
2983
- if (c === d) o = 0;
2984
- else {
2985
- var l = c - d, f = -l / 2 + (a = e(t(0, a + 0.5 - d), c - d)), p = l / 2;
2986
- o = Math.sqrt(1 - f * f / (p * p));
2987
- }
2988
- o = y(o);
2989
- } else m === 6 ? (c === d ? o = 0 : (a = e(t(0, a + 0.5 - d), c - d), o = (1 + Math.cos(Math.PI + 2 * Math.PI * a / (c - d))) / 2), o = y(o)) : (a >= s(d) && (o = t(0, e(a - d < 0 ? e(c, 1) - (d - a) : c - a, 1))), o = y(o));
2990
- if (this.sm.v !== 100) {
2991
- var u = 0.01 * this.sm.v;
2992
- u === 0 && (u = 1e-8);
2993
- var v = 0.5 - 0.5 * u;
2994
- o < v ? o = 0 : (o = (o - v) / u) > 1 && (o = 1);
2995
- }
2996
- return o * this.a.v;
2997
- }, getValue: function(a) {
2998
- this.iterateDynamicProperties(), this._mdf = a || this._mdf, this._currentTextLength = this.elem.textProperty.currentData.l.length || 0, a && this.data.r === 2 && (this.e.v = this._currentTextLength);
2999
- var r = this.data.r === 2 ? 1 : 100 / this.data.totalChars, h = this.o.v / r, n = this.s.v / r + h, g = this.e.v / r + h;
3000
- if (n > g) {
3001
- var y = n;
3002
- n = g, g = y;
3003
- }
3004
- this.finalS = n, this.finalE = g;
3005
- } }, W([ut], i), { getTextSelectorProp: function(a, r, h) {
3006
- return new i(a, r);
3007
- } };
3008
- }();
3009
- function ra(t, e, s) {
3010
- var i = { propType: !1 }, a = E.getProp, r = e.a;
3011
- this.a = { r: r.r ? a(t, r.r, 0, et, s) : i, rx: r.rx ? a(t, r.rx, 0, et, s) : i, ry: r.ry ? a(t, r.ry, 0, et, s) : i, sk: r.sk ? a(t, r.sk, 0, et, s) : i, sa: r.sa ? a(t, r.sa, 0, et, s) : i, s: r.s ? a(t, r.s, 1, 0.01, s) : i, a: r.a ? a(t, r.a, 1, 0, s) : i, o: r.o ? a(t, r.o, 0, 0.01, s) : i, p: r.p ? a(t, r.p, 1, 0, s) : i, sw: r.sw ? a(t, r.sw, 0, 0, s) : i, sc: r.sc ? a(t, r.sc, 1, 0, s) : i, fc: r.fc ? a(t, r.fc, 1, 0, s) : i, fh: r.fh ? a(t, r.fh, 0, 0, s) : i, fs: r.fs ? a(t, r.fs, 0, 0.01, s) : i, fb: r.fb ? a(t, r.fb, 0, 0.01, s) : i, t: r.t ? a(t, r.t, 0, 0, s) : i }, this.s = aa.getTextSelectorProp(t, e.s, s), this.s.t = e.s.t;
3012
- }
3013
- function he(t, e, s) {
3014
- this._isFirstFrame = !0, this._hasMaskedPath = !1, this._frameId = -1, this._textData = t, this._renderType = e, this._elem = s, this._animatorsData = K(this._textData.a.length), this._pathData = {}, this._moreOptions = { alignment: {} }, this.renderedLetters = [], this.lettersChangedFlag = !1, this.initDynamicPropertyContainer(s);
3015
- }
3016
- function Dt() {
3017
- }
3018
- he.prototype.searchProperties = function() {
3019
- var t, e, s = this._textData.a.length, i = E.getProp;
3020
- for (t = 0; t < s; t += 1) e = this._textData.a[t], this._animatorsData[t] = new ra(this._elem, e, this);
3021
- this._textData.p && "m" in this._textData.p ? (this._pathData = { a: i(this._elem, this._textData.p.a, 0, 0, this), f: i(this._elem, this._textData.p.f, 0, 0, this), l: i(this._elem, this._textData.p.l, 0, 0, this), r: i(this._elem, this._textData.p.r, 0, 0, this), p: i(this._elem, this._textData.p.p, 0, 0, this), m: this._elem.maskManager.getMaskProperty(this._textData.p.m) }, this._hasMaskedPath = !0) : this._hasMaskedPath = !1, this._moreOptions.alignment = i(this._elem, this._textData.m.a, 1, 0, this);
3022
- }, he.prototype.getMeasures = function(t, e) {
3023
- if (this.lettersChangedFlag = e, this._mdf || this._isFirstFrame || e || this._hasMaskedPath && this._pathData.m._mdf) {
3024
- this._isFirstFrame = !1;
3025
- var s, i, a, r, h, n, g, y, o, d, c, m, l, f, p, u, v, k, C, A = this._moreOptions.alignment.v, F = this._animatorsData, I = this._textData, x = this.mHelper, T = this._renderType, M = this.renderedLetters.length, _ = t.l;
3026
- if (this._hasMaskedPath) {
3027
- if (C = this._pathData.m, !this._pathData.n || this._pathData._mdf) {
3028
- var D, w = C.v;
3029
- for (this._pathData.r.v && (w = w.reverse()), h = { tLength: 0, segments: [] }, r = w._length - 1, u = 0, a = 0; a < r; a += 1) D = Rt.buildBezierData(w.v[a], w.v[a + 1], [w.o[a][0] - w.v[a][0], w.o[a][1] - w.v[a][1]], [w.i[a + 1][0] - w.v[a + 1][0], w.i[a + 1][1] - w.v[a + 1][1]]), h.tLength += D.segmentLength, h.segments.push(D), u += D.segmentLength;
3030
- a = r, C.v.c && (D = Rt.buildBezierData(w.v[a], w.v[0], [w.o[a][0] - w.v[a][0], w.o[a][1] - w.v[a][1]], [w.i[0][0] - w.v[0][0], w.i[0][1] - w.v[0][1]]), h.tLength += D.segmentLength, h.segments.push(D), u += D.segmentLength), this._pathData.pi = h;
3031
- }
3032
- if (h = this._pathData.pi, n = this._pathData.f.v, c = 0, d = 1, y = 0, o = !0, f = h.segments, n < 0 && C.v.c) for (h.tLength < Math.abs(n) && (n = -Math.abs(n) % h.tLength), d = (l = f[c = f.length - 1].points).length - 1; n < 0; ) n += l[d].partialLength, (d -= 1) < 0 && (d = (l = f[c -= 1].points).length - 1);
3033
- m = (l = f[c].points)[d - 1], p = (g = l[d]).partialLength;
3034
- }
3035
- r = _.length, s = 0, i = 0;
3036
- var P, V, O, B, b, S = 1.2 * t.finalSize * 0.714, L = !0;
3037
- O = F.length;
3038
- var N, U, $, Q, J, tt, j, Y, ct, bt, rt, nt, at = -1, q = n, Ht = c, Gt = d, jt = -1, _t = "", kt = this.defaultPropsArray;
3039
- if (t.j === 2 || t.j === 1) {
3040
- var ot = 0, St = 0, ee = t.j === 2 ? -0.5 : -1, Et = 0, se = !0;
3041
- for (a = 0; a < r; a += 1) if (_[a].n) {
3042
- for (ot && (ot += St); Et < a; ) _[Et].animatorJustifyOffset = ot, Et += 1;
3043
- ot = 0, se = !0;
3044
- } else {
3045
- for (V = 0; V < O; V += 1) (P = F[V].a).t.propType && (se && t.j === 2 && (St += P.t.v * ee), (b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? ot += P.t.v * b[0] * ee : ot += P.t.v * b * ee);
3046
- se = !1;
3047
- }
3048
- for (ot && (ot += St); Et < a; ) _[Et].animatorJustifyOffset = ot, Et += 1;
3049
- }
3050
- for (a = 0; a < r; a += 1) {
3051
- if (x.reset(), Q = 1, _[a].n) s = 0, i += t.yOffset, i += L ? 1 : 0, n = q, L = !1, this._hasMaskedPath && (d = Gt, m = (l = f[c = Ht].points)[d - 1], p = (g = l[d]).partialLength, y = 0), _t = "", rt = "", ct = "", nt = "", kt = this.defaultPropsArray;
3052
- else {
3053
- if (this._hasMaskedPath) {
3054
- if (jt !== _[a].line) {
3055
- switch (t.j) {
3056
- case 1:
3057
- n += u - t.lineWidths[_[a].line];
3058
- break;
3059
- case 2:
3060
- n += (u - t.lineWidths[_[a].line]) / 2;
3061
- }
3062
- jt = _[a].line;
3063
- }
3064
- at !== _[a].ind && (_[at] && (n += _[at].extra), n += _[a].an / 2, at = _[a].ind), n += A[0] * _[a].an * 5e-3;
3065
- var Lt = 0;
3066
- for (V = 0; V < O; V += 1) (P = F[V].a).p.propType && ((b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? Lt += P.p.v[0] * b[0] : Lt += P.p.v[0] * b), P.a.propType && ((b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? Lt += P.a.v[0] * b[0] : Lt += P.a.v[0] * b);
3067
- for (o = !0, this._pathData.a.v && (n = 0.5 * _[0].an + (u - this._pathData.f.v - 0.5 * _[0].an - 0.5 * _[_.length - 1].an) * at / (r - 1), n += this._pathData.f.v); o; ) y + p >= n + Lt || !l ? (v = (n + Lt - y) / g.partialLength, U = m.point[0] + (g.point[0] - m.point[0]) * v, $ = m.point[1] + (g.point[1] - m.point[1]) * v, x.translate(-A[0] * _[a].an * 5e-3, -A[1] * S * 0.01), o = !1) : l && (y += g.partialLength, (d += 1) >= l.length && (d = 0, f[c += 1] ? l = f[c].points : C.v.c ? (d = 0, l = f[c = 0].points) : (y -= g.partialLength, l = null)), l && (m = g, p = (g = l[d]).partialLength));
3068
- N = _[a].an / 2 - _[a].add, x.translate(-N, 0, 0);
3069
- } else N = _[a].an / 2 - _[a].add, x.translate(-N, 0, 0), x.translate(-A[0] * _[a].an * 5e-3, -A[1] * S * 0.01, 0);
3070
- for (V = 0; V < O; V += 1) (P = F[V].a).t.propType && (b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars), s === 0 && t.j === 0 || (this._hasMaskedPath ? b.length ? n += P.t.v * b[0] : n += P.t.v * b : b.length ? s += P.t.v * b[0] : s += P.t.v * b));
3071
- for (t.strokeWidthAnim && (tt = t.sw || 0), t.strokeColorAnim && (J = t.sc ? [t.sc[0], t.sc[1], t.sc[2]] : [0, 0, 0]), t.fillColorAnim && t.fc && (j = [t.fc[0], t.fc[1], t.fc[2]]), V = 0; V < O; V += 1) (P = F[V].a).a.propType && ((b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? x.translate(-P.a.v[0] * b[0], -P.a.v[1] * b[1], P.a.v[2] * b[2]) : x.translate(-P.a.v[0] * b, -P.a.v[1] * b, P.a.v[2] * b));
3072
- for (V = 0; V < O; V += 1) (P = F[V].a).s.propType && ((b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? x.scale(1 + (P.s.v[0] - 1) * b[0], 1 + (P.s.v[1] - 1) * b[1], 1) : x.scale(1 + (P.s.v[0] - 1) * b, 1 + (P.s.v[1] - 1) * b, 1));
3073
- for (V = 0; V < O; V += 1) {
3074
- if (P = F[V].a, b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars), P.sk.propType && (b.length ? x.skewFromAxis(-P.sk.v * b[0], P.sa.v * b[1]) : x.skewFromAxis(-P.sk.v * b, P.sa.v * b)), P.r.propType && (b.length ? x.rotateZ(-P.r.v * b[2]) : x.rotateZ(-P.r.v * b)), P.ry.propType && (b.length ? x.rotateY(P.ry.v * b[1]) : x.rotateY(P.ry.v * b)), P.rx.propType && (b.length ? x.rotateX(P.rx.v * b[0]) : x.rotateX(P.rx.v * b)), P.o.propType && (b.length ? Q += (P.o.v * b[0] - Q) * b[0] : Q += (P.o.v * b - Q) * b), t.strokeWidthAnim && P.sw.propType && (b.length ? tt += P.sw.v * b[0] : tt += P.sw.v * b), t.strokeColorAnim && P.sc.propType) for (Y = 0; Y < 3; Y += 1) b.length ? J[Y] += (P.sc.v[Y] - J[Y]) * b[0] : J[Y] += (P.sc.v[Y] - J[Y]) * b;
3075
- if (t.fillColorAnim && t.fc) {
3076
- if (P.fc.propType) for (Y = 0; Y < 3; Y += 1) b.length ? j[Y] += (P.fc.v[Y] - j[Y]) * b[0] : j[Y] += (P.fc.v[Y] - j[Y]) * b;
3077
- P.fh.propType && (j = b.length ? qs(j, P.fh.v * b[0]) : qs(j, P.fh.v * b)), P.fs.propType && (j = b.length ? Os(j, P.fs.v * b[0]) : Os(j, P.fs.v * b)), P.fb.propType && (j = b.length ? Ns(j, P.fb.v * b[0]) : Ns(j, P.fb.v * b));
3078
- }
3079
- }
3080
- for (V = 0; V < O; V += 1) (P = F[V].a).p.propType && (b = F[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars), this._hasMaskedPath ? b.length ? x.translate(0, P.p.v[1] * b[0], -P.p.v[2] * b[1]) : x.translate(0, P.p.v[1] * b, -P.p.v[2] * b) : b.length ? x.translate(P.p.v[0] * b[0], P.p.v[1] * b[1], -P.p.v[2] * b[2]) : x.translate(P.p.v[0] * b, P.p.v[1] * b, -P.p.v[2] * b));
3081
- if (t.strokeWidthAnim && (ct = tt < 0 ? 0 : tt), t.strokeColorAnim && (bt = "rgb(" + Math.round(255 * J[0]) + "," + Math.round(255 * J[1]) + "," + Math.round(255 * J[2]) + ")"), t.fillColorAnim && t.fc && (rt = "rgb(" + Math.round(255 * j[0]) + "," + Math.round(255 * j[1]) + "," + Math.round(255 * j[2]) + ")"), this._hasMaskedPath) {
3082
- if (x.translate(0, -t.ls), x.translate(0, A[1] * S * 0.01 + i, 0), this._pathData.p.v) {
3083
- k = (g.point[1] - m.point[1]) / (g.point[0] - m.point[0]);
3084
- var pe = 180 * Math.atan(k) / Math.PI;
3085
- g.point[0] < m.point[0] && (pe += 180), x.rotate(-pe * Math.PI / 180);
3086
- }
3087
- x.translate(U, $, 0), n -= A[0] * _[a].an * 5e-3, _[a + 1] && at !== _[a + 1].ind && (n += _[a].an / 2, n += 1e-3 * t.tr * t.finalSize);
3088
- } else {
3089
- switch (x.translate(s, i, 0), t.ps && x.translate(t.ps[0], t.ps[1] + t.ascent, 0), t.j) {
3090
- case 1:
3091
- x.translate(_[a].animatorJustifyOffset + t.justifyOffset + (t.boxWidth - t.lineWidths[_[a].line]), 0, 0);
3092
- break;
3093
- case 2:
3094
- x.translate(_[a].animatorJustifyOffset + t.justifyOffset + (t.boxWidth - t.lineWidths[_[a].line]) / 2, 0, 0);
3095
- }
3096
- x.translate(0, -t.ls), x.translate(N, 0, 0), x.translate(A[0] * _[a].an * 5e-3, A[1] * S * 0.01, 0), s += _[a].l + 1e-3 * t.tr * t.finalSize;
3097
- }
3098
- T === "html" ? _t = x.toCSS() : T === "svg" ? _t = x.to2dCSS() : kt = [x.props[0], x.props[1], x.props[2], x.props[3], x.props[4], x.props[5], x.props[6], x.props[7], x.props[8], x.props[9], x.props[10], x.props[11], x.props[12], x.props[13], x.props[14], x.props[15]], nt = Q;
3099
- }
3100
- M <= a ? (B = new xs(nt, ct, bt, rt, _t, kt), this.renderedLetters.push(B), M += 1, this.lettersChangedFlag = !0) : (B = this.renderedLetters[a], this.lettersChangedFlag = B.update(nt, ct, bt, rt, _t, kt) || this.lettersChangedFlag);
3101
- }
3102
- }
3103
- }, he.prototype.getValue = function() {
3104
- this._elem.globalData.frameId !== this._frameId && (this._frameId = this._elem.globalData.frameId, this.iterateDynamicProperties());
3105
- }, he.prototype.mHelper = new st(), he.prototype.defaultPropsArray = [], W([ut], he), Dt.prototype.initElement = function(t, e, s) {
3106
- this.lettersChangedFlag = !0, this.initFrame(), this.initBaseData(t, e, s), this.textProperty = new vt(this, t.t, this.dynamicProperties), this.textAnimator = new he(t.t, this.renderType, this), this.initTransform(t, e, s), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide(), this.textAnimator.searchProperties(this.dynamicProperties);
3107
- }, Dt.prototype.prepareFrame = function(t) {
3108
- this._mdf = !1, this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange);
3109
- }, Dt.prototype.createPathShape = function(t, e) {
3110
- var s, i, a = e.length, r = "";
3111
- for (s = 0; s < a; s += 1) e[s].ty === "sh" && (i = e[s].ks.k, r += xi(i, i.i.length, !0, t));
3112
- return r;
3113
- }, Dt.prototype.updateDocumentData = function(t, e) {
3114
- this.textProperty.updateDocumentData(t, e);
3115
- }, Dt.prototype.canResizeFont = function(t) {
3116
- this.textProperty.canResizeFont(t);
3117
- }, Dt.prototype.setMinimumFontSize = function(t) {
3118
- this.textProperty.setMinimumFontSize(t);
3119
- }, Dt.prototype.applyTextPropertiesToMatrix = function(t, e, s, i, a) {
3120
- switch (t.ps && e.translate(t.ps[0], t.ps[1] + t.ascent, 0), e.translate(0, -t.ls, 0), t.j) {
3121
- case 1:
3122
- e.translate(t.justifyOffset + (t.boxWidth - t.lineWidths[s]), 0, 0);
3123
- break;
3124
- case 2:
3125
- e.translate(t.justifyOffset + (t.boxWidth - t.lineWidths[s]) / 2, 0, 0);
3126
- }
3127
- e.translate(i, a, 0);
3128
- }, Dt.prototype.buildColor = function(t) {
3129
- return "rgb(" + Math.round(255 * t[0]) + "," + Math.round(255 * t[1]) + "," + Math.round(255 * t[2]) + ")";
3130
- }, Dt.prototype.emptyProp = new xs(), Dt.prototype.destroy = function() {
3131
- }, Dt.prototype.validateText = function() {
3132
- (this.textProperty._mdf || this.textProperty._isFirstFrame) && (this.buildNewText(), this.textProperty._isFirstFrame = !1, this.textProperty._mdf = !1);
3133
- };
3134
- var na = { shapes: [] };
3135
- function Xt(t, e, s) {
3136
- this.textSpans = [], this.renderType = "svg", this.initElement(t, e, s);
3137
- }
3138
- function ks(t, e, s) {
3139
- this.initElement(t, e, s);
3140
- }
3141
- function te(t, e, s) {
3142
- this.initFrame(), this.initBaseData(t, e, s), this.initFrame(), this.initTransform(t, e, s), this.initHierarchy();
3143
- }
3144
- function pt() {
3145
- }
3146
- function Bt() {
3147
- }
3148
- function Ie(t, e, s) {
3149
- this.layers = t.layers, this.supports3d = !0, this.completeLayers = !1, this.pendingElements = [], this.elements = this.layers ? K(this.layers.length) : [], this.initElement(t, e, s), this.tm = t.tm ? E.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 };
3150
- }
3151
- function Ps(t, e) {
3152
- this.animationItem = t, this.layers = null, this.renderedFrame = -1, this.svgElement = z("svg");
3153
- var s = "";
3154
- if (e && e.title) {
3155
- var i = z("title"), a = Ct();
3156
- i.setAttribute("id", a), i.textContent = e.title, this.svgElement.appendChild(i), s += a;
3157
- }
3158
- if (e && e.description) {
3159
- var r = z("desc"), h = Ct();
3160
- r.setAttribute("id", h), r.textContent = e.description, this.svgElement.appendChild(r), s += " " + h;
3161
- }
3162
- s && this.svgElement.setAttribute("aria-labelledby", s);
3163
- var n = z("defs");
3164
- this.svgElement.appendChild(n);
3165
- var g = z("g");
3166
- this.svgElement.appendChild(g), this.layerElement = g, this.renderConfig = { preserveAspectRatio: e && e.preserveAspectRatio || "xMidYMid meet", imagePreserveAspectRatio: e && e.imagePreserveAspectRatio || "xMidYMid slice", contentVisibility: e && e.contentVisibility || "visible", progressiveLoad: e && e.progressiveLoad || !1, hideOnTransparent: !(e && e.hideOnTransparent === !1), viewBoxOnly: e && e.viewBoxOnly || !1, viewBoxSize: e && e.viewBoxSize || !1, className: e && e.className || "", id: e && e.id || "", focusable: e && e.focusable, filterSize: { width: e && e.filterSize && e.filterSize.width || "100%", height: e && e.filterSize && e.filterSize.height || "100%", x: e && e.filterSize && e.filterSize.x || "0%", y: e && e.filterSize && e.filterSize.y || "0%" }, width: e && e.width, height: e && e.height, runExpressions: !e || e.runExpressions === void 0 || e.runExpressions }, this.globalData = { _mdf: !1, frameNum: -1, defs: n, renderConfig: this.renderConfig }, this.elements = [], this.pendingElements = [], this.destroyed = !1, this.rendererType = "svg";
3167
- }
3168
- function ki() {
3169
- this.sequences = {}, this.sequenceList = [], this.transform_key_count = 0;
3170
- }
3171
- W([wt, Nt, Ee, qt, Mt, ye, Dt], Xt), Xt.prototype.createContent = function() {
3172
- this.data.singleShape && !this.globalData.fontManager.chars && (this.textContainer = z("text"));
3173
- }, Xt.prototype.buildTextContents = function(t) {
3174
- for (var e = 0, s = t.length, i = [], a = ""; e < s; ) t[e] === "\r" || t[e] === "" ? (i.push(a), a = "") : a += t[e], e += 1;
3175
- return i.push(a), i;
3176
- }, Xt.prototype.buildShapeData = function(t, e) {
3177
- if (t.shapes && t.shapes.length) {
3178
- var s = t.shapes[0];
3179
- if (s.it) {
3180
- var i = s.it[s.it.length - 1];
3181
- i.s && (i.s.k[0] = e, i.s.k[1] = e);
3182
- }
3183
- }
3184
- return t;
3185
- }, Xt.prototype.buildNewText = function() {
3186
- var t, e;
3187
- this.addDynamicProperty(this);
3188
- var s = this.textProperty.currentData;
3189
- this.renderedLetters = K(s ? s.l.length : 0), s.fc ? this.layerElement.setAttribute("fill", this.buildColor(s.fc)) : this.layerElement.setAttribute("fill", "rgba(0,0,0,0)"), s.sc && (this.layerElement.setAttribute("stroke", this.buildColor(s.sc)), this.layerElement.setAttribute("stroke-width", s.sw)), this.layerElement.setAttribute("font-size", s.finalSize);
3190
- var i = this.globalData.fontManager.getFontByName(s.f);
3191
- if (i.fClass) this.layerElement.setAttribute("class", i.fClass);
3192
- else {
3193
- this.layerElement.setAttribute("font-family", i.fFamily);
3194
- var a = s.fWeight, r = s.fStyle;
3195
- this.layerElement.setAttribute("font-style", r), this.layerElement.setAttribute("font-weight", a);
3196
- }
3197
- this.layerElement.setAttribute("aria-label", s.t);
3198
- var h, n = s.l || [], g = !!this.globalData.fontManager.chars;
3199
- e = n.length;
3200
- var y = this.mHelper, o = this.data.singleShape, d = 0, c = 0, m = !0, l = 1e-3 * s.tr * s.finalSize;
3201
- if (!o || g || s.sz) {
3202
- var f, p = this.textSpans.length;
3203
- for (t = 0; t < e; t += 1) {
3204
- if (this.textSpans[t] || (this.textSpans[t] = { span: null, childSpan: null, glyph: null }), !g || !o || t === 0) {
3205
- if (h = p > t ? this.textSpans[t].span : z(g ? "g" : "text"), p <= t) {
3206
- if (h.setAttribute("stroke-linecap", "butt"), h.setAttribute("stroke-linejoin", "round"), h.setAttribute("stroke-miterlimit", "4"), this.textSpans[t].span = h, g) {
3207
- var u = z("g");
3208
- h.appendChild(u), this.textSpans[t].childSpan = u;
3209
- }
3210
- this.textSpans[t].span = h, this.layerElement.appendChild(h);
3211
- }
3212
- h.style.display = "inherit";
3213
- }
3214
- if (y.reset(), o && (n[t].n && (d = -l, c += s.yOffset, c += m ? 1 : 0, m = !1), this.applyTextPropertiesToMatrix(s, y, n[t].line, d, c), d += n[t].l || 0, d += l), g) {
3215
- var v;
3216
- if ((f = this.globalData.fontManager.getCharData(s.finalText[t], i.fStyle, this.globalData.fontManager.getFontByName(s.f).fFamily)).t === 1) v = new Ie(f.data, this.globalData, this);
3217
- else {
3218
- var k = na;
3219
- f.data && f.data.shapes && (k = this.buildShapeData(f.data, s.finalSize)), v = new Z(k, this.globalData, this);
3220
- }
3221
- if (this.textSpans[t].glyph) {
3222
- var C = this.textSpans[t].glyph;
3223
- this.textSpans[t].childSpan.removeChild(C.layerElement), C.destroy();
3224
- }
3225
- this.textSpans[t].glyph = v, v._debug = !0, v.prepareFrame(0), v.renderFrame(), this.textSpans[t].childSpan.appendChild(v.layerElement), f.t === 1 && this.textSpans[t].childSpan.setAttribute("transform", "scale(" + s.finalSize / 100 + "," + s.finalSize / 100 + ")");
3226
- } else o && h.setAttribute("transform", "translate(" + y.props[12] + "," + y.props[13] + ")"), h.textContent = n[t].val, h.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
3227
- }
3228
- o && h && h.setAttribute("d", "");
3229
- } else {
3230
- var A = this.textContainer, F = "start";
3231
- switch (s.j) {
3232
- case 1:
3233
- F = "end";
3234
- break;
3235
- case 2:
3236
- F = "middle";
3237
- break;
3238
- default:
3239
- F = "start";
3240
- }
3241
- A.setAttribute("text-anchor", F), A.setAttribute("letter-spacing", l);
3242
- var I = this.buildTextContents(s.finalText);
3243
- for (e = I.length, c = s.ps ? s.ps[1] + s.ascent : 0, t = 0; t < e; t += 1) (h = this.textSpans[t].span || z("tspan")).textContent = I[t], h.setAttribute("x", 0), h.setAttribute("y", c), h.style.display = "inherit", A.appendChild(h), this.textSpans[t] || (this.textSpans[t] = { span: null, glyph: null }), this.textSpans[t].span = h, c += s.finalLineHeight;
3244
- this.layerElement.appendChild(A);
3245
- }
3246
- for (; t < this.textSpans.length; ) this.textSpans[t].span.style.display = "none", t += 1;
3247
- this._sizeChanged = !0;
3248
- }, Xt.prototype.sourceRectAtTime = function() {
3249
- if (this.prepareFrame(this.comp.renderedFrame - this.data.st), this.renderInnerContent(), this._sizeChanged) {
3250
- this._sizeChanged = !1;
3251
- var t = this.layerElement.getBBox();
3252
- this.bbox = { top: t.y, left: t.x, width: t.width, height: t.height };
3253
- }
3254
- return this.bbox;
3255
- }, Xt.prototype.getValue = function() {
3256
- var t, e, s = this.textSpans.length;
3257
- for (this.renderedFrame = this.comp.renderedFrame, t = 0; t < s; t += 1) (e = this.textSpans[t].glyph) && (e.prepareFrame(this.comp.renderedFrame - this.data.st), e._mdf && (this._mdf = !0));
3258
- }, Xt.prototype.renderInnerContent = function() {
3259
- if (this.validateText(), (!this.data.singleShape || this._mdf) && (this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag)) {
3260
- var t, e;
3261
- this._sizeChanged = !0;
3262
- var s, i, a, r = this.textAnimator.renderedLetters, h = this.textProperty.currentData.l;
3263
- for (e = h.length, t = 0; t < e; t += 1) h[t].n || (s = r[t], i = this.textSpans[t].span, (a = this.textSpans[t].glyph) && a.renderFrame(), s._mdf.m && i.setAttribute("transform", s.m), s._mdf.o && i.setAttribute("opacity", s.o), s._mdf.sw && i.setAttribute("stroke-width", s.sw), s._mdf.sc && i.setAttribute("stroke", s.sc), s._mdf.fc && i.setAttribute("fill", s.fc));
3264
- }
3265
- }, W([oe], ks), ks.prototype.createContent = function() {
3266
- var t = z("rect");
3267
- t.setAttribute("width", this.data.sw), t.setAttribute("height", this.data.sh), t.setAttribute("fill", this.data.sc), this.layerElement.appendChild(t);
3268
- }, te.prototype.prepareFrame = function(t) {
3269
- this.prepareProperties(t, !0);
3270
- }, te.prototype.renderFrame = function() {
3271
- }, te.prototype.getBaseElement = function() {
3272
- return null;
3273
- }, te.prototype.destroy = function() {
3274
- }, te.prototype.sourceRectAtTime = function() {
3275
- }, te.prototype.hide = function() {
3276
- }, W([wt, Nt, qt, Mt], te), W([mt], pt), pt.prototype.createNull = function(t) {
3277
- return new te(t, this.globalData, this);
3278
- }, pt.prototype.createShape = function(t) {
3279
- return new Z(t, this.globalData, this);
3280
- }, pt.prototype.createText = function(t) {
3281
- return new Xt(t, this.globalData, this);
3282
- }, pt.prototype.createImage = function(t) {
3283
- return new oe(t, this.globalData, this);
3284
- }, pt.prototype.createSolid = function(t) {
3285
- return new ks(t, this.globalData, this);
3286
- }, pt.prototype.configAnimation = function(t) {
3287
- this.svgElement.setAttribute("xmlns", "http://www.w3.org/2000/svg"), this.svgElement.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), this.renderConfig.viewBoxSize ? this.svgElement.setAttribute("viewBox", this.renderConfig.viewBoxSize) : this.svgElement.setAttribute("viewBox", "0 0 " + t.w + " " + t.h), this.renderConfig.viewBoxOnly || (this.svgElement.setAttribute("width", t.w), this.svgElement.setAttribute("height", t.h), this.svgElement.style.width = "100%", this.svgElement.style.height = "100%", this.svgElement.style.transform = "translate3d(0,0,0)", this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility), this.renderConfig.width && this.svgElement.setAttribute("width", this.renderConfig.width), this.renderConfig.height && this.svgElement.setAttribute("height", this.renderConfig.height), this.renderConfig.className && this.svgElement.setAttribute("class", this.renderConfig.className), this.renderConfig.id && this.svgElement.setAttribute("id", this.renderConfig.id), this.renderConfig.focusable !== void 0 && this.svgElement.setAttribute("focusable", this.renderConfig.focusable), this.svgElement.setAttribute("preserveAspectRatio", this.renderConfig.preserveAspectRatio), this.animationItem.wrapper.appendChild(this.svgElement);
3288
- var e = this.globalData.defs;
3289
- this.setupGlobalData(t, e), this.globalData.progressiveLoad = this.renderConfig.progressiveLoad, this.data = t;
3290
- var s = z("clipPath"), i = z("rect");
3291
- i.setAttribute("width", t.w), i.setAttribute("height", t.h), i.setAttribute("x", 0), i.setAttribute("y", 0);
3292
- var a = Ct();
3293
- s.setAttribute("id", a), s.appendChild(i), this.layerElement.setAttribute("clip-path", "url(" + dt() + "#" + a + ")"), e.appendChild(s), this.layers = t.layers, this.elements = K(t.layers.length);
3294
- }, pt.prototype.destroy = function() {
3295
- var t;
3296
- this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), this.layerElement = null, this.globalData.defs = null;
3297
- var e = this.layers ? this.layers.length : 0;
3298
- for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy && this.elements[t].destroy();
3299
- this.elements.length = 0, this.destroyed = !0, this.animationItem = null;
3300
- }, pt.prototype.updateContainerSize = function() {
3301
- }, pt.prototype.findIndexByInd = function(t) {
3302
- var e = 0, s = this.layers.length;
3303
- for (e = 0; e < s; e += 1) if (this.layers[e].ind === t) return e;
3304
- return -1;
3305
- }, pt.prototype.buildItem = function(t) {
3306
- var e = this.elements;
3307
- if (!e[t] && this.layers[t].ty !== 99) {
3308
- e[t] = !0;
3309
- var s = this.createItem(this.layers[t]);
3310
- if (e[t] = s, Oe() && (this.layers[t].ty === 0 && this.globalData.projectInterface.registerComposition(s), s.initExpressions()), this.appendElementInPos(s, t), this.layers[t].tt) {
3311
- var i = "tp" in this.layers[t] ? this.findIndexByInd(this.layers[t].tp) : t - 1;
3312
- if (i === -1) return;
3313
- if (this.elements[i] && this.elements[i] !== !0) {
3314
- var a = e[i].getMatte(this.layers[t].tt);
3315
- s.setMatte(a);
3316
- } else this.buildItem(i), this.addPendingElement(s);
3317
- }
3318
- }
3319
- }, pt.prototype.checkPendingElements = function() {
3320
- for (; this.pendingElements.length; ) {
3321
- var t = this.pendingElements.pop();
3322
- if (t.checkParenting(), t.data.tt) for (var e = 0, s = this.elements.length; e < s; ) {
3323
- if (this.elements[e] === t) {
3324
- var i = "tp" in t.data ? this.findIndexByInd(t.data.tp) : e - 1, a = this.elements[i].getMatte(this.layers[e].tt);
3325
- t.setMatte(a);
3326
- break;
3327
- }
3328
- e += 1;
3329
- }
3330
- }
3331
- }, pt.prototype.renderFrame = function(t) {
3332
- if (this.renderedFrame !== t && !this.destroyed) {
3333
- var e;
3334
- t === null ? t = this.renderedFrame : this.renderedFrame = t, this.globalData.frameNum = t, this.globalData.frameId += 1, this.globalData.projectInterface.currentFrame = t, this.globalData._mdf = !1;
3335
- var s = this.layers.length;
3336
- for (this.completeLayers || this.checkLayers(t), e = s - 1; e >= 0; e -= 1) (this.completeLayers || this.elements[e]) && this.elements[e].prepareFrame(t - this.layers[e].st);
3337
- if (this.globalData._mdf) for (e = 0; e < s; e += 1) (this.completeLayers || this.elements[e]) && this.elements[e].renderFrame();
3338
- }
3339
- }, pt.prototype.appendElementInPos = function(t, e) {
3340
- var s = t.getBaseElement();
3341
- if (s) {
3342
- for (var i, a = 0; a < e; ) this.elements[a] && this.elements[a] !== !0 && this.elements[a].getBaseElement() && (i = this.elements[a].getBaseElement()), a += 1;
3343
- i ? this.layerElement.insertBefore(s, i) : this.layerElement.appendChild(s);
3344
- }
3345
- }, pt.prototype.hide = function() {
3346
- this.layerElement.style.display = "none";
3347
- }, pt.prototype.show = function() {
3348
- this.layerElement.style.display = "block";
3349
- }, W([wt, Nt, qt, Mt, ye], Bt), Bt.prototype.initElement = function(t, e, s) {
3350
- this.initFrame(), this.initBaseData(t, e, s), this.initTransform(t, e, s), this.initRenderable(), this.initHierarchy(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), !this.data.xt && e.progressiveLoad || this.buildAllItems(), this.hide();
3351
- }, Bt.prototype.prepareFrame = function(t) {
3352
- if (this._mdf = !1, this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange), this.isInRange || this.data.xt) {
3353
- if (this.tm._placeholder) this.renderedFrame = t / this.data.sr;
3354
- else {
3355
- var e = this.tm.v;
3356
- e === this.data.op && (e = this.data.op - 1), this.renderedFrame = e;
3357
- }
3358
- var s, i = this.elements.length;
3359
- for (this.completeLayers || this.checkLayers(this.renderedFrame), s = i - 1; s >= 0; s -= 1) (this.completeLayers || this.elements[s]) && (this.elements[s].prepareFrame(this.renderedFrame - this.layers[s].st), this.elements[s]._mdf && (this._mdf = !0));
3360
- }
3361
- }, Bt.prototype.renderInnerContent = function() {
3362
- var t, e = this.layers.length;
3363
- for (t = 0; t < e; t += 1) (this.completeLayers || this.elements[t]) && this.elements[t].renderFrame();
3364
- }, Bt.prototype.setElements = function(t) {
3365
- this.elements = t;
3366
- }, Bt.prototype.getElements = function() {
3367
- return this.elements;
3368
- }, Bt.prototype.destroyElements = function() {
3369
- var t, e = this.layers.length;
3370
- for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy();
3371
- }, Bt.prototype.destroy = function() {
3372
- this.destroyElements(), this.destroyBaseElement();
3373
- }, W([pt, Bt, Ee], Ie), Ie.prototype.createComp = function(t) {
3374
- return new Ie(t, this.globalData, this);
3375
- }, W([pt], Ps), Ps.prototype.createComp = function(t) {
3376
- return new Ie(t, this.globalData, this);
3377
- }, ki.prototype = { addTransformSequence: function(t) {
3378
- var e, s = t.length, i = "_";
3379
- for (e = 0; e < s; e += 1) i += t[e].transform.key + "_";
3380
- var a = this.sequences[i];
3381
- return a || (a = { transforms: [].concat(t), finalTransform: new st(), _mdf: !1 }, this.sequences[i] = a, this.sequenceList.push(a)), a;
3382
- }, processSequence: function(t, e) {
3383
- for (var s = 0, i = t.transforms.length, a = e; s < i && !e; ) {
3384
- if (t.transforms[s].transform.mProps._mdf) {
3385
- a = !0;
3386
- break;
3387
- }
3388
- s += 1;
3389
- }
3390
- if (a) for (t.finalTransform.reset(), s = i - 1; s >= 0; s -= 1) t.finalTransform.multiply(t.transforms[s].transform.mProps.v);
3391
- t._mdf = a;
3392
- }, processSequences: function(t) {
3393
- var e, s = this.sequenceList.length;
3394
- for (e = 0; e < s; e += 1) this.processSequence(this.sequenceList[e], t);
3395
- }, getNewKey: function() {
3396
- return this.transform_key_count += 1, "_" + this.transform_key_count;
3397
- } };
3398
- var Pi = function() {
3399
- var t = "__lottie_element_luma_buffer", e = null, s = null, i = null;
3400
- function a() {
3401
- var r, h, n;
3402
- e || (r = z("svg"), h = z("filter"), n = z("feColorMatrix"), h.setAttribute("id", t), n.setAttribute("type", "matrix"), n.setAttribute("color-interpolation-filters", "sRGB"), n.setAttribute("values", "0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"), h.appendChild(n), r.appendChild(h), r.setAttribute("id", t + "_svg"), Ze.svgLumaHidden && (r.style.display = "none"), i = r, document.body.appendChild(i), e = Pt("canvas"), (s = e.getContext("2d")).filter = "url(#" + t + ")", s.fillStyle = "rgba(0,0,0,0)", s.fillRect(0, 0, 1, 1));
3403
- }
3404
- return { load: a, get: function(r) {
3405
- return e || a(), e.width = r.width, e.height = r.height, s.filter = "url(#" + t + ")", e;
3406
- } };
3407
- };
3408
- function oa(t, e) {
3409
- if (Ze.offscreenCanvas) return new OffscreenCanvas(t, e);
3410
- var s = Pt("canvas");
3411
- return s.width = t, s.height = e, s;
3412
- }
3413
- var $e = { loadLumaCanvas: Pi.load, getLumaCanvas: Pi.get, createCanvas: oa }, Di = {};
3414
- function Ds(t) {
3415
- var e, s, i = t.data.ef ? t.data.ef.length : 0;
3416
- for (this.filters = [], e = 0; e < i; e += 1) {
3417
- s = null;
3418
- var a = t.data.ef[e].ty;
3419
- Di[a] && (s = new Di[a].effect(t.effectsManager.effectElements[e], t)), s && this.filters.push(s);
3420
- }
3421
- this.filters.length && t.addRenderableComponent(this);
3422
- }
3423
- function Qe(t, e) {
3424
- var s;
3425
- this.data = t, this.element = e, this.masksProperties = this.data.masksProperties || [], this.viewData = K(this.masksProperties.length);
3426
- var i = this.masksProperties.length, a = !1;
3427
- for (s = 0; s < i; s += 1) this.masksProperties[s].mode !== "n" && (a = !0), this.viewData[s] = de.getShapeProp(this.element, this.masksProperties[s], 3);
3428
- this.hasMasks = a, a && this.element.addRenderableComponent(this);
3429
- }
3430
- function Wt() {
3431
- }
3432
- Ds.prototype.renderFrame = function(t) {
3433
- var e, s = this.filters.length;
3434
- for (e = 0; e < s; e += 1) this.filters[e].renderFrame(t);
3435
- }, Ds.prototype.getEffects = function(t) {
3436
- var e, s = this.filters.length, i = [];
3437
- for (e = 0; e < s; e += 1) this.filters[e].type === t && i.push(this.filters[e]);
3438
- return i;
3439
- }, Qe.prototype.renderFrame = function() {
3440
- if (this.hasMasks) {
3441
- var t, e, s, i, a = this.element.finalTransform.mat, r = this.element.canvasContext, h = this.masksProperties.length;
3442
- for (r.beginPath(), t = 0; t < h; t += 1) if (this.masksProperties[t].mode !== "n") {
3443
- var n;
3444
- this.masksProperties[t].inv && (r.moveTo(0, 0), r.lineTo(this.element.globalData.compSize.w, 0), r.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h), r.lineTo(0, this.element.globalData.compSize.h), r.lineTo(0, 0)), i = this.viewData[t].v, e = a.applyToPointArray(i.v[0][0], i.v[0][1], 0), r.moveTo(e[0], e[1]);
3445
- var g = i._length;
3446
- for (n = 1; n < g; n += 1) s = a.applyToTriplePoints(i.o[n - 1], i.i[n], i.v[n]), r.bezierCurveTo(s[0], s[1], s[2], s[3], s[4], s[5]);
3447
- s = a.applyToTriplePoints(i.o[n - 1], i.i[0], i.v[0]), r.bezierCurveTo(s[0], s[1], s[2], s[3], s[4], s[5]);
3448
- }
3449
- this.element.globalData.renderer.save(!0), r.clip();
3450
- }
3451
- }, Qe.prototype.getMaskProperty = Qt.prototype.getMaskProperty, Qe.prototype.destroy = function() {
3452
- this.element = null;
3453
- };
3454
- var Si, ha = { 1: "source-in", 2: "source-out", 3: "source-in", 4: "source-out" };
3455
- function Ai(t, e, s, i) {
3456
- this.styledShapes = [], this.tr = [0, 0, 0, 0, 0, 0];
3457
- var a, r = 4;
3458
- e.ty === "rc" ? r = 5 : e.ty === "el" ? r = 6 : e.ty === "sr" && (r = 7), this.sh = de.getShapeProp(t, e, r, t);
3459
- var h, n = s.length;
3460
- for (a = 0; a < n; a += 1) s[a].closed || (h = { transforms: i.addTransformSequence(s[a].transforms), trNodes: [] }, this.styledShapes.push(h), s[a].elements.push(h));
3461
- }
3462
- function G(t, e, s) {
3463
- this.shapes = [], this.shapesData = t.shapes, this.stylesList = [], this.itemsData = [], this.prevViewData = [], this.shapeModifiers = [], this.processedElements = [], this.transformsManager = new ki(), this.initElement(t, e, s);
3464
- }
3465
- function Ve(t, e, s) {
3466
- this.textSpans = [], this.yOffset = 0, this.fillColorAnim = !1, this.strokeColorAnim = !1, this.strokeWidthAnim = !1, this.stroke = !1, this.fill = !1, this.justifyOffset = 0, this.currentRender = null, this.renderType = "canvas", this.values = { fill: "rgba(0,0,0,0)", stroke: "rgba(0,0,0,0)", sWidth: 0, fValue: "" }, this.initElement(t, e, s);
3467
- }
3468
- function le(t, e, s) {
3469
- this.assetData = e.getAssetData(t.refId), this.img = e.imageLoader.getAsset(this.assetData), this.initElement(t, e, s);
3470
- }
3471
- function Re(t, e, s) {
3472
- this.initElement(t, e, s);
3473
- }
3474
- function X() {
3475
- }
3476
- function wi() {
3477
- this.opacity = -1, this.transform = ht("float32", 16), this.fillStyle = "", this.strokeStyle = "", this.lineWidth = "", this.lineCap = "", this.lineJoin = "", this.miterLimit = "", this.id = Math.random();
3478
- }
3479
- function ft() {
3480
- var t;
3481
- for (this.stack = [], this.cArrPos = 0, this.cTr = new st(), t = 0; t < 15; t += 1) {
3482
- var e = new wi();
3483
- this.stack[t] = e;
3484
- }
3485
- this._length = 15, this.nativeContext = null, this.transformMat = new st(), this.currentOpacity = 1, this.currentFillStyle = "", this.appliedFillStyle = "", this.currentStrokeStyle = "", this.appliedStrokeStyle = "", this.currentLineWidth = "", this.appliedLineWidth = "", this.currentLineCap = "", this.appliedLineCap = "", this.currentLineJoin = "", this.appliedLineJoin = "", this.appliedMiterLimit = "", this.currentMiterLimit = "";
3486
- }
3487
- function _e(t, e, s) {
3488
- this.completeLayers = !1, this.layers = t.layers, this.pendingElements = [], this.elements = K(this.layers.length), this.initElement(t, e, s), this.tm = t.tm ? E.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 };
3489
- }
3490
- function Ss(t, e) {
3491
- this.animationItem = t, this.renderConfig = { clearCanvas: !e || e.clearCanvas === void 0 || e.clearCanvas, context: e && e.context || null, progressiveLoad: e && e.progressiveLoad || !1, preserveAspectRatio: e && e.preserveAspectRatio || "xMidYMid meet", imagePreserveAspectRatio: e && e.imagePreserveAspectRatio || "xMidYMid slice", contentVisibility: e && e.contentVisibility || "visible", className: e && e.className || "", id: e && e.id || "", runExpressions: !e || e.runExpressions === void 0 || e.runExpressions }, this.renderConfig.dpr = e && e.dpr || 1, this.animationItem.wrapper && (this.renderConfig.dpr = e && e.dpr || window.devicePixelRatio || 1), this.renderedFrame = -1, this.globalData = { frameNum: -1, _mdf: !1, renderConfig: this.renderConfig, currentGlobalAlpha: -1 }, this.contextData = new ft(), this.elements = [], this.pendingElements = [], this.transformMat = new st(), this.completeLayers = !1, this.rendererType = "canvas", this.renderConfig.clearCanvas && (this.ctxTransform = this.contextData.transform.bind(this.contextData), this.ctxOpacity = this.contextData.opacity.bind(this.contextData), this.ctxFillStyle = this.contextData.fillStyle.bind(this.contextData), this.ctxStrokeStyle = this.contextData.strokeStyle.bind(this.contextData), this.ctxLineWidth = this.contextData.lineWidth.bind(this.contextData), this.ctxLineCap = this.contextData.lineCap.bind(this.contextData), this.ctxLineJoin = this.contextData.lineJoin.bind(this.contextData), this.ctxMiterLimit = this.contextData.miterLimit.bind(this.contextData), this.ctxFill = this.contextData.fill.bind(this.contextData), this.ctxFillRect = this.contextData.fillRect.bind(this.contextData), this.ctxStroke = this.contextData.stroke.bind(this.contextData), this.save = this.contextData.save.bind(this.contextData));
3492
- }
3493
- return Wt.prototype = { createElements: function() {
3494
- }, initRendererElement: function() {
3495
- }, createContainerElements: function() {
3496
- if (this.data.tt >= 1) {
3497
- this.buffers = [];
3498
- var t = this.globalData.canvasContext, e = $e.createCanvas(t.canvas.width, t.canvas.height);
3499
- this.buffers.push(e);
3500
- var s = $e.createCanvas(t.canvas.width, t.canvas.height);
3501
- this.buffers.push(s), this.data.tt >= 3 && !document._isProxy && $e.loadLumaCanvas();
3502
- }
3503
- this.canvasContext = this.globalData.canvasContext, this.transformCanvas = this.globalData.transformCanvas, this.renderableEffectsManager = new Ds(this), this.searchEffectTransforms();
3504
- }, createContent: function() {
3505
- }, setBlendMode: function() {
3506
- var t = this.globalData;
3507
- if (t.blendMode !== this.data.bm) {
3508
- t.blendMode = this.data.bm;
3509
- var e = Ue(this.data.bm);
3510
- t.canvasContext.globalCompositeOperation = e;
3511
- }
3512
- }, createRenderableComponents: function() {
3513
- this.maskManager = new Qe(this.data, this), this.transformEffects = this.renderableEffectsManager.getEffects(mi);
3514
- }, hideElement: function() {
3515
- this.hidden || this.isInRange && !this.isTransparent || (this.hidden = !0);
3516
- }, showElement: function() {
3517
- this.isInRange && !this.isTransparent && (this.hidden = !1, this._isFirstFrame = !0, this.maskManager._isFirstFrame = !0);
3518
- }, clearCanvas: function(t) {
3519
- t.clearRect(this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy);
3520
- }, prepareLayer: function() {
3521
- if (this.data.tt >= 1) {
3522
- var t = this.buffers[0].getContext("2d");
3523
- this.clearCanvas(t), t.drawImage(this.canvasContext.canvas, 0, 0), this.currentTransform = this.canvasContext.getTransform(), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.setTransform(this.currentTransform);
3524
- }
3525
- }, exitLayer: function() {
3526
- if (this.data.tt >= 1) {
3527
- var t = this.buffers[1], e = t.getContext("2d");
3528
- if (this.clearCanvas(e), e.drawImage(this.canvasContext.canvas, 0, 0), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.setTransform(this.currentTransform), this.comp.getElementById("tp" in this.data ? this.data.tp : this.data.ind - 1).renderFrame(!0), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.data.tt >= 3 && !document._isProxy) {
3529
- var s = $e.getLumaCanvas(this.canvasContext.canvas);
3530
- s.getContext("2d").drawImage(this.canvasContext.canvas, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.drawImage(s, 0, 0);
3531
- }
3532
- this.canvasContext.globalCompositeOperation = ha[this.data.tt], this.canvasContext.drawImage(t, 0, 0), this.canvasContext.globalCompositeOperation = "destination-over", this.canvasContext.drawImage(this.buffers[0], 0, 0), this.canvasContext.setTransform(this.currentTransform), this.canvasContext.globalCompositeOperation = "source-over";
3533
- }
3534
- }, renderFrame: function(t) {
3535
- if (!this.hidden && !this.data.hd && (this.data.td !== 1 || t)) {
3536
- this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.setBlendMode();
3537
- var e = this.data.ty === 0;
3538
- this.prepareLayer(), this.globalData.renderer.save(e), this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props), this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity), this.renderInnerContent(), this.globalData.renderer.restore(e), this.exitLayer(), this.maskManager.hasMasks && this.globalData.renderer.restore(!0), this._isFirstFrame && (this._isFirstFrame = !1);
3539
- }
3540
- }, destroy: function() {
3541
- this.canvasContext = null, this.data = null, this.globalData = null, this.maskManager.destroy();
3542
- }, mHelper: new st() }, Wt.prototype.hide = Wt.prototype.hideElement, Wt.prototype.show = Wt.prototype.showElement, Ai.prototype.setAsAnimated = Cs.prototype.setAsAnimated, W([wt, Nt, Wt, vs, qt, Mt, Zt], G), G.prototype.initElement = ye.prototype.initElement, G.prototype.transformHelper = { opacity: 1, _opMdf: !1 }, G.prototype.dashResetter = [], G.prototype.createContent = function() {
3543
- this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, !0, []);
3544
- }, G.prototype.createStyleElement = function(t, e) {
3545
- var s = { data: t, type: t.ty, preTransforms: this.transformsManager.addTransformSequence(e), transforms: [], elements: [], closed: t.hd === !0 }, i = {};
3546
- if (t.ty === "fl" || t.ty === "st" ? (i.c = E.getProp(this, t.c, 1, 255, this), i.c.k || (s.co = "rgb(" + gt(i.c.v[0]) + "," + gt(i.c.v[1]) + "," + gt(i.c.v[2]) + ")")) : t.ty !== "gf" && t.ty !== "gs" || (i.s = E.getProp(this, t.s, 1, null, this), i.e = E.getProp(this, t.e, 1, null, this), i.h = E.getProp(this, t.h || { k: 0 }, 0, 0.01, this), i.a = E.getProp(this, t.a || { k: 0 }, 0, et, this), i.g = new ve(this, t.g, this)), i.o = E.getProp(this, t.o, 0, 0.01, this), t.ty === "st" || t.ty === "gs") {
3547
- if (s.lc = bs[t.lc || 2], s.lj = _s[t.lj || 2], t.lj == 1 && (s.ml = t.ml), i.w = E.getProp(this, t.w, 0, null, this), i.w.k || (s.wi = i.w.v), t.d) {
3548
- var a = new Le(this, t.d, "canvas", this);
3549
- i.d = a, i.d.k || (s.da = i.d.dashArray, s.do = i.d.dashoffset[0]);
3550
- }
3551
- } else s.r = t.r === 2 ? "evenodd" : "nonzero";
3552
- return this.stylesList.push(s), i.style = s, i;
3553
- }, G.prototype.createGroupElement = function() {
3554
- return { it: [], prevViewData: [] };
3555
- }, G.prototype.createTransformElement = function(t) {
3556
- return { transform: { opacity: 1, _opMdf: !1, key: this.transformsManager.getNewKey(), op: E.getProp(this, t.o, 0, 0.01, this), mProps: Xe.getTransformProperty(this, t, this) } };
3557
- }, G.prototype.createShapeElement = function(t) {
3558
- var e = new Ai(this, t, this.stylesList, this.transformsManager);
3559
- return this.shapes.push(e), this.addShapeToModifiers(e), e;
3560
- }, G.prototype.reloadShapes = function() {
3561
- var t;
3562
- this._isFirstFrame = !0;
3563
- var e = this.itemsData.length;
3564
- for (t = 0; t < e; t += 1) this.prevViewData[t] = this.itemsData[t];
3565
- for (this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, !0, []), e = this.dynamicProperties.length, t = 0; t < e; t += 1) this.dynamicProperties[t].getValue();
3566
- this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame);
3567
- }, G.prototype.addTransformToStyleList = function(t) {
3568
- var e, s = this.stylesList.length;
3569
- for (e = 0; e < s; e += 1) this.stylesList[e].closed || this.stylesList[e].transforms.push(t);
3570
- }, G.prototype.removeTransformFromStyleList = function() {
3571
- var t, e = this.stylesList.length;
3572
- for (t = 0; t < e; t += 1) this.stylesList[t].closed || this.stylesList[t].transforms.pop();
3573
- }, G.prototype.closeStyles = function(t) {
3574
- var e, s = t.length;
3575
- for (e = 0; e < s; e += 1) t[e].closed = !0;
3576
- }, G.prototype.searchShapes = function(t, e, s, i, a) {
3577
- var r, h, n, g, y, o, d = t.length - 1, c = [], m = [], l = [].concat(a);
3578
- for (r = d; r >= 0; r -= 1) {
3579
- if ((g = this.searchProcessedElement(t[r])) ? e[r] = s[g - 1] : t[r]._shouldRender = i, t[r].ty === "fl" || t[r].ty === "st" || t[r].ty === "gf" || t[r].ty === "gs") g ? e[r].style.closed = !1 : e[r] = this.createStyleElement(t[r], l), c.push(e[r].style);
3580
- else if (t[r].ty === "gr") {
3581
- if (g) for (n = e[r].it.length, h = 0; h < n; h += 1) e[r].prevViewData[h] = e[r].it[h];
3582
- else e[r] = this.createGroupElement(t[r]);
3583
- this.searchShapes(t[r].it, e[r].it, e[r].prevViewData, i, l);
3584
- } else t[r].ty === "tr" ? (g || (o = this.createTransformElement(t[r]), e[r] = o), l.push(e[r]), this.addTransformToStyleList(e[r])) : t[r].ty === "sh" || t[r].ty === "rc" || t[r].ty === "el" || t[r].ty === "sr" ? g || (e[r] = this.createShapeElement(t[r])) : t[r].ty === "tm" || t[r].ty === "rd" || t[r].ty === "pb" || t[r].ty === "zz" || t[r].ty === "op" ? (g ? (y = e[r]).closed = !1 : ((y = zt.getModifier(t[r].ty)).init(this, t[r]), e[r] = y, this.shapeModifiers.push(y)), m.push(y)) : t[r].ty === "rp" && (g ? (y = e[r]).closed = !0 : (y = zt.getModifier(t[r].ty), e[r] = y, y.init(this, t, r, e), this.shapeModifiers.push(y), i = !1), m.push(y));
3585
- this.addProcessedElement(t[r], r + 1);
3586
- }
3587
- for (this.removeTransformFromStyleList(), this.closeStyles(c), d = m.length, r = 0; r < d; r += 1) m[r].closed = !0;
3588
- }, G.prototype.renderInnerContent = function() {
3589
- this.transformHelper.opacity = 1, this.transformHelper._opMdf = !1, this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame), this.renderShape(this.transformHelper, this.shapesData, this.itemsData, !0);
3590
- }, G.prototype.renderShapeTransform = function(t, e) {
3591
- (t._opMdf || e.op._mdf || this._isFirstFrame) && (e.opacity = t.opacity, e.opacity *= e.op.v, e._opMdf = !0);
3592
- }, G.prototype.drawLayer = function() {
3593
- var t, e, s, i, a, r, h, n, g, y = this.stylesList.length, o = this.globalData.renderer, d = this.globalData.canvasContext;
3594
- for (t = 0; t < y; t += 1) if (((n = (g = this.stylesList[t]).type) !== "st" && n !== "gs" || g.wi !== 0) && g.data._shouldRender && g.coOp !== 0 && this.globalData.currentGlobalAlpha !== 0) {
3595
- for (o.save(), r = g.elements, n === "st" || n === "gs" ? (o.ctxStrokeStyle(n === "st" ? g.co : g.grd), o.ctxLineWidth(g.wi), o.ctxLineCap(g.lc), o.ctxLineJoin(g.lj), o.ctxMiterLimit(g.ml || 0)) : o.ctxFillStyle(n === "fl" ? g.co : g.grd), o.ctxOpacity(g.coOp), n !== "st" && n !== "gs" && d.beginPath(), o.ctxTransform(g.preTransforms.finalTransform.props), s = r.length, e = 0; e < s; e += 1) {
3596
- for (n !== "st" && n !== "gs" || (d.beginPath(), g.da && (d.setLineDash(g.da), d.lineDashOffset = g.do)), a = (h = r[e].trNodes).length, i = 0; i < a; i += 1) h[i].t === "m" ? d.moveTo(h[i].p[0], h[i].p[1]) : h[i].t === "c" ? d.bezierCurveTo(h[i].pts[0], h[i].pts[1], h[i].pts[2], h[i].pts[3], h[i].pts[4], h[i].pts[5]) : d.closePath();
3597
- n !== "st" && n !== "gs" || (o.ctxStroke(), g.da && d.setLineDash(this.dashResetter));
3598
- }
3599
- n !== "st" && n !== "gs" && this.globalData.renderer.ctxFill(g.r), o.restore();
3600
- }
3601
- }, G.prototype.renderShape = function(t, e, s, i) {
3602
- var a, r;
3603
- for (r = t, a = e.length - 1; a >= 0; a -= 1) e[a].ty === "tr" ? (r = s[a].transform, this.renderShapeTransform(t, r)) : e[a].ty === "sh" || e[a].ty === "el" || e[a].ty === "rc" || e[a].ty === "sr" ? this.renderPath(e[a], s[a]) : e[a].ty === "fl" ? this.renderFill(e[a], s[a], r) : e[a].ty === "st" ? this.renderStroke(e[a], s[a], r) : e[a].ty === "gf" || e[a].ty === "gs" ? this.renderGradientFill(e[a], s[a], r) : e[a].ty === "gr" ? this.renderShape(r, e[a].it, s[a].it) : e[a].ty;
3604
- i && this.drawLayer();
3605
- }, G.prototype.renderStyledShape = function(t, e) {
3606
- if (this._isFirstFrame || e._mdf || t.transforms._mdf) {
3607
- var s, i, a, r = t.trNodes, h = e.paths, n = h._length;
3608
- r.length = 0;
3609
- var g = t.transforms.finalTransform;
3610
- for (a = 0; a < n; a += 1) {
3611
- var y = h.shapes[a];
3612
- if (y && y.v) {
3613
- for (i = y._length, s = 1; s < i; s += 1) s === 1 && r.push({ t: "m", p: g.applyToPointArray(y.v[0][0], y.v[0][1], 0) }), r.push({ t: "c", pts: g.applyToTriplePoints(y.o[s - 1], y.i[s], y.v[s]) });
3614
- i === 1 && r.push({ t: "m", p: g.applyToPointArray(y.v[0][0], y.v[0][1], 0) }), y.c && i && (r.push({ t: "c", pts: g.applyToTriplePoints(y.o[s - 1], y.i[0], y.v[0]) }), r.push({ t: "z" }));
3615
- }
3616
- }
3617
- t.trNodes = r;
3618
- }
3619
- }, G.prototype.renderPath = function(t, e) {
3620
- if (t.hd !== !0 && t._shouldRender) {
3621
- var s, i = e.styledShapes.length;
3622
- for (s = 0; s < i; s += 1) this.renderStyledShape(e.styledShapes[s], e.sh);
3623
- }
3624
- }, G.prototype.renderFill = function(t, e, s) {
3625
- var i = e.style;
3626
- (e.c._mdf || this._isFirstFrame) && (i.co = "rgb(" + gt(e.c.v[0]) + "," + gt(e.c.v[1]) + "," + gt(e.c.v[2]) + ")"), (e.o._mdf || s._opMdf || this._isFirstFrame) && (i.coOp = e.o.v * s.opacity);
3627
- }, G.prototype.renderGradientFill = function(t, e, s) {
3628
- var i, a = e.style;
3629
- if (!a.grd || e.g._mdf || e.s._mdf || e.e._mdf || t.t !== 1 && (e.h._mdf || e.a._mdf)) {
3630
- var r, h = this.globalData.canvasContext, n = e.s.v, g = e.e.v;
3631
- if (t.t === 1) i = h.createLinearGradient(n[0], n[1], g[0], g[1]);
3632
- else {
3633
- var y = Math.sqrt(Math.pow(n[0] - g[0], 2) + Math.pow(n[1] - g[1], 2)), o = Math.atan2(g[1] - n[1], g[0] - n[0]), d = e.h.v;
3634
- d >= 1 ? d = 0.99 : d <= -1 && (d = -0.99);
3635
- var c = y * d, m = Math.cos(o + e.a.v) * c + n[0], l = Math.sin(o + e.a.v) * c + n[1];
3636
- i = h.createRadialGradient(m, l, 0, n[0], n[1], y);
3637
- }
3638
- var f = t.g.p, p = e.g.c, u = 1;
3639
- for (r = 0; r < f; r += 1) e.g._hasOpacity && e.g._collapsable && (u = e.g.o[2 * r + 1]), i.addColorStop(p[4 * r] / 100, "rgba(" + p[4 * r + 1] + "," + p[4 * r + 2] + "," + p[4 * r + 3] + "," + u + ")");
3640
- a.grd = i;
3641
- }
3642
- a.coOp = e.o.v * s.opacity;
3643
- }, G.prototype.renderStroke = function(t, e, s) {
3644
- var i = e.style, a = e.d;
3645
- a && (a._mdf || this._isFirstFrame) && (i.da = a.dashArray, i.do = a.dashoffset[0]), (e.c._mdf || this._isFirstFrame) && (i.co = "rgb(" + gt(e.c.v[0]) + "," + gt(e.c.v[1]) + "," + gt(e.c.v[2]) + ")"), (e.o._mdf || s._opMdf || this._isFirstFrame) && (i.coOp = e.o.v * s.opacity), (e.w._mdf || this._isFirstFrame) && (i.wi = e.w.v);
3646
- }, G.prototype.destroy = function() {
3647
- this.shapesData = null, this.globalData = null, this.canvasContext = null, this.stylesList.length = 0, this.itemsData.length = 0;
3648
- }, W([wt, Nt, Wt, qt, Mt, Zt, Dt], Ve), Ve.prototype.tHelper = Pt("canvas").getContext("2d"), Ve.prototype.buildNewText = function() {
3649
- var t = this.textProperty.currentData;
3650
- this.renderedLetters = K(t.l ? t.l.length : 0);
3651
- var e = !1;
3652
- t.fc ? (e = !0, this.values.fill = this.buildColor(t.fc)) : this.values.fill = "rgba(0,0,0,0)", this.fill = e;
3653
- var s = !1;
3654
- t.sc && (s = !0, this.values.stroke = this.buildColor(t.sc), this.values.sWidth = t.sw);
3655
- var i, a, r, h, n, g, y, o, d, c, m, l, f = this.globalData.fontManager.getFontByName(t.f), p = t.l, u = this.mHelper;
3656
- this.stroke = s, this.values.fValue = t.finalSize + "px " + this.globalData.fontManager.getFontByName(t.f).fFamily, a = t.finalText.length;
3657
- var v = this.data.singleShape, k = 1e-3 * t.tr * t.finalSize, C = 0, A = 0, F = !0, I = 0;
3658
- for (i = 0; i < a; i += 1) {
3659
- h = (r = this.globalData.fontManager.getCharData(t.finalText[i], f.fStyle, this.globalData.fontManager.getFontByName(t.f).fFamily)) && r.data || {}, u.reset(), v && p[i].n && (C = -k, A += t.yOffset, A += F ? 1 : 0, F = !1), d = (y = h.shapes ? h.shapes[0].it : []).length, u.scale(t.finalSize / 100, t.finalSize / 100), v && this.applyTextPropertiesToMatrix(t, u, p[i].line, C, A), m = K(d - 1);
3660
- var x = 0;
3661
- for (o = 0; o < d; o += 1) if (y[o].ty === "sh") {
3662
- for (g = y[o].ks.k.i.length, c = y[o].ks.k, l = [], n = 1; n < g; n += 1) n === 1 && l.push(u.applyToX(c.v[0][0], c.v[0][1], 0), u.applyToY(c.v[0][0], c.v[0][1], 0)), l.push(u.applyToX(c.o[n - 1][0], c.o[n - 1][1], 0), u.applyToY(c.o[n - 1][0], c.o[n - 1][1], 0), u.applyToX(c.i[n][0], c.i[n][1], 0), u.applyToY(c.i[n][0], c.i[n][1], 0), u.applyToX(c.v[n][0], c.v[n][1], 0), u.applyToY(c.v[n][0], c.v[n][1], 0));
3663
- l.push(u.applyToX(c.o[n - 1][0], c.o[n - 1][1], 0), u.applyToY(c.o[n - 1][0], c.o[n - 1][1], 0), u.applyToX(c.i[0][0], c.i[0][1], 0), u.applyToY(c.i[0][0], c.i[0][1], 0), u.applyToX(c.v[0][0], c.v[0][1], 0), u.applyToY(c.v[0][0], c.v[0][1], 0)), m[x] = l, x += 1;
3664
- }
3665
- v && (C += p[i].l, C += k), this.textSpans[I] ? this.textSpans[I].elem = m : this.textSpans[I] = { elem: m }, I += 1;
3666
- }
3667
- }, Ve.prototype.renderInnerContent = function() {
3668
- var t, e, s, i, a, r;
3669
- this.validateText(), this.canvasContext.font = this.values.fValue, this.globalData.renderer.ctxLineCap("butt"), this.globalData.renderer.ctxLineJoin("miter"), this.globalData.renderer.ctxMiterLimit(4), this.data.singleShape || this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
3670
- var h, n = this.textAnimator.renderedLetters, g = this.textProperty.currentData.l;
3671
- e = g.length;
3672
- var y, o, d = null, c = null, m = null, l = this.globalData.renderer;
3673
- for (t = 0; t < e; t += 1) if (!g[t].n) {
3674
- if ((h = n[t]) && (l.save(), l.ctxTransform(h.p), l.ctxOpacity(h.o)), this.fill) {
3675
- for (h && h.fc ? d !== h.fc && (l.ctxFillStyle(h.fc), d = h.fc) : d !== this.values.fill && (d = this.values.fill, l.ctxFillStyle(this.values.fill)), i = (y = this.textSpans[t].elem).length, this.globalData.canvasContext.beginPath(), s = 0; s < i; s += 1) for (r = (o = y[s]).length, this.globalData.canvasContext.moveTo(o[0], o[1]), a = 2; a < r; a += 6) this.globalData.canvasContext.bezierCurveTo(o[a], o[a + 1], o[a + 2], o[a + 3], o[a + 4], o[a + 5]);
3676
- this.globalData.canvasContext.closePath(), l.ctxFill();
3677
- }
3678
- if (this.stroke) {
3679
- for (h && h.sw ? m !== h.sw && (m = h.sw, l.ctxLineWidth(h.sw)) : m !== this.values.sWidth && (m = this.values.sWidth, l.ctxLineWidth(this.values.sWidth)), h && h.sc ? c !== h.sc && (c = h.sc, l.ctxStrokeStyle(h.sc)) : c !== this.values.stroke && (c = this.values.stroke, l.ctxStrokeStyle(this.values.stroke)), i = (y = this.textSpans[t].elem).length, this.globalData.canvasContext.beginPath(), s = 0; s < i; s += 1) for (r = (o = y[s]).length, this.globalData.canvasContext.moveTo(o[0], o[1]), a = 2; a < r; a += 6) this.globalData.canvasContext.bezierCurveTo(o[a], o[a + 1], o[a + 2], o[a + 3], o[a + 4], o[a + 5]);
3680
- this.globalData.canvasContext.closePath(), l.ctxStroke();
3681
- }
3682
- h && this.globalData.renderer.restore();
3683
- }
3684
- }, W([wt, Nt, Wt, qt, Mt, Zt], le), le.prototype.initElement = Z.prototype.initElement, le.prototype.prepareFrame = oe.prototype.prepareFrame, le.prototype.createContent = function() {
3685
- if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
3686
- var t = Pt("canvas");
3687
- t.width = this.assetData.w, t.height = this.assetData.h;
3688
- var e, s, i = t.getContext("2d"), a = this.img.width, r = this.img.height, h = a / r, n = this.assetData.w / this.assetData.h, g = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
3689
- h > n && g === "xMidYMid slice" || h < n && g !== "xMidYMid slice" ? e = (s = r) * n : s = (e = a) / n, i.drawImage(this.img, (a - e) / 2, (r - s) / 2, e, s, 0, 0, this.assetData.w, this.assetData.h), this.img = t;
3690
- }
3691
- }, le.prototype.renderInnerContent = function() {
3692
- this.canvasContext.drawImage(this.img, 0, 0);
3693
- }, le.prototype.destroy = function() {
3694
- this.img = null;
3695
- }, W([wt, Nt, Wt, qt, Mt, Zt], Re), Re.prototype.initElement = Z.prototype.initElement, Re.prototype.prepareFrame = oe.prototype.prepareFrame, Re.prototype.renderInnerContent = function() {
3696
- this.globalData.renderer.ctxFillStyle(this.data.sc), this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh);
3697
- }, W([mt], X), X.prototype.createShape = function(t) {
3698
- return new G(t, this.globalData, this);
3699
- }, X.prototype.createText = function(t) {
3700
- return new Ve(t, this.globalData, this);
3701
- }, X.prototype.createImage = function(t) {
3702
- return new le(t, this.globalData, this);
3703
- }, X.prototype.createSolid = function(t) {
3704
- return new Re(t, this.globalData, this);
3705
- }, X.prototype.createNull = Ps.prototype.createNull, X.prototype.ctxTransform = function(t) {
3706
- t[0] === 1 && t[1] === 0 && t[4] === 0 && t[5] === 1 && t[12] === 0 && t[13] === 0 || this.canvasContext.transform(t[0], t[1], t[4], t[5], t[12], t[13]);
3707
- }, X.prototype.ctxOpacity = function(t) {
3708
- this.canvasContext.globalAlpha *= t < 0 ? 0 : t;
3709
- }, X.prototype.ctxFillStyle = function(t) {
3710
- this.canvasContext.fillStyle = t;
3711
- }, X.prototype.ctxStrokeStyle = function(t) {
3712
- this.canvasContext.strokeStyle = t;
3713
- }, X.prototype.ctxLineWidth = function(t) {
3714
- this.canvasContext.lineWidth = t;
3715
- }, X.prototype.ctxLineCap = function(t) {
3716
- this.canvasContext.lineCap = t;
3717
- }, X.prototype.ctxLineJoin = function(t) {
3718
- this.canvasContext.lineJoin = t;
3719
- }, X.prototype.ctxMiterLimit = function(t) {
3720
- this.canvasContext.miterLimit = t;
3721
- }, X.prototype.ctxFill = function(t) {
3722
- this.canvasContext.fill(t);
3723
- }, X.prototype.ctxFillRect = function(t, e, s, i) {
3724
- this.canvasContext.fillRect(t, e, s, i);
3725
- }, X.prototype.ctxStroke = function() {
3726
- this.canvasContext.stroke();
3727
- }, X.prototype.reset = function() {
3728
- this.renderConfig.clearCanvas ? this.contextData.reset() : this.canvasContext.restore();
3729
- }, X.prototype.save = function() {
3730
- this.canvasContext.save();
3731
- }, X.prototype.restore = function(t) {
3732
- this.renderConfig.clearCanvas ? (t && (this.globalData.blendMode = "source-over"), this.contextData.restore(t)) : this.canvasContext.restore();
3733
- }, X.prototype.configAnimation = function(t) {
3734
- if (this.animationItem.wrapper) {
3735
- this.animationItem.container = Pt("canvas");
3736
- var e = this.animationItem.container.style;
3737
- e.width = "100%", e.height = "100%";
3738
- var s = "0px 0px 0px";
3739
- e.transformOrigin = s, e.mozTransformOrigin = s, e.webkitTransformOrigin = s, e["-webkit-transform"] = s, e.contentVisibility = this.renderConfig.contentVisibility, this.animationItem.wrapper.appendChild(this.animationItem.container), this.canvasContext = this.animationItem.container.getContext("2d"), this.renderConfig.className && this.animationItem.container.setAttribute("class", this.renderConfig.className), this.renderConfig.id && this.animationItem.container.setAttribute("id", this.renderConfig.id);
3740
- } else this.canvasContext = this.renderConfig.context;
3741
- this.contextData.setContext(this.canvasContext), this.data = t, this.layers = t.layers, this.transformCanvas = { w: t.w, h: t.h, sx: 0, sy: 0, tx: 0, ty: 0 }, this.setupGlobalData(t, document.body), this.globalData.canvasContext = this.canvasContext, this.globalData.renderer = this, this.globalData.isDashed = !1, this.globalData.progressiveLoad = this.renderConfig.progressiveLoad, this.globalData.transformCanvas = this.transformCanvas, this.elements = K(t.layers.length), this.updateContainerSize();
3742
- }, X.prototype.updateContainerSize = function(t, e) {
3743
- var s, i, a, r;
3744
- if (this.reset(), t ? (s = t, i = e, this.canvasContext.canvas.width = s, this.canvasContext.canvas.height = i) : (this.animationItem.wrapper && this.animationItem.container ? (s = this.animationItem.wrapper.offsetWidth, i = this.animationItem.wrapper.offsetHeight) : (s = this.canvasContext.canvas.width, i = this.canvasContext.canvas.height), this.canvasContext.canvas.width = s * this.renderConfig.dpr, this.canvasContext.canvas.height = i * this.renderConfig.dpr), this.renderConfig.preserveAspectRatio.indexOf("meet") !== -1 || this.renderConfig.preserveAspectRatio.indexOf("slice") !== -1) {
3745
- var h = this.renderConfig.preserveAspectRatio.split(" "), n = h[1] || "meet", g = h[0] || "xMidYMid", y = g.substr(0, 4), o = g.substr(4);
3746
- a = s / i, (r = this.transformCanvas.w / this.transformCanvas.h) > a && n === "meet" || r < a && n === "slice" ? (this.transformCanvas.sx = s / (this.transformCanvas.w / this.renderConfig.dpr), this.transformCanvas.sy = s / (this.transformCanvas.w / this.renderConfig.dpr)) : (this.transformCanvas.sx = i / (this.transformCanvas.h / this.renderConfig.dpr), this.transformCanvas.sy = i / (this.transformCanvas.h / this.renderConfig.dpr)), this.transformCanvas.tx = y === "xMid" && (r < a && n === "meet" || r > a && n === "slice") ? (s - this.transformCanvas.w * (i / this.transformCanvas.h)) / 2 * this.renderConfig.dpr : y === "xMax" && (r < a && n === "meet" || r > a && n === "slice") ? (s - this.transformCanvas.w * (i / this.transformCanvas.h)) * this.renderConfig.dpr : 0, this.transformCanvas.ty = o === "YMid" && (r > a && n === "meet" || r < a && n === "slice") ? (i - this.transformCanvas.h * (s / this.transformCanvas.w)) / 2 * this.renderConfig.dpr : o === "YMax" && (r > a && n === "meet" || r < a && n === "slice") ? (i - this.transformCanvas.h * (s / this.transformCanvas.w)) * this.renderConfig.dpr : 0;
3747
- } else this.renderConfig.preserveAspectRatio === "none" ? (this.transformCanvas.sx = s / (this.transformCanvas.w / this.renderConfig.dpr), this.transformCanvas.sy = i / (this.transformCanvas.h / this.renderConfig.dpr), this.transformCanvas.tx = 0, this.transformCanvas.ty = 0) : (this.transformCanvas.sx = this.renderConfig.dpr, this.transformCanvas.sy = this.renderConfig.dpr, this.transformCanvas.tx = 0, this.transformCanvas.ty = 0);
3748
- this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1], this.ctxTransform(this.transformCanvas.props), this.canvasContext.beginPath(), this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h), this.canvasContext.closePath(), this.canvasContext.clip(), this.renderFrame(this.renderedFrame, !0);
3749
- }, X.prototype.destroy = function() {
3750
- var t;
3751
- for (this.renderConfig.clearCanvas && this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), t = (this.layers ? this.layers.length : 0) - 1; t >= 0; t -= 1) this.elements[t] && this.elements[t].destroy && this.elements[t].destroy();
3752
- this.elements.length = 0, this.globalData.canvasContext = null, this.animationItem.container = null, this.destroyed = !0;
3753
- }, X.prototype.renderFrame = function(t, e) {
3754
- if ((this.renderedFrame !== t || this.renderConfig.clearCanvas !== !0 || e) && !this.destroyed && t !== -1) {
3755
- var s;
3756
- this.renderedFrame = t, this.globalData.frameNum = t - this.animationItem._isFirstFrame, this.globalData.frameId += 1, this.globalData._mdf = !this.renderConfig.clearCanvas || e, this.globalData.projectInterface.currentFrame = t;
3757
- var i = this.layers.length;
3758
- for (this.completeLayers || this.checkLayers(t), s = i - 1; s >= 0; s -= 1) (this.completeLayers || this.elements[s]) && this.elements[s].prepareFrame(t - this.layers[s].st);
3759
- if (this.globalData._mdf) {
3760
- for (this.renderConfig.clearCanvas === !0 ? this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h) : this.save(), s = i - 1; s >= 0; s -= 1) (this.completeLayers || this.elements[s]) && this.elements[s].renderFrame();
3761
- this.renderConfig.clearCanvas !== !0 && this.restore();
3762
- }
3763
- }
3764
- }, X.prototype.buildItem = function(t) {
3765
- var e = this.elements;
3766
- if (!e[t] && this.layers[t].ty !== 99) {
3767
- var s = this.createItem(this.layers[t], this, this.globalData);
3768
- e[t] = s, s.initExpressions();
3769
- }
3770
- }, X.prototype.checkPendingElements = function() {
3771
- for (; this.pendingElements.length; )
3772
- this.pendingElements.pop().checkParenting();
3773
- }, X.prototype.hide = function() {
3774
- this.animationItem.container.style.display = "none";
3775
- }, X.prototype.show = function() {
3776
- this.animationItem.container.style.display = "block";
3777
- }, ft.prototype.duplicate = function() {
3778
- var t = 2 * this._length, e = 0;
3779
- for (e = this._length; e < t; e += 1) this.stack[e] = new wi();
3780
- this._length = t;
3781
- }, ft.prototype.reset = function() {
3782
- this.cArrPos = 0, this.cTr.reset(), this.stack[this.cArrPos].opacity = 1;
3783
- }, ft.prototype.restore = function(t) {
3784
- this.cArrPos -= 1;
3785
- var e, s = this.stack[this.cArrPos], i = s.transform, a = this.cTr.props;
3786
- for (e = 0; e < 16; e += 1) a[e] = i[e];
3787
- if (t) {
3788
- this.nativeContext.restore();
3789
- var r = this.stack[this.cArrPos + 1];
3790
- this.appliedFillStyle = r.fillStyle, this.appliedStrokeStyle = r.strokeStyle, this.appliedLineWidth = r.lineWidth, this.appliedLineCap = r.lineCap, this.appliedLineJoin = r.lineJoin, this.appliedMiterLimit = r.miterLimit;
3791
- }
3792
- this.nativeContext.setTransform(i[0], i[1], i[4], i[5], i[12], i[13]), (t || s.opacity !== -1 && this.currentOpacity !== s.opacity) && (this.nativeContext.globalAlpha = s.opacity, this.currentOpacity = s.opacity), this.currentFillStyle = s.fillStyle, this.currentStrokeStyle = s.strokeStyle, this.currentLineWidth = s.lineWidth, this.currentLineCap = s.lineCap, this.currentLineJoin = s.lineJoin, this.currentMiterLimit = s.miterLimit;
3793
- }, ft.prototype.save = function(t) {
3794
- t && this.nativeContext.save();
3795
- var e = this.cTr.props;
3796
- this._length <= this.cArrPos && this.duplicate();
3797
- var s, i = this.stack[this.cArrPos];
3798
- for (s = 0; s < 16; s += 1) i.transform[s] = e[s];
3799
- this.cArrPos += 1;
3800
- var a = this.stack[this.cArrPos];
3801
- a.opacity = i.opacity, a.fillStyle = i.fillStyle, a.strokeStyle = i.strokeStyle, a.lineWidth = i.lineWidth, a.lineCap = i.lineCap, a.lineJoin = i.lineJoin, a.miterLimit = i.miterLimit;
3802
- }, ft.prototype.setOpacity = function(t) {
3803
- this.stack[this.cArrPos].opacity = t;
3804
- }, ft.prototype.setContext = function(t) {
3805
- this.nativeContext = t;
3806
- }, ft.prototype.fillStyle = function(t) {
3807
- this.stack[this.cArrPos].fillStyle !== t && (this.currentFillStyle = t, this.stack[this.cArrPos].fillStyle = t);
3808
- }, ft.prototype.strokeStyle = function(t) {
3809
- this.stack[this.cArrPos].strokeStyle !== t && (this.currentStrokeStyle = t, this.stack[this.cArrPos].strokeStyle = t);
3810
- }, ft.prototype.lineWidth = function(t) {
3811
- this.stack[this.cArrPos].lineWidth !== t && (this.currentLineWidth = t, this.stack[this.cArrPos].lineWidth = t);
3812
- }, ft.prototype.lineCap = function(t) {
3813
- this.stack[this.cArrPos].lineCap !== t && (this.currentLineCap = t, this.stack[this.cArrPos].lineCap = t);
3814
- }, ft.prototype.lineJoin = function(t) {
3815
- this.stack[this.cArrPos].lineJoin !== t && (this.currentLineJoin = t, this.stack[this.cArrPos].lineJoin = t);
3816
- }, ft.prototype.miterLimit = function(t) {
3817
- this.stack[this.cArrPos].miterLimit !== t && (this.currentMiterLimit = t, this.stack[this.cArrPos].miterLimit = t);
3818
- }, ft.prototype.transform = function(t) {
3819
- this.transformMat.cloneFromProps(t);
3820
- var e = this.cTr;
3821
- this.transformMat.multiply(e), e.cloneFromProps(this.transformMat.props);
3822
- var s = e.props;
3823
- this.nativeContext.setTransform(s[0], s[1], s[4], s[5], s[12], s[13]);
3824
- }, ft.prototype.opacity = function(t) {
3825
- var e = this.stack[this.cArrPos].opacity;
3826
- e *= t < 0 ? 0 : t, this.stack[this.cArrPos].opacity !== e && (this.currentOpacity !== t && (this.nativeContext.globalAlpha = t, this.currentOpacity = t), this.stack[this.cArrPos].opacity = e);
3827
- }, ft.prototype.fill = function(t) {
3828
- this.appliedFillStyle !== this.currentFillStyle && (this.appliedFillStyle = this.currentFillStyle, this.nativeContext.fillStyle = this.appliedFillStyle), this.nativeContext.fill(t);
3829
- }, ft.prototype.fillRect = function(t, e, s, i) {
3830
- this.appliedFillStyle !== this.currentFillStyle && (this.appliedFillStyle = this.currentFillStyle, this.nativeContext.fillStyle = this.appliedFillStyle), this.nativeContext.fillRect(t, e, s, i);
3831
- }, ft.prototype.stroke = function() {
3832
- this.appliedStrokeStyle !== this.currentStrokeStyle && (this.appliedStrokeStyle = this.currentStrokeStyle, this.nativeContext.strokeStyle = this.appliedStrokeStyle), this.appliedLineWidth !== this.currentLineWidth && (this.appliedLineWidth = this.currentLineWidth, this.nativeContext.lineWidth = this.appliedLineWidth), this.appliedLineCap !== this.currentLineCap && (this.appliedLineCap = this.currentLineCap, this.nativeContext.lineCap = this.appliedLineCap), this.appliedLineJoin !== this.currentLineJoin && (this.appliedLineJoin = this.currentLineJoin, this.nativeContext.lineJoin = this.appliedLineJoin), this.appliedMiterLimit !== this.currentMiterLimit && (this.appliedMiterLimit = this.currentMiterLimit, this.nativeContext.miterLimit = this.appliedMiterLimit), this.nativeContext.stroke();
3833
- }, W([X, Bt, Wt], _e), _e.prototype.renderInnerContent = function() {
3834
- var t, e = this.canvasContext;
3835
- for (e.beginPath(), e.moveTo(0, 0), e.lineTo(this.data.w, 0), e.lineTo(this.data.w, this.data.h), e.lineTo(0, this.data.h), e.lineTo(0, 0), e.clip(), t = this.layers.length - 1; t >= 0; t -= 1) (this.completeLayers || this.elements[t]) && this.elements[t].renderFrame();
3836
- }, _e.prototype.destroy = function() {
3837
- var t;
3838
- for (t = this.layers.length - 1; t >= 0; t -= 1) this.elements[t] && this.elements[t].destroy();
3839
- this.layers = null, this.elements = null;
3840
- }, _e.prototype.createComp = function(t) {
3841
- return new _e(t, this.globalData, this);
3842
- }, W([X], Ss), Ss.prototype.createComp = function(t) {
3843
- return new _e(t, this.globalData, this);
3844
- }, Si = Ss, xe.canvas = Si, zt.registerModifier("tm", Ft), zt.registerModifier("pb", De), zt.registerModifier("rp", Ot), zt.registerModifier("rd", Se), zt.registerModifier("zz", we), zt.registerModifier("op", Me), H;
3845
- });
3846
- })(As, As.exports);
3847
- var Mi = As.exports;
3848
- const ca = /* @__PURE__ */ fa(Mi), da = /* @__PURE__ */ la({
3849
- __proto__: null,
3850
- default: ca
3851
- }, [Mi]);
3852
- export {
3853
- da as l
3854
- };