@justeattakeaway/pie-lottie-player 0.3.13 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3850 +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 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, m, y, o;
129
- switch (m = 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 = m;
132
- break;
133
- case 1:
134
- i = y, a = s, r = m;
135
- break;
136
- case 2:
137
- i = m, a = s, r = o;
138
- break;
139
- case 3:
140
- i = m, a = y, r = s;
141
- break;
142
- case 4:
143
- i = o, a = m, r = s;
144
- break;
145
- case 5:
146
- i = s, a = m, 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, m = 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, m];
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(k, F) {
218
- var M, _, D, w, P, V, O = k.length;
219
- for (_ = 0; _ < O; _ += 1) if ("ks" in (M = k[_]) && !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, F), d(M.layers, F)) : M.ty === 4 ? g(M.shapes) : M.ty === 5 && T(M);
226
- }
227
- }
228
- function c(k, F) {
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
- }(k, F);
236
- return M ? M.layers.__used ? JSON.parse(JSON.stringify(M.layers)) : (M.layers.__used = !0, M.layers) : null;
237
- }
238
- function g(k) {
239
- var F, M, _;
240
- for (F = k.length - 1; F >= 0; F -= 1) if (k[F].ty === "sh") if (k[F].ks.k.i) l(k[F].ks.k);
241
- else for (_ = k[F].ks.k.length, M = 0; M < _; M += 1) k[F].ks.k[M].s && l(k[F].ks.k[M].s[0]), k[F].ks.k[M].e && l(k[F].ks.k[M].e[0]);
242
- else k[F].ty === "gr" && g(k[F].it);
243
- }
244
- function l(k) {
245
- var F, M = k.i.length;
246
- for (F = 0; F < M; F += 1) k.i[F][0] += k.v[F][0], k.i[F][1] += k.v[F][1], k.o[F][0] += k.v[F][0], k.o[F][1] += k.v[F][1];
247
- }
248
- function p(k, F) {
249
- var M = F ? F.split(".") : [100, 100, 100];
250
- return k[0] > M[0] || !(M[0] > k[0]) && (k[1] > M[1] || !(M[1] > k[1]) && (k[2] > M[2] || !(M[2] > k[2]) && null));
251
- }
252
- var f, u = /* @__PURE__ */ function() {
253
- var k = [4, 4, 14];
254
- function F(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 (p(k, M.v) && (F(M.layers), M.assets)) {
260
- var _, D = M.assets.length;
261
- for (_ = 0; _ < D; _ += 1) M.assets[_].layers && F(M.assets[_].layers);
262
- }
263
- };
264
- }(), v = (f = [4, 7, 99], function(k) {
265
- if (k.chars && !p(f, k.v)) {
266
- var F, M = k.chars.length;
267
- for (F = 0; F < M; F += 1) {
268
- var _ = k.chars[F];
269
- _.data && _.data.shapes && (g(_.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 } }, k.chars[F].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
- }), x = /* @__PURE__ */ function() {
273
- var k = [5, 7, 15];
274
- function F(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 (p(k, M.v) && (F(M.layers), M.assets)) {
280
- var _, D = M.assets.length;
281
- for (_ = 0; _ < D; _ += 1) M.assets[_].layers && F(M.assets[_].layers);
282
- }
283
- };
284
- }(), C = /* @__PURE__ */ function() {
285
- var k = [4, 1, 9];
286
- function F(_) {
287
- var D, w, P, V = _.length;
288
- for (D = 0; D < V; D += 1) if (_[D].ty === "gr") F(_[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 && F(_[D].shapes);
295
- }
296
- return function(_) {
297
- if (p(k, _.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 k = [4, 4, 18];
304
- function F(_) {
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" && F(_[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 && F(D.shapes);
319
- }
320
- }
321
- return function(_) {
322
- if (p(k, _.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 T(k) {
329
- k.t.a.length === 0 && k.t.p;
330
- }
331
- var I = { completeData: function(k) {
332
- k.__complete || (C(k), u(k), v(k), x(k), A(k), d(k.layers, k.assets), function(F, M) {
333
- if (F) {
334
- var _ = 0, D = F.length;
335
- for (_ = 0; _ < D; _ += 1) F[_].t === 1 && (F[_].data.layers = c(F[_].data.refId, M), d(F[_].data.layers, M));
336
- }
337
- }(k.chars, k.assets), k.__complete = !0);
338
- } };
339
- return I.checkColors = C, I.checkChars = v, I.checkPathProperties = x, I.checkShapes = A, I.completeLayers = d, I;
340
- }()), r.assetLoader || (r.assetLoader = /* @__PURE__ */ function() {
341
- function d(c) {
342
- var g = c.getResponseHeader("content-type");
343
- return g && c.responseType === "json" && g.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, g, l, p) {
346
- var f, 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) f = d(u), l(f);
353
- else try {
354
- f = d(u), l(f);
355
- } catch (v) {
356
- p && p(v);
357
- }
358
- };
359
- try {
360
- u.open(["G", "E", "T"].join(""), c, !0);
361
- } catch {
362
- u.open(["G", "E", "T"].join(""), g + "/" + 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 m(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 = m(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 = m(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 = m(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 m = n.getContext("2d");
406
- return m.fillStyle = "rgba(0,0,0,0)", m.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, m, y) {
415
- var o = "";
416
- if (n.e) o = n.p;
417
- else if (m) {
418
- var d = n.p;
419
- d.indexOf("images/") !== -1 && (d = d.split("/")[1]), o = m + d;
420
- } else o = y, o += n.u ? n.u : "", o += n.p;
421
- return o;
422
- }
423
- function a(n) {
424
- var m = 0, y = setInterval((function() {
425
- (n.getBBox().width || m > 500) && (this._imageLoaded(), clearInterval(y)), m += 1;
426
- }).bind(this), 50);
427
- }
428
- function r(n) {
429
- var m = { assetData: n }, y = i(n, this.assetsPath, this.path);
430
- return Ce.loadData(y, (function(o) {
431
- m.img = o, this._footageLoaded();
432
- }).bind(this), (function() {
433
- m.img = {}, this._footageLoaded();
434
- }).bind(this)), m;
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, m) {
440
- var y;
441
- this.imagesLoadedCb = m;
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 m = 0, y = this.images.length; m < y; ) {
456
- if (this.images[m].assetData === n) return this.images[m].img;
457
- m += 1;
458
- }
459
- return null;
460
- }, createImgData: function(n) {
461
- var m = 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 = m;
465
- var o = { img: y, assetData: n };
466
- return o;
467
- }, createImageData: function(n) {
468
- var m = 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", m), 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, m) {
475
- n === "svg" ? (this._elementHelper = m, 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(p) {
754
- for (var f = 0, u = p.target; f < i; ) e[f].animation === u && (e.splice(f, 1), f -= 1, i -= 1, u.isPaused || o()), f += 1;
755
- }
756
- function m(p, f) {
757
- if (!p) return null;
758
- for (var u = 0; u < i; ) {
759
- if (e[u].elem === p && e[u].elem !== null) return e[u].animation;
760
- u += 1;
761
- }
762
- var v = new R();
763
- return d(v, p), v.setData(p, f), v;
764
- }
765
- function y() {
766
- a += 1, l();
767
- }
768
- function o() {
769
- a -= 1;
770
- }
771
- function d(p, f) {
772
- p.addEventListener("destroy", n), p.addEventListener("_active", y), p.addEventListener("_idle", o), e.push({ elem: f, animation: p }), i += 1;
773
- }
774
- function c(p) {
775
- var f, u = p - s;
776
- for (f = 0; f < i; f += 1) e[f].animation.advanceTime(u);
777
- s = p, a && !h ? window.requestAnimationFrame(c) : r = !0;
778
- }
779
- function g(p) {
780
- s = p, window.requestAnimationFrame(c);
781
- }
782
- function l() {
783
- !h && a && r && (window.requestAnimationFrame(g), r = !1);
784
- }
785
- return t.registerAnimation = m, t.loadAnimation = function(p) {
786
- var f = new R();
787
- return d(f, null), f.setParams(p), f;
788
- }, t.setSpeed = function(p, f) {
789
- var u;
790
- for (u = 0; u < i; u += 1) e[u].animation.setSpeed(p, f);
791
- }, t.setDirection = function(p, f) {
792
- var u;
793
- for (u = 0; u < i; u += 1) e[u].animation.setDirection(p, f);
794
- }, t.play = function(p) {
795
- var f;
796
- for (f = 0; f < i; f += 1) e[f].animation.play(p);
797
- }, t.pause = function(p) {
798
- var f;
799
- for (f = 0; f < i; f += 1) e[f].animation.pause(p);
800
- }, t.stop = function(p) {
801
- var f;
802
- for (f = 0; f < i; f += 1) e[f].animation.stop(p);
803
- }, t.togglePause = function(p) {
804
- var f;
805
- for (f = 0; f < i; f += 1) e[f].animation.togglePause(p);
806
- }, t.searchAnimations = function(p, f, u) {
807
- var v, x = [].concat([].slice.call(document.getElementsByClassName("lottie")), [].slice.call(document.getElementsByClassName("bodymovin"))), C = x.length;
808
- for (v = 0; v < C; v += 1) u && x[v].setAttribute("data-bm-type", u), m(x[v], p);
809
- if (f && C === 0) {
810
- u || (u = "svg");
811
- var A = document.getElementsByTagName("body")[0];
812
- A.innerText = "";
813
- var T = Pt("div");
814
- T.style.width = "100%", T.style.height = "100%", T.setAttribute("data-bm-type", u), A.appendChild(T), m(T, p);
815
- }
816
- }, t.resize = function() {
817
- var p;
818
- for (p = 0; p < i; p += 1) e[p].animation.resize();
819
- }, t.goToAndStop = function(p, f, u) {
820
- var v;
821
- for (v = 0; v < i; v += 1) e[v].animation.goToAndStop(p, f, u);
822
- }, t.destroy = function(p) {
823
- var f;
824
- for (f = i - 1; f >= 0; f -= 1) e[f].animation.destroy(p);
825
- }, t.freeze = function() {
826
- h = !0;
827
- }, t.unfreeze = function() {
828
- h = !1, l();
829
- }, t.setVolume = function(p, f) {
830
- var u;
831
- for (u = 0; u < i; u += 1) e[u].animation.setVolume(p, f);
832
- }, t.mute = function(p) {
833
- var f;
834
- for (f = 0; f < i; f += 1) e[f].animation.mute(p);
835
- }, t.unmute = function(p) {
836
- var f;
837
- for (f = 0; f < i; f += 1) e[f].animation.unmute(p);
838
- }, t.getRegisteredAnimations = function() {
839
- var p, f = e.length, u = [];
840
- for (p = 0; p < f; p += 1) u.push(e[p].animation);
841
- return u;
842
- }, t;
843
- }(), ke = function() {
844
- var t = { getBezierEasing: function(o, d, c, g, l) {
845
- var p = l || ("bez_" + o + "_" + d + "_" + c + "_" + g).replace(/\./g, "p");
846
- if (e[p]) return e[p];
847
- var f = new y([o, d, c, g]);
848
- return e[p] = f, f;
849
- } }, e = {}, s = 0.1, i = typeof Float32Array == "function";
850
- function a(o, d) {
851
- return 1 - 3 * d + 3 * o;
852
- }
853
- function r(o, d) {
854
- return 3 * d - 6 * o;
855
- }
856
- function h(o) {
857
- return 3 * o;
858
- }
859
- function n(o, d, c) {
860
- return ((a(d, c) * o + r(d, c)) * o + h(d)) * o;
861
- }
862
- function m(o, d, c) {
863
- return 3 * a(d, c) * o * o + 2 * r(d, c) * o + h(d);
864
- }
865
- function y(o) {
866
- this._p = o, this._mSampleValues = i ? new Float32Array(11) : new Array(11), this._precomputed = !1, this.get = this.get.bind(this);
867
- }
868
- return y.prototype = { get: function(o) {
869
- var d = this._p[0], c = this._p[1], g = this._p[2], l = this._p[3];
870
- return this._precomputed || this._precompute(), d === c && g === l ? o : o === 0 ? 0 : o === 1 ? 1 : n(this._getTForX(o), c, l);
871
- }, _precompute: function() {
872
- var o = this._p[0], d = this._p[1], c = this._p[2], g = this._p[3];
873
- this._precomputed = !0, o === d && c === g || this._calcSampleValues();
874
- }, _calcSampleValues: function() {
875
- for (var o = this._p[0], d = this._p[2], c = 0; c < 11; ++c) this._mSampleValues[c] = n(c * s, o, d);
876
- }, _getTForX: function(o) {
877
- for (var d = this._p[0], c = this._p[2], g = this._mSampleValues, l = 0, p = 1; p !== 10 && g[p] <= o; ++p) l += s;
878
- var f = l + (o - g[--p]) / (g[p + 1] - g[p]) * s, u = m(f, d, c);
879
- return u >= 1e-3 ? function(v, x, C, A) {
880
- for (var T = 0; T < 4; ++T) {
881
- var I = m(x, C, A);
882
- if (I === 0) return x;
883
- x -= (n(x, C, A) - v) / I;
884
- }
885
- return x;
886
- }(o, f, d, c) : u === 0 ? f : function(v, x, C, A, T) {
887
- var I, k, F = 0;
888
- do
889
- (I = n(k = x + (C - x) / 2, A, T) - v) > 0 ? C = k : x = k;
890
- while (Math.abs(I) > 1e-7 && ++F < 10);
891
- return k;
892
- }(o, l, l + s, d, c);
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, g, l) {
914
- var p = y * c + o * g + d * l - g * c - l * y - d * o;
915
- return p > -1e-3 && p < 1e-3;
916
- }
917
- var s = function(y, o, d, c) {
918
- var g, l, p, f, u, v, x = qe(), C = 0, A = [], T = [], I = js.newElement();
919
- for (p = d.length, g = 0; g < x; g += 1) {
920
- for (u = g / (x - 1), v = 0, l = 0; l < p; l += 1) f = 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] = f, T[l] !== null && (v += Vt(A[l] - T[l], 2)), T[l] = A[l];
921
- v && (C += v = Fs(v)), I.percents[g] = u, I.lengths[g] = 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 g = (y[0] + "_" + y[1] + "_" + o[0] + "_" + o[1] + "_" + d[0] + "_" + d[1] + "_" + c[0] + "_" + c[1]).replace(/\./g, "p");
933
- if (!r[g]) {
934
- var l, p, f, u, v, x, C, A = qe(), T = 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 k = new i(A);
937
- for (f = d.length, l = 0; l < A; l += 1) {
938
- for (C = K(f), v = l / (A - 1), x = 0, p = 0; p < f; p += 1) u = Vt(1 - v, 3) * y[p] + 3 * Vt(1 - v, 2) * v * (y[p] + d[p]) + 3 * (1 - v) * Vt(v, 2) * (o[p] + c[p]) + Vt(v, 3) * o[p], C[p] = u, I !== null && (x += Vt(C[p] - I[p], 2));
939
- T += x = Fs(x), k.points[l] = new a(x, C), I = C;
940
- }
941
- k.segmentLength = T, r[g] = k;
942
- }
943
- return r[g];
944
- });
945
- function n(y, o) {
946
- var d = o.percents, c = o.lengths, g = d.length, l = gt((g - 1) * y), p = y * o.addedLength, f = 0;
947
- if (l === g - 1 || l === 0 || p === c[l]) return d[l];
948
- for (var u = c[l] > p ? -1 : 1, v = !0; v; ) if (c[l] <= p && c[l + 1] > p ? (f = (p - c[l]) / (c[l + 1] - c[l]), v = !1) : l += u, l < 0 || l >= g - 1) {
949
- if (l === g - 1) return d[l];
950
- v = !1;
951
- }
952
- return d[l] + (d[l + 1] - d[l]) * f;
953
- }
954
- var m = ht("float32", 8);
955
- return { getSegmentsLength: function(y) {
956
- var o, d = Js.newElement(), c = y.c, g = y.v, l = y.o, p = y.i, f = y._length, u = d.lengths, v = 0;
957
- for (o = 0; o < f - 1; o += 1) u[o] = s(g[o], g[o + 1], l[o], p[o + 1]), v += u[o].addedLength;
958
- return c && f && (u[o] = s(g[o], g[0], l[o], p[0]), v += u[o].addedLength), d.totalLength = v, d;
959
- }, getNewSegment: function(y, o, d, c, g, l, p) {
960
- g < 0 ? g = 0 : g > 1 && (g = 1);
961
- var f, u = n(g, p), v = n(l = l > 1 ? 1 : l, p), x = y.length, C = 1 - u, A = 1 - v, T = C * C * C, I = u * C * C * 3, k = u * u * C * 3, F = 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 (f = 0; f < x; f += 1) m[4 * f] = t.round(1e3 * (T * y[f] + I * d[f] + k * c[f] + F * o[f])) / 1e3, m[4 * f + 1] = t.round(1e3 * (M * y[f] + _ * d[f] + D * c[f] + w * o[f])) / 1e3, m[4 * f + 2] = t.round(1e3 * (P * y[f] + V * d[f] + O * c[f] + B * o[f])) / 1e3, m[4 * f + 3] = t.round(1e3 * (b * y[f] + S * d[f] + L * c[f] + N * o[f])) / 1e3;
963
- return m;
964
- }, getPointInSegment: function(y, o, d, c, g, l) {
965
- var p = n(g, l), f = 1 - p;
966
- return [t.round(1e3 * (f * f * f * y[0] + (p * f * f + f * p * f + f * f * p) * d[0] + (p * p * f + f * p * p + p * f * p) * c[0] + p * p * p * o[0])) / 1e3, t.round(1e3 * (f * f * f * y[1] + (p * f * f + f * p * f + f * f * p) * d[1] + (p * p * f + f * p * p + p * f * p) * c[1] + p * p * p * o[1])) / 1e3];
967
- }, buildBezierData: h, pointOnLine2D: e, pointOnLine3D: function(y, o, d, c, g, l, p, f, u) {
968
- if (d === 0 && l === 0 && u === 0) return e(y, o, c, g, p, f);
969
- var v, x = t.sqrt(t.pow(c - y, 2) + t.pow(g - o, 2) + t.pow(l - d, 2)), C = t.sqrt(t.pow(p - y, 2) + t.pow(f - o, 2) + t.pow(u - d, 2)), A = t.sqrt(t.pow(p - c, 2) + t.pow(f - g, 2) + t.pow(u - l, 2));
970
- return (v = x > C ? x > A ? x - C - A : A - C - x : A > C ? A - C - x : C - x - 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, m, y, o, d, c, g = e.lastIndex, l = g, p = this.keyframes.length - 1, f = !0; f; ) {
977
- if (a = this.keyframes[l], r = this.keyframes[l + 1], l === p - 1 && t >= r.t - i) {
978
- a.h && (a = r), g = 0;
979
- break;
980
- }
981
- if (r.t - i > t) {
982
- g = l;
983
- break;
984
- }
985
- l < p - 1 ? l += 1 : (g = 0, f = !1);
986
- }
987
- h = this.keyframesMetadata[l] || {};
988
- var u, v, x, C, A, T, I, k, F, 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 (m = w.points[P].point.length, n = 0; n < m; 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, f = !0, o = w.points.length; f; ) {
999
- if (B += w.points[d].partialLength, O === 0 || y === 0 || d === w.points.length - 1) {
1000
- for (m = w.points[d].point.length, n = 0; n < m; 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, m = w.points[d].point.length, n = 0; n < m; 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 : f = !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 (p = 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, x = 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 = x[0], A = x[1], T = x[2], I = x[3], k = Math.atan2(2 * A * I - 2 * C * T, 1 - 2 * A * A - 2 * T * T), F = Math.asin(2 * C * A + 2 * T * I), M = Math.atan2(2 * C * I - 2 * A * T, 1 - 2 * C * C - 2 * T * T), v[0] = k / et, v[1] = F / et, v[2] = M / et;
1021
- }
1022
- else for (l = 0; l < p; 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 = g, 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), m = Math.sin(s / 2), y = Math.sin(i / 2);
1028
- return [n * m * h + a * r * y, n * r * h + a * m * y, a * m * h - n * r * y, a * r * h - n * m * 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, m, 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, m = 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] + m[0], h[1] + m[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] + m[0], h[1] + m[1], h[2] + m[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 && m[0] === 0 && m[1] === 0 && (r.length === 2 || r[2] === h[2] && n[2] === 0 && m[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(g, l, p) {
1178
- var f, u, v, x, C, A, T, I, k, F = p.lastIndex, M = this.keyframes;
1179
- if (g < M[0].t - this.offsetTime) f = M[0].s[0], v = !0, F = 0;
1180
- else if (g >= M[M.length - 1].t - this.offsetTime) f = 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 = F, V = M.length - 1, O = !0; O && (_ = M[P], !((D = M[P + 1]).t - this.offsetTime > g)); ) P < V - 1 ? P += 1 : O = !1;
1183
- if (w = this.keyframesMetadata[P] || {}, F = P, !(v = _.h === 1)) {
1184
- if (g >= D.t - this.offsetTime) I = 1;
1185
- else if (g < _.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((g - (_.t - this.offsetTime)) / (D.t - this.offsetTime - (_.t - this.offsetTime)));
1189
- }
1190
- u = D.s ? D.s[0] : _.e[0];
1191
- }
1192
- f = _.s[0];
1193
- }
1194
- for (A = l._length, T = f.i[0].length, p.lastIndex = F, x = 0; x < A; x += 1) for (C = 0; C < T; C += 1) k = v ? f.i[x][C] : f.i[x][C] + (u.i[x][C] - f.i[x][C]) * I, l.i[x][C] = k, k = v ? f.o[x][C] : f.o[x][C] + (u.o[x][C] - f.o[x][C]) * I, l.o[x][C] = k, k = v ? f.v[x][C] : f.v[x][C] + (u.v[x][C] - f.v[x][C]) * I, l.v[x][C] = k;
1195
- }
1196
- function s() {
1197
- var g = this.comp.renderedFrame - this.offsetTime, l = this.keyframes[0].t - this.offsetTime, p = this.keyframes[this.keyframes.length - 1].t - this.offsetTime, f = this._caching.lastFrame;
1198
- return f !== t && (f < l && g < l || f > p && g > p) || (this._caching.lastIndex = f < g ? this._caching.lastIndex : 0, this.interpolateShape(g, this.pv, this._caching)), this._caching.lastFrame = g, this.pv;
1199
- }
1200
- function i() {
1201
- this.paths = this.localShapeCollection;
1202
- }
1203
- function a(g) {
1204
- (function(l, p) {
1205
- if (l._length !== p._length || l.c !== p.c) return !1;
1206
- var f, u = l._length;
1207
- for (f = 0; f < u; f += 1) if (l.v[f][0] !== p.v[f][0] || l.v[f][1] !== p.v[f][1] || l.o[f][0] !== p.o[f][0] || l.o[f][1] !== p.o[f][1] || l.i[f][0] !== p.i[f][0] || l.i[f][1] !== p.i[f][1]) return !1;
1208
- return !0;
1209
- })(this.v, g) || (this.v = yt.clone(g), 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 g, l;
1215
- this.lock = !0, this._mdf = !1, g = this.kf ? this.pv : this.data.ks ? this.data.ks.k : this.data.pt.k;
1216
- var p = this.effectsSequence.length;
1217
- for (l = 0; l < p; l += 1) g = this.effectsSequence[l](g);
1218
- this.setVValue(g), this.lock = !1, this.frameId = this.elem.globalData.frameId;
1219
- }
1220
- else this._mdf = !1;
1221
- }
1222
- function h(g, l, p) {
1223
- this.propType = "shape", this.comp = g.comp, this.container = g, this.elem = g, this.data = l, this.k = !1, this.kf = !1, this._mdf = !1;
1224
- var f = p === 3 ? l.pt.k : l.ks.k;
1225
- this.v = yt.clone(f), 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(g) {
1228
- this.effectsSequence.push(g), this.container.addDynamicProperty(this);
1229
- }
1230
- function m(g, l, p) {
1231
- this.propType = "shape", this.comp = g.comp, this.elem = g, this.container = g, this.offsetTime = g.data.st, this.keyframes = p === 3 ? l.pt.k : l.ks.k, this.keyframesMetadata = [], this.k = !0, this.kf = !0;
1232
- var f = this.keyframes[0].s[0].i.length;
1233
- this.v = yt.newElement(), this.v.setPathData(this.keyframes[0].s[0].c, f), 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, m.prototype.getValue = r, m.prototype.interpolateShape = e, m.prototype.setVValue = a, m.prototype.addEffect = n;
1236
- var y = function() {
1237
- var g = Kt;
1238
- function l(p, f) {
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 = f.d, this.elem = p, this.comp = p.comp, this.frameId = -1, this.initDynamicPropertyContainer(p), this.p = E.getProp(p, f.p, 1, 0, this), this.s = E.getProp(p, f.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 p = this.p.v[0], f = this.p.v[1], u = this.s.v[0] / 2, v = this.s.v[1] / 2, x = this.d !== 3, C = this.v;
1245
- C.v[0][0] = p, C.v[0][1] = f - v, C.v[1][0] = x ? p + u : p - u, C.v[1][1] = f, C.v[2][0] = p, C.v[2][1] = f + v, C.v[3][0] = x ? p - u : p + u, C.v[3][1] = f, C.i[0][0] = x ? p - u * g : p + u * g, C.i[0][1] = f - v, C.i[1][0] = x ? p + u : p - u, C.i[1][1] = f - v * g, C.i[2][0] = x ? p + u * g : p - u * g, C.i[2][1] = f + v, C.i[3][0] = x ? p - u : p + u, C.i[3][1] = f + v * g, C.o[0][0] = x ? p + u * g : p - u * g, C.o[0][1] = f - v, C.o[1][0] = x ? p + u : p - u, C.o[1][1] = f + v * g, C.o[2][0] = x ? p - u * g : p + u * g, C.o[2][1] = f + v, C.o[3][0] = x ? p - u : p + u, C.o[3][1] = f - v * g;
1246
- } }, W([ut], l), l;
1247
- }(), o = function() {
1248
- function g(l, p) {
1249
- this.v = yt.newElement(), this.v.setPathData(!0, 0), this.elem = l, this.comp = l.comp, this.data = p, this.frameId = -1, this.d = p.d, this.initDynamicPropertyContainer(l), p.sy === 1 ? (this.ir = E.getProp(l, p.ir, 0, 0, this), this.is = E.getProp(l, p.is, 0, 0.01, this), this.convertToPath = this.convertStarToPath) : this.convertToPath = this.convertPolygonToPath, this.pt = E.getProp(l, p.pt, 0, 0, this), this.p = E.getProp(l, p.p, 1, 0, this), this.r = E.getProp(l, p.r, 0, et, this), this.or = E.getProp(l, p.or, 0, 0, this), this.os = E.getProp(l, p.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 g.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, p, f, u, v = 2 * Math.floor(this.pt.v), x = 2 * Math.PI / v, C = !0, A = this.or.v, T = this.ir.v, I = this.os.v, k = this.is.v, F = 2 * Math.PI * A / (2 * v), M = 2 * Math.PI * T / (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
- f = C ? I : k, u = C ? F : M;
1259
- var w = (p = C ? A : T) * Math.cos(_), P = p * 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 * f * D, P - O * u * f * D, w + V * u * f * D, P + O * u * f * D, l, !0), C = !C, _ += x * D;
1261
- }
1262
- }, convertPolygonToPath: function() {
1263
- var l, p = Math.floor(this.pt.v), f = 2 * Math.PI / p, u = this.or.v, v = this.os.v, x = 2 * Math.PI * u / (4 * p), 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 < p; l += 1) {
1265
- var T = u * Math.cos(C), I = u * Math.sin(C), k = T === 0 && I === 0 ? 0 : I / Math.sqrt(T * T + I * I), F = T === 0 && I === 0 ? 0 : -T / Math.sqrt(T * T + I * I);
1266
- T += +this.p.v[0], I += +this.p.v[1], this.v.setTripleAt(T, I, T - k * x * v * A, I - F * x * v * A, T + k * x * v * A, I + F * x * v * A, l, !0), C += f * A;
1267
- }
1268
- this.paths.length = 0, this.paths[0] = this.v;
1269
- } }, W([ut], g), g;
1270
- }(), d = function() {
1271
- function g(l, p) {
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 = p.d, this.initDynamicPropertyContainer(l), this.p = E.getProp(l, p.p, 1, 0, this), this.s = E.getProp(l, p.s, 1, 0, this), this.r = E.getProp(l, p.r, 0, 0, this), this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertRectToPath());
1273
- }
1274
- return g.prototype = { convertRectToPath: function() {
1275
- var l = this.p.v[0], p = this.p.v[1], f = this.s.v[0] / 2, u = this.s.v[1] / 2, v = Li(f, u, this.r.v), x = v * (1 - Kt);
1276
- this.v._length = 0, this.d === 2 || this.d === 1 ? (this.v.setTripleAt(l + f, p - u + v, l + f, p - u + v, l + f, p - u + x, 0, !0), this.v.setTripleAt(l + f, p + u - v, l + f, p + u - x, l + f, p + u - v, 1, !0), v !== 0 ? (this.v.setTripleAt(l + f - v, p + u, l + f - v, p + u, l + f - x, p + u, 2, !0), this.v.setTripleAt(l - f + v, p + u, l - f + x, p + u, l - f + v, p + u, 3, !0), this.v.setTripleAt(l - f, p + u - v, l - f, p + u - v, l - f, p + u - x, 4, !0), this.v.setTripleAt(l - f, p - u + v, l - f, p - u + x, l - f, p - u + v, 5, !0), this.v.setTripleAt(l - f + v, p - u, l - f + v, p - u, l - f + x, p - u, 6, !0), this.v.setTripleAt(l + f - v, p - u, l + f - x, p - u, l + f - v, p - u, 7, !0)) : (this.v.setTripleAt(l - f, p + u, l - f + x, p + u, l - f, p + u, 2), this.v.setTripleAt(l - f, p - u, l - f, p - u + x, l - f, p - u, 3))) : (this.v.setTripleAt(l + f, p - u + v, l + f, p - u + x, l + f, p - u + v, 0, !0), v !== 0 ? (this.v.setTripleAt(l + f - v, p - u, l + f - v, p - u, l + f - x, p - u, 1, !0), this.v.setTripleAt(l - f + v, p - u, l - f + x, p - u, l - f + v, p - u, 2, !0), this.v.setTripleAt(l - f, p - u + v, l - f, p - u + v, l - f, p - u + x, 3, !0), this.v.setTripleAt(l - f, p + u - v, l - f, p + u - x, l - f, p + u - v, 4, !0), this.v.setTripleAt(l - f + v, p + u, l - f + v, p + u, l - f + x, p + u, 5, !0), this.v.setTripleAt(l + f - v, p + u, l + f - x, p + u, l + f - v, p + u, 6, !0), this.v.setTripleAt(l + f, p + u - v, l + f, p + u - v, l + f, p + u - x, 7, !0)) : (this.v.setTripleAt(l - f, p - u, l - f + x, p - u, l - f, p - u, 1, !0), this.v.setTripleAt(l - f, p + u, l - f, p + u - x, l - f, p + u, 2, !0), this.v.setTripleAt(l + f, p + u, l + f - x, p + u, l + f, p + 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], g), g;
1280
- }(), c = { getShapeProp: function(g, l, p) {
1281
- var f;
1282
- return p === 3 || p === 4 ? f = (p === 3 ? l.pt : l.ks).k.length ? new m(g, l, p) : new h(g, l, p) : p === 5 ? f = new d(g, l) : p === 6 ? f = new y(g, l) : p === 7 && (f = new o(g, l)), f.k && g.addDynamicProperty(f), f;
1283
- }, getConstructorFunction: function() {
1284
- return h;
1285
- }, getKeyframedConstructorFunction: function() {
1286
- return m;
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 m(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 g(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 p(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 f(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 x(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 T(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 k(b, S, L) {
1372
- return b * this.props[2] + S * this.props[6] + L * this.props[10] + this.props[14];
1373
- }
1374
- function F() {
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 = m, this.skew = o, this.skewFromAxis = d, this.shear = y, this.scale = c, this.setTransform = g, this.translate = l, this.transform = p, this.multiply = f, this.applyToPoint = A, this.applyToX = T, this.applyToY = I, this.applyToZ = k, this.applyToPointArray = w, this.applyToTriplePoints = D, this.applyToPointStringified = P, this.toCSS = V, this.to2dCSS = B, this.clone = x, this.cloneFromProps = C, this.equals = v, this.inversePoints = _, this.inversePoint = M, this.getInverseMatrix = F, 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.12.2";
1470
- var Zs = "", $s = document.getElementsByTagName("script"), Qs = $s[$s.length - 1] || { src: "" };
1471
- Zs = Qs.src ? Qs.src.replace(/^[^\?]+\??/, "") : "", function(t) {
1472
- for (var e = Zs.split("&"), s = 0; s < e.length; s += 1) {
1473
- var i = e[s].split("=");
1474
- if (decodeURIComponent(i[0]) == t) return decodeURIComponent(i[1]);
1475
- }
1476
- }("renderer");
1477
- var ji = setInterval(function() {
1478
- document.readyState === "complete" && (clearInterval(ji), Us());
1479
- }, 100);
1480
- try {
1481
- fs(ze) === "object" || (window.bodymovin = H);
1482
- } catch {
1483
- }
1484
- var zt = function() {
1485
- var t = {}, e = {};
1486
- return t.registerModifier = function(s, i) {
1487
- e[s] || (e[s] = i);
1488
- }, t.getModifier = function(s, i, a) {
1489
- return new e[s](i, a);
1490
- }, t;
1491
- }();
1492
- function At() {
1493
- }
1494
- function Ft() {
1495
- }
1496
- function De() {
1497
- }
1498
- At.prototype.initModifierProperties = function() {
1499
- }, At.prototype.addShapeToModifier = function() {
1500
- }, At.prototype.addShape = function(t) {
1501
- if (!this.closed) {
1502
- t.sh.container.addDynamicProperty(t.sh);
1503
- var e = { shape: t.sh, data: t, localShapeCollection: ce.newShapeCollection() };
1504
- this.shapes.push(e), this.addShapeToModifier(e), this._isAnimated && t.setAsAnimated();
1505
- }
1506
- }, At.prototype.init = function(t, e) {
1507
- 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);
1508
- }, At.prototype.processKeys = function() {
1509
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties());
1510
- }, W([ut], At), W([At], Ft), Ft.prototype.initModifierProperties = function(t, e) {
1511
- 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;
1512
- }, Ft.prototype.addShapeToModifier = function(t) {
1513
- t.pathsData = [];
1514
- }, Ft.prototype.calculateShapeEdges = function(t, e, s, i, a) {
1515
- var r = [];
1516
- 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 }));
1517
- var h, n, m = [], y = r.length;
1518
- for (h = 0; h < y; h += 1) {
1519
- var o, d;
1520
- (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, m.push([o, d]));
1521
- }
1522
- return m.length || m.push([0, 0]), m;
1523
- }, Ft.prototype.releasePathsData = function(t) {
1524
- var e, s = t.length;
1525
- for (e = 0; e < s; e += 1) Js.release(t[e]);
1526
- return t.length = 0, t;
1527
- }, Ft.prototype.processShapes = function(t) {
1528
- var e, s, i, a;
1529
- if (this._mdf || t) {
1530
- var r = this.o.v % 360 / 360;
1531
- 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)) {
1532
- var h = e;
1533
- e = s, s = h;
1534
- }
1535
- e = 1e-4 * Math.round(1e4 * e), s = 1e-4 * Math.round(1e4 * s), this.sValue = e, this.eValue = s;
1536
- } else e = this.sValue, s = this.eValue;
1537
- var n, m, y, o, d, c = this.shapes.length, g = 0;
1538
- 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);
1539
- else if (s === 1 && e === 0 || s === 0 && e === 1) {
1540
- if (this._mdf) for (a = 0; a < c; a += 1) this.shapes[a].pathsData.length = 0, this.shapes[a].shape._mdf = !0;
1541
- } else {
1542
- var l, p, f = [];
1543
- for (a = 0; a < c; a += 1) if ((l = this.shapes[a]).shape._mdf || this._mdf || t || this.m === 2) {
1544
- if (m = (i = l.shape.paths)._length, d = 0, !l.shape._mdf && l.pathsData.length) d = l.totalShapeLength;
1545
- else {
1546
- for (y = this.releasePathsData(l.pathsData), n = 0; n < m; n += 1) o = Rt.getSegmentsLength(i.shapes[n]), y.push(o), d += o.totalLength;
1547
- l.totalShapeLength = d, l.pathsData = y;
1548
- }
1549
- g += d, l.shape._mdf = !0;
1550
- } else l.shape.paths = l.localShapeCollection;
1551
- var u, v = e, x = s, C = 0;
1552
- for (a = c - 1; a >= 0; a -= 1) if ((l = this.shapes[a]).shape._mdf) {
1553
- for ((p = l.localShapeCollection).releaseShapes(), this.m === 2 && c > 1 ? (u = this.calculateShapeEdges(e, s, l.totalShapeLength, C, g), C += l.totalShapeLength) : u = [[v, x]], m = u.length, n = 0; n < m; n += 1) {
1554
- v = u[n][0], x = u[n][1], f.length = 0, x <= 1 ? f.push({ s: l.totalShapeLength * v, e: l.totalShapeLength * x }) : v >= 1 ? f.push({ s: l.totalShapeLength * (v - 1), e: l.totalShapeLength * (x - 1) }) : (f.push({ s: l.totalShapeLength * v, e: l.totalShapeLength }), f.push({ s: 0, e: l.totalShapeLength * (x - 1) }));
1555
- var A = this.addShapes(l, f[0]);
1556
- if (f[0].s !== f[0].e) {
1557
- if (f.length > 1) if (l.shape.paths.shapes[l.shape.paths._length - 1].c) {
1558
- var T = A.pop();
1559
- this.addPaths(A, p), A = this.addShapes(l, f[1], T);
1560
- } else this.addPaths(A, p), A = this.addShapes(l, f[1]);
1561
- this.addPaths(A, p);
1562
- }
1563
- }
1564
- l.shape.paths = p;
1565
- }
1566
- }
1567
- }, Ft.prototype.addPaths = function(t, e) {
1568
- var s, i = t.length;
1569
- for (s = 0; s < i; s += 1) e.addShape(t[s]);
1570
- }, Ft.prototype.addSegment = function(t, e, s, i, a, r, h) {
1571
- 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);
1572
- }, Ft.prototype.addSegmentFromArray = function(t, e, s, i) {
1573
- 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);
1574
- }, Ft.prototype.addShapes = function(t, e, s) {
1575
- var i, a, r, h, n, m, y, o, d = t.pathsData, c = t.shape.paths.shapes, g = t.shape.paths._length, l = 0, p = [], f = !0;
1576
- for (s ? (n = s._length, o = s._length) : (s = yt.newElement(), n = 0, o = 0), p.push(s), i = 0; i < g; i += 1) {
1577
- for (m = d[i].lengths, s.c = c[i].c, r = c[i].c ? m.length : m.length + 1, a = 1; a < r; a += 1) if (l + (h = m[a - 1]).addedLength < e.s) l += h.addedLength, s.c = !1;
1578
- else {
1579
- if (l > e.e) {
1580
- s.c = !1;
1581
- break;
1582
- }
1583
- 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, f), f = !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, m[a - 1]), this.addSegmentFromArray(y, s, n, f), f = !1, s.c = !1), l += h.addedLength, n += 1;
1584
- }
1585
- if (c[i].c && m.length) {
1586
- if (h = m[a - 1], l <= e.e) {
1587
- var u = m[a - 1].addedLength;
1588
- 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, f), f = !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, m[a - 1]), this.addSegmentFromArray(y, s, n, f), f = !1, s.c = !1);
1589
- } else s.c = !1;
1590
- l += h.addedLength, n += 1;
1591
- }
1592
- 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;
1593
- i < g - 1 && (s = yt.newElement(), f = !0, p.push(s), n = 0);
1594
- }
1595
- return p;
1596
- }, W([At], De), De.prototype.initModifierProperties = function(t, e) {
1597
- this.getValue = this.processKeys, this.amount = E.getProp(t, e.a, 0, null, this), this._isAnimated = !!this.amount.effectsSequence.length;
1598
- }, De.prototype.processPath = function(t, e) {
1599
- var s = e / 100, i = [0, 0], a = t._length, r = 0;
1600
- for (r = 0; r < a; r += 1) i[0] += t.v[r][0], i[1] += t.v[r][1];
1601
- i[0] /= a, i[1] /= a;
1602
- var h, n, m, y, o, d, c = yt.newElement();
1603
- 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, m = 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, m, y, o, d, r);
1604
- return c;
1605
- }, De.prototype.processShapes = function(t) {
1606
- var e, s, i, a, r, h, n = this.shapes.length, m = this.amount.v;
1607
- if (m !== 0) for (s = 0; s < n; s += 1) {
1608
- 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], m));
1609
- r.shape.paths = r.localShapeCollection;
1610
- }
1611
- this.dynamicProperties.length || (this._mdf = !1);
1612
- };
1613
- var Xe = function() {
1614
- var t = [0, 0];
1615
- function e(s, i, a) {
1616
- 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) {
1617
- 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) {
1618
- var r, h = i.or.k.length;
1619
- for (r = 0; r < h; r += 1) i.or.k[r].to = null, i.or.k[r].ti = null;
1620
- }
1621
- this.or = E.getProp(s, i.or, 1, et, this), this.or.sh = !0;
1622
- } else this.r = E.getProp(s, i.r || { k: 0 }, 0, et, this);
1623
- 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);
1624
- }
1625
- return e.prototype = { applyToMatrix: function(s) {
1626
- var i = this._mdf;
1627
- 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]);
1628
- }, getValue: function(s) {
1629
- if (this.elem.globalData.frameId !== this.frameId) {
1630
- if (this._isDirty && (this.precalculateMatrix(), this._isDirty = !1), this.iterateDynamicProperties(), this._mdf || s) {
1631
- var i;
1632
- 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) {
1633
- var a, r;
1634
- 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));
1635
- else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
1636
- a = [], r = [];
1637
- var h = this.px, n = this.py;
1638
- 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));
1639
- } else a = r = t;
1640
- this.v.rotate(-Math.atan2(a[1] - r[1], a[0] - r[0]));
1641
- }
1642
- 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]);
1643
- }
1644
- this.frameId = this.elem.globalData.frameId;
1645
- }
1646
- }, precalculateMatrix: function() {
1647
- 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)) {
1648
- if (this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.appliedTransformations = 2, this.sk) {
1649
- if (this.sk.effectsSequence.length || this.sa.effectsSequence.length) return;
1650
- this.pre.skewFromAxis(-this.sk.v, this.sa.v), this.appliedTransformations = 3;
1651
- }
1652
- 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);
1653
- }
1654
- }, autoOrient: function() {
1655
- } }, W([ut], e), e.prototype.addDynamicProperty = function(s) {
1656
- this._addDynamicProperty(s), this.elem.addDynamicProperty(s), this._isDirty = !0;
1657
- }, e.prototype._addDynamicProperty = ut.prototype.addDynamicProperty, { getTransformProperty: function(s, i, a) {
1658
- return new e(s, i, a);
1659
- } };
1660
- }();
1661
- function Ot() {
1662
- }
1663
- function Se() {
1664
- }
1665
- function He(t, e) {
1666
- return 1e5 * Math.abs(t - e) <= Math.min(Math.abs(t), Math.abs(e));
1667
- }
1668
- function cs(t) {
1669
- return Math.abs(t) <= 1e-5;
1670
- }
1671
- function ti(t, e, s) {
1672
- return t * (1 - s) + e * s;
1673
- }
1674
- function Ut(t, e, s) {
1675
- return [ti(t[0], e[0], s), ti(t[1], e[1], s)];
1676
- }
1677
- function ei(t, e, s, i) {
1678
- return [3 * e - t - 3 * s + i, 3 * t - 6 * e + 3 * s, -3 * t + 3 * e, t];
1679
- }
1680
- function si(t) {
1681
- return new it(t, t, t, t, !1);
1682
- }
1683
- function it(t, e, s, i, a) {
1684
- a && me(t, e) && (e = Ut(t, i, 1 / 3)), a && me(s, i) && (s = Ut(t, i, 2 / 3));
1685
- var r = ei(t[0], e[0], s[0], i[0]), h = ei(t[1], e[1], s[1], i[1]);
1686
- 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];
1687
- }
1688
- function ii(t, e) {
1689
- var s = t.points[0][e], i = t.points[t.points.length - 1][e];
1690
- if (s > i) {
1691
- var a = i;
1692
- i = s, s = a;
1693
- }
1694
- for (var r = function(m, y, o) {
1695
- if (m === 0) return [];
1696
- var d = y * y - 4 * m * o;
1697
- if (d < 0) return [];
1698
- var c = -y / (2 * m);
1699
- if (d === 0) return [c];
1700
- var g = Math.sqrt(d) / (2 * m);
1701
- return [c - g, c + g];
1702
- }(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) {
1703
- var n = t.point(r[h])[e];
1704
- n < s ? s = n : n > i && (i = n);
1705
- }
1706
- return { min: s, max: i };
1707
- }
1708
- function Ge(t, e, s) {
1709
- var i = t.boundingBox();
1710
- return { cx: i.cx, cy: i.cy, width: i.width, height: i.height, bez: t, t: (e + s) / 2, t1: e, t2: s };
1711
- }
1712
- function ai(t) {
1713
- var e = t.bez.split(0.5);
1714
- return [Ge(e[0], t.t1, t.t), Ge(e[1], t.t, t.t2)];
1715
- }
1716
- function Ae(t, e, s, i, a, r) {
1717
- var h, n;
1718
- 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]);
1719
- else {
1720
- var m = ai(t), y = ai(e);
1721
- Ae(m[0], y[0], s + 1, i, a, r), Ae(m[0], y[1], s + 1, i, a, r), Ae(m[1], y[0], s + 1, i, a, r), Ae(m[1], y[1], s + 1, i, a, r);
1722
- }
1723
- }
1724
- function ds(t, e) {
1725
- 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]];
1726
- }
1727
- function Ke(t, e, s, i) {
1728
- 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], m = ds(ds(a, r), ds(h, n));
1729
- return cs(m[2]) ? null : [m[0] / m[2], m[1] / m[2]];
1730
- }
1731
- function ue(t, e, s) {
1732
- return [t[0] + Math.cos(e) * s, t[1] - Math.sin(e) * s];
1733
- }
1734
- function us(t, e) {
1735
- return Math.hypot(t[0] - e[0], t[1] - e[1]);
1736
- }
1737
- function me(t, e) {
1738
- return He(t[0], e[0]) && He(t[1], e[1]);
1739
- }
1740
- function we() {
1741
- }
1742
- function ri(t, e, s, i, a, r, h) {
1743
- var n = s - Math.PI / 2, m = s + Math.PI / 2, y = e[0] + Math.cos(s) * i * a, o = e[1] - Math.sin(s) * i * a;
1744
- t.setTripleAt(y, o, y + Math.cos(n) * r, o - Math.sin(n) * r, y + Math.cos(m) * h, o - Math.sin(m) * h, t.length());
1745
- }
1746
- function Ji(t, e) {
1747
- var s, i, a, r, h = e === 0 ? t.length() - 1 : e - 1, n = (e + 1) % t.length(), m = t.v[h], y = t.v[n], o = (s = m, 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]]);
1748
- return Math.atan2(0, 1) - Math.atan2(o[1], o[0]);
1749
- }
1750
- function ni(t, e, s, i, a, r, h) {
1751
- var n = Ji(e, s), m = 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(m[0] - y[0], 2) + Math.pow(m[1] - y[1], 2)) : 0, c = r === 2 ? Math.sqrt(Math.pow(m[0] - o[0], 2) + Math.pow(m[1] - o[1], 2)) : 0;
1752
- ri(t, e.v[s % e._length], n, h, i, c / (2 * (a + 1)), d / (2 * (a + 1)));
1753
- }
1754
- function Yi(t, e, s, i, a, r) {
1755
- for (var h = 0; h < i; h += 1) {
1756
- var n = (h + 1) / (i + 1), m = 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);
1757
- ri(t, e.point(n), y, r, s, m / (2 * (i + 1)), m / (2 * (i + 1))), r = -r;
1758
- }
1759
- return r;
1760
- }
1761
- function ms(t, e, s) {
1762
- var i = Math.atan2(e[0] - t[0], e[1] - t[1]);
1763
- return [ue(t, i, s), ue(e, i, s)];
1764
- }
1765
- function ge(t, e) {
1766
- var s, i, a, r, h, n, m;
1767
- s = (m = ms(t.points[0], t.points[1], e))[0], i = m[1], a = (m = ms(t.points[1], t.points[2], e))[0], r = m[1], h = (m = ms(t.points[2], t.points[3], e))[0], n = m[1];
1768
- var y = Ke(s, i, a, r);
1769
- y === null && (y = i);
1770
- var o = Ke(h, n, a, r);
1771
- return o === null && (o = h), new it(s, y, o, n);
1772
- }
1773
- function oi(t, e, s, i, a) {
1774
- var r = e.points[3], h = s.points[0];
1775
- if (i === 3 || me(r, h)) return r;
1776
- if (i === 2) {
1777
- var n = -e.tangentAngle(1), m = -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);
1778
- return t.setXYAt(d[0], d[1], "o", t.length() - 1), d = ue(h, m, 2 * o * Kt), t.setTripleAt(h[0], h[1], h[0], h[1], d[0], d[1], t.length()), h;
1779
- }
1780
- 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]);
1781
- return c && us(c, r) < a ? (t.setTripleAt(c[0], c[1], c[0], c[1], c[0], c[1], t.length()), c) : r;
1782
- }
1783
- function hi(t, e) {
1784
- var s = t.intersections(e);
1785
- return s.length && He(s[0][0], 1) && s.shift(), s.length ? s[0] : null;
1786
- }
1787
- function li(t, e) {
1788
- var s = t.slice(), i = e.slice(), a = hi(t[t.length - 1], e[0]);
1789
- 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];
1790
- }
1791
- function pi(t, e) {
1792
- var s, i, a, r, h = t.inflectionPoints();
1793
- if (h.length === 0) return [ge(t, e)];
1794
- 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)];
1795
- s = (a = t.split(h[0]))[0];
1796
- var n = (h[1] - h[0]) / (1 - h[0]);
1797
- return r = (a = a[1].split(n))[0], i = a[1], [ge(s, e), ge(r, e), ge(i, e)];
1798
- }
1799
- function Me() {
1800
- }
1801
- function fi(t) {
1802
- 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()) {
1803
- case "italic":
1804
- i = "italic";
1805
- break;
1806
- case "bold":
1807
- s = "700";
1808
- break;
1809
- case "black":
1810
- s = "900";
1811
- break;
1812
- case "medium":
1813
- s = "500";
1814
- break;
1815
- case "regular":
1816
- case "normal":
1817
- s = "400";
1818
- break;
1819
- case "light":
1820
- case "thin":
1821
- s = "200";
1822
- }
1823
- return { style: i, weight: t.fWeight || s };
1824
- }
1825
- W([At], Ot), Ot.prototype.initModifierProperties = function(t, e) {
1826
- 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();
1827
- }, Ot.prototype.applyTransforms = function(t, e, s, i, a, r) {
1828
- var h = r ? -1 : 1, n = i.s.v[0] + (1 - i.s.v[0]) * (1 - a), m = i.s.v[1] + (1 - i.s.v[1]) * (1 - a);
1829
- 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 / m : m), s.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
1830
- }, Ot.prototype.init = function(t, e, s, i) {
1831
- 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]);
1832
- this.dynamicProperties.length ? this.k = !0 : this.getValue(!0);
1833
- }, Ot.prototype.resetElements = function(t) {
1834
- var e, s = t.length;
1835
- for (e = 0; e < s; e += 1) t[e]._processed = !1, t[e].ty === "gr" && this.resetElements(t[e].it);
1836
- }, Ot.prototype.cloneElements = function(t) {
1837
- var e = JSON.parse(JSON.stringify(t));
1838
- return this.resetElements(e), e;
1839
- }, Ot.prototype.changeGroupRender = function(t, e) {
1840
- var s, i = t.length;
1841
- for (s = 0; s < i; s += 1) t[s]._render = e, t[s].ty === "gr" && this.changeGroupRender(t[s].it, e);
1842
- }, Ot.prototype.processShapes = function(t) {
1843
- var e, s, i, a, r, h = !1;
1844
- if (this._mdf || t) {
1845
- var n, m = Math.ceil(this.c.v);
1846
- if (this._groups.length < m) {
1847
- for (; this._groups.length < m; ) {
1848
- var y = { it: this.cloneElements(this._elements), ty: "gr" };
1849
- 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;
1850
- }
1851
- this.elem.reloadShapes(), h = !0;
1852
- }
1853
- for (r = 0, i = 0; i <= this._groups.length - 1; i += 1) {
1854
- if (n = r < m, this._groups[i]._render = n, this.changeGroupRender(this._groups[i].it, n), !n) {
1855
- var o = this.elemsData[i].it, d = o[o.length - 1];
1856
- d.transform.op.v !== 0 ? (d.transform.op._mdf = !0, d.transform.op.v = 0) : d.transform.op._mdf = !1;
1857
- }
1858
- r += 1;
1859
- }
1860
- this._currentCopies = m;
1861
- var c = this.o.v, g = c % 1, l = c > 0 ? Math.floor(c) : Math.ceil(c), p = this.pMatrix.props, f = this.rMatrix.props, u = this.sMatrix.props;
1862
- this.pMatrix.reset(), this.rMatrix.reset(), this.sMatrix.reset(), this.tMatrix.reset(), this.matrix.reset();
1863
- var v, x, C = 0;
1864
- if (c > 0) {
1865
- for (; C < l; ) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1), C += 1;
1866
- g && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, g, !1), C += g);
1867
- } else if (c < 0) {
1868
- for (; C > l; ) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !0), C -= 1;
1869
- g && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -g, !0), C -= g);
1870
- }
1871
- for (i = this.data.m === 1 ? 0 : this._currentCopies - 1, a = this.data.m === 1 ? 1 : -1, r = this._currentCopies; r; ) {
1872
- if (x = (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) {
1873
- 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(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]), 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(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]), v = 0; v < x; v += 1) s[v] = this.matrix.props[v];
1874
- this.matrix.reset();
1875
- } else for (this.matrix.reset(), v = 0; v < x; v += 1) s[v] = this.matrix.props[v];
1876
- C += 1, r -= 1, i += a;
1877
- }
1878
- } 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;
1879
- return h;
1880
- }, Ot.prototype.addShape = function() {
1881
- }, W([At], Se), Se.prototype.initModifierProperties = function(t, e) {
1882
- this.getValue = this.processKeys, this.rd = E.getProp(t, e.r, 0, null, this), this._isAnimated = !!this.rd.effectsSequence.length;
1883
- }, Se.prototype.processPath = function(t, e) {
1884
- var s, i = yt.newElement();
1885
- i.c = t.c;
1886
- var a, r, h, n, m, y, o, d, c, g, l, p, f = t._length, u = 0;
1887
- for (s = 0; s < f; 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 !== f - 1 || t.c ? (n = s === 0 ? t.v[f - 1] : t.v[s - 1], y = (m = Math.sqrt(Math.pow(a[0] - n[0], 2) + Math.pow(a[1] - n[1], 2))) ? Math.min(m / 2, e) / m : 0, o = l = a[0] + (n[0] - a[0]) * y, d = p = a[1] - (a[1] - n[1]) * y, c = o - (o - a[0]) * Kt, g = d - (d - a[1]) * Kt, i.setTripleAt(o, d, c, g, l, p, u), u += 1, n = s === f - 1 ? t.v[0] : t.v[s + 1], y = (m = Math.sqrt(Math.pow(a[0] - n[0], 2) + Math.pow(a[1] - n[1], 2))) ? Math.min(m / 2, e) / m : 0, o = c = a[0] + (n[0] - a[0]) * y, d = g = a[1] + (n[1] - a[1]) * y, l = o - (o - a[0]) * Kt, p = d - (d - a[1]) * Kt, i.setTripleAt(o, d, c, g, l, p, 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);
1888
- return i;
1889
- }, Se.prototype.processShapes = function(t) {
1890
- var e, s, i, a, r, h, n = this.shapes.length, m = this.rd.v;
1891
- if (m !== 0) for (s = 0; s < n; s += 1) {
1892
- 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], m));
1893
- r.shape.paths = r.localShapeCollection;
1894
- }
1895
- this.dynamicProperties.length || (this._mdf = !1);
1896
- }, it.prototype.point = function(t) {
1897
- 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]];
1898
- }, it.prototype.derivative = function(t) {
1899
- 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]];
1900
- }, it.prototype.tangentAngle = function(t) {
1901
- var e = this.derivative(t);
1902
- return Math.atan2(e[1], e[0]);
1903
- }, it.prototype.normalAngle = function(t) {
1904
- var e = this.derivative(t);
1905
- return Math.atan2(e[0], e[1]);
1906
- }, it.prototype.inflectionPoints = function() {
1907
- var t = this.a[1] * this.b[0] - this.a[0] * this.b[1];
1908
- if (cs(t)) return [];
1909
- 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;
1910
- if (s < 0) return [];
1911
- var i = Math.sqrt(s);
1912
- return cs(i) ? i > 0 && i < 1 ? [e] : [] : [e - i, e + i].filter(function(a) {
1913
- return a > 0 && a < 1;
1914
- });
1915
- }, it.prototype.split = function(t) {
1916
- if (t <= 0) return [si(this.points[0]), this];
1917
- if (t >= 1) return [this, si(this.points[this.points.length - 1])];
1918
- 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);
1919
- return [new it(this.points[0], e, a, h, !0), new it(h, r, i, this.points[3], !0)];
1920
- }, it.prototype.bounds = function() {
1921
- return { x: ii(this, 0), y: ii(this, 1) };
1922
- }, it.prototype.boundingBox = function() {
1923
- var t = this.bounds();
1924
- 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 };
1925
- }, it.prototype.intersections = function(t, e, s) {
1926
- e === void 0 && (e = 2), s === void 0 && (s = 7);
1927
- var i = [];
1928
- return Ae(Ge(this, 0, 1), Ge(t, 0, 1), 0, e, i, s), i;
1929
- }, it.shapeSegment = function(t, e) {
1930
- var s = (e + 1) % t.length();
1931
- return new it(t.v[e], t.o[e], t.i[s], t.v[s], !0);
1932
- }, it.shapeSegmentInverted = function(t, e) {
1933
- var s = (e + 1) % t.length();
1934
- return new it(t.v[s], t.i[s], t.o[e], t.v[e], !0);
1935
- }, W([At], we), we.prototype.initModifierProperties = function(t, e) {
1936
- 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;
1937
- }, we.prototype.processPath = function(t, e, s, i) {
1938
- var a = t._length, r = yt.newElement();
1939
- if (r.c = t.c, t.c || (a -= 1), a === 0) return r;
1940
- var h = -1, n = it.shapeSegment(t, 0);
1941
- ni(r, t, 0, e, s, i, h);
1942
- for (var m = 0; m < a; m += 1) h = Yi(r, n, e, s, i, -h), n = m !== a - 1 || t.c ? it.shapeSegment(t, (m + 1) % a) : null, ni(r, t, m + 1, e, s, i, h);
1943
- return r;
1944
- }, we.prototype.processShapes = function(t) {
1945
- var e, s, i, a, r, h, n = this.shapes.length, m = this.amplitude.v, y = Math.max(0, Math.round(this.frequency.v)), o = this.pointsType.v;
1946
- if (m !== 0) for (s = 0; s < n; s += 1) {
1947
- 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], m, y, o));
1948
- r.shape.paths = r.localShapeCollection;
1949
- }
1950
- this.dynamicProperties.length || (this._mdf = !1);
1951
- }, W([At], Me), Me.prototype.initModifierProperties = function(t, e) {
1952
- 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;
1953
- }, Me.prototype.processPath = function(t, e, s, i) {
1954
- var a = yt.newElement();
1955
- a.c = t.c;
1956
- var r, h, n, m = t.length();
1957
- t.c || (m -= 1);
1958
- var y = [];
1959
- for (r = 0; r < m; r += 1) n = it.shapeSegment(t, r), y.push(pi(n, e));
1960
- if (!t.c) for (r = m - 1; r >= 0; r -= 1) n = it.shapeSegmentInverted(t, r), y.push(pi(n, e));
1961
- y = function(g) {
1962
- for (var l, p = 1; p < g.length; p += 1) l = li(g[p - 1], g[p]), g[p - 1] = l[0], g[p] = l[1];
1963
- return g.length > 1 && (l = li(g[g.length - 1], g[0]), g[g.length - 1] = l[0], g[0] = l[1]), g;
1964
- }(y);
1965
- var o = null, d = null;
1966
- for (r = 0; r < y.length; r += 1) {
1967
- var c = y[r];
1968
- 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];
1969
- }
1970
- return y.length && oi(a, d, y[0][0], s, i), a;
1971
- }, Me.prototype.processShapes = function(t) {
1972
- var e, s, i, a, r, h, n = this.shapes.length, m = this.amount.v, y = this.miterLimit.v, o = this.lineJoin;
1973
- if (m !== 0) for (s = 0; s < n; s += 1) {
1974
- 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], m, o, y));
1975
- r.shape.paths = r.localShapeCollection;
1976
- }
1977
- this.dynamicProperties.length || (this._mdf = !1);
1978
- };
1979
- var ne = function() {
1980
- var t = { w: 0, size: 0, shapes: [], data: { shapes: [] } }, e = [];
1981
- 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]);
1982
- var s = 127988, i = ["d83cdffb", "d83cdffc", "d83cdffd", "d83cdffe", "d83cdfff"];
1983
- function a(o, d) {
1984
- var c = Pt("span");
1985
- c.setAttribute("aria-hidden", !0), c.style.fontFamily = d;
1986
- var g = Pt("span");
1987
- g.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(g), document.body.appendChild(c);
1988
- var l = g.offsetWidth;
1989
- return g.style.fontFamily = function(p) {
1990
- var f, u = p.split(","), v = u.length, x = [];
1991
- for (f = 0; f < v; f += 1) u[f] !== "sans-serif" && u[f] !== "monospace" && x.push(u[f]);
1992
- return x.join(",");
1993
- }(o) + ", " + d, { node: g, w: l, parent: c };
1994
- }
1995
- function r(o, d) {
1996
- var c, g = document.body && d ? "svg" : "canvas", l = fi(o);
1997
- if (g === "svg") {
1998
- var p = z("text");
1999
- p.style.fontSize = "100px", p.setAttribute("font-family", o.fFamily), p.setAttribute("font-style", l.style), p.setAttribute("font-weight", l.weight), p.textContent = "1", o.fClass ? (p.style.fontFamily = "inherit", p.setAttribute("class", o.fClass)) : p.style.fontFamily = o.fFamily, d.appendChild(p), c = p;
2000
- } else {
2001
- var f = new OffscreenCanvas(500, 500).getContext("2d");
2002
- f.font = l.style + " " + l.weight + " 100px " + o.fFamily, c = f;
2003
- }
2004
- return { measureText: function(u) {
2005
- return g === "svg" ? (c.textContent = u, c.getComputedTextLength()) : c.measureText(u).width;
2006
- } };
2007
- }
2008
- function h(o) {
2009
- var d = 0, c = o.charCodeAt(0);
2010
- if (c >= 55296 && c <= 56319) {
2011
- var g = o.charCodeAt(1);
2012
- g >= 56320 && g <= 57343 && (d = 1024 * (c - 55296) + g - 56320 + 65536);
2013
- }
2014
- return d;
2015
- }
2016
- function n(o) {
2017
- var d = h(o);
2018
- return d >= 127462 && d <= 127487;
2019
- }
2020
- var m = function() {
2021
- 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);
2022
- };
2023
- m.isModifier = function(o, d) {
2024
- var c = o.toString(16) + d.toString(16);
2025
- return i.indexOf(c) !== -1;
2026
- }, m.isZeroWidthJoiner = function(o) {
2027
- return o === 8205;
2028
- }, m.isFlagEmoji = function(o) {
2029
- return n(o.substr(0, 2)) && n(o.substr(2, 2));
2030
- }, m.isRegionalCode = n, m.isCombinedCharacter = function(o) {
2031
- return e.indexOf(o) !== -1;
2032
- }, m.isRegionalFlag = function(o, d) {
2033
- var c = h(o.substr(d, 2));
2034
- if (c !== s) return !1;
2035
- var g = 0;
2036
- for (d += 2; g < 5; ) {
2037
- if ((c = h(o.substr(d, 2))) < 917601 || c > 917626) return !1;
2038
- g += 1, d += 2;
2039
- }
2040
- return h(o.substr(d, 2)) === 917631;
2041
- }, m.isVariationSelector = function(o) {
2042
- return o === 65039;
2043
- }, m.BLACK_FLAG_CODE_POINT = s;
2044
- var y = { addChars: function(o) {
2045
- if (o) {
2046
- var d;
2047
- this.chars || (this.chars = []);
2048
- var c, g, l = o.length, p = this.chars.length;
2049
- for (d = 0; d < l; d += 1) {
2050
- for (c = 0, g = !1; c < p; ) this.chars[c].style === o[d].style && this.chars[c].fFamily === o[d].fFamily && this.chars[c].ch === o[d].ch && (g = !0), c += 1;
2051
- g || (this.chars.push(o[d]), p += 1);
2052
- }
2053
- }
2054
- }, addFonts: function(o, d) {
2055
- if (o) {
2056
- if (this.chars) return this.isLoaded = !0, void (this.fonts = o.list);
2057
- if (!document.body) return this.isLoaded = !0, o.list.forEach(function(T) {
2058
- T.helper = r(T), T.cache = {};
2059
- }), void (this.fonts = o.list);
2060
- var c, g = o.list, l = g.length, p = l;
2061
- for (c = 0; c < l; c += 1) {
2062
- var f, u, v = !0;
2063
- if (g[c].loaded = !1, g[c].monoCase = a(g[c].fFamily, "monospace"), g[c].sansCase = a(g[c].fFamily, "sans-serif"), g[c].fPath) {
2064
- if (g[c].fOrigin === "p" || g[c].origin === 3) {
2065
- if ((f = document.querySelectorAll('style[f-forigin="p"][f-family="' + g[c].fFamily + '"], style[f-origin="3"][f-family="' + g[c].fFamily + '"]')).length > 0 && (v = !1), v) {
2066
- var x = Pt("style");
2067
- x.setAttribute("f-forigin", g[c].fOrigin), x.setAttribute("f-origin", g[c].origin), x.setAttribute("f-family", g[c].fFamily), x.type = "text/css", x.innerText = "@font-face {font-family: " + g[c].fFamily + "; font-style: normal; src: url('" + g[c].fPath + "');}", d.appendChild(x);
2068
- }
2069
- } else if (g[c].fOrigin === "g" || g[c].origin === 1) {
2070
- for (f = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'), u = 0; u < f.length; u += 1) f[u].href.indexOf(g[c].fPath) !== -1 && (v = !1);
2071
- if (v) {
2072
- var C = Pt("link");
2073
- C.setAttribute("f-forigin", g[c].fOrigin), C.setAttribute("f-origin", g[c].origin), C.type = "text/css", C.rel = "stylesheet", C.href = g[c].fPath, document.body.appendChild(C);
2074
- }
2075
- } else if (g[c].fOrigin === "t" || g[c].origin === 2) {
2076
- for (f = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'), u = 0; u < f.length; u += 1) g[c].fPath === f[u].src && (v = !1);
2077
- if (v) {
2078
- var A = Pt("link");
2079
- A.setAttribute("f-forigin", g[c].fOrigin), A.setAttribute("f-origin", g[c].origin), A.setAttribute("rel", "stylesheet"), A.setAttribute("href", g[c].fPath), d.appendChild(A);
2080
- }
2081
- }
2082
- } else g[c].loaded = !0, p -= 1;
2083
- g[c].helper = r(g[c], d), g[c].cache = {}, this.fonts.push(g[c]);
2084
- }
2085
- p === 0 ? this.isLoaded = !0 : setTimeout(this.checkLoadedFonts.bind(this), 100);
2086
- } else this.isLoaded = !0;
2087
- }, getCharData: function(o, d, c) {
2088
- for (var g = 0, l = this.chars.length; g < l; ) {
2089
- if (this.chars[g].ch === o && this.chars[g].style === d && this.chars[g].fFamily === c) return this.chars[g];
2090
- g += 1;
2091
- }
2092
- 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;
2093
- }, getFontByName: function(o) {
2094
- for (var d = 0, c = this.fonts.length; d < c; ) {
2095
- if (this.fonts[d].fName === o) return this.fonts[d];
2096
- d += 1;
2097
- }
2098
- return this.fonts[0];
2099
- }, measureText: function(o, d, c) {
2100
- var g = this.getFontByName(d), l = o;
2101
- if (!g.cache[l]) {
2102
- var p = g.helper;
2103
- if (o === " ") {
2104
- var f = p.measureText("|" + o + "|"), u = p.measureText("||");
2105
- g.cache[l] = (f - u) / 100;
2106
- } else g.cache[l] = p.measureText(o) / 100;
2107
- }
2108
- return g.cache[l] * c;
2109
- }, checkLoadedFonts: function() {
2110
- var o, d, c, g = this.fonts.length, l = g;
2111
- for (o = 0; o < g; 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)));
2112
- l !== 0 && Date.now() - this.initTime < 5e3 ? setTimeout(this.checkLoadedFontsBinded, 20) : setTimeout(this.setIsLoadedBinded, 10);
2113
- }, setIsLoaded: function() {
2114
- this.isLoaded = !0;
2115
- } };
2116
- return m.prototype = y, m;
2117
- }();
2118
- function ci(t) {
2119
- this.animationData = t;
2120
- }
2121
- function Zt() {
2122
- }
2123
- ci.prototype.getProp = function(t) {
2124
- return this.animationData.slots && this.animationData.slots[t.sid] ? Object.assign(t, this.animationData.slots[t.sid].p) : t;
2125
- }, Zt.prototype = { initRenderable: function() {
2126
- this.isInRange = !1, this.hidden = !1, this.isTransparent = !1, this.renderableComponents = [];
2127
- }, addRenderableComponent: function(t) {
2128
- this.renderableComponents.indexOf(t) === -1 && this.renderableComponents.push(t);
2129
- }, removeRenderableComponent: function(t) {
2130
- this.renderableComponents.indexOf(t) !== -1 && this.renderableComponents.splice(this.renderableComponents.indexOf(t), 1);
2131
- }, prepareRenderableFrame: function(t) {
2132
- this.checkLayerLimits(t);
2133
- }, checkTransparency: function() {
2134
- this.finalTransform.mProp.o.v <= 0 ? !this.isTransparent && this.globalData.renderConfig.hideOnTransparent && (this.isTransparent = !0, this.hide()) : this.isTransparent && (this.isTransparent = !1, this.show());
2135
- }, checkLayerLimits: function(t) {
2136
- 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());
2137
- }, renderRenderable: function() {
2138
- var t, e = this.renderableComponents.length;
2139
- for (t = 0; t < e; t += 1) this.renderableComponents[t].renderFrame(this._isFirstFrame);
2140
- }, sourceRectAtTime: function() {
2141
- return { top: 0, left: 0, width: 100, height: 100 };
2142
- }, getLayerSize: function() {
2143
- return this.data.ty === 5 ? { w: this.data.textData.width, h: this.data.textData.height } : { w: this.data.width, h: this.data.height };
2144
- } };
2145
- 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) {
2146
- return di[t] || "";
2147
- });
2148
- function Xi(t, e, s) {
2149
- this.p = E.getProp(e, t.v, 0, 0, s);
2150
- }
2151
- function Hi(t, e, s) {
2152
- this.p = E.getProp(e, t.v, 0, 0, s);
2153
- }
2154
- function Gi(t, e, s) {
2155
- this.p = E.getProp(e, t.v, 1, 0, s);
2156
- }
2157
- function Ki(t, e, s) {
2158
- this.p = E.getProp(e, t.v, 1, 0, s);
2159
- }
2160
- function Ui(t, e, s) {
2161
- this.p = E.getProp(e, t.v, 0, 0, s);
2162
- }
2163
- function Zi(t, e, s) {
2164
- this.p = E.getProp(e, t.v, 0, 0, s);
2165
- }
2166
- function $i(t, e, s) {
2167
- this.p = E.getProp(e, t.v, 0, 0, s);
2168
- }
2169
- function Qi() {
2170
- this.p = {};
2171
- }
2172
- function ui(t, e) {
2173
- var s, i = t.ef || [];
2174
- this.effectElements = [];
2175
- var a, r = i.length;
2176
- for (s = 0; s < r; s += 1) a = new Te(i[s], e), this.effectElements.push(a);
2177
- }
2178
- function Te(t, e) {
2179
- this.init(t, e);
2180
- }
2181
- function wt() {
2182
- }
2183
- function Mt() {
2184
- }
2185
- function $t(t, e, s) {
2186
- this.initFrame(), this.initRenderable(), this.assetData = e.getAssetData(t.refId), this.footageData = e.imageLoader.getAsset(this.assetData), this.initBaseData(t, e, s);
2187
- }
2188
- function xt(t, e, s) {
2189
- this.initFrame(), this.initRenderable(), this.assetData = e.getAssetData(t.refId), this.initBaseData(t, e, s), this._isPlaying = !1, this._canPlay = !1;
2190
- var i = this.globalData.getAssetsPath(this.assetData);
2191
- 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);
2192
- }
2193
- function mt() {
2194
- }
2195
- W([ut], Te), Te.prototype.getValue = Te.prototype.iterateDynamicProperties, Te.prototype.init = function(t, e) {
2196
- var s;
2197
- this.data = t, this.effectElements = [], this.initDynamicPropertyContainer(e);
2198
- var i, a = this.data.ef.length, r = this.data.ef;
2199
- for (s = 0; s < a; s += 1) {
2200
- switch (i = null, r[s].ty) {
2201
- case 0:
2202
- i = new Xi(r[s], e, this);
2203
- break;
2204
- case 1:
2205
- i = new Hi(r[s], e, this);
2206
- break;
2207
- case 2:
2208
- i = new Gi(r[s], e, this);
2209
- break;
2210
- case 3:
2211
- i = new Ki(r[s], e, this);
2212
- break;
2213
- case 4:
2214
- case 7:
2215
- i = new $i(r[s], e, this);
2216
- break;
2217
- case 10:
2218
- i = new Ui(r[s], e, this);
2219
- break;
2220
- case 11:
2221
- i = new Zi(r[s], e, this);
2222
- break;
2223
- case 5:
2224
- i = new ui(r[s], e);
2225
- break;
2226
- default:
2227
- i = new Qi(r[s]);
2228
- }
2229
- i && this.effectElements.push(i);
2230
- }
2231
- }, wt.prototype = { checkMasks: function() {
2232
- if (!this.data.hasMask) return !1;
2233
- for (var t = 0, e = this.data.masksProperties.length; t < e; ) {
2234
- if (this.data.masksProperties[t].mode !== "n" && this.data.masksProperties[t].cl !== !1) return !0;
2235
- t += 1;
2236
- }
2237
- return !1;
2238
- }, initExpressions: function() {
2239
- }, setBlendMode: function() {
2240
- var t = Ue(this.data.bm);
2241
- (this.baseElement || this.layerElement).style["mix-blend-mode"] = t;
2242
- }, initBaseData: function(t, e, s) {
2243
- 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);
2244
- }, getType: function() {
2245
- return this.type;
2246
- }, sourceRectAtTime: function() {
2247
- } }, Mt.prototype = { initFrame: function() {
2248
- this._isFirstFrame = !1, this.dynamicProperties = [], this._mdf = !1;
2249
- }, prepareProperties: function(t, e) {
2250
- var s, i = this.dynamicProperties.length;
2251
- 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));
2252
- }, addDynamicProperty: function(t) {
2253
- this.dynamicProperties.indexOf(t) === -1 && this.dynamicProperties.push(t);
2254
- } }, $t.prototype.prepareFrame = function() {
2255
- }, W([Zt, wt, Mt], $t), $t.prototype.getBaseElement = function() {
2256
- return null;
2257
- }, $t.prototype.renderFrame = function() {
2258
- }, $t.prototype.destroy = function() {
2259
- }, $t.prototype.initExpressions = function() {
2260
- }, $t.prototype.getFootageData = function() {
2261
- return this.footageData;
2262
- }, xt.prototype.prepareFrame = function(t) {
2263
- if (this.prepareRenderableFrame(t, !0), this.prepareProperties(t, !0), this.tm._placeholder) this._currentTime = t / this.data.sr;
2264
- else {
2265
- var e = this.tm.v;
2266
- this._currentTime = e;
2267
- }
2268
- this._volume = this.lv.v[0];
2269
- var s = this._volume * this._volumeMultiplier;
2270
- this._previousVolume !== s && (this._previousVolume = s, this.audio.volume(s));
2271
- }, W([Zt, wt, Mt], xt), xt.prototype.renderFrame = function() {
2272
- 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));
2273
- }, xt.prototype.show = function() {
2274
- }, xt.prototype.hide = function() {
2275
- this.audio.pause(), this._isPlaying = !1;
2276
- }, xt.prototype.pause = function() {
2277
- this.audio.pause(), this._isPlaying = !1, this._canPlay = !1;
2278
- }, xt.prototype.resume = function() {
2279
- this._canPlay = !0;
2280
- }, xt.prototype.setRate = function(t) {
2281
- this.audio.rate(t);
2282
- }, xt.prototype.volume = function(t) {
2283
- this._volumeMultiplier = t, this._previousVolume = t * this._volume, this.audio.volume(this._previousVolume);
2284
- }, xt.prototype.getBaseElement = function() {
2285
- return null;
2286
- }, xt.prototype.destroy = function() {
2287
- }, xt.prototype.sourceRectAtTime = function() {
2288
- }, xt.prototype.initExpressions = function() {
2289
- }, mt.prototype.checkLayers = function(t) {
2290
- var e, s, i = this.layers.length;
2291
- 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;
2292
- this.checkPendingElements();
2293
- }, mt.prototype.createItem = function(t) {
2294
- switch (t.ty) {
2295
- case 2:
2296
- return this.createImage(t);
2297
- case 0:
2298
- return this.createComp(t);
2299
- case 1:
2300
- return this.createSolid(t);
2301
- case 3:
2302
- default:
2303
- return this.createNull(t);
2304
- case 4:
2305
- return this.createShape(t);
2306
- case 5:
2307
- return this.createText(t);
2308
- case 6:
2309
- return this.createAudio(t);
2310
- case 13:
2311
- return this.createCamera(t);
2312
- case 15:
2313
- return this.createFootage(t);
2314
- }
2315
- }, mt.prototype.createCamera = function() {
2316
- throw new Error("You're using a 3d camera. Try the html renderer.");
2317
- }, mt.prototype.createAudio = function(t) {
2318
- return new xt(t, this.globalData, this);
2319
- }, mt.prototype.createFootage = function(t) {
2320
- return new $t(t, this.globalData, this);
2321
- }, mt.prototype.buildAllItems = function() {
2322
- var t, e = this.layers.length;
2323
- for (t = 0; t < e; t += 1) this.buildItem(t);
2324
- this.checkPendingElements();
2325
- }, mt.prototype.includeLayers = function(t) {
2326
- var e;
2327
- this.completeLayers = !1;
2328
- var s, i = t.length, a = this.layers.length;
2329
- for (e = 0; e < i; e += 1) for (s = 0; s < a; ) {
2330
- if (this.layers[s].id === t[e].id) {
2331
- this.layers[s] = t[e];
2332
- break;
2333
- }
2334
- s += 1;
2335
- }
2336
- }, mt.prototype.setProjectInterface = function(t) {
2337
- this.globalData.projectInterface = t;
2338
- }, mt.prototype.initItems = function() {
2339
- this.globalData.progressiveLoad || this.buildAllItems();
2340
- }, mt.prototype.buildElementParenting = function(t, e, s) {
2341
- 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;
2342
- }, mt.prototype.addPendingElement = function(t) {
2343
- this.pendingElements.push(t);
2344
- }, mt.prototype.searchExtraCompositions = function(t) {
2345
- var e, s = t.length;
2346
- for (e = 0; e < s; e += 1) if (t[e].xt) {
2347
- var i = this.createComp(t[e]);
2348
- i.initExpressions(), this.globalData.projectInterface.registerComposition(i);
2349
- }
2350
- }, mt.prototype.getElementById = function(t) {
2351
- var e, s = this.elements.length;
2352
- for (e = 0; e < s; e += 1) if (this.elements[e].data.ind === t) return this.elements[e];
2353
- return null;
2354
- }, mt.prototype.getElementByPath = function(t) {
2355
- var e, s = t.shift();
2356
- if (typeof s == "number") e = this.elements[s];
2357
- else {
2358
- var i, a = this.elements.length;
2359
- for (i = 0; i < a; i += 1) if (this.elements[i].data.nm === s) {
2360
- e = this.elements[i];
2361
- break;
2362
- }
2363
- }
2364
- return t.length === 0 ? e : e.getElementByPath(t);
2365
- }, mt.prototype.setupGlobalData = function(t, e) {
2366
- this.globalData.fontManager = new ne(), this.globalData.slotManager = function(s) {
2367
- return new ci(s);
2368
- }(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 };
2369
- };
2370
- var mi = "transformEFfect";
2371
- function Nt() {
2372
- }
2373
- function Qt(t, e, s) {
2374
- this.data = t, this.element = e, this.globalData = s, this.storedData = [], this.masksProperties = this.data.masksProperties || [], this.maskElement = null;
2375
- var i, a, r = this.globalData.defs, h = this.masksProperties ? this.masksProperties.length : 0;
2376
- this.viewData = K(h), this.solidPath = "";
2377
- var n, m, y, o, d, c, g = this.masksProperties, l = 0, p = [], f = Ct(), u = "clipPath", v = "clip-path";
2378
- for (i = 0; i < h; i += 1) if ((g[i].mode !== "a" && g[i].mode !== "n" || g[i].inv || g[i].o.k !== 100 || g[i].o.x) && (u = "mask", v = "mask"), g[i].mode !== "s" && g[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), p.push(y)), a = z("path"), g[i].mode === "n") this.viewData[i] = { op: E.getProp(this.element, g[i].o, 0, 0.01, this.element), prop: de.getShapeProp(this.element, g[i], 3), elem: a, lastPath: "" }, r.appendChild(a);
2379
- else {
2380
- var x;
2381
- if (l += 1, a.setAttribute("fill", g[i].mode === "s" ? "#000000" : "#ffffff"), a.setAttribute("clip-rule", "nonzero"), g[i].x.k !== 0 ? (u = "mask", v = "mask", c = E.getProp(this.element, g[i].x, 0, null, this.element), x = Ct(), (o = z("filter")).setAttribute("id", x), (d = z("feMorphology")).setAttribute("operator", "erode"), d.setAttribute("in", "SourceGraphic"), d.setAttribute("radius", "0"), o.appendChild(d), r.appendChild(o), a.setAttribute("stroke", g[i].mode === "s" ? "#000000" : "#ffffff")) : (d = null, c = null), this.storedData[i] = { elem: a, x: c, expan: d, lastPath: "", lastOperator: "", filterId: x, lastRadius: 0 }, g[i].mode === "i") {
2382
- m = p.length;
2383
- var C = z("g");
2384
- for (n = 0; n < m; n += 1) C.appendChild(p[n]);
2385
- var A = z("mask");
2386
- A.setAttribute("mask-type", "alpha"), A.setAttribute("id", f + "_" + l), A.appendChild(a), r.appendChild(A), C.setAttribute("mask", "url(" + dt() + "#" + f + "_" + l + ")"), p.length = 0, p.push(C);
2387
- } else p.push(a);
2388
- g[i].inv && !this.solidPath && (this.solidPath = this.createLayerSolidPath()), this.viewData[i] = { elem: a, lastPath: "", op: E.getProp(this.element, g[i].o, 0, 0.01, this.element), prop: de.getShapeProp(this.element, g[i], 3), invRect: y }, this.viewData[i].prop.k || this.drawPath(g[i], this.viewData[i].prop.v, this.viewData[i]);
2389
- }
2390
- for (this.maskElement = z(u), h = p.length, i = 0; i < h; i += 1) this.maskElement.appendChild(p[i]);
2391
- l > 0 && (this.maskElement.setAttribute("id", f), this.element.maskedElement.setAttribute(v, "url(" + dt() + "#" + f + ")"), r.appendChild(this.maskElement)), this.viewData.length && this.element.addRenderableComponent(this);
2392
- }
2393
- Nt.prototype = { initTransform: function() {
2394
- var t = new st();
2395
- 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;
2396
- }, renderTransform: function() {
2397
- if (this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame, this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame, this.hierarchy) {
2398
- var t, e = this.finalTransform.mat, s = 0, i = this.hierarchy.length;
2399
- if (!this.finalTransform._matMdf) for (; s < i; ) {
2400
- if (this.hierarchy[s].finalTransform.mProp._mdf) {
2401
- this.finalTransform._matMdf = !0;
2402
- break;
2403
- }
2404
- s += 1;
2405
- }
2406
- 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);
2407
- }
2408
- this.finalTransform._matMdf && (this.finalTransform._localMatMdf = this.finalTransform._matMdf), this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v);
2409
- }, renderLocalTransform: function() {
2410
- if (this.localTransforms) {
2411
- var t = 0, e = this.localTransforms.length;
2412
- 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;
2413
- if (this.finalTransform._localMatMdf) {
2414
- var s = this.finalTransform.localMat;
2415
- for (this.localTransforms[0].matrix.clone(s), t = 1; t < e; t += 1) {
2416
- var i = this.localTransforms[t].matrix;
2417
- s.multiply(i);
2418
- }
2419
- s.multiply(this.finalTransform.mat);
2420
- }
2421
- if (this.finalTransform._opMdf) {
2422
- var a = this.finalTransform.localOpacity;
2423
- for (t = 0; t < e; t += 1) a *= 0.01 * this.localTransforms[t].opacity;
2424
- this.finalTransform.localOpacity = a;
2425
- }
2426
- }
2427
- }, searchEffectTransforms: function() {
2428
- if (this.renderableEffectsManager) {
2429
- var t = this.renderableEffectsManager.getEffects(mi);
2430
- if (t.length) {
2431
- this.localTransforms = [], this.finalTransform.localMat = new st();
2432
- var e = 0, s = t.length;
2433
- for (e = 0; e < s; e += 1) this.localTransforms.push(t[e]);
2434
- }
2435
- }
2436
- }, globalToLocal: function(t) {
2437
- var e = [];
2438
- e.push(this.finalTransform);
2439
- 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;
2440
- var r, h = e.length;
2441
- 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];
2442
- return t;
2443
- }, mHelper: new st() }, Qt.prototype.getMaskProperty = function(t) {
2444
- return this.viewData[t].prop;
2445
- }, Qt.prototype.renderFrame = function(t) {
2446
- var e, s = this.element.finalTransform.mat, i = this.masksProperties.length;
2447
- 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))) {
2448
- var a = this.storedData[e].expan;
2449
- 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));
2450
- }
2451
- }, Qt.prototype.getMaskelement = function() {
2452
- return this.maskElement;
2453
- }, Qt.prototype.createLayerSolidPath = function() {
2454
- var t = "M0,0 ";
2455
- 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 + " ";
2456
- }, Qt.prototype.drawPath = function(t, e, s) {
2457
- var i, a, r = " M" + e.v[0][0] + "," + e.v[0][1];
2458
- 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];
2459
- 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) {
2460
- var h = "";
2461
- s.elem && (e.c && (h = t.inv ? this.solidPath + r : r), s.elem.setAttribute("d", h)), s.lastPath = r;
2462
- }
2463
- }, Qt.prototype.destroy = function() {
2464
- this.element = null, this.globalData = null, this.maskElement = null, this.data = null, this.masksProperties = null;
2465
- };
2466
- var Fe = function() {
2467
- var t = {};
2468
- return t.createFilter = function(e, s) {
2469
- var i = z("filter");
2470
- 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;
2471
- }, t.createAlphaToLuminanceFilter = function() {
2472
- var e = z("feColorMatrix");
2473
- 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;
2474
- }, t;
2475
- }(), Ze = function() {
2476
- var t = { maskType: !0, svgLumaHidden: !0, offscreenCanvas: typeof OffscreenCanvas < "u" };
2477
- 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;
2478
- }(), gs = {}, gi = "filter_result_";
2479
- function ys(t) {
2480
- var e, s, i = "SourceGraphic", a = t.data.ef ? t.data.ef.length : 0, r = Ct(), h = Fe.createFilter(r, !0), n = 0;
2481
- for (this.filters = [], e = 0; e < a; e += 1) {
2482
- s = null;
2483
- var m = t.data.ef[e].ty;
2484
- gs[m] && (s = new gs[m].effect(h, t.effectsManager.effectElements[e], t, gi + n, i), i = gi + n, gs[m].countsAsEffect && (n += 1)), s && this.filters.push(s);
2485
- }
2486
- n && (t.globalData.defs.appendChild(h), t.layerElement.setAttribute("filter", "url(" + dt() + "#" + r + ")")), this.filters.length && t.addRenderableComponent(this);
2487
- }
2488
- function Ee() {
2489
- }
2490
- function qt() {
2491
- }
2492
- function ye() {
2493
- }
2494
- function oe(t, e, s) {
2495
- 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 };
2496
- }
2497
- function ta(t, e) {
2498
- this.elem = t, this.pos = e;
2499
- }
2500
- function vs() {
2501
- }
2502
- ys.prototype.renderFrame = function(t) {
2503
- var e, s = this.filters.length;
2504
- for (e = 0; e < s; e += 1) this.filters[e].renderFrame(t);
2505
- }, ys.prototype.getEffects = function(t) {
2506
- var e, s = this.filters.length, i = [];
2507
- for (e = 0; e < s; e += 1) this.filters[e].type === t && i.push(this.filters[e]);
2508
- return i;
2509
- }, Ee.prototype = { initRendererElement: function() {
2510
- this.layerElement = z("g");
2511
- }, createContainerElements: function() {
2512
- this.matteElement = z("g"), this.transformedElement = this.layerElement, this.maskedElement = this.layerElement, this._sizeChanged = !1;
2513
- var t = null;
2514
- if (this.data.td) {
2515
- this.matteMasks = {};
2516
- var e = z("g");
2517
- e.setAttribute("id", this.layerId), e.appendChild(this.layerElement), t = e, this.globalData.defs.appendChild(e);
2518
- } else this.data.tt ? (this.matteElement.appendChild(this.layerElement), t = this.matteElement, this.baseElement = this.matteElement) : this.baseElement = this.layerElement;
2519
- 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) {
2520
- var s = z("clipPath"), i = z("path");
2521
- i.setAttribute("d", "M0,0 L" + this.data.w + ",0 L" + this.data.w + "," + this.data.h + " L0," + this.data.h + "z");
2522
- var a = Ct();
2523
- if (s.setAttribute("id", a), s.appendChild(i), this.globalData.defs.appendChild(s), this.checkMasks()) {
2524
- var r = z("g");
2525
- r.setAttribute("clip-path", "url(" + dt() + "#" + a + ")"), r.appendChild(this.layerElement), this.transformedElement = r, t ? t.appendChild(this.transformedElement) : this.baseElement = this.transformedElement;
2526
- } else this.layerElement.setAttribute("clip-path", "url(" + dt() + "#" + a + ")");
2527
- }
2528
- this.data.bm !== 0 && this.setBlendMode();
2529
- }, renderElement: function() {
2530
- this.finalTransform._localMatMdf && this.transformedElement.setAttribute("transform", this.finalTransform.localMat.to2dCSS()), this.finalTransform._opMdf && this.transformedElement.setAttribute("opacity", this.finalTransform.localOpacity);
2531
- }, destroyBaseElement: function() {
2532
- this.layerElement = null, this.matteElement = null, this.maskManager.destroy();
2533
- }, getBaseElement: function() {
2534
- return this.data.hd ? null : this.baseElement;
2535
- }, createRenderableComponents: function() {
2536
- this.maskManager = new Qt(this.data, this, this.globalData), this.renderableEffectsManager = new ys(this), this.searchEffectTransforms();
2537
- }, getMatte: function(t) {
2538
- if (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t]) {
2539
- var e, s, i, a, r = this.layerId + "_" + t;
2540
- if (t === 1 || t === 3) {
2541
- var h = z("mask");
2542
- 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 + ")"));
2543
- } else if (t === 2) {
2544
- var n = z("mask");
2545
- n.setAttribute("id", r), n.setAttribute("mask-type", "alpha");
2546
- var m = z("g");
2547
- n.appendChild(m), e = Ct(), s = Fe.createFilter(e);
2548
- var y = z("feComponentTransfer");
2549
- y.setAttribute("in", "SourceGraphic"), s.appendChild(y);
2550
- var o = z("feFuncA");
2551
- o.setAttribute("type", "table"), o.setAttribute("tableValues", "1.0 0.0"), y.appendChild(o), this.globalData.defs.appendChild(s);
2552
- var d = z("rect");
2553
- 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"), m.setAttribute("filter", "url(" + dt() + "#" + e + ")"), m.appendChild(d), (i = z("use")).setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), m.appendChild(i), Ze.maskType || (n.setAttribute("mask-type", "luminance"), s.appendChild(Fe.createAlphaToLuminanceFilter()), a = z("g"), m.appendChild(d), a.appendChild(this.layerElement), m.appendChild(a)), this.globalData.defs.appendChild(n);
2554
- }
2555
- this.matteMasks[t] = r;
2556
- }
2557
- return this.matteMasks[t];
2558
- }, setMatte: function(t) {
2559
- this.matteElement && this.matteElement.setAttribute("mask", "url(" + dt() + "#" + t + ")");
2560
- } }, qt.prototype = { initHierarchy: function() {
2561
- this.hierarchy = [], this._isParent = !1, this.checkParenting();
2562
- }, setHierarchy: function(t) {
2563
- this.hierarchy = t;
2564
- }, setAsParent: function() {
2565
- this._isParent = !0;
2566
- }, checkParenting: function() {
2567
- this.data.parent !== void 0 && this.comp.buildElementParenting(this, this.data.parent, []);
2568
- } }, W([Zt, Ti({ initElement: function(t, e, s) {
2569
- 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();
2570
- }, hide: function() {
2571
- this.hidden || this.isInRange && !this.isTransparent || ((this.baseElement || this.layerElement).style.display = "none", this.hidden = !0);
2572
- }, show: function() {
2573
- this.isInRange && !this.isTransparent && (this.data.hd || ((this.baseElement || this.layerElement).style.display = "block"), this.hidden = !1, this._isFirstFrame = !0);
2574
- }, renderFrame: function() {
2575
- this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame && (this._isFirstFrame = !1));
2576
- }, renderInnerContent: function() {
2577
- }, prepareFrame: function(t) {
2578
- this._mdf = !1, this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange), this.checkTransparency();
2579
- }, destroy: function() {
2580
- this.innerElem = null, this.destroyBaseElement();
2581
- } })], ye), W([wt, Nt, Ee, qt, Mt, ye], oe), oe.prototype.createContent = function() {
2582
- var t = this.globalData.getAssetsPath(this.assetData);
2583
- 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);
2584
- }, oe.prototype.sourceRectAtTime = function() {
2585
- return this.sourceRect;
2586
- }, vs.prototype = { addShapeToModifiers: function(t) {
2587
- var e, s = this.shapeModifiers.length;
2588
- for (e = 0; e < s; e += 1) this.shapeModifiers[e].addShape(t);
2589
- }, isShapeInAnimatedModifiers: function(t) {
2590
- for (var e = this.shapeModifiers.length; 0 < e; ) if (this.shapeModifiers[0].isAnimatedWithShape(t)) return !0;
2591
- return !1;
2592
- }, renderModifiers: function() {
2593
- if (this.shapeModifiers.length) {
2594
- var t, e = this.shapes.length;
2595
- for (t = 0; t < e; t += 1) this.shapes[t].sh.reset();
2596
- for (t = (e = this.shapeModifiers.length) - 1; t >= 0 && !this.shapeModifiers[t].processShapes(this._isFirstFrame); t -= 1) ;
2597
- }
2598
- }, searchProcessedElement: function(t) {
2599
- for (var e = this.processedElements, s = 0, i = e.length; s < i; ) {
2600
- if (e[s].elem === t) return e[s].pos;
2601
- s += 1;
2602
- }
2603
- return 0;
2604
- }, addProcessedElement: function(t, e) {
2605
- for (var s = this.processedElements, i = s.length; i; ) if (s[i -= 1].elem === t) return void (s[i].pos = e);
2606
- s.push(new ta(t, e));
2607
- }, prepareFrame: function(t) {
2608
- this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange);
2609
- } };
2610
- var bs = { 1: "butt", 2: "round", 3: "square" }, _s = { 1: "miter", 2: "round", 3: "bevel" };
2611
- function Cs(t, e, s) {
2612
- this.caches = [], this.styles = [], this.transformers = t, this.lStr = "", this.sh = s, this.lvl = e, this._isAnimated = !!s.k;
2613
- for (var i = 0, a = t.length; i < a; ) {
2614
- if (t[i].mProps.dynamicProperties.length) {
2615
- this._isAnimated = !0;
2616
- break;
2617
- }
2618
- i += 1;
2619
- }
2620
- }
2621
- function yi(t, e) {
2622
- 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;
2623
- }
2624
- function Le(t, e, s, i) {
2625
- var a;
2626
- 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);
2627
- var r, h = e.length || 0;
2628
- 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 };
2629
- this.k || this.getValue(!0), this._isAnimated = this.k;
2630
- }
2631
- function vi(t, e, s) {
2632
- 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;
2633
- }
2634
- function bi(t, e, s) {
2635
- 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;
2636
- }
2637
- function _i(t, e, s) {
2638
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.style = s;
2639
- }
2640
- function ve(t, e, s) {
2641
- this.data = e, this.c = ht("uint8c", 4 * e.p);
2642
- var i = e.k.k[0].s ? e.k.k[0].s.length - 4 * e.p : e.k.k.length - 4 * e.p;
2643
- 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);
2644
- }
2645
- function be(t, e, s) {
2646
- this.initDynamicPropertyContainer(t), this.getValue = this.iterateDynamicProperties, this.initGradientData(t, e, s);
2647
- }
2648
- function Ci(t, e, s) {
2649
- 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;
2650
- }
2651
- function ea() {
2652
- this.it = [], this.prevViewData = [], this.gr = z("g");
2653
- }
2654
- function sa(t, e, s) {
2655
- this.transform = { mProps: t, op: e, container: s }, this.elements = [], this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
2656
- }
2657
- Cs.prototype.setAsAnimated = function() {
2658
- this._isAnimated = !0;
2659
- }, yi.prototype.reset = function() {
2660
- this.d = "", this._mdf = !1;
2661
- }, Le.prototype.getValue = function(t) {
2662
- if ((this.elem.globalData.frameId !== this.frameId || t) && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf = this._mdf || t, this._mdf)) {
2663
- var e = 0, s = this.dataProps.length;
2664
- 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;
2665
- }
2666
- }, W([ut], Le), W([ut], vi), W([ut], bi), W([ut], _i), ve.prototype.comparePoints = function(t, e) {
2667
- for (var s = 0, i = this.o.length / 2; s < i; ) {
2668
- if (Math.abs(t[4 * s] - t[4 * e + 2 * s]) > 0.01) return !1;
2669
- s += 1;
2670
- }
2671
- return !0;
2672
- }, ve.prototype.checkCollapsable = function() {
2673
- if (this.o.length / 2 != this.c.length / 4) return !1;
2674
- if (this.data.k.k[0].s) for (var t = 0, e = this.data.k.k.length; t < e; ) {
2675
- if (!this.comparePoints(this.data.k.k[t].s, this.data.p)) return !1;
2676
- t += 1;
2677
- }
2678
- else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1;
2679
- return !0;
2680
- }, ve.prototype.getValue = function(t) {
2681
- if (this.prop.getValue(), this._mdf = !1, this._cmdf = !1, this._omdf = !1, this.prop._mdf || t) {
2682
- var e, s, i, a = 4 * this.data.p;
2683
- 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);
2684
- 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);
2685
- this._mdf = !t;
2686
- }
2687
- }, W([ut], ve), be.prototype.initGradientData = function(t, e, s) {
2688
- 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;
2689
- }, be.prototype.setGradientData = function(t, e) {
2690
- var s = Ct(), i = z(e.t === 1 ? "linearGradient" : "radialGradient");
2691
- i.setAttribute("id", s), i.setAttribute("spreadMethod", "pad"), i.setAttribute("gradientUnits", "userSpaceOnUse");
2692
- var a, r, h, n = [];
2693
- for (h = 4 * e.g.p, r = 0; r < h; r += 4) a = z("stop"), i.appendChild(a), n.push(a);
2694
- t.setAttribute(e.ty === "gf" ? "fill" : "stroke", "url(" + dt() + "#" + s + ")"), this.gf = i, this.cst = n;
2695
- }, be.prototype.setGradientOpacity = function(t, e) {
2696
- if (this.g._hasOpacity && !this.g._collapsable) {
2697
- var s, i, a, r = z("mask"), h = z("path");
2698
- r.appendChild(h);
2699
- var n = Ct(), m = Ct();
2700
- r.setAttribute("id", m);
2701
- var y = z(t.t === 1 ? "linearGradient" : "radialGradient");
2702
- 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;
2703
- var o = this.stops;
2704
- 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);
2705
- 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 = m, e.msElem = h;
2706
- }
2707
- }, W([ut], be), W([be, ut], Ci);
2708
- var xi = function(t, e, s, i) {
2709
- if (e === 0) return "";
2710
- var a, r = t.o, h = t.i, n = t.v, m = " M" + i.applyToPointStringified(n[0][0], n[0][1]);
2711
- for (a = 1; a < e; a += 1) m += " 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]);
2712
- return s && e && (m += " 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]), m += "z"), m;
2713
- }, ia = function() {
2714
- var t = new st(), e = new st();
2715
- function s(y, o, d) {
2716
- (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());
2717
- }
2718
- function i() {
2719
- }
2720
- function a(y, o, d) {
2721
- var c, g, l, p, f, u, v, x, C, A, T = o.styles.length, I = o.lvl;
2722
- for (u = 0; u < T; u += 1) {
2723
- if (p = o.sh._mdf || d, o.styles[u].lvl < I) {
2724
- for (x = e.reset(), C = I - o.styles[u].lvl, A = o.transformers.length - 1; !p && C > 0; ) p = o.transformers[A].mProps._mdf || p, C -= 1, A -= 1;
2725
- if (p) for (C = I - o.styles[u].lvl, A = o.transformers.length - 1; C > 0; ) x.multiply(o.transformers[A].mProps.v), C -= 1, A -= 1;
2726
- } else x = t;
2727
- if (g = (v = o.sh.paths)._length, p) {
2728
- for (l = "", c = 0; c < g; c += 1) (f = v.shapes[c]) && f._length && (l += xi(f, f._length, f.c, x));
2729
- o.caches[u] = l;
2730
- } else l = o.caches[u];
2731
- o.styles[u].d += y.hd === !0 ? "" : l, o.styles[u]._mdf = p || o.styles[u]._mdf;
2732
- }
2733
- }
2734
- function r(y, o, d) {
2735
- var c = o.style;
2736
- (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);
2737
- }
2738
- function h(y, o, d) {
2739
- n(y, o, d), m(y, o, d);
2740
- }
2741
- function n(y, o, d) {
2742
- var c, g, l, p, f, u = o.gf, v = o.g._hasOpacity, x = o.s.v, C = o.e.v;
2743
- if (o.o._mdf || d) {
2744
- var A = y.ty === "gf" ? "fill-opacity" : "stroke-opacity";
2745
- o.style.pElem.setAttribute(A, o.o.v);
2746
- }
2747
- if (o.s._mdf || d) {
2748
- var T = y.t === 1 ? "x1" : "cx", I = T === "x1" ? "y1" : "cy";
2749
- u.setAttribute(T, x[0]), u.setAttribute(I, x[1]), v && !o.g._collapsable && (o.of.setAttribute(T, x[0]), o.of.setAttribute(I, x[1]));
2750
- }
2751
- if (o.g._cmdf || d) {
2752
- c = o.cst;
2753
- var k = o.g.c;
2754
- for (l = c.length, g = 0; g < l; g += 1) (p = c[g]).setAttribute("offset", k[4 * g] + "%"), p.setAttribute("stop-color", "rgb(" + k[4 * g + 1] + "," + k[4 * g + 2] + "," + k[4 * g + 3] + ")");
2755
- }
2756
- if (v && (o.g._omdf || d)) {
2757
- var F = o.g.o;
2758
- for (l = (c = o.g._collapsable ? o.cst : o.ost).length, g = 0; g < l; g += 1) p = c[g], o.g._collapsable || p.setAttribute("offset", F[2 * g] + "%"), p.setAttribute("stop-opacity", F[2 * g + 1]);
2759
- }
2760
- 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])));
2761
- else if ((o.s._mdf || o.e._mdf || d) && (f = Math.sqrt(Math.pow(x[0] - C[0], 2) + Math.pow(x[1] - C[1], 2)), u.setAttribute("r", f), v && !o.g._collapsable && o.of.setAttribute("r", f)), o.e._mdf || o.h._mdf || o.a._mdf || d) {
2762
- f || (f = Math.sqrt(Math.pow(x[0] - C[0], 2) + Math.pow(x[1] - C[1], 2)));
2763
- var M = Math.atan2(C[1] - x[1], C[0] - x[0]), _ = o.h.v;
2764
- _ >= 1 ? _ = 0.99 : _ <= -1 && (_ = -0.99);
2765
- var D = f * _, w = Math.cos(M + o.a.v) * D + x[0], P = Math.sin(M + o.a.v) * D + x[1];
2766
- u.setAttribute("fx", w), u.setAttribute("fy", P), v && !o.g._collapsable && (o.of.setAttribute("fx", w), o.of.setAttribute("fy", P));
2767
- }
2768
- }
2769
- function m(y, o, d) {
2770
- var c = o.style, g = o.d;
2771
- g && (g._mdf || d) && g.dashStr && (c.pElem.setAttribute("stroke-dasharray", g.dashStr), c.pElem.setAttribute("stroke-dashoffset", g.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));
2772
- }
2773
- return { createRenderFunction: function(y) {
2774
- switch (y.ty) {
2775
- case "fl":
2776
- return r;
2777
- case "gf":
2778
- return n;
2779
- case "gs":
2780
- return h;
2781
- case "st":
2782
- return m;
2783
- case "sh":
2784
- case "el":
2785
- case "rc":
2786
- case "sr":
2787
- return a;
2788
- case "tr":
2789
- return s;
2790
- case "no":
2791
- return i;
2792
- default:
2793
- return null;
2794
- }
2795
- } };
2796
- }();
2797
- function Z(t, e, s) {
2798
- this.shapes = [], this.shapesData = t.shapes, this.stylesList = [], this.shapeModifiers = [], this.itemsData = [], this.processedElements = [], this.animatedContents = [], this.initElement(t, e, s), this.prevViewData = [];
2799
- }
2800
- function xs(t, e, s, i, a, r) {
2801
- 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 };
2802
- }
2803
- function vt(t, e) {
2804
- 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);
2805
- }
2806
- W([wt, Nt, Ee, vs, qt, Mt, ye], Z), Z.prototype.initSecondaryElement = function() {
2807
- }, Z.prototype.identityMatrix = new st(), Z.prototype.buildExpressionInterface = function() {
2808
- }, Z.prototype.createContent = function() {
2809
- this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0), this.filterUniqueShapes();
2810
- }, Z.prototype.filterUniqueShapes = function() {
2811
- var t, e, s, i, a = this.shapes.length, r = this.stylesList.length, h = [], n = !1;
2812
- for (s = 0; s < r; s += 1) {
2813
- 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);
2814
- h.length > 1 && n && this.setShapesAsAnimated(h);
2815
- }
2816
- }, Z.prototype.setShapesAsAnimated = function(t) {
2817
- var e, s = t.length;
2818
- for (e = 0; e < s; e += 1) t[e].setAsAnimated();
2819
- }, Z.prototype.createStyleElement = function(t, e) {
2820
- var s, i = new yi(t, e), a = i.pElem;
2821
- 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;
2822
- }, Z.prototype.createGroupElement = function(t) {
2823
- var e = new ea();
2824
- 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;
2825
- }, Z.prototype.createTransformElement = function(t, e) {
2826
- var s = Xe.getTransformProperty(this, t, this), i = new sa(s, s.o, e);
2827
- return this.addToAnimatedContents(t, i), i;
2828
- }, Z.prototype.createShapeElement = function(t, e, s) {
2829
- var i = 4;
2830
- t.ty === "rc" ? i = 5 : t.ty === "el" ? i = 6 : t.ty === "sr" && (i = 7);
2831
- var a = new Cs(e, s, de.getShapeProp(this, t, i, this));
2832
- return this.shapes.push(a), this.addShapeToModifiers(a), this.addToAnimatedContents(t, a), a;
2833
- }, Z.prototype.addToAnimatedContents = function(t, e) {
2834
- for (var s = 0, i = this.animatedContents.length; s < i; ) {
2835
- if (this.animatedContents[s].element === e) return;
2836
- s += 1;
2837
- }
2838
- this.animatedContents.push({ fn: ia.createRenderFunction(t), element: e, data: t });
2839
- }, Z.prototype.setElementStyles = function(t) {
2840
- var e, s = t.styles, i = this.stylesList.length;
2841
- for (e = 0; e < i; e += 1) this.stylesList[e].closed || s.push(this.stylesList[e]);
2842
- }, Z.prototype.reloadShapes = function() {
2843
- var t;
2844
- this._isFirstFrame = !0;
2845
- var e = this.itemsData.length;
2846
- for (t = 0; t < e; t += 1) this.prevViewData[t] = this.itemsData[t];
2847
- 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();
2848
- this.renderModifiers();
2849
- }, Z.prototype.searchShapes = function(t, e, s, i, a, r, h) {
2850
- var n, m, y, o, d, c, g = [].concat(r), l = t.length - 1, p = [], f = [];
2851
- for (n = l; n >= 0; n -= 1) {
2852
- 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 = !1 : e[n] = this.createStyleElement(t[n], a), t[n]._render && e[n].style.pElem.parentNode !== i && i.appendChild(e[n].style.pElem), p.push(e[n].style);
2853
- else if (t[n].ty === "gr") {
2854
- if (c) for (y = e[n].it.length, m = 0; m < y; m += 1) e[n].prevViewData[m] = e[n].it[m];
2855
- else e[n] = this.createGroupElement(t[n]);
2856
- this.searchShapes(t[n].it, e[n].it, e[n].prevViewData, e[n].gr, a + 1, g, h), t[n]._render && e[n].gr.parentNode !== i && i.appendChild(e[n].gr);
2857
- } else t[n].ty === "tr" ? (c || (e[n] = this.createTransformElement(t[n], i)), o = e[n].transform, g.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], g, 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)), f.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), f.push(d));
2858
- this.addProcessedElement(t[n], n + 1);
2859
- }
2860
- for (l = p.length, n = 0; n < l; n += 1) p[n].closed = !0;
2861
- for (l = f.length, n = 0; n < l; n += 1) f[n].closed = !0;
2862
- }, Z.prototype.renderInnerContent = function() {
2863
- var t;
2864
- this.renderModifiers();
2865
- var e = this.stylesList.length;
2866
- for (t = 0; t < e; t += 1) this.stylesList[t].reset();
2867
- 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"));
2868
- }, Z.prototype.renderShape = function() {
2869
- var t, e, s = this.animatedContents.length;
2870
- 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);
2871
- }, Z.prototype.destroy = function() {
2872
- this.destroyBaseElement(), this.shapesData = null, this.itemsData = null;
2873
- }, xs.prototype.update = function(t, e, s, i, a, r) {
2874
- this._mdf.o = !1, this._mdf.sw = !1, this._mdf.sc = !1, this._mdf.fc = !1, this._mdf.m = !1, this._mdf.p = !1;
2875
- var h = !1;
2876
- 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;
2877
- }, vt.prototype.defaultBoxWidth = [0, 0], vt.prototype.copyData = function(t, e) {
2878
- for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (t[s] = e[s]);
2879
- return t;
2880
- }, vt.prototype.setCurrentData = function(t) {
2881
- t.__complete || this.completeTextData(t), this.currentData = t, this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth, this._mdf = !0;
2882
- }, vt.prototype.searchProperty = function() {
2883
- return this.searchKeyframes();
2884
- }, vt.prototype.searchKeyframes = function() {
2885
- return this.kf = this.data.d.k.length > 1, this.kf && this.addEffect(this.getKeyframeValue.bind(this)), this.kf;
2886
- }, vt.prototype.addEffect = function(t) {
2887
- this.effectsSequence.push(t), this.elem.addDynamicProperty(this);
2888
- }, vt.prototype.getValue = function(t) {
2889
- if (this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length || t) {
2890
- this.currentData.t = this.data.d.k[this.keysIndex].s.t;
2891
- var e = this.currentData, s = this.keysIndex;
2892
- if (this.lock) this.setCurrentData(this.currentData);
2893
- else {
2894
- var i;
2895
- this.lock = !0, this._mdf = !1;
2896
- var a = this.effectsSequence.length, r = t || this.data.d.k[this.keysIndex].s;
2897
- for (i = 0; i < a; i += 1) r = s !== this.keysIndex ? this.effectsSequence[i](r, r.t) : this.effectsSequence[i](this.currentData, r.t);
2898
- e !== r && this.setCurrentData(r), this.v = this.currentData, this.pv = this.v, this.lock = !1, this.frameId = this.elem.globalData.frameId;
2899
- }
2900
- }
2901
- }, vt.prototype.getKeyframeValue = function() {
2902
- 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;
2903
- return this.keysIndex !== s && (this.keysIndex = s), this.data.d.k[this.keysIndex].s;
2904
- }, vt.prototype.buildFinalText = function(t) {
2905
- for (var e, s, i = [], a = 0, r = t.length, h = !1, n = !1, m = ""; a < r; ) h = n, n = !1, e = t.charCodeAt(a), m = t.charAt(a), ne.isCombinedCharacter(e) ? h = !0 : e >= 55296 && e <= 56319 ? ne.isRegionalFlag(t, a) ? m = t.substr(a, 14) : (s = t.charCodeAt(a + 1)) >= 56320 && s <= 57343 && (ne.isModifier(e, s) ? (m = t.substr(a, 2), h = !0) : m = 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] += m, h = !1) : i.push(m), a += m.length;
2906
- return i;
2907
- }, vt.prototype.completeTextData = function(t) {
2908
- t.__complete = !0;
2909
- var e, s, i, a, r, h, n, m = this.elem.globalData.fontManager, y = this.data, o = [], d = 0, c = y.m.g, g = 0, l = 0, p = 0, f = [], u = 0, v = 0, x = m.getFontByName(t.f), C = 0, A = fi(x);
2910
- 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;
2911
- var T, I = t.tr / 1e3 * t.finalSize;
2912
- if (t.sz) for (var k, F, M = !0, _ = t.sz[0], D = t.sz[1]; M; ) {
2913
- k = 0, u = 0, s = (F = this.buildFinalText(t.t)).length, I = t.tr / 1e3 * t.finalSize;
2914
- var w = -1;
2915
- for (e = 0; e < s; e += 1) T = F[e].charCodeAt(0), i = !1, F[e] === " " ? w = e : T !== 13 && T !== 3 || (u = 0, i = !0, k += t.finalLineHeight || 1.2 * t.finalSize), m.chars ? (n = m.getCharData(F[e], x.fStyle, x.fFamily), C = i ? 0 : n.w * t.finalSize / 100) : C = m.measureText(F[e], t.f, t.finalSize), u + C > _ && F[e] !== " " ? (w === -1 ? s += 1 : e = w, k += t.finalLineHeight || 1.2 * t.finalSize, F.splice(e, w === e ? 1 : 0, "\r"), w = -1, u = 0) : (u += C, u += I);
2916
- k += x.ascent * t.finalSize / 100, this.canResize && t.finalSize > this.minimumFontSize && D < k ? (t.finalSize -= 1, t.finalLineHeight = t.finalSize * t.lh / t.s) : (t.finalText = F, s = t.finalText.length, M = !1);
2917
- }
2918
- u = -I, C = 0;
2919
- var P, V = 0;
2920
- for (e = 0; e < s; e += 1) if (i = !1, (T = (P = t.finalText[e]).charCodeAt(0)) === 13 || T === 3 ? (V = 0, f.push(u), v = u > v ? u : v, u = -2 * I, a = "", i = !0, p += 1) : a = P, m.chars ? (n = m.getCharData(P, x.fStyle, m.getFontByName(t.f).fFamily), C = i ? 0 : n.w * t.finalSize / 100) : C = m.measureText(a, t.f, t.finalSize), P === " " ? V += C + I : (u += C + I + V, V = 0), o.push({ l: C, an: C, add: g, n: i, anIndexes: [], val: a, line: p, animatorJustifyOffset: 0 }), c == 2) {
2921
- if (g += C, a === "" || a === " " || e === s - 1) {
2922
- for (a !== "" && a !== " " || (g -= C); l <= e; ) o[l].an = g, o[l].ind = d, o[l].extra = C, l += 1;
2923
- d += 1, g = 0;
2924
- }
2925
- } else if (c == 3) {
2926
- if (g += C, a === "" || e === s - 1) {
2927
- for (a === "" && (g -= C); l <= e; ) o[l].an = g, o[l].ind = d, o[l].extra = C, l += 1;
2928
- g = 0, d += 1;
2929
- }
2930
- } else o[d].ind = d, o[d].extra = 0, d += 1;
2931
- if (t.l = o, v = u > v ? u : v, f.push(u), t.sz) t.boxWidth = t.sz[0], t.justifyOffset = 0;
2932
- else switch (t.boxWidth = v, t.j) {
2933
- case 1:
2934
- t.justifyOffset = -t.boxWidth;
2935
- break;
2936
- case 2:
2937
- t.justifyOffset = -t.boxWidth / 2;
2938
- break;
2939
- default:
2940
- t.justifyOffset = 0;
2941
- }
2942
- t.lineWidths = f;
2943
- var O, B, b, S, L = y.a;
2944
- h = L.length;
2945
- var N = [];
2946
- for (r = 0; r < h; r += 1) {
2947
- 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);
2948
- y.a[r].s.totalChars = S;
2949
- var U, $ = -1;
2950
- 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;
2951
- }
2952
- t.yOffset = t.finalLineHeight || 1.2 * t.finalSize, t.ls = t.ls || 0, t.ascent = x.ascent * t.finalSize / 100;
2953
- }, vt.prototype.updateDocumentData = function(t, e) {
2954
- e = e === void 0 ? this.keysIndex : e;
2955
- var s = this.copyData({}, this.data.d.k[e].s);
2956
- s = this.copyData(s, t), this.data.d.k[e].s = s, this.recalculate(e), this.setCurrentData(s), this.elem.addDynamicProperty(this);
2957
- }, vt.prototype.recalculate = function(t) {
2958
- var e = this.data.d.k[t].s;
2959
- e.__complete = !1, this.keysIndex = 0, this._isFirstFrame = !0, this.getValue(e);
2960
- }, vt.prototype.canResizeFont = function(t) {
2961
- this.canResize = t, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this);
2962
- }, vt.prototype.setMinimumFontSize = function(t) {
2963
- this.minimumFontSize = Math.floor(t) || 1, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this);
2964
- };
2965
- var aa = function() {
2966
- var t = Math.max, e = Math.min, s = Math.floor;
2967
- function i(a, r) {
2968
- 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();
2969
- }
2970
- return i.prototype = { getMult: function(a) {
2971
- this._currentTextLength !== this.elem.textProperty.currentData.l.length && this.getValue();
2972
- var r = 0, h = 0, n = 1, m = 1;
2973
- this.ne.v > 0 ? r = this.ne.v / 100 : h = -this.ne.v / 100, this.xe.v > 0 ? n = 1 - this.xe.v / 100 : m = 1 + this.xe.v / 100;
2974
- var y = ke.getBezierEasing(r, h, n, m).get, o = 0, d = this.finalS, c = this.finalE, g = this.data.sh;
2975
- if (g === 2) o = y(o = c === d ? a >= c ? 1 : 0 : t(0, e(0.5 / (c - d) + (a - d) / (c - d), 1)));
2976
- else if (g === 3) o = y(o = c === d ? a >= c ? 0 : 1 : 1 - t(0, e(0.5 / (c - d) + (a - d) / (c - d), 1)));
2977
- else if (g === 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);
2978
- else if (g === 5) {
2979
- if (c === d) o = 0;
2980
- else {
2981
- var l = c - d, p = -l / 2 + (a = e(t(0, a + 0.5 - d), c - d)), f = l / 2;
2982
- o = Math.sqrt(1 - p * p / (f * f));
2983
- }
2984
- o = y(o);
2985
- } else g === 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));
2986
- if (this.sm.v !== 100) {
2987
- var u = 0.01 * this.sm.v;
2988
- u === 0 && (u = 1e-8);
2989
- var v = 0.5 - 0.5 * u;
2990
- o < v ? o = 0 : (o = (o - v) / u) > 1 && (o = 1);
2991
- }
2992
- return o * this.a.v;
2993
- }, getValue: function(a) {
2994
- 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);
2995
- var r = this.data.r === 2 ? 1 : 100 / this.data.totalChars, h = this.o.v / r, n = this.s.v / r + h, m = this.e.v / r + h;
2996
- if (n > m) {
2997
- var y = n;
2998
- n = m, m = y;
2999
- }
3000
- this.finalS = n, this.finalE = m;
3001
- } }, W([ut], i), { getTextSelectorProp: function(a, r, h) {
3002
- return new i(a, r);
3003
- } };
3004
- }();
3005
- function ra(t, e, s) {
3006
- var i = { propType: !1 }, a = E.getProp, r = e.a;
3007
- 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;
3008
- }
3009
- function he(t, e, s) {
3010
- 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);
3011
- }
3012
- function Dt() {
3013
- }
3014
- he.prototype.searchProperties = function() {
3015
- var t, e, s = this._textData.a.length, i = E.getProp;
3016
- for (t = 0; t < s; t += 1) e = this._textData.a[t], this._animatorsData[t] = new ra(this._elem, e, this);
3017
- 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);
3018
- }, he.prototype.getMeasures = function(t, e) {
3019
- if (this.lettersChangedFlag = e, this._mdf || this._isFirstFrame || e || this._hasMaskedPath && this._pathData.m._mdf) {
3020
- this._isFirstFrame = !1;
3021
- var s, i, a, r, h, n, m, y, o, d, c, g, l, p, f, u, v, x, C, A = this._moreOptions.alignment.v, T = this._animatorsData, I = this._textData, k = this.mHelper, F = this._renderType, M = this.renderedLetters.length, _ = t.l;
3022
- if (this._hasMaskedPath) {
3023
- if (C = this._pathData.m, !this._pathData.n || this._pathData._mdf) {
3024
- var D, w = C.v;
3025
- 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;
3026
- 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;
3027
- }
3028
- if (h = this._pathData.pi, n = this._pathData.f.v, c = 0, d = 1, y = 0, o = !0, p = h.segments, n < 0 && C.v.c) for (h.tLength < Math.abs(n) && (n = -Math.abs(n) % h.tLength), d = (l = p[c = p.length - 1].points).length - 1; n < 0; ) n += l[d].partialLength, (d -= 1) < 0 && (d = (l = p[c -= 1].points).length - 1);
3029
- g = (l = p[c].points)[d - 1], f = (m = l[d]).partialLength;
3030
- }
3031
- r = _.length, s = 0, i = 0;
3032
- var P, V, O, B, b, S = 1.2 * t.finalSize * 0.714, L = !0;
3033
- O = T.length;
3034
- 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;
3035
- if (t.j === 2 || t.j === 1) {
3036
- var ot = 0, St = 0, ee = t.j === 2 ? -0.5 : -1, Et = 0, se = !0;
3037
- for (a = 0; a < r; a += 1) if (_[a].n) {
3038
- for (ot && (ot += St); Et < a; ) _[Et].animatorJustifyOffset = ot, Et += 1;
3039
- ot = 0, se = !0;
3040
- } else {
3041
- for (V = 0; V < O; V += 1) (P = T[V].a).t.propType && (se && t.j === 2 && (St += P.t.v * ee), (b = T[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);
3042
- se = !1;
3043
- }
3044
- for (ot && (ot += St); Et < a; ) _[Et].animatorJustifyOffset = ot, Et += 1;
3045
- }
3046
- for (a = 0; a < r; a += 1) {
3047
- if (k.reset(), Q = 1, _[a].n) s = 0, i += t.yOffset, i += L ? 1 : 0, n = q, L = !1, this._hasMaskedPath && (d = Gt, g = (l = p[c = Ht].points)[d - 1], f = (m = l[d]).partialLength, y = 0), _t = "", rt = "", ct = "", nt = "", kt = this.defaultPropsArray;
3048
- else {
3049
- if (this._hasMaskedPath) {
3050
- if (jt !== _[a].line) {
3051
- switch (t.j) {
3052
- case 1:
3053
- n += u - t.lineWidths[_[a].line];
3054
- break;
3055
- case 2:
3056
- n += (u - t.lineWidths[_[a].line]) / 2;
3057
- }
3058
- jt = _[a].line;
3059
- }
3060
- at !== _[a].ind && (_[at] && (n += _[at].extra), n += _[a].an / 2, at = _[a].ind), n += A[0] * _[a].an * 5e-3;
3061
- var Lt = 0;
3062
- for (V = 0; V < O; V += 1) (P = T[V].a).p.propType && ((b = T[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 = T[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);
3063
- 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 + f >= n + Lt || !l ? (v = (n + Lt - y) / m.partialLength, U = g.point[0] + (m.point[0] - g.point[0]) * v, $ = g.point[1] + (m.point[1] - g.point[1]) * v, k.translate(-A[0] * _[a].an * 5e-3, -A[1] * S * 0.01), o = !1) : l && (y += m.partialLength, (d += 1) >= l.length && (d = 0, p[c += 1] ? l = p[c].points : C.v.c ? (d = 0, l = p[c = 0].points) : (y -= m.partialLength, l = null)), l && (g = m, f = (m = l[d]).partialLength));
3064
- N = _[a].an / 2 - _[a].add, k.translate(-N, 0, 0);
3065
- } else N = _[a].an / 2 - _[a].add, k.translate(-N, 0, 0), k.translate(-A[0] * _[a].an * 5e-3, -A[1] * S * 0.01, 0);
3066
- for (V = 0; V < O; V += 1) (P = T[V].a).t.propType && (b = T[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));
3067
- 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 = T[V].a).a.propType && ((b = T[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? k.translate(-P.a.v[0] * b[0], -P.a.v[1] * b[1], P.a.v[2] * b[2]) : k.translate(-P.a.v[0] * b, -P.a.v[1] * b, P.a.v[2] * b));
3068
- for (V = 0; V < O; V += 1) (P = T[V].a).s.propType && ((b = T[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars)).length ? k.scale(1 + (P.s.v[0] - 1) * b[0], 1 + (P.s.v[1] - 1) * b[1], 1) : k.scale(1 + (P.s.v[0] - 1) * b, 1 + (P.s.v[1] - 1) * b, 1));
3069
- for (V = 0; V < O; V += 1) {
3070
- if (P = T[V].a, b = T[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars), P.sk.propType && (b.length ? k.skewFromAxis(-P.sk.v * b[0], P.sa.v * b[1]) : k.skewFromAxis(-P.sk.v * b, P.sa.v * b)), P.r.propType && (b.length ? k.rotateZ(-P.r.v * b[2]) : k.rotateZ(-P.r.v * b)), P.ry.propType && (b.length ? k.rotateY(P.ry.v * b[1]) : k.rotateY(P.ry.v * b)), P.rx.propType && (b.length ? k.rotateX(P.rx.v * b[0]) : k.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;
3071
- if (t.fillColorAnim && t.fc) {
3072
- 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;
3073
- 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));
3074
- }
3075
- }
3076
- for (V = 0; V < O; V += 1) (P = T[V].a).p.propType && (b = T[V].s.getMult(_[a].anIndexes[V], I.a[V].s.totalChars), this._hasMaskedPath ? b.length ? k.translate(0, P.p.v[1] * b[0], -P.p.v[2] * b[1]) : k.translate(0, P.p.v[1] * b, -P.p.v[2] * b) : b.length ? k.translate(P.p.v[0] * b[0], P.p.v[1] * b[1], -P.p.v[2] * b[2]) : k.translate(P.p.v[0] * b, P.p.v[1] * b, -P.p.v[2] * b));
3077
- 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) {
3078
- if (k.translate(0, -t.ls), k.translate(0, A[1] * S * 0.01 + i, 0), this._pathData.p.v) {
3079
- x = (m.point[1] - g.point[1]) / (m.point[0] - g.point[0]);
3080
- var pe = 180 * Math.atan(x) / Math.PI;
3081
- m.point[0] < g.point[0] && (pe += 180), k.rotate(-pe * Math.PI / 180);
3082
- }
3083
- k.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);
3084
- } else {
3085
- switch (k.translate(s, i, 0), t.ps && k.translate(t.ps[0], t.ps[1] + t.ascent, 0), t.j) {
3086
- case 1:
3087
- k.translate(_[a].animatorJustifyOffset + t.justifyOffset + (t.boxWidth - t.lineWidths[_[a].line]), 0, 0);
3088
- break;
3089
- case 2:
3090
- k.translate(_[a].animatorJustifyOffset + t.justifyOffset + (t.boxWidth - t.lineWidths[_[a].line]) / 2, 0, 0);
3091
- }
3092
- k.translate(0, -t.ls), k.translate(N, 0, 0), k.translate(A[0] * _[a].an * 5e-3, A[1] * S * 0.01, 0), s += _[a].l + 1e-3 * t.tr * t.finalSize;
3093
- }
3094
- F === "html" ? _t = k.toCSS() : F === "svg" ? _t = k.to2dCSS() : kt = [k.props[0], k.props[1], k.props[2], k.props[3], k.props[4], k.props[5], k.props[6], k.props[7], k.props[8], k.props[9], k.props[10], k.props[11], k.props[12], k.props[13], k.props[14], k.props[15]], nt = Q;
3095
- }
3096
- 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);
3097
- }
3098
- }
3099
- }, he.prototype.getValue = function() {
3100
- this._elem.globalData.frameId !== this._frameId && (this._frameId = this._elem.globalData.frameId, this.iterateDynamicProperties());
3101
- }, he.prototype.mHelper = new st(), he.prototype.defaultPropsArray = [], W([ut], he), Dt.prototype.initElement = function(t, e, s) {
3102
- 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);
3103
- }, Dt.prototype.prepareFrame = function(t) {
3104
- this._mdf = !1, this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange);
3105
- }, Dt.prototype.createPathShape = function(t, e) {
3106
- var s, i, a = e.length, r = "";
3107
- for (s = 0; s < a; s += 1) e[s].ty === "sh" && (i = e[s].ks.k, r += xi(i, i.i.length, !0, t));
3108
- return r;
3109
- }, Dt.prototype.updateDocumentData = function(t, e) {
3110
- this.textProperty.updateDocumentData(t, e);
3111
- }, Dt.prototype.canResizeFont = function(t) {
3112
- this.textProperty.canResizeFont(t);
3113
- }, Dt.prototype.setMinimumFontSize = function(t) {
3114
- this.textProperty.setMinimumFontSize(t);
3115
- }, Dt.prototype.applyTextPropertiesToMatrix = function(t, e, s, i, a) {
3116
- switch (t.ps && e.translate(t.ps[0], t.ps[1] + t.ascent, 0), e.translate(0, -t.ls, 0), t.j) {
3117
- case 1:
3118
- e.translate(t.justifyOffset + (t.boxWidth - t.lineWidths[s]), 0, 0);
3119
- break;
3120
- case 2:
3121
- e.translate(t.justifyOffset + (t.boxWidth - t.lineWidths[s]) / 2, 0, 0);
3122
- }
3123
- e.translate(i, a, 0);
3124
- }, Dt.prototype.buildColor = function(t) {
3125
- return "rgb(" + Math.round(255 * t[0]) + "," + Math.round(255 * t[1]) + "," + Math.round(255 * t[2]) + ")";
3126
- }, Dt.prototype.emptyProp = new xs(), Dt.prototype.destroy = function() {
3127
- }, Dt.prototype.validateText = function() {
3128
- (this.textProperty._mdf || this.textProperty._isFirstFrame) && (this.buildNewText(), this.textProperty._isFirstFrame = !1, this.textProperty._mdf = !1);
3129
- };
3130
- var na = { shapes: [] };
3131
- function Xt(t, e, s) {
3132
- this.textSpans = [], this.renderType = "svg", this.initElement(t, e, s);
3133
- }
3134
- function ks(t, e, s) {
3135
- this.initElement(t, e, s);
3136
- }
3137
- function te(t, e, s) {
3138
- this.initFrame(), this.initBaseData(t, e, s), this.initFrame(), this.initTransform(t, e, s), this.initHierarchy();
3139
- }
3140
- function pt() {
3141
- }
3142
- function Bt() {
3143
- }
3144
- function Ie(t, e, s) {
3145
- 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 };
3146
- }
3147
- function Ps(t, e) {
3148
- this.animationItem = t, this.layers = null, this.renderedFrame = -1, this.svgElement = z("svg");
3149
- var s = "";
3150
- if (e && e.title) {
3151
- var i = z("title"), a = Ct();
3152
- i.setAttribute("id", a), i.textContent = e.title, this.svgElement.appendChild(i), s += a;
3153
- }
3154
- if (e && e.description) {
3155
- var r = z("desc"), h = Ct();
3156
- r.setAttribute("id", h), r.textContent = e.description, this.svgElement.appendChild(r), s += " " + h;
3157
- }
3158
- s && this.svgElement.setAttribute("aria-labelledby", s);
3159
- var n = z("defs");
3160
- this.svgElement.appendChild(n);
3161
- var m = z("g");
3162
- this.svgElement.appendChild(m), this.layerElement = m, 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";
3163
- }
3164
- function ki() {
3165
- this.sequences = {}, this.sequenceList = [], this.transform_key_count = 0;
3166
- }
3167
- W([wt, Nt, Ee, qt, Mt, ye, Dt], Xt), Xt.prototype.createContent = function() {
3168
- this.data.singleShape && !this.globalData.fontManager.chars && (this.textContainer = z("text"));
3169
- }, Xt.prototype.buildTextContents = function(t) {
3170
- 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;
3171
- return i.push(a), i;
3172
- }, Xt.prototype.buildShapeData = function(t, e) {
3173
- if (t.shapes && t.shapes.length) {
3174
- var s = t.shapes[0];
3175
- if (s.it) {
3176
- var i = s.it[s.it.length - 1];
3177
- i.s && (i.s.k[0] = e, i.s.k[1] = e);
3178
- }
3179
- }
3180
- return t;
3181
- }, Xt.prototype.buildNewText = function() {
3182
- var t, e;
3183
- this.addDynamicProperty(this);
3184
- var s = this.textProperty.currentData;
3185
- 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);
3186
- var i = this.globalData.fontManager.getFontByName(s.f);
3187
- if (i.fClass) this.layerElement.setAttribute("class", i.fClass);
3188
- else {
3189
- this.layerElement.setAttribute("font-family", i.fFamily);
3190
- var a = s.fWeight, r = s.fStyle;
3191
- this.layerElement.setAttribute("font-style", r), this.layerElement.setAttribute("font-weight", a);
3192
- }
3193
- this.layerElement.setAttribute("aria-label", s.t);
3194
- var h, n = s.l || [], m = !!this.globalData.fontManager.chars;
3195
- e = n.length;
3196
- var y = this.mHelper, o = this.data.singleShape, d = 0, c = 0, g = !0, l = 1e-3 * s.tr * s.finalSize;
3197
- if (!o || m || s.sz) {
3198
- var p, f = this.textSpans.length;
3199
- for (t = 0; t < e; t += 1) {
3200
- if (this.textSpans[t] || (this.textSpans[t] = { span: null, childSpan: null, glyph: null }), !m || !o || t === 0) {
3201
- if (h = f > t ? this.textSpans[t].span : z(m ? "g" : "text"), f <= t) {
3202
- if (h.setAttribute("stroke-linecap", "butt"), h.setAttribute("stroke-linejoin", "round"), h.setAttribute("stroke-miterlimit", "4"), this.textSpans[t].span = h, m) {
3203
- var u = z("g");
3204
- h.appendChild(u), this.textSpans[t].childSpan = u;
3205
- }
3206
- this.textSpans[t].span = h, this.layerElement.appendChild(h);
3207
- }
3208
- h.style.display = "inherit";
3209
- }
3210
- if (y.reset(), o && (n[t].n && (d = -l, c += s.yOffset, c += g ? 1 : 0, g = !1), this.applyTextPropertiesToMatrix(s, y, n[t].line, d, c), d += n[t].l || 0, d += l), m) {
3211
- var v;
3212
- if ((p = this.globalData.fontManager.getCharData(s.finalText[t], i.fStyle, this.globalData.fontManager.getFontByName(s.f).fFamily)).t === 1) v = new Ie(p.data, this.globalData, this);
3213
- else {
3214
- var x = na;
3215
- p.data && p.data.shapes && (x = this.buildShapeData(p.data, s.finalSize)), v = new Z(x, this.globalData, this);
3216
- }
3217
- if (this.textSpans[t].glyph) {
3218
- var C = this.textSpans[t].glyph;
3219
- this.textSpans[t].childSpan.removeChild(C.layerElement), C.destroy();
3220
- }
3221
- this.textSpans[t].glyph = v, v._debug = !0, v.prepareFrame(0), v.renderFrame(), this.textSpans[t].childSpan.appendChild(v.layerElement), p.t === 1 && this.textSpans[t].childSpan.setAttribute("transform", "scale(" + s.finalSize / 100 + "," + s.finalSize / 100 + ")");
3222
- } 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");
3223
- }
3224
- o && h && h.setAttribute("d", "");
3225
- } else {
3226
- var A = this.textContainer, T = "start";
3227
- switch (s.j) {
3228
- case 1:
3229
- T = "end";
3230
- break;
3231
- case 2:
3232
- T = "middle";
3233
- break;
3234
- default:
3235
- T = "start";
3236
- }
3237
- A.setAttribute("text-anchor", T), A.setAttribute("letter-spacing", l);
3238
- var I = this.buildTextContents(s.finalText);
3239
- 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;
3240
- this.layerElement.appendChild(A);
3241
- }
3242
- for (; t < this.textSpans.length; ) this.textSpans[t].span.style.display = "none", t += 1;
3243
- this._sizeChanged = !0;
3244
- }, Xt.prototype.sourceRectAtTime = function() {
3245
- if (this.prepareFrame(this.comp.renderedFrame - this.data.st), this.renderInnerContent(), this._sizeChanged) {
3246
- this._sizeChanged = !1;
3247
- var t = this.layerElement.getBBox();
3248
- this.bbox = { top: t.y, left: t.x, width: t.width, height: t.height };
3249
- }
3250
- return this.bbox;
3251
- }, Xt.prototype.getValue = function() {
3252
- var t, e, s = this.textSpans.length;
3253
- 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));
3254
- }, Xt.prototype.renderInnerContent = function() {
3255
- if (this.validateText(), (!this.data.singleShape || this._mdf) && (this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag)) {
3256
- var t, e;
3257
- this._sizeChanged = !0;
3258
- var s, i, a, r = this.textAnimator.renderedLetters, h = this.textProperty.currentData.l;
3259
- 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));
3260
- }
3261
- }, W([oe], ks), ks.prototype.createContent = function() {
3262
- var t = z("rect");
3263
- t.setAttribute("width", this.data.sw), t.setAttribute("height", this.data.sh), t.setAttribute("fill", this.data.sc), this.layerElement.appendChild(t);
3264
- }, te.prototype.prepareFrame = function(t) {
3265
- this.prepareProperties(t, !0);
3266
- }, te.prototype.renderFrame = function() {
3267
- }, te.prototype.getBaseElement = function() {
3268
- return null;
3269
- }, te.prototype.destroy = function() {
3270
- }, te.prototype.sourceRectAtTime = function() {
3271
- }, te.prototype.hide = function() {
3272
- }, W([wt, Nt, qt, Mt], te), W([mt], pt), pt.prototype.createNull = function(t) {
3273
- return new te(t, this.globalData, this);
3274
- }, pt.prototype.createShape = function(t) {
3275
- return new Z(t, this.globalData, this);
3276
- }, pt.prototype.createText = function(t) {
3277
- return new Xt(t, this.globalData, this);
3278
- }, pt.prototype.createImage = function(t) {
3279
- return new oe(t, this.globalData, this);
3280
- }, pt.prototype.createSolid = function(t) {
3281
- return new ks(t, this.globalData, this);
3282
- }, pt.prototype.configAnimation = function(t) {
3283
- 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);
3284
- var e = this.globalData.defs;
3285
- this.setupGlobalData(t, e), this.globalData.progressiveLoad = this.renderConfig.progressiveLoad, this.data = t;
3286
- var s = z("clipPath"), i = z("rect");
3287
- i.setAttribute("width", t.w), i.setAttribute("height", t.h), i.setAttribute("x", 0), i.setAttribute("y", 0);
3288
- var a = Ct();
3289
- 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);
3290
- }, pt.prototype.destroy = function() {
3291
- var t;
3292
- this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), this.layerElement = null, this.globalData.defs = null;
3293
- var e = this.layers ? this.layers.length : 0;
3294
- for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy && this.elements[t].destroy();
3295
- this.elements.length = 0, this.destroyed = !0, this.animationItem = null;
3296
- }, pt.prototype.updateContainerSize = function() {
3297
- }, pt.prototype.findIndexByInd = function(t) {
3298
- var e = 0, s = this.layers.length;
3299
- for (e = 0; e < s; e += 1) if (this.layers[e].ind === t) return e;
3300
- return -1;
3301
- }, pt.prototype.buildItem = function(t) {
3302
- var e = this.elements;
3303
- if (!e[t] && this.layers[t].ty !== 99) {
3304
- e[t] = !0;
3305
- var s = this.createItem(this.layers[t]);
3306
- 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) {
3307
- var i = "tp" in this.layers[t] ? this.findIndexByInd(this.layers[t].tp) : t - 1;
3308
- if (i === -1) return;
3309
- if (this.elements[i] && this.elements[i] !== !0) {
3310
- var a = e[i].getMatte(this.layers[t].tt);
3311
- s.setMatte(a);
3312
- } else this.buildItem(i), this.addPendingElement(s);
3313
- }
3314
- }
3315
- }, pt.prototype.checkPendingElements = function() {
3316
- for (; this.pendingElements.length; ) {
3317
- var t = this.pendingElements.pop();
3318
- if (t.checkParenting(), t.data.tt) for (var e = 0, s = this.elements.length; e < s; ) {
3319
- if (this.elements[e] === t) {
3320
- var i = "tp" in t.data ? this.findIndexByInd(t.data.tp) : e - 1, a = this.elements[i].getMatte(this.layers[e].tt);
3321
- t.setMatte(a);
3322
- break;
3323
- }
3324
- e += 1;
3325
- }
3326
- }
3327
- }, pt.prototype.renderFrame = function(t) {
3328
- if (this.renderedFrame !== t && !this.destroyed) {
3329
- var e;
3330
- 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;
3331
- var s = this.layers.length;
3332
- 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);
3333
- if (this.globalData._mdf) for (e = 0; e < s; e += 1) (this.completeLayers || this.elements[e]) && this.elements[e].renderFrame();
3334
- }
3335
- }, pt.prototype.appendElementInPos = function(t, e) {
3336
- var s = t.getBaseElement();
3337
- if (s) {
3338
- 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;
3339
- i ? this.layerElement.insertBefore(s, i) : this.layerElement.appendChild(s);
3340
- }
3341
- }, pt.prototype.hide = function() {
3342
- this.layerElement.style.display = "none";
3343
- }, pt.prototype.show = function() {
3344
- this.layerElement.style.display = "block";
3345
- }, W([wt, Nt, qt, Mt, ye], Bt), Bt.prototype.initElement = function(t, e, s) {
3346
- 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();
3347
- }, Bt.prototype.prepareFrame = function(t) {
3348
- if (this._mdf = !1, this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange), this.isInRange || this.data.xt) {
3349
- if (this.tm._placeholder) this.renderedFrame = t / this.data.sr;
3350
- else {
3351
- var e = this.tm.v;
3352
- e === this.data.op && (e = this.data.op - 1), this.renderedFrame = e;
3353
- }
3354
- var s, i = this.elements.length;
3355
- 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));
3356
- }
3357
- }, Bt.prototype.renderInnerContent = function() {
3358
- var t, e = this.layers.length;
3359
- for (t = 0; t < e; t += 1) (this.completeLayers || this.elements[t]) && this.elements[t].renderFrame();
3360
- }, Bt.prototype.setElements = function(t) {
3361
- this.elements = t;
3362
- }, Bt.prototype.getElements = function() {
3363
- return this.elements;
3364
- }, Bt.prototype.destroyElements = function() {
3365
- var t, e = this.layers.length;
3366
- for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy();
3367
- }, Bt.prototype.destroy = function() {
3368
- this.destroyElements(), this.destroyBaseElement();
3369
- }, W([pt, Bt, Ee], Ie), Ie.prototype.createComp = function(t) {
3370
- return new Ie(t, this.globalData, this);
3371
- }, W([pt], Ps), Ps.prototype.createComp = function(t) {
3372
- return new Ie(t, this.globalData, this);
3373
- }, ki.prototype = { addTransformSequence: function(t) {
3374
- var e, s = t.length, i = "_";
3375
- for (e = 0; e < s; e += 1) i += t[e].transform.key + "_";
3376
- var a = this.sequences[i];
3377
- return a || (a = { transforms: [].concat(t), finalTransform: new st(), _mdf: !1 }, this.sequences[i] = a, this.sequenceList.push(a)), a;
3378
- }, processSequence: function(t, e) {
3379
- for (var s = 0, i = t.transforms.length, a = e; s < i && !e; ) {
3380
- if (t.transforms[s].transform.mProps._mdf) {
3381
- a = !0;
3382
- break;
3383
- }
3384
- s += 1;
3385
- }
3386
- if (a) for (t.finalTransform.reset(), s = i - 1; s >= 0; s -= 1) t.finalTransform.multiply(t.transforms[s].transform.mProps.v);
3387
- t._mdf = a;
3388
- }, processSequences: function(t) {
3389
- var e, s = this.sequenceList.length;
3390
- for (e = 0; e < s; e += 1) this.processSequence(this.sequenceList[e], t);
3391
- }, getNewKey: function() {
3392
- return this.transform_key_count += 1, "_" + this.transform_key_count;
3393
- } };
3394
- var Pi = function() {
3395
- var t = "__lottie_element_luma_buffer", e = null, s = null, i = null;
3396
- function a() {
3397
- var r, h, n;
3398
- 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));
3399
- }
3400
- return { load: a, get: function(r) {
3401
- return e || a(), e.width = r.width, e.height = r.height, s.filter = "url(#" + t + ")", e;
3402
- } };
3403
- };
3404
- function oa(t, e) {
3405
- if (Ze.offscreenCanvas) return new OffscreenCanvas(t, e);
3406
- var s = Pt("canvas");
3407
- return s.width = t, s.height = e, s;
3408
- }
3409
- var $e = { loadLumaCanvas: Pi.load, getLumaCanvas: Pi.get, createCanvas: oa }, Di = {};
3410
- function Ds(t) {
3411
- var e, s, i = t.data.ef ? t.data.ef.length : 0;
3412
- for (this.filters = [], e = 0; e < i; e += 1) {
3413
- s = null;
3414
- var a = t.data.ef[e].ty;
3415
- Di[a] && (s = new Di[a].effect(t.effectsManager.effectElements[e], t)), s && this.filters.push(s);
3416
- }
3417
- this.filters.length && t.addRenderableComponent(this);
3418
- }
3419
- function Qe(t, e) {
3420
- var s;
3421
- this.data = t, this.element = e, this.masksProperties = this.data.masksProperties || [], this.viewData = K(this.masksProperties.length);
3422
- var i = this.masksProperties.length, a = !1;
3423
- 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);
3424
- this.hasMasks = a, a && this.element.addRenderableComponent(this);
3425
- }
3426
- function Wt() {
3427
- }
3428
- Ds.prototype.renderFrame = function(t) {
3429
- var e, s = this.filters.length;
3430
- for (e = 0; e < s; e += 1) this.filters[e].renderFrame(t);
3431
- }, Ds.prototype.getEffects = function(t) {
3432
- var e, s = this.filters.length, i = [];
3433
- for (e = 0; e < s; e += 1) this.filters[e].type === t && i.push(this.filters[e]);
3434
- return i;
3435
- }, Qe.prototype.renderFrame = function() {
3436
- if (this.hasMasks) {
3437
- var t, e, s, i, a = this.element.finalTransform.mat, r = this.element.canvasContext, h = this.masksProperties.length;
3438
- for (r.beginPath(), t = 0; t < h; t += 1) if (this.masksProperties[t].mode !== "n") {
3439
- var n;
3440
- 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]);
3441
- var m = i._length;
3442
- for (n = 1; n < m; 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]);
3443
- 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]);
3444
- }
3445
- this.element.globalData.renderer.save(!0), r.clip();
3446
- }
3447
- }, Qe.prototype.getMaskProperty = Qt.prototype.getMaskProperty, Qe.prototype.destroy = function() {
3448
- this.element = null;
3449
- };
3450
- var Si, ha = { 1: "source-in", 2: "source-out", 3: "source-in", 4: "source-out" };
3451
- function Ai(t, e, s, i) {
3452
- this.styledShapes = [], this.tr = [0, 0, 0, 0, 0, 0];
3453
- var a, r = 4;
3454
- e.ty === "rc" ? r = 5 : e.ty === "el" ? r = 6 : e.ty === "sr" && (r = 7), this.sh = de.getShapeProp(t, e, r, t);
3455
- var h, n = s.length;
3456
- 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));
3457
- }
3458
- function G(t, e, s) {
3459
- 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);
3460
- }
3461
- function Ve(t, e, s) {
3462
- 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);
3463
- }
3464
- function le(t, e, s) {
3465
- this.assetData = e.getAssetData(t.refId), this.img = e.imageLoader.getAsset(this.assetData), this.initElement(t, e, s);
3466
- }
3467
- function Re(t, e, s) {
3468
- this.initElement(t, e, s);
3469
- }
3470
- function X() {
3471
- }
3472
- function wi() {
3473
- this.opacity = -1, this.transform = ht("float32", 16), this.fillStyle = "", this.strokeStyle = "", this.lineWidth = "", this.lineCap = "", this.lineJoin = "", this.miterLimit = "", this.id = Math.random();
3474
- }
3475
- function ft() {
3476
- var t;
3477
- for (this.stack = [], this.cArrPos = 0, this.cTr = new st(), t = 0; t < 15; t += 1) {
3478
- var e = new wi();
3479
- this.stack[t] = e;
3480
- }
3481
- 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 = "";
3482
- }
3483
- function _e(t, e, s) {
3484
- 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 };
3485
- }
3486
- function Ss(t, e) {
3487
- 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));
3488
- }
3489
- return Wt.prototype = { createElements: function() {
3490
- }, initRendererElement: function() {
3491
- }, createContainerElements: function() {
3492
- if (this.data.tt >= 1) {
3493
- this.buffers = [];
3494
- var t = this.globalData.canvasContext, e = $e.createCanvas(t.canvas.width, t.canvas.height);
3495
- this.buffers.push(e);
3496
- var s = $e.createCanvas(t.canvas.width, t.canvas.height);
3497
- this.buffers.push(s), this.data.tt >= 3 && !document._isProxy && $e.loadLumaCanvas();
3498
- }
3499
- this.canvasContext = this.globalData.canvasContext, this.transformCanvas = this.globalData.transformCanvas, this.renderableEffectsManager = new Ds(this), this.searchEffectTransforms();
3500
- }, createContent: function() {
3501
- }, setBlendMode: function() {
3502
- var t = this.globalData;
3503
- if (t.blendMode !== this.data.bm) {
3504
- t.blendMode = this.data.bm;
3505
- var e = Ue(this.data.bm);
3506
- t.canvasContext.globalCompositeOperation = e;
3507
- }
3508
- }, createRenderableComponents: function() {
3509
- this.maskManager = new Qe(this.data, this), this.transformEffects = this.renderableEffectsManager.getEffects(mi);
3510
- }, hideElement: function() {
3511
- this.hidden || this.isInRange && !this.isTransparent || (this.hidden = !0);
3512
- }, showElement: function() {
3513
- this.isInRange && !this.isTransparent && (this.hidden = !1, this._isFirstFrame = !0, this.maskManager._isFirstFrame = !0);
3514
- }, clearCanvas: function(t) {
3515
- t.clearRect(this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy);
3516
- }, prepareLayer: function() {
3517
- if (this.data.tt >= 1) {
3518
- var t = this.buffers[0].getContext("2d");
3519
- 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);
3520
- }
3521
- }, exitLayer: function() {
3522
- if (this.data.tt >= 1) {
3523
- var t = this.buffers[1], e = t.getContext("2d");
3524
- 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) {
3525
- var s = $e.getLumaCanvas(this.canvasContext.canvas);
3526
- s.getContext("2d").drawImage(this.canvasContext.canvas, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.drawImage(s, 0, 0);
3527
- }
3528
- 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";
3529
- }
3530
- }, renderFrame: function(t) {
3531
- if (!this.hidden && !this.data.hd && (this.data.td !== 1 || t)) {
3532
- this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.setBlendMode();
3533
- var e = this.data.ty === 0;
3534
- 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);
3535
- }
3536
- }, destroy: function() {
3537
- this.canvasContext = null, this.data = null, this.globalData = null, this.maskManager.destroy();
3538
- }, 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() {
3539
- this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, !0, []);
3540
- }, G.prototype.createStyleElement = function(t, e) {
3541
- var s = { data: t, type: t.ty, preTransforms: this.transformsManager.addTransformSequence(e), transforms: [], elements: [], closed: t.hd === !0 }, i = {};
3542
- 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") {
3543
- 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) {
3544
- var a = new Le(this, t.d, "canvas", this);
3545
- i.d = a, i.d.k || (s.da = i.d.dashArray, s.do = i.d.dashoffset[0]);
3546
- }
3547
- } else s.r = t.r === 2 ? "evenodd" : "nonzero";
3548
- return this.stylesList.push(s), i.style = s, i;
3549
- }, G.prototype.createGroupElement = function() {
3550
- return { it: [], prevViewData: [] };
3551
- }, G.prototype.createTransformElement = function(t) {
3552
- 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) } };
3553
- }, G.prototype.createShapeElement = function(t) {
3554
- var e = new Ai(this, t, this.stylesList, this.transformsManager);
3555
- return this.shapes.push(e), this.addShapeToModifiers(e), e;
3556
- }, G.prototype.reloadShapes = function() {
3557
- var t;
3558
- this._isFirstFrame = !0;
3559
- var e = this.itemsData.length;
3560
- for (t = 0; t < e; t += 1) this.prevViewData[t] = this.itemsData[t];
3561
- for (this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, !0, []), e = this.dynamicProperties.length, t = 0; t < e; t += 1) this.dynamicProperties[t].getValue();
3562
- this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame);
3563
- }, G.prototype.addTransformToStyleList = function(t) {
3564
- var e, s = this.stylesList.length;
3565
- for (e = 0; e < s; e += 1) this.stylesList[e].closed || this.stylesList[e].transforms.push(t);
3566
- }, G.prototype.removeTransformFromStyleList = function() {
3567
- var t, e = this.stylesList.length;
3568
- for (t = 0; t < e; t += 1) this.stylesList[t].closed || this.stylesList[t].transforms.pop();
3569
- }, G.prototype.closeStyles = function(t) {
3570
- var e, s = t.length;
3571
- for (e = 0; e < s; e += 1) t[e].closed = !0;
3572
- }, G.prototype.searchShapes = function(t, e, s, i, a) {
3573
- var r, h, n, m, y, o, d = t.length - 1, c = [], g = [], l = [].concat(a);
3574
- for (r = d; r >= 0; r -= 1) {
3575
- if ((m = this.searchProcessedElement(t[r])) ? e[r] = s[m - 1] : t[r]._shouldRender = i, t[r].ty === "fl" || t[r].ty === "st" || t[r].ty === "gf" || t[r].ty === "gs") m ? e[r].style.closed = !1 : e[r] = this.createStyleElement(t[r], l), c.push(e[r].style);
3576
- else if (t[r].ty === "gr") {
3577
- if (m) for (n = e[r].it.length, h = 0; h < n; h += 1) e[r].prevViewData[h] = e[r].it[h];
3578
- else e[r] = this.createGroupElement(t[r]);
3579
- this.searchShapes(t[r].it, e[r].it, e[r].prevViewData, i, l);
3580
- } else t[r].ty === "tr" ? (m || (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" ? m || (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" ? (m ? (y = e[r]).closed = !1 : ((y = zt.getModifier(t[r].ty)).init(this, t[r]), e[r] = y, this.shapeModifiers.push(y)), g.push(y)) : t[r].ty === "rp" && (m ? (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), g.push(y));
3581
- this.addProcessedElement(t[r], r + 1);
3582
- }
3583
- for (this.removeTransformFromStyleList(), this.closeStyles(c), d = g.length, r = 0; r < d; r += 1) g[r].closed = !0;
3584
- }, G.prototype.renderInnerContent = function() {
3585
- this.transformHelper.opacity = 1, this.transformHelper._opMdf = !1, this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame), this.renderShape(this.transformHelper, this.shapesData, this.itemsData, !0);
3586
- }, G.prototype.renderShapeTransform = function(t, e) {
3587
- (t._opMdf || e.op._mdf || this._isFirstFrame) && (e.opacity = t.opacity, e.opacity *= e.op.v, e._opMdf = !0);
3588
- }, G.prototype.drawLayer = function() {
3589
- var t, e, s, i, a, r, h, n, m, y = this.stylesList.length, o = this.globalData.renderer, d = this.globalData.canvasContext;
3590
- for (t = 0; t < y; t += 1) if (((n = (m = this.stylesList[t]).type) !== "st" && n !== "gs" || m.wi !== 0) && m.data._shouldRender && m.coOp !== 0 && this.globalData.currentGlobalAlpha !== 0) {
3591
- for (o.save(), r = m.elements, n === "st" || n === "gs" ? (o.ctxStrokeStyle(n === "st" ? m.co : m.grd), o.ctxLineWidth(m.wi), o.ctxLineCap(m.lc), o.ctxLineJoin(m.lj), o.ctxMiterLimit(m.ml || 0)) : o.ctxFillStyle(n === "fl" ? m.co : m.grd), o.ctxOpacity(m.coOp), n !== "st" && n !== "gs" && d.beginPath(), o.ctxTransform(m.preTransforms.finalTransform.props), s = r.length, e = 0; e < s; e += 1) {
3592
- for (n !== "st" && n !== "gs" || (d.beginPath(), m.da && (d.setLineDash(m.da), d.lineDashOffset = m.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();
3593
- n !== "st" && n !== "gs" || (o.ctxStroke(), m.da && d.setLineDash(this.dashResetter));
3594
- }
3595
- n !== "st" && n !== "gs" && this.globalData.renderer.ctxFill(m.r), o.restore();
3596
- }
3597
- }, G.prototype.renderShape = function(t, e, s, i) {
3598
- var a, r;
3599
- 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;
3600
- i && this.drawLayer();
3601
- }, G.prototype.renderStyledShape = function(t, e) {
3602
- if (this._isFirstFrame || e._mdf || t.transforms._mdf) {
3603
- var s, i, a, r = t.trNodes, h = e.paths, n = h._length;
3604
- r.length = 0;
3605
- var m = t.transforms.finalTransform;
3606
- for (a = 0; a < n; a += 1) {
3607
- var y = h.shapes[a];
3608
- if (y && y.v) {
3609
- for (i = y._length, s = 1; s < i; s += 1) s === 1 && r.push({ t: "m", p: m.applyToPointArray(y.v[0][0], y.v[0][1], 0) }), r.push({ t: "c", pts: m.applyToTriplePoints(y.o[s - 1], y.i[s], y.v[s]) });
3610
- i === 1 && r.push({ t: "m", p: m.applyToPointArray(y.v[0][0], y.v[0][1], 0) }), y.c && i && (r.push({ t: "c", pts: m.applyToTriplePoints(y.o[s - 1], y.i[0], y.v[0]) }), r.push({ t: "z" }));
3611
- }
3612
- }
3613
- t.trNodes = r;
3614
- }
3615
- }, G.prototype.renderPath = function(t, e) {
3616
- if (t.hd !== !0 && t._shouldRender) {
3617
- var s, i = e.styledShapes.length;
3618
- for (s = 0; s < i; s += 1) this.renderStyledShape(e.styledShapes[s], e.sh);
3619
- }
3620
- }, G.prototype.renderFill = function(t, e, s) {
3621
- var i = e.style;
3622
- (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);
3623
- }, G.prototype.renderGradientFill = function(t, e, s) {
3624
- var i, a = e.style;
3625
- if (!a.grd || e.g._mdf || e.s._mdf || e.e._mdf || t.t !== 1 && (e.h._mdf || e.a._mdf)) {
3626
- var r, h = this.globalData.canvasContext, n = e.s.v, m = e.e.v;
3627
- if (t.t === 1) i = h.createLinearGradient(n[0], n[1], m[0], m[1]);
3628
- else {
3629
- var y = Math.sqrt(Math.pow(n[0] - m[0], 2) + Math.pow(n[1] - m[1], 2)), o = Math.atan2(m[1] - n[1], m[0] - n[0]), d = e.h.v;
3630
- d >= 1 ? d = 0.99 : d <= -1 && (d = -0.99);
3631
- var c = y * d, g = Math.cos(o + e.a.v) * c + n[0], l = Math.sin(o + e.a.v) * c + n[1];
3632
- i = h.createRadialGradient(g, l, 0, n[0], n[1], y);
3633
- }
3634
- var p = t.g.p, f = e.g.c, u = 1;
3635
- for (r = 0; r < p; r += 1) e.g._hasOpacity && e.g._collapsable && (u = e.g.o[2 * r + 1]), i.addColorStop(f[4 * r] / 100, "rgba(" + f[4 * r + 1] + "," + f[4 * r + 2] + "," + f[4 * r + 3] + "," + u + ")");
3636
- a.grd = i;
3637
- }
3638
- a.coOp = e.o.v * s.opacity;
3639
- }, G.prototype.renderStroke = function(t, e, s) {
3640
- var i = e.style, a = e.d;
3641
- 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);
3642
- }, G.prototype.destroy = function() {
3643
- this.shapesData = null, this.globalData = null, this.canvasContext = null, this.stylesList.length = 0, this.itemsData.length = 0;
3644
- }, W([wt, Nt, Wt, qt, Mt, Zt, Dt], Ve), Ve.prototype.tHelper = Pt("canvas").getContext("2d"), Ve.prototype.buildNewText = function() {
3645
- var t = this.textProperty.currentData;
3646
- this.renderedLetters = K(t.l ? t.l.length : 0);
3647
- var e = !1;
3648
- t.fc ? (e = !0, this.values.fill = this.buildColor(t.fc)) : this.values.fill = "rgba(0,0,0,0)", this.fill = e;
3649
- var s = !1;
3650
- t.sc && (s = !0, this.values.stroke = this.buildColor(t.sc), this.values.sWidth = t.sw);
3651
- var i, a, r, h, n, m, y, o, d, c, g, l, p = this.globalData.fontManager.getFontByName(t.f), f = t.l, u = this.mHelper;
3652
- this.stroke = s, this.values.fValue = t.finalSize + "px " + this.globalData.fontManager.getFontByName(t.f).fFamily, a = t.finalText.length;
3653
- var v = this.data.singleShape, x = 1e-3 * t.tr * t.finalSize, C = 0, A = 0, T = !0, I = 0;
3654
- for (i = 0; i < a; i += 1) {
3655
- h = (r = this.globalData.fontManager.getCharData(t.finalText[i], p.fStyle, this.globalData.fontManager.getFontByName(t.f).fFamily)) && r.data || {}, u.reset(), v && f[i].n && (C = -x, A += t.yOffset, A += T ? 1 : 0, T = !1), d = (y = h.shapes ? h.shapes[0].it : []).length, u.scale(t.finalSize / 100, t.finalSize / 100), v && this.applyTextPropertiesToMatrix(t, u, f[i].line, C, A), g = K(d - 1);
3656
- var k = 0;
3657
- for (o = 0; o < d; o += 1) if (y[o].ty === "sh") {
3658
- for (m = y[o].ks.k.i.length, c = y[o].ks.k, l = [], n = 1; n < m; 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));
3659
- 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)), g[k] = l, k += 1;
3660
- }
3661
- v && (C += f[i].l, C += x), this.textSpans[I] ? this.textSpans[I].elem = g : this.textSpans[I] = { elem: g }, I += 1;
3662
- }
3663
- }, Ve.prototype.renderInnerContent = function() {
3664
- var t, e, s, i, a, r;
3665
- 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);
3666
- var h, n = this.textAnimator.renderedLetters, m = this.textProperty.currentData.l;
3667
- e = m.length;
3668
- var y, o, d = null, c = null, g = null, l = this.globalData.renderer;
3669
- for (t = 0; t < e; t += 1) if (!m[t].n) {
3670
- if ((h = n[t]) && (l.save(), l.ctxTransform(h.p), l.ctxOpacity(h.o)), this.fill) {
3671
- 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]);
3672
- this.globalData.canvasContext.closePath(), l.ctxFill();
3673
- }
3674
- if (this.stroke) {
3675
- for (h && h.sw ? g !== h.sw && (g = h.sw, l.ctxLineWidth(h.sw)) : g !== this.values.sWidth && (g = 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]);
3676
- this.globalData.canvasContext.closePath(), l.ctxStroke();
3677
- }
3678
- h && this.globalData.renderer.restore();
3679
- }
3680
- }, W([wt, Nt, Wt, qt, Mt, Zt], le), le.prototype.initElement = Z.prototype.initElement, le.prototype.prepareFrame = oe.prototype.prepareFrame, le.prototype.createContent = function() {
3681
- if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
3682
- var t = Pt("canvas");
3683
- t.width = this.assetData.w, t.height = this.assetData.h;
3684
- 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, m = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
3685
- h > n && m === "xMidYMid slice" || h < n && m !== "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;
3686
- }
3687
- }, le.prototype.renderInnerContent = function() {
3688
- this.canvasContext.drawImage(this.img, 0, 0);
3689
- }, le.prototype.destroy = function() {
3690
- this.img = null;
3691
- }, W([wt, Nt, Wt, qt, Mt, Zt], Re), Re.prototype.initElement = Z.prototype.initElement, Re.prototype.prepareFrame = oe.prototype.prepareFrame, Re.prototype.renderInnerContent = function() {
3692
- this.globalData.renderer.ctxFillStyle(this.data.sc), this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh);
3693
- }, W([mt], X), X.prototype.createShape = function(t) {
3694
- return new G(t, this.globalData, this);
3695
- }, X.prototype.createText = function(t) {
3696
- return new Ve(t, this.globalData, this);
3697
- }, X.prototype.createImage = function(t) {
3698
- return new le(t, this.globalData, this);
3699
- }, X.prototype.createSolid = function(t) {
3700
- return new Re(t, this.globalData, this);
3701
- }, X.prototype.createNull = Ps.prototype.createNull, X.prototype.ctxTransform = function(t) {
3702
- 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]);
3703
- }, X.prototype.ctxOpacity = function(t) {
3704
- this.canvasContext.globalAlpha *= t < 0 ? 0 : t;
3705
- }, X.prototype.ctxFillStyle = function(t) {
3706
- this.canvasContext.fillStyle = t;
3707
- }, X.prototype.ctxStrokeStyle = function(t) {
3708
- this.canvasContext.strokeStyle = t;
3709
- }, X.prototype.ctxLineWidth = function(t) {
3710
- this.canvasContext.lineWidth = t;
3711
- }, X.prototype.ctxLineCap = function(t) {
3712
- this.canvasContext.lineCap = t;
3713
- }, X.prototype.ctxLineJoin = function(t) {
3714
- this.canvasContext.lineJoin = t;
3715
- }, X.prototype.ctxMiterLimit = function(t) {
3716
- this.canvasContext.miterLimit = t;
3717
- }, X.prototype.ctxFill = function(t) {
3718
- this.canvasContext.fill(t);
3719
- }, X.prototype.ctxFillRect = function(t, e, s, i) {
3720
- this.canvasContext.fillRect(t, e, s, i);
3721
- }, X.prototype.ctxStroke = function() {
3722
- this.canvasContext.stroke();
3723
- }, X.prototype.reset = function() {
3724
- this.renderConfig.clearCanvas ? this.contextData.reset() : this.canvasContext.restore();
3725
- }, X.prototype.save = function() {
3726
- this.canvasContext.save();
3727
- }, X.prototype.restore = function(t) {
3728
- this.renderConfig.clearCanvas ? (t && (this.globalData.blendMode = "source-over"), this.contextData.restore(t)) : this.canvasContext.restore();
3729
- }, X.prototype.configAnimation = function(t) {
3730
- if (this.animationItem.wrapper) {
3731
- this.animationItem.container = Pt("canvas");
3732
- var e = this.animationItem.container.style;
3733
- e.width = "100%", e.height = "100%";
3734
- var s = "0px 0px 0px";
3735
- 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);
3736
- } else this.canvasContext = this.renderConfig.context;
3737
- 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();
3738
- }, X.prototype.updateContainerSize = function(t, e) {
3739
- var s, i, a, r;
3740
- 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) {
3741
- var h = this.renderConfig.preserveAspectRatio.split(" "), n = h[1] || "meet", m = h[0] || "xMidYMid", y = m.substr(0, 4), o = m.substr(4);
3742
- 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;
3743
- } 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);
3744
- 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);
3745
- }, X.prototype.destroy = function() {
3746
- var t;
3747
- 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();
3748
- this.elements.length = 0, this.globalData.canvasContext = null, this.animationItem.container = null, this.destroyed = !0;
3749
- }, X.prototype.renderFrame = function(t, e) {
3750
- if ((this.renderedFrame !== t || this.renderConfig.clearCanvas !== !0 || e) && !this.destroyed && t !== -1) {
3751
- var s;
3752
- 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;
3753
- var i = this.layers.length;
3754
- 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);
3755
- if (this.globalData._mdf) {
3756
- 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();
3757
- this.renderConfig.clearCanvas !== !0 && this.restore();
3758
- }
3759
- }
3760
- }, X.prototype.buildItem = function(t) {
3761
- var e = this.elements;
3762
- if (!e[t] && this.layers[t].ty !== 99) {
3763
- var s = this.createItem(this.layers[t], this, this.globalData);
3764
- e[t] = s, s.initExpressions();
3765
- }
3766
- }, X.prototype.checkPendingElements = function() {
3767
- for (; this.pendingElements.length; )
3768
- this.pendingElements.pop().checkParenting();
3769
- }, X.prototype.hide = function() {
3770
- this.animationItem.container.style.display = "none";
3771
- }, X.prototype.show = function() {
3772
- this.animationItem.container.style.display = "block";
3773
- }, ft.prototype.duplicate = function() {
3774
- var t = 2 * this._length, e = 0;
3775
- for (e = this._length; e < t; e += 1) this.stack[e] = new wi();
3776
- this._length = t;
3777
- }, ft.prototype.reset = function() {
3778
- this.cArrPos = 0, this.cTr.reset(), this.stack[this.cArrPos].opacity = 1;
3779
- }, ft.prototype.restore = function(t) {
3780
- this.cArrPos -= 1;
3781
- var e, s = this.stack[this.cArrPos], i = s.transform, a = this.cTr.props;
3782
- for (e = 0; e < 16; e += 1) a[e] = i[e];
3783
- if (t) {
3784
- this.nativeContext.restore();
3785
- var r = this.stack[this.cArrPos + 1];
3786
- this.appliedFillStyle = r.fillStyle, this.appliedStrokeStyle = r.strokeStyle, this.appliedLineWidth = r.lineWidth, this.appliedLineCap = r.lineCap, this.appliedLineJoin = r.lineJoin, this.appliedMiterLimit = r.miterLimit;
3787
- }
3788
- 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;
3789
- }, ft.prototype.save = function(t) {
3790
- t && this.nativeContext.save();
3791
- var e = this.cTr.props;
3792
- this._length <= this.cArrPos && this.duplicate();
3793
- var s, i = this.stack[this.cArrPos];
3794
- for (s = 0; s < 16; s += 1) i.transform[s] = e[s];
3795
- this.cArrPos += 1;
3796
- var a = this.stack[this.cArrPos];
3797
- 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;
3798
- }, ft.prototype.setOpacity = function(t) {
3799
- this.stack[this.cArrPos].opacity = t;
3800
- }, ft.prototype.setContext = function(t) {
3801
- this.nativeContext = t;
3802
- }, ft.prototype.fillStyle = function(t) {
3803
- this.stack[this.cArrPos].fillStyle !== t && (this.currentFillStyle = t, this.stack[this.cArrPos].fillStyle = t);
3804
- }, ft.prototype.strokeStyle = function(t) {
3805
- this.stack[this.cArrPos].strokeStyle !== t && (this.currentStrokeStyle = t, this.stack[this.cArrPos].strokeStyle = t);
3806
- }, ft.prototype.lineWidth = function(t) {
3807
- this.stack[this.cArrPos].lineWidth !== t && (this.currentLineWidth = t, this.stack[this.cArrPos].lineWidth = t);
3808
- }, ft.prototype.lineCap = function(t) {
3809
- this.stack[this.cArrPos].lineCap !== t && (this.currentLineCap = t, this.stack[this.cArrPos].lineCap = t);
3810
- }, ft.prototype.lineJoin = function(t) {
3811
- this.stack[this.cArrPos].lineJoin !== t && (this.currentLineJoin = t, this.stack[this.cArrPos].lineJoin = t);
3812
- }, ft.prototype.miterLimit = function(t) {
3813
- this.stack[this.cArrPos].miterLimit !== t && (this.currentMiterLimit = t, this.stack[this.cArrPos].miterLimit = t);
3814
- }, ft.prototype.transform = function(t) {
3815
- this.transformMat.cloneFromProps(t);
3816
- var e = this.cTr;
3817
- this.transformMat.multiply(e), e.cloneFromProps(this.transformMat.props);
3818
- var s = e.props;
3819
- this.nativeContext.setTransform(s[0], s[1], s[4], s[5], s[12], s[13]);
3820
- }, ft.prototype.opacity = function(t) {
3821
- var e = this.stack[this.cArrPos].opacity;
3822
- 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);
3823
- }, ft.prototype.fill = function(t) {
3824
- this.appliedFillStyle !== this.currentFillStyle && (this.appliedFillStyle = this.currentFillStyle, this.nativeContext.fillStyle = this.appliedFillStyle), this.nativeContext.fill(t);
3825
- }, ft.prototype.fillRect = function(t, e, s, i) {
3826
- this.appliedFillStyle !== this.currentFillStyle && (this.appliedFillStyle = this.currentFillStyle, this.nativeContext.fillStyle = this.appliedFillStyle), this.nativeContext.fillRect(t, e, s, i);
3827
- }, ft.prototype.stroke = function() {
3828
- 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();
3829
- }, W([X, Bt, Wt], _e), _e.prototype.renderInnerContent = function() {
3830
- var t, e = this.canvasContext;
3831
- 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();
3832
- }, _e.prototype.destroy = function() {
3833
- var t;
3834
- for (t = this.layers.length - 1; t >= 0; t -= 1) this.elements[t] && this.elements[t].destroy();
3835
- this.layers = null, this.elements = null;
3836
- }, _e.prototype.createComp = function(t) {
3837
- return new _e(t, this.globalData, this);
3838
- }, W([X], Ss), Ss.prototype.createComp = function(t) {
3839
- return new _e(t, this.globalData, this);
3840
- }, 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;
3841
- });
3842
- })(As, As.exports);
3843
- var Mi = As.exports;
3844
- const ca = /* @__PURE__ */ fa(Mi), da = /* @__PURE__ */ la({
3845
- __proto__: null,
3846
- default: ca
3847
- }, [Mi]);
3848
- export {
3849
- da as l
3850
- };