1(self.webpackChunk = self.webpackChunk || []).push([ 2 ["753"], 3 { 4 1361: function (t) { 5 var e = 4, 6 i = 0.001, 7 s = 1e-7, 8 r = 10, 9 n = 11, 10 a = 0.1, 11 o = "function" == typeof Float32Array; 12 function h(t, e) { 13 return 1 - 3 * e + 3 * t; 14 } 15 function l(t, e) { 16 return 3 * e - 6 * t; 17 } 18 function p(t) { 19 return 3 * t; 20 } 21 function f(t, e, i) { 22 return ((h(e, i) * t + l(e, i)) * t + p(e)) * t; 23 } 24 function c(t, e, i) { 25 return 3 * h(e, i) * t * t + 2 * l(e, i) * t + p(e); 26 } 27 function u(t, e, i, n, a) { 28 var o, 29 h, 30 l = 0; 31 do (o = f((h = e + (i - e) / 2), n, a) - t) > 0 ? (i = h) : (e = h); 32 while (Math.abs(o) > s && ++l < r); 33 return h; 34 } 35 function m(t, i, s, r) { 36 for (var n = 0; n < e; ++n) { 37 var a = c(i, s, r); 38 if (0 === a) break; 39 var o = f(i, s, r) - t; 40 i -= o / a; 41 } 42 return i; 43 } 44 t.exports = function (t, e, s, r) { 45 if (!(0 <= t && t <= 1 && 0 <= s && s <= 1)) 46 throw Error("bezier x values must be in [0, 1] range"); 47 var h = o ? new Float32Array(n) : Array(n); 48 if (t !== e || s !== r) 49 for (var l = 0; l < n; ++l) h[l] = f(l * a, t, s); 50 function p(e) { 51 for (var r = 0, o = 1, l = n - 1; o !== l && h[o] <= e; ++o) r += a; 52 var p = r + ((e - h[--o]) / (h[o + 1] - h[o])) * a, 53 f = c(p, t, s); 54 return f >= i ? m(e, p, t, s) : 0 === f ? p : u(e, r, r + a, t, s); 55 } 56 return function (i) { 57 return t === e && s === r 58 ? i 59 : 0 === i 60 ? 0 61 : 1 === i 62 ? 1 63 : f(p(i), e, r); 64 }; 65 }; 66 }, 67 8172: function (t, e, i) { 68 t.exports = i(440)(i(5238), "DataView"); 69 }, 70 1796: function (t, e, i) { 71 var s = i(7322), 72 r = i(2937), 73 n = i(207), 74 a = i(2165), 75 o = i(7523); 76 function h(t) { 77 var e = -1, 78 i = null == t ? 0 : t.length; 79 for (this.clear(); ++e < i; ) { 80 var s = t[e]; 81 this.set(s[0], s[1]); 82 } 83 } 84 (h.prototype.clear = s), 85 (h.prototype.delete = r), 86 (h.prototype.get = n), 87 (h.prototype.has = a), 88 (h.prototype.set = o), 89 (t.exports = h); 90 }, 91 4281: function (t, e, i) { 92 var s = i(5940), 93 r = i(4382), 94 n = 0xffffffff; 95 function a(t) { 96 (this.__wrapped__ = t), 97 (this.__actions__ = []), 98 (this.__dir__ = 1), 99 (this.__filtered__ = !1), 100 (this.__iteratees__ = []), 101 (this.__takeCount__ = n), 102 (this.__views__ = []); 103 } 104 (a.prototype = s(r.prototype)), 105 (a.prototype.constructor = a), 106 (t.exports = a); 107 }, 108 283: function (t, e, i) { 109 var s = i(7435), 110 r = i(8438), 111 n = i(3067), 112 a = i(9679), 113 o = i(2426); 114 function h(t) { 115 var e = -1, 116 i = null == t ? 0 : t.length; 117 for (this.clear(); ++e < i; ) { 118 var s = t[e]; 119 this.set(s[0], s[1]); 120 } 121 } 122 (h.prototype.clear = s), 123 (h.prototype.delete = r), 124 (h.prototype.get = n), 125 (h.prototype.has = a), 126 (h.prototype.set = o), 127 (t.exports = h); 128 }, 129 9675: function (t, e, i) { 130 function s(t, e) { 131 (this.__wrapped__ = t), 132 (this.__actions__ = []), 133 (this.__chain__ = !!e), 134 (this.__index__ = 0), 135 (this.__values__ = void 0); 136 } 137 (s.prototype = i(5940)(i(4382).prototype)), 138 (s.prototype.constructor = s), 139 (t.exports = s); 140 }, 141 9036: function (t, e, i) { 142 t.exports = i(440)(i(5238), "Map"); 143 }, 144 4544: function (t, e, i) { 145 var s = i(6409), 146 r = i(5335), 147 n = i(5601), 148 a = i(1533), 149 o = i(151); 150 function h(t) { 151 var e = -1, 152 i = null == t ? 0 : t.length; 153 for (this.clear(); ++e < i; ) { 154 var s = t[e]; 155 this.set(s[0], s[1]); 156 } 157 } 158 (h.prototype.clear = s), 159 (h.prototype.delete = r), 160 (h.prototype.get = n), 161 (h.prototype.has = a), 162 (h.prototype.set = o), 163 (t.exports = h); 164 }, 165 44: function (t, e, i) { 166 t.exports = i(440)(i(5238), "Promise"); 167 }, 168 6656: function (t, e, i) { 169 t.exports = i(440)(i(5238), "Set"); 170 }, 171 3290: function (t, e, i) { 172 var s = i(4544), 173 r = i(1760), 174 n = i(5484); 175 function a(t) { 176 var e = -1, 177 i = null == t ? 0 : t.length; 178 for (this.__data__ = new s(); ++e < i; ) this.add(t[e]); 179 } 180 (a.prototype.add = a.prototype.push = r), 181 (a.prototype.has = n), 182 (t.exports = a); 183 }, 184 1902: function (t, e, i) { 185 var s = i(283), 186 r = i(6063), 187 n = i(7727), 188 a = i(3281), 189 o = i(6667), 190 h = i(1270); 191 function l(t) { 192 var e = (this.__data__ = new s(t)); 193 this.size = e.size; 194 } 195 (l.prototype.clear = r), 196 (l.prototype.delete = n), 197 (l.prototype.get = a), 198 (l.prototype.has = o), 199 (l.prototype.set = h), 200 (t.exports = l); 201 }, 202 4886: function (t, e, i) { 203 t.exports = i(5238).Symbol; 204 }, 205 8965: function (t, e, i) { 206 t.exports = i(5238).Uint8Array; 207 }, 208 3283: function (t, e, i) { 209 t.exports = i(440)(i(5238), "WeakMap"); 210 }, 211 9198: function (t) { 212 t.exports = function (t, e, i) { 213 switch (i.length) { 214 case 0: 215 return t.call(e); 216 case 1: 217 return t.call(e, i[0]); 218 case 2: 219 return t.call(e, i[0], i[1]); 220 case 3: 221 return t.call(e, i[0], i[1], i[2]); 222 } 223 return t.apply(e, i); 224 }; 225 }, 226 4970: function (t) { 227 t.exports = function (t, e) { 228 for ( 229 var i = -1, s = null == t ? 0 : t.length; 230 ++i < s && !1 !== e(t[i], i, t); 231 232 ); 233 return t; 234 }; 235 }, 236 2654: function (t) { 237 t.exports = function (t, e) { 238 for ( 239 var i = -1, s = null == t ? 0 : t.length, r = 0, n = []; 240 ++i < s; 241 242 ) { 243 var a = t[i]; 244 e(a, i, t) && (n[r++] = a); 245 } 246 return n; 247 }; 248 }, 249 4979: function (t, e, i) { 250 var s = i(1682), 251 r = i(9732), 252 n = i(6377), 253 a = i(6018), 254 o = i(9251), 255 h = i(8586), 256 l = Object.prototype.hasOwnProperty; 257 t.exports = function (t, e) { 258 var i = n(t), 259 p = !i && r(t), 260 f = !i && !p && a(t), 261 c = !i && !p && !f && h(t), 262 u = i || p || f || c, 263 m = u ? s(t.length, String) : [], 264 d = m.length; 265 for (var g in t) 266 (e || l.call(t, g)) && 267 !( 268 u && 269 ("length" == g || 270 (f && ("offset" == g || "parent" == g)) || 271 (c && 272 ("buffer" == g || "byteLength" == g || "byteOffset" == g)) || 273 o(g, d)) 274 ) && 275 m.push(g); 276 return m; 277 }; 278 }, 279 1098: function (t) { 280 t.exports = function (t, e) {
281 for (var i = -1, s = null == t ? 0 : t.length, r = Array(s); ++i < s; ) 282 r[i] = e(t[i], i, t); 283 return r; 284 }; 285 }, 286 5741: function (t) { 287 t.exports = function (t, e) { 288 for (var i = -1, s = e.length, r = t.length; ++i < s; ) t[r + i] = e[i]; 289 return t; 290 }; 291 }, 292 2607: function (t) { 293 t.exports = function (t, e, i, s) { 294 var r = -1, 295 n = null == t ? 0 : t.length; 296 for (s && n && (i = t[++r]); ++r < n; ) i = e(i, t[r], r, t); 297 return i; 298 }; 299 }, 300 3955: function (t) { 301 t.exports = function (t, e) { 302 for (var i = -1, s = null == t ? 0 : t.length; ++i < s; ) 303 if (e(t[i], i, t)) return !0; 304 return !1; 305 }; 306 }, 307 609: function (t, e, i) { 308 t.exports = i(2726)("length"); 309 }, 310 3615: function (t, e, i) { 311 var s = i(2676), 312 r = i(4071), 313 n = Object.prototype.hasOwnProperty; 314 t.exports = function (t, e, i) { 315 var a = t[e]; 316 (n.call(t, e) && r(a, i) && (void 0 !== i || e in t)) || s(t, e, i); 317 }; 318 }, 319 8357: function (t, e, i) { 320 var s = i(4071); 321 t.exports = function (t, e) { 322 for (var i = t.length; i--; ) if (s(t[i][0], e)) return i; 323 return -1; 324 }; 325 }, 326 2676: function (t, e, i) { 327 var s = i(9833); 328 t.exports = function (t, e, i) { 329 "__proto__" == e && s 330 ? s(t, e, { 331 configurable: !0, 332 enumerable: !0, 333 value: i, 334 writable: !0, 335 }) 336 : (t[e] = i); 337 }; 338 }, 339 2009: function (t) { 340 t.exports = function (t, e, i) { 341 return ( 342 t == t && 343 (void 0 !== i && (t = t <= i ? t : i), 344 void 0 !== e && (t = t >= e ? t : e)), 345 t 346 ); 347 }; 348 }, 349 5940: function (t, e, i) { 350 var s = i(8532), 351 r = Object.create; 352 t.exports = (function () { 353 function t() {} 354 return function (e) { 355 if (!s(e)) return {}; 356 if (r) return r(e); 357 t.prototype = e; 358 var i = new t(); 359 return (t.prototype = void 0), i; 360 }; 361 })(); 362 }, 363 8264: function (t, e, i) { 364 var s = i(3406); 365 t.exports = i(2679)(s); 366 }, 367 2056: function (t) { 368 t.exports = function (t, e, i, s) { 369 for (var r = t.length, n = i + (s ? 1 : -1); s ? n-- : ++n < r; ) 370 if (e(t[n], n, t)) return n; 371 return -1; 372 }; 373 }, 374 5265: function (t, e, i) { 375 var s = i(5741), 376 r = i(1668); 377 function n(t, e, i, a, o) { 378 var h = -1, 379 l = t.length; 380 for (i || (i = r), o || (o = []); ++h < l; ) { 381 var p = t[h]; 382 e > 0 && i(p) 383 ? e > 1 384 ? n(p, e - 1, i, a, o) 385 : s(o, p) 386 : a || (o[o.length] = p); 387 } 388 return o; 389 } 390 t.exports = n; 391 }, 392 1: function (t, e, i) { 393 t.exports = i(132)(); 394 }, 395 3406: function (t, e, i) { 396 var s = i(1), 397 r = i(7361); 398 t.exports = function (t, e) { 399 return t && s(t, e, r); 400 }; 401 }, 402 1957: function (t, e, i) { 403 var s = i(3835), 404 r = i(8481); 405 t.exports = function (t, e) { 406 e = s(e, t); 407 for (var i = 0, n = e.length; null != t && i < n; ) t = t[r(e[i++])]; 408 return i && i == n ? t : void 0; 409 }; 410 }, 411 7743: function (t, e, i) { 412 var s = i(5741), 413 r = i(6377); 414 t.exports = function (t, e, i) { 415 var n = e(t); 416 return r(t) ? n : s(n, i(t)); 417 }; 418 }, 419 3757: function (t, e, i) { 420 var s = i(4886), 421 r = i(5118), 422 n = i(7070), 423 a = "[object Null]", 424 o = "[object Undefined]", 425 h = s ? s.toStringTag : void 0; 426 t.exports = function (t) { 427 return null == t 428 ? void 0 === t 429 ? o 430 : a 431 : h && h in Object(t) 432 ? r(t) 433 : n(t); 434 }; 435 }, 436 6993: function (t) { 437 t.exports = function (t, e) { 438 return null != t && e in Object(t); 439 }; 440 }, 441 841: function (t, e, i) { 442 var s = i(3757), 443 r = i(7013), 444 n = "[object Arguments]"; 445 t.exports = function (t) { 446 return r(t) && s(t) == n; 447 }; 448 }, 449 5447: function (t, e, i) { 450 var s = i(906), 451 r = i(7013); 452 function n(t, e, i, a, o) { 453 return ( 454 t === e || 455 (null != t && null != e && (r(t) || r(e)) 456 ? s(t, e, i, a, n, o) 457 : t != t && e != e) 458 ); 459 } 460 t.exports = n; 461 }, 462 906: function (t, e, i) { 463 var s = i(1902), 464 r = i(4476), 465 n = i(9027), 466 a = i(8714), 467 o = i(9937), 468 h = i(6377), 469 l = i(6018), 470 p = i(8586), 471 f = 1, 472 c = "[object Arguments]", 473 u = "[object Array]", 474 m = "[object Object]", 475 d = Object.prototype.hasOwnProperty; 476 t.exports = function (t, e, i, g, v, y) { 477 var b = h(t), 478 x = h(e), 479 _ = b ? u : o(t), 480 k = x ? u : o(e); 481 (_ = _ == c ? m : _), (k = k == c ? m : k); 482 var A = _ == m, 483 C = k == m, 484 P = _ == k; 485 if (P && l(t)) { 486 if (!l(e)) return !1; 487 (b = !0), (A = !1); 488 } 489 if (P && !A) 490 return ( 491 y || (y = new s()), 492 b || p(t) ? r(t, e, i, g, v, y) : n(t, e, _, i, g, v, y) 493 ); 494 if (!(i & f)) { 495 var w = A && d.call(t, "__wrapped__"), 496 S = C && d.call(e, "__wrapped__"); 497 if (w || S) { 498 var D = w ? t.value() : t, 499 T = S ? e.value() : e; 500 return y || (y = new s()), v(D, T, i, g, y); 501 } 502 } 503 return !!P && (y || (y = new s()), a(t, e, i, g, v, y)); 504 }; 505 }, 506 7293: function (t, e, i) { 507 var s = i(1902), 508 r = i(5447), 509 n = 1, 510 a = 2; 511 t.exports = function (t, e, i, o) { 512 var h = i.length, 513 l = h, 514 p = !o; 515 if (null == t) return !l; 516 for (t = Object(t); h--; ) { 517 var f = i[h]; 518 if (p && f[2] ? f[1] !== t[f[0]] : !(f[0] in t)) return !1; 519 } 520 for (; ++h < l; ) { 521 var c = (f = i[h])[0], 522 u = t[c], 523 m = f[1]; 524 if (p && f[2]) {
525 if (void 0 === u && !(c in t)) return !1; 526 } else { 527 var d = new s(); 528 if (o) var g = o(u, m, c, t, e, d); 529 if (!(void 0 === g ? r(m, u, n | a, o, d) : g)) return !1; 530 } 531 } 532 return !0; 533 }; 534 }, 535 692: function (t, e, i) { 536 var s = i(6644), 537 r = i(3417), 538 n = i(8532), 539 a = i(1473), 540 o = /[\\^$.*+?()[\]{}|]/g, 541 h = /^\[object .+?Constructor\]$/, 542 l = Object.prototype, 543 p = Function.prototype.toString, 544 f = l.hasOwnProperty, 545 c = RegExp( 546 "^" + 547 p 548 .call(f) 549 .replace(o, "\\$&") 550 .replace( 551 /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, 552 "$1.*?" 553 ) + 554 "$" 555 ); 556 t.exports = function (t) { 557 return !(!n(t) || r(t)) && (s(t) ? c : h).test(a(t)); 558 }; 559 }, 560 2195: function (t, e, i) { 561 var s = i(3757), 562 r = i(7924), 563 n = i(7013), 564 a = "[object Arguments]", 565 o = "[object Array]", 566 h = "[object Boolean]", 567 l = "[object Date]", 568 p = "[object Error]", 569 f = "[object Function]", 570 c = "[object Map]", 571 u = "[object Number]", 572 m = "[object Object]", 573 d = "[object RegExp]", 574 g = "[object Set]", 575 v = "[object String]", 576 y = "[object WeakMap]", 577 b = "[object ArrayBuffer]", 578 x = "[object DataView]", 579 _ = "[object Float64Array]", 580 k = "[object Int8Array]", 581 A = "[object Int16Array]", 582 C = "[object Int32Array]", 583 P = "[object Uint8Array]", 584 w = "[object Uint8ClampedArray]", 585 S = "[object Uint16Array]", 586 D = "[object Uint32Array]", 587 T = {}; 588 (T["[object Float32Array]"] = 589 T[_] = 590 T[k] = 591 T[A] = 592 T[C] = 593 T[P] = 594 T[w] = 595 T[S] = 596 T[D] = 597 !0), 598 (T[a] = 599 T[o] = 600 T[b] = 601 T[h] = 602 T[x] = 603 T[l] = 604 T[p] = 605 T[f] = 606 T[c] = 607 T[u] = 608 T[m] = 609 T[d] = 610 T[g] = 611 T[v] = 612 T[y] = 613 !1), 614 (t.exports = function (t) { 615 return n(t) && r(t.length) && !!T[s(t)]; 616 }); 617 }, 618 5462: function (t, e, i) { 619 var s = i(6358), 620 r = i(4503), 621 n = i(1622), 622 a = i(6377), 623 o = i(8303); 624 t.exports = function (t) { 625 return "function" == typeof t 626 ? t 627 : null == t 628 ? n 629 : "object" == typeof t 630 ? a(t) 631 ? r(t[0], t[1]) 632 : s(t) 633 : o(t); 634 }; 635 }, 636 7407: function (t, e, i) { 637 var s = i(8857), 638 r = i(2440), 639 n = Object.prototype.hasOwnProperty; 640 t.exports = function (t) { 641 if (!s(t)) return r(t); 642 var e = []; 643 for (var i in Object(t)) 644 n.call(t, i) && "constructor" != i && e.push(i); 645 return e; 646 }; 647 }, 648 9237: function (t, e, i) { 649 var s = i(8532), 650 r = i(8857), 651 n = i(1308), 652 a = Object.prototype.hasOwnProperty; 653 t.exports = function (t) { 654 if (!s(t)) return n(t); 655 var e = r(t), 656 i = []; 657 for (var o in t) 658 ("constructor" == o && (e || !a.call(t, o))) || i.push(o); 659 return i; 660 }; 661 }, 662 4382: function (t) { 663 t.exports = function () {}; 664 }, 665 6358: function (t, e, i) { 666 var s = i(7293), 667 r = i(7145), 668 n = i(4167); 669 t.exports = function (t) { 670 var e = r(t); 671 return 1 == e.length && e[0][2] 672 ? n(e[0][0], e[0][1]) 673 : function (i) { 674 return i === t || s(i, t, e); 675 }; 676 }; 677 }, 678 4503: function (t, e, i) { 679 var s = i(5447), 680 r = i(4738), 681 n = i(9290), 682 a = i(7074), 683 o = i(1542), 684 h = i(4167), 685 l = i(8481), 686 p = 1, 687 f = 2; 688 t.exports = function (t, e) { 689 return a(t) && o(e) 690 ? h(l(t), e) 691 : function (i) { 692 var a = r(i, t); 693 return void 0 === a && a === e ? n(i, t) : s(e, a, p | f); 694 }; 695 }; 696 }, 697 7100: function (t, e, i) { 698 var s = i(1957), 699 r = i(5495), 700 n = i(3835); 701 t.exports = function (t, e, i) {
702 for (var a = -1, o = e.length, h = {}; ++a < o; ) { 703 var l = e[a], 704 p = s(t, l); 705 i(p, l) && r(h, n(l, t), p); 706 } 707 return h; 708 }; 709 }, 710 2726: function (t) { 711 t.exports = function (t) { 712 return function (e) { 713 return null == e ? void 0 : e[t]; 714 }; 715 }; 716 }, 717 1374: function (t, e, i) { 718 var s = i(1957); 719 t.exports = function (t) { 720 return function (e) { 721 return s(e, t); 722 }; 723 }; 724 }, 725 9864: function (t) { 726 t.exports = function (t, e, i, s, r) { 727 return ( 728 r(t, function (t, r, n) { 729 i = s ? ((s = !1), t) : e(i, t, r, n); 730 }), 731 i 732 ); 733 }; 734 }, 735 5495: function (t, e, i) { 736 var s = i(3615), 737 r = i(3835), 738 n = i(9251), 739 a = i(8532), 740 o = i(8481); 741 t.exports = function (t, e, i, h) { 742 if (!a(t)) return t; 743 e = r(e, t); 744 for ( 745 var l = -1, p = e.length, f = p - 1, c = t; 746 null != c && ++l < p; 747 748 ) { 749 var u = o(e[l]), 750 m = i; 751 if ("__proto__" === u || "constructor" === u || "prototype" === u) 752 break; 753 if (l != f) { 754 var d = c[u]; 755 void 0 === (m = h ? h(d, u, c) : void 0) && 756 (m = a(d) ? d : n(e[l + 1]) ? [] : {}); 757 } 758 s(c, u, m), (c = c[u]); 759 } 760 return t; 761 }; 762 }, 763 2422: function (t, e, i) { 764 var s = i(5055), 765 r = i(9833), 766 n = i(1622); 767 t.exports = r 768 ? function (t, e) { 769 return r(t, "toString", { 770 configurable: !0, 771 enumerable: !1, 772 value: s(e), 773 writable: !0, 774 }); 775 } 776 : n; 777 }, 778 1682: function (t) { 779 t.exports = function (t, e) { 780 for (var i = -1, s = Array(t); ++i < t; ) s[i] = e(i); 781 return s; 782 }; 783 }, 784 9653: function (t, e, i) { 785 var s = i(4886), 786 r = i(1098), 787 n = i(6377), 788 a = i(1359), 789 o = 1 / 0, 790 h = s ? s.prototype : void 0, 791 l = h ? h.toString : void 0; 792 function p(t) { 793 if ("string" == typeof t) return t; 794 if (n(t)) return r(t, p) + ""; 795 if (a(t)) return l ? l.call(t) : ""; 796 var e = t + ""; 797 return "0" == e && 1 / t == -o ? "-0" : e; 798 } 799 t.exports = p; 800 }, 801 1072: function (t, e, i) { 802 var s = i(3230), 803 r = /^\s+/; 804 t.exports = function (t) { 805 return t ? t.slice(0, s(t) + 1).replace(r, "") : t; 806 }; 807 }, 808 7509: function (t) { 809 t.exports = function (t) { 810 return function (e) { 811 return t(e); 812 }; 813 }; 814 }, 815 2471: function (t) { 816 t.exports = function (t, e) { 817 return t.has(e); 818 }; 819 }, 820 8269: function (t, e, i) { 821 var s = i(1622); 822 t.exports = function (t) { 823 return "function" == typeof t ? t : s; 824 }; 825 }, 826 3835: function (t, e, i) { 827 var s = i(6377), 828 r = i(7074), 829 n = i(8997), 830 a = i(6214); 831 t.exports = function (t, e) { 832 return s(t) ? t : r(t, e) ? [t] : n(a(t)); 833 }; 834 }, 835 8606: function (t) { 836 t.exports = function (t, e) { 837 var i = -1, 838 s = t.length; 839 for (e || (e = Array(s)); ++i < s; ) e[i] = t[i]; 840 return e; 841 }; 842 }, 843 5772: function (t, e, i) { 844 t.exports = i(5238)["__core-js_shared__"]; 845 }, 846 2679: function (t, e, i) { 847 var s = i(508); 848 t.exports = function (t, e) { 849 return function (i, r) { 850 if (null == i) return i; 851 if (!s(i)) return t(i, r); 852 for ( 853 var n = i.length, a = e ? n : -1, o = Object(i); 854 (e ? a-- : ++a < n) && !1 !== r(o[a], a, o); 855 856 ); 857 return i; 858 }; 859 }; 860 }, 861 132: function (t) { 862 t.exports = function (t) { 863 return function (e, i, s) { 864 for (var r = -1, n = Object(e), a = s(e), o = a.length; o--; ) { 865 var h = a[t ? o : ++r]; 866 if (!1 === i(n[h], h, n)) break; 867 } 868 return e; 869 }; 870 }; 871 }, 872 727: function (t, e, i) { 873 var s = i(5462), 874 r = i(508), 875 n = i(7361); 876 t.exports = function (t) { 877 return function (e, i, a) { 878 var o = Object(e); 879 if (!r(e)) { 880 var h = s(i, 3); 881 (e = n(e)), 882 (i = function (t) { 883 return h(o[t], t, o); 884 }); 885 } 886 var l = t(e, i, a); 887 return l > -1 ? o[h ? e[l] : l] : void 0; 888 }; 889 }; 890 }, 891 914: function (t, e, i) { 892 var s = i(9675), 893 r = i(4502), 894 n = i(6007), 895 a = i(195), 896 o = i(6377), 897 h = i(6252), 898 l = "Expected a function", 899 p = 8, 900 f = 32, 901 c = 128, 902 u = 256; 903 t.exports = function (t) { 904 return r(function (e) { 905 var i = e.length, 906 r = i, 907 m = s.prototype.thru; 908 for (t && e.reverse(); r--; ) { 909 var d = e[r]; 910 if ("function" != typeof d) throw TypeError(l); 911 if (m && !g && "wrapper" == a(d)) var g = new s([], !0); 912 } 913 for (r = g ? r : i; ++r < i; ) { 914 var v = a((d = e[r])), 915 y = "wrapper" == v ? n(d) : void 0; 916 g = 917 y && 918 h(y[0]) && 919 y[1] == (c | p | f | u) && 920 !y[4].length && 921 1 == y[9] 922 ? g[a(y[0])].apply(g, y[3]) 923 : 1 == d.length && h(d) 924 ? g[v]() 925 : g.thru(d); 926 } 927 return function () { 928 var t = arguments, 929 s = t[0]; 930 if (g && 1 == t.length && o(s)) return g.plant(s).value(
930); 931 for (var r = 0, n = i ? e[r].apply(this, t) : s; ++r < i; ) 932 n = e[r].call(this, n); 933 return n; 934 }; 935 }); 936 }; 937 }, 938 9833: function (t, e, i) { 939 var s = i(440); 940 t.exports = (function () { 941 try { 942 var t = s(Object, "defineProperty"); 943 return t({}, "", {}), t; 944 } catch (t) {} 945 })(); 946 }, 947 4476: function (t, e, i) { 948 var s = i(3290), 949 r = i(3955), 950 n = i(2471), 951 a = 1, 952 o = 2; 953 t.exports = function (t, e, i, h, l, p) { 954 var f = i & a, 955 c = t.length, 956 u = e.length; 957 if (c != u && !(f && u > c)) return !1; 958 var m = p.get(t), 959 d = p.get(e); 960 if (m && d) return m == e && d == t; 961 var g = -1, 962 v = !0, 963 y = i & o ? new s() : void 0; 964 for (p.set(t, e), p.set(e, t); ++g < c; ) { 965 var b = t[g], 966 x = e[g]; 967 if (h) var _ = f ? h(x, b, g, e, t, p) : h(b, x, g, t, e, p); 968 if (void 0 !== _) { 969 if (_) continue; 970 v = !1; 971 break; 972 } 973 if (y) { 974 if ( 975 !r(e, function (t, e) { 976 if (!n(y, e) && (b === t || l(b, t, i, h, p))) return y.push(e); 977 }) 978 ) { 979 v = !1; 980 break; 981 } 982 } else if (!(b === x || l(b, x, i, h, p))) { 983 v = !1; 984 break; 985 } 986 } 987 return p.delete(t), p.delete(e), v; 988 }; 989 }, 990 9027: function (t, e, i) { 991 var s = i(4886), 992 r = i(8965), 993 n = i(4071), 994 a = i(4476), 995 o = i(7170), 996 h = i(2779), 997 l = 1, 998 p = 2, 999 f = "[object Boolean]", 1000 c = "[object Date]", 1001 u = "[object Error]", 1002 m = "[object Map]", 1003 d = "[object Number]", 1004 g = "[object RegExp]", 1005 v = "[object Set]", 1006 y = "[object String]", 1007 b = "[object Symbol]", 1008 x = "[object ArrayBuffer]", 1009 _ = "[object DataView]", 1010 k = s ? s.prototype : void 0, 1011 A = k ? k.valueOf : void 0; 1012 t.exports = function (t, e, i, s, k, C, P) { 1013 switch (i) { 1014 case _: 1015 if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset) 1016 break; 1017 (t = t.buffer), (e = e.buffer); 1018 case x: 1019 if (t.byteLength != e.byteLength || !C(new r(t), new r(e))) break; 1020 return !0; 1021 case f: 1022 case c: 1023 case d: 1024 return n(+t, +e); 1025 case u: 1026 return t.name == e.name && t.message == e.message; 1027 case g: 1028 case y: 1029 return t == e + ""; 1030 case m: 1031 var w = o; 1032 case v: 1033 var S = s & l; 1034 if ((w || (w = h), t.size != e.size && !S)) break; 1035 var D = P.get(t); 1036 if (D) return D == e; 1037 (s |= p), P.set(t, e); 1038 var T = a(w(t), w(e), s, k, C, P); 1039 return P.delete(t), T; 1040 case b: 1041 if (A) return A.call(t) == A.call(e); 1042 } 1043 return !1; 1044 }; 1045 }, 1046 8714: function (t, e, i) { 1047 var s = i(3948), 1048 r = 1, 1049 n = Object.prototype.hasOwnProperty; 1050 t.exports = function (t, e, i, a, o, h) { 1051 var l = i & r, 1052 p = s(t), 1053 f = p.length; 1054 if (f != s(e).length && !l) return !1; 1055 for (var c = f; c--; ) { 1056 var u = p[c]; 1057 if (!(l ? u in e : n.call(e, u))) return !1; 1058 } 1059 var m = h.get(t), 1060 d = h.get(e); 1061 if (m && d) return m == e && d == t; 1062 var g = !0; 1063 h.set(t, e), h.set(e, t); 1064 for (var v = l; ++c < f; ) { 1065 var y = t[(u = p[c])], 1066 b = e[u]; 1067 if (a) var x = l ? a(b, y, u, e, t, h) : a(y, b, u, t, e, h); 1068 if (!(void 0 === x ? y === b || o(y, b, i, a, h) : x)) { 1069 g = !1; 1070 break; 1071 } 1072 v || (v = "constructor" == u); 1073 } 1074 if (g && !v) { 1075 var _ = t.constructor, 1076 k = e.constructor; 1077 _ != k && 1078 "constructor" in t && 1079 "constructor" in e && 1080 !( 1081 "function" == typeof _ && 1082 _ instanceof _ && 1083 "function" == typeof k && 1084 k instanceof k 1085 ) && 1086 (g = !1); 1087 } 1088 return h.delete(t), h.delete(e), g; 1089 }; 1090 }, 1091 4502: function (t, e, i) { 1092 var s = i(6380), 1093 r = i(6813), 1094 n = i(2413); 1095 t.exports = function (t) { 1096 return n(r(t, void 0, s), t + ""); 1097 }; 1098 }, 1099 2593: function (t, e, i) { 1100 t.exports = "object" == typeof i.g && i.g && i.g.Object === Object && i.g; 1101 }, 1102 3948: function (t, e, i) { 1103 var s = i(7743), 1104 r = i(6230), 1105 n = i(7361); 1106 t.exports = function (t) { 1107 return s(t, n, r); 1108 }; 1109 }, 1110 9254: function (t, e, i) { 1111 var s = i(7743), 1112 r = i(2992), 1113 n = i(3747); 1114 t.exports = function (t) { 1115 return s(t, n, r); 1116 }; 1117 }, 1118 6007: function (t, e, i) { 1119 var s = i(900), 1120 r = i(6032); 1121 t.exports = s 1122 ? function (t) { 1123 return s.get(t); 1124 } 1125 : r; 1126 }, 1127 195: function (t, e, i) { 1128 var s = i(8564), 1129 r = Object.prototype.hasOwnProperty; 1130 t.exports = function (t) { 1131 for ( 1132 var e = t.name + "", i = s[e], n = r.call(s, e) ? i.length : 0; 1133 n--; 1134 1135 ) { 1136 var a = i[n], 1137 o = a.func; 1138 if (null == o || o == t) return a.name; 1139 } 1140 return e; 1141 }; 1142 }, 1143 1143: function (t, e, i) { 1144 var s = i(6669); 1145 t.exports = function (t, e) { 1146 var i = t.__data__; 1147 return s(e) ? i["string" == typeof e ? "string" : "hash"] : i.map; 1148 }; 1149 }, 1150 7145: function (t, e, i) { 1151 var s = i(1542), 1152 r = i(7361); 1153 t.exports = function (t) { 1154 for (var e = r(t), i = e.length; i--; ) { 1155 var n = e[i], 1156 a = t[n]; 1157 e[i] = [n, a, s(a)]; 1158 } 1159 return e; 1160 }; 1161 }, 1162 440: function (t, e, i) { 1163 var s = i(692), 1164 r = i(8974); 1165 t.exports = function (t, e) { 1166 var i = r(t, e); 1167 return s(i) ? i : void 0; 1168 }; 1169 }, 1170 6095: function (t, e, i) { 1171 t.exports = i(6512)(Object.getPrototypeOf, Object); 1172 }, 1173 5118: function (t, e, i) { 1174 var s = i(4886), 1175 r = Object.prototype, 1176 n = r.hasOwnProperty, 1177 a = r.toString, 1178 o = s ? s.toStringTag : void 0; 1179 t.exports = function (t) { 1180 var e = n.call(t, o), 1181 i = t[o]; 1182 try { 1183 t[o] = void 0; 1184 var s = !0; 1185 } catch (t) {}
1186 var r = a.call(t); 1187 return s && (e ? (t[o] = i) : delete t[o]), r; 1188 }; 1189 }, 1190 6230: function (t, e, i) { 1191 var s = i(2654), 1192 r = i(1036), 1193 n = Object.prototype.propertyIsEnumerable, 1194 a = Object.getOwnPropertySymbols; 1195 t.exports = a 1196 ? function (t) { 1197 return null == t 1198 ? [] 1199 : s(a((t = Object(t))), function (e) { 1200 return n.call(t, e); 1201 }); 1202 } 1203 : r; 1204 }, 1205 2992: function (t, e, i) { 1206 var s = i(5741), 1207 r = i(6095), 1208 n = i(6230), 1209 a = i(1036); 1210 t.exports = Object.getOwnPropertySymbols 1211 ? function (t) { 1212 for (var e = []; t; ) s(e, n(t)), (t = r(t)); 1213 return e; 1214 } 1215 : a; 1216 }, 1217 9937: function (t, e, i) { 1218 var s = i(8172), 1219 r = i(9036), 1220 n = i(44), 1221 a = i(6656), 1222 o = i(3283), 1223 h = i(3757), 1224 l = i(1473), 1225 p = "[object Map]", 1226 f = "[object Object]", 1227 c = "[object Promise]", 1228 u = "[object Set]", 1229 m = "[object WeakMap]", 1230 d = "[object DataView]", 1231 g = l(s), 1232 v = l(r), 1233 y = l(n), 1234 b = l(a), 1235 x = l(o), 1236 _ = h; 1237 ((s && _(new s(new ArrayBuffer(1))) != d) || 1238 (r && _(new r()) != p) || 1239 (n && _(n.resolve()) != c) || 1240 (a && _(new a()) != u) || 1241 (o && _(new o()) != m)) && 1242 (_ = function (t) { 1243 var e = h(t), 1244 i = e == f ? t.constructor : void 0, 1245 s = i ? l(i) : ""; 1246 if (s) 1247 switch (s) { 1248 case g: 1249 return d; 1250 case v: 1251 return p; 1252 case y: 1253 return c; 1254 case b: 1255 return u; 1256 case x: 1257 return m; 1258 } 1259 return e; 1260 }), 1261 (t.exports = _); 1262 }, 1263 8974: function (t) { 1264 t.exports = function (t, e) { 1265 return null == t ? void 0 : t[e]; 1266 }; 1267 }, 1268 7635: function (t, e, i) { 1269 var s = i(3835), 1270 r = i(9732), 1271 n = i(6377), 1272 a = i(9251), 1273 o = i(7924), 1274 h = i(8481); 1275 t.exports = function (t, e, i) { 1276 e = s(e, t); 1277 for (var l = -1, p = e.length, f = !1; ++l < p; ) { 1278 var c = h(e[l]); 1279 if (!(f = null != t && i(t, c))) break; 1280 t = t[c]; 1281 } 1282 return f || ++l != p 1283 ? f 1284 : !!(p = null == t ? 0 : t.length) && 1285 o(p) && 1286 a(c, p) && 1287 (n(t) || r(t)); 1288 }; 1289 }, 1290 9520: function (t) { 1291 var e = RegExp( 1292 "[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]" 1293 ); 1294 t.exports = function (t) { 1295 return e.test(t); 1296 }; 1297 }, 1298 7322: function (t, e, i) { 1299 var s = i(7305); 1300 t.exports = function () { 1301 (this.__data__ = s ? s(null) : {}), (this.size = 0); 1302 }; 1303 }, 1304 2937: function (t) { 1305 t.exports = function (t) { 1306 var e = this.has(t) && delete this.__data__[t]; 1307 return (this.size -= !!e), e; 1308 }; 1309 }, 1310 207: function (t, e, i) { 1311 var s = i(7305), 1312 r = "__lodash_hash_undefined__", 1313 n = Object.prototype.hasOwnProperty; 1314 t.exports = function (t) { 1315 var e = this.__data__; 1316 if (s) { 1317 var i = e[t]; 1318 return i === r ? void 0 : i; 1319 } 1320 return n.call(e, t) ? e[t] : void 0; 1321 }; 1322 }, 1323 2165: function (t, e, i) { 1324 var s = i(7305), 1325 r = Object.prototype.hasOwnProperty; 1326 t.exports = function (t) { 1327 var e = this.__data__; 1328 return s ? void 0 !== e[t] : r.call(e, t); 1329 }; 1330 }, 1331 7523: function (t, e, i) { 1332 var s = i(7305), 1333 r = "__lodash_hash_undefined__"; 1334 t.exports = function (t, e) { 1335 var i = this.__data__; 1336 return ( 1337 (this.size += +!this.has(t)), (i[t] = s && void 0 === e ? r : e), this 1338 ); 1339 }; 1340 }, 1341 1668: function (t, e, i) { 1342 var s = i(4886), 1343 r = i(9732), 1344 n = i(6377), 1345 a = s ? s.isConcatSpreadable : void 0; 1346 t.exports = function (t) { 1347 return n(t) || r(t) || !!(a && t && t[a]); 1348 }; 1349 }, 1350 9251: function (t) { 1351 var e = 0x1fffffffffffff, 1352 i = /^(?:0|[1-9]\d*)$/; 1353 t.exports = function (t, s) { 1354 var r = typeof t; 1355 return ( 1356 !!(s = null == s ? e : s) && 1357 ("number" == r || ("symbol" != r && i.test(t))) && 1358 t > -1 && 1359 t % 1 == 0 && 1360 t < s 1361 ); 1362 }; 1363 }, 1364 7074: function (t, e, i) { 1365 var s = i(6377), 1366 r = i(1359), 1367 n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, 1368 a = /^\w*$/; 1369 t.exports = function (t, e) { 1370 if (s(t)) return !1; 1371 var i = typeof t; 1372 return ( 1373 !!( 1374 "number" == i ||
1375 "symbol" == i || 1376 "boolean" == i || 1377 null == t || 1378 r(t) 1379 ) || 1380 a.test(t) || 1381 !n.test(t) || 1382 (null != e && t in Object(e)) 1383 ); 1384 }; 1385 }, 1386 6669: function (t) { 1387 t.exports = function (t) { 1388 var e = typeof t; 1389 return "string" == e || "number" == e || "symbol" == e || "boolean" == e 1390 ? "__proto__" !== t 1391 : null === t; 1392 }; 1393 }, 1394 6252: function (t, e, i) { 1395 var s = i(4281), 1396 r = i(6007), 1397 n = i(195), 1398 a = i(6985); 1399 t.exports = function (t) { 1400 var e = n(t), 1401 i = a[e]; 1402 if ("function" != typeof i || !(e in s.prototype)) return !1; 1403 if (t === i) return !0; 1404 var o = r(i); 1405 return !!o && t === o[0]; 1406 }; 1407 }, 1408 3417: function (t, e, i) { 1409 var s = i(5772), 1410 r = (function () { 1411 var t = /[^.]+$/.exec((s && s.keys && s.keys.IE_PROTO) || ""); 1412 return t ? "Symbol(src)_1." + t : ""; 1413 })(); 1414 t.exports = function (t) { 1415 return !!r && r in t; 1416 }; 1417 }, 1418 8857: function (t) { 1419 var e = Object.prototype; 1420 t.exports = function (t) { 1421 var i = t && t.constructor; 1422 return t === (("function" == typeof i && i.prototype) || e); 1423 }; 1424 }, 1425 1542: function (t, e, i) { 1426 var s = i(8532); 1427 t.exports = function (t) { 1428 return t == t && !s(t); 1429 }; 1430 }, 1431 7435: function (t) { 1432 t.exports = function () { 1433 (this.__data__ = []), (this.size = 0); 1434 }; 1435 }, 1436 8438: function (t, e, i) { 1437 var s = i(8357), 1438 r = Array.prototype.splice; 1439 t.exports = function (t) { 1440 var e = this.__data__, 1441 i = s(e, t); 1442 return ( 1443 !(i < 0) && 1444 (i == e.length - 1 ? e.pop() : r.call(e, i, 1), --this.size, !0) 1445 ); 1446 }; 1447 }, 1448 3067: function (t, e, i) { 1449 var s = i(8357); 1450 t.exports = function (t) { 1451 var e = this.__data__, 1452 i = s(e, t); 1453 return i < 0 ? void 0 : e[i][1]; 1454 }; 1455 }, 1456 9679: function (t, e, i) { 1457 var s = i(8357); 1458 t.exports = function (t) { 1459 return s(this.__data__, t) > -1; 1460 }; 1461 }, 1462 2426: function (t, e, i) { 1463 var s = i(8357); 1464 t.exports = function (t, e) { 1465 var i = this.__data__, 1466 r = s(i, t); 1467 return r < 0 ? (++this.size, i.push([t, e])) : (i[r][1] = e), this; 1468 }; 1469 }, 1470 6409: function (t, e, i) { 1471 var s = i(1796), 1472 r = i(283), 1473 n = i(9036); 1474 t.exports = function () { 1475 (this.size = 0), 1476 (this.__data__ = { 1477 hash: new s(), 1478 map: new (n || r)(), 1479 string: new s(), 1480 }); 1481 }; 1482 }, 1483 5335: function (t, e, i) { 1484 var s = i(1143); 1485 t.exports = function (t) { 1486 var e = s(this, t).delete(t); 1487 return (this.size -= !!e), e; 1488 }; 1489 }, 1490 5601: function (t, e, i) { 1491 var s = i(1143); 1492 t.exports = function (t) { 1493 return s(this, t).get(t); 1494 }; 1495 }, 1496 1533: function (t, e, i) { 1497 var s = i(1143); 1498 t.exports = function (t) { 1499 return s(this, t).has(t); 1500 }; 1501 }, 1502 151: function (t, e, i) { 1503 var s = i(1143); 1504 t.exports = function (t, e) { 1505 var i = s(this, t), 1506 r = i.size; 1507 return i.set(t, e), (this.size += +(i.size != r)), this; 1508 }; 1509 }, 1510 7170: function (t) { 1511 t.exports = function (t) { 1512 var e = -1, 1513 i = Array(t.size); 1514 return ( 1515 t.forEach(function (t, s) { 1516 i[++e] = [s, t]; 1517 }), 1518 i 1519 ); 1520 }; 1521 }, 1522 4167: function (t) { 1523 t.exports = function (t, e) { 1524 return function (i) { 1525 return null != i && i[t] === e && (void 0 !== e || t in Object(i)); 1526 }; 1527 }; 1528 }, 1529 6141: function (t, e, i) { 1530 var s = i(4984), 1531 r = 500; 1532 t.exports = function (t) { 1533 var e = s(t, function (t) { 1534 return i.size === r && i.clear(), t; 1535 }), 1536 i = e.cache;
1537 return e; 1538 }; 1539 }, 1540 900: function (t, e, i) { 1541 var s = i(3283); 1542 t.exports = s && new s(); 1543 }, 1544 7305: function (t, e, i) { 1545 t.exports = i(440)(Object, "create"); 1546 }, 1547 2440: function (t, e, i) { 1548 t.exports = i(6512)(Object.keys, Object); 1549 }, 1550 1308: function (t) { 1551 t.exports = function (t) { 1552 var e = []; 1553 if (null != t) for (var i in Object(t)) e.push(i); 1554 return e; 1555 }; 1556 }, 1557 895: function (t, e, i) { 1558 t = i.nmd(t); 1559 var s = i(2593), 1560 r = e && !e.nodeType && e, 1561 n = r && t && !t.nodeType && t, 1562 a = n && n.exports === r && s.process, 1563 o = (function () { 1564 try { 1565 var t = n && n.require && n.require("util").types; 1566 if (t) return t; 1567 return a && a.binding && a.binding("util"); 1568 } catch (t) {} 1569 })(); 1570 t.exports = o; 1571 }, 1572 7070: function (t) { 1573 var e = Object.prototype.toString; 1574 t.exports = function (t) { 1575 return e.call(t); 1576 }; 1577 }, 1578 6512: function (t) { 1579 t.exports = function (t, e) { 1580 return function (i) { 1581 return t(e(i)); 1582 }; 1583 }; 1584 }, 1585 6813: function (t, e, i) { 1586 var s = i(9198), 1587 r = Math.max; 1588 t.exports = function (t, e, i) { 1589 return ( 1590 (e = r(void 0 === e ? t.length - 1 : e, 0)), 1591 function () { 1592 for ( 1593 var n = arguments, a = -1, o = r(n.length - e, 0), h = Array(o); 1594 ++a < o; 1595 1596 ) 1597 h[a] = n[e + a]; 1598 a = -1; 1599 for (var l = Array(e + 1); ++a < e; ) l[a] = n[a]; 1600 return (l[e] = i(h)), s(t, this, l); 1601 } 1602 ); 1603 }; 1604 }, 1605 8564: function (t) { 1606 t.exports = {}; 1607 }, 1608 5238: function (t, e, i) { 1609 var s = i(2593), 1610 r = "object" == typeof self && self && self.Object === Object && self; 1611 t.exports = s || r || Function("return this")(); 1612 }, 1613 1760: function (t) { 1614 var e = "__lodash_hash_undefined__"; 1615 t.exports = function (t) { 1616 return this.__data__.set(t, e), this; 1617 }; 1618 }, 1619 5484: function (t) { 1620 t.exports = function (t) { 1621 return this.__data__.has(t); 1622 }; 1623 }, 1624 2779: function (t) { 1625 t.exports = function (t) { 1626 var e = -1, 1627 i = Array(t.size); 1628 return ( 1629 t.forEach(function (t) { 1630 i[++e] = t; 1631 }), 1632 i 1633 ); 1634 }; 1635 }, 1636 2413: function (t, e, i) { 1637 var s = i(2422); 1638 t.exports = i(7890)(s); 1639 }, 1640 7890: function (t) { 1641 var e = 800, 1642 i = 16, 1643 s = Date.now; 1644 t.exports = function (t) { 1645 var r = 0, 1646 n = 0; 1647 return function () { 1648 var a = s(), 1649 o = i - (a - n); 1650 if (((n = a), o > 0)) { 1651 if (++r >= e) return arguments[0]; 1652 } else r = 0; 1653 return t.apply(void 0, arguments); 1654 }; 1655 }; 1656 }, 1657 6063: function (t, e, i) { 1658 var s = i(283); 1659 t.exports = function () { 1660 (this.__data__ = new s()), (this.size = 0); 1661 }; 1662 }, 1663 7727: function (t) { 1664 t.exports = function (t) { 1665 var e = this.__data__, 1666 i = e.delete(t); 1667 return (this.size = e.size), i; 1668 }; 1669 }, 1670 3281: function (t) { 1671 t.exports = function (t) { 1672 return this.__data__.get(t); 1673 }; 1674 }, 1675 6667: function (t) { 1676 t.exports = function (t) { 1677 return this.__data__.has(t); 1678 }; 1679 }, 1680 1270: function (t, e, i) { 1681 var s = i(283), 1682 r = i(9036), 1683 n = i(4544), 1684 a = 200; 1685 t.exports = function (t, e) { 1686 var i = this.__data__; 1687 if (i instanceof s) { 1688 var o = i.__data__; 1689 if (!r || o.length < a - 1) 1690 return o.push([t, e]), (this.size = ++i.size), this; 1691 i = this.__data__ = new n(o); 1692 } 1693 return i.set(t, e), (this.size = i.size), this; 1694 }; 1695 }, 1696 6749: function (t, e, i) { 1697 var s = i(609), 1698 r = i(9520), 1699 n = i(9668); 1700 t.exports = function (t) { 1701 return r(t) ? n(t) : s(t); 1702 }; 1703 }, 1704 8997: function (t, e, i) { 1705 var s = i(6141), 1706 r = 1707 /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, 1708 n = /\\(\\)?/g; 1709 t.exports = s(function (t) { 1710 var e = []; 1711 return ( 1712 46 === t.charCodeAt(0) && e.push(""), 1713 t.replace(r, function (t, i, s, r) { 1714 e.push(s ? r.replace(n, "$1") : i || t); 1715 }), 1716 e 1717 ); 1718 }); 1719 }, 1720 8481: function (t, e, i) { 1721 var s = i(1359), 1722 r = 1 / 0; 1723 t.exports = function (t) { 1724 if ("string" == typeof t || s(t)) return t; 1725 var e = t + ""; 1726 return "0" == e && 1 / t == -r ? "-0" : e; 1727 }; 1728 }, 1729 1473: function (t) { 1730 var e = Function.prototype.toString; 1731 t.exports = function (t) { 1732 if (null != t) { 1733 try { 1734 return e.call(t); 1735 } catch (t) {} 1736 try { 1737 return t + ""; 1738 } catch (t) {} 1739 } 1740 return ""; 1741 }; 1742 }, 1743 3230: function (t) { 1744 var e = /\s/; 1745 t.exports = function (t) { 1746 for (var i = t.length; i-- && e.test(t.charAt(i)); ); 1747 return i; 1748 }; 1749 }, 1750 9668: function (t) { 1751 var e = "\ud800-\udfff", 1752 i = "[" + e + "]", 1753 s = "[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", 1754 r = "\ud83c[\udffb-\udfff]", 1755 n = "[^" + e + "]", 1756 a = "(?:\ud83c[\udde6-\uddff]){2}", 1757 o = "[\ud800-\udbff][\udc00-\udfff]", 1758 h = "(?:" + s + "|" + r + ")?", 1759 l = "[\\ufe0e\\ufe0f]?", 1760 p = "(?:\\u200d(?:" + [n, a, o].join("|") + ")" + l + h + ")*", 1761 f = l + h + p, 1762 c = RegExp( 1763 r + 1764 "(?=" + 1765 r + 1766 ")|" + 1767 ("(?:" + [n + s + "?", s, a, o, i].join("|")) + 1768 ")" + 1769 f, 1770 "g" 1771 ); 1772 t.exports = function (t) { 1773 for (var e = (c.lastIndex = 0); c.test(t); ) ++e; 1774 return e; 1775 }; 1776 }, 1777 219: function (t, e, i) { 1778 var s = i(4281), 1779 r = i(9675), 1780 n = i(8606); 1781 t.exports = function (t) { 1782 if (t instanceof s) return t.clone(); 1783 var e = new r(t.__wrapped__, t.__chain__); 1784 return ( 1785 (e.__actions__ = n(t.__actions__)), 1786 (e.__index__ = t.__index__), 1787 (e.__values__ = t.__values__), 1788 e 1789 ); 1790 }; 1791 }, 1792 3789: function (t, e, i) { 1793 var s = i(2009), 1794 r = i(6127); 1795 t.exports = function (t, e, i) { 1796 return ( 1797 void 0 === i && ((i = e), (e = void 0)), 1798 void 0 !== i && (i = (i = r(i)) == i ? i : 0), 1799 void 0 !== e && (e = (e = r(e)) == e ? e : 0), 1800 s(r(t), e, i) 1801 ); 1802 }; 1803 }, 1804 5055: function (t) { 1805 t.exports = function (t) { 1806 return function () { 1807 return t; 1808 }; 1809 }; 1810 }, 1811 8305: function (t, e, i) { 1812 var s = i(8532), 1813 r = i(806), 1814 n = i(6127), 1815 a = "Expected a function", 1816 o = Math.max, 1817 h = Math.min; 1818 t.exports = function (t, e, i) { 1819 var l, 1820 p, 1821 f, 1822 c, 1823 u, 1824 m, 1825 d = 0, 1826 g = !1, 1827 v = !1, 1828 y = !0; 1829 if ("function" != typeof t) throw TypeError(a); 1830 function b(e) { 1831 var i = l, 1832 s = p; 1833 return (l = p = void 0), (d = e), (c = t.apply(s, i)); 1834 } 1835 function x(t) { 1836 return (d = t), (u = setTimeout(A, e)), g ? b(t) : c; 1837 } 1838 function _(t) { 1839 var i = t - m, 1840 s = t - d, 1841 r = e - i; 1842 return v ? h(r, f - s) : r; 1843 } 1844 function k(t) { 1845 var i = t - m, 1846 s = t - d; 1847 return void 0 === m || i >= e || i < 0 || (v && s >= f); 1848 } 1849 function A() { 1850 var t = r(); 1851 if (k(t)) return C(t); 1852 u = setTimeout(A, _(t)); 1853 } 1854 function C(t) { 1855 return ((u = void 0), y && l) ? b(t) : ((l = p = void 0), c); 1856 } 1857 function P() { 1858 return void 0 === u ? c : C(r()); 1859 } 1860 function w() { 1861 var t = r(), 1862 i = k(t); 1863 if (((l = arguments), (p = this), (m = t), i)) { 1864 if (void 0 === u) return x(m); 1865 if (v) return clearTimeout(u), (u = setTimeout(A, e)), b(m); 1866 } 1867 return void 0 === u && (u = setTimeout(A, e)), c; 1868 } 1869 return ( 1870 (e = n(e) || 0), 1871 s(i) && 1872 ((g = !!i.leading), 1873 (f = (v = "maxWait" in i) ? o(n(i.maxWait) || 0, e) : f), 1874 (y = "trailing" in i ? !!i.trailing : y)), 1875 (w.cancel = function () { 1876 void 0 !== u && clearTimeout(u), (d = 0), (l = m = p = u = void 0); 1877 }), 1878 (w.flush = P), 1879 w 1880 ); 1881 }; 1882 }, 1883 4075: function (t) { 1884 t.exports = function (t, e) { 1885 return null == t || t != t ? e : t; 1886 }; 1887 }, 1888 4071: function (t) { 1889 t.exports = function (t, e) { 1890 return t === e || (t != t && e != e); 1891 }; 1892 }, 1893 9777: function (t, e, i) { 1894 t.exports = i(727)(i(3142)); 1895 }, 1896 3142: function (t, e, i) { 1897 var s = i(2056), 1898 r = i(5462), 1899 n = i(8536), 1900 a = Math.max; 1901 t.exports = function (t, e, i) { 1902 var o = null == t ? 0 : t.length; 1903 if (!o) return -1; 1904 var h = null == i ? 0 : n(i); 1905 return h < 0 && (h = a(o + h, 0)), s(t, r(e, 3), h); 1906 }; 1907 }, 1908 5720: function (t, e, i) { 1909 t.exports = i(727)(i(3758)); 1910 }, 1911 3758: function (t, e, i) { 1912 var s = i(2056), 1913 r = i(5462), 1914 n = i(8536), 1915 a = Math.max, 1916 o = Math.min; 1917 t.exports = function (t, e, i) { 1918 var h = null == t ? 0 : t.length; 1919 if (!h) return -1; 1920 var l = h - 1; 1921 return ( 1922 void 0 !== i && ((l = n(i)), (l = i < 0 ? a(h + l, 0) : o(l, h - 1))), 1923 s(t, r(e, 3), l, !0) 1924 ); 1925 }; 1926 }, 1927 6380: function (t, e, i) { 1928 var s = i(5265); 1929 t.exports = function (t) { 1930 return (null == t ? 0 : t.length) ? s(t, 1) : []; 1931 }; 1932 }, 1933 5801: function (t, e, i) { 1934 t.exports = i(914)(); 1935 }, 1936 2397: function (t, e, i) { 1937 var s = i(4970), 1938 r = i(8264), 1939 n = i(8269), 1940 a = i(6377); 1941 t.exports = function (t, e) { 1942 return (a(t) ? s : r)(t, n(e)); 1943 }; 1944 }, 1945 4738: function (t, e, i) { 1946 var s = i(1957); 1947 t.exports = function (t, e, i) { 1948 var r = null == t ? void 0 : s(t, e); 1949 return void 0 === r ? i : r; 1950 }; 1951 }, 1952 9290: function (t, e, i) { 1953 var s = i(6993), 1954 r = i(7635); 1955 t.exports = function (t, e) { 1956 return null != t && r(t, e, s); 1957 }; 1958 }, 1959 1622: function (t) { 1960 t.exports = function (t) { 1961 return t; 1962 }; 1963 }, 1964 9732: function (t, e, i) { 1965 var s = i(841), 1966 r = i(7013), 1967 n = Object.prototype, 1968 a = n.hasOwnProperty, 1969 o = n.propertyIsEnumerable; 1970 t.exports = s( 1971 (function () { 1972 return arguments; 1973 })() 1974 ) 1975 ? s 1976 : function (t) { 1977 return r(t) && a.call(t, "callee") && !o.call(t, "callee"); 1978 }; 1979 }, 1980 6377: function (t) { 1981 t.exports = Array.isArray; 1982 }, 1983 508: function (t, e, i) { 1984 var s = i(6644), 1985 r = i(7924); 1986 t.exports = function (t) { 1987 return null != t && r(t.length) && !s(t); 1988 }; 1989 }, 1990 6018: function (t, e, i) { 1991 t = i.nmd(t); 1992 var s = i(5238), 1993 r = i(5786), 1994 n = e && !e.nodeType && e, 1995 a = n && t && !t.nodeType && t, 1996 o = a && a.exports === n ? s.Buffer : void 0, 1997 h = (o ? o.isBuffer : void 0) || r; 1998 t.exports = h; 1999 }, 2000 6633: function (t, e, i) { 2001 var s = i(7407), 2002 r = i(9937), 2003 n = i(9732), 2004 a = i(6377), 2005 o = i(508), 2006 h = i(6018), 2007 l = i(8857), 2008 p = i(8586), 2009 f = "[object Map]", 2010 c = "[object Set]", 2011 u = Object.prototype.hasOwnProperty; 2012 t.exports = function (t) { 2013 if (null == t) return !0; 2014 if ( 2015 o(t) && 2016 (a(t) || 2017 "string" == typeof t || 2018 "function" == typeof t.splice || 2019 h(t) || 2020 p(t) || 2021 n(t)) 2022 ) 2023 return !t.length; 2024 var e = r(t); 2025 if (e == f || e == c) return !t.size; 2026 if (l(t)) return !s(t).length; 2027 for (var i in t) if (u.call(t, i)) return !1; 2028 return !0; 2029 }; 2030 }, 2031 6644: function (t, e, i) { 2032 var s = i(3757), 2033 r = i(8532), 2034 n = "[object AsyncFunction]", 2035 a = "[object Function]", 2036 o = "[object GeneratorFunction]", 2037 h = "[object Proxy]"; 2038 t.exports = function (t) { 2039 if (!r(t)) return !1; 2040 var e = s(t); 2041 return e == a || e == o || e == n || e == h; 2042 }; 2043 }, 2044 7924: function (t) { 2045 var e = 0x1fffffffffffff; 2046 t.exports = function (t) { 2047 return "number" == typeof t && t > -1 && t % 1 == 0 && t <= e; 2048 }; 2049 }, 2050 8532: function (t) { 2051 t.exports = function (t) { 2052 var e = typeof t; 2053 return null != t && ("object" == e || "function" == e); 2054 }; 2055 }, 2056 7013: function (t) { 2057 t.exports = function (t) { 2058 return null != t && "object" == typeof t; 2059 }; 2060 }, 2061 1085: function (t, e, i) { 2062 var s = i(3757), 2063 r = i(6377), 2064 n = i(7013), 2065 a = "[object String]"; 2066 t.exports = function (t) { 2067 return "string" == typeof t || (!r(t) && n(t) && s(t) == a); 2068 }; 2069 }, 2070 1359: function (t, e, i) { 2071 var s = i(3757), 2072 r = i(7013), 2073 n = "[object Symbol]"; 2074 t.exports = function (t) { 2075 return "symbol" == typeof t || (r(t) && s(t) == n); 2076 }; 2077 }, 2078 8586: function (t, e, i) { 2079 var s = i(2195), 2080 r = i(7509), 2081 n = i(895), 2082 a = n && n.isTypedArray; 2083 t.exports = a ? r(a) : s; 2084 }, 2085 7361: function (t, e, i) { 2086 var s = i(4979), 2087 r = i(7407), 2088 n = i(508); 2089 t.exports = function (t) { 2090 return n(t) ? s(t) : r(t); 2091 }; 2092 }, 2093 3747: function (t, e, i) { 2094 var s = i(4979), 2095 r = i(9237), 2096 n = i(508); 2097 t.exports = function (t) { 2098 return n(t) ? s(t, !0) : r(t); 2099 }; 2100 }, 2101 3729: function (t, e, i) { 2102 var s = i(2676), 2103 r = i(3406), 2104 n = i(5462); 2105 t.exports = function (t, e) { 2106 var i = {}; 2107 return ( 2108 (e = n(e, 3)), 2109 r(t, function (t, r, n) { 2110 s(i, r, e(t, r, n)); 2111 }), 2112 i 2113 ); 2114 }; 2115 }, 2116 4984: function (t, e, i) { 2117 var s = i(4544), 2118 r = "Expected a function"; 2119 function n(t, e) { 2120 if ("function" != typeof t || (null != e && "function" != typeof e)) 2121 throw TypeError(r); 2122 var i = function () { 2123 var s = arguments, 2124 r = e ? e.apply(this, s) : s[0], 2125 n = i.cache; 2126 if (n.has(r)) return n.get(r); 2127 var a = t.apply(this, s); 2128 return (i.cache = n.set(r, a) || n), a; 2129 }; 2130 return (i.cache = new (n.Cache || s)()), i; 2131 } 2132 (n.Cache = s), (t.exports = n); 2133 }, 2134 3103: function (t) { 2135 var e = "Expected a function"; 2136 t.exports = function (t) { 2137 if ("function" != typeof t) throw TypeError(e); 2138 return function () { 2139 var e = arguments; 2140 switch (e.length) { 2141 case 0: 2142 return !t.call(this); 2143 case 1: 2144 return !t.call(this, e[0]); 2145 case 2: 2146 return !t.call(this, e[0], e[1]); 2147 case 3: 2148 return !t.call(this, e[0], e[1], e[2]); 2149 } 2150 return !t.apply(this, e); 2151 }; 2152 }; 2153 }, 2154 6032: function (t) { 2155 t.exports = function () {}; 2156 }, 2157 806: function (t, e, i) { 2158 var s = i(5238); 2159 t.exports = function () { 2160 return s.Date.now(); 2161 }; 2162 }, 2163 3452: function (t, e, i
2163) { 2164 var s = i(5462), 2165 r = i(3103), 2166 n = i(4103); 2167 t.exports = function (t, e) { 2168 return n(t, r(s(e))); 2169 }; 2170 }, 2171 4103: function (t, e, i) { 2172 var s = i(1098), 2173 r = i(5462), 2174 n = i(7100), 2175 a = i(9254); 2176 t.exports = function (t, e) { 2177 if (null == t) return {}; 2178 var i = s(a(t), function (t) { 2179 return [t]; 2180 }); 2181 return ( 2182 (e = r(e)), 2183 n(t, i, function (t, i) { 2184 return e(t, i[0]); 2185 }) 2186 ); 2187 }; 2188 }, 2189 8303: function (t, e, i) { 2190 var s = i(2726), 2191 r = i(1374), 2192 n = i(7074), 2193 a = i(8481); 2194 t.exports = function (t) { 2195 return n(t) ? s(a(t)) : r(t); 2196 }; 2197 }, 2198 1455: function (t, e, i) { 2199 var s = i(2607), 2200 r = i(8264), 2201 n = i(5462), 2202 a = i(9864), 2203 o = i(6377); 2204 t.exports = function (t, e, i) { 2205 var h = o(t) ? s : a, 2206 l = arguments.length < 3; 2207 return h(t, n(e, 4), i, l, r); 2208 }; 2209 }, 2210 4659: function (t, e, i) { 2211 var s = i(7407), 2212 r = i(9937), 2213 n = i(508), 2214 a = i(1085), 2215 o = i(6749), 2216 h = "[object Map]", 2217 l = "[object Set]"; 2218 t.exports = function (t) { 2219 if (null == t) return 0; 2220 if (n(t)) return a(t) ? o(t) : t.length; 2221 var e = r(t); 2222 return e == h || e == l ? t.size : s(t).length; 2223 }; 2224 }, 2225 1036: function (t) { 2226 t.exports = function () { 2227 return []; 2228 }; 2229 }, 2230 5786: function (t) { 2231 t.exports = function () { 2232 return !1; 2233 }; 2234 }, 2235 5082: function (t, e, i) { 2236 var s = i(8305), 2237 r = i(8532), 2238 n = "Expected a function"; 2239 t.exports = function (t, e, i) { 2240 var a = !0, 2241 o = !0; 2242 if ("function" != typeof t) throw TypeError(n); 2243 return ( 2244 r(i) && 2245 ((a = "leading" in i ? !!i.leading : a), 2246 (o = "trailing" in i ? !!i.trailing : o)), 2247 s(t, e, { leading: a, maxWait: e, trailing: o }) 2248 ); 2249 }; 2250 }, 2251 5597: function (t, e, i) { 2252 var s = i(6127), 2253 r = 1 / 0, 2254 n = 17976931348623157e292; 2255 t.exports = function (t) { 2256 return t 2257 ? (t = s(t)) === r || t === -r 2258 ? (t < 0 ? -1 : 1) * n 2259 : t == t 2260 ? t 2261 : 0 2262 : 0 === t 2263 ? t 2264 : 0; 2265 }; 2266 }, 2267 8536: function (t, e, i) { 2268 var s = i(5597); 2269 t.exports = function (t) { 2270 var e = s(t), 2271 i = e % 1; 2272 return e == e ? (i ? e - i : e) : 0; 2273 }; 2274 }, 2275 6127: function (t, e, i) { 2276 var s = i(1072), 2277 r = i(8532), 2278 n = i(1359), 2279 a = 0 / 0, 2280 o = /^[-+]0x[0-9a-f]+$/i, 2281 h = /^0b[01]+$/i, 2282 l = /^0o[0-7]+$/i, 2283 p = parseInt; 2284 t.exports = function (t) { 2285 if ("number" == typeof t) return t; 2286 if (n(t)) return a; 2287 if (r(t)) { 2288 var e = "function" == typeof t.valueOf ? t.valueOf() : t; 2289 t = r(e) ? e + "" : e; 2290 } 2291 if ("string" != typeof t) return 0 === t ? t : +t; 2292 t = s(t); 2293 var i = h.test(t); 2294 return i || l.test(t) ? p(t.slice(2), i ? 2 : 8) : o.test(t) ? a : +t; 2295 }; 2296 }, 2297 6214: function (t, e, i) { 2298 var s = i(9653); 2299 t.exports = function (t) { 2300 return null == t ? "" : s(t); 2301 }; 2302 }, 2303 6985: function (t, e, i) { 2304 var s = i(4281), 2305 r = i(9675), 2306 n = i(4382), 2307 a = i(6377), 2308 o = i(7013), 2309 h = i(219), 2310 l = Object.prototype.hasOwnProperty; 2311 function p(t) { 2312 if (o(t) && !a(t) && !(t instanceof s)) { 2313 if (t instanceof r) return t; 2314 if (l.call(t, "__wrapped__")) return h(t); 2315 } 2316 return new r(t); 2317 } 2318 (p.prototype = n.prototype), 2319 (p.prototype.constructor = p), 2320 (t.exports = p); 2321 }, 2322 8724: function (module, exports) { 2323 "undefined" != typeof document && 2324 "undefined" != typeof navigator && 2325 (function (t, e) { 2326 module.exports = e(); 2327 })(0, function () { 2328 "use strict"; 2329 var svgNS = "http://www.w3.org/2000/svg", 2330 locationHref = "", 2331 _useWebWorker = !1, 2332 initialDefaultFrame = -999999, 2333 setWebWorker = function (t) { 2334 _useWebWorker = !!t; 2335 }, 2336 getWebWorker = function () { 2337 return _useWebWorker; 2338 }, 2339 setLocationHref = function (t) { 2340 locationHref = t; 2341 }, 2342 getLocationHref = function () { 2343 return locationHref; 2344 }; 2345 function createTag(t) { 2346 return document.createElement(t); 2347 } 2348 function extendPrototype(t, e) { 2349 var i, 2350 s, 2351 r = t.length; 2352 for (i = 0; i < r; i += 1) 2353 for (var n in (s = t[i].prototype)) 2354 Object.prototype.hasOwnProperty.call(s, n) && 2355 (e.prototype[n] = s[n]); 2356 } 2357 function getDescriptor(t, e) { 2358 return Object.getOwnPropertyDescriptor(t, e); 2359 } 2360 function createProxyFunction(t) { 2361 function e() {} 2362 return (e.prototype = t), e; 2363 } 2364 var audioControllerFactory = (function () { 2365 function t(t) { 2366 (this.audios = []), 2367 (this.audioFactory = t), 2368 (this._volume = 1), 2369 (this._isMuted = !1); 2370 } 2371 return ( 2372 (t.prototype = { 2373 addAudio: function (t) { 2374 this.audios.push(t); 2375 }, 2376 pause: function () { 2377 var t, 2378 e = this.audios.length; 2379 for (t = 0; t < e; t += 1) this.audios[t].pause(); 2380 }, 2381 resume: function () { 2382 var t, 2383 e = this.audios.length; 2384 for (t = 0; t < e; t += 1) this.audios[t].resume(); 2385 }, 2386 setRate: function (t) { 2387 var e, 2388 i = this.audios.length; 2389 for (e = 0; e < i; e += 1) this.audios[e].setRate(t); 2390 }, 2391 createAudio: function (t) { 2392 return this.audioFactory 2393 ? this.audioFactory(t) 2394 : window.Howl 2395 ? new window.Howl({ src: [t] }) 2396 : { 2397 isPlaying: !1, 2398 play: function () { 2399 this.isPlaying = !0; 2400 }, 2401 seek: function () { 2402 this.isPlaying = !1; 2403 }, 2404 playing: function () {}, 2405 rate: function () {}, 2406 setVolume: function () {}, 2407 }; 2408 }, 2409 setAudioFactory: function (t) { 2410 this.audioFactory = t; 2411 }, 2412 setVolume: function (t) { 2413 (this._volume = t), this._updateVolume(); 2414 }, 2415 mute: function () { 2416 (this._isMuted = !0), this._updateVolume(); 2417 }, 2418 unmute: function () { 2419 (this._isMuted = !1), this._updateVolume(); 2420 }, 2421 getVolume: function () { 2422 return this._volume; 2423 }, 2424 _updateVolume: function () { 2425 var t, 2426 e = this.audios.length; 2427 for (t = 0; t < e; t += 1) 2428 this.audios[t].volume(!this._isMuted * this._volume); 2429 }, 2430 }), 2431 function () { 2432 return new t(); 2433 } 2434 ); 2435 })(), 2436 createTypedArray = (function () { 2437 function t(t, e) { 2438 var i, 2439 s = 0, 2440 r = []; 2441 switch (t) { 2442 case "int16": 2443 case "uint8c": 2444 i = 1; 2445 break; 2446 default: 2447 i = 1.1; 2448 } 2449 for (s = 0; s < e; s += 1) r.push(i); 2450 return r; 2451 } 2452 return "function" == typeof Uint8ClampedArray && 2453 "function" == typeof Float32Array 2454 ? function (e, i) { 2455 return "float32" === e 2456 ? new Float32Array(i) 2457 : "int16" === e 2458 ? new Int16Array(i) 2459 : "uint8c" === e 2460 ? new Uint8ClampedArray(i) 2461 : t(e, i); 2462 } 2463 : t; 2464 })(); 2465 function createSizedArray(t) { 2466 return Array.apply(null, { length: t }); 2467 } 2468 function _typeof$6(t) { 2469 return (_typeof$6 = 2470 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 2471 ? function (t) { 2472 return typeof t; 2473 } 2474 : function (t) { 2475 return t && 2476 "function" == typeof Symbol && 2477 t.constructor === Symbol && 2478 t !== Symbol.prototype 2479 ? "symbol" 2480 : typeof t; 2481 })(t); 2482 } 2483 var subframeEnabled = !0, 2484 expressionsPlugin = null, 2485 expressionsInterfaces = null, 2486 idPrefix$1 = "", 2487 isSafari = /^((?!chrome|android).)*safari/i.test( 2488 navigator.userAgent 2489 ), 2490 _shouldRoundValues = !1, 2491 bmPow = Math.pow, 2492 bmSqrt = Math.sqrt, 2493 bmFloor = Math.floor, 2494 bmMax = Math.max, 2495 bmMin = Math.min, 2496 BMMath = {}; 2497 function ProjectInterface$1() { 2498 return {}; 2499 } 2500 !(function () { 2501 var t, 2502 e = [ 2503 "abs", 2504 "acos", 2505 "acosh", 2506 "asin", 2507 "asinh", 2508 "atan", 2509 "atanh", 2510 "atan2", 2511 "ceil", 2512 "cbrt", 2513 "expm1", 2514 "clz32", 2515 "cos", 2516 "cosh", 2517 "exp", 2518 "floor", 2519 "fround", 2520 "hypot", 2521 "imul", 2522 "log", 2523 "log1p", 2524 "log2", 2525 "log10", 2526 "max", 2527 "min", 2528 "pow", 2529 "random", 2530 "round", 2531 "sign", 2532 "sin", 2533 "sinh", 2534 "sqrt", 2535 "tan", 2536 "tanh", 2537 "trunc", 2538 "E", 2539 "LN10", 2540 "LN2", 2541 "LOG10E", 2542 "LOG2E", 2543 "PI", 2544 "SQRT1_2", 2545 "SQRT2", 2546 ], 2547 i = e.length; 2548 for (t = 0; t < i; t += 1) BMMath[e[t]] = Math[e[t]]; 2549 })(), 2550 (BMMath.random = Math.random), 2551 (BMMath.abs = function (t) { 2552 if ("object" === _typeof$6(t) && t.length) { 2553 var e, 2554 i = createSizedArray(t.length), 2555 s = t.length; 2556 for (e = 0; e < s; e += 1) i[e] = Math.abs(t[e]); 2557 return i; 2558 } 2559 return Math.abs(t); 2560 }); 2561 var defaultCurveSegments = 150, 2562 degToRads = Math.PI / 180, 2563 roundCorner = 0.5519; 2564 function roundValues(t) { 2565 _shouldRoundValues = !!t; 2566 } 2567 function bmRnd(t) { 2568 return _shouldRoundValues ? Math.round(t) : t; 2569 } 2570 function styleDiv(t) { 2571 (t.style.position = "absolute"), 2572 (t.style.top = 0), 2573 (t.style.left = 0), 2574 (t.style.display = "block"), 2575 (t.style.transformOrigin = "0 0"), 2576 (t.style.webkitTransformOrigin = "0 0"), 2577 (t.style.backfaceVisibility = "visible"), 2578 (t.style.webkitBackfaceVisibility = "visible"), 2579 (t.style.transformStyle = "preserve-3d"), 2580 (t.style.webkitTransformStyle = "preserve-3d"), 2581 (t.style.mozTransformStyle = "preserve-3d"); 2582 } 2583 function BMEnterFrameEvent(t, e, i, s) {
2584 (this.type = t), 2585 (this.currentTime = e), 2586 (this.totalTime = i), 2587 (this.direction = s < 0 ? -1 : 1); 2588 } 2589 function BMCompleteEvent(t, e) { 2590 (this.type = t), (this.direction = e < 0 ? -1 : 1); 2591 } 2592 function BMCompleteLoopEvent(t, e, i, s) { 2593 (this.type = t), 2594 (this.currentLoop = i), 2595 (this.totalLoops = e), 2596 (this.direction = s < 0 ? -1 : 1); 2597 } 2598 function BMSegmentStartEvent(t, e, i) { 2599 (this.type = t), (this.firstFrame = e), (this.totalFrames = i); 2600 } 2601 function BMDestroyEvent(t, e) { 2602 (this.type = t), (this.target = e); 2603 } 2604 function BMRenderFrameErrorEvent(t, e) { 2605 (this.type = "renderFrameError"), 2606 (this.nativeError = t), 2607 (this.currentTime = e); 2608 } 2609 function BMConfigErrorEvent(t) { 2610 (this.type = "configError"), (this.nativeError = t); 2611 } 2612 function BMAnimationConfigErrorEvent(t, e) { 2613 (this.type = t), (this.nativeError = e); 2614 } 2615 var _count, 2616 createElementID = 2617 ((_count = 0), 2618 function () { 2619 return idPrefix$1 + "__lottie_element_" + (_count += 1); 2620 }); 2621 function HSVtoRGB(t, e, i) { 2622 var s, r, n, a, o, h, l, p; 2623 switch ( 2624 ((h = i * (1 - e)), 2625 (l = i * (1 - (o = 6 * t - (a = Math.floor(6 * t))) * e)), 2626 (p = i * (1 - (1 - o) * e)), 2627 a % 6) 2628 ) { 2629 case 0: 2630 (s = i), (r = p), (n = h); 2631 break; 2632 case 1: 2633 (s = l), (r = i), (n = h); 2634 break; 2635 case 2: 2636 (s = h), (r = i), (n = p); 2637 break; 2638 case 3: 2639 (s = h), (r = l), (n = i); 2640 break; 2641 case 4: 2642 (s = p), (r = h), (n = i); 2643 break; 2644 case 5: 2645 (s = i), (r = h), (n = l); 2646 } 2647 return [s, r, n]; 2648 } 2649 function RGBtoHSV(t, e, i) { 2650 var s, 2651 r = Math.max(t, e, i), 2652 n = Math.min(t, e, i), 2653 a = r - n, 2654 o = 0 === r ? 0 : a / r, 2655 h = r / 255; 2656 switch (r) { 2657 case n: 2658 s = 0; 2659 break; 2660 case t: 2661 s = (e - i + 6 * (e < i) * a) / (6 * a); 2662 break; 2663 case e: 2664 s = (i - t + 2 * a) / (6 * a); 2665 break; 2666 case i: 2667 s = (t - e + 4 * a) / (6 * a); 2668 } 2669 return [s, o, h]; 2670 } 2671 function addSaturationToRGB(t, e) { 2672 var i = RGBtoHSV(255 * t[0], 255 * t[1], 255 * t[2]); 2673 return ( 2674 (i[1] += e), 2675 i[1] > 1 ? (i[1] = 1) : i[1] <= 0 && (i[1] = 0), 2676 HSVtoRGB(i[0], i[1], i[2]) 2677 ); 2678 } 2679 function addBrightnessToRGB(t, e) { 2680 var i = RGBtoHSV(255 * t[0], 255 * t[1], 255 * t[2]); 2681 return ( 2682 (i[2] += e), 2683 i[2] > 1 ? (i[2] = 1) : i[2] < 0 && (i[2] = 0), 2684 HSVtoRGB(i[0], i[1], i[2]) 2685 ); 2686 } 2687 function addHueToRGB(t, e) { 2688 var i = RGBtoHSV(255 * t[0], 255 * t[1], 255 * t[2]); 2689 return ( 2690 (i[0] += e / 360), 2691 i[0] > 1 ? (i[0] -= 1) : i[0] < 0 && (i[0] += 1), 2692 HSVtoRGB(i[0], i[1], i[2]) 2693 ); 2694 } 2695 var rgbToHex = (function () { 2696 var t, 2697 e, 2698 i = []; 2699 for (t = 0; t < 256; t += 1) 2700 (e = t.toString(16)), (i[t] = 1 === e.length ? "0" + e : e); 2701 return function (t, e, s) { 2702 return ( 2703 t < 0 && (t = 0), 2704 e < 0 && (e = 0), 2705 s < 0 && (s = 0), 2706 "#" + i[t] + i[e] + i[s] 2707 ); 2708 }; 2709 })(), 2710 setSubframeEnabled = function (t) { 2711 subframeEnabled = !!t; 2712 }, 2713 getSubframeEnabled = function () { 2714 return subframeEnabled; 2715 }, 2716 setExpressionsPlugin = function (t) { 2717 expressionsPlugin = t; 2718 }, 2719 getExpressionsPlugin = function () { 2720 return expressionsPlugin; 2721 }, 2722 setExpressionInterfaces = function (t) { 2723 expressionsInterfaces = t; 2724 }, 2725 getExpressionInterfaces = function () { 2726 return expressionsInterfaces; 2727 }, 2728 setDefaultCurveSegments = function (t) { 2729 defaultCurveSegments = t; 2730 }, 2731 getDefaultCurveSegments = function () { 2732 return defaultCurveSegments; 2733 }, 2734 setIdPrefix = function (t) { 2735 idPrefix$1 = t; 2736 }, 2737 getIdPrefix = function () { 2738 return idPrefix$1; 2739 }; 2740 function createNS(t) { 2741 return document.createElementNS(svgNS, t); 2742 } 2743 function _typeof$5(t) { 2744 return (_typeof$5 = 2745 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 2746 ? function (t) { 2747 return typeof t; 2748 } 2749 : function (t) { 2750 return t && 2751 "function" == typeof Symbol && 2752 t.constructor === Symbol && 2753 t !== Symbol.prototype 2754 ? "symbol" 2755 : typeof t; 2756 })(t); 2757 } 2758 var dataManager = (function () { 2759 var t, 2760 e, 2761 i = 1, 2762 s = [], 2763 r = { 2764 onmessage: function () {}, 2765 postMessage: function (e) { 2766 t({ data: e }); 2767 }, 2768 }, 2769 n = { 2770 postMessage: function (t) { 2771 r.onmessage({ data: t }); 2772 }, 2773 }; 2774 function a() { 2775 e || 2776 ((e = (function (e) { 2777 if (window.Worker && window.Blob && getWebWorker()) { 2778 var i = new Blob( 2779 [ 2780 "var _workerSelf = self; self.onmessage = ", 2781 e.toString(), 2782 ], 2783 { type: "text/javascript" } 2784 ); 2785 return new Worker(URL.createObjectURL(i)); 2786 } 2787 return (t = e), r; 2788 })(function (t) { 2789 if ( 2790 (n.dataManager || 2791 (n.dataManager = (function () { 2792 function t(r, n) { 2793 var a, 2794 o, 2795 h, 2796 l, 2797 p, 2798 c, 2799 u = r.length; 2800 for (o = 0; o < u; o += 1) 2801 if ("ks" in (a = r[o]) && !a.completed) { 2802 if (((a.completed = !0), a.hasMask)) { 2803 var m = a.masksProperties;
2804 for (l = m.length, h = 0; h < l; h += 1) 2805 if (m[h].pt.k.i) s(m[h].pt.k); 2806 else 2807 for ( 2808 c = m[h].pt.k.length, p = 0; 2809 p < c; 2810 p += 1 2811 ) 2812 m[h].pt.k[p].s && s(m[h].pt.k[p].s[0]), 2813 m[h].pt.k[p].e && 2814 s(m[h].pt.k[p].e[0]); 2815 } 2816 0 === a.ty 2817 ? ((a.layers = e(a.refId, n)), t(a.layers, n)) 2818 : 4 === a.ty 2819 ? i(a.shapes) 2820 : 5 === a.ty && f(a); 2821 } 2822 } 2823 function e(t, e) { 2824 var i = (function (t, e) { 2825 for (var i = 0, s = e.length; i < s; ) { 2826 if (e[i].id === t) return e[i]; 2827 i += 1; 2828 } 2829 return null; 2830 })(t, e); 2831 return i 2832 ? i.layers.__used 2833 ? JSON.parse(JSON.stringify(i.layers)) 2834 : ((i.layers.__used = !0), i.layers) 2835 : null; 2836 } 2837 function i(t) { 2838 var e, r, n; 2839 for (e = t.length - 1; e >= 0; e -= 1) 2840 if ("sh" === t[e].ty) 2841 if (t[e].ks.k.i) s(t[e].ks.k); 2842 else 2843 for ( 2844 n = t[e].ks.k.length, r = 0; 2845 r < n; 2846 r += 1 2847 ) 2848 t[e].ks.k[r].s && s(t[e].ks.k[r].s[0]), 2849 t[e].ks.k[r].e && s(t[e].ks.k[r].e[0]); 2850 else "gr" === t[e].ty && i(t[e].it); 2851 } 2852 function s(t) { 2853 var e, 2854 i = t.i.length; 2855 for (e = 0; e < i; e += 1) 2856 (t.i[e][0] += t.v[e][0]), 2857 (t.i[e][1] += t.v[e][1]), 2858 (t.o[e][0] += t.v[e][0]), 2859 (t.o[e][1] += t.v[e][1]); 2860 } 2861 function r(t, e) { 2862 var i = e ? e.split(".") : [100, 100, 100]; 2863 return ( 2864 t[0] > i[0] || 2865 (!(i[0] > t[0]) && 2866 (t[1] > i[1] || 2867 (!(i[1] > t[1]) && 2868 (t[2] > i[2] || (!(i[2] > t[2]) && null))))) 2869 ); 2870 } 2871 var n, 2872 a = (function () { 2873 var t = [4, 4, 14]; 2874 function e(t) { 2875 var e, 2876 i, 2877 s, 2878 r = t.length; 2879 for (e = 0; e < r; e += 1) 2880 5 === t[e].ty && 2881 ((s = void 0), 2882 (s = (i = t[e]).t.d), 2883 (i.t.d = { k: [{ s: s, t: 0 }] })); 2884 } 2885 return function (i) { 2886 if (r(t, i.v) && (e(i.layers), i.assets)) { 2887 var s, 2888 n = i.assets.length; 2889 for (s = 0; s < n; s += 1) 2890 i.assets[s].layers && e(i.assets[s].layers); 2891 } 2892 }; 2893 })(), 2894 o = 2895 ((n = [4, 7, 99]), 2896 function (t) { 2897 if (t.chars && !r(n, t.v)) { 2898 var e, 2899 s = t.chars.length; 2900 for (e = 0; e < s; e += 1) { 2901 var a = t.chars[e]; 2902 a.data && 2903 a.data.shapes && 2904 (i(a.data.shapes), 2905 (a.data.ip = 0), 2906 (a.data.op = 99999), 2907 (a.data.st = 0), 2908 (a.data.sr = 1), 2909 (a.data.ks = { 2910 p: { k: [0, 0], a: 0 }, 2911 s: { k: [100, 100], a: 0 }, 2912 a: { k: [0, 0], a: 0 }, 2913 r: { k: 0, a: 0 }, 2914 o: { k: 100, a: 0 }, 2915 }), 2916 t.chars[e].t || 2917 (a.data.shapes.push({ ty: "no" }), 2918 a.data.shapes[0].it.push({ 2919 p: { k: [0, 0], a: 0 }, 2920 s: { k: [100, 100], a: 0 }, 2921 a: { k: [0, 0], a: 0 }, 2922 r: { k: 0, a: 0 }, 2923 o: { k: 100, a: 0 }, 2924 sk: { k: 0, a: 0 }, 2925 sa: { k: 0, a: 0 }, 2926 ty: "tr", 2927 }))); 2928 } 2929 } 2930 }), 2931 h = (function () { 2932 var t = [5, 7, 15]; 2933 function e(t) { 2934 var e, 2935 i, 2936 s = t.length; 2937 for (e = 0; e < s; e += 1) 2938 5 === t[e].ty && 2939 ((i = void 0), 2940 "number" == typeof (i = t[e].t.p).a && 2941 (i.a = { a: 0, k: i.a }), 2942 "number" == typeof i.p && 2943 (i.p = { a: 0, k: i.p }), 2944 "number" == typeof i.r && 2945 (i.r = { a: 0, k: i.r })); 2946 } 2947 return function (i) { 2948 if (r(t, i.v) && (e(i.layers), i.assets)) { 2949 var s, 2950 n = i.assets.length; 2951 for (s = 0; s < n; s += 1) 2952 i.assets[s].layers && e(i.assets[s].layers); 2953 } 2954 }; 2955 })(), 2956 l = (function () { 2957 var t = [4, 1, 9]; 2958 function e(t) { 2959 var i, 2960 s, 2961 r, 2962 n = t.length; 2963 for (i = 0; i < n; i += 1) 2964 if ("gr" === t[i].ty) e(t[i].it); 2965 else if ("fl" === t[i].ty || "st" === t[i].ty) 2966 if (t[i].c.k && t[i].c.k[0].i) 2967 for ( 2968 r = t[i].c.k.length, s = 0; 2969 s < r; 2970 s += 1 2971 ) 2972 t[i].c.k[s].s && 2973 ((t[i].c.k[s].s[0] /= 255), 2974 (t[i].c.k[s].s[1] /= 255), 2975 (t[i].c.k[s].s[2] /= 255), 2976 (t[i].c.k[s].s[3] /= 255)), 2977 t[i].c.k[s].e && 2978 ((t[i].c.k[s].e[0] /= 255), 2979 (t[i].c.k[s].e[1] /= 255), 2980 (t[i].c.k[s].e[2] /= 255), 2981 (t[i].c.k[s].e[3] /= 255)); 2982 else 2983 (t[i].c.k[0] /= 255), 2984 (t[i].c.k[1] /= 255), 2985 (t[i].c.k[2] /= 255), 2986 (t[i].c.k[3] /= 255); 2987 } 2988 function i(t) { 2989 var i, 2990 s = t.length; 2991 for (i = 0; i < s; i += 1) 2992 4 === t[i].ty && e(t[i].shapes); 2993 } 2994 return function (e) {
2995 if (r(t, e.v) && (i(e.layers), e.assets)) { 2996 var s, 2997 n = e.assets.length; 2998 for (s = 0; s < n; s += 1) 2999 e.assets[s].layers && i(e.assets[s].layers); 3000 } 3001 }; 3002 })(), 3003 p = (function () { 3004 var t = [4, 4, 18]; 3005 function e(t) { 3006 var i, s, r; 3007 for (i = t.length - 1; i >= 0; i -= 1) 3008 if ("sh" === t[i].ty) 3009 if (t[i].ks.k.i) t[i].ks.k.c = t[i].closed; 3010 else 3011 for ( 3012 r = t[i].ks.k.length, s = 0; 3013 s < r; 3014 s += 1 3015 ) 3016 t[i].ks.k[s].s && 3017 (t[i].ks.k[s].s[0].c = t[i].closed), 3018 t[i].ks.k[s].e && 3019 (t[i].ks.k[s].e[0].c = t[i].closed); 3020 else "gr" === t[i].ty && e(t[i].it); 3021 } 3022 function i(t) { 3023 var i, 3024 s, 3025 r, 3026 n, 3027 a, 3028 o, 3029 h = t.length; 3030 for (s = 0; s < h; s += 1) { 3031 if ((i = t[s]).hasMask) { 3032 var l = i.masksProperties; 3033 for (n = l.length, r = 0; r < n; r += 1) 3034 if (l[r].pt.k.i) l[r].pt.k.c = l[r].cl; 3035 else 3036 for ( 3037 o = l[r].pt.k.length, a = 0; 3038 a < o; 3039 a += 1 3040 ) 3041 l[r].pt.k[a].s && 3042 (l[r].pt.k[a].s[0].c = l[r].cl), 3043 l[r].pt.k[a].e && 3044 (l[r].pt.k[a].e[0].c = l[r].cl); 3045 } 3046 4 === i.ty && e(i.shapes); 3047 } 3048 } 3049 return function (e) { 3050 if (r(t, e.v) && (i(e.layers), e.assets)) { 3051 var s, 3052 n = e.assets.length; 3053 for (s = 0; s < n; s += 1) 3054 e.assets[s].layers && i(e.assets[s].layers); 3055 } 3056 }; 3057 })(); 3058 function f(t) { 3059 0 === t.t.a.length && t.t.p; 3060 } 3061 var c = { 3062 completeData: function (i) { 3063 i.__complete || 3064 (l(i), 3065 a(i), 3066 o(i), 3067 h(i), 3068 p(i), 3069 t(i.layers, i.assets), 3070 (function (i, s) { 3071 if (i) { 3072 var r = 0, 3073 n = i.length; 3074 for (r = 0; r < n; r += 1) 3075 1 === i[r].t && 3076 ((i[r].data.layers = e( 3077 i[r].data.refId, 3078 s 3079 )), 3080 t(i[r].data.layers, s)); 3081 } 3082 })(i.chars, i.assets), 3083 (i.__complete = !0)); 3084 }, 3085 }; 3086 return ( 3087 (c.checkColors = l), 3088 (c.checkChars = o), 3089 (c.checkPathProperties = h), 3090 (c.checkShapes = p), 3091 (c.completeLayers = t), 3092 c 3093 ); 3094 })()), 3095 n.assetLoader || 3096 (n.assetLoader = (function () { 3097 function t(t) { 3098 var e = t.getResponseHeader("content-type"); 3099 return (e && 3100 "json" === t.responseType && 3101 -1 !== e.indexOf("json")) || 3102 (t.response && "object" === _typeof$5(t.response)) 3103 ? t.response 3104 : t.response && "string" == typeof t.response 3105 ? JSON.parse(t.response) 3106 : t.responseText 3107 ? JSON.parse(t.responseText) 3108 : null; 3109 } 3110 return { 3111 load: function (e, i, s, r) { 3112 var n, 3113 a = new XMLHttpRequest(); 3114 try { 3115 a.responseType = "json"; 3116 } catch (t) {} 3117 a.onreadystatechange = function () { 3118 if (4 === a.readyState) 3119 if (200 === a.status) s((n = t(a
3119))); 3120 else 3121 try { 3122 (n = t(a)), s(n); 3123 } catch (t) { 3124 r && r(t); 3125 } 3126 }; 3127 try { 3128 a.open("GET", e, !0); 3129 } catch (t) { 3130 a.open("GET", i + "/" + e, !0); 3131 } 3132 a.send(); 3133 }, 3134 }; 3135 })()), 3136 "loadAnimation" === t.data.type) 3137 ) 3138 n.assetLoader.load( 3139 t.data.path, 3140 t.data.fullPath, 3141 function (e) { 3142 n.dataManager.completeData(e), 3143 n.postMessage({ 3144 id: t.data.id, 3145 payload: e, 3146 status: "success", 3147 }); 3148 }, 3149 function () { 3150 n.postMessage({ id: t.data.id, status: "error" }); 3151 } 3152 ); 3153 else if ("complete" === t.data.type) { 3154 var e = t.data.animation; 3155 n.dataManager.completeData(e), 3156 n.postMessage({ 3157 id: t.data.id, 3158 payload: e, 3159 status: "success", 3160 }); 3161 } else 3162 "loadData" === t.data.type && 3163 n.assetLoader.load( 3164 t.data.path, 3165 t.data.fullPath, 3166 function (e) { 3167 n.postMessage({ 3168 id: t.data.id, 3169 payload: e, 3170 status: "success", 3171 }); 3172 }, 3173 function () { 3174 n.postMessage({ id: t.data.id, status: "error" }); 3175 } 3176 ); 3177 })).onmessage = function (t) { 3178 var e = t.data, 3179 i = e.id, 3180 r = s[i]; 3181 (s[i] = null), 3182 "success" === e.status 3183 ? r.onComplete(e.payload) 3184 : r.onError && r.onError(); 3185 }); 3186 } 3187 function o(t, e) { 3188 var r = "processId_" + (i += 1); 3189 return (s[r] = { onComplete: t, onError: e }), r; 3190 } 3191 return { 3192 loadAnimation: function (t, i, s) { 3193 a(); 3194 var r = o(i, s); 3195 e.postMessage({ 3196 type: "loadAnimation", 3197 path: t, 3198 fullPath: window.location.origin + window.location.pathname, 3199 id: r, 3200 }); 3201 }, 3202 loadData: function (t, i, s) { 3203 a(); 3204 var r = o(i, s); 3205 e.postMessage({ 3206 type: "loadData", 3207 path: t, 3208 fullPath: window.location.origin + window.location.pathname, 3209 id: r, 3210 }); 3211 }, 3212 completeAnimation: function (t, i, s) { 3213 a(); 3214 var r = o(i, s); 3215 e.postMessage({ type: "complete", animation: t, id: r }); 3216 }, 3217 }; 3218 })(), 3219 ImagePreloader = (function () { 3220 var t = (function () { 3221 var t = createTag("canvas"); 3222 (t.width = 1), (t.height = 1); 3223 var e = t.getContext("2d"); 3224 return ( 3225 (e.fillStyle = "rgba(0,0,0,0)"), e.fillRect(0, 0, 1, 1), t 3226 ); 3227 })(); 3228 function e() { 3229 (this.loadedAssets += 1), 3230 this.loadedAssets === this.totalImages && 3231 this.loadedFootagesCount === this.totalFootages && 3232 this.imagesLoadedCb && 3233 this.imagesLoadedCb(null); 3234 } 3235 function i() { 3236 (this.loadedFootagesCount += 1), 3237 this.loadedAssets === this.totalImages && 3238 this.loadedFootagesCount === this.totalFootages && 3239 this.imagesLoadedCb && 3240 this.imagesLoadedCb(null); 3241 } 3242 function s(t, e, i) { 3243 var s = ""; 3244 if (t.e) s = t.p; 3245 else if (e) { 3246 var r = t.p; 3247 -1 !== r.indexOf("images/") && (r = r.split("/")[1]), 3248 (s = e + r); 3249 } else s = i + (t.u ? t.u : "") + t.p; 3250 return s; 3251 } 3252 function r(t) { 3253 var e = 0, 3254 i = setInterval( 3255 function () { 3256 (t.getBBox().width || e > 500) && 3257 (this._imageLoaded(), clearInterval(i)), 3258 (e += 1); 3259 }.bind(this), 3260 50 3261 ); 3262 } 3263 function n(t) { 3264 var e = { assetData: t }, 3265 i = s(t, this.assetsPath, this.path); 3266 return ( 3267 dataManager.loadData( 3268 i, 3269 function (t) { 3270 (e.img = t), this._footageLoaded(); 3271 }.bind(this), 3272 function () { 3273 (e.img = {}), this._footageLoaded(); 3274 }.bind(this) 3275 ), 3276 e 3277 ); 3278 } 3279 function a() { 3280 (this._imageLoaded = e.bind(this)), 3281 (this._footageLoaded = i.bind(this)), 3282 (this.testImageLoaded = r.bind(this)), 3283 (this.createFootageData = n.bind(this)), 3284 (this.assetsPath = ""), 3285 (this.path = ""), 3286 (this.totalImages = 0), 3287 (this.totalFootages = 0), 3288 (this.loadedAssets = 0), 3289 (this.loadedFootagesCount = 0), 3290 (this.imagesLoadedCb = null),
3291 (this.images = []); 3292 } 3293 return ( 3294 (a.prototype = { 3295 loadAssets: function (t, e) { 3296 this.imagesLoadedCb = e; 3297 var i, 3298 s = t.length; 3299 for (i = 0; i < s; i += 1) 3300 t[i].layers || 3301 (t[i].t && "seq" !== t[i].t 3302 ? 3 === t[i].t && 3303 ((this.totalFootages += 1), 3304 this.images.push(this.createFootageData(t[i]))) 3305 : ((this.totalImages += 1), 3306 this.images.push(this._createImageData(t[i])))); 3307 }, 3308 setAssetsPath: function (t) { 3309 this.assetsPath = t || ""; 3310 }, 3311 setPath: function (t) { 3312 this.path = t || ""; 3313 }, 3314 loadedImages: function () { 3315 return this.totalImages === this.loadedAssets; 3316 }, 3317 loadedFootages: function () { 3318 return this.totalFootages === this.loadedFootagesCount; 3319 }, 3320 destroy: function () { 3321 (this.imagesLoadedCb = null), (this.images.length = 0); 3322 }, 3323 getAsset: function (t) { 3324 for (var e = 0, i = this.images.length; e < i; ) { 3325 if (this.images[e].assetData === t) 3326 return this.images[e].img; 3327 e += 1; 3328 } 3329 return null; 3330 }, 3331 createImgData: function (e) { 3332 var i = s(e, this.assetsPath, this.path), 3333 r = createTag("img"); 3334 (r.crossOrigin = "anonymous"), 3335 r.addEventListener("load", this._imageLoaded, !1), 3336 r.addEventListener( 3337 "error", 3338 function () { 3339 (n.img = t), this._imageLoaded(); 3340 }.bind(this), 3341 !1 3342 ), 3343 (r.src = i); 3344 var n = { img: r, assetData: e }; 3345 return n; 3346 }, 3347 createImageData: function (e) { 3348 var i = s(e, this.assetsPath, this.path), 3349 r = createNS("image"); 3350 isSafari 3351 ? this.testImageLoaded(r) 3352 : r.addEventListener("load", this._imageLoaded, !1), 3353 r.addEventListener( 3354 "error", 3355 function () { 3356 (n.img = t), this._imageLoaded(); 3357 }.bind(this), 3358 !1 3359 ), 3360 r.setAttributeNS( 3361 "http://www.w3.org/1999/xlink", 3362 "href", 3363 i 3364 ), 3365 this._elementHelper.append 3366 ? this._elementHelper.append(r) 3367 : this._elementHelper.appendChild(r); 3368 var n = { img: r, assetData: e }; 3369 return n; 3370 }, 3371 imageLoaded: e, 3372 footageLoaded: i, 3373 setCacheType: function (t, e) { 3374 "svg" === t 3375 ? ((this._elementHelper = e), 3376 (this._createImageData = 3377 this.createImageData.bind(this))) 3378 : (this._createImageData = this.createImgData.bind(this)); 3379 }, 3380 }), 3381 a 3382 ); 3383 })(); 3384 function BaseEvent() {} 3385 BaseEvent.prototype = { 3386 triggerEvent: function (t, e) { 3387 if (this._cbs[t]) 3388 for (var i = this._cbs[t], s = 0; s < i.length; s += 1) i[s](e); 3389 }, 3390 addEventListener: function (t, e) { 3391 return ( 3392 this._cbs[t] || (this._cbs[t] = []), 3393 this._cbs[t].push(e), 3394 function () { 3395 this.removeEventListener(t, e); 3396 }.bind(this) 3397 ); 3398 }, 3399 removeEventListener: function (t, e) { 3400 if (e) { 3401 if (this._cbs[t]) { 3402 for (var i = 0, s = this._cbs[t].length; i < s; ) 3403 this._cbs[t][i] === e && 3404 (this._cbs[t].splice(i, 1), (i -= 1), (s -= 1)), 3405 (i += 1); 3406 this._cbs[t].length || (this._cbs[t] = null); 3407 } 3408 } else this._cbs[t] = null; 3409 }, 3410 }; 3411 var markerParser = (function () { 3412 function t(t) { 3413 for ( 3414 var e, i = t.split("\r\n"), s = {}, r = 0, n = 0; 3415 n < i.length; 3416 n += 1 3417 ) 3418 2 === (e = i[n].split(":")).length && 3419 ((s[e[0]] = e[1].trim()), (r += 1)); 3420 if (0 === r) throw Error(); 3421 return s; 3422 } 3423 return function (e) { 3424 for (var i = [], s = 0; s < e.length; s += 1) { 3425 var r = e[s], 3426 n = { time: r.tm, duration: r.dr }; 3427 try { 3428 n.payload = JSON.parse(e[s].cm); 3429 } catch (i) { 3430 try { 3431 n.payload = t(e[s].cm); 3432 } catch (t) { 3433 n.payload = { name: e[s].cm }; 3434 } 3435 } 3436 i.push(n); 3437 } 3438 return i; 3439 }; 3440 })(), 3441 ProjectInterface = (function () { 3442 function t(t) { 3443 this.compositions.push(t); 3444 } 3445 return function () { 3446 function e(t) { 3447 for (var e = 0, i = this.compositions.length; e < i; ) { 3448 if ( 3449 this.compositions[e].data && 3450 this.compositions[e].data.nm === t 3451 ) 3452 return ( 3453 this.compositions[e].prepareFrame && 3454 this.compositions[e].data.xt && 3455 this.compositions[e].prepareFrame(this.currentFrame), 3456 this.compositions[e].compInterface 3457 ); 3458 e += 1; 3459 } 3460 return null; 3461 } 3462 return ( 3463 (e.compositions = []), 3464 (e.currentFrame = 0), 3465 (e.registerComposition = t), 3466 e 3467 ); 3468 }; 3469 })(), 3470 renderers = {}, 3471 registerRenderer = function (t, e) { 3472 renderers[t] = e; 3473 }; 3474 function getRenderer(t) { 3475 return renderers[t]; 3476 } 3477 function getRegisteredRenderer() { 3478 if (renderers.canvas) return "canvas"; 3479 for (var t in renderers) if (renderers[t]) return t; 3480 return ""; 3481 } 3482 function _typeof$4(t) { 3483 return (_typeof$4 = 3484 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 3485 ? function (t) { 3486 return typeof t; 3487 } 3488 : function (t) { 3489 return t && 3490 "function" == typeof Symbol && 3491 t.constructor === Symbol && 3492 t !== Symbol.prototype 3493 ? "symbol" 3494 : typeof t; 3495 })(t); 3496 } 3497 var AnimationItem = function () { 3498 (this._cbs = []), 3499 (this.name = ""), 3500 (this.path = ""), 3501 (this.isLoaded = !1), 3502 (this.currentFrame = 0), 3503 (this.currentRawFrame = 0), 3504 (this.firstFrame = 0), 3505 (this.totalFrames = 0), 3506 (this.frameRate = 0), 3507 (this.frameMult = 0), 3508 (this.playSpeed = 1), 3509 (this.playDirection = 1), 3510 (this.playCount = 0), 3511 (this.animationData = {}), 3512 (this.assets = []), 3513 (this.isPaused = !0), 3514 (this.autoplay = !1), 3515 (this.loop = !0), 3516 (this.renderer = null),
3517 (this.animationID = createElementID()), 3518 (this.assetsPath = ""), 3519 (this.timeCompleted = 0), 3520 (this.segmentPos = 0), 3521 (this.isSubframeEnabled = getSubframeEnabled()), 3522 (this.segments = []), 3523 (this._idle = !0), 3524 (this._completedLoop = !1), 3525 (this.projectInterface = ProjectInterface()), 3526 (this.imagePreloader = new ImagePreloader()), 3527 (this.audioController = audioControllerFactory()), 3528 (this.markers = []), 3529 (this.configAnimation = this.configAnimation.bind(this)), 3530 (this.onSetupError = this.onSetupError.bind(this)), 3531 (this.onSegmentComplete = this.onSegmentComplete.bind(this)), 3532 (this.drawnFrameEvent = new BMEnterFrameEvent( 3533 "drawnFrame", 3534 0, 3535 0, 3536 0 3537 )), 3538 (this.expressionsPlugin = getExpressionsPlugin()); 3539 }; 3540 extendPrototype([BaseEvent], AnimationItem), 3541 (AnimationItem.prototype.setParams = function (t) { 3542 (t.wrapper || t.container) && 3543 (this.wrapper = t.wrapper || t.container); 3544 var e = "svg"; 3545 t.animType ? (e = t.animType) : t.renderer && (e = t.renderer); 3546 var i = getRenderer(e); 3547 (this.renderer = new i(this, t.rendererSettings)), 3548 this.imagePreloader.setCacheType( 3549 e, 3550 this.renderer.globalData.defs 3551 ), 3552 this.renderer.setProjectInterface(this.projectInterface), 3553 (this.animType = e), 3554 "" === t.loop || 3555 null === t.loop || 3556 void 0 === t.loop || 3557 !0 === t.loop 3558 ? (this.loop = !0) 3559 : !1 === t.loop 3560 ? (this.loop = !1) 3561 : (this.loop = parseInt(t.loop, 10)), 3562 (this.autoplay = !("autoplay" in t) || t.autoplay), 3563 (this.name = t.name ? t.name : ""), 3564 (this.autoloadSegments = 3565 !Object.prototype.hasOwnProperty.call( 3566 t, 3567 "autoloadSegments" 3568 ) || t.autoloadSegments), 3569 (this.assetsPath = t.assetsPath), 3570 (this.initialSegment = t.initialSegment), 3571 t.audioFactory && 3572 this.audioController.setAudioFactory(t.audioFactory), 3573 t.animationData 3574 ? this.setupAnimation(t.animationData) 3575 : t.path && 3576 (-1 !== t.path.lastIndexOf("\\") 3577 ? (this.path = t.path.substr( 3578 0, 3579 t.path.lastIndexOf("\\") + 1 3580 )) 3581 : (this.path = t.path.substr( 3582 0, 3583 t.path.lastIndexOf("/") + 1 3584 )), 3585 (this.fileName = t.path.substr( 3586 t.path.lastIndexOf("/") + 1 3587 )), 3588 (this.fileName = this.fileName.substr( 3589 0, 3590 this.fileName.lastIndexOf(".json") 3591 )), 3592 dataManager.loadAnimation( 3593 t.path, 3594 this.configAnimation, 3595 this.onSetupError 3596 )); 3597 }), 3598 (AnimationItem.prototype.onSetupError = function () { 3599 this.trigger("data_failed"); 3600 }), 3601 (AnimationItem.prototype.setupAnimation = function (t) { 3602 dataManager.completeAnimation(t, this.configAnimation); 3603 }), 3604 (AnimationItem.prototype.setData = function (t, e) { 3605 e && "object" !== _typeof$4(e) && (e = JSON.parse(e)); 3606 var i = { wrapper: t, animationData: e }, 3607 s = t.attributes; 3608 (i.path = s.getNamedItem("data-animation-path") 3609 ? s.getNamedItem("data-animation-path").value 3610 : s.getNamedItem("data-bm-path") 3611 ? s.getNamedItem("data-bm-path").value 3612 : s.getNamedItem("bm-path") 3613 ? s.getNamedItem("bm-path").value 3614 : ""), 3615 (i.animType = s.getNamedItem("data-anim-type") 3616 ? s.getNamedItem("data-anim-type").value 3617 : s.getNamedItem("data-bm-type") 3618 ? s.getNamedItem("data-bm-type").value 3619 : s.getNamedItem("bm-type") 3620 ? s.getNamedItem("bm-type").value 3621 : s.getNamedItem("data-bm-renderer") 3622 ? s.getNamedItem("data-bm-renderer").value 3623 : s.getNamedItem("bm-renderer") 3624 ? s.getNamedItem("bm-renderer").value 3625 : getRegisteredRenderer() || "canvas"); 3626 var r = s.getNamedItem("data-anim-loop") 3627 ? s.getNamedItem("data-anim-loop").value 3628 : s.getNamedItem("data-bm-loop") 3629 ? s.getNamedItem("data-bm-loop").value 3630 : s.getNamedItem("bm-loop") 3631 ? s.getNamedItem("bm-loop").value 3632 : ""; 3633 "false" === r 3634 ? (i.loop = !1) 3635 : "true" === r 3636 ? (i.loop = !0) 3637 : "" !== r && (i.loop = parseInt(r, 10)), 3638 (i.autoplay = 3639 "false" !==
3640 (s.getNamedItem("data-anim-autoplay") 3641 ? s.getNamedItem("data-anim-autoplay").value 3642 : s.getNamedItem("data-bm-autoplay") 3643 ? s.getNamedItem("data-bm-autoplay").value 3644 : !s.getNamedItem("bm-autoplay") || 3645 s.getNamedItem("bm-autoplay").value)), 3646 (i.name = s.getNamedItem("data-name") 3647 ? s.getNamedItem("data-name").value 3648 : s.getNamedItem("data-bm-name") 3649 ? s.getNamedItem("data-bm-name").value 3650 : s.getNamedItem("bm-name") 3651 ? s.getNamedItem("bm-name").value 3652 : ""), 3653 "false" === 3654 (s.getNamedItem("data-anim-prerender") 3655 ? s.getNamedItem("data-anim-prerender").value 3656 : s.getNamedItem("data-bm-prerender") 3657 ? s.getNamedItem("data-bm-prerender").value 3658 : s.getNamedItem("bm-prerender") 3659 ? s.getNamedItem("bm-prerender").value 3660 : "") && (i.prerender = !1), 3661 i.path ? this.setParams(i) : this.trigger("destroy"); 3662 }), 3663 (AnimationItem.prototype.includeLayers = function (t) { 3664 t.op > this.animationData.op && 3665 ((this.animationData.op = t.op), 3666 (this.totalFrames = Math.floor(t.op - this.animationData.ip))); 3667 var e, 3668 i, 3669 s = this.animationData.layers, 3670 r = s.length, 3671 n = t.layers, 3672 a = n.length; 3673 for (i = 0; i < a; i += 1) 3674 for (e = 0; e < r; ) { 3675 if (s[e].id === n[i].id) { 3676 s[e] = n[i]; 3677 break; 3678 } 3679 e += 1; 3680 } 3681 if ( 3682 ((t.chars || t.fonts) && 3683 (this.renderer.globalData.fontManager.addChars(t.chars), 3684 this.renderer.globalData.fontManager.addFonts( 3685 t.fonts, 3686 this.renderer.globalData.defs 3687 )), 3688 t.assets) 3689 ) 3690 for (r = t.assets.length, e = 0; e < r; e += 1) 3691 this.animationData.assets.push(t.assets[e]); 3692 (this.animationData.__complete = !1), 3693 dataManager.completeAnimation( 3694 this.animationData, 3695 this.onSegmentComplete 3696 ); 3697 }), 3698 (AnimationItem.prototype.onSegmentComplete = function (t) { 3699 this.animationData = t; 3700 var e = getExpressionsPlugin(); 3701 e && e.initExpressions(this), this.loadNextSegment(); 3702 }), 3703 (AnimationItem.prototype.loadNextSegment = function () { 3704 var t = this.animationData.segments; 3705 if (!t || 0 === t.length || !this.autoloadSegments) 3706 return ( 3707 this.trigger("data_ready"), 3708 void (this.timeCompleted = this.totalFrames) 3709 ); 3710 var e = t.shift(); 3711 this.timeCompleted = e.time * this.frameRate; 3712 var i = 3713 this.path + this.fileName + "_" + this.segmentPos + ".json"; 3714 (this.segmentPos += 1), 3715 dataManager.loadData( 3716 i, 3717 this.includeLayers.bind(this), 3718 function () { 3719 this.trigger("data_failed"); 3720 }.bind(this) 3721 ); 3722 }), 3723 (AnimationItem.prototype.loadSegments = function () { 3724 this.animationData.segments || 3725 (this.timeCompleted = this.totalFrames), 3726 this.loadNextSegment(); 3727 }), 3728 (AnimationItem.prototype.imagesLoaded = function () { 3729 this.trigger("loaded_images"), this.checkLoaded(); 3730 }), 3731 (AnimationItem.prototype.preloadImages = function () { 3732 this.imagePreloader.setAssetsPath(this.assetsPath), 3733 this.imagePreloader.setPath(this.path), 3734 this.imagePreloader.loadAssets( 3735 this.animationData.assets, 3736 this.imagesLoaded.bind(this) 3737 ); 3738 }), 3739 (AnimationItem.prototype.configAnimation = function (t) { 3740 if (this.renderer) 3741 try { 3742 (this.animationData = t), 3743 this.initialSegment 3744 ? ((this.totalFrames = Math.floor( 3745 this.initialSegment[1] - this.initialSegment[0] 3746 )), 3747 (this.firstFrame = Math.round(this.initialSegment[0]))) 3748 : ((this.totalFrames = Math.floor( 3749 this.animationData.op - this.animationData.ip 3750 )), 3751 (this.firstFrame = Math.round(this.animationData.ip))), 3752 this.renderer.configAnimation(t), 3753 t.assets || (t.assets = []), 3754 (this.assets = this.animationData.assets), 3755 (this.frameRate = this.animationData.fr), 3756 (this.frameMult = this.animationData.fr / 1e3), 3757 this.renderer.searchExtraCompositions(t.assets), 3758 (this.markers = markerParser(t.markers || [])), 3759 this.trigger("config_ready"), 3760 this.preloadImages(), 3761 this.loadSegments(), 3762 this.updaFrameModifier(), 3763 this.waitForFontsLoaded(), 3764 this.isPaused && this.audioController.pause(); 3765 } catch (t) { 3766 this.triggerConfigError(t); 3767 } 3768 }), 3769 (AnimationItem.prototype.waitForFontsLoaded = function () { 3770 this.renderer && 3771 (this.renderer.globalData.fontManager.isLoaded 3772 ? this.checkLoaded() 3773 : setTimeout(this.waitForFontsLoaded.bind(this), 20)); 3774 }), 3775 (AnimationItem.prototype.checkLoaded = function () { 3776 if ( 3777 !this.isLoaded && 3778 this.renderer.globalData.fontManager.isLoaded && 3779 (this.imagePreloader.loadedImages() || 3780 "canvas" !== this.renderer.rendererType) && 3781 this.imagePreloader.loadedFootages() 3782 ) { 3783 this.isLoaded = !0; 3784 var t = getExpressionsPlugin(); 3785 t && t.initExpressions(this), 3786 this.renderer.initItems(), 3787 setTimeout( 3788 function () { 3789 this.trigger("DOMLoaded"); 3790 }.bind(this), 3791 0 3792 ), 3793 this.gotoFrame(), 3794 this.autoplay && this.play(); 3795 } 3796 }), 3797 (AnimationItem.prototype.resize = function (t, e) { 3798 var i = "number" == typeof t ? t : void 0, 3799 s = "number" == typeof e ? e : void 0; 3800 this.renderer.updateContainerSize(i, s); 3801 }), 3802 (AnimationItem.prototype.setSubframe = function (t) { 3803 this.isSubframeEnabled = !!t; 3804 }), 3805 (AnimationItem.prototype.gotoFrame = function () { 3806 (this.currentFrame = this.isSubframeEnabled 3807 ? this.currentRawFrame 3808 : ~~this.currentRawFrame), 3809 this.timeCompleted !== this.totalFrames && 3810 this.currentFrame > this.timeCompleted && 3811 (this.currentFrame = this.timeCompleted), 3812 this.trigger("enterFrame"), 3813 this.renderFrame(), 3814 this.trigger("drawnFrame"); 3815 }), 3816 (AnimationItem.prototype.renderFrame = function () { 3817 if (!1 !== this.isLoaded && this.renderer) 3818 try { 3819 this.expressionsPlugin && this.expressionsPlugin.resetFrame
3819(), 3820 this.renderer.renderFrame( 3821 this.currentFrame + this.firstFrame 3822 ); 3823 } catch (t) { 3824 this.triggerRenderFrameError(t); 3825 } 3826 }), 3827 (AnimationItem.prototype.play = function (t) { 3828 (t && this.name !== t) || 3829 (!0 === this.isPaused && 3830 ((this.isPaused = !1), 3831 this.trigger("_play"), 3832 this.audioController.resume(), 3833 this._idle && ((this._idle = !1), this.trigger("_active")))); 3834 }), 3835 (AnimationItem.prototype.pause = function (t) { 3836 (t && this.name !== t) || 3837 (!1 === this.isPaused && 3838 ((this.isPaused = !0), 3839 this.trigger("_pause"), 3840 (this._idle = !0), 3841 this.trigger("_idle"), 3842 this.audioController.pause())); 3843 }), 3844 (AnimationItem.prototype.togglePause = function (t) { 3845 (t && this.name !== t) || 3846 (!0 === this.isPaused ? this.play() : this.pause()); 3847 }), 3848 (AnimationItem.prototype.stop = function (t) { 3849 (t && this.name !== t) || 3850 (this.pause(), 3851 (this.playCount = 0), 3852 (this._completedLoop = !1), 3853 this.setCurrentRawFrameValue(0)); 3854 }), 3855 (AnimationItem.prototype.getMarkerData = function (t) { 3856 for (var e, i = 0; i < this.markers.length; i += 1) 3857 if ((e = this.markers[i]).payload && e.payload.name === t) 3858 return e; 3859 return null; 3860 }), 3861 (AnimationItem.prototype.goToAndStop = function (t, e, i) { 3862 if (!i || this.name === i) { 3863 if (isNaN(Number(t))) { 3864 var s = this.getMarkerData(t); 3865 s && this.goToAndStop(s.time, !0); 3866 } else 3867 e 3868 ? this.setCurrentRawFrameValue(t) 3869 : this.setCurrentRawFrameValue(t * this.frameModifier); 3870 this.pause(); 3871 } 3872 }), 3873 (AnimationItem.prototype.goToAndPlay = function (t, e, i) { 3874 if (!i || this.name === i) { 3875 var s = Number(t); 3876 if (isNaN(s)) { 3877 var r = this.getMarkerData(t); 3878 r && 3879 (r.duration 3880 ? this.playSegments([r.time, r.time + r.duration], !0) 3881 : this.goToAndStop(r.time, !0)); 3882 } else this.goToAndStop(s, e, i); 3883 this.play(); 3884 } 3885 }), 3886 (AnimationItem.prototype.advanceTime = function (t) { 3887 if (!0 !== this.isPaused && !1 !== this.isLoaded) { 3888 var e = this.currentRawFrame + t * this.frameModifier, 3889 i = !1; 3890 e >= this.totalFrames - 1 && this.frameModifier > 0 3891 ? this.loop && this.playCount !== this.loop 3892 ? e >= this.totalFrames 3893 ? ((this.playCount += 1), 3894 this.checkSegments(e % this.totalFrames) || 3895 (this.setCurrentRawFrameValue(e % this.totalFrames), 3896 (this._completedLoop = !0), 3897 this.trigger("loopComplete"))) 3898 : this.setCurrentRawFrameValue(e) 3899 : this.checkSegments( 3900 e > this.totalFrames ? e % this.totalFrames : 0 3901 ) || ((i = !0), (e = this.totalFrames - 1)) 3902 : e < 0 3903 ? this.checkSegments(e % this.totalFrames) || 3904 (!this.loop || (this.playCount-- <= 0 && !0 !== this.loop) 3905 ? ((i = !0), (e = 0)) 3906 : (this.setCurrentRawFrameValue( 3907 this.totalFrames + (e % this.totalFrames) 3908 ), 3909 this._completedLoop 3910 ? this.trigger("loopComplete")
3911 : (this._completedLoop = !0))) 3912 : this.setCurrentRawFrameValue(e), 3913 i && 3914 (this.setCurrentRawFrameValue(e), 3915 this.pause(), 3916 this.trigger("complete")); 3917 } 3918 }), 3919 (AnimationItem.prototype.adjustSegment = function (t, e) { 3920 (this.playCount = 0), 3921 t[1] < t[0] 3922 ? (this.frameModifier > 0 && 3923 (this.playSpeed < 0 3924 ? this.setSpeed(-this.playSpeed) 3925 : this.setDirection(-1)), 3926 (this.totalFrames = t[0] - t[1]), 3927 (this.timeCompleted = this.totalFrames), 3928 (this.firstFrame = t[1]), 3929 this.setCurrentRawFrameValue(this.totalFrames - 0.001 - e)) 3930 : t[1] > t[0] && 3931 (this.frameModifier < 0 && 3932 (this.playSpeed < 0 3933 ? this.setSpeed(-this.playSpeed) 3934 : this.setDirection(1)), 3935 (this.totalFrames = t[1] - t[0]), 3936 (this.timeCompleted = this.totalFrames), 3937 (this.firstFrame = t[0]), 3938 this.setCurrentRawFrameValue(0.001 + e)), 3939 this.trigger("segmentStart"); 3940 }), 3941 (AnimationItem.prototype.setSegment = function (t, e) { 3942 var i = -1; 3943 this.isPaused && 3944 (this.currentRawFrame + this.firstFrame < t 3945 ? (i = t) 3946 : this.currentRawFrame + this.firstFrame > e && (i = e - t)), 3947 (this.firstFrame = t), 3948 (this.totalFrames = e - t), 3949 (this.timeCompleted = this.totalFrames), 3950 -1 !== i && this.goToAndStop(i, !0); 3951 }), 3952 (AnimationItem.prototype.playSegments = function (t, e) { 3953 if ( 3954 (e && (this.segments.length = 0), "object" === _typeof$4(t[0])) 3955 ) { 3956 var i, 3957 s = t.length; 3958 for (i = 0; i < s; i += 1) this.segments.push(t[i]); 3959 } else this.segments.push(t); 3960 this.segments.length && 3961 e && 3962 this.adjustSegment(this.segments.shift(), 0), 3963 this.isPaused && this.play(); 3964 }), 3965 (AnimationItem.prototype.resetSegments = function (t) { 3966 (this.segments.length = 0), 3967 this.segments.push([ 3968 this.animationData.ip, 3969 this.animationData.op, 3970 ]), 3971 t && this.checkSegments(0); 3972 }), 3973 (AnimationItem.prototype.checkSegments = function (t) { 3974 return ( 3975 !!this.segments.length && 3976 (this.adjustSegment(this.segments.shift(), t), !0) 3977 ); 3978 }), 3979 (AnimationItem.prototype.destroy = function (t) { 3980 (t && this.name !== t) || 3981 !this.renderer || 3982 (this.renderer.destroy(), 3983 this.imagePreloader.destroy(), 3984 this.trigger("destroy"), 3985 (this._cbs = null), 3986 (this.onEnterFrame = null), 3987 (this.onLoopComplete = null), 3988 (this.onComplete = null), 3989 (this.onSegmentStart = null), 3990 (this.onDestroy = null),
3991 (this.renderer = null), 3992 (this.expressionsPlugin = null), 3993 (this.imagePreloader = null), 3994 (this.projectInterface = null)); 3995 }), 3996 (AnimationItem.prototype.setCurrentRawFrameValue = function (t) { 3997 (this.currentRawFrame = t), this.gotoFrame(); 3998 }), 3999 (AnimationItem.prototype.setSpeed = function (t) { 4000 (this.playSpeed = t), this.updaFrameModifier(); 4001 }), 4002 (AnimationItem.prototype.setDirection = function (t) { 4003 (this.playDirection = t < 0 ? -1 : 1), this.updaFrameModifier(); 4004 }), 4005 (AnimationItem.prototype.setLoop = function (t) { 4006 this.loop = t; 4007 }), 4008 (AnimationItem.prototype.setVolume = function (t, e) { 4009 (e && this.name !== e) || this.audioController.setVolume(t); 4010 }), 4011 (AnimationItem.prototype.getVolume = function () { 4012 return this.audioController.getVolume(); 4013 }), 4014 (AnimationItem.prototype.mute = function (t) { 4015 (t && this.name !== t) || this.audioController.mute(); 4016 }), 4017 (AnimationItem.prototype.unmute = function (t) { 4018 (t && this.name !== t) || this.audioController.unmute(); 4019 }), 4020 (AnimationItem.prototype.updaFrameModifier = function () { 4021 (this.frameModifier = 4022 this.frameMult * this.playSpeed * this.playDirection), 4023 this.audioController.setRate( 4024 this.playSpeed * this.playDirection 4025 ); 4026 }), 4027 (AnimationItem.prototype.getPath = function () { 4028 return this.path; 4029 }), 4030 (AnimationItem.prototype.getAssetsPath = function (t) { 4031 var e = ""; 4032 if (t.e) e = t.p; 4033 else if (this.assetsPath) { 4034 var i = t.p; 4035 -1 !== i.indexOf("images/") && (i = i.split("/")[1]), 4036 (e = this.assetsPath + i); 4037 } else e = this.path + (t.u ? t.u : "") + t.p; 4038 return e; 4039 }), 4040 (AnimationItem.prototype.getAssetData = function (t) { 4041 for (var e = 0, i = this.assets.length; e < i; ) {
4042 if (t === this.assets[e].id) return this.assets[e]; 4043 e += 1; 4044 } 4045 return null; 4046 }), 4047 (AnimationItem.prototype.hide = function () { 4048 this.renderer.hide(); 4049 }), 4050 (AnimationItem.prototype.show = function () { 4051 this.renderer.show(); 4052 }), 4053 (AnimationItem.prototype.getDuration = function (t) { 4054 return t ? this.totalFrames : this.totalFrames / this.frameRate; 4055 }), 4056 (AnimationItem.prototype.updateDocumentData = function (t, e, i) { 4057 try { 4058 this.renderer.getElementByPath(t).updateDocumentData(e, i); 4059 } catch (t) {} 4060 }), 4061 (AnimationItem.prototype.trigger = function (t) { 4062 if (this._cbs && this._cbs[t]) 4063 switch (t) { 4064 case "enterFrame": 4065 this.triggerEvent( 4066 t, 4067 new BMEnterFrameEvent( 4068 t, 4069 this.currentFrame, 4070 this.totalFrames, 4071 this.frameModifier 4072 ) 4073 ); 4074 break; 4075 case "drawnFrame": 4076 (this.drawnFrameEvent.currentTime = this.currentFrame), 4077 (this.drawnFrameEvent.totalTime = this.totalFrames), 4078 (this.drawnFrameEvent.direction = this.frameModifier), 4079 this.triggerEvent(t, this.drawnFrameEvent); 4080 break; 4081 case "loopComplete": 4082 this.triggerEvent( 4083 t, 4084 new BMCompleteLoopEvent( 4085 t, 4086 this.loop, 4087 this.playCount, 4088 this.frameMult 4089 ) 4090 ); 4091 break; 4092 case "complete": 4093 this.triggerEvent( 4094 t, 4095 new BMCompleteEvent(t, this.frameMult) 4096 ); 4097 break; 4098 case "segmentStart": 4099 this.triggerEvent( 4100 t, 4101 new BMSegmentStartEvent( 4102 t, 4103 this.firstFrame, 4104 this.totalFrames 4105 ) 4106 ); 4107 break; 4108 case "destroy": 4109 this.triggerEvent(t, new BMDestroyEvent(t, this)); 4110 break; 4111 default: 4112 this.triggerEvent(t); 4113 } 4114 "enterFrame" === t && 4115 this.onEnterFrame && 4116 this.onEnterFrame.call( 4117 this, 4118 new BMEnterFrameEvent( 4119 t, 4120 this.currentFrame, 4121 this.totalFrames, 4122 this.frameMult 4123 ) 4124 ), 4125 "loopComplete" === t && 4126 this.onLoopComplete && 4127 this.onLoopComplete.call( 4128 this, 4129 new BMCompleteLoopEvent( 4130 t, 4131 this.loop, 4132 this.playCount, 4133 this.frameMult 4134 ) 4135 ), 4136 "complete" === t && 4137 this.onComplete && 4138 this.onComplete.call( 4139 this, 4140 new BMCompleteEvent(t, this.frameMult) 4141 ), 4142 "segmentStart" === t && 4143 this.onSegmentStart && 4144 this.onSegmentStart.call( 4145 this, 4146 new BMSegmentStartEvent( 4147 t, 4148 this.firstFrame, 4149 this.totalFrames 4150 ) 4151 ), 4152 "destroy" === t && 4153 this.onDestroy && 4154 this.onDestroy.call(this, new BMDestroyEvent(t, this)); 4155 }),
4156 (AnimationItem.prototype.triggerRenderFrameError = function (t) { 4157 var e = new BMRenderFrameErrorEvent(t, this.currentFrame); 4158 this.triggerEvent("error", e), 4159 this.onError && this.onError.call(this, e); 4160 }), 4161 (AnimationItem.prototype.triggerConfigError = function (t) { 4162 var e = new BMConfigErrorEvent(t, this.currentFrame); 4163 this.triggerEvent("error", e), 4164 this.onError && this.onError.call(this, e); 4165 }); 4166 var animationManager = (function () { 4167 var t = {}, 4168 e = [], 4169 i = 0, 4170 s = 0, 4171 r = 0, 4172 n = !0, 4173 a = !1; 4174 function o(t) { 4175 for (var i = 0, r = t.target; i < s; ) 4176 e[i].animation === r && 4177 (e.splice(i, 1), (i -= 1), (s -= 1), r.isPaused || p()), 4178 (i += 1); 4179 } 4180 function h(t, i) { 4181 if (!t) return null; 4182 for (var r = 0; r < s; ) { 4183 if (e[r].elem === t && null !== e[r].elem) 4184 return e[r].animation; 4185 r += 1; 4186 } 4187 var n = new AnimationItem(); 4188 return f(n, t), n.setData(t, i), n; 4189 } 4190 function l() { 4191 (r += 1), m(); 4192 } 4193 function p() { 4194 r -= 1; 4195 } 4196 function f(t, i) { 4197 t.addEventListener("destroy", o), 4198 t.addEventListener("_active", l), 4199 t.addEventListener("_idle", p), 4200 e.push({ elem: i, animation: t }), 4201 (s += 1); 4202 } 4203 function c(t) { 4204 var o, 4205 h = t - i; 4206 for (o = 0; o < s; o += 1) e[o].animation.advanceTime(h); 4207 (i = t), r && !a ? window.requestAnimationFrame(c) : (n = !0); 4208 } 4209 function u(t) { 4210 (i = t), window.requestAnimationFrame(c); 4211 } 4212 function m() { 4213 !a && r && n && (window.requestAnimationFrame(u), (n = !1)); 4214 } 4215 return ( 4216 (t.registerAnimation = h), 4217 (t.loadAnimation = function (t) { 4218 var e = new AnimationItem(); 4219 return f(e, null), e.setParams(t), e; 4220 }), 4221 (t.setSpeed = function (t, i) { 4222 var r; 4223 for (r = 0; r < s; r += 1) e[r].animation.setSpeed(t, i); 4224 }), 4225 (t.setDirection = function (t, i) { 4226 var r; 4227 for (r = 0; r < s; r += 1) e[r].animation.setDirection(t, i); 4228 }), 4229 (t.play = function (t) { 4230 var i; 4231 for (i = 0; i < s; i += 1) e[i].animation.play(t); 4232 }), 4233 (t.pause = function (t) { 4234 var i; 4235 for (i = 0; i < s; i += 1) e[i].animation.pause(t); 4236 }), 4237 (t.stop = function (t) { 4238 var i; 4239 for (i = 0; i < s; i += 1) e[i].animation.stop(t); 4240 }), 4241 (t.togglePause = function (t) { 4242 var i; 4243 for (i = 0; i < s; i += 1) e[i].animation.togglePause(t); 4244 }), 4245 (t.searchAnimations = function (t, e, i) { 4246 var s, 4247 r = [].concat( 4248 [].slice.call(document.getElementsByClassName("lottie")), 4249 [].slice.call( 4250 document.getElementsByClassName("bodymovin") 4251 ) 4252 ), 4253 n = r.length; 4254 for (s = 0; s < n; s += 1) 4255 i && r[s].setAttribute("data-bm-type", i), h(r[s], t); 4256 if (e && 0 === n) { 4257 i || (i = "svg"); 4258 var a = document.getElementsByTagName("body")[0]; 4259 a.innerText = ""; 4260 var o = createTag("div"); 4261 (o.style.width = "100%"), 4262 (o.style.height = "100%"), 4263 o.setAttribute("data-bm-type", i), 4264 a.appendChild(o), 4265 h(o, t); 4266 } 4267 }), 4268 (t.resize = function () { 4269 var t; 4270 for (t = 0; t < s; t += 1) e[t].animation.resize(); 4271 }), 4272 (t.goToAndStop = function (t, i, r) { 4273 var n; 4274 for (n = 0; n < s; n += 1) 4275 e[n].animation.goToAndStop(t, i, r); 4276 }), 4277 (t.destroy = function (t) { 4278 var i; 4279 for (i = s - 1; i >= 0; i -= 1) e[i].animation.destroy(t); 4280 }), 4281 (t.freeze = function () { 4282 a = !0; 4283 }), 4284 (t.unfreeze = function () { 4285 (a = !1), m(); 4286 }), 4287 (t.setVolume = function (t, i) { 4288 var r; 4289 for (r = 0; r < s; r += 1) e[r].animation.setVolume(t, i); 4290 }), 4291 (t.mute = function (t) { 4292 var i; 4293 for (i = 0; i < s; i += 1) e[i].animation.mute(t); 4294 }), 4295 (t.unmute = function (t) { 4296 var i; 4297 for (i = 0; i < s; i += 1) e[i].animation.unmute(t); 4298 }), 4299 (t.getRegisteredAnimations = function () { 4300 var t, 4301 i = e.length, 4302 s = []; 4303 for (t = 0; t < i; t += 1) s.push(e[t].animation); 4304 return s; 4305 }), 4306 t 4307 ); 4308 })(), 4309 BezierFactory = (function () { 4310 var t = { 4311 getBezierEasing: function (t, i, s, r, n) { 4312 var a = 4313 n || 4314 ("bez_" + t + "_" + i + "_" + s + "_" + r).replace( 4315 /\./g, 4316 "p" 4317 ); 4318 if (e[a]) return e[a]; 4319 var o = new p([t, i, s, r]); 4320 return (e[a] = o), o; 4321 }, 4322 }, 4323 e = {}, 4324 i = 11, 4325 s = 0.1, 4326 r = "function" == typeof Float32Array; 4327 function n(t, e) { 4328 return 1 - 3 * e + 3 * t; 4329 } 4330 function a(t, e) { 4331 return 3 * e - 6 * t; 4332 } 4333 function o(t) { 4334 return 3 * t; 4335 } 4336 function h(t, e, i) { 4337 return ((n(e, i) * t + a(e, i)) * t + o(e)) * t; 4338 } 4339 function l(t, e, i) { 4340 return 3 * n(e, i) * t * t + 2 * a(e, i) * t + o(e); 4341 } 4342 function p(t) { 4343 (this._p = t), 4344 (this._mSampleValues = r ? new Float32Array(i) : Array(i)), 4345 (this._precomputed = !1), 4346 (this.get = this.get.bind(this)); 4347 } 4348 return ( 4349 (p.prototype = { 4350 get: function (t) { 4351 var e = this._p[0], 4352 i = this._p[1], 4353 s = this._p[2], 4354 r = this._p[3]; 4355 return ( 4356 this._precomputed || this._precompute(), 4357 e === i && s === r 4358 ? t 4359 : 0 === t 4360 ? 0 4361 : 1 === t 4362 ? 1 4363 : h(this._getTForX(t), i, r) 4364 ); 4365 }, 4366 _precompute: function () { 4367 var t = this._p[0], 4368 e = this._p[1], 4369 i = this._p[2], 4370 s = this._p[3]; 4371 (this._precomputed = !0), 4372 (t === e && i === s) || this._calcSampleValues(); 4373 }, 4374 _calcSampleValues: function () { 4375 for (var t = this._p[0], e = this._p[2], r = 0; r < i; ++r) 4376 this._mSampleValues[r] = h(r * s, t, e); 4377 }, 4378 _getTForX: function (t) { 4379 for ( 4380 var e = this._p[0], 4381 r = this._p[2], 4382 n = this._mSampleValues, 4383 a = 0, 4384 o = 1, 4385 p = i - 1; 4386 o !== p && n[o] <= t; 4387 ++o 4388 ) 4389 a += s; 4390 var f = a + ((t - n[--o]) / (n[o + 1] - n[o])) * s, 4391 c = l(f, e, r); 4392 return c >= 0.001 4393 ? (function (t, e, i, s) { 4394 for (var r = 0; r < 4; ++r) { 4395 var n = l(e, i, s); 4396 if (0 === n) break; 4397 e -= (h(e, i, s) - t) / n; 4398 } 4399 return e; 4400 })(t, f, e, r) 4401 : 0 === c 4402 ? f 4403 : (function (t, e, i, s, r) { 4404 var n, 4405 a, 4406 o = 0; 4407 do 4408 (n = h((a = e + (i - e) / 2), s, r) - t) > 0 4409 ? (i = a) 4410 : (e = a); 4411 while (Math.abs(n) > 1e-7 && ++o < 10); 4412 return a; 4413 })(t, a, a + s, e, r); 4414 }, 4415 }), 4416 t 4417 ); 4418 })(), 4419 pooling = { 4420 double: function (t) { 4421 return t.concat(createSizedArray(t.length)); 4422 }, 4423 }, 4424 poolFactory = function (t, e, i) { 4425 var s = 0, 4426 r = t, 4427 n = createSizedArray(r); 4428 return { 4429 newElement: function () { 4430 return s ? n[(s -= 1)] : e(); 4431 }, 4432 release: function (t) { 4433 s === r && ((n = pooling.double(n)), (r *= 2)), 4434 i && i(t), 4435 (n[s] = t), 4436 (s += 1); 4437 }, 4438 }; 4439 }, 4440 bezierLengthPool = poolFactory(8, function () { 4441 return { 4442 addedLength: 0, 4443 percents: createTypedArray( 4444 "float32", 4445 getDefaultCurveSegments() 4446 ), 4447 lengths: createTypedArray("float32", getDefaultCurveSegments()), 4448 }; 4449 }), 4450 segmentsLengthPool = poolFactory( 4451 8, 4452 function () { 4453 return { lengths: [], totalLength: 0 }; 4454 }, 4455 function (t) { 4456 var e, 4457 i = t.lengths.length; 4458 for (e = 0; e < i; e += 1) 4459 bezierLengthPool.release(t.lengths[e]); 4460 t.lengths.length = 0; 4461 } 4462 ); 4463 function bezFunction() { 4464 var t = Math; 4465 function e(t, e, i, s, r, n) { 4466 var a = t * s + e * r + i * n - r * s - n * t - i * e; 4467 return a > -0.001 && a < 0.001; 4468 } 4469 var i = function (t, e, i, s) { 4470 var r, 4471 n, 4472 a, 4473 o, 4474 h, 4475 l, 4476 p = getDefaultCurveSegments(), 4477 f = 0, 4478 c = [], 4479 u = [], 4480 m = bezierLengthPool.newElement(); 4481 for (a = i.length, r = 0; r < p; r += 1) { 4482 for (h = r / (p - 1), l = 0, n = 0; n < a; n += 1) 4483 (o = 4484 bmPow(1 - h, 3) * t[n] + 4485 3 * bmPow(1 - h, 2) * h * i[n] + 4486 3 * (1 - h) * bmPow(h, 2) * s[n] + 4487 bmPow(h, 3) * e[n]), 4488 (c[n] = o), 4489 null !== u[n] && (l += bmPow(c[n] - u[n], 2)), 4490 (u[n] = c[n]); 4491 l && (f += l = bmSqrt(l)), 4492 (m.percents[r] = h), 4493 (m.lengths[r] = f); 4494 } 4495 return (m.addedLength = f), m; 4496 }; 4497 function s(t) { 4498 (this.segmentLength = 0), (this.points = Array(t)); 4499 } 4500 function r(t, e) { 4501 (this.partialLength = t), (this.point = e); 4502 } 4503 var n, 4504 a = 4505 ((n = {}), 4506 function (t, i, a, o) { 4507 var h = ( 4508 t[0] + 4509 "_" + 4510 t[1] + 4511 "_" + 4512 i[0] + 4513 "_" + 4514 i[1] + 4515 "_" + 4516 a[0] + 4517 "_" + 4518 a[1] + 4519 "_" + 4520 o[0] + 4521 "_" + 4522 o[1] 4523 ).replace(/\./g, "p"); 4524 if (!n[h]) { 4525 var l, 4526 p, 4527 f, 4528 c, 4529 u, 4530 m, 4531 d, 4532 g = getDefaultCurveSegments(), 4533 v = 0, 4534 y = null; 4535 2 === t.length && 4536 (t[0] !== i[0] || t[1] !== i[1]) && 4537 e(t[0], t[1], i[0], i[1], t[0] + a[0], t[1] + a[1]) && 4538 e(t[0], t[1], i[0], i[1], i[0] + o[0], i[1] + o[1]) && 4539 (g = 2); 4540 var b = new s(g); 4541 for (f = a.length, l = 0; l < g; l += 1) { 4542 for ( 4543 d = createSizedArray(f), u = l / (g - 1), m = 0, p = 0; 4544 p < f; 4545 p += 1 4546 ) 4547 (c = 4548 bmPow(1 - u, 3) * t[p] + 4549 3 * bmPow(1 - u, 2) * u * (t[p] + a[p]) + 4550 3 * (1 - u) * bmPow(u, 2) * (i[p] + o[p]) +
4551 bmPow(u, 3) * i[p]), 4552 (d[p] = c), 4553 null !== y && (m += bmPow(d[p] - y[p], 2)); 4554 (v += m = bmSqrt(m)), 4555 (b.points[l] = new r(m, d)), 4556 (y = d); 4557 } 4558 (b.segmentLength = v), (n[h] = b); 4559 } 4560 return n[h]; 4561 }); 4562 function o(t, e) { 4563 var i = e.percents, 4564 s = e.lengths, 4565 r = i.length, 4566 n = bmFloor((r - 1) * t), 4567 a = t * e.addedLength, 4568 o = 0; 4569 if (n === r - 1 || 0 === n || a === s[n]) return i[n]; 4570 for (var h = s[n] > a ? -1 : 1, l = !0; l; ) 4571 if ( 4572 (s[n] <= a && s[n + 1] > a 4573 ? ((o = (a - s[n]) / (s[n + 1] - s[n])), (l = !1)) 4574 : (n += h), 4575 n < 0 || n >= r - 1) 4576 ) { 4577 if (n === r - 1) return i[n]; 4578 l = !1; 4579 } 4580 return i[n] + (i[n + 1] - i[n]) * o; 4581 } 4582 var h = createTypedArray("float32", 8); 4583 return { 4584 getSegmentsLength: function (t) { 4585 var e, 4586 s = segmentsLengthPool.newElement(), 4587 r = t.c, 4588 n = t.v, 4589 a = t.o, 4590 o = t.i, 4591 h = t._length, 4592 l = s.lengths, 4593 p = 0; 4594 for (e = 0; e < h - 1; e += 1) 4595 (l[e] = i(n[e], n[e + 1], a[e], o[e + 1])), 4596 (p += l[e].addedLength); 4597 return ( 4598 r && 4599 h && 4600 ((l[e] = i(n[e], n[0], a[e], o[0])), 4601 (p += l[e].addedLength)), 4602 (s.totalLength = p), 4603 s 4604 ); 4605 }, 4606 getNewSegment: function (e, i, s, r, n, a, l) { 4607 n < 0 ? (n = 0) : n > 1 && (n = 1); 4608 var p, 4609 f = o(n, l), 4610 c = o((a = a > 1 ? 1 : a), l), 4611 u = e.length, 4612 m = 1 - f, 4613 d = 1 - c, 4614 g = m * m * m, 4615 v = f * m * m * 3, 4616 y = f * f * m * 3, 4617 b = f * f * f, 4618 x = m * m * d, 4619 _ = f * m * d + m * f * d + m * m * c, 4620 k = f * f * d + m * f * c + f * m * c, 4621 A = f * f * c, 4622 C = m * d * d, 4623 P = f * d * d + m * c * d + m * d * c, 4624 w = f * c * d + m * c * c + f * d * c, 4625 S = f * c * c, 4626 D = d * d * d, 4627 T = c * d * d + d * c * d + d * d * c, 4628 E = c * c * d + d * c * c + c * d * c, 4629 M = c * c * c; 4630 for (p = 0; p < u; p += 1) 4631 (h[4 * p] = 4632 t.round(1e3 * (g * e[p] + v * s[p] + y * r[p] + b * i[p])) / 4633 1e3), 4634 (h[4 * p + 1] = 4635 t.round( 4636 1e3 * (x * e[p] + _ * s[p] + k * r[p] + A * i[p]) 4637 ) / 1e3), 4638 (h[4 * p + 2] = 4639 t.round( 4640 1e3 * (C * e[p] + P * s[p] + w * r[p] + S * i[p]) 4641 ) / 1e3), 4642 (h[4 * p + 3] = 4643 t.round( 4644 1e3 * (D * e[p] + T * s[p] + E * r[p] + M * i[p]) 4645 ) / 1e3); 4646 return h; 4647 }, 4648 getPointInSegment: function (e, i, s, r, n, a) { 4649 var h = o(n, a), 4650 l = 1 - h; 4651 return [ 4652 t.round( 4653 1e3 * 4654 (l * l * l * e[0] +
4655 (h * l * l + l * h * l + l * l * h) * s[0] + 4656 (h * h * l + l * h * h + h * l * h) * r[0] + 4657 h * h * h * i[0]) 4658 ) / 1e3, 4659 t.round( 4660 1e3 * 4661 (l * l * l * e[1] + 4662 (h * l * l + l * h * l + l * l * h) * s[1] + 4663 (h * h * l + l * h * h + h * l * h) * r[1] + 4664 h * h * h * i[1]) 4665 ) / 1e3, 4666 ]; 4667 }, 4668 buildBezierData: a, 4669 pointOnLine2D: e, 4670 pointOnLine3D: function (i, s, r, n, a, o, h, l, p) { 4671 if (0 === r && 0 === o && 0 === p) return e(i, s, n, a, h, l); 4672 var f, 4673 c = t.sqrt( 4674 t.pow(n - i, 2) + t.pow(a - s, 2) + t.pow(o - r, 2) 4675 ), 4676 u = t.sqrt( 4677 t.pow(h - i, 2) + t.pow(l - s, 2) + t.pow(p - r, 2) 4678 ), 4679 m = t.sqrt( 4680 t.pow(h - n, 2) + t.pow(l - a, 2) + t.pow(p - o, 2) 4681 ); 4682 return ( 4683 (f = 4684 c > u 4685 ? c > m 4686 ? c - u - m 4687 : m - u - c 4688 : m > u 4689 ? m - u - c 4690 : u - c - m) > -1e-4 && f < 1e-4 4691 ); 4692 }, 4693 }; 4694 } 4695 var bez = bezFunction(), 4696 initFrame = initialDefaultFrame, 4697 mathAbs = Math.abs; 4698 function interpolateValue(t, e) { 4699 var i, 4700 s, 4701 r, 4702 n, 4703 a, 4704 o, 4705 h = this.offsetTime; 4706 "multidimensional" === this.propType && 4707 (o = createTypedArray("float32", this.pv.length)); 4708 for ( 4709 var l, 4710 p, 4711 f, 4712 c, 4713 u, 4714 m, 4715 d, 4716 g, 4717 v, 4718 y = e.lastIndex, 4719 b = y, 4720 x = this.keyframes.length - 1, 4721 _ = !0; 4722 _; 4723 4724 ) { 4725 if ( 4726 ((l = this.keyframes[b]), 4727 (p = this.keyframes[b + 1]), 4728 b === x - 1 && t >= p.t - h) 4729 ) { 4730 l.h && (l = p), (y = 0); 4731 break; 4732 } 4733 if (p.t - h > t) { 4734 y = b; 4735 break; 4736 } 4737 b < x - 1 ? (b += 1) : ((y = 0), (_ = !1)); 4738 } 4739 f = this.keyframesMetadata[b] || {}; 4740 var k, 4741 A = p.t - h, 4742 C = l.t - h; 4743 if (l.to) { 4744 f.bezierData || 4745 (f.bezierData = bez.buildBezierData( 4746 l.s, 4747 p.s || l.e, 4748 l.to, 4749 l.ti 4750 )); 4751 var P = f.bezierData; 4752 if (t >= A || t < C) { 4753 var w = t >= A ? P.points.length - 1 : 0; 4754 for (u = P.points[w].point.length, c = 0; c < u; c += 1) 4755 o[c] = P.points[w].point[c]; 4756 } else { 4757 f.__fnct 4758 ? (v = f.__fnct) 4759 : (f.__fnct = v = 4760 BezierFactory.getBezierEasing( 4761 l.o.x, 4762 l.o.y, 4763 l.i.x, 4764 l.i.y, 4765 l.n 4766 ).get), 4767 (m = v((t - C) / (A - C))); 4768 var S, 4769 D = P.segmentLength * m, 4770 T = 4771 e.lastFrame < t && e._lastKeyframeIndex === b 4772 ? e._lastAddedLength 4773 : 0; 4774 for ( 4775 g = 4776 e.lastFrame < t && e._lastKeyframeIndex === b 4777 ? e._lastPoint 4778 : 0, 4779 _ = !0, 4780 d = P.points.length; 4781 _; 4782 4783 ) { 4784 if ( 4785 ((T += P.points[g].partialLength), 4786 0 === D || 0 === m || g === P.points.length - 1) 4787 ) { 4788 for (u = P.points[g].point.length, c = 0; c < u; c += 1) 4789 o[c] = P.points[g].point[c]; 4790 break; 4791 } 4792 if (D >= T && D < T + P.points[g + 1].partialLength) { 4793 for ( 4794 S = (D - T) / P.points[g + 1].partialLength, 4795 u = P.points[g].point.length, 4796 c = 0; 4797 c < u; 4798 c += 1 4799 ) 4800 o[c] = 4801 P.points[g].point[c] + 4802 (P.points[g + 1].point[c] - P.points[g].point[c]) * S; 4803 break; 4804 } 4805 g < d - 1 ? (g += 1) : (_ = !1); 4806 } 4807 (e._lastPoint = g),
4808 (e._lastAddedLength = T - P.points[g].partialLength), 4809 (e._lastKeyframeIndex = b); 4810 } 4811 } else if ( 4812 ((x = l.s.length), (k = p.s || l.e), this.sh && 1 !== l.h) 4813 ) 4814 t >= A 4815 ? ((o[0] = k[0]), (o[1] = k[1]), (o[2] = k[2])) 4816 : t <= C 4817 ? ((o[0] = l.s[0]), (o[1] = l.s[1]), (o[2] = l.s[2])) 4818 : quaternionToEuler( 4819 o, 4820 slerp( 4821 createQuaternion(l.s), 4822 createQuaternion(k), 4823 (t - C) / (A - C) 4824 ) 4825 ); 4826 else 4827 for (b = 0; b < x; b += 1) 4828 1 !== l.h && 4829 (t >= A 4830 ? (m = 1) 4831 : t < C 4832 ? (m = 0) 4833 : (l.o.x.constructor === Array 4834 ? (f.__fnct || (f.__fnct = []), 4835 f.__fnct[b] 4836 ? (v = f.__fnct[b]) 4837 : ((i = void 0 === l.o.x[b] ? l.o.x[0] : l.o.x[b]), 4838 (s = void 0 === l.o.y[b] ? l.o.y[0] : l.o.y[b]), 4839 (r = void 0 === l.i.x[b] ? l.i.x[0] : l.i.x[b]), 4840 (n = void 0 === l.i.y[b] ? l.i.y[0] : l.i.y[b]), 4841 (v = BezierFactory.getBezierEasing( 4842 i, 4843 s, 4844 r, 4845 n 4846 ).get), 4847 (f.__fnct[b] = v))) 4848 : f.__fnct 4849 ? (v = f.__fnct) 4850 : ((i = l.o.x), 4851 (s = l.o.y), 4852 (r = l.i.x), 4853 (n = l.i.y), 4854 (v = BezierFactory.getBezierEasing(i, s, r, n).get), 4855 (l.keyframeMetadata = v)), 4856 (m = v((t - C) / (A - C))))), 4857 (k = p.s || l.e), 4858 (a = 1 === l.h ? l.s[b] : l.s[b] + (k[b] - l.s[b]) * m), 4859 "multidimensional" === this.propType ? (o[b] = a) : (o = a); 4860 return (e.lastIndex = y), o; 4861 } 4862 function slerp(t, e, i) { 4863 var s, 4864 r, 4865 n, 4866 a, 4867 o, 4868 h = [], 4869 l = t[0], 4870 p = t[1], 4871 f = t[2], 4872 c = t[3], 4873 u = e[0], 4874 m = e[1], 4875 d = e[2], 4876 g = e[3]; 4877 return ( 4878 (r = l * u + p * m + f * d + c * g) < 0 && 4879 ((r = -r), (u = -u), (m = -m), (d = -d), (g = -g)), 4880 1 - r > 1e-6 4881 ? ((n = Math.sin((s = Math.acos(r)))), 4882 (a = Math.sin((1 - i) * s) / n), 4883 (o = Math.sin(i * s) / n)) 4884 : ((a = 1 - i), (o = i)), 4885 (h[0] = a * l + o * u), 4886 (h[1] = a * p + o * m), 4887 (h[2] = a * f + o * d), 4888 (h[3] = a * c + o * g), 4889 h 4890 ); 4891 } 4892 function quaternionToEuler(t, e) { 4893 var i = e[0], 4894 s = e[1], 4895 r = e[2], 4896 n = e[3], 4897 a = Math.atan2(2 * s * n - 2 * i * r, 1 - 2 * s * s - 2 * r * r), 4898 o = Math.asin(2 * i * s + 2 * r * n), 4899 h = Math.atan2(2 * i * n - 2 * s * r, 1 - 2 * i * i - 2 * r * r); 4900 (t[0] = a / degToRads), 4901 (t[1] = o / degToRads), 4902 (t[2] = h / degToRads); 4903 } 4904 function createQuaternion(t) { 4905 var e = t[0] * degToRads, 4906 i = t[1] * degToRads, 4907 s = t[2] * degToRads, 4908 r = Math.cos(e / 2), 4909 n = Math.cos(i / 2), 4910 a = Math.cos(s / 2), 4911 o = Math.sin(e / 2), 4912 h = Math.sin(i / 2), 4913 l = Math.sin(s / 2); 4914 return [ 4915 o * h * a + r * n * l, 4916 o * n * a + r * h * l, 4917 r * h * a - o * n * l, 4918 r * n * a - o * h * l, 4919 ]; 4920 } 4921 function getValueAtCurrentTime() { 4922 var t = this.comp.renderedFrame - this.offsetTime, 4923 e = this.keyframes[0].t - this.offsetTime, 4924 i = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; 4925 if ( 4926 !( 4927 t === this._caching.lastFrame || 4928 (this._caching.lastFrame !== initFrame && 4929 ((this._caching.lastFrame >= i && t >= i) || 4930 (this._caching.lastFrame < e && t < e))) 4931 ) 4932 ) { 4933 this._caching.lastFrame >= t && 4934 ((this._caching._lastKeyframeIndex = -1), 4935 (this._caching.lastIndex = 0)); 4936 var s = this.interpolateValue(t, this._caching); 4937 this.pv = s; 4938 } 4939 return (this._caching.lastFrame = t), this.pv; 4940 } 4941 function setVValue(t) { 4942 var e; 4943 if ("unidimensional" === this.propType) 4944 (e = t * this.mult), 4945 mathAbs(this.v - e) > 1e-5 && ((this.v = e), (this._mdf = !0)); 4946 else 4947 for (var i = 0, s = this.v.length; i < s; ) 4948 (e = t[i] * this.mult), 4949 mathAbs(this.v[i] - e) > 1e-5 && 4950 ((this.v[i] = e), (this._mdf = !0)), 4951 (i += 1); 4952 } 4953 function processEffectsSequence() { 4954 if ( 4955 this.elem.globalData.frameId !== this.frameId && 4956 this.effectsSequence.length 4957 ) 4958 if (this.lock) this.setVValue(this.pv); 4959 else { 4960 (this.lock = !0), (this._mdf = this._isFirstFrame); 4961 var t, 4962 e = this.effectsSequence.length, 4963 i = this.kf ? this.pv : this.data.k; 4964 for (t = 0; t < e; t += 1) i = this.effectsSequence[t](i); 4965 this.setVValue(i), 4966 (this._isFirstFrame = !1), 4967 (this.lock = !1), 4968 (this.frameId = this.elem.globalData.frameId); 4969 } 4970 } 4971 function addEffect(t) { 4972 this.effectsSequence.push(t), 4973 this.container.addDynamicProperty(this); 4974 } 4975 function ValueProperty(t, e, i, s) { 4976 (this.propType = "unidimensional"), 4977 (this.mult = i || 1), 4978 (this.data = e), 4979 (this.v = i ? e.k * i : e.k), 4980 (this.pv = e.k), 4981 (this._mdf = !1), 4982 (this.elem = t), 4983 (this.container = s), 4984 (this.comp = t.comp), 4985 (this.k = !1), 4986 (this.kf = !1), 4987 (this.vel = 0), 4988 (this.effectsSequence = []), 4989 (this._isFirstFrame = !0), 4990 (this.getValue = processEffectsSequence), 4991 (this.setVValue = setVValue), 4992 (this.addEffect = addEffect); 4993 } 4994 function MultiDimensionalProperty(t, e, i, s) { 4995 (this.propType = "multidimensional"), 4996 (this.mult = i || 1), 4997 (this.data = e), 4998 (this._mdf = !1), 4999 (this.elem = t), 5000 (this.container = s), 5001 (this.comp = t.comp), 5002 (this.k = !1), 5003 (this.kf = !1), 5004 (this.frameId = -1); 5005 var r, 5006 n = e.k.length; 5007 for ( 5008 this.v = createTypedArray("float32", n), 5009 this.pv = createTypedArray("float32", n), 5010 this.vel = createTypedArray("float32", n), 5011 r = 0; 5012 r < n; 5013 r += 1 5014 ) 5015 (this.v[r] = e.k[r] * this.mult), (this.pv[r] = e.k[r]); 5016 (this._isFirstFrame = !0), 5017 (this.effectsSequence = []), 5018 (this.getValue = processEffectsSequence), 5019 (this.setVValue = setVValue), 5020 (this.addEffect = addEffect); 5021 } 5022 function KeyframedValueProperty(t, e, i, s) { 5023 (this.propType = "unidimensional"), 5024 (this.keyframes = e.k), 5025 (this.keyframesMetadata = []), 5026 (this.offsetTime = t.data.st), 5027 (this.frameId = -1), 5028 (this._caching = { 5029 lastFrame: initFrame, 5030 lastIndex: 0, 5031 value: 0, 5032 _lastKeyframeIndex: -1, 5033 }), 5034 (this.k = !0), 5035 (this.kf = !0), 5036 (this.data = e), 5037 (this.mult = i || 1), 5038 (this.elem = t), 5039 (this.container = s), 5040 (this.comp = t.comp), 5041 (this.v = initFrame), 5042 (this.pv = initFrame), 5043 (this._isFirstFrame = !0), 5044 (this.getValue = processEffectsSequence), 5045 (this.setVValue = setVValue), 5046 (this.interpolateValue = interpolateValue), 5047 (this.effectsSequence = [getValueAtCurrentTime.bind(this)]), 5048 (this.addEffect = addEffect); 5049 } 5050 function KeyframedMultidimensionalProperty(t, e, i, s) { 5051 this.propType = "multidimensional"; 5052 var r, 5053 n, 5054 a, 5055 o, 5056 h, 5057 l = e.k.length; 5058 for (r = 0; r < l - 1; r += 1) 5059 e.k[r].to && 5060 e.k[r].s && 5061 e.k[r + 1] && 5062 e.k[r + 1].s && 5063 ((n = e.k[r].s), 5064 (a = e.k[r + 1].s), 5065 (o = e.k[r].to), 5066 (h = e.k[r].ti), 5067 ((2 === n.length && 5068 (n[0] !== a[0] || n[1] !== a[1]) && 5069 bez.pointOnLine2D( 5070 n[0], 5071 n[1], 5072 a[0], 5073 a[1], 5074 n[0] + o[0], 5075 n[1] + o[1] 5076 ) && 5077 bez.pointOnLine2D( 5078 n[0], 5079 n[1], 5080 a[0], 5081 a[1], 5082 a[0] + h[0], 5083 a[1] + h[1] 5084 )) || 5085 (3 === n.length && 5086 (n[0] !== a[0] || n[1] !== a[1] || n[2] !== a[2]) && 5087 bez.pointOnLine3D( 5088 n[0], 5089 n[1], 5090 n[2], 5091 a[0], 5092 a[1], 5093 a[2], 5094 n[0] + o[0], 5095 n[1] + o[1], 5096 n[2] + o[2] 5097 ) && 5098 bez.pointOnLine3D( 5099 n[0], 5100 n[1], 5101 n[2], 5102 a[0], 5103 a[1], 5104 a[2], 5105 a[0] + h[0], 5106 a[1] + h[1], 5107 a[2] + h[2] 5108 ))) && 5109 ((e.k[r].to = null), (e.k[r].ti = null)), 5110 n[0] === a[0] && 5111 n[1] === a[1] && 5112 0 === o[0] && 5113 0 === o[1] && 5114 0 === h[0] && 5115 0 === h[1] && 5116 (2 === n.length || 5117 (n[2] === a[2] && 0 === o[2] && 0 === h[2])) && 5118 ((e.k[r].to = null), (e.k[r].ti = null))); 5119 (this.effectsSequence = [getValueAtCurrentTime.bind(this)]), 5120 (this.data = e), 5121 (this.keyframes = e.k), 5122 (this.keyframesMetadata = []), 5123 (this.offsetTime = t.data.st), 5124 (this.k = !0), 5125 (this.kf = !0), 5126 (this._isFirstFrame = !0), 5127 (this.mult = i || 1), 5128 (this.elem = t), 5129 (this.container = s), 5130 (this.comp = t.comp), 5131 (this.getValue = processEffectsSequence), 5132 (this.setVValue = setVValue), 5133 (this.interpolateValue = interpolateValue), 5134 (this.frameId = -1); 5135 var p = e.k[0].s.length; 5136 for ( 5137 this.v = createTypedArray("float32", p), 5138 this.pv = createTypedArray("float32", p), 5139 r = 0; 5140 r < p; 5141 r += 1 5142 ) 5143 (this.v[r] = initFrame), (this.pv[r] = initFrame); 5144 (this._caching = { 5145 lastFrame: initFrame, 5146 lastIndex: 0, 5147 value: createTypedArray("float32", p), 5148 }), 5149 (this.addEffect = addEffect); 5150 } 5151 var PropertyFactory = { 5152 getProp: function (t, e, i, s, r) { 5153 var n; 5154 if ( 5155 (e.sid && (e = t.globalData.slotManager.getProp(e)), e.k.length) 5156 ) 5157 if ("number" == typeof e.k[0]) 5158 n = new MultiDimensionalProperty(t, e, s, r); 5159 else 5160 switch (i) { 5161 case 0: 5162 n = new KeyframedValueProperty(t, e, s, r); 5163 break; 5164 case 1: 5165 n = new KeyframedMultidimensionalProperty(t, e, s, r); 5166 } 5167 else n = new ValueProperty(t, e, s, r); 5168 return n.effectsSequence.length && r.addDynamicProperty(n), n; 5169 }, 5170 }; 5171 function DynamicPropertyContainer() {} 5172 DynamicPropertyContainer.prototype = { 5173 addDynamicProperty: function (t) { 5174 -1 === this.dynamicProperties.indexOf(t) && 5175 (this.dynamicProperties.push(t), 5176 this.container.addDynamicProperty(this), 5177 (this._isAnimated = !0)); 5178 }, 5179 iterateDynamicProperties: function () { 5180 this._mdf = !1; 5181 var t, 5182 e = this.dynamicProperties.length; 5183 for (t = 0; t < e; t += 1) 5184 this.dynamicProperties[t].getValue(), 5185 this.dynamicProperties[t]._mdf && (this._mdf = !0); 5186 }, 5187 initDynamicPropertyContainer: function (t) { 5188 (this.container = t), 5189 (this.dynamicProperties = []), 5190 (this._mdf = !1), 5191 (this._isAnimated = !1); 5192 }, 5193 }; 5194 var pointPool = poolFactory(8, function () { 5195 return createTypedArray("float32", 2); 5196 }); 5197 function ShapePath() { 5198 (this.c = !1), 5199 (this._length = 0), 5200 (this._maxLength = 8), 5201 (this.v = createSizedArray(this._maxLength)), 5202 (this.o = createSizedArray(this._maxLength)), 5203 (this.i = createSizedArray(this._maxLength)); 5204 } 5205 (ShapePath.prototype.setPathData = function (t, e) { 5206 (this.c = t), this.setLength(e); 5207 for (var i = 0; i < e; ) 5208 (this.v[i] = pointPool.newElement()), 5209 (this.o[i] = pointPool.newElement()), 5210 (this.i[i] = pointPool.newElement()), 5211 (i += 1); 5212 }), 5213 (ShapePath.prototype.setLength = function (t) { 5214 for (; this._maxLength < t;
5214 ) this.doubleArrayLength(); 5215 this._length = t; 5216 }), 5217 (ShapePath.prototype.doubleArrayLength = function () { 5218 (this.v = this.v.concat(createSizedArray(this._maxLength))), 5219 (this.i = this.i.concat(createSizedArray(this._maxLength))), 5220 (this.o = this.o.concat(createSizedArray(this._maxLength))), 5221 (this._maxLength *= 2); 5222 }), 5223 (ShapePath.prototype.setXYAt = function (t, e, i, s, r) { 5224 var n; 5225 switch ( 5226 ((this._length = Math.max(this._length, s + 1)), 5227 this._length >= this._maxLength && this.doubleArrayLength(), 5228 i) 5229 ) { 5230 case "v": 5231 n = this.v; 5232 break; 5233 case "i": 5234 n = this.i; 5235 break; 5236 case "o": 5237 n = this.o; 5238 break; 5239 default: 5240 n = []; 5241 } 5242 (n[s] && (!n[s] || r)) || (n[s] = pointPool.newElement()), 5243 (n[s][0] = t), 5244 (n[s][1] = e); 5245 }), 5246 (ShapePath.prototype.setTripleAt = function ( 5247 t, 5248 e, 5249 i, 5250 s, 5251 r, 5252 n, 5253 a, 5254 o 5255 ) { 5256 this.setXYAt(t, e, "v", a, o), 5257 this.setXYAt(i, s, "o", a, o), 5258 this.setXYAt(r, n, "i", a, o); 5259 }), 5260 (ShapePath.prototype.reverse = function () { 5261 var t = new ShapePath(); 5262 t.setPathData(this.c, this._length); 5263 var e = this.v, 5264 i = this.o, 5265 s = this.i, 5266 r = 0; 5267 this.c && 5268 (t.setTripleAt( 5269 e[0][0], 5270 e[0][1], 5271 s[0][0], 5272 s[0][1], 5273 i[0][0], 5274 i[0][1], 5275 0, 5276 !1 5277 ), 5278 (r = 1)); 5279 var n, 5280 a = this._length - 1, 5281 o = this._length; 5282 for (n = r; n < o; n += 1) 5283 t.setTripleAt( 5284 e[a][0], 5285 e[a][1], 5286 s[a][0], 5287 s[a][1], 5288 i[a][0], 5289 i[a][1], 5290 n, 5291 !1 5292 ), 5293 (a -= 1); 5294 return t; 5295 }), 5296 (ShapePath.prototype.length = function () { 5297 return this._length; 5298 }); 5299 var factory, 5300 shapePool = 5301 ((factory = poolFactory( 5302 4, 5303 function () { 5304 return new ShapePath(); 5305 }, 5306 function (t) { 5307 var e, 5308 i = t._length; 5309 for (e = 0; e < i; e += 1) 5310 pointPool.release(t.v[e]), 5311 pointPool.release(t.i[e]), 5312 pointPool.release(t.o[e]), 5313 (t.v[e] = null),
5314 (t.i[e] = null), 5315 (t.o[e] = null); 5316 (t._length = 0), (t.c = !1); 5317 } 5318 )), 5319 (factory.clone = function (t) { 5320 var e, 5321 i = factory.newElement(), 5322 s = void 0 === t._length ? t.v.length : t._length; 5323 for (i.setLength(s), i.c = t.c, e = 0; e < s; e += 1) 5324 i.setTripleAt( 5325 t.v[e][0], 5326 t.v[e][1], 5327 t.o[e][0], 5328 t.o[e][1], 5329 t.i[e][0], 5330 t.i[e][1], 5331 e 5332 ); 5333 return i; 5334 }), 5335 factory); 5336 function ShapeCollection() { 5337 (this._length = 0), 5338 (this._maxLength = 4), 5339 (this.shapes = createSizedArray(this._maxLength)); 5340 } 5341 (ShapeCollection.prototype.addShape = function (t) { 5342 this._length === this._maxLength && 5343 ((this.shapes = this.shapes.concat( 5344 createSizedArray(this._maxLength) 5345 )), 5346 (this._maxLength *= 2)), 5347 (this.shapes[this._length] = t), 5348 (this._length += 1); 5349 }), 5350 (ShapeCollection.prototype.releaseShapes = function () { 5351 var t; 5352 for (t = 0; t < this._length; t += 1) 5353 shapePool.release(this.shapes[t]); 5354 this._length = 0; 5355 }); 5356 var ob, 5357 _length, 5358 _maxLength, 5359 pool, 5360 shapeCollectionPool = 5361 ((ob = { 5362 newShapeCollection: function () { 5363 return _length ? pool[(_length -= 1)] : new ShapeCollection(); 5364 }, 5365 release: function (t) { 5366 var e, 5367 i = t._length; 5368 for (e = 0; e < i; e += 1) shapePool.release(t.shapes[e]); 5369 (t._length = 0), 5370 _length === _maxLength && 5371 ((pool = pooling.double(pool)), (_maxLength *= 2)), 5372 (pool[_length] = t), 5373 (_length += 1); 5374 }, 5375 }), 5376 (_length = 0), 5377 (_maxLength = 4), 5378 (pool = createSizedArray(_maxLength)), 5379 ob), 5380 ShapePropertyFactory = (function () { 5381 var t = -999999; 5382 function e(t, e, i) { 5383 var s, 5384 r, 5385 n, 5386 a, 5387 o, 5388 h, 5389 l, 5390 p, 5391 f, 5392 c = i.lastIndex, 5393 u = this.keyframes; 5394 if (t < u[0].t - this.offsetTime) 5395 (s = u[0].s[0]), (n = !0), (c = 0); 5396 else if (t >= u[u.length - 1].t - this.offsetTime) 5397 (s = u[u.length - 1].s 5398 ? u[u.length - 1].s[0] 5399 : u[u.length - 2].e[0]), 5400 (n = !0); 5401 else { 5402 for ( 5403 var m, d, g, v, y = c, b = u.length - 1, x = !0; 5404 x && 5405 ((d = u[y]), !((g = u[y + 1]).t - this.offsetTime > t)); 5406 5407 ) 5408 y < b - 1 ? (y += 1) : (x = !1); 5409 (v = this.keyframesMetadata[y] || {}), 5410 (c = y), 5411 (n = 1 === d.h) || 5412 (t >= g.t - this.offsetTime 5413 ? (p = 1) 5414 : t < d.t - this.offsetTime 5415 ? (p = 0) 5416 : (v.__fnct 5417 ? (m = v.__fnct) 5418 : (v.__fnct = m = 5419 BezierFactory.getBezierEasing( 5420 d.o.x, 5421 d.o.y, 5422 d.i.x, 5423 d.i.y 5424 ).get), 5425 (p = m( 5426 (t - (d.t - this.offsetTime)) / 5427 (g.t - this.offsetTime - (d.t - this.offsetTime)) 5428 ))), 5429 (r = g.s ? g.s[0] : d.e[0])), 5430 (s = d.s[0]); 5431 } 5432 for ( 5433 h = e._length, l = s.i[0].length, i.lastIndex = c, a = 0; 5434 a < h; 5435 a += 1 5436 ) 5437 for (o = 0; o < l; o += 1) 5438 (f = n 5439 ? s.i[a][o] 5440 : s.i[a][o] + (r.i[a][o] - s.i[a][o]) * p), 5441 (e.i[a][o] = f), 5442 (f = n 5443 ? s.o[a][o] 5444 : s.o[a][o] + (r.o[a][o] - s.o[a][o]) * p), 5445 (e.o[a][o] = f), 5446 (f = n 5447 ? s.v[a][o] 5448 : s.v[a][o] + (r.v[a][o] - s.v[a][o]) * p), 5449 (e.v[a][o] = f); 5450 } 5451 function i() { 5452 var e = this.comp.renderedFrame - this.offsetTime, 5453 i = this.keyframes[0].t - this.offsetTime, 5454 s = 5455 this.keyframes[this.keyframes.length - 1].t - 5456 this.offsetTime, 5457 r = this._caching.lastFrame; 5458 return ( 5459 (r !== t && ((r < i && e < i) || (r > s && e > s))) || 5460 ((this._caching.lastIndex = 5461 r < e ? this._caching.lastIndex : 0), 5462 this.interpolateShape(e, this.pv, this._caching)), 5463 (this._caching.lastFrame = e), 5464 this.pv 5465 ); 5466 } 5467 function s() { 5468 this.paths = this.localShapeCollection; 5469 } 5470 function r(t) { 5471 (function (t, e) { 5472 if (t._length !== e._length || t.c !== e.c) return !1; 5473 var i, 5474 s = t._length; 5475 for (i = 0; i < s; i += 1) 5476 if ( 5477 t.v[i][0] !== e.v[i][0] || 5478 t.v[i][1] !== e.v[i][1] || 5479 t.o[i][0] !== e.o[i][0] || 5480 t.o[i][1] !== e.o[i][1] || 5481 t.i[i][0] !== e.i[i][0] || 5482 t.i[i][1] !== e.i[i][1] 5483 ) 5484 return !1; 5485 return !0; 5486 })(this.v, t) || 5487 ((this.v = shapePool.clone(t)), 5488 this.localShapeCollection.releaseShapes(), 5489 this.localShapeCollection.addShape(this.v),
5490 (this._mdf = !0), 5491 (this.paths = this.localShapeCollection)); 5492 } 5493 function n() { 5494 if (this.elem.globalData.frameId !== this.frameId) 5495 if (this.effectsSequence.length) 5496 if (this.lock) this.setVValue(this.pv); 5497 else { 5498 (this.lock = !0), 5499 (this._mdf = !1), 5500 (t = this.kf 5501 ? this.pv 5502 : this.data.ks 5503 ? this.data.ks.k 5504 : this.data.pt.k); 5505 var t, 5506 e, 5507 i = this.effectsSequence.length; 5508 for (e = 0; e < i; e += 1) t = this.effectsSequence[e](t); 5509 this.setVValue(t), 5510 (this.lock = !1), 5511 (this.frameId = this.elem.globalData.frameId); 5512 } 5513 else this._mdf = !1; 5514 } 5515 function a(t, e, i) { 5516 (this.propType = "shape"), 5517 (this.comp = t.comp), 5518 (this.container = t), 5519 (this.elem = t), 5520 (this.data = e), 5521 (this.k = !1), 5522 (this.kf = !1), 5523 (this._mdf = !1); 5524 var r = 3 === i ? e.pt.k : e.ks.k; 5525 (this.v = shapePool.clone(r)), 5526 (this.pv = shapePool.clone(this.v)), 5527 (this.localShapeCollection = 5528 shapeCollectionPool.newShapeCollection()), 5529 (this.paths = this.localShapeCollection), 5530 this.paths.addShape(this.v), 5531 (this.reset = s), 5532 (this.effectsSequence = []); 5533 } 5534 function o(t) { 5535 this.effectsSequence.push(t), 5536 this.container.addDynamicProperty(this); 5537 } 5538 function h(e, r, n) { 5539 (this.propType = "shape"), 5540 (this.comp = e.comp), 5541 (this.elem = e), 5542 (this.container = e), 5543 (this.offsetTime = e.data.st), 5544 (this.keyframes = 3 === n ? r.pt.k : r.ks.k), 5545 (this.keyframesMetadata = []), 5546 (this.k = !0), 5547 (this.kf = !0); 5548 var a = this.keyframes[0].s[0].i.length; 5549 (this.v = shapePool.newElement()), 5550 this.v.setPathData(this.keyframes[0].s[0].c, a), 5551 (this.pv = shapePool.clone(this.v)), 5552 (this.localShapeCollection = 5553 shapeCollectionPool.newShapeCollection()), 5554 (this.paths = this.localShapeCollection), 5555 this.paths.addShape(this.v), 5556 (this.lastFrame = t), 5557 (this.reset = s), 5558 (this._caching = { lastFrame: t, lastIndex: 0 }), 5559 (this.effectsSequence = [i.bind(this)]); 5560 } 5561 (a.prototype.interpolateShape = e), 5562 (a.prototype.getValue = n), 5563 (a.prototype.setVValue = r), 5564 (a.prototype.addEffect = o), 5565 (h.prototype.getValue = n), 5566 (h.prototype.interpolateShape = e), 5567 (h.prototype.setVValue = r), 5568 (h.prototype.addEffect = o); 5569 var l = (function () { 5570 var t = roundCorner; 5571 function e(t, e) { 5572 (this.v = shapePool.newElement()), 5573 this.v.setPathData(!0, 4), 5574 (this.localShapeCollection = 5575 shapeCollectionPool.newShapeCollection()), 5576 (this.paths = this.localShapeCollection), 5577 this.localShapeCollection.addShape(this.v), 5578 (this.d = e.d), 5579 (this.elem = t), 5580 (this.comp = t.comp), 5581 (this.frameId = -1), 5582 this.initDynamicPropertyContainer(t), 5583 (this.p = PropertyFactory.getProp(t, e.p, 1, 0, this)), 5584 (this.s = PropertyFactory.getProp(t, e.s, 1, 0, this)), 5585 this.dynamicProperties.length 5586 ? (this.k = !0) 5587 : ((this.k = !1), this.convertEllToPath()); 5588 } 5589 return ( 5590 (e.prototype = { 5591 reset: s, 5592 getValue: function () { 5593 this.elem.globalData.frameId !== this.frameId && 5594 ((this.frameId = this.elem.globalData.frameId), 5595 this.iterateDynamicProperties(), 5596 this._mdf && this.convertEllToPath()); 5597 }, 5598 convertEllToPath: function () { 5599 var e = this.p.v[0], 5600 i = this.p.v[1], 5601 s = this.s.v[0] / 2, 5602 r = this.s.v[1] / 2, 5603 n = 3 !== this.d, 5604 a = this.v; 5605 (a.v[0][0] = e), 5606 (a.v[0][1] = i - r), 5607 (a.v[1][0] = n ? e + s : e - s), 5608 (a.v[1][1] = i), 5609 (a.v[2][0] = e), 5610 (a.v[2][1] = i + r), 5611 (a.v[3][0] = n ? e - s : e + s), 5612 (a.v[3][1] = i), 5613 (a.i[0][0] = n ? e - s * t : e + s * t), 5614 (a.i[0][1] = i - r), 5615 (a.i[1][0] = n ? e + s : e - s), 5616 (a.i[1][1] = i - r * t), 5617 (a.i[2][0] = n ? e + s * t : e - s * t), 5618 (a.i[2][1] = i + r), 5619 (a.i[3][0] = n ? e - s : e + s), 5620 (a.i[3][1] = i + r * t), 5621 (a.o[0][0] = n ? e + s * t : e - s * t), 5622 (a.o[0][1] = i - r), 5623 (a.o[1][0] = n ? e + s : e - s), 5624 (a.o[1][1] = i + r * t), 5625 (a.o[2][0] = n ? e - s * t : e + s * t), 5626 (a.o[2][1] = i + r), 5627 (a.o[3][0] = n ? e - s : e + s), 5628 (a.o[3][1] = i - r * t); 5629 }, 5630 }), 5631 extendPrototype([DynamicPropertyContainer], e), 5632 e 5633 ); 5634 })(), 5635 p = (function () { 5636 function t(t, e) { 5637 (this.v = shapePool.newElement()), 5638 this.v.setPathData(!0, 0), 5639 (this.elem = t), 5640 (this.comp = t.comp), 5641 (this.data = e), 5642 (this.frameId = -1), 5643 (this.d = e.d), 5644 this.initDynamicPropertyContainer(t), 5645 1 === e.sy 5646 ? ((this.ir = PropertyFactory.getProp( 5647 t, 5648 e.ir, 5649 0, 5650 0, 5651 this 5652 )), 5653 (this.is = PropertyFactory.getProp( 5654 t, 5655 e.is, 5656 0, 5657 0.01, 5658 this 5659 )), 5660 (this.convertToPath = this.convertStarToPath)) 5661 : (this.convertToPath = this.convertPolygonToPath), 5662 (this.pt = PropertyFactory.getProp(t, e.pt, 0, 0, this)), 5663 (this.p = PropertyFactory.getProp(t, e.p, 1, 0, this)), 5664 (this.r = PropertyFactory.getProp( 5665 t, 5666 e.r, 5667 0, 5668 degToRads, 5669 this 5670 )), 5671 (this.or = PropertyFactory.getProp(t, e.or, 0, 0, this)), 5672 (this.os = PropertyFactory.getProp( 5673 t, 5674 e.os, 5675 0, 5676 0.01, 5677 this 5678 )), 5679 (this.localShapeCollection = 5680 shapeCollectionPool.newShapeCollection()), 5681 this.localShapeCollection.addShape(this.v),
5682 (this.paths = this.localShapeCollection), 5683 this.dynamicProperties.length 5684 ? (this.k = !0) 5685 : ((this.k = !1), this.convertToPath()); 5686 } 5687 return ( 5688 (t.prototype = { 5689 reset: s, 5690 getValue: function () { 5691 this.elem.globalData.frameId !== this.frameId && 5692 ((this.frameId = this.elem.globalData.frameId), 5693 this.iterateDynamicProperties(), 5694 this._mdf && this.convertToPath()); 5695 }, 5696 convertStarToPath: function () { 5697 var t, 5698 e, 5699 i, 5700 s, 5701 r = 2 * Math.floor(this.pt.v), 5702 n = (2 * Math.PI) / r, 5703 a = !0, 5704 o = this.or.v, 5705 h = this.ir.v, 5706 l = this.os.v, 5707 p = this.is.v, 5708 f = (2 * Math.PI * o) / (2 * r), 5709 c = (2 * Math.PI * h) / (2 * r), 5710 u = -Math.PI / 2; 5711 u += this.r.v; 5712 var m = 3 === this.data.d ? -1 : 1; 5713 for (this.v._length = 0, t = 0; t < r; t += 1) { 5714 (i = a ? l : p), (s = a ? f : c); 5715 var d = (e = a ? o : h) * Math.cos(u), 5716 g = e * Math.sin(u), 5717 v = 5718 0 === d && 0 === g 5719 ? 0 5720 : g / Math.sqrt(d * d + g * g), 5721 y = 5722 0 === d && 0 === g 5723 ? 0 5724 : -d / Math.sqrt(d * d + g * g); 5725 (d += +this.p.v[0]), 5726 (g += +this.p.v[1]), 5727 this.v.setTripleAt( 5728 d, 5729 g, 5730 d - v * s * i * m, 5731 g - y * s * i * m, 5732 d + v * s * i * m, 5733 g + y * s * i * m, 5734 t, 5735 !0 5736 ), 5737 (a = !a), 5738 (u += n * m); 5739 } 5740 }, 5741 convertPolygonToPath: function () { 5742 var t, 5743 e = Math.floor(this.pt.v), 5744 i = (2 * Math.PI) / e, 5745 s = this.or.v, 5746 r = this.os.v, 5747 n = (2 * Math.PI * s) / (4 * e), 5748 a = -(0.5 * Math.PI), 5749 o = 3 === this.data.d ? -1 : 1; 5750 for ( 5751 a += this.r.v, this.v._length = 0, t = 0; 5752 t < e; 5753 t += 1 5754 ) { 5755 var h = s * Math.cos(a), 5756 l = s * Math.sin(a), 5757 p = 5758 0 === h && 0 === l 5759 ? 0 5760 : l / Math.sqrt(h * h + l * l), 5761 f = 5762 0 === h && 0 === l 5763 ? 0 5764 : -h / Math.sqrt(h * h + l * l); 5765 (h += +this.p.v[0]), 5766 (l += +this.p.v[1]), 5767 this.v.setTripleAt( 5768 h, 5769 l, 5770 h - p * n * r * o, 5771 l - f * n * r * o, 5772 h + p * n * r * o, 5773 l + f * n * r * o, 5774 t, 5775 !0 5776 ), 5777 (a += i * o); 5778 } 5779 (this.paths.length = 0), (this.paths[0] = this.v); 5780 }, 5781 }), 5782 extendPrototype([DynamicPropertyContainer], t), 5783 t 5784 ); 5785 })(), 5786 f = (function () { 5787 function t(t, e) { 5788 (this.v = shapePool.newElement()), 5789 (this.v.c = !0), 5790 (this.localShapeCollection = 5791 shapeCollectionPool.newShapeCollection()), 5792 this.localShapeCollection.addShape(this.v),
5793 (this.paths = this.localShapeCollection), 5794 (this.elem = t), 5795 (this.comp = t.comp), 5796 (this.frameId = -1), 5797 (this.d = e.d), 5798 this.initDynamicPropertyContainer(t), 5799 (this.p = PropertyFactory.getProp(t, e.p, 1, 0, this)), 5800 (this.s = PropertyFactory.getProp(t, e.s, 1, 0, this)), 5801 (this.r = PropertyFactory.getProp(t, e.r, 0, 0, this)), 5802 this.dynamicProperties.length 5803 ? (this.k = !0) 5804 : ((this.k = !1), this.convertRectToPath()); 5805 } 5806 return ( 5807 (t.prototype = { 5808 convertRectToPath: function () { 5809 var t = this.p.v[0], 5810 e = this.p.v[1], 5811 i = this.s.v[0] / 2, 5812 s = this.s.v[1] / 2, 5813 r = bmMin(i, s, this.r.v), 5814 n = r * (1 - roundCorner); 5815 (this.v._length = 0), 5816 2 === this.d || 1 === this.d 5817 ? (this.v.setTripleAt( 5818 t + i, 5819 e - s + r, 5820 t + i, 5821 e - s + r, 5822 t + i, 5823 e - s + n, 5824 0, 5825 !0 5826 ), 5827 this.v.setTripleAt( 5828 t + i, 5829 e + s - r, 5830 t + i, 5831 e + s - n, 5832 t + i, 5833 e + s - r, 5834 1, 5835 !0 5836 ), 5837 0 !== r 5838 ? (this.v.setTripleAt( 5839 t + i - r, 5840 e + s, 5841 t + i - r, 5842 e + s, 5843 t + i - n, 5844 e + s, 5845 2, 5846 !0 5847 ), 5848 this.v.setTripleAt( 5849 t - i + r, 5850 e + s, 5851 t - i + n, 5852 e + s, 5853 t - i + r, 5854 e + s, 5855 3, 5856 !0 5857 ), 5858 this.v.setTripleAt( 5859 t - i, 5860 e + s - r, 5861 t - i, 5862 e + s - r, 5863 t - i, 5864 e + s - n, 5865 4, 5866 !0 5867 ), 5868 this.v.setTripleAt( 5869 t - i, 5870 e - s + r, 5871 t - i, 5872 e - s + n, 5873 t - i, 5874 e - s + r, 5875 5, 5876 !0 5877 ), 5878 this.v.setTripleAt( 5879 t - i + r, 5880 e - s, 5881 t - i + r, 5882 e - s, 5883 t - i + n, 5884 e - s, 5885 6, 5886 !0 5887 ), 5888 this.v.setTripleAt( 5889 t + i - r, 5890 e - s, 5891 t + i - n, 5892 e - s, 5893 t + i - r, 5894 e - s, 5895 7, 5896 !0 5897 )) 5898 : (this.v.setTripleAt( 5899 t - i, 5900 e + s, 5901 t - i + n, 5902 e + s, 5903 t - i, 5904 e + s, 5905 2 5906 ), 5907 this.v.setTripleAt( 5908 t - i, 5909 e - s, 5910 t - i, 5911 e - s + n, 5912 t - i, 5913 e - s, 5914 3 5915 ))) 5916 : (this.v.setTripleAt( 5917 t + i, 5918 e - s + r, 5919 t + i, 5920 e - s + n, 5921 t + i, 5922 e - s + r, 5923 0, 5924 !0 5925 ), 5926 0 !== r 5927 ? (this.v.setTripleAt( 5928 t + i - r, 5929 e - s, 5930 t + i - r, 5931 e - s, 5932 t + i - n, 5933 e - s, 5934 1, 5935 !0 5936 ), 5937 this.v.setTripleAt( 5938 t - i + r, 5939 e - s, 5940 t - i + n, 5941 e - s, 5942 t - i + r, 5943 e - s, 5944 2, 5945 !0 5946 ), 5947 this.v.setTripleAt( 5948 t - i, 5949 e - s + r, 5950 t - i, 5951 e - s + r, 5952 t - i, 5953 e - s + n, 5954 3, 5955 !0 5956 ), 5957 this.v.setTripleAt( 5958 t - i, 5959 e + s - r, 5960 t - i, 5961 e + s - n, 5962 t - i, 5963 e + s - r, 5964 4, 5965 !0 5966 ), 5967 this.v.setTripleAt( 5968 t - i + r, 5969 e + s, 5970 t - i + r, 5971 e + s, 5972 t - i + n, 5973 e + s, 5974 5, 5975 !0 5976 ), 5977 this.v.setTripleAt( 5978 t + i - r, 5979 e + s, 5980 t + i - n, 5981 e + s, 5982 t + i - r, 5983 e + s, 5984 6, 5985 !0 5986 ), 5987 this.v.setTripleAt( 5988 t + i, 5989 e + s - r, 5990 t + i, 5991 e + s - r, 5992 t + i, 5993 e + s - n, 5994 7, 5995 !0 5996 )) 5997 : (this.v.setTripleAt( 5998 t - i, 5999 e - s, 6000 t - i + n, 6001 e - s, 6002 t - i, 6003 e - s, 6004 1, 6005 !0 6006 ), 6007 this.v.setTripleAt( 6008 t - i, 6009 e + s, 6010 t - i, 6011 e + s - n, 6012 t - i, 6013 e + s, 6014 2, 6015 !0 6016 ), 6017 this.v.setTripleAt( 6018 t + i, 6019 e + s, 6020 t + i - n, 6021 e + s, 6022 t + i, 6023 e + s, 6024 3, 6025 !0 6026 ))); 6027 }, 6028 getValue: function () { 6029 this.elem.globalData.frameId !== this.frameId && 6030 ((this.frameId = this.elem.globalData.frameId), 6031 this.iterateDynamicProperties(), 6032 this._mdf && this.convertRectToPath()); 6033 }, 6034 reset: s, 6035 }), 6036 extendPrototype([DynamicPropertyContainer], t), 6037 t 6038 ); 6039 })(); 6040 return { 6041 getShapeProp: function (t, e, i) { 6042 var s; 6043 return ( 6044 3 === i || 4 === i 6045 ? (s = (3 === i ? e.pt : e.ks).k.length 6046 ? new h(t, e, i) 6047 : new a(t, e, i)) 6048 : 5 === i 6049 ? (s = new f(t, e)) 6050 : 6 === i 6051 ? (s = new l(t, e)) 6052 : 7 === i && (s = new p(t, e)), 6053 s.k && t.addDynamicProperty(s), 6054 s 6055 ); 6056 }, 6057 getConstructorFunction: function () { 6058 return a; 6059 }, 6060 getKeyframedConstructorFunction: function () { 6061 return h; 6062 }, 6063 }; 6064 })(), 6065 Matrix = (function () {
6066 var t = Math.cos, 6067 e = Math.sin, 6068 i = Math.tan, 6069 s = Math.round; 6070 function r() { 6071 return ( 6072 (this.props[0] = 1), 6073 (this.props[1] = 0), 6074 (this.props[2] = 0), 6075 (this.props[3] = 0), 6076 (this.props[4] = 0), 6077 (this.props[5] = 1), 6078 (this.props[6] = 0), 6079 (this.props[7] = 0), 6080 (this.props[8] = 0), 6081 (this.props[9] = 0), 6082 (this.props[10] = 1), 6083 (this.props[11] = 0), 6084 (this.props[12] = 0), 6085 (this.props[13] = 0), 6086 (this.props[14] = 0), 6087 (this.props[15] = 1), 6088 this 6089 ); 6090 } 6091 function n(i) { 6092 if (0 === i) return this; 6093 var s = t(i), 6094 r = e(i); 6095 return this._t(s, -r, 0, 0, r, s, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); 6096 } 6097 function a(i) { 6098 if (0 === i) return this; 6099 var s = t(i), 6100 r = e(i); 6101 return this._t(1, 0, 0, 0, 0, s, -r, 0, 0, r, s, 0, 0, 0, 0, 1); 6102 } 6103 function o(i) { 6104 if (0 === i) return this; 6105 var s = t(i), 6106 r = e(i); 6107 return this._t(s, 0, r, 0, 0, 1, 0, 0, -r, 0, s, 0, 0, 0, 0, 1); 6108 } 6109 function h(i) { 6110 if (0 === i) return this; 6111 var s = t(i), 6112 r = e(i); 6113 return this._t(s, -r, 0, 0, r, s, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); 6114 } 6115 function l(t, e) { 6116 return this._t(1, e, t, 1, 0, 0); 6117 } 6118 function p(t, e) { 6119 return this.shear(i(t), i(e)); 6120 } 6121 function f(s, r) { 6122 var n = t(r), 6123 a = e(r); 6124 return this._t(n, a, 0, 0, -a, n, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) 6125 ._t(1, 0, 0, 0, i(s), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) 6126 ._t(n, -a, 0, 0, a, n, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); 6127 } 6128 function c(t, e, i) { 6129 return ( 6130 i || 0 === i || (i = 1), 6131 1 === t && 1 === e && 1 === i 6132 ? this 6133 : this._t(t, 0, 0, 0, 0, e, 0, 0, 0, 0, i, 0, 0, 0, 0, 1) 6134 ); 6135 } 6136 function u(t, e, i, s, r, n, a, o, h, l, p, f, c, u, m, d) { 6137 return ( 6138 (this.props[0] = t), 6139 (this.props[1] = e), 6140 (this.props[2] = i), 6141 (this.props[3] = s), 6142 (this.props[4] = r), 6143 (this.props[5] = n), 6144 (this.props[6] = a), 6145 (this.props[7] = o), 6146 (this.props[8] = h), 6147 (this.props[9] = l), 6148 (this.props[10] = p), 6149 (this.props[11] = f), 6150 (this.props[12] = c), 6151 (this.props[13] = u), 6152 (this.props[14] = m), 6153 (this.props[15] = d), 6154 this 6155 ); 6156 } 6157 function m(t, e, i) { 6158 return ( 6159 (i = i || 0), 6160 0 !== t || 0 !== e || 0 !== i 6161 ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, e, i, 1) 6162 : this 6163 ); 6164 } 6165 function d(t, e, i, s, r, n, a, o, h, l, p, f, c, u, m, d) { 6166 var g = this.props; 6167 if ( 6168 1 === t && 6169 0 === e && 6170 0 === i && 6171 0 === s && 6172 0 === r && 6173 1 === n && 6174 0 === a && 6175 0 === o && 6176 0 === h && 6177 0 === l && 6178 1 === p && 6179 0 === f 6180 ) 6181 return ( 6182 (g[12] = g[12] * t + g[15] * c), 6183 (g[13] = g[13] * n + g[15] * u), 6184 (g[14] = g[14] * p + g[15] * m), 6185 (g[15] *= d), 6186 (this._identityCalculated = !1), 6187 this 6188 ); 6189 var v = g[0], 6190 y = g[1], 6191 b = g[2], 6192 x = g[3], 6193 _ = g[4], 6194 k = g[5], 6195 A = g[6], 6196 C = g[7], 6197 P = g[8], 6198 w = g[9], 6199 S = g[10], 6200 D = g[11], 6201 T = g[12], 6202 E = g[13], 6203 M = g[14], 6204 F = g[15]; 6205 return ( 6206 (g[0] = v * t + y * r + b * h + x * c), 6207 (g[1] = v * e + y * n + b * l + x * u), 6208 (g[2] = v * i + y * a + b * p + x * m), 6209 (g[3] = v * s + y * o + b * f + x * d), 6210 (g[4] = _ * t + k * r + A * h + C * c), 6211 (g[5] = _ * e + k * n + A * l + C * u), 6212 (g[6] = _ * i + k * a + A * p + C * m), 6213 (g[7] = _ * s + k * o + A * f + C * d), 6214 (g[8] = P * t + w * r + S * h + D * c), 6215 (g[9] = P * e + w * n + S * l + D * u), 6216 (g[10] = P * i + w * a + S * p + D * m), 6217 (g[11] = P * s + w * o + S * f + D * d), 6218 (g[12] = T * t + E * r + M * h + F * c), 6219 (g[13] = T * e + E * n + M * l + F * u), 6220 (g[14] = T * i + E * a + M * p + F * m), 6221 (g[15] = T * s + E * o + M * f + F * d), 6222 (this._identityCalculated = !1), 6223 this 6224 ); 6225 } 6226 function g(t) { 6227 var e = t.props; 6228 return this.transform( 6229 e[0], 6230 e[1], 6231 e[2], 6232 e[3], 6233 e[4], 6234 e[5], 6235 e[6], 6236 e[7], 6237 e[8], 6238 e[9], 6239 e[10], 6240 e[11], 6241 e[12], 6242 e[13], 6243 e[14], 6244 e[15] 6245 ); 6246 } 6247 function v() { 6248 return ( 6249 this._identityCalculated || 6250 ((this._identity = 6251 1 === this.props[0] && 6252 0 === this.props[1] && 6253 0 === this.props[2] && 6254 0 === this.props[3] && 6255 0 === this.props[4] && 6256 1 === this.props[5] && 6257 0 === this.props[6] && 6258 0 === this.props[7] && 6259 0 === this.props[8] && 6260 0 === this.props[9] && 6261 1 === this.props[10] && 6262 0 === this.props[11] && 6263 0 === this.props[12] && 6264 0 === this.props[13] && 6265 0 === this.props[14] && 6266 1 === this.props[15]), 6267 (this._identityCalculated = !0)), 6268 this._identity 6269 ); 6270 } 6271 function y(t) { 6272 for (var e = 0; e < 16; ) { 6273 if (t.props[e] !== this.props[e]) return !1; 6274 e += 1; 6275 } 6276 return !0; 6277 } 6278 function b(t) { 6279 var e; 6280 for (e = 0; e < 16; e += 1) t.props[e] = this.props[e]; 6281 return t; 6282 } 6283 function x(t) { 6284 var e; 6285 for (e = 0; e < 16; e += 1) this.props[e] = t[e]; 6286 } 6287 function _(t, e, i) { 6288 return { 6289 x: 6290 t * this.props[0] + 6291 e * this.props[4] + 6292 i * this.props[8] + 6293 this.props[12], 6294 y: 6295 t * this.props[1] + 6296 e * this.props[5] + 6297 i * this.props[9] + 6298 this.props[13], 6299 z: 6300 t * this.props[2] + 6301 e * this.props[6] + 6302 i * this.props[10] + 6303 this.props[14], 6304 }; 6305 } 6306 function k(t, e, i) { 6307 return ( 6308 t * this.props[0] + 6309 e * this.props[4] + 6310 i * this.props[8] + 6311 this.props[12] 6312 ); 6313 } 6314 function A(t, e, i) { 6315 return ( 6316 t * this.props[1] + 6317 e * this.props[5] + 6318 i * this.props[9] + 6319 this.props[13] 6320 ); 6321 } 6322 function C(t, e, i) { 6323 return ( 6324 t * this.props[2] + 6325 e * this.props[6] + 6326 i * this.props[10] + 6327 this.props[14] 6328 ); 6329 } 6330 function P() { 6331 var t = 6332 this.props[0] * this.props[5] - 6333 this.props[1] * this.props[4], 6334 e = this.props[5] / t, 6335 i = -this.props[1] / t, 6336 s = -this.props[4] / t, 6337 r = this.props[0] / t, 6338 n = 6339 (this.props[4] * this.props[13] - 6340 this.props[5] * this.props[12]) / 6341 t, 6342 a = 6343 -( 6344 this.props[0] * this.props[13] - 6345 this.props[1] * this.props[12] 6346 ) / t, 6347 o = new Matrix(); 6348 return ( 6349 (o.props[0] = e), 6350 (o.props[1] = i), 6351 (o.props[4] = s), 6352 (o.props[5] = r), 6353 (o.props[12] = n), 6354 (o.props[13] = a), 6355 o 6356 ); 6357 } 6358 function w(t) { 6359 return this.getInverseMatrix().applyToPointArray( 6360 t[0], 6361 t[1], 6362 t[2] || 0 6363 ); 6364 } 6365 function S(t) { 6366 var e, 6367 i = t.length, 6368 s = []; 6369 for (e = 0; e < i; e += 1) s[e] = w(t[e]); 6370 return s; 6371 } 6372 function D(t, e, i) { 6373 var s = createTypedArray("float32", 6); 6374 if (this.isIdentity()) 6375 (s[0] = t[0]), 6376 (s[1] = t[1]), 6377 (s[2] = e[0]), 6378 (s[3] = e[1]), 6379 (s[4] = i[0]), 6380 (s[5] = i[1]); 6381 else { 6382 var r = this.props[0], 6383 n = this.props[1], 6384 a = this.props[4], 6385 o = this.props[5], 6386 h = this.props[12], 6387 l = this.props[13]; 6388 (s[0] = t[0] * r + t[1] * a + h), 6389 (s[1] = t[0] * n + t[1] * o + l), 6390 (s[2] = e[0] * r + e[1] * a + h), 6391 (s[3] = e[0] * n + e[1] * o + l), 6392 (s[4] = i[0] * r + i[1] * a + h), 6393 (s[5] = i[0] * n + i[1] * o + l); 6394 } 6395 return s; 6396 } 6397 function T(t, e, i) { 6398 return this.isIdentity() 6399 ? [t, e, i] 6400 : [ 6401 t * this.props[0] + 6402 e * this.props[4] + 6403 i * this.props[8] + 6404 this.props[12], 6405 t * this.props[1] + 6406 e * this.props[5] + 6407 i * this.props[9] + 6408 this.props[13], 6409 t * this.props[2] + 6410 e * this.props[6] + 6411 i * this.props[10] + 6412 this.props[14], 6413 ]; 6414 } 6415 function E(t, e) { 6416 if (this.isIdentity()) return t + "," + e; 6417 var i = this.props; 6418 return ( 6419 Math.round(100 * (t * i[0] + e * i[4] + i[12])) / 100 + 6420 "," + 6421 Math.round(100 * (t * i[1] + e * i[5] + i[13])) / 100 6422 ); 6423 } 6424 function M() { 6425 for (var t = 0, e = this.props, i = "matrix3d("; t < 16; ) 6426 (i += s(1e4 * e[t]) / 1e4), 6427 (i += 15 === t ? ")" : ","), 6428 (t += 1); 6429 return i; 6430 } 6431 function F(t) { 6432 return (t < 1e-6 && t > 0) || (t > -1e-6 && t < 0) 6433 ? s(1e4 * t) / 1e4 6434 : t; 6435 } 6436 function I() { 6437 var t = this.props; 6438 return (
6439 "matrix(" + 6440 F(t[0]) + 6441 "," + 6442 F(t[1]) + 6443 "," + 6444 F(t[4]) + 6445 "," + 6446 F(t[5]) + 6447 "," + 6448 F(t[12]) + 6449 "," + 6450 F(t[13]) + 6451 ")" 6452 ); 6453 } 6454 return function () { 6455 (this.reset = r), 6456 (this.rotate = n), 6457 (this.rotateX = a), 6458 (this.rotateY = o), 6459 (this.rotateZ = h), 6460 (this.skew = p), 6461 (this.skewFromAxis = f), 6462 (this.shear = l), 6463 (this.scale = c), 6464 (this.setTransform = u), 6465 (this.translate = m), 6466 (this.transform = d), 6467 (this.multiply = g), 6468 (this.applyToPoint = _), 6469 (this.applyToX = k), 6470 (this.applyToY = A), 6471 (this.applyToZ = C), 6472 (this.applyToPointArray = T), 6473 (this.applyToTriplePoints = D), 6474 (this.applyToPointStringified = E), 6475 (this.toCSS = M), 6476 (this.to2dCSS = I), 6477 (this.clone = b), 6478 (this.cloneFromProps = x), 6479 (this.equals = y), 6480 (this.inversePoints = S), 6481 (this.inversePoint = w), 6482 (this.getInverseMatrix = P), 6483 (this._t = this.transform), 6484 (this.isIdentity = v), 6485 (this._identity = !0), 6486 (this._identityCalculated = !1), 6487 (this.props = createTypedArray("float32", 16)), 6488 this.reset(); 6489 }; 6490 })(); 6491 function _typeof$3(t) { 6492 return (_typeof$3 = 6493 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 6494 ? function (t) { 6495 return typeof t; 6496 } 6497 : function (t) { 6498 return t && 6499 "function" == typeof Symbol && 6500 t.constructor === Symbol && 6501 t !== Symbol.prototype 6502 ? "symbol" 6503 : typeof t; 6504 })(t); 6505 } 6506 var lottie = {}, 6507 standalone = "__[STANDALONE]__", 6508 animationData = "__[ANIMATIONDATA]__", 6509 renderer = ""; 6510 function setLocation(t) { 6511 setLocationHref(t); 6512 } 6513 function searchAnimations() { 6514 !0 === standalone 6515 ? animationManager.searchAnimations( 6516 animationData, 6517 standalone, 6518 renderer 6519 ) 6520 : animationManager.searchAnimations(); 6521 } 6522 function setSubframeRendering(t) { 6523 setSubframeEnabled(t); 6524 } 6525 function setPrefix(t) { 6526 setIdPrefix(t); 6527 } 6528 function loadAnimation(t) { 6529 return ( 6530 !0 === standalone && 6531 (t.animationData = JSON.parse(animationData)), 6532 animationManager.loadAnimation(t) 6533 ); 6534 } 6535 function setQuality(t) { 6536 if ("string" == typeof t) 6537 switch (t) { 6538 case "high": 6539 setDefaultCurveSegments(200); 6540 break; 6541 default: 6542 case "medium": 6543 setDefaultCurveSegments(50); 6544 break; 6545 case "low": 6546 setDefaultCurveSegments(10); 6547 } 6548 else !isNaN(t) && t > 1 && setDefaultCurveSegments(t); 6549 getDefaultCurveSegments() >= 50 ? roundValues(!1) : roundValues(!0); 6550 } 6551 function inBrowser() { 6552 return "undefined" != typeof navigator; 6553 } 6554 function installPlugin(t, e) { 6555 "expressions" === t && setExpressionsPlugin(e); 6556 } 6557 function getFactory(t) { 6558 switch (t) { 6559 case "propertyFactory": 6560 return PropertyFactory; 6561 case "shapePropertyFactory": 6562 return ShapePropertyFactory; 6563 case "matrix": 6564 return Matrix; 6565 default: 6566 return null; 6567 } 6568 } 6569 function checkReady() { 6570 "complete" === document.readyState && 6571 (clearInterval(readyStateCheckInterval), searchAnimations()); 6572 } 6573 function getQueryVariable(t) { 6574 for (var e = queryString.split("&"), i = 0; i < e.length; i += 1) { 6575 var s = e[i].split("="); 6576 if (decodeURIComponent(s[0]) == t) 6577 return decodeURIComponent(s[1]); 6578 } 6579 return null; 6580 } 6581 (lottie.play = animationManager.play), 6582 (lottie.pause = animationManager.pause), 6583 (lottie.setLocationHref = setLocation), 6584 (lottie.togglePause = animationManager.togglePause), 6585 (lottie.setSpeed = animationManager.setSpeed), 6586 (lottie.setDirection = animationManager.setDirection), 6587 (lottie.stop = animationManager.stop), 6588 (lottie.searchAnimations = searchAnimations), 6589 (lottie.registerAnimation = animationManager.registerAnimation), 6590 (lottie.loadAnimation = loadAnimation), 6591 (lottie.setSubframeRendering = setSubframeRendering), 6592 (lottie.resize = animationManager.resize), 6593 (lottie.goToAndStop = animationManager.goToAndStop), 6594 (lottie.destroy = animationManager.destroy), 6595 (lottie.setQuality = setQuality), 6596 (lottie.inBrowser = inBrowser), 6597 (lottie.installPlugin = installPlugin), 6598 (lottie.freeze = animationManager.freeze), 6599 (lottie.unfreeze = animationManager.unfreeze), 6600 (lottie.setVolume = animationManager.setVolume), 6601 (lottie.mute = animationManager.mute), 6602 (lottie.unmute = animationManager.unmute), 6603 (lottie.getRegisteredAnimations = 6604 animationManager.getRegisteredAnimations), 6605 (lottie.useWebWorker = setWebWorker), 6606 (lottie.setIDPrefix = setPrefix), 6607 (lottie.__getFactory = getFactory), 6608 (lottie.version = "5.13.0"); 6609 var queryString = ""; 6610 if (standalone) { 6611 var scripts = document.getElementsByTagName("script"), 6612 index = scripts.length - 1, 6613 myScript = scripts[index] || { src: "" }; 6614 (queryString = myScript.src 6615 ? myScript.src.replace(/^[^\?]+\??/, "") 6616 : ""), 6617 (renderer = getQueryVariable("renderer")); 6618 } 6619 var readyStateCheckInterval = setInterval(checkReady, 100); 6620 try { 6621 "object" === _typeof$3(exports) || 6622 ("function" == typeof define && define.amd) || 6623 (window.bodymovin = lottie); 6624 } catch (t) {} 6625 var ShapeModifiers = (function () { 6626 var t = {}, 6627 e = {}; 6628 return ( 6629 (t.registerModifier = function (t, i) { 6630 e[t] || (e[t] = i); 6631 }), 6632 (t.getModifier = function (t, i, s) { 6633 return new e[t](i, s); 6634 }), 6635 t 6636 ); 6637 })(); 6638 function ShapeModifier() {} 6639 function TrimModifier() {} 6640 function PuckerAndBloatModifier() {} 6641 (ShapeModifier.prototype.initModifierProperties = function () {}), 6642 (ShapeModifier.prototype.addShapeToModifier = function () {}), 6643 (ShapeModifier.prototype.addShape = function (t) { 6644 if (!this.closed) {
6645 t.sh.container.addDynamicProperty(t.sh); 6646 var e = { 6647 shape: t.sh, 6648 data: t, 6649 localShapeCollection: 6650 shapeCollectionPool.newShapeCollection(), 6651 }; 6652 this.shapes.push(e), 6653 this.addShapeToModifier(e), 6654 this._isAnimated && t.setAsAnimated(); 6655 } 6656 }), 6657 (ShapeModifier.prototype.init = function (t, e) { 6658 (this.shapes = []), 6659 (this.elem = t), 6660 this.initDynamicPropertyContainer(t), 6661 this.initModifierProperties(t, e), 6662 (this.frameId = initialDefaultFrame), 6663 (this.closed = !1), 6664 (this.k = !1), 6665 this.dynamicProperties.length 6666 ? (this.k = !0) 6667 : this.getValue(!0); 6668 }), 6669 (ShapeModifier.prototype.processKeys = function () { 6670 this.elem.globalData.frameId !== this.frameId && 6671 ((this.frameId = this.elem.globalData.frameId), 6672 this.iterateDynamicProperties()); 6673 }), 6674 extendPrototype([DynamicPropertyContainer], ShapeModifier), 6675 extendPrototype([ShapeModifier], TrimModifier), 6676 (TrimModifier.prototype.initModifierProperties = function (t, e) { 6677 (this.s = PropertyFactory.getProp(t, e.s, 0, 0.01, this)), 6678 (this.e = PropertyFactory.getProp(t, e.e, 0, 0.01, this)), 6679 (this.o = PropertyFactory.getProp(t, e.o, 0, 0, this)), 6680 (this.sValue = 0), 6681 (this.eValue = 0), 6682 (this.getValue = this.processKeys), 6683 (this.m = e.m), 6684 (this._isAnimated = 6685 !!this.s.effectsSequence.length || 6686 !!this.e.effectsSequence.length || 6687 !!this.o.effectsSequence.length); 6688 }), 6689 (TrimModifier.prototype.addShapeToModifier = function (t) { 6690 t.pathsData = []; 6691 }), 6692 (TrimModifier.prototype.calculateShapeEdges = function ( 6693 t, 6694 e, 6695 i, 6696 s, 6697 r 6698 ) { 6699 var n, 6700 a = []; 6701 e <= 1 6702 ? a.push({ s: t, e: e }) 6703 : t >= 1 6704 ? a.push({ s: t - 1, e: e - 1 }) 6705 : (a.push({ s: t, e: 1 }), a.push({ s: 0, e: e - 1 })); 6706 var o, 6707 h, 6708 l = [], 6709 p = a.length; 6710 for (o = 0; o < p; o += 1) 6711 (h = a[o]).e * r < s || 6712 h.s * r > s + i || 6713 ((n = h.s * r <= s ? 0 : (h.s * r - s) / i), 6714 l.push([n, h.e * r >= s + i ? 1 : (h.e * r - s) / i])); 6715 return l.length || l.push([0, 0]), l; 6716 }), 6717 (TrimModifier.prototype.releasePathsData = function (t) { 6718 var e, 6719 i = t.length; 6720 for (e = 0; e < i; e += 1) segmentsLengthPool.release(t[e]); 6721 return (t.length = 0), t; 6722 }), 6723 (TrimModifier.prototype.processShapes = function (t) { 6724 if (this._mdf || t) { 6725 var e = (this.o.v % 360) / 360; 6726 if ( 6727 (e < 0 && (e += 1), 6728 (s = 6729 this.s.v > 1 6730 ? 1 + e 6731 : this.s.v < 0 6732 ? 0 + e 6733 : this.s.v + e) > 6734 (r = 6735 this.e.v > 1 6736 ? 1 + e 6737 : this.e.v < 0 6738 ? 0 + e 6739 : this.e.v + e)) 6740 ) { 6741 var i = s; 6742 (s = r), (r = i); 6743 } 6744 (s = 1e-4 * Math.round(1e4 * s)), 6745 (r = 1e-4 * Math.round(1e4 * r)), 6746 (this.sValue = s), 6747 (this.eValue = r); 6748 } else (s = this.sValue), (r = this.eValue); 6749 var s, 6750 r, 6751 n, 6752 a, 6753 o, 6754 h, 6755 l, 6756 p, 6757 f, 6758 c = this.shapes.length, 6759 u = 0; 6760 if (r === s) 6761 for (a = 0; a < c; a += 1) 6762 this.shapes[a].localShapeCollection.releaseShapes(), 6763 (this.shapes[a].shape._mdf = !0), 6764 (this.shapes[a].shape.paths = 6765 this.shapes[a].localShapeCollection), 6766 this._mdf && (this.shapes[a].pathsData.length = 0); 6767 else if ((1 === r && 0 === s) || (0 === r && 1 === s)) { 6768 if (this._mdf) 6769 for (a = 0; a < c; a += 1) 6770 (this.shapes[a].pathsData.length = 0), 6771 (this.shapes[a].shape._mdf = !0); 6772 } else { 6773 var m, 6774 d, 6775 g = []; 6776 for (a = 0; a < c; a += 1) 6777 if ( 6778 (m = this.shapes[a]).shape._mdf || 6779 this._mdf || 6780 t || 6781 2 === this.m 6782 ) { 6783 if ( 6784 ((h = (n = m.shape.paths)._length), 6785 (f = 0), 6786 !m.shape._mdf && m.pathsData.length) 6787 ) 6788 f = m.totalShapeLength; 6789 else { 6790 for ( 6791 l = this.releasePathsData(m.pathsData), o = 0; 6792 o < h; 6793 o += 1 6794 ) 6795 (p = bez.getSegmentsLength(n.shapes[o])), 6796 l.push(p), 6797 (f += p.totalLength); 6798 (m.totalShapeLength = f), (m.pathsData = l); 6799 } 6800 (u += f), (m.shape._mdf = !0); 6801 } else m.shape.paths = m.localShapeCollection; 6802 var v, 6803 y = s, 6804 b = r, 6805 x = 0; 6806 for (a = c - 1; a >= 0; a -= 1) 6807 if ((m = this.shapes[a]).shape._mdf) { 6808 for ( 6809 (d = m.localShapeCollection).releaseShapes(), 6810 2 === this.m && c > 1 6811 ? ((v = this.calculateShapeEdges( 6812 s, 6813 r, 6814 m.totalShapeLength, 6815 x, 6816 u 6817 )), 6818 (x += m.totalShapeLength)) 6819 : (v = [[y, b]]), 6820 h = v.length, 6821 o = 0; 6822 o < h; 6823 o += 1 6824 ) { 6825 (y = v[o][0]), 6826 (b = v[o][1]), 6827 (g.length = 0), 6828 b <= 1 6829 ? g.push({ 6830 s: m.totalShapeLength * y, 6831 e: m.totalShapeLength * b, 6832 }) 6833 : y >= 1 6834 ? g.push({ 6835 s: m.totalShapeLength * (y - 1), 6836 e: m.totalShapeLength * (b - 1), 6837 }) 6838 : (g.push({ 6839 s: m.totalShapeLength * y, 6840 e: m.totalShapeLength, 6841 }), 6842 g.push({ s: 0, e: m.totalShapeLength * (b - 1) })); 6843 var _ = this.addShapes(m, g[0]); 6844 if (g[0].s !== g[0].e) { 6845 if (g.length > 1) 6846 if ( 6847 m.shape.paths.shapes[m.shape.paths._length - 1].c 6848 ) { 6849 var k = _.pop(); 6850 this.addPaths(_, d), 6851 (_ = this.addShapes(m, g[1], k)); 6852 } else 6853 this.addPaths(_, d), (_ = this.addShapes(m, g[1])); 6854 this.addPaths(_, d); 6855 } 6856 } 6857 m.shape.paths = d; 6858 } 6859 } 6860 }), 6861 (TrimModifier.prototype.addPaths = function (t, e) { 6862 var i, 6863 s = t.length; 6864 for (i = 0; i < s; i += 1) e.addShape(t[i]); 6865 }), 6866 (TrimModifier.prototype.addSegment = function ( 6867 t, 6868 e, 6869 i, 6870 s, 6871 r, 6872 n, 6873 a 6874 ) { 6875 r.setXYAt(e[0], e[1], "o", n), 6876 r.setXYAt(i[0], i[1], "i", n + 1), 6877 a && r.setXYAt(t[0], t[1], "v", n), 6878 r.setXYAt(s[0], s[1], "v", n + 1); 6879 }), 6880 (TrimModifier.prototype.addSegmentFromArray = function ( 6881 t, 6882 e, 6883 i, 6884 s 6885 ) { 6886 e.setXYAt(t[1], t[5], "o", i), 6887 e.setXYAt(t[2], t[6], "i", i + 1), 6888 s && e.setXYAt(t[0], t[4], "v", i), 6889 e.setXYAt(t[3], t[7], "v", i + 1); 6890 }), 6891 (TrimModifier.prototype.addShapes = function (t, e, i) { 6892 var s, 6893 r, 6894 n, 6895 a, 6896 o, 6897 h, 6898 l, 6899 p, 6900 f = t.pathsData, 6901 c = t.shape.paths.shapes, 6902 u = t.shape.paths._length, 6903 m = 0, 6904 d = [], 6905 g = !0; 6906 for ( 6907 i 6908 ? ((o = i._length), (p = i._length)) 6909 : ((i = shapePool.newElement()), (o = 0), (p = 0)), 6910 d.push(i), 6911 s = 0; 6912 s < u; 6913 s += 1 6914 ) { 6915 for ( 6916 h = f[s].lengths, 6917 i.c = c[s].c, 6918 n = c[s].c ? h.length : h.length + 1, 6919 r = 1; 6920 r < n; 6921 r += 1 6922 ) 6923 if (m + (a = h[r - 1]).addedLength < e.s) 6924 (m += a.addedLength), (i.c = !1); 6925 else { 6926 if (m > e.e) { 6927 i.c = !1; 6928 break; 6929 } 6930 e.s <= m && e.e >= m + a.addedLength 6931 ? (this.addSegment( 6932 c[s].v[r - 1], 6933 c[s].o[r - 1], 6934 c[s].i[r], 6935 c[s].v[r], 6936 i, 6937 o, 6938 g 6939 ), 6940 (g = !1)) 6941 : ((l = bez.getNewSegment( 6942 c[s].v[r - 1], 6943 c[s].v[r], 6944 c[s].o[r - 1], 6945 c[s].i[r], 6946 (e.s - m) / a.addedLength, 6947 (e.e - m) / a.addedLength, 6948 h[r - 1] 6949 )), 6950 this.addSegmentFromArray(l, i, o, g), 6951 (g = !1), 6952 (i.c = !1)), 6953 (m += a.addedLength), 6954 (o += 1); 6955 } 6956 if (c[s].c && h.length) { 6957 if (((a = h[r - 1]), m <= e.e)) { 6958 var v = h[r - 1].addedLength; 6959 e.s <= m && e.e >= m + v 6960 ? (this.addSegment( 6961 c[s].v[r - 1], 6962 c[s].o[r - 1], 6963 c[s].i[0], 6964 c[s].v[0], 6965 i, 6966 o, 6967 g 6968 ), 6969 (g = !1)) 6970 : ((l = bez.getNewSegment( 6971 c[s].v[r - 1], 6972 c[s].v[0], 6973 c[s].o[r - 1], 6974 c[s].i[0], 6975 (e.s - m) / v, 6976 (e.e - m) / v, 6977 h[r - 1] 6978 )), 6979 this.addSegmentFromArray(l, i, o, g), 6980 (g = !1), 6981 (i.c = !1)); 6982 } else i.c = !1; 6983 (m += a.addedLength), (o += 1); 6984 } 6985 if ( 6986 (i._length &&
6987 (i.setXYAt(i.v[p][0], i.v[p][1], "i", p), 6988 i.setXYAt( 6989 i.v[i._length - 1][0], 6990 i.v[i._length - 1][1], 6991 "o", 6992 i._length - 1 6993 )), 6994 m > e.e) 6995 ) 6996 break; 6997 s < u - 1 && 6998 ((i = shapePool.newElement()), (g = !0), d.push(i), (o = 0)); 6999 } 7000 return d; 7001 }), 7002 extendPrototype([ShapeModifier], PuckerAndBloatModifier), 7003 (PuckerAndBloatModifier.prototype.initModifierProperties = 7004 function (t, e) { 7005 (this.getValue = this.processKeys), 7006 (this.amount = PropertyFactory.getProp( 7007 t, 7008 e.a, 7009 0, 7010 null, 7011 this 7012 )), 7013 (this._isAnimated = !!this.amount.effectsSequence.length); 7014 }), 7015 (PuckerAndBloatModifier.prototype.processPath = function (t, e) { 7016 var i = e / 100, 7017 s = [0, 0], 7018 r = t._length, 7019 n = 0; 7020 for (n = 0; n < r; n += 1) 7021 (s[0] += t.v[n][0]), (s[1] += t.v[n][1]); 7022 (s[0] /= r), (s[1] /= r); 7023 var a, 7024 o, 7025 h, 7026 l, 7027 p, 7028 f, 7029 c = shapePool.newElement(); 7030 for (c.c = t.c, n = 0; n < r; n += 1) 7031 (a = t.v[n][0] + (s[0] - t.v[n][0]) * i), 7032 (o = t.v[n][1] + (s[1] - t.v[n][1]) * i), 7033 (h = t.o[n][0] + -((s[0] - t.o[n][0]) * i)), 7034 (l = t.o[n][1] + -((s[1] - t.o[n][1]) * i)), 7035 (p = t.i[n][0] + -((s[0] - t.i[n][0]) * i)), 7036 (f = t.i[n][1] + -((s[1] - t.i[n][1]) * i)), 7037 c.setTripleAt(a, o, h, l, p, f, n); 7038 return c; 7039 }), 7040 (PuckerAndBloatModifier.prototype.processShapes = function (t) { 7041 var e, 7042 i, 7043 s, 7044 r, 7045 n, 7046 a, 7047 o = this.shapes.length, 7048 h = this.amount.v; 7049 if (0 !== h) 7050 for (i = 0; i < o; i += 1) { 7051 if ( 7052 ((a = (n = this.shapes[i]).localShapeCollection), 7053 n.shape._mdf || this._mdf || t) 7054 ) 7055 for ( 7056 a.releaseShapes(), 7057 n.shape._mdf = !0, 7058 e = n.shape.paths.shapes, 7059 r = n.shape.paths._length, 7060 s = 0; 7061 s < r; 7062 s += 1 7063 ) 7064 a.addShape(this.processPath(e[s], h)); 7065 n.shape.paths = n.localShapeCollection; 7066 } 7067 this.dynamicProperties.length || (this._mdf = !1); 7068 }); 7069 var TransformPropertyFactory = (function () { 7070 var t = [0, 0]; 7071 function e(t, e, i) { 7072 if ( 7073 ((this.elem = t), 7074 (this.frameId = -1), 7075 (this.propType = "transform"), 7076 (this.data = e), 7077 (this.v = new Matrix()), 7078 (this.pre = new Matrix()), 7079 (this.appliedTransformations = 0), 7080 this.initDynamicPropertyContainer(i || t), 7081 e.p && e.p.s 7082 ? ((this.px = PropertyFactory.getProp(t, e.p.x, 0, 0, this)), 7083 (this.py = PropertyFactory.getProp(t, e.p.y, 0, 0, this)), 7084 e.p.z && 7085 (this.pz = PropertyFactory.getProp(t, e.p.z, 0, 0, this))) 7086 : (this.p = PropertyFactory.getProp( 7087 t, 7088 e.p || { k: [0, 0, 0] }, 7089 1, 7090 0, 7091 this 7092 )), 7093 e.rx) 7094 ) { 7095 if ( 7096 ((this.rx = PropertyFactory.getProp( 7097 t, 7098 e.rx, 7099 0, 7100 degToRads, 7101 this 7102 )), 7103 (this.ry = PropertyFactory.getProp( 7104 t, 7105 e.ry, 7106 0, 7107 degToRads, 7108 this 7109 )), 7110 (this.rz = PropertyFactory.getProp( 7111 t, 7112 e.rz, 7113 0, 7114 degToRads, 7115 this 7116 )), 7117 e.or.k[0].ti) 7118 ) { 7119 var s, 7120 r = e.or.k.length; 7121 for (s = 0; s < r; s += 1) 7122 (e.or.k[s].to = null), (e.or.k[s].ti = null); 7123 } 7124 (this.or = PropertyFactory.getProp( 7125 t, 7126 e.or, 7127 1, 7128 degToRads, 7129 this 7130 )), 7131 (this.or.sh = !0); 7132 } else 7133 this.r = PropertyFactory.getProp( 7134 t, 7135 e.r || { k: 0 }, 7136 0, 7137 degToRads, 7138 this 7139 ); 7140 e.sk && 7141 ((this.sk = PropertyFactory.getProp( 7142 t, 7143 e.sk, 7144 0, 7145 degToRads, 7146 this 7147 )), 7148 (this.sa = PropertyFactory.getProp( 7149 t, 7150 e.sa, 7151 0, 7152 degToRads, 7153 this 7154 ))), 7155 (this.a = PropertyFactory.getProp( 7156 t, 7157 e.a || { k: [0, 0, 0] }, 7158 1, 7159 0, 7160 this 7161 )), 7162 (this.s = PropertyFactory.getProp( 7163 t, 7164 e.s || { k: [100, 100, 100] }, 7165 1, 7166 0.01, 7167 this 7168 )), 7169 e.o 7170 ? (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, t)) 7171 : (this.o = { _mdf: !1, v: 1 }), 7172 (this._isDirty = !0), 7173 this.dynamicProperties.length || this.getValue(!0); 7174 } 7175 return ( 7176 (e.prototype = { 7177 applyToMatrix: function (t) { 7178 var e = this._mdf; 7179 this.iterateDynamicProperties(), 7180 (this._mdf = this._mdf || e), 7181 this.a && 7182 t.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), 7183 this.s && t.scale(this.s.v[0], this.s.v[1], this.s.v[2]), 7184 this.sk && t.skewFromAxis(-this.sk.v, this.sa.v), 7185 this.r 7186 ? t.rotate(-this.r.v) 7187 : t 7188 .rotateZ(-this.rz.v) 7189 .rotateY(this.ry.v) 7190 .rotateX(this.rx.v) 7191 .rotateZ(-this.or.v[2]) 7192 .rotateY(this.or.v[1]) 7193 .rotateX(this.or.v[0]), 7194 this.data.p.s 7195 ? this.data.p.z 7196 ? t.translate(this.px.v, this.py.v, -this.pz.v) 7197 : t.translate(this.px.v, this.py.v, 0) 7198 : t.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); 7199 }, 7200 getValue: function (e) { 7201 if (this.elem.globalData.frameId !== this.frameId) { 7202 if ( 7203 (this._isDirty && 7204 (this.precalculateMatrix(), (this._isDirty = !1)), 7205 this.iterateDynamicProperties(), 7206 this._mdf || e) 7207 ) { 7208 if ( 7209 (this.v.cloneFromProps(this.pre.props), 7210 this.appliedTransformations < 1 && 7211 this.v.translate( 7212 -this.a.v[0], 7213 -this.a.v[1], 7214 this.a.v[2] 7215 ), 7216 this.appliedTransformations < 2 && 7217 this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]), 7218 this.sk && 7219 this.appliedTransformations < 3 && 7220 this.v.skewFromAxis(-this.sk.v, this.sa.v), 7221 this.r && this.appliedTransformations < 4 7222 ? this.v.rotate(-this.r.v) 7223 : !this.r && 7224 this.appliedTransformations < 4 && 7225 this.v 7226 .rotateZ(-this.rz.v) 7227 .rotateY(this.ry.v) 7228 .rotateX(this.rx.v) 7229 .rotateZ(-this.or.v[2]) 7230 .rotateY(this.or.v[1]) 7231 .rotateX(this.or.v[0]),
7232 this.autoOriented) 7233 ) { 7234 if ( 7235 ((i = this.elem.globalData.frameRate), 7236 this.p && this.p.keyframes && this.p.getValueAtTime) 7237 ) 7238 this.p._caching.lastFrame + this.p.offsetTime <= 7239 this.p.keyframes[0].t 7240 ? ((s = this.p.getValueAtTime( 7241 (this.p.keyframes[0].t + 0.01) / i, 7242 0 7243 )), 7244 (r = this.p.getValueAtTime( 7245 this.p.keyframes[0].t / i, 7246 0 7247 ))) 7248 : this.p._caching.lastFrame + this.p.offsetTime >= 7249 this.p.keyframes[this.p.keyframes.length - 1].t 7250 ? ((s = this.p.getValueAtTime( 7251 this.p.keyframes[this.p.keyframes.length - 1] 7252 .t / i, 7253 0 7254 )), 7255 (r = this.p.getValueAtTime( 7256 (this.p.keyframes[this.p.keyframes.length - 1] 7257 .t - 7258 0.05) / 7259 i, 7260 0 7261 ))) 7262 : ((s = this.p.pv), 7263 (r = this.p.getValueAtTime( 7264 (this.p._caching.lastFrame + 7265 this.p.offsetTime - 7266 0.01) / 7267 i, 7268 this.p.offsetTime 7269 ))); 7270 else if ( 7271 this.px && 7272 this.px.keyframes && 7273 this.py.keyframes && 7274 this.px.getValueAtTime && 7275 this.py.getValueAtTime 7276 ) { 7277 (s = []), (r = []); 7278 var i, 7279 s, 7280 r, 7281 n = this.px, 7282 a = this.py; 7283 n._caching.lastFrame + n.offsetTime <= 7284 n.keyframes[0].t 7285 ? ((s[0] = n.getValueAtTime( 7286 (n.keyframes[0].t + 0.01) / i, 7287 0 7288 )), 7289 (s[1] = a.getValueAtTime( 7290 (a.keyframes[0].t + 0.01) / i, 7291 0 7292 )), 7293 (r[0] = n.getValueAtTime( 7294 n.keyframes[0].t / i, 7295 0 7296 )), 7297 (r[1] = a.getValueAtTime( 7298 a.keyframes[0].t / i, 7299 0 7300 ))) 7301 : n._caching.lastFrame + n.offsetTime >= 7302 n.keyframes[n.keyframes.length - 1].t 7303 ? ((s[0] = n.getValueAtTime( 7304 n.keyframes[n.keyframes.length - 1].t / i, 7305 0 7306 )), 7307 (s[1] = a.getValueAtTime( 7308 a.keyframes[a.keyframes.length - 1].t / i, 7309 0 7310 )), 7311 (r[0] = n.getValueAtTime( 7312 (n.keyframes[n.keyframes.length - 1].t - 0.01) / 7313 i, 7314 0 7315 )), 7316 (r[1] = a.getValueAtTime( 7317 (a.keyframes[a.keyframes.length - 1].t - 0.01) / 7318 i, 7319 0 7320 ))) 7321 : ((s = [n.pv, a.pv]), 7322 (r[0] = n.getValueAtTime( 7323 (n._caching.lastFrame + n.offsetTime - 0.01) / 7324 i, 7325 n.offsetTime 7326 )), 7327 (r[1] = a.getValueAtTime( 7328 (a._caching.lastFrame + a.offsetTime - 0.01) / 7329 i, 7330 a.offsetTime 7331 ))); 7332 } else s = r = t; 7333 this.v.rotate(-Math.atan2(s[1] - r[1], s[0] - r[0])); 7334 } 7335 this.data.p && this.data.p.s 7336 ? this.data.p.z 7337 ? this.v.translate(this.px.v, this.py.v, -this.pz.v) 7338 : this.v.translate(this.px.v, this.py.v, 0) 7339 : this.v.translate( 7340 this.p.v[0], 7341 this.p.v[1], 7342 -this.p.v[2] 7343 ); 7344 } 7345 this.frameId = this.elem.globalData.frameId; 7346 } 7347 }, 7348 precalculateMatrix: function () { 7349 if ( 7350 ((this.appliedTransformations = 0), 7351 this.pre.reset(), 7352 !this.a.effectsSequence.length && 7353 (this.pre.translate( 7354 -this.a.v[0], 7355 -this.a.v[1], 7356 this.a.v[2] 7357 ), 7358 (this.appliedTransformations = 1), 7359 !this.s.effectsSequence.length)) 7360 ) { 7361 if ( 7362 (this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]), 7363 (this.appliedTransformations = 2), 7364 this.sk) 7365 ) { 7366 if ( 7367 this.sk.effectsSequence.length || 7368 this.sa.effectsSequence.length 7369 ) 7370 return; 7371 this.pre.skewFromAxis(-this.sk.v, this.sa.v), 7372 (this.appliedTransformations = 3); 7373 } 7374 this.r 7375 ? this.r.effectsSequence.length || 7376 (this.pre.rotate(-this.r.v), 7377 (this.appliedTransformations = 4)) 7378 : this.rz.effectsSequence.length || 7379 this.ry.effectsSequence.length || 7380 this.rx.effectsSequence.length || 7381 this.or.effectsSequence.length || 7382 (this.pre 7383 .rotateZ(-this.rz.v) 7384 .rotateY(this.ry.v) 7385 .rotateX(this.rx.v) 7386 .rotateZ(-this.or.v[2]) 7387 .rotateY(this.or.v[1]) 7388 .rotateX(this.or.v[0]), 7389 (this.appliedTransformations = 4)); 7390 } 7391 }, 7392 autoOrient: function () {}, 7393 }), 7394 extendPrototype([DynamicPropertyContainer], e), 7395 (e.prototype.addDynamicProperty = function (t) { 7396 this._addDynamicProperty(t), 7397 this.elem.addDynamicProperty(t), 7398 (this._isDirty = !0); 7399 }), 7400 (e.prototype._addDynamicProperty = 7401 DynamicPropertyContainer.prototype.addDynamicProperty), 7402 { 7403 getTransformProperty: function (t, i, s) { 7404 return new e(t, i, s); 7405 }, 7406 } 7407 ); 7408 })(); 7409 function RepeaterModifier() {} 7410 function RoundCornersModifier() {} 7411 function floatEqual(t, e) { 7412 return 1e5 * Math.abs(t - e) <= Math.min(Math.abs(t), Math.abs(e)); 7413 } 7414 function floatZero(t) { 7415 return 1e-5 >= Math.abs(t); 7416 } 7417 function lerp(t, e, i) { 7418 return t * (1 - i) + e * i; 7419 } 7420 function lerpPoint(t, e, i) { 7421 return [lerp(t[0], e[0], i), lerp(t[1], e[1], i)]; 7422 } 7423 function quadRoots(t, e, i) { 7424 if (0 === t) return []; 7425 var s = e * e - 4 * t * i; 7426 if (s < 0) return []; 7427 var r = -e / (2 * t); 7428 if (0 === s) return [r]; 7429 var n = Math.sqrt(s) / (2 * t); 7430 return [r - n, r + n]; 7431 } 7432 function polynomialCoefficients(t, e, i, s) { 7433 return [ 7434 3 * e - t - 3 * i + s, 7435 3 * t - 6 * e + 3 * i, 7436 -3 * t + 3 * e, 7437 t, 7438 ]; 7439 } 7440 function singlePoint(t) { 7441 return new PolynomialBezier(t, t, t, t, !1); 7442 } 7443 function PolynomialBezier(t, e, i, s, r) { 7444 r && pointEqual(t, e) && (e = lerpPoint(t, s, 1 / 3)), 7445 r && pointEqual(i, s) && (i = lerpPoint(t, s, 2 / 3)); 7446 var n = polynomialCoefficients(t[0], e[0], i[0], s[0]), 7447 a = polynomialCoefficients(t[1], e[1], i[1], s[1]); 7448 (this.a = [n[0], a[0]]), 7449 (this.b = [n[1], a[1]]), 7450 (this.c = [n[2], a[2]]), 7451 (this.d = [n[3], a[3]]), 7452 (this.points = [t, e, i, s]); 7453 } 7454 function extrema(t, e) { 7455 var i = t.points[0][e], 7456 s = t.points[t.points.length - 1][e]; 7457 if (i > s) { 7458 var r = s; 7459 (s = i), (i = r); 7460 } 7461 for ( 7462 var n = quadRoots(3 * t.a[e], 2 * t.b[e], t.c[e]), a = 0; 7463 a < n.length; 7464 a += 1 7465 ) 7466 if (n[a] > 0 && n[a] < 1) { 7467 var o = t.point(n[a])[e]; 7468 o < i ? (i = o) : o > s && (s = o); 7469 } 7470 return { min: i, max: s }; 7471 } 7472 function intersectData(t, e, i) { 7473 var s = t.boundingBox(); 7474 return { 7475 cx: s.cx, 7476 cy: s.cy, 7477 width: s.width, 7478 height: s.height, 7479 bez: t, 7480 t: (e + i) / 2, 7481 t1: e, 7482 t2: i, 7483 }; 7484 } 7485 function splitData(t) { 7486 var e = t.bez.split(0.5); 7487 return [ 7488 intersectData(e[0], t.t1, t.t), 7489 intersectData(e[1], t.t, t.t2), 7490 ]; 7491 } 7492 function boxIntersect(t, e) { 7493 return ( 7494 2 * Math.abs(t.cx - e.cx) < t.width + e.width && 7495 2 * Math.abs(t.cy - e.cy) < t.height + e.height 7496 ); 7497 } 7498 function intersectsImpl(t, e, i, s, r, n) { 7499 if (boxIntersect(t, e)) 7500 if ( 7501 i >= n || 7502 (t.width <= s && t.height <= s && e.width <= s && e.height <= s) 7503 ) 7504 r.push([t.t, e.t]); 7505 else { 7506 var a = splitData(t), 7507 o = splitData(e); 7508 intersectsImpl(a[0], o[0], i + 1, s, r, n), 7509 intersectsImpl(a[0], o[1], i + 1, s, r, n), 7510 intersectsImpl(a[1], o[0], i + 1, s, r, n), 7511 intersectsImpl(a[1], o[1], i + 1, s, r, n); 7512 } 7513 } 7514 function crossProduct(t, e) { 7515 return [ 7516 t[1] * e[2] - t[2] * e[1], 7517 t[2] * e[0] - t[0] * e[2], 7518 t[0] * e[1] - t[1] * e[0], 7519 ]; 7520 } 7521 function lineIntersection(t, e, i, s) { 7522 var r = [t[0], t[1], 1], 7523 n = [e[0], e[1], 1], 7524 a = [i[0], i[1], 1], 7525 o = [s[0], s[1], 1], 7526 h = crossProduct(crossProduct(r, n), crossProduct(a, o)); 7527 return floatZero(h[2]) ? null : [h[0] / h[2], h[1] / h[2]]; 7528 } 7529 function polarOffset(t, e, i) {
7530 return [t[0] + Math.cos(e) * i, t[1] - Math.sin(e) * i]; 7531 } 7532 function pointDistance(t, e) { 7533 return Math.hypot(t[0] - e[0], t[1] - e[1]); 7534 } 7535 function pointEqual(t, e) { 7536 return floatEqual(t[0], e[0]) && floatEqual(t[1], e[1]); 7537 } 7538 function ZigZagModifier() {} 7539 function setPoint(t, e, i, s, r, n, a) { 7540 var o = i - Math.PI / 2, 7541 h = i + Math.PI / 2, 7542 l = e[0] + Math.cos(i) * s * r, 7543 p = e[1] - Math.sin(i) * s * r; 7544 t.setTripleAt( 7545 l, 7546 p, 7547 l + Math.cos(o) * n, 7548 p - Math.sin(o) * n, 7549 l + Math.cos(h) * a, 7550 p - Math.sin(h) * a, 7551 t.length() 7552 ); 7553 } 7554 function getPerpendicularVector(t, e) { 7555 var i = [e[0] - t[0], e[1] - t[1]], 7556 s = -(0.5 * Math.PI); 7557 return [ 7558 Math.cos(s) * i[0] - Math.sin(s) * i[1], 7559 Math.sin(s) * i[0] + Math.cos(s) * i[1], 7560 ]; 7561 } 7562 function getProjectingAngle(t, e) { 7563 var i = 0 === e ? t.length() - 1 : e - 1, 7564 s = (e + 1) % t.length(), 7565 r = getPerpendicularVector(t.v[i], t.v[s]); 7566 return Math.atan2(0, 1) - Math.atan2(r[1], r[0]); 7567 } 7568 function zigZagCorner(t, e, i, s, r, n, a) { 7569 var o = getProjectingAngle(e, i), 7570 h = e.v[i % e._length], 7571 l = e.v[0 === i ? e._length - 1 : i - 1], 7572 p = e.v[(i + 1) % e._length], 7573 f = 7574 2 === n 7575 ? Math.sqrt( 7576 Math.pow(h[0] - l[0], 2) + Math.pow(h[1] - l[1], 2) 7577 ) 7578 : 0, 7579 c = 7580 2 === n 7581 ? Math.sqrt( 7582 Math.pow(h[0] - p[0], 2) + Math.pow(h[1] - p[1], 2) 7583 ) 7584 : 0; 7585 setPoint( 7586 t, 7587 e.v[i % e._length], 7588 o, 7589 a, 7590 s, 7591 c / (2 * (r + 1)), 7592 f / (2 * (r + 1)), 7593 n 7594 ); 7595 } 7596 function zigZagSegment(t, e, i, s, r, n) { 7597 for (var a = 0; a < s; a += 1) { 7598 var o = (a + 1) / (s + 1), 7599 h = 7600 2 === r 7601 ? Math.sqrt( 7602 Math.pow(e.points[3][0] - e.points[0][0], 2) + 7603 Math.pow(e.points[3][1] - e.points[0][1], 2) 7604 ) 7605 : 0, 7606 l = e.normalAngle(o); 7607 setPoint( 7608 t, 7609 e.point(o), 7610 l, 7611 n, 7612 i, 7613 h / (2 * (s + 1)), 7614 h / (2 * (s + 1)), 7615 r 7616 ), 7617 (n = -n); 7618 } 7619 return n; 7620 } 7621 function linearOffset(t, e, i) { 7622 var s = Math.atan2(e[0] - t[0], e[1] - t[1]); 7623 return [polarOffset(t, s, i), polarOffset(e, s, i)]; 7624 } 7625 function offsetSegment(t, e) { 7626 (i = (h = linearOffset(t.points[0], t.points[1], e))[0]), 7627 (s = h[1]), 7628 (r = (h = linearOffset(t.points[1], t.points[2], e))[0]), 7629 (n = h[1]), 7630 (a = (h = linearOffset(t.points[2], t.points[3], e))[0]), 7631 (o = h[1]); 7632 var i, 7633 s, 7634 r, 7635 n, 7636 a, 7637 o, 7638 h, 7639 l = lineIntersection(i, s, r, n); 7640 null === l && (l = s); 7641 var p = lineIntersection(a, o, r, n); 7642 return null === p && (p = a), new PolynomialBezier(i, l, p, o); 7643 } 7644 function joinLines(t, e, i, s, r) { 7645 var n = e.points[3], 7646 a = i.points[0]; 7647 if (3 === s || pointEqual(n, a)) return n; 7648 if (2 === s) { 7649 var o = -e.tangentAngle(1), 7650 h = -i.tangentAngle(0) + Math.PI, 7651 l = lineIntersection( 7652 n, 7653 polarOffset(n, o + Math.PI / 2, 100), 7654 a, 7655 polarOffset(a, o + Math.PI / 2, 100) 7656 ), 7657 p = l ? pointDistance(l, n) : pointDistance(n, a) / 2, 7658 f = polarOffset(n, o, 2 * p * roundCorner); 7659 return ( 7660 t.setXYAt(f[0], f[1], "o", t.length() - 1), 7661 (f = polarOffset(a, h, 2 * p * roundCorner)), 7662 t.setTripleAt(a[0], a[1], a[0], a[1], f[0], f[1], t.length()), 7663 a 7664 ); 7665 } 7666 var c = lineIntersection( 7667 pointEqual(n, e.points[2]) ? e.points[0] : e.points[2], 7668 n, 7669 a, 7670 pointEqual(a, i.points[1]) ? i.points[3] : i.points[1] 7671 ); 7672 return c && pointDistance(c, n) < r
7673 ? (t.setTripleAt(c[0], c[1], c[0], c[1], c[0], c[1], t.length()), 7674 c) 7675 : n; 7676 } 7677 function getIntersection(t, e) { 7678 var i = t.intersections(e); 7679 return ( 7680 i.length && floatEqual(i[0][0], 1) && i.shift(), 7681 i.length ? i[0] : null 7682 ); 7683 } 7684 function pruneSegmentIntersection(t, e) { 7685 var i = t.slice(), 7686 s = e.slice(), 7687 r = getIntersection(t[t.length - 1], e[0]); 7688 return ( 7689 r && 7690 ((i[t.length - 1] = t[t.length - 1].split(r[0])[0]), 7691 (s[0] = e[0].split(r[1])[1])), 7692 t.length > 1 && 7693 e.length > 1 && 7694 (r = getIntersection(t[0], e[e.length - 1])) 7695 ? [[t[0].split(r[0])[0]], [e[e.length - 1].split(r[1])[1]]] 7696 : [i, s] 7697 ); 7698 } 7699 function pruneIntersections(t) { 7700 for (var e, i = 1; i < t.length; i += 1) 7701 (e = pruneSegmentIntersection(t[i - 1], t[i])), 7702 (t[i - 1] = e[0]), 7703 (t[i] = e[1]); 7704 return ( 7705 t.length > 1 && 7706 ((e = pruneSegmentIntersection(t[t.length - 1], t[0])), 7707 (t[t.length - 1] = e[0]), 7708 (t[0] = e[1])), 7709 t 7710 ); 7711 } 7712 function offsetSegmentSplit(t, e) { 7713 var i, 7714 s, 7715 r, 7716 n, 7717 a = t.inflectionPoints(); 7718 if (0 === a.length) return [offsetSegment(t, e)]; 7719 if (1 === a.length || floatEqual(a[1], 1)) 7720 return ( 7721 (i = (r = t.split(a[0]))[0]), 7722 (s = r[1]), 7723 [offsetSegment(i, e), offsetSegment(s, e)] 7724 ); 7725 i = (r = t.split(a[0]))[0]; 7726 var o = (a[1] - a[0]) / (1 - a[0]); 7727 return ( 7728 (n = (r = r[1].split(o))[0]), 7729 (s = r[1]), 7730 [offsetSegment(i, e), offsetSegment(n, e), offsetSegment(s, e)] 7731 ); 7732 } 7733 function OffsetPathModifier() {} 7734 function getFontProperties(t) { 7735 for ( 7736 var e = t.fStyle ? t.fStyle.split(" ") : [], 7737 i = "normal", 7738 s = "normal", 7739 r = e.length, 7740 n = 0; 7741 n < r; 7742 n += 1 7743 ) 7744 switch (e[n].toLowerCase()) { 7745 case "italic": 7746 s = "italic"; 7747 break; 7748 case "bold": 7749 i = "700"; 7750 break; 7751 case "black": 7752 i = "900"; 7753 break; 7754 case "medium": 7755 i = "500"; 7756 break; 7757 case "regular": 7758 case "normal": 7759 i = "400"; 7760 break; 7761 case "light": 7762 case "thin": 7763 i = "200"; 7764 } 7765 return { style: s, weight: t.fWeight || i }; 7766 } 7767 extendPrototype([ShapeModifier], RepeaterModifier), 7768 (RepeaterModifier.prototype.initModifierProperties = function ( 7769 t, 7770 e 7771 ) { 7772 (this.getValue = this.processKeys), 7773 (this.c = PropertyFactory.getProp(t, e.c, 0, null, this)), 7774 (this.o = PropertyFactory.getProp(t, e.o, 0, null, this)), 7775 (this.tr = TransformPropertyFactory.getTransformProperty( 7776 t, 7777 e.tr, 7778 this 7779 )), 7780 (this.so = PropertyFactory.getProp(t, e.tr.so, 0, 0.01, this)), 7781 (this.eo = PropertyFactory.getProp(t, e.tr.eo, 0, 0.01, this)), 7782 (this.data = e), 7783 this.dynamicProperties.length || this.getValue(!0), 7784 (this._isAnimated = !!this.dynamicProperties.length), 7785 (this.pMatrix = new Matrix()), 7786 (this.rMatrix = new Matrix()), 7787 (this.sMatrix = new Matrix()), 7788 (this.tMatrix = new Matrix()), 7789 (this.matrix = new Matrix()); 7790 }), 7791 (RepeaterModifier.prototype.applyTransforms = function ( 7792 t, 7793 e, 7794 i, 7795 s, 7796 r, 7797 n 7798 ) { 7799 var a = n ? -1 : 1, 7800 o = s.s.v[0] + (1 - s.s.v[0]) * (1 - r), 7801 h = s.s.v[1] + (1 - s.s.v[1]) * (1 - r); 7802 t.translate(s.p.v[0] * a * r, s.p.v[1] * a * r, s.p.v[2]), 7803 e.translate(-s.a.v[0], -s.a.v[1], s.a.v[2]), 7804 e.rotate(-s.r.v * a * r), 7805 e.translate(s.a.v[0], s.a.v[1], s.a.v[2]), 7806 i.translate(-s.a.v[0], -s.a.v[1], s.a.v[2]), 7807 i.scale(n ? 1 / o : o, n ? 1 / h : h), 7808 i.translate(s.a.v[0], s.a.v[1], s.a.v[2]); 7809 }), 7810 (RepeaterModifier.prototype.init = function (t, e, i, s) { 7811 for ( 7812 this.elem = t, 7813 this.arr = e, 7814 this.pos = i, 7815 this.elemsData = s, 7816 this._currentCopies = 0, 7817 this._elements = [], 7818 this._groups = [], 7819 this.frameId = -1, 7820 this.initDynamicPropertyContainer(t), 7821 this.initModifierProperties(t, e[i]); 7822 i > 0; 7823 7824 ) 7825 (i -= 1), this._elements.unshift(e[i]); 7826 this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0); 7827 }), 7828 (RepeaterModifier.prototype.resetElements = function (t) { 7829 var e, 7830 i = t.length; 7831 for (e = 0; e < i; e += 1) 7832 (t[e]._processed = !1), 7833 "gr" === t[e].ty && this.resetElements(t[e].it); 7834 }), 7835 (RepeaterModifier.prototype.cloneElements = function (t) { 7836 var e = JSON.parse(JSON.stringify(t)); 7837 return this.resetElements(e), e; 7838 }), 7839 (RepeaterModifier.prototype.changeGroupRender = function (t, e) { 7840 var i, 7841 s = t.length; 7842 for (i = 0; i < s; i += 1) 7843 (t[i]._render = e), 7844 "gr" === t[i].ty && this.changeGroupRender(t[i].it, e); 7845 }), 7846 (RepeaterModifier.prototype.processShapes = function (t) { 7847 var e, 7848 i, 7849 s, 7850 r, 7851 n, 7852 a = !1; 7853 if (this._mdf || t) { 7854 var o, 7855 h = Math.ceil(this.c.v); 7856 if (this._groups.length < h) { 7857 for (; this._groups.length < h; ) { 7858 var l = { 7859 it: this.cloneElements(this._elements), 7860 ty: "gr", 7861 }; 7862 l.it.push({ 7863 a: { a: 0, ix: 1, k: [0, 0] }, 7864 nm: "Transform", 7865 o: { a: 0, ix: 7, k: 100 }, 7866 p: { a: 0, ix: 2, k: [0, 0] }, 7867 r: { 7868 a: 1, 7869 ix: 6, 7870 k: [ 7871 { s: 0, e: 0, t: 0 }, 7872 { s: 0, e: 0, t: 1 }, 7873 ], 7874 }, 7875 s: { a: 0, ix: 3, k: [100, 100] }, 7876 sa: { a: 0, ix: 5, k: 0 }, 7877 sk: { a: 0, ix: 4, k: 0 }, 7878 ty: "tr", 7879 }), 7880 this.arr.splice(0, 0, l), 7881 this._groups.splice(0, 0, l), 7882 (this._currentCopies += 1); 7883 } 7884 this.elem.reloadShapes(), (a = !0); 7885 } 7886 for (n = 0, s = 0; s <= this._groups.length - 1; s += 1) { 7887 if ( 7888 ((o = n < h), 7889 (this._groups[s]._render = o), 7890 this.changeGroupRender(this._groups[s].it, o), 7891 !o) 7892 ) { 7893 var p = this.elemsData[s].it, 7894 f = p[p.length - 1]; 7895 0 !== f.transform.op.v 7896 ? ((f.transform.op._mdf = !0), (f.transform.op.v = 0)) 7897 : (f.transform.op._mdf = !1); 7898 } 7899 n += 1; 7900 } 7901 this._currentCopies = h; 7902 var c = this.o.v, 7903 u = c % 1, 7904 m = c > 0 ? Math.floor(c) : Math.ceil(c), 7905 d = this.pMatrix.props, 7906 g = this.rMatrix.props, 7907 v = this.sMatrix.props; 7908 this.pMatrix.reset(), 7909 this.rMatrix.reset(), 7910 this.sMatrix.reset(), 7911 this.tMatrix.reset(), 7912 this.matrix.reset(); 7913 var y, 7914 b, 7915 x = 0; 7916 if (c > 0) { 7917 for (; x < m; ) 7918 this.applyTransforms( 7919 this.pMatrix, 7920 this.rMatrix, 7921 this.sMatrix, 7922 this.tr, 7923 1, 7924 !1 7925 ), 7926 (x += 1); 7927 u && 7928 (this.applyTransforms( 7929 this.pMatrix, 7930 this.rMatrix, 7931 this.sMatrix, 7932 this.tr, 7933 u, 7934 !1 7935 ), 7936 (x += u)); 7937 } else if (c < 0) { 7938 for (; x > m; ) 7939 this.applyTransforms( 7940 this.pMatrix, 7941 this.rMatrix, 7942 this.sMatrix, 7943 this.tr, 7944 1, 7945 !0 7946 ), 7947 (x -= 1); 7948 u && 7949 (this.applyTransforms( 7950 this.pMatrix, 7951 this.rMatrix, 7952 this.sMatrix, 7953 this.tr, 7954 -u, 7955 !0 7956 ), 7957 (x -= u)); 7958 } 7959 for ( 7960 s = 1 === this.data.m ? 0 : this._currentCopies - 1, 7961 r = 1 === this.data.m ? 1 : -1, 7962 n = this._currentCopies; 7963 n; 7964 7965 ) { 7966 if ( 7967 ((b = (i = (e = this.elemsData[s].it)[e.length - 1] 7968 .transform.mProps.v.props).length), 7969 (e[e.length - 1].transform.mProps._mdf = !0), 7970 (e[e.length - 1].transform.op._mdf = !0), 7971 (e[e.length - 1].transform.op.v = 7972 1 === this._currentCopies 7973 ? this.so.v 7974 : this.so.v + 7975 (this.eo.v - this.so.v) * 7976 (s / (this._currentCopies - 1))), 7977 0 !== x) 7978 ) { 7979 for ( 7980 ((0 !== s && 1 === r) || 7981 (s !== this._currentCopies - 1 && -1 === r)) && 7982 this.applyTransforms( 7983 this.pMatrix, 7984 this.rMatrix, 7985 this.sMatrix, 7986 this.tr, 7987 1, 7988 !1 7989 ), 7990 this.matrix.transform( 7991 g[0], 7992 g[1], 7993 g[2], 7994 g[3], 7995 g[4], 7996 g[5], 7997 g[6], 7998 g[7], 7999 g[8], 8000 g[9], 8001 g[10], 8002 g[11], 8003 g[12], 8004 g[13], 8005 g[14], 8006 g[15] 8007 ), 8008 this.matrix.transform( 8009 v[0], 8010 v[1], 8011 v[2], 8012 v[3], 8013 v[4], 8014 v[5], 8015 v[6], 8016 v[7], 8017 v[8], 8018 v[9], 8019 v[10], 8020 v[11], 8021 v[12], 8022 v[13], 8023 v[14], 8024 v[15] 8025 ), 8026 this.matrix.transform( 8027 d[0], 8028 d[1], 8029 d[2], 8030 d[3], 8031 d[4], 8032 d[5], 8033 d[6], 8034 d[7], 8035 d[8], 8036 d[9], 8037 d[10], 8038 d[11], 8039 d[12], 8040 d[13], 8041 d[14], 8042 d[15] 8043 ), 8044 y = 0; 8045 y < b; 8046 y += 1 8047 ) 8048 i[y] = this.matrix.props[y]; 8049 this.matrix.reset(); 8050 } else 8051 for (this.matrix.reset(), y = 0; y < b; y += 1) 8052 i[y] = this.matrix.props[y]; 8053 (x += 1), (n -= 1), (s += r); 8054 } 8055 } else 8056 for (n = this._currentCopies, s = 0, r = 1; n; ) 8057 (i = (e = this.elemsData[s].it)[e.length - 1].transform.mProps 8058 .v.props), 8059 (e[e.length - 1].transform.mProps._mdf = !1), 8060 (e[e.length - 1].transform.op._mdf = !1), 8061 (n -= 1), 8062 (s += r); 8063 return a; 8064 }), 8065 (RepeaterModifier.prototype.addShape = function () {}), 8066 extendPrototype([ShapeModifier], RoundCornersModifier), 8067 (RoundCornersModifier.prototype.initModifierProperties = function ( 8068 t, 8069 e 8070 ) { 8071 (this.getValue = this.processKeys),
8072 (this.rd = PropertyFactory.getProp(t, e.r, 0, null, this)), 8073 (this._isAnimated = !!this.rd.effectsSequence.length); 8074 }), 8075 (RoundCornersModifier.prototype.processPath = function (t, e) { 8076 var i, 8077 s = shapePool.newElement(); 8078 s.c = t.c; 8079 var r, 8080 n, 8081 a, 8082 o, 8083 h, 8084 l, 8085 p, 8086 f, 8087 c, 8088 u, 8089 m, 8090 d, 8091 g = t._length, 8092 v = 0; 8093 for (i = 0; i < g; i += 1) 8094 (r = t.v[i]), 8095 (a = t.o[i]), 8096 (n = t.i[i]), 8097 r[0] === a[0] && 8098 r[1] === a[1] && 8099 r[0] === n[0] && 8100 r[1] === n[1] 8101 ? (0 !== i && i !== g - 1) || t.c 8102 ? ((o = 0 === i ? t.v[g - 1] : t.v[i - 1]), 8103 (l = (h = Math.sqrt( 8104 Math.pow(r[0] - o[0], 2) + Math.pow(r[1] - o[1], 2) 8105 )) 8106 ? Math.min(h / 2, e) / h 8107 : 0), 8108 (p = m = r[0] + (o[0] - r[0]) * l), 8109 (f = d = r[1] - (r[1] - o[1]) * l), 8110 (c = p - (p - r[0]) * roundCorner), 8111 (u = f - (f - r[1]) * roundCorner), 8112 s.setTripleAt(p, f, c, u, m, d, v), 8113 (v += 1), 8114 (o = i === g - 1 ? t.v[0] : t.v[i + 1]), 8115 (l = (h = Math.sqrt( 8116 Math.pow(r[0] - o[0], 2) + Math.pow(r[1] - o[1], 2) 8117 )) 8118 ? Math.min(h / 2, e) / h 8119 : 0), 8120 (p = c = r[0] + (o[0] - r[0]) * l), 8121 (f = u = r[1] + (o[1] - r[1]) * l), 8122 (m = p - (p - r[0]) * roundCorner), 8123 (d = f - (f - r[1]) * roundCorner), 8124 s.setTripleAt(p, f, c, u, m, d, v)) 8125 : s.setTripleAt(r[0], r[1], a[0], a[1], n[0], n[1], v) 8126 : s.setTripleAt( 8127 t.v[i][0], 8128 t.v[i][1], 8129 t.o[i][0], 8130 t.o[i][1], 8131 t.i[i][0], 8132 t.i[i][1], 8133 v 8134 ), 8135 (v += 1); 8136 return s; 8137 }), 8138 (RoundCornersModifier.prototype.processShapes = function (t) { 8139 var e, 8140 i, 8141 s, 8142 r, 8143 n, 8144 a, 8145 o = this.shapes.length, 8146 h = this.rd.v; 8147 if (0 !== h) 8148 for (i = 0; i < o; i += 1) { 8149 if ( 8150 ((a = (n = this.shapes[i]).localShapeCollection), 8151 n.shape._mdf || this._mdf || t) 8152 ) 8153 for ( 8154 a.releaseShapes(), 8155 n.shape._mdf = !0, 8156 e = n.shape.paths.shapes, 8157 r = n.shape.paths._length, 8158 s = 0; 8159 s < r; 8160 s += 1 8161 ) 8162 a.addShape(this.processPath(e[s], h)); 8163 n.shape.paths = n.localShapeCollection; 8164 } 8165 this.dynamicProperties.length || (this._mdf = !1); 8166 }), 8167 (PolynomialBezier.prototype.point = function (t) { 8168 return [ 8169 ((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], 8170 ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1], 8171 ]; 8172 }), 8173 (PolynomialBezier.prototype.derivative = function (t) { 8174 return [ 8175 (3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], 8176 (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1], 8177 ]; 8178 }), 8179 (PolynomialBezier.prototype.tangentAngle = function (t) { 8180 var e = this.derivative(t); 8181 return Math.atan2(e[1], e[0]); 8182 }), 8183 (PolynomialBezier.prototype.normalAngle = function (t) { 8184 var e = this.derivative(t); 8185 return Math.atan2(e[0], e[1]); 8186 }), 8187 (PolynomialBezier.prototype.inflectionPoints = function () { 8188 var t = this.a[1] * this.b[0] - this.a[0] * this.b[1]; 8189 if (floatZero(t)) return []; 8190 var e = 8191 (-0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1])) / t, 8192 i = 8193 e * e - 8194 ((1 / 3) * (this.b[1] * this.c[0] - this.b[0] * this.c[1])) / 8195 t; 8196 if (i < 0) return []; 8197 var s = Math.sqrt(i); 8198 return floatZero(s) 8199 ? s > 0 && s < 1 8200 ? [e] 8201 : [] 8202 : [e - s, e + s].filter(function (t) { 8203 return t > 0 && t < 1; 8204 }); 8205 }), 8206 (PolynomialBezier.prototype.split = function (t) { 8207 if (t <= 0) return [singlePoint(this.points[0]), this]; 8208 if (t >= 1) 8209 return [this, singlePoint(this.points[this.points.length - 1])]; 8210 var e = lerpPoint(this.points[0], this.points[1], t), 8211 i = lerpPoint(this.points[1], this.points[2], t), 8212 s = lerpPoint(this.points[2], this.points[3], t), 8213 r = lerpPoint(e, i, t), 8214 n = lerpPoint(i, s, t), 8215 a = lerpPoint(r, n, t); 8216 return [ 8217 new PolynomialBezier(this.points[0], e, r, a, !0), 8218 new PolynomialBezier(a, n, s, this.points[3], !0), 8219 ]; 8220 }), 8221 (PolynomialBezier.prototype.bounds = function () { 8222 return { x: extrema(this, 0), y: extrema(this, 1) }; 8223 }), 8224 (PolynomialBezier.prototype.boundingBox = function () { 8225 var t = this.bounds(); 8226 return { 8227 left: t.x.min, 8228 right: t.x.max, 8229 top: t.y.min, 8230 bottom: t.y.max, 8231 width: t.x.max - t.x.min, 8232 height: t.y.max - t.y.min, 8233 cx: (t.x.max + t.x.min) / 2, 8234 cy: (t.y.max + t.y.min) / 2, 8235 }; 8236 }), 8237 (PolynomialBezier.prototype.intersections = function (t, e, i) { 8238 void 0 === e && (e = 2), void 0 === i && (i = 7); 8239 var s = []; 8240 return ( 8241 intersectsImpl( 8242 intersectData(this, 0, 1), 8243 intersectData(t, 0, 1), 8244 0, 8245 e, 8246 s, 8247 i 8248 ), 8249 s 8250 ); 8251 }), 8252 (PolynomialBezier.shapeSegment = function (t, e) { 8253 var i = (e + 1) % t.length(); 8254 return new PolynomialBezier(t.v[e], t.o[e], t.i[i], t.v[i], !0); 8255 }), 8256 (PolynomialBezier.shapeSegmentInverted = function (t, e) { 8257 var i = (e + 1) % t.length(); 8258 return new PolynomialBezier(t.v[i], t.i[i], t.o[e], t.v[e], !0); 8259 }), 8260 extendPrototype([ShapeModifier], ZigZagModifier), 8261 (ZigZagModifier.prototype.initModifierProperties = function (t, e) { 8262 (this.getValue = this.processKeys), 8263 (this.amplitude = PropertyFactory.getProp( 8264 t, 8265 e.s, 8266 0, 8267 null, 8268 this 8269 )), 8270 (this.frequency = PropertyFactory.getProp( 8271 t, 8272 e.r, 8273 0, 8274 null, 8275 this 8276 )), 8277 (this.pointsType = PropertyFactory.getProp( 8278 t, 8279 e.pt, 8280 0, 8281 null, 8282 this 8283 )), 8284 (this._isAnimated = 8285 0 !== this.amplitude.effectsSequence.length || 8286 0 !== this.frequency.effectsSequence.length || 8287 0 !== this.pointsType.effectsSequence.length); 8288 }), 8289 (ZigZagModifier.prototype.processPath = function (t, e, i, s) { 8290 var r = t._length, 8291 n = shapePool.newElement(); 8292 if (((n.c = t.c), t.c || (r -= 1), 0 === r)) return n; 8293 var a = -1, 8294 o = PolynomialBezier.shapeSegment(t, 0); 8295 zigZagCorner(n, t, 0, e, i, s, a); 8296 for (var h = 0; h < r; h += 1) 8297 (a = zigZagSegment(n, o, e, i, s, -a)), 8298 (o = 8299 h !== r - 1 || t.c 8300 ? PolynomialBezier.shapeSegment(t, (h + 1) % r) 8301 : null),
8302 zigZagCorner(n, t, h + 1, e, i, s, a); 8303 return n; 8304 }), 8305 (ZigZagModifier.prototype.processShapes = function (t) { 8306 var e, 8307 i, 8308 s, 8309 r, 8310 n, 8311 a, 8312 o = this.shapes.length, 8313 h = this.amplitude.v, 8314 l = Math.max(0, Math.round(this.frequency.v)), 8315 p = this.pointsType.v; 8316 if (0 !== h) 8317 for (i = 0; i < o; i += 1) { 8318 if ( 8319 ((a = (n = this.shapes[i]).localShapeCollection), 8320 n.shape._mdf || this._mdf || t) 8321 ) 8322 for ( 8323 a.releaseShapes(), 8324 n.shape._mdf = !0, 8325 e = n.shape.paths.shapes, 8326 r = n.shape.paths._length, 8327 s = 0; 8328 s < r; 8329 s += 1 8330 ) 8331 a.addShape(this.processPath(e[s], h, l, p)); 8332 n.shape.paths = n.localShapeCollection; 8333 } 8334 this.dynamicProperties.length || (this._mdf = !1); 8335 }), 8336 extendPrototype([ShapeModifier], OffsetPathModifier), 8337 (OffsetPathModifier.prototype.initModifierProperties = function ( 8338 t, 8339 e 8340 ) { 8341 (this.getValue = this.processKeys), 8342 (this.amount = PropertyFactory.getProp(t, e.a, 0, null, this)), 8343 (this.miterLimit = PropertyFactory.getProp( 8344 t, 8345 e.ml, 8346 0, 8347 null, 8348 this 8349 )), 8350 (this.lineJoin = e.lj), 8351 (this._isAnimated = 0 !== this.amount.effectsSequence.length); 8352 }), 8353 (OffsetPathModifier.prototype.processPath = function (t, e, i, s) { 8354 var r = shapePool.newElement(); 8355 r.c = t.c; 8356 var n, 8357 a, 8358 o, 8359 h = t.length(); 8360 t.c || (h -= 1); 8361 var l = []; 8362 for (n = 0; n < h; n += 1) 8363 (o = PolynomialBezier.shapeSegment(t, n)), 8364 l.push(offsetSegmentSplit(o, e)); 8365 if (!t.c) 8366 for (n = h - 1; n >= 0; n -= 1) 8367 (o = PolynomialBezier.shapeSegmentInverted(t, n)), 8368 l.push(offsetSegmentSplit(o, e)); 8369 l = pruneIntersections(l); 8370 var p = null, 8371 f = null; 8372 for (n = 0; n < l.length; n += 1) { 8373 var c = l[n]; 8374 for ( 8375 f && (p = joinLines(r, f, c[0], i, s)), 8376 f = c[c.length - 1], 8377 a = 0; 8378 a < c.length; 8379 a += 1 8380 ) 8381 (o = c[a]), 8382 p && pointEqual(o.points[0], p) 8383 ? r.setXYAt( 8384 o.points[1][0], 8385 o.points[1][1], 8386 "o", 8387 r.length() - 1 8388 ) 8389 : r.setTripleAt( 8390 o.points[0][0], 8391 o.points[0][1], 8392 o.points[1][0], 8393 o.points[1][1], 8394 o.points[0][0], 8395 o.points[0][1], 8396 r.length() 8397 ), 8398 r.setTripleAt( 8399 o.points[3][0], 8400 o.points[3][1], 8401 o.points[3][0], 8402 o.points[3][1], 8403 o.points[2][0], 8404 o.points[2][1], 8405 r.length() 8406 ), 8407 (p = o.points[3]); 8408 } 8409 return l.length && joinLines(r, f, l[0][0], i, s), r; 8410 }), 8411 (OffsetPathModifier.prototype.processShapes = function (t) { 8412 var e, 8413 i, 8414 s, 8415 r, 8416 n, 8417 a, 8418 o = this.shapes.length, 8419 h = this.amount.v, 8420 l = this.miterLimit.v, 8421 p = this.lineJoin; 8422 if (0 !== h) 8423 for (i = 0; i < o; i += 1) { 8424 if ( 8425 ((a = (n = this.shapes[i]).localShapeCollection), 8426 n.shape._mdf || this._mdf || t) 8427 ) 8428 for ( 8429 a.releaseShapes(), 8430 n.shape._mdf = !0, 8431 e = n.shape.paths.shapes, 8432 r = n.shape.paths._length, 8433 s = 0; 8434 s < r; 8435 s += 1 8436 ) 8437 a.addShape(this.processPath(e[s], h, p, l)); 8438 n.shape.paths = n.localShapeCollection; 8439 } 8440 this.dynamicProperties.length || (this._mdf = !1); 8441 }); 8442 var FontManager = (function () { 8443 var t = { w: 0, size: 0, shapes: [], data: { shapes: [] } }, 8444 e = []; 8445 e = e.concat([ 8446 2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 8447 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 8448 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403, 8449 ]); 8450 var i = 127988,
8451 s = ["d83cdffb", "d83cdffc", "d83cdffd", "d83cdffe", "d83cdfff"]; 8452 function r(t, e) { 8453 var i = createTag("span"); 8454 i.setAttribute("aria-hidden", !0), (i.style.fontFamily = e); 8455 var s = createTag("span"); 8456 (s.innerText = "giItT1WQy@!-/#"), 8457 (i.style.position = "absolute"), 8458 (i.style.left = "-10000px"), 8459 (i.style.top = "-10000px"), 8460 (i.style.fontSize = "300px"), 8461 (i.style.fontVariant = "normal"), 8462 (i.style.fontStyle = "normal"), 8463 (i.style.fontWeight = "normal"), 8464 (i.style.letterSpacing = "0"), 8465 i.appendChild(s), 8466 document.body.appendChild(i); 8467 var r = s.offsetWidth; 8468 return ( 8469 (s.style.fontFamily = 8470 (function (t) { 8471 var e, 8472 i = t.split(","), 8473 s = i.length, 8474 r = []; 8475 for (e = 0; e < s; e += 1) 8476 "sans-serif" !== i[e] && 8477 "monospace" !== i[e] && 8478 r.push(i[e]); 8479 return r.join(","); 8480 })(t) + 8481 ", " + 8482 e), 8483 { node: s, w: r, parent: i } 8484 ); 8485 } 8486 function n(t, e) { 8487 var i, 8488 s = document.body && e ? "svg" : "canvas", 8489 r = getFontProperties(t); 8490 if ("svg" === s) { 8491 var n = createNS("text"); 8492 (n.style.fontSize = "100px"), 8493 n.setAttribute("font-family", t.fFamily), 8494 n.setAttribute("font-style", r.style), 8495 n.setAttribute("font-weight", r.weight),
8496 (n.textContent = "1"), 8497 t.fClass 8498 ? ((n.style.fontFamily = "inherit"), 8499 n.setAttribute("class", t.fClass)) 8500 : (n.style.fontFamily = t.fFamily), 8501 e.appendChild(n), 8502 (i = n); 8503 } else { 8504 var a = new OffscreenCanvas(500, 500).getContext("2d"); 8505 (a.font = r.style + " " + r.weight + " 100px " + t.fFamily), 8506 (i = a); 8507 } 8508 return { 8509 measureText: function (t) { 8510 return "svg" === s 8511 ? ((i.textContent = t), i.getComputedTextLength()) 8512 : i.measureText(t).width; 8513 }, 8514 }; 8515 } 8516 function a(t) { 8517 var e = 0, 8518 i = t.charCodeAt(0); 8519 if (i >= 55296 && i <= 56319) { 8520 var s = t.charCodeAt(1); 8521 s >= 56320 && 8522 s <= 57343 && 8523 (e = 1024 * (i - 55296) + s - 56320 + 65536); 8524 } 8525 return e; 8526 } 8527 function o(t) { 8528 var e = a(t); 8529 return e >= 127462 && e <= 127487; 8530 } 8531 var h = function () { 8532 (this.fonts = []), 8533 (this.chars = null), 8534 (this.typekitLoaded = 0), 8535 (this.isLoaded = !1), 8536 (this._warned = !1), 8537 (this.initTime = Date.now()), 8538 (this.setIsLoadedBinded = this.setIsLoaded.bind(this)), 8539 (this.checkLoadedFontsBinded = 8540 this.checkLoadedFonts.bind(this)); 8541 }; 8542 return ( 8543 (h.isModifier = function (t, e) { 8544 var i = t.toString(16) + e.toString(16); 8545 return -1 !== s.indexOf(i); 8546 }), 8547 (h.isZeroWidthJoiner = function (t) { 8548 return 8205 === t; 8549 }), 8550 (h.isFlagEmoji = function (t) { 8551 return o(t.substr(0, 2)) && o(t.substr(2, 2)); 8552 }), 8553 (h.isRegionalCode = o), 8554 (h.isCombinedCharacter = function (t) { 8555 return -1 !== e.indexOf(t); 8556 }), 8557 (h.isRegionalFlag = function (t, e) { 8558 var s = a(t.substr(e, 2)); 8559 if (s !== i) return !1; 8560 var r = 0; 8561 for (e += 2; r < 5; ) { 8562 if ((s = a(t.substr(e, 2))) < 917601 || s > 917626) return !1; 8563 (r += 1), (e += 2); 8564 } 8565 return 917631 === a(t.substr(e, 2)); 8566 }), 8567 (h.isVariationSelector = function (t) { 8568 return 65039 === t; 8569 }), 8570 (h.BLACK_FLAG_CODE_POINT = i), 8571 (h.prototype = { 8572 addChars: function (t) { 8573 if (t) { 8574 this.chars || (this.chars = []); 8575 var e, 8576 i, 8577 s, 8578 r = t.length, 8579 n = this.chars.length; 8580 for (e = 0; e < r; e += 1) { 8581 for (i = 0, s = !1; i < n; ) 8582 this.chars[i].style === t[e].style && 8583 this.chars[i].fFamily === t[e].fFamily && 8584 this.chars[i].ch === t[e].ch && 8585 (s = !0), 8586 (i += 1); 8587 s || (this.chars.push(t[e]), (n += 1)); 8588 } 8589 } 8590 }, 8591 addFonts: function (t, e) { 8592 if (t) { 8593 if (this.chars) 8594 return (this.isLoaded = !0), void (this.fonts = t.list); 8595 if (!document.body) 8596 return ( 8597 (this.isLoaded = !0), 8598 t.list.forEach(function (t) { 8599 (t.helper = n(t)), (t.cache = {}); 8600 }), 8601 void (this.fonts = t.list) 8602 ); 8603 var i, 8604 s = t.list, 8605 a = s.length, 8606 o = a; 8607 for (i = 0; i < a; i += 1) { 8608 var h, 8609 l, 8610 p = !0; 8611 if ( 8612 ((s[i].loaded = !1), 8613 (s[i].monoCase = r(s[i].fFamily, "monospace")), 8614 (s[i].sansCase = r(s[i].fFamily, "sans-serif")), 8615 s[i].fPath) 8616 ) { 8617 if ("p" === s[i].fOrigin || 3 === s[i].origin) { 8618 if ( 8619 ((h = document.querySelectorAll( 8620 'style[f-forigin="p"][f-family="' + 8621 s[i].fFamily + 8622 '"], style[f-origin="3"][f-family="' + 8623 s[i].fFamily + 8624 '"]' 8625 )).length > 0 && (p = !1), 8626 p) 8627 ) { 8628 var f = createTag("style"); 8629 f.setAttribute("f-forigin", s[i].fOrigin), 8630 f.setAttribute("f-origin", s[i].origin), 8631 f.setAttribute("f-family", s[i].fFamily), 8632 (f.type = "text/css"), 8633 (f.innerText = 8634 "@font-face {font-family: " + 8635 s[i].fFamily + 8636 "; font-style: normal; src: url('" + 8637 s[i].fPath + 8638 "');}"), 8639 e.appendChild(f); 8640 } 8641 } else if ("g" === s[i].fOrigin || 1 === s[i].origin) { 8642 for ( 8643 h = document.querySelectorAll( 8644 'link[f-forigin="g"], link[f-origin="1"]' 8645 ), 8646 l = 0; 8647 l < h.length; 8648 l += 1 8649 ) 8650 -1 !== h[l].href.indexOf(s[i].fPath) && (p = !1); 8651 if (p) { 8652 var c = createTag("link"); 8653 c.setAttribute("f-forigin", s[i].fOrigin), 8654 c.setAttribute("f-origin", s[i].origin), 8655 (c.type = "text/css"), 8656 (c.rel = "stylesheet"), 8657 (c.href = s[i].fPath), 8658 document.body.appendChild(c); 8659 } 8660 } else if ("t" === s[i].fOrigin || 2 === s[i].origin) { 8661 for ( 8662 h = document.querySelectorAll( 8663 'script[f-forigin="t"], script[f-origin="2"]' 8664 ), 8665 l = 0; 8666 l < h.length; 8667 l += 1 8668 ) 8669 s[i].fPath === h[l].src && (p = !1); 8670 if (p) { 8671 var u = createTag("link"); 8672 u.setAttribute("f-forigin", s[i].fOrigin), 8673 u.setAttribute("f-origin", s[i].origin), 8674 u.setAttribute("rel", "stylesheet"), 8675 u.setAttribute("href", s[i].fPath), 8676 e.appendChild(u); 8677 } 8678 } 8679 } else (s[i].loaded = !0), (o -= 1); 8680 (s[i].helper = n(s[i], e)), 8681 (s[i].cache = {}), 8682 this.fonts.push(s[i]); 8683 } 8684 0 === o 8685 ? (this.isLoaded = !0) 8686 : setTimeout(this.checkLoadedFonts.bind(this), 100); 8687 } else this.isLoaded = !0; 8688 }, 8689 getCharData: function (e, i, s) { 8690 for (var r = 0, n = this.chars.length; r < n; ) { 8691 if ( 8692 this.chars[r].ch === e && 8693 this.chars[r].style === i && 8694 this.chars[r].fFamily === s 8695 ) 8696 return this.chars[r]; 8697 r += 1; 8698 } 8699 return (
8700 (("string" == typeof e && 13 !== e.charCodeAt(0)) || !e) && 8701 console && 8702 console.warn && 8703 !this._warned && 8704 ((this._warned = !0), 8705 console.warn( 8706 "Missing character from exported characters list: ", 8707 e, 8708 i, 8709 s 8710 )), 8711 t 8712 ); 8713 }, 8714 getFontByName: function (t) { 8715 for (var e = 0, i = this.fonts.length; e < i; ) { 8716 if (this.fonts[e].fName === t) return this.fonts[e]; 8717 e += 1; 8718 } 8719 return this.fonts[0]; 8720 }, 8721 measureText: function (t, e, i) { 8722 var s = this.getFontByName(e), 8723 r = t; 8724 if (!s.cache[r]) { 8725 var n = s.helper; 8726 if (" " === t) { 8727 var a = n.measureText("|" + t + "|"), 8728 o = n.measureText("||"); 8729 s.cache[r] = (a - o) / 100; 8730 } else s.cache[r] = n.measureText(t) / 100; 8731 } 8732 return s.cache[r] * i; 8733 }, 8734 checkLoadedFonts: function () { 8735 var t, 8736 e, 8737 i, 8738 s = this.fonts.length, 8739 r = s; 8740 for (t = 0; t < s; t += 1) 8741 this.fonts[t].loaded 8742 ? (r -= 1) 8743 : "n" === this.fonts[t].fOrigin || 8744 0 === this.fonts[t].origin 8745 ? (this.fonts[t].loaded = !0) 8746 : ((e = this.fonts[t].monoCase.node), 8747 (i = this.fonts[t].monoCase.w), 8748 e.offsetWidth !== i 8749 ? ((r -= 1), (this.fonts[t].loaded = !0)) 8750 : ((e = this.fonts[t].sansCase.node), 8751 (i = this.fonts[t].sansCase.w), 8752 e.offsetWidth !== i && 8753 ((r -= 1), (this.fonts[t].loaded = !0))), 8754 this.fonts[t].loaded && 8755 (this.fonts[t].sansCase.parent.parentNode.removeChild( 8756 this.fonts[t].sansCase.parent 8757 ), 8758 this.fonts[t].monoCase.parent.parentNode.removeChild( 8759 this.fonts[t].monoCase.parent 8760 ))); 8761 0 !== r && Date.now() - this.initTime < 5e3 8762 ? setTimeout(this.checkLoadedFontsBinded, 20) 8763 : setTimeout(this.setIsLoadedBinded, 10); 8764 }, 8765 setIsLoaded: function () { 8766 this.isLoaded = !0; 8767 }, 8768 }), 8769 h 8770 ); 8771 })(); 8772 function SlotManager(t) { 8773 this.animationData = t; 8774 } 8775 function slotFactory(t) { 8776 return new SlotManager(t); 8777 }
8778 function RenderableElement() {} 8779 (SlotManager.prototype.getProp = function (t) { 8780 return this.animationData.slots && this.animationData.slots[t.sid] 8781 ? Object.assign(t, this.animationData.slots[t.sid].p) 8782 : t; 8783 }), 8784 (RenderableElement.prototype = { 8785 initRenderable: function () { 8786 (this.isInRange = !1), 8787 (this.hidden = !1), 8788 (this.isTransparent = !1), 8789 (this.renderableComponents = []); 8790 }, 8791 addRenderableComponent: function (t) { 8792 -1 === this.renderableComponents.indexOf(t) && 8793 this.renderableComponents.push(t); 8794 }, 8795 removeRenderableComponent: function (t) { 8796 -1 !== this.renderableComponents.indexOf(t) && 8797 this.renderableComponents.splice( 8798 this.renderableComponents.indexOf(t), 8799 1 8800 ); 8801 }, 8802 prepareRenderableFrame: function (t) { 8803 this.checkLayerLimits(t); 8804 }, 8805 checkTransparency: function () { 8806 this.finalTransform.mProp.o.v <= 0 8807 ? !this.isTransparent && 8808 this.globalData.renderConfig.hideOnTransparent && 8809 ((this.isTransparent = !0), this.hide()) 8810 : this.isTransparent && 8811 ((this.isTransparent = !1), this.show()); 8812 }, 8813 checkLayerLimits: function (t) { 8814 this.data.ip - this.data.st <= t && 8815 this.data.op - this.data.st > t 8816 ? !0 !== this.isInRange && 8817 ((this.globalData._mdf = !0), 8818 (this._mdf = !0), 8819 (this.isInRange = !0), 8820 this.show()) 8821 : !1 !== this.isInRange && 8822 ((this.globalData._mdf = !0), 8823 (this.isInRange = !1), 8824 this.hide()); 8825 }, 8826 renderRenderable: function () { 8827 var t, 8828 e = this.renderableComponents.length; 8829 for (t = 0; t < e; t += 1) 8830 this.renderableComponents[t].renderFrame(this._isFirstFrame); 8831 }, 8832 sourceRectAtTime: function () { 8833 return { top: 0, left: 0, width: 100, height: 100 }; 8834 }, 8835 getLayerSize: function () { 8836 return 5 === this.data.ty 8837 ? { 8838 w: this.data.textData.width, 8839 h: this.data.textData.height, 8840 } 8841 : { w: this.data.width, h: this.data.height }; 8842 }, 8843 }); 8844 var blendModeEnums, 8845 getBlendMode = 8846 ((blendModeEnums = { 8847 0: "source-over", 8848 1: "multiply", 8849 2: "screen", 8850 3: "overlay", 8851 4: "darken", 8852 5: "lighten", 8853 6: "color-dodge", 8854 7: "color-burn", 8855 8: "hard-light", 8856 9: "soft-light", 8857 10: "difference", 8858 11: "exclusion", 8859 12: "hue", 8860 13: "saturation", 8861 14: "color", 8862 15: "luminosity", 8863 }), 8864 function (t) { 8865 return blendModeEnums[t] || ""; 8866 }); 8867 function SliderEffect(t, e, i) { 8868 this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); 8869 } 8870 function AngleEffect(t, e, i) { 8871 this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); 8872 } 8873 function ColorEffect(t, e, i) { 8874 this.p = PropertyFactory.getProp(e, t.v, 1, 0, i); 8875 } 8876 function PointEffect(t, e, i) { 8877 this.p = PropertyFactory.getProp(e, t.v, 1, 0, i); 8878 } 8879 function LayerIndexEffect(t, e, i) { 8880 this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); 8881 } 8882 function MaskIndexEffect(t, e, i) { 8883 this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); 8884 } 8885 function CheckboxEffect(t, e, i) { 8886 this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); 8887 } 8888 function NoValueEffect() { 8889 this.p = {}; 8890 } 8891 function EffectsManager(t, e) { 8892 var i, 8893 s = t.ef || []; 8894 this.effectElements = []; 8895 var r, 8896 n = s.length; 8897 for (i = 0; i < n; i += 1) 8898 (r = new GroupEffect(s[i], e)), this.effectElements.push(r); 8899 } 8900 function GroupEffect(t, e) { 8901 this.init(t, e); 8902 } 8903 function BaseElement() {} 8904 function FrameElement() {} 8905 function FootageElement(t, e, i) { 8906 this.initFrame(), 8907 this.initRenderable(), 8908 (this.assetData = e.getAssetData(t.refId)), 8909 (this.footageData = e.imageLoader.getAsset(this.assetData)), 8910 this.initBaseData(t, e, i); 8911 } 8912 function AudioElement(t, e, i) { 8913 this.initFrame(), 8914 this.initRenderable(), 8915 (this.assetData = e.getAssetData(t.refId)), 8916 this.initBaseData(t, e, i), 8917 (this._isPlaying = !1), 8918 (this._canPlay = !1); 8919 var s = this.globalData.getAssetsPath(this.assetData); 8920 (this.audio = this.globalData.audioController.createAudio(s)), 8921 (this._currentTime = 0), 8922 this.globalData.audioController.addAudio(this), 8923 (this._volumeMultiplier = 1), 8924 (this._volume = 1), 8925 (this._previousVolume = null),
8926 (this.tm = t.tm 8927 ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) 8928 : { _placeholder: !0 }), 8929 (this.lv = PropertyFactory.getProp( 8930 this, 8931 t.au && t.au.lv ? t.au.lv : { k: [100] }, 8932 1, 8933 0.01, 8934 this 8935 )); 8936 } 8937 function BaseRenderer() {} 8938 extendPrototype([DynamicPropertyContainer], GroupEffect), 8939 (GroupEffect.prototype.getValue = 8940 GroupEffect.prototype.iterateDynamicProperties), 8941 (GroupEffect.prototype.init = function (t, e) { 8942 (this.data = t), 8943 (this.effectElements = []), 8944 this.initDynamicPropertyContainer(e); 8945 var i, 8946 s, 8947 r = this.data.ef.length, 8948 n = this.data.ef; 8949 for (i = 0; i < r; i += 1) { 8950 switch (((s = null), n[i].ty)) { 8951 case 0: 8952 s = new SliderEffect(n[i], e, this); 8953 break; 8954 case 1: 8955 s = new AngleEffect(n[i], e, this); 8956 break; 8957 case 2: 8958 s = new ColorEffect(n[i], e, this); 8959 break; 8960 case 3: 8961 s = new PointEffect(n[i], e, this); 8962 break; 8963 case 4: 8964 case 7: 8965 s = new CheckboxEffect(n[i], e, this); 8966 break; 8967 case 10: 8968 s = new LayerIndexEffect(n[i], e, this); 8969 break; 8970 case 11: 8971 s = new MaskIndexEffect(n[i], e, this); 8972 break; 8973 case 5: 8974 s = new EffectsManager(n[i], e, this); 8975 break; 8976 default: 8977 s = new NoValueEffect(n[i], e, this); 8978 } 8979 s && this.effectElements.push(s); 8980 } 8981 }), 8982 (BaseElement.prototype = { 8983 checkMasks: function () { 8984 if (!this.data.hasMask) return !1; 8985 for (var t = 0, e = this.data.masksProperties.length; t < e; ) { 8986 if ( 8987 "n" !== this.data.masksProperties[t].mode && 8988 !1 !== this.data.masksProperties[t].cl 8989 ) 8990 return !0; 8991 t += 1; 8992 } 8993 return !1; 8994 }, 8995 initExpressions: function () { 8996 var t = getExpressionInterfaces(); 8997 if (t) { 8998 var e = t("layer"), 8999 i = t("effects"), 9000 s = t("shape"), 9001 r = t("text"), 9002 n = t("comp"); 9003 (this.layerInterface = e(this)), 9004 this.data.hasMask && 9005 this.maskManager && 9006 this.layerInterface.registerMaskInterface( 9007 this.maskManager 9008 ); 9009 var a = i.createEffectsInterface(this, this.layerInterface); 9010 this.layerInterface.registerEffectsInterface(a), 9011 0 === this.data.ty || this.data.xt 9012 ? (this.compInterface = n(this)) 9013 : 4 === this.data.ty 9014 ? ((this.layerInterface.shapeInterface = s( 9015 this.shapesData, 9016 this.itemsData, 9017 this.layerInterface 9018 )), 9019 (this.layerInterface.content = 9020 this.layerInterface.shapeInterface)) 9021 : 5 === this.data.ty && 9022 ((this.layerInterface.textInterface = r(this)), 9023 (this.layerInterface.text = 9024 this.layerInterface.textInterface)); 9025 } 9026 }, 9027 setBlendMode: function () {
9028 var t = getBlendMode(this.data.bm); 9029 (this.baseElement || this.layerElement).style[ 9030 "mix-blend-mode" 9031 ] = t; 9032 }, 9033 initBaseData: function (t, e, i) { 9034 (this.globalData = e), 9035 (this.comp = i), 9036 (this.data = t), 9037 (this.layerId = createElementID()), 9038 this.data.sr || (this.data.sr = 1), 9039 (this.effectsManager = new EffectsManager( 9040 this.data, 9041 this, 9042 this.dynamicProperties 9043 )); 9044 }, 9045 getType: function () { 9046 return this.type; 9047 }, 9048 sourceRectAtTime: function () {}, 9049 }), 9050 (FrameElement.prototype = { 9051 initFrame: function () { 9052 (this._isFirstFrame = !1), 9053 (this.dynamicProperties = []), 9054 (this._mdf = !1); 9055 }, 9056 prepareProperties: function (t, e) { 9057 var i, 9058 s = this.dynamicProperties.length; 9059 for (i = 0; i < s; i += 1) 9060 (e || 9061 (this._isParent && 9062 "transform" === this.dynamicProperties[i].propType)) && 9063 (this.dynamicProperties[i].getValue(), 9064 this.dynamicProperties[i]._mdf && 9065 ((this.globalData._mdf = !0), (this._mdf = !0))); 9066 }, 9067 addDynamicProperty: function (t) { 9068 -1 === this.dynamicProperties.indexOf(t) && 9069 this.dynamicProperties.push(t); 9070 }, 9071 }), 9072 (FootageElement.prototype.prepareFrame = function () {}), 9073 extendPrototype( 9074 [RenderableElement, BaseElement, FrameElement], 9075 FootageElement 9076 ), 9077 (FootageElement.prototype.getBaseElement = function () { 9078 return null; 9079 }), 9080 (FootageElement.prototype.renderFrame = function () {}), 9081 (FootageElement.prototype.destroy = function () {}), 9082 (FootageElement.prototype.initExpressions = function () { 9083 var t = getExpressionInterfaces(); 9084 if (t) { 9085 var e = t("footage"); 9086 this.layerInterface = e(this); 9087 } 9088 }), 9089 (FootageElement.prototype.getFootageData = function () { 9090 return this.footageData; 9091 }), 9092 (AudioElement.prototype.prepareFrame = function (t) { 9093 if ( 9094 (this.prepareRenderableFrame(t, !0), 9095 this.prepareProperties(t, !0), 9096 this.tm._placeholder) 9097 ) 9098 this._currentTime = t / this.data.sr; 9099 else { 9100 var e = this.tm.v; 9101 this._currentTime = e; 9102 } 9103 this._volume = this.lv.v[0]; 9104 var i = this._volume * this._volumeMultiplier; 9105 this._previousVolume !== i && 9106 ((this._previousVolume = i), this.audio.volume(i)); 9107 }), 9108 extendPrototype( 9109 [RenderableElement, BaseElement, FrameElement], 9110 AudioElement 9111 ), 9112 (AudioElement.prototype.renderFrame = function () { 9113 this.isInRange && 9114 this._canPlay && 9115 (this._isPlaying 9116 ? (!this.audio.playing() || 9117 Math.abs( 9118 this._currentTime / this.globalData.frameRate - 9119 this.audio.seek() 9120 ) > 0.1) && 9121 this.audio.seek( 9122 this._currentTime / this.globalData.frameRate 9123 ) 9124 : (this.audio.play(), 9125 this.audio.seek( 9126 this._currentTime / this.globalData.frameRate 9127 ), 9128 (this._isPlaying = !0))); 9129 }), 9130 (AudioElement.prototype.show = function () {}), 9131 (AudioElement.prototype.hide = function () { 9132 this.audio.pause(), (this._isPlaying = !1); 9133 }), 9134 (AudioElement.prototype.pause = function () { 9135 this.audio.pause(), (this._isPlaying = !1), (this._canPlay = !1); 9136 }), 9137 (AudioElement.prototype.resume = function () { 9138 this._canPlay = !0; 9139 }), 9140 (AudioElement.prototype.setRate = function (t) { 9141 this.audio.rate(t); 9142 }), 9143 (AudioElement.prototype.volume = function (t) { 9144 (this._volumeMultiplier = t), 9145 (this._previousVolume = t * this._volume), 9146 this.audio.volume(this._previousVolume); 9147 }), 9148 (AudioElement.prototype.getBaseElement = function () { 9149 return null; 9150 }), 9151 (AudioElement.prototype.destroy = function () {}), 9152 (AudioElement.prototype.sourceRectAtTime = function () {}), 9153 (AudioElement.prototype.initExpressions = function () {}), 9154 (BaseRenderer.prototype.checkLayers = function (t) { 9155 var e, 9156 i, 9157 s = this.layers.length; 9158 for (this.completeLayers = !0, e = s - 1; e >= 0; e -= 1) 9159 this.elements[e] || 9160 ((i = this.layers[e]).ip - i.st <= t - this.layers[e].st && 9161 i.op - i.st > t - this.layers[e].st && 9162 this.buildItem(e)), 9163 (this.completeLayers = 9164 !!this.elements[e] && this.completeLayers); 9165 this.checkPendingElements(); 9166 }), 9167 (BaseRenderer.prototype.createItem = function (t) { 9168 switch (t.ty) { 9169 case 2: 9170 return this.createImage(t); 9171 case 0: 9172 return this.createComp(t); 9173 case 1: 9174 return this.createSolid(t); 9175 case 3: 9176 default: 9177 return this.createNull(t); 9178 case 4: 9179 return this.createShape(t); 9180 case 5: 9181 return this.createText(t); 9182 case 6: 9183 return this.createAudio(t); 9184 case 13: 9185 return this.createCamera(t); 9186 case 15: 9187 return this.createFootage(t); 9188 } 9189 }), 9190 (BaseRenderer.prototype.createCamera = function () { 9191 throw Error("You're using a 3d camera. Try the html renderer."); 9192 }), 9193 (BaseRenderer.prototype.createAudio = function (t) { 9194 return new AudioElement(t, this.globalData, this); 9195 }), 9196 (BaseRenderer.prototype.createFootage = function (t) { 9197 return new FootageElement(t, this.globalData, this); 9198 }), 9199 (BaseRenderer.prototype.buildAllItems = function () { 9200 var t, 9201 e = this.layers.length; 9202 for (t = 0; t < e; t += 1) this.buildItem(t); 9203 this.checkPendingElements(); 9204 }), 9205 (BaseRenderer.prototype.includeLayers = function (t) { 9206 this.completeLayers = !1; 9207 var e, 9208 i, 9209 s = t.length, 9210 r = this.layers.length; 9211 for (e = 0; e < s; e += 1) 9212 for (i = 0; i < r; ) { 9213 if (this.layers[i].id === t[e].id) { 9214 this.layers[i] = t[e]; 9215 break; 9216 } 9217 i += 1; 9218 } 9219 }), 9220 (BaseRenderer.prototype.setProjectInterface = function (t) { 9221 this.globalData.projectInterface = t; 9222 }), 9223 (BaseRenderer.prototype.initItems = function () { 9224 this.globalData.progressiveLoad || this.buildAllItems(); 9225 }), 9226 (BaseRenderer.prototype.buildElementParenting = function (t, e, i) { 9227 for ( 9228 var s = this.elements, r = this.layers, n = 0, a = r.length; 9229 n < a; 9230 9231 ) 9232 r[n].ind == e && 9233 (s[n] && !0 !== s[n] 9234 ? (i.push(s[n]), 9235 s[n].setAsParent(), 9236 void 0 !== r[n].parent 9237 ? this.buildElementParenting(t, r[n].parent, i) 9238 : t.setHierarchy(i)) 9239 : (this.buildItem(n), this.addPendingElement(t))), 9240 (n += 1); 9241 }), 9242 (BaseRenderer.prototype.addPendingElement = function (t) { 9243 this.pendingElements.push(t); 9244 }), 9245 (BaseRenderer.prototype.searchExtraCompositions = function (t) { 9246 var e, 9247 i = t.length; 9248 for (e = 0; e < i; e += 1) 9249 if (t[e].xt) { 9250 var s = this.createComp(t[e]); 9251 s.initExpressions(), 9252 this.globalData.projectInterface.registerComposition(s); 9253 } 9254 }), 9255 (BaseRenderer.prototype.getElementById = function (t) { 9256 var e, 9257 i = this.elements.length; 9258 for (e = 0; e < i; e += 1) 9259 if (this.elements[e].data.ind === t) return this.elements[e]; 9260 return null; 9261 }), 9262 (BaseRenderer.prototype.getElementByPath = function (t) { 9263 var e, 9264 i = t.shift(); 9265 if ("number" == typeof i) e = this.elements[i]; 9266 else { 9267 var s, 9268 r = this.elements.length; 9269 for (s = 0; s < r; s += 1) 9270 if (this.elements[s].data.nm === i) { 9271 e = this.elements[s]; 9272 break; 9273 } 9274 } 9275 return 0 === t.length ? e : e.getElementByPath(t); 9276 }), 9277 (BaseRenderer.prototype.setupGlobalData = function (t, e) { 9278 (this.globalData.fontManager = new FontManager()), 9279 (this.globalData.slotManager = slotFactory(t)), 9280 this.globalData.fontManager.addChars(t.chars), 9281 this.globalData.fontManager.addFonts(t.fonts, e), 9282 (this.globalData.getAssetData = 9283 this.animationItem.getAssetData.bind(this.animationItem)), 9284 (this.globalData.getAssetsPath = 9285 this.animationItem.getAssetsPath.bind(this.animationItem)), 9286 (this.globalData.imageLoader = 9287 this.animationItem.imagePreloader), 9288 (this.globalData.audioController = 9289 this.animationItem.audioController), 9290 (this.globalData.frameId = 0), 9291 (this.globalData.frameRate = t.fr), 9292 (this.globalData.nm = t.nm), 9293 (this.globalData.compSize = { w: t.w, h: t.h }); 9294 }); 9295 var effectTypes = { TRANSFORM_EFFECT: "transformEFfect" }; 9296 function TransformElement() {} 9297 function MaskElement(t, e, i) { 9298 (this.data = t), 9299 (this.element = e), 9300 (this.globalData = i), 9301 (this.storedData = []), 9302 (this.masksProperties = this.data.masksProperties || []), 9303 (this.maskElement = null); 9304 var s, 9305 r, 9306 n, 9307 a = this.globalData.defs, 9308 o = this.masksProperties ? this.masksProperties.length : 0; 9309 (this.viewData = createSizedArray(o)), (this.solidPath = ""); 9310 var h, 9311 l, 9312 p, 9313 f, 9314 c, 9315 u, 9316 m = this.masksProperties, 9317 d = 0, 9318 g = [], 9319 v = createElementID(), 9320 y = "clipPath", 9321 b = "clip-path"; 9322 for (r = 0; r < o; r += 1) 9323 if ( 9324 ((("a" !== m[r].mode && "n" !== m[r].mode) || 9325 m[r].inv || 9326 100 !== m[r].o.k || 9327 m[r].o.x) && 9328 ((y = "mask"), (b = "mask")), 9329 ("s" !== m[r].mode && "i" !== m[r].mode) || 0 !== d 9330 ? (p = null) 9331 : ((p = createNS("rect")).setAttribute("fill", "#ffffff"), 9332 p.setAttribute("width", this.element.comp.data.w || 0), 9333 p.setAttribute("height", this.element.comp.data.h || 0), 9334 g.push(p)), 9335 (n = createNS("path")), 9336 "n" === m[r].mode) 9337 ) 9338 (this.viewData[r] = { 9339 op: PropertyFactory.getProp( 9340 this.element, 9341 m[r].o, 9342 0, 9343 0.01, 9344 this.element 9345 ), 9346 prop: ShapePropertyFactory.getShapeProp( 9347 this.element, 9348 m[r], 9349 3 9350 ), 9351 elem: n, 9352 lastPath: "", 9353 }), 9354 a.appendChild(n); 9355 else { 9356 if ( 9357 ((d += 1), 9358 n.setAttribute( 9359 "fill", 9360 "s" === m[r].mode ? "#000000" : "#ffffff" 9361 ), 9362 n.setAttribute("clip-rule", "nonzero"), 9363 0 !== m[r].x.k 9364 ? ((y = "mask"), 9365 (b = "mask"), 9366 (u = PropertyFactory.getProp( 9367 this.element, 9368 m[r].x, 9369 0, 9370 null, 9371 this.element 9372 )), 9373 (s = createElementID()), 9374 (f = createNS("filter")).setAttribute("id", s), 9375 (c = createNS("feMorphology")).setAttribute( 9376 "operator", 9377 "erode" 9378 ), 9379 c.setAttribute("in", "SourceGraphic"), 9380 c.setAttribute("radius", "0"), 9381 f.appendChild(c), 9382 a.appendChild(f), 9383 n.setAttribute( 9384 "stroke", 9385 "s" === m[r].mode ? "#000000" : "#ffffff" 9386 )) 9387 : ((c = null), (u = null)), 9388 (this.storedData[r] = { 9389 elem: n, 9390 x: u, 9391 expan: c, 9392 lastPath: "", 9393 lastOperator: "", 9394 filterId: s, 9395 lastRadius: 0, 9396 }), 9397 "i" === m[r].mode) 9398 ) { 9399 l = g.length; 9400 var x = createNS("g"); 9401 for (h = 0; h < l; h += 1) x.appendChild(g[h]); 9402 var _ = createNS("mask"); 9403 _.setAttribute("mask-type", "alpha"), 9404 _.setAttribute("id", v + "_" + d), 9405 _.appendChild(n), 9406 a.appendChild(_), 9407 x.setAttribute( 9408 "mask", 9409 "url(" + getLocationHref() + "#" + v + "_" + d + ")" 9410 ), 9411 (g.length = 0), 9412 g.push(x); 9413 } else g.push(n); 9414 m[r].inv && 9415 !this.solidPath && 9416 (this.solidPath = this.createLayerSolidPath()), 9417 (this.viewData[r] = { 9418 elem: n, 9419 lastPath: "", 9420 op: PropertyFactory.getProp( 9421 this.element, 9422 m[r].o, 9423 0, 9424 0.01, 9425 this.element 9426 ), 9427 prop: ShapePropertyFactory.getShapeProp( 9428 this.element, 9429 m[r], 9430 3 9431 ), 9432 invRect: p,
9433 }), 9434 this.viewData[r].prop.k || 9435 this.drawPath( 9436 m[r], 9437 this.viewData[r].prop.v, 9438 this.viewData[r] 9439 ); 9440 } 9441 for ( 9442 this.maskElement = createNS(y), o = g.length, r = 0; 9443 r < o; 9444 r += 1 9445 ) 9446 this.maskElement.appendChild(g[r]); 9447 d > 0 && 9448 (this.maskElement.setAttribute("id", v), 9449 this.element.maskedElement.setAttribute( 9450 b, 9451 "url(" + getLocationHref() + "#" + v + ")" 9452 ), 9453 a.appendChild(this.maskElement)), 9454 this.viewData.length && this.element.addRenderableComponent(this); 9455 } 9456 (TransformElement.prototype = { 9457 initTransform: function () { 9458 var t = new Matrix(); 9459 (this.finalTransform = { 9460 mProp: this.data.ks 9461 ? TransformPropertyFactory.getTransformProperty( 9462 this, 9463 this.data.ks, 9464 this 9465 ) 9466 : { o: 0 }, 9467 _matMdf: !1, 9468 _localMatMdf: !1, 9469 _opMdf: !1, 9470 mat: t, 9471 localMat: t, 9472 localOpacity: 1, 9473 }), 9474 this.data.ao && (this.finalTransform.mProp.autoOriented = !0), 9475 this.data.ty; 9476 }, 9477 renderTransform: function () { 9478 if ( 9479 ((this.finalTransform._opMdf = 9480 this.finalTransform.mProp.o._mdf || this._isFirstFrame), 9481 (this.finalTransform._matMdf = 9482 this.finalTransform.mProp._mdf || this._isFirstFrame), 9483 this.hierarchy) 9484 ) { 9485 var t, 9486 e = this.finalTransform.mat, 9487 i = 0, 9488 s = this.hierarchy.length; 9489 if (!this.finalTransform._matMdf) 9490 for (; i < s; ) { 9491 if (this.hierarchy[i].finalTransform.mProp._mdf) { 9492 this.finalTransform._matMdf = !0; 9493 break; 9494 } 9495 i += 1; 9496 } 9497 if (this.finalTransform._matMdf) 9498 for ( 9499 t = this.finalTransform.mProp.v.props, 9500 e.cloneFromProps(t), 9501 i = 0; 9502 i < s; 9503 i += 1 9504 ) 9505 e.multiply(this.hierarchy[i].finalTransform.mProp.v); 9506 } 9507 (this.localTransforms && !this.finalTransform._matMdf) || 9508 (this.finalTransform._localMatMdf = 9509 this.finalTransform._matMdf), 9510 this.finalTransform._opMdf && 9511 (this.finalTransform.localOpacity = 9512 this.finalTransform.mProp.o.v); 9513 }, 9514 renderLocalTransform: function () { 9515 if (this.localTransforms) { 9516 var t = 0, 9517 e = this.localTransforms.length; 9518 if ( 9519 ((this.finalTransform._localMatMdf = 9520 this.finalTransform._matMdf), 9521 !this.finalTransform._localMatMdf || 9522 !this.finalTransform._opMdf) 9523 ) 9524 for (; t < e; ) 9525 this.localTransforms[t]._mdf && 9526 (this.finalTransform._localMatMdf = !0), 9527 this.localTransforms[t]._opMdf && 9528 !this.finalTransform._opMdf && 9529 ((this.finalTransform.localOpacity = 9530 this.finalTransform.mProp.o.v), 9531 (this.finalTransform._opMdf = !0)), 9532 (t += 1); 9533 if (this.finalTransform._localMatMdf) { 9534 var i = this.finalTransform.localMat; 9535 for ( 9536 this.localTransforms[0].matrix.clone(i), t = 1; 9537 t < e; 9538 t += 1 9539 ) { 9540 var s = this.localTransforms[t].matrix; 9541 i.multiply(s); 9542 } 9543 i.multiply(this.finalTransform.mat); 9544 } 9545 if (this.finalTransform._opMdf) { 9546 var r = this.finalTransform.localOpacity; 9547 for (t = 0; t < e; t += 1) 9548 r *= 0.01 * this.localTransforms[t].opacity; 9549 this.finalTransform.localOpacity = r; 9550 } 9551 } 9552 }, 9553 searchEffectTransforms: function () {
9554 if (this.renderableEffectsManager) { 9555 var t = this.renderableEffectsManager.getEffects( 9556 effectTypes.TRANSFORM_EFFECT 9557 ); 9558 if (t.length) { 9559 (this.localTransforms = []), 9560 (this.finalTransform.localMat = new Matrix()); 9561 var e = 0, 9562 i = t.length; 9563 for (e = 0; e < i; e += 1) this.localTransforms.push(t[e]); 9564 } 9565 } 9566 }, 9567 globalToLocal: function (t) { 9568 var e = []; 9569 e.push(this.finalTransform); 9570 for (var i, s = !0, r = this.comp; s; ) 9571 r.finalTransform 9572 ? (r.data.hasMask && e.splice(0, 0, r.finalTransform), 9573 (r = r.comp)) 9574 : (s = !1); 9575 var n, 9576 a = e.length; 9577 for (i = 0; i < a; i += 1) 9578 (n = e[i].mat.applyToPointArray(0, 0, 0)), 9579 (t = [t[0] - n[0], t[1] - n[1], 0]); 9580 return t; 9581 }, 9582 mHelper: new Matrix(), 9583 }), 9584 (MaskElement.prototype.getMaskProperty = function (t) { 9585 return this.viewData[t].prop; 9586 }), 9587 (MaskElement.prototype.renderFrame = function (t) { 9588 var e, 9589 i = this.element.finalTransform.mat, 9590 s = this.masksProperties.length; 9591 for (e = 0; e < s; e += 1) 9592 if ( 9593 ((this.viewData[e].prop._mdf || t) && 9594 this.drawPath( 9595 this.masksProperties[e], 9596 this.viewData[e].prop.v, 9597 this.viewData[e] 9598 ), 9599 (this.viewData[e].op._mdf || t) && 9600 this.viewData[e].elem.setAttribute( 9601 "fill-opacity", 9602 this.viewData[e].op.v 9603 ), 9604 "n" !== this.masksProperties[e].mode && 9605 (this.viewData[e].invRect && 9606 (this.element.finalTransform.mProp._mdf || t) && 9607 this.viewData[e].invRect.setAttribute( 9608 "transform", 9609 i.getInverseMatrix().to2dCSS() 9610 ), 9611 this.storedData[e].x && (this.storedData[e].x._mdf || t))) 9612 ) { 9613 var r = this.storedData[e].expan; 9614 this.storedData[e].x.v < 0 9615 ? ("erode" !== this.storedData[e].lastOperator && 9616 ((this.storedData[e].lastOperator = "erode"), 9617 this.storedData[e].elem.setAttribute( 9618 "filter", 9619 "url(" + 9620 getLocationHref() + 9621 "#" + 9622 this.storedData[e].filterId + 9623 ")" 9624 )), 9625 r.setAttribute("radius", -this.storedData[e].x.v)) 9626 : ("dilate" !== this.storedData[e].lastOperator && 9627 ((this.storedData[e].lastOperator = "dilate"), 9628 this.storedData[e].elem.setAttribute("filter", null)), 9629 this.storedData[e].elem.setAttribute( 9630 "stroke-width", 9631 2 * this.storedData[e].x.v 9632 )); 9633 } 9634 }), 9635 (MaskElement.prototype.getMaskelement = function () { 9636 return this.maskElement; 9637 }), 9638 (MaskElement.prototype.createLayerSolidPath = function () { 9639 return ( 9640 "M0,0 " + 9641 (" h" + 9642 this.globalData.compSize.w + 9643 " v" + 9644 this.globalData.compSize.h + 9645 " h-" + 9646 this.globalData.compSize.w + 9647 (" v-" + this.globalData.compSize.h)) + 9648 " " 9649 ); 9650 }), 9651 (MaskElement.prototype.drawPath = function (t, e, i) { 9652 var s, 9653 r, 9654 n = " M" + e.v[0][0] + "," + e.v[0][1]; 9655 for (r = e._length, s = 1; s < r; s += 1) 9656 n += 9657 " C" + 9658 e.o[s - 1][0] + 9659 "," + 9660 e.o[s - 1][1] + 9661 " " + 9662 e.i[s][0] + 9663 "," + 9664 e.i[s][1] + 9665 " " + 9666 e.v[s][0] + 9667 "," + 9668 e.v[s][1]; 9669 if ( 9670 (e.c && 9671 r > 1 && 9672 (n += 9673 " C" + 9674 e.o[s - 1][0] + 9675 "," + 9676 e.o[s - 1][1] + 9677 " " + 9678 e.i[0][0] + 9679 "," + 9680 e.i[0][1] + 9681 " " + 9682 e.v[0][0] + 9683 "," + 9684 e.v[0][1]), 9685 i.lastPath !== n) 9686 ) { 9687 var a = ""; 9688 i.elem && 9689 (e.c && (a = t.inv ? this.solidPath + n : n), 9690 i.elem.setAttribute("d", a)),
9691 (i.lastPath = n); 9692 } 9693 }), 9694 (MaskElement.prototype.destroy = function () { 9695 (this.element = null), 9696 (this.globalData = null), 9697 (this.maskElement = null), 9698 (this.data = null), 9699 (this.masksProperties = null); 9700 }); 9701 var filtersFactory = (function () { 9702 var t = {}; 9703 return ( 9704 (t.createFilter = function (t, e) { 9705 var i = createNS("filter"); 9706 return ( 9707 i.setAttribute("id", t), 9708 !0 !== e && 9709 (i.setAttribute("filterUnits", "objectBoundingBox"), 9710 i.setAttribute("x", "0%"), 9711 i.setAttribute("y", "0%"), 9712 i.setAttribute("width", "100%"), 9713 i.setAttribute("height", "100%")), 9714 i 9715 ); 9716 }), 9717 (t.createAlphaToLuminanceFilter = function () { 9718 var t = createNS("feColorMatrix"); 9719 return ( 9720 t.setAttribute("type", "matrix"), 9721 t.setAttribute("color-interpolation-filters", "sRGB"), 9722 t.setAttribute( 9723 "values", 9724 "0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1" 9725 ), 9726 t 9727 ); 9728 }), 9729 t 9730 ); 9731 })(), 9732 featureSupport = (function () { 9733 var t = { 9734 maskType: !0, 9735 svgLumaHidden: !0, 9736 offscreenCanvas: "undefined" != typeof OffscreenCanvas, 9737 }; 9738 return ( 9739 (/MSIE 10/i.test(navigator.userAgent) || 9740 /MSIE 9/i.test(navigator.userAgent) || 9741 /rv:11.0/i.test(navigator.userAgent) || 9742 /Edge\/\d./i.test(navigator.userAgent)) && 9743 (t.maskType = !1), 9744 /firefox/i.test(navigator.userAgent) && (t.svgLumaHidden = !1), 9745 t 9746 ); 9747 })(), 9748 registeredEffects$1 = {}, 9749 idPrefix = "filter_result_"; 9750 function SVGEffects(t) { 9751 var e, 9752 i, 9753 s = "SourceGraphic", 9754 r = t.data.ef ? t.data.ef.length : 0, 9755 n = createElementID(), 9756 a = filtersFactory.createFilter(n, !0), 9757 o = 0; 9758 for (this.filters = [], e = 0; e < r; e += 1) { 9759 i = null; 9760 var h = t.data.ef[e].ty; 9761 registeredEffects$1[h] && 9762 ((i = new (0, registeredEffects$1[h].effect)( 9763 a, 9764 t.effectsManager.effectElements[e], 9765 t, 9766 idPrefix + o, 9767 s 9768 )), 9769 (s = idPrefix + o), 9770 registeredEffects$1[h].countsAsEffect && (o += 1)), 9771 i && this.filters.push(i); 9772 } 9773 o && 9774 (t.globalData.defs.appendChild(a), 9775 t.layerElement.setAttribute( 9776 "filter", 9777 "url(" + getLocationHref() + "#" + n + ")" 9778 )), 9779 this.filters.length && t.addRenderableComponent(this); 9780 } 9781 function registerEffect$1(t, e, i) { 9782 registeredEffects$1[t] = { effect: e, countsAsEffect: i }; 9783 } 9784 function SVGBaseElement() {} 9785 function HierarchyElement() {}
9786 function RenderableDOMElement() {} 9787 function IImageElement(t, e, i) { 9788 (this.assetData = e.getAssetData(t.refId)), 9789 this.assetData && 9790 this.assetData.sid && 9791 (this.assetData = e.slotManager.getProp(this.assetData)), 9792 this.initElement(t, e, i), 9793 (this.sourceRect = { 9794 top: 0, 9795 left: 0, 9796 width: this.assetData.w, 9797 height: this.assetData.h, 9798 }); 9799 } 9800 function ProcessedElement(t, e) { 9801 (this.elem = t), (this.pos = e); 9802 } 9803 function IShapeElement() {} 9804 (SVGEffects.prototype.renderFrame = function (t) { 9805 var e, 9806 i = this.filters.length; 9807 for (e = 0; e < i; e += 1) this.filters[e].renderFrame(t); 9808 }), 9809 (SVGEffects.prototype.getEffects = function (t) { 9810 var e, 9811 i = this.filters.length, 9812 s = []; 9813 for (e = 0; e < i; e += 1) 9814 this.filters[e].type === t && s.push(this.filters[e]); 9815 return s; 9816 }), 9817 (SVGBaseElement.prototype = { 9818 initRendererElement: function () { 9819 this.layerElement = createNS("g"); 9820 }, 9821 createContainerElements: function () { 9822 (this.matteElement = createNS("g")), 9823 (this.transformedElement = this.layerElement), 9824 (this.maskedElement = this.layerElement), 9825 (this._sizeChanged = !1); 9826 var t = null; 9827 if (this.data.td) { 9828 this.matteMasks = {}; 9829 var e = createNS("g"); 9830 e.setAttribute("id", this.layerId), 9831 e.appendChild(this.layerElement), 9832 (t = e), 9833 this.globalData.defs.appendChild(e); 9834 } else 9835 this.data.tt 9836 ? (this.matteElement.appendChild(this.layerElement), 9837 (t = this.matteElement), 9838 (this.baseElement = this.matteElement)) 9839 : (this.baseElement = this.layerElement); 9840 if ( 9841 (this.data.ln && 9842 this.layerElement.setAttribute("id", this.data.ln), 9843 this.data.cl && 9844 this.layerElement.setAttribute("class", this.data.cl), 9845 0 === this.data.ty && !this.data.hd) 9846 ) { 9847 var i = createNS("clipPath"), 9848 s = createNS("path"); 9849 s.setAttribute( 9850 "d", 9851 "M0,0 L" + 9852 this.data.w + 9853 ",0 L" + 9854 this.data.w + 9855 "," + 9856 this.data.h + 9857 " L0," + 9858 this.data.h + 9859 "z" 9860 ); 9861 var r = createElementID(); 9862 if ( 9863 (i.setAttribute("id", r), 9864 i.appendChild(s), 9865 this.globalData.defs.appendChild(i), 9866 this.checkMasks()) 9867 ) { 9868 var n = createNS("g"); 9869 n.setAttribute( 9870 "clip-path", 9871 "url(" + getLocationHref() + "#" + r + ")" 9872 ), 9873 n.appendChild(this.layerElement), 9874 (this.transformedElement = n), 9875 t 9876 ? t.appendChild(this.transformedElement) 9877 : (this.baseElement = this.transformedElement); 9878 } else 9879 this.layerElement.setAttribute( 9880 "clip-path", 9881 "url(" + getLocationHref() + "#" + r + ")" 9882 ); 9883 } 9884 0 !== this.data.bm && this.setBlendMode(); 9885 }, 9886 renderElement: function () { 9887 this.finalTransform._localMatMdf && 9888 this.transformedElement.setAttribute( 9889 "transform", 9890 this.finalTransform.localMat.to2dCSS() 9891 ), 9892 this.finalTransform._opMdf && 9893 this.transformedElement.setAttribute( 9894 "opacity", 9895 this.finalTransform.localOpacity 9896 ); 9897 }, 9898 destroyBaseElement: function () { 9899 (this.layerElement = null),
9900 (this.matteElement = null), 9901 this.maskManager.destroy(); 9902 }, 9903 getBaseElement: function () { 9904 return this.data.hd ? null : this.baseElement; 9905 }, 9906 createRenderableComponents: function () { 9907 (this.maskManager = new MaskElement( 9908 this.data, 9909 this, 9910 this.globalData 9911 )), 9912 (this.renderableEffectsManager = new SVGEffects(this)), 9913 this.searchEffectTransforms(); 9914 }, 9915 getMatte: function (t) { 9916 if ( 9917 (this.matteMasks || (this.matteMasks = {}), 9918 !this.matteMasks[t]) 9919 ) { 9920 var e, 9921 i, 9922 s, 9923 r, 9924 n = this.layerId + "_" + t; 9925 if (1 === t || 3 === t) { 9926 var a = createNS("mask"); 9927 a.setAttribute("id", n), 9928 a.setAttribute( 9929 "mask-type", 9930 3 === t ? "luminance" : "alpha" 9931 ), 9932 (s = createNS("use")).setAttributeNS( 9933 "http://www.w3.org/1999/xlink", 9934 "href", 9935 "#" + this.layerId 9936 ), 9937 a.appendChild(s), 9938 this.globalData.defs.appendChild(a), 9939 featureSupport.maskType || 9940 1 !== t || 9941 (a.setAttribute("mask-type", "luminance"), 9942 (e = createElementID()), 9943 (i = filtersFactory.createFilter(e)), 9944 this.globalData.defs.appendChild(i), 9945 i.appendChild( 9946 filtersFactory.createAlphaToLuminanceFilter() 9947 ), 9948 (r = createNS("g")).appendChild(s), 9949 a.appendChild(r), 9950 r.setAttribute( 9951 "filter", 9952 "url(" + getLocationHref() + "#" + e + ")" 9953 )); 9954 } else if (2 === t) { 9955 var o = createNS("mask"); 9956 o.setAttribute("id", n), 9957 o.setAttribute("mask-type", "alpha"); 9958 var h = createNS("g"); 9959 o.appendChild(h), 9960 (e = createElementID()), 9961 (i = filtersFactory.createFilter(e)); 9962 var l = createNS("feComponentTransfer"); 9963 l.setAttribute("in", "SourceGraphic"), i.appendChild(l); 9964 var p = createNS("feFuncA"); 9965 p.setAttribute("type", "table"), 9966 p.setAttribute("tableValues", "1.0 0.0"), 9967 l.appendChild(p), 9968 this.globalData.defs.appendChild(i); 9969 var f = createNS("rect"); 9970 f.setAttribute("width", this.comp.data.w), 9971 f.setAttribute("height", this.comp.data.h), 9972 f.setAttribute("x", "0"), 9973 f.setAttribute("y", "0"), 9974 f.setAttribute("fill", "#ffffff"), 9975 f.setAttribute("opacity", "0"), 9976 h.setAttribute( 9977 "filter", 9978 "url(" + getLocationHref() + "#" + e + ")" 9979 ), 9980 h.appendChild(f), 9981 (s = createNS("use")).setAttributeNS( 9982 "http://www.w3.org/1999/xlink", 9983 "href", 9984 "#" + this.layerId 9985 ), 9986 h.appendChild(s), 9987 featureSupport.maskType || 9988 (o.setAttribute("mask-type", "luminance"), 9989 i.appendChild( 9990 filtersFactory.createAlphaToLuminanceFilter() 9991 ), 9992 (r = createNS("g")), 9993 h.appendChild(f), 9994 r.appendChild(this.layerElement), 9995 h.appendChild(r)), 9996 this.globalData.defs.appendChild(o); 9997 } 9998 this.matteMasks[t] = n; 9999 } 10000 return this.matteMasks[t]; 10001 }, 10002 setMatte: function (t) { 10003 this.matteElement && 10004 this.matteElement.setAttribute( 10005 "mask", 10006 "url(" + getLocationHref() + "#" + t + ")" 10007 ); 10008 }, 10009 }), 10010 (HierarchyElement.prototype = { 10011 initHierarchy: function () { 10012 (this.hierarchy = []), 10013 (this._isParent = !1), 10014 this.checkParenting(); 10015 }, 10016 setHierarchy: function (t) { 10017 this.hierarchy = t; 10018 }, 10019 setAsParent: function () { 10020 this._isParent = !0; 10021 }, 10022 checkParenting: function () { 10023 void 0 !== this.data.parent && 10024 this.comp.buildElementParenting(this, this.data.parent, []); 10025 }, 10026 }), 10027 extendPrototype( 10028 [ 10029 RenderableElement, 10030 createProxyFunction({ 10031 initElement: function (t, e, i) { 10032 this.initFrame(), 10033 this.initBaseData(t, e, i), 10034 this.initTransform(t, e, i), 10035 this.initHierarchy(), 10036 this.initRenderable(), 10037 this.initRendererElement(), 10038 this.createContainerElements(), 10039 this.createRenderableComponents(), 10040 this.createContent(), 10041 this.hide(); 10042 }, 10043 hide: function () { 10044 this.hidden || 10045 (this.isInRange && !this.isTransparent) || 10046 (((this.baseElement || this.layerElement).style.display = 10047 "none"), 10048 (this.hidden = !0)); 10049 }, 10050 show: function () { 10051 this.isInRange && 10052 !this.isTransparent && 10053 (this.data.hd || 10054 ((this.baseElement || this.layerElement).style.display = 10055 "block"), 10056 (this.hidden = !1), 10057 (this._isFirstFrame = !0)); 10058 }, 10059 renderFrame: function () { 10060 this.data.hd || 10061 this.hidden || 10062 (this.renderTransform(), 10063 this.renderRenderable(), 10064 this.renderLocalTransform(), 10065 this.renderElement(), 10066 this.renderInnerContent(), 10067 this._isFirstFrame && (this._isFirstFrame = !1)); 10068 }, 10069 renderInnerContent: function () {}, 10070 prepareFrame: function (t) { 10071 (this._mdf = !1), 10072 this.prepareRenderableFrame(t), 10073 this.prepareProperties(t, this.isInRange), 10074 this.checkTransparency(); 10075 }, 10076 destroy: function () { 10077 (this.innerElem = null), this.destroyBaseElement(); 10078 }, 10079 }), 10080 ], 10081 RenderableDOMElement 10082 ), 10083 extendPrototype( 10084 [ 10085 BaseElement, 10086 TransformElement, 10087 SVGBaseElement, 10088 HierarchyElement, 10089 FrameElement, 10090 RenderableDOMElement, 10091 ], 10092 IImageElement 10093 ), 10094 (IImageElement.prototype.createContent = function () { 10095 var t = this.globalData.getAssetsPath(this.assetData); 10096 (this.innerElem = createNS("image")), 10097 this.innerElem.setAttribute("width", this.assetData.w + "px"), 10098 this.innerElem.setAttribute("height", this.assetData.h + "px"), 10099 this.innerElem.setAttribute( 10100 "preserveAspectRatio", 10101 this.assetData.pr || 10102 this.globalData.renderConfig.imagePreserveAspectRatio 10103 ), 10104 this.innerElem.setAttributeNS( 10105 "http://www.w3.org/1999/xlink", 10106 "href", 10107 t 10108 ), 10109 this.layerElement.appendChild(this.innerElem); 10110 }), 10111 (IImageElement.prototype.sourceRectAtTime = function () { 10112 return this.sourceRect; 10113 }), 10114 (IShapeElement.prototype = { 10115 addShapeToModifiers: function (t) { 10116 var e, 10117 i = this.shapeModifiers.length; 10118 for (e = 0; e < i; e += 1) this.shapeModifiers[e].addShape(t); 10119 }, 10120 isShapeInAnimatedModifiers: function (t) { 10121 for (var e = this.shapeModifiers.length; 0 < e; ) 10122 if (this.shapeModifiers[0].isAnimatedWithShape(t)) return !0; 10123 return !1; 10124 }, 10125 renderModifiers: function () { 10126 if (this.shapeModifiers.length) { 10127 var t, 10128 e = this.shapes.length; 10129 for (t = 0; t < e; t += 1) this.shapes[t].sh.reset(); 10130 for ( 10131 t = (e = this.shapeModifiers.length) - 1; 10132 t >= 0 && 10133 !this.shapeModifiers[t].processShapes(this._isFirstFrame); 10134 t -= 1 10135 ); 10136 } 10137 }, 10138 searchProcessedElement: function (t) { 10139 for ( 10140 var e = this.processedElements, i = 0, s = e.length; 10141 i < s; 10142 10143 ) { 10144 if (e[i].elem === t) return e[i].pos; 10145 i += 1; 10146 } 10147 return 0; 10148 }, 10149 addProcessedElement: function (t, e) { 10150 for (var i = this.processedElements, s = i.length; s; ) 10151 if (i[(s -= 1)].elem === t) return void (i[s].pos = e); 10152 i.push(new ProcessedElement(t, e)); 10153 }, 10154 prepareFrame: function (t) { 10155 this.prepareRenderableFrame(t), 10156 this.prepareProperties(t, this.isInRange); 10157 }, 10158 }); 10159 var lineCapEnum = { 1: "butt", 2: "round", 3: "square" }, 10160 lineJoinEnum = { 1: "miter", 2: "round", 3: "bevel" }; 10161 function SVGShapeData(t, e, i) { 10162 (this.caches = []), 10163 (this.styles = []), 10164 (this.transformers = t), 10165 (this.lStr = ""), 10166 (this.sh = i), 10167 (this.lvl = e), 10168 (this._isAnimated = !!i.k); 10169 for (var s = 0, r = t.length; s < r; ) { 10170 if (t[s].mProps.dynamicProperties.length) { 10171 this._isAnimated = !0; 10172 break; 10173 } 10174 s += 1; 10175 } 10176 } 10177 function SVGStyleData(t, e) { 10178 (this.data = t),
10179 (this.type = t.ty), 10180 (this.d = ""), 10181 (this.lvl = e), 10182 (this._mdf = !1), 10183 (this.closed = !0 === t.hd), 10184 (this.pElem = createNS("path")), 10185 (this.msElem = null); 10186 } 10187 function DashProperty(t, e, i, s) { 10188 (this.elem = t), 10189 (this.frameId = -1), 10190 (this.dataProps = createSizedArray(e.length)), 10191 (this.renderer = i), 10192 (this.k = !1), 10193 (this.dashStr = ""), 10194 (this.dashArray = createTypedArray( 10195 "float32", 10196 e.length ? e.length - 1 : 0 10197 )), 10198 (this.dashoffset = createTypedArray("float32", 1)), 10199 this.initDynamicPropertyContainer(s); 10200 var r, 10201 n, 10202 a = e.length || 0; 10203 for (r = 0; r < a; r += 1) 10204 (n = PropertyFactory.getProp(t, e[r].v, 0, 0, this)), 10205 (this.k = n.k || this.k), 10206 (this.dataProps[r] = { n: e[r].n, p: n }); 10207 this.k || this.getValue(!0), (this._isAnimated = this.k); 10208 } 10209 function SVGStrokeStyleData(t, e, i) { 10210 this.initDynamicPropertyContainer(t), 10211 (this.getValue = this.iterateDynamicProperties), 10212 (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, this)), 10213 (this.w = PropertyFactory.getProp(t, e.w, 0, null, this)), 10214 (this.d = new DashProperty(t, e.d || {}, "svg", this)), 10215 (this.c = PropertyFactory.getProp(t, e.c, 1, 255, this)), 10216 (this.style = i), 10217 (this._isAnimated = !!this._isAnimated); 10218 } 10219 function SVGFillStyleData(t, e, i) { 10220 this.initDynamicPropertyContainer(t), 10221 (this.getValue = this.iterateDynamicProperties), 10222 (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, this)), 10223 (this.c = PropertyFactory.getProp(t, e.c, 1, 255, this)), 10224 (this.style = i); 10225 } 10226 function SVGNoStyleData(t, e, i) { 10227 this.initDynamicPropertyContainer(t), 10228 (this.getValue = this.iterateDynamicProperties), 10229 (this.style = i); 10230 } 10231 function GradientProperty(t, e, i) { 10232 (this.data = e), (this.c = createTypedArray("uint8c", 4 * e.p)); 10233 var s = e.k.k[0].s 10234 ? e.k.k[0].s.length - 4 * e.p 10235 : e.k.k.length - 4 * e.p; 10236 (this.o = createTypedArray("float32", s)), 10237 (this._cmdf = !1), 10238 (this._omdf = !1), 10239 (this._collapsable = this.checkCollapsable()), 10240 (this._hasOpacity = s), 10241 this.initDynamicPropertyContainer(i), 10242 (this.prop = PropertyFactory.getProp(t, e.k, 1, null, this)), 10243 (this.k = this.prop.k), 10244 this.getValue(!0); 10245 } 10246 function SVGGradientFillStyleData(t, e, i) { 10247 this.initDynamicPropertyContainer(t), 10248 (this.getValue = this.iterateDynamicProperties), 10249 this.initGradientData(t, e, i); 10250 } 10251 function SVGGradientStrokeStyleData(t, e, i) { 10252 this.initDynamicPropertyContainer(t), 10253 (this.getValue = this.iterateDynamicProperties), 10254 (this.w = PropertyFactory.getProp(t, e.w, 0, null, this)), 10255 (this.d = new DashProperty(t, e.d || {}, "svg", this)), 10256 this.initGradientData(t, e, i), 10257 (this._isAnimated = !!this._isAnimated); 10258 } 10259 function ShapeGroupData() { 10260 (this.it = []), (this.prevViewData = []), (this.gr = createNS("g")); 10261 } 10262 function SVGTransformData(t, e, i) { 10263 (this.transform = { mProps: t, op: e, container: i }), 10264 (this.elements = []), 10265 (this._isAnimated = 10266 this.transform.mProps.dynamicProperties.length || 10267 this.transform.op.effectsSequence.length); 10268 } 10269 (SVGShapeData.prototype.setAsAnimated = function () { 10270 this._isAnimated = !0; 10271 }), 10272 (SVGStyleData.prototype.reset = function () { 10273 (this.d = ""), (this._mdf = !1); 10274 }), 10275 (DashProperty.prototype.getValue = function (t) { 10276 if ( 10277 (this.elem.globalData.frameId !== this.frameId || t) && 10278 ((this.frameId = this.elem.globalData.frameId), 10279 this.iterateDynamicProperties(), 10280 (this._mdf = this._mdf || t), 10281 this._mdf) 10282 ) { 10283 var e = 0, 10284 i = this.dataProps.length; 10285 for ( 10286 "svg" === this.renderer && (this.dashStr = ""), e = 0; 10287 e < i; 10288 e += 1 10289 ) 10290 "o" !== this.dataProps[e].n 10291 ? "svg" === this.renderer 10292 ? (this.dashStr += " " + this.dataProps[e].p.v)
10293 : (this.dashArray[e] = this.dataProps[e].p.v) 10294 : (this.dashoffset[0] = this.dataProps[e].p.v); 10295 } 10296 }), 10297 extendPrototype([DynamicPropertyContainer], DashProperty), 10298 extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData), 10299 extendPrototype([DynamicPropertyContainer], SVGFillStyleData), 10300 extendPrototype([DynamicPropertyContainer], SVGNoStyleData), 10301 (GradientProperty.prototype.comparePoints = function (t, e) { 10302 for (var i = 0, s = this.o.length / 2; i < s; ) { 10303 if (Math.abs(t[4 * i] - t[4 * e + 2 * i]) > 0.01) return !1; 10304 i += 1; 10305 } 10306 return !0; 10307 }), 10308 (GradientProperty.prototype.checkCollapsable = function () { 10309 if (this.o.length / 2 != this.c.length / 4) return !1; 10310 if (this.data.k.k[0].s) 10311 for (var t = 0, e = this.data.k.k.length; t < e; ) { 10312 if (!this.comparePoints(this.data.k.k[t].s, this.data.p)) 10313 return !1; 10314 t += 1; 10315 } 10316 else if (!this.comparePoints(this.data.k.k, this.data.p)) 10317 return !1; 10318 return !0; 10319 }), 10320 (GradientProperty.prototype.getValue = function (t) { 10321 if ( 10322 (this.prop.getValue(), 10323 (this._mdf = !1), 10324 (this._cmdf = !1), 10325 (this._omdf = !1), 10326 this.prop._mdf || t) 10327 ) { 10328 var e, 10329 i, 10330 s, 10331 r = 4 * this.data.p; 10332 for (e = 0; e < r; e += 1) 10333 (i = e % 4 == 0 ? 100 : 255), 10334 (s = Math.round(this.prop.v[e] * i)), 10335 this.c[e] !== s && ((this.c[e] = s), (this._cmdf = !t)); 10336 if (this.o.length) 10337 for ( 10338 r = this.prop.v.length, e = 4 * this.data.p; 10339 e < r; 10340 e += 1 10341 ) 10342 (i = e % 2 == 0 ? 100 : 1), 10343 (s = 10344 e % 2 == 0 10345 ? Math.round(100 * this.prop.v[e]) 10346 : this.prop.v[e]), 10347 this.o[e - 4 * this.data.p] !== s && 10348 ((this.o[e - 4 * this.data.p] = s), (this._omdf = !t)); 10349 this._mdf = !t; 10350 } 10351 }), 10352 extendPrototype([DynamicPropertyContainer], GradientProperty), 10353 (SVGGradientFillStyleData.prototype.initGradientData = function ( 10354 t, 10355 e, 10356 i 10357 ) { 10358 (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, this)), 10359 (this.s = PropertyFactory.getProp(t, e.s, 1, null, this)), 10360 (this.e = PropertyFactory.getProp(t, e.e, 1, null, this)), 10361 (this.h = PropertyFactory.getProp( 10362 t, 10363 e.h || { k: 0 }, 10364 0, 10365 0.01, 10366 this 10367 )), 10368 (this.a = PropertyFactory.getProp( 10369 t, 10370 e.a || { k: 0 }, 10371 0, 10372 degToRads, 10373 this 10374 )), 10375 (this.g = new GradientProperty(t, e.g, this)), 10376 (this.style = i), 10377 (this.stops = []), 10378 this.setGradientData(i.pElem, e), 10379 this.setGradientOpacity(e, i), 10380 (this._isAnimated = !!this._isAnimated); 10381 }), 10382 (SVGGradientFillStyleData.prototype.setGradientData = function ( 10383 t, 10384 e 10385 ) { 10386 var i = createElementID(), 10387 s = createNS(1 === e.t ? "linearGradient" : "radialGradient"); 10388 s.setAttribute("id", i), 10389 s.setAttribute("spreadMethod", "pad"), 10390 s.setAttribute("gradientUnits", "userSpaceOnUse"); 10391 var r, 10392 n, 10393 a, 10394 o = []; 10395 for (a = 4 * e.g.p, n = 0; n < a; n += 4) 10396 (r = createNS("stop")), s.appendChild(r), o.push(r); 10397 t.setAttribute(
10398 "gf" === e.ty ? "fill" : "stroke", 10399 "url(" + getLocationHref() + "#" + i + ")" 10400 ), 10401 (this.gf = s), 10402 (this.cst = o); 10403 }), 10404 (SVGGradientFillStyleData.prototype.setGradientOpacity = function ( 10405 t, 10406 e 10407 ) { 10408 if (this.g._hasOpacity && !this.g._collapsable) { 10409 var i, 10410 s, 10411 r, 10412 n = createNS("mask"), 10413 a = createNS("path"); 10414 n.appendChild(a); 10415 var o = createElementID(), 10416 h = createElementID(); 10417 n.setAttribute("id", h); 10418 var l = createNS( 10419 1 === t.t ? "linearGradient" : "radialGradient" 10420 ); 10421 l.setAttribute("id", o), 10422 l.setAttribute("spreadMethod", "pad"), 10423 l.setAttribute("gradientUnits", "userSpaceOnUse"), 10424 (r = t.g.k.k[0].s ? t.g.k.k[0].s.length : t.g.k.k.length); 10425 var p = this.stops; 10426 for (s = 4 * t.g.p; s < r; s += 2) 10427 (i = createNS("stop")).setAttribute( 10428 "stop-color", 10429 "rgb(255,255,255)" 10430 ), 10431 l.appendChild(i), 10432 p.push(i); 10433 a.setAttribute( 10434 "gf" === t.ty ? "fill" : "stroke", 10435 "url(" + getLocationHref() + "#" + o + ")" 10436 ), 10437 "gs" === t.ty && 10438 (a.setAttribute("stroke-linecap", lineCapEnum[t.lc || 2]), 10439 a.setAttribute("stroke-linejoin", lineJoinEnum[t.lj || 2]), 10440 1 === t.lj && a.setAttribute("stroke-miterlimit", t.ml)), 10441 (this.of = l), 10442 (this.ms = n), 10443 (this.ost = p), 10444 (this.maskId = h), 10445 (e.msElem = a); 10446 } 10447 }), 10448 extendPrototype( 10449 [DynamicPropertyContainer], 10450 SVGGradientFillStyleData 10451 ), 10452 extendPrototype( 10453 [SVGGradientFillStyleData, DynamicPropertyContainer], 10454 SVGGradientStrokeStyleData 10455 ); 10456 var buildShapeString = function (t, e, i, s) { 10457 if (0 === e) return ""; 10458 var r, 10459 n = t.o, 10460 a = t.i, 10461 o = t.v, 10462 h = " M" + s.applyToPointStringified(o[0][0], o[0][1]); 10463 for (r = 1; r < e; r += 1) 10464 h += 10465 " C" + 10466 s.applyToPointStringified(n[r - 1][0], n[r - 1][1]) + 10467 " " + 10468 s.applyToPointStringified(a[r][0], a[r][1]) + 10469 " " + 10470 s.applyToPointStringified(o[r][0], o[r][1]); 10471 return ( 10472 i && 10473 e && 10474 (h += 10475 " C" + 10476 s.applyToPointStringified(n[r - 1][0], n[r - 1][1]) + 10477 " " + 10478 s.applyToPointStringified(a[0][0], a[0][1]) + 10479 " " + 10480 s.applyToPointStringified(o[0][0], o[0][1]) + 10481 "z"), 10482 h 10483 ); 10484 }, 10485 SVGElementsRenderer = (function () { 10486 var t = new Matrix(), 10487 e = new Matrix(); 10488 function i(t, e, i) { 10489 (i || e.transform.op._mdf) && 10490 e.transform.container.setAttribute( 10491 "opacity", 10492 e.transform.op.v 10493 ), 10494 (i || e.transform.mProps._mdf) && 10495 e.transform.container.setAttribute( 10496 "transform", 10497 e.transform.mProps.v.to2dCSS() 10498 ); 10499 } 10500 function s() {} 10501 function r(i, s, r) { 10502 var n, 10503 a, 10504 o, 10505 h, 10506 l, 10507 p, 10508 f, 10509 c, 10510 u, 10511 m, 10512 d = s.styles.length, 10513 g = s.lvl; 10514 for (p = 0; p < d; p += 1) { 10515 if (((h = s.sh._mdf || r), s.styles[p].lvl < g)) { 10516 for ( 10517 c = e.reset(), 10518 u = g - s.styles[p].lvl, 10519 m = s.transformers.length - 1; 10520 !h && u > 0; 10521 10522 ) 10523 (h = s.transformers[m].mProps._mdf || h), 10524 (u -= 1), 10525 (m -= 1); 10526 if (h) 10527 for ( 10528 u = g - s.styles[p].lvl, m = s.transformers.length - 1; 10529 u > 0; 10530 10531 ) 10532 c.multiply(s.transformers[m].mProps.v), 10533 (u -= 1), 10534 (m -= 1); 10535 } else c = t; 10536 if (((a = (f = s.sh.paths)._length), h)) { 10537 for (o = "", n = 0; n < a; n += 1) 10538 (l = f.shapes[n]) && 10539 l._length && 10540 (o += buildShapeString(l, l._length, l.c, c)); 10541 s.caches[p] = o; 10542 } else o = s.caches[p]; 10543 (s.styles[p].d += !0 === i.hd ? "" : o), 10544 (s.styles[p]._mdf = h || s.styles[p]._mdf); 10545 } 10546 } 10547 function n(t, e, i) { 10548 var s = e.style; 10549 (e.c._mdf || i) && 10550 s.pElem.setAttribute( 10551 "fill", 10552 "rgb(" + 10553 bmFloor(e.c.v[0]) + 10554 "," + 10555 bmFloor(e.c.v[1]) + 10556 "," + 10557 bmFloor(e.c.v[2]) + 10558 ")" 10559 ), 10560 (e.o._mdf || i) && 10561 s.pElem.setAttribute("fill-opacity", e.o.v); 10562 } 10563 function a(t, e, i) { 10564 o(t, e, i), h(t, e, i); 10565 } 10566 function o(t, e, i) { 10567 var s, 10568 r, 10569 n, 10570 a, 10571 o, 10572 h = e.gf, 10573 l = e.g._hasOpacity, 10574 p = e.s.v, 10575 f = e.e.v; 10576 if (e.o._mdf || i) {
10577 var c = "gf" === t.ty ? "fill-opacity" : "stroke-opacity"; 10578 e.style.pElem.setAttribute(c, e.o.v); 10579 } 10580 if (e.s._mdf || i) { 10581 var u = 1 === t.t ? "x1" : "cx", 10582 m = "x1" === u ? "y1" : "cy"; 10583 h.setAttribute(u, p[0]), 10584 h.setAttribute(m, p[1]), 10585 l && 10586 !e.g._collapsable && 10587 (e.of.setAttribute(u, p[0]), e.of.setAttribute(m, p[1])); 10588 } 10589 if (e.g._cmdf || i) { 10590 s = e.cst; 10591 var d = e.g.c; 10592 for (n = s.length, r = 0; r < n; r += 1) 10593 (a = s[r]).setAttribute("offset", d[4 * r] + "%"), 10594 a.setAttribute( 10595 "stop-color", 10596 "rgb(" + 10597 d[4 * r + 1] + 10598 "," + 10599 d[4 * r + 2] + 10600 "," + 10601 d[4 * r + 3] + 10602 ")" 10603 ); 10604 } 10605 if (l && (e.g._omdf || i)) { 10606 var g = e.g.o; 10607 for ( 10608 n = (s = e.g._collapsable ? e.cst : e.ost).length, r = 0; 10609 r < n; 10610 r += 1 10611 ) 10612 (a = s[r]), 10613 e.g._collapsable || 10614 a.setAttribute("offset", g[2 * r] + "%"), 10615 a.setAttribute("stop-opacity", g[2 * r + 1]); 10616 } 10617 if (1 === t.t) 10618 (e.e._mdf || i) && 10619 (h.setAttribute("x2", f[0]), 10620 h.setAttribute("y2", f[1]), 10621 l && 10622 !e.g._collapsable && 10623 (e.of.setAttribute("x2", f[0]), 10624 e.of.setAttribute("y2", f[1]))); 10625 else if ( 10626 ((e.s._mdf || e.e._mdf || i) && 10627 ((o = Math.sqrt( 10628 Math.pow(p[0] - f[0], 2) + Math.pow(p[1] - f[1], 2) 10629 )), 10630 h.setAttribute("r", o), 10631 l && !e.g._collapsable && e.of.setAttribute("r", o)), 10632 e.s._mdf || e.e._mdf || e.h._mdf || e.a._mdf || i) 10633 ) { 10634 o || 10635 (o = Math.sqrt( 10636 Math.pow(p[0] - f[0], 2) + Math.pow(p[1] - f[1], 2) 10637 )); 10638 var v = Math.atan2(f[1] - p[1], f[0] - p[0]), 10639 y = e.h.v; 10640 y >= 1 ? (y = 0.99) : y <= -1 && (y = -0.99); 10641 var b = o * y, 10642 x = Math.cos(v + e.a.v) * b + p[0], 10643 _ = Math.sin(v + e.a.v) * b + p[1]; 10644 h.setAttribute("fx", x), 10645 h.setAttribute("fy", _), 10646 l && 10647 !e.g._collapsable && 10648 (e.of.setAttribute("fx", x), e.of.setAttribute("fy", _)); 10649 } 10650 } 10651 function h(t, e, i) { 10652 var s = e.style, 10653 r = e.d; 10654 r && 10655 (r._mdf || i) && 10656 r.dashStr && 10657 (s.pElem.setAttribute("stroke-dasharray", r.dashStr), 10658 s.pElem.setAttribute("stroke-dashoffset", r.dashoffset[0])), 10659 e.c && 10660 (e.c._mdf || i) && 10661 s.pElem.setAttribute( 10662 "stroke", 10663 "rgb(" + 10664 bmFloor(e.c.v[0]) + 10665 "," + 10666 bmFloor(e.c.v[1]) + 10667 "," + 10668 bmFloor(e.c.v[2]) + 10669 ")" 10670 ), 10671 (e.o._mdf || i) && 10672 s.pElem.setAttribute("stroke-opacity", e.o.v), 10673 (e.w._mdf || i) && 10674 (s.pElem.setAttribute("stroke-width", e.w.v), 10675 s.msElem && s.msElem.setAttribute("stroke-width", e.w.v)); 10676 } 10677 return { 10678 createRenderFunction: function (t) { 10679 switch (t.ty) { 10680 case "fl": 10681 return n; 10682 case "gf": 10683 return o; 10684 case "gs": 10685 return a; 10686 case "st": 10687 return h; 10688 case "sh": 10689 case "el": 10690 case "rc": 10691 case "sr": 10692 return r; 10693 case "tr": 10694 return i; 10695 case "no": 10696 return s; 10697 default: 10698 return null; 10699 } 10700 }, 10701 }; 10702 })(); 10703 function SVGShapeElement(t, e, i) { 10704 (this.shapes = []), 10705 (this.shapesData = t.shapes), 10706 (this.stylesList = []), 10707 (this.shapeModifiers = []), 10708 (this.itemsData = []), 10709 (this.processedElements = []), 10710 (this.animatedContents = []), 10711 this.initElement(t, e, i), 10712 (this.prevViewData = []); 10713 } 10714 function LetterProps(t, e, i, s, r, n) { 10715 (this.o = t), 10716 (this.sw = e), 10717 (this.sc = i), 10718 (this.fc = s), 10719 (this.m = r), 10720 (this.p = n), 10721 (this._mdf = { o: !0, sw: !!e, sc: !!i, fc: !!s, m: !0, p: !0 }); 10722 } 10723 function TextProperty(t, e) { 10724 (this._frameId = initialDefaultFrame), 10725 (this.pv = ""), 10726 (this.v = ""), 10727 (this.kf = !1), 10728 (this._isFirstFrame = !0), 10729 (this._mdf = !1), 10730 e.d && e.d.sid && (e.d = t.globalData.slotManager.getProp(e.d)), 10731 (this.data = e), 10732 (this.elem = t), 10733 (this.comp = this.elem.comp), 10734 (this.keysIndex = 0), 10735 (this.canResize = !1), 10736 (this.minimumFontSize = 1), 10737 (this.effectsSequence = []), 10738 (this.currentData = { 10739 ascent: 0, 10740 boxWidth: this.defaultBoxWidth, 10741 f: "", 10742 fStyle: "", 10743 fWeight: "", 10744 fc: "", 10745 j: "", 10746 justifyOffset: "", 10747 l: [], 10748 lh: 0, 10749 lineWidths: [], 10750 ls: "", 10751 of: "", 10752 s: "", 10753 sc: "", 10754 sw: 0, 10755 t: 0, 10756 tr: 0, 10757 sz: 0, 10758 ps: null, 10759 fillColorAnim: !1, 10760 strokeColorAnim: !1, 10761 strokeWidthAnim: !1, 10762 yOffset: 0, 10763 finalSize: 0, 10764 finalText: [], 10765 finalLineHeight: 0, 10766 __complete: !1, 10767 }), 10768 this.copyData(this.currentData, this.data.d.k[0].s), 10769 this.searchProperty() || this.completeTextData(this.currentData); 10770 } 10771 extendPrototype( 10772 [ 10773 BaseElement, 10774 TransformElement, 10775 SVGBaseElement, 10776 IShapeElement, 10777 HierarchyElement, 10778 FrameElement, 10779 RenderableDOMElement, 10780 ], 10781 SVGShapeElement 10782 ), 10783 (SVGShapeElement.prototype.initSecondaryElement = function () {}), 10784 (SVGShapeElement.prototype.identityMatrix = new Matrix()), 10785 (SVGShapeElement.prototype.buildExpressionInterface = 10786 function () {}), 10787 (SVGShapeElement.prototype.createContent = function () { 10788 this.searchShapes( 10789 this.shapesData, 10790 this.itemsData, 10791 this.prevViewData, 10792 this.layerElement, 10793 0, 10794 [], 10795 !0 10796 ), 10797 this.filterUniqueShapes(); 10798 }), 10799 (SVGShapeElement.prototype.filterUniqueShapes = function () { 10800 var t, 10801 e, 10802 i, 10803 s, 10804 r = this.shapes.length, 10805 n = this.stylesList.length, 10806 a = [], 10807 o = !1; 10808 for (i = 0; i < n; i += 1) { 10809 for ( 10810 s = this.stylesList[i], o = !1, a.length = 0, t = 0; 10811 t < r; 10812 t += 1 10813 ) 10814 -1 !== (e = this.shapes[t]).styles.indexOf(s) && 10815 (a.push(e), (o = e._isAnimated || o)); 10816 a.length > 1 && o && this.setShapesAsAnimated(a); 10817 } 10818 }), 10819 (SVGShapeElement.prototype.setShapesAsAnimated = function (t) { 10820 var e, 10821 i = t.length; 10822 for (e = 0; e < i; e += 1) t[e].setAsAnimated(); 10823 }), 10824 (SVGShapeElement.prototype.createStyleElement = function (t, e) { 10825 var i, 10826 s = new SVGStyleData(t, e), 10827 r = s.pElem; 10828 return ( 10829 "st" === t.ty 10830 ? (i = new SVGStrokeStyleData(this, t, s)) 10831 : "fl" === t.ty 10832 ? (i = new SVGFillStyleData(this, t, s)) 10833 : "gf" === t.ty || "gs" === t.ty 10834 ? ((i = new ( 10835 "gf" === t.ty 10836 ? SVGGradientFillStyleData 10837 : SVGGradientStrokeStyleData 10838 )(this, t, s)), 10839 this.globalData.defs.appendChild(i.gf), 10840 i.maskId && 10841 (this.globalData.defs.appendChild(i.ms), 10842 this.globalData.defs.appendChild(i.of), 10843 r.setAttribute( 10844 "mask", 10845 "url(" + getLocationHref() + "#" + i.maskId + ")" 10846 ))) 10847 : "no" === t.ty && (i = new SVGNoStyleData(this, t, s)), 10848 ("st" !== t.ty && "gs" !== t.ty) || 10849 (r.setAttribute("stroke-linecap", lineCapEnum[t.lc || 2]), 10850 r.setAttribute("stroke-linejoin", lineJoinEnum[t.lj || 2]), 10851 r.setAttribute("fill-opacity", "0"), 10852 1 === t.lj && r.setAttribute("stroke-miterlimit", t.ml)), 10853 2 === t.r && r.setAttribute("fill-rule", "evenodd"), 10854 t.ln && r.setAttribute("id", t.ln), 10855 t.cl && r.setAttribute("class", t.cl),
10856 t.bm && (r.style["mix-blend-mode"] = getBlendMode(t.bm)), 10857 this.stylesList.push(s), 10858 this.addToAnimatedContents(t, i), 10859 i 10860 ); 10861 }), 10862 (SVGShapeElement.prototype.createGroupElement = function (t) { 10863 var e = new ShapeGroupData(); 10864 return ( 10865 t.ln && e.gr.setAttribute("id", t.ln), 10866 t.cl && e.gr.setAttribute("class", t.cl), 10867 t.bm && (e.gr.style["mix-blend-mode"] = getBlendMode(t.bm)), 10868 e 10869 ); 10870 }), 10871 (SVGShapeElement.prototype.createTransformElement = function ( 10872 t, 10873 e 10874 ) { 10875 var i = TransformPropertyFactory.getTransformProperty( 10876 this, 10877 t, 10878 this 10879 ), 10880 s = new SVGTransformData(i, i.o, e); 10881 return this.addToAnimatedContents(t, s), s; 10882 }), 10883 (SVGShapeElement.prototype.createShapeElement = function (t, e, i) { 10884 var s = 4; 10885 "rc" === t.ty 10886 ? (s = 5) 10887 : "el" === t.ty 10888 ? (s = 6) 10889 : "sr" === t.ty && (s = 7); 10890 var r = new SVGShapeData( 10891 e, 10892 i, 10893 ShapePropertyFactory.getShapeProp(this, t, s, this) 10894 ); 10895 return ( 10896 this.shapes.push(r), 10897 this.addShapeToModifiers(r), 10898 this.addToAnimatedContents(t, r), 10899 r 10900 ); 10901 }), 10902 (SVGShapeElement.prototype.addToAnimatedContents = function (t, e) { 10903 for (var i = 0, s = this.animatedContents.length; i < s; ) { 10904 if (this.animatedContents[i].element === e) return; 10905 i += 1; 10906 } 10907 this.animatedContents.push({ 10908 fn: SVGElementsRenderer.createRenderFunction(t), 10909 element: e, 10910 data: t, 10911 }); 10912 }), 10913 (SVGShapeElement.prototype.setElementStyles = function (t) { 10914 var e, 10915 i = t.styles, 10916 s = this.stylesList.length; 10917 for (e = 0; e < s; e += 1) 10918 -1 !== i.indexOf(this.stylesList[e]) || 10919 this.stylesList[e].closed || 10920 i.push(this.stylesList[e]); 10921 }), 10922 (SVGShapeElement.prototype.reloadShapes = function () { 10923 this._isFirstFrame = !0; 10924 var t, 10925 e = this.itemsData.length; 10926 for (t = 0; t < e; t += 1) 10927 this.prevViewData[t] = this.itemsData[t]; 10928 for ( 10929 this.searchShapes( 10930 this.shapesData, 10931 this.itemsData, 10932 this.prevViewData, 10933 this.layerElement, 10934 0, 10935 [], 10936 !0 10937 ), 10938 this.filterUniqueShapes(), 10939 e = this.dynamicProperties.length, 10940 t = 0; 10941 t < e; 10942 t += 1 10943 ) 10944 this.dynamicProperties[t].getValue(); 10945 this.renderModifiers(); 10946 }), 10947 (SVGShapeElement.prototype.searchShapes = function ( 10948 t, 10949 e, 10950 i, 10951 s, 10952 r, 10953 n, 10954 a 10955 ) { 10956 var o, 10957 h, 10958 l, 10959 p, 10960 f, 10961 c, 10962 u = [].concat(n), 10963 m = t.length - 1, 10964 d = [], 10965 g = []; 10966 for (o = m; o >= 0; o -= 1) { 10967 if ( 10968 ((c = this.searchProcessedElement(t[o])) 10969 ? (e[o] = i[c - 1]) 10970 : (t[o]._render = a), 10971 "fl" === t[o].ty || 10972 "st" === t[o].ty || 10973 "gf" === t[o].ty || 10974 "gs" === t[o].ty || 10975 "no" === t[o].ty) 10976 ) 10977 c 10978 ? (e[o].style.closed = t[o].hd) 10979 : (e[o] = this.createStyleElement(t[o], r)), 10980 t[o]._render && 10981 e[o].style.pElem.parentNode !== s && 10982 s.appendChild(e[o].style.pElem), 10983 d.push(e[o].style); 10984 else if ("gr" === t[o].ty) { 10985 if (c)
10986 for (l = e[o].it.length, h = 0; h < l; h += 1) 10987 e[o].prevViewData[h] = e[o].it[h]; 10988 else e[o] = this.createGroupElement(t[o]); 10989 this.searchShapes( 10990 t[o].it, 10991 e[o].it, 10992 e[o].prevViewData, 10993 e[o].gr, 10994 r + 1, 10995 u, 10996 a 10997 ), 10998 t[o]._render && 10999 e[o].gr.parentNode !== s && 11000 s.appendChild(e[o].gr); 11001 } else 11002 "tr" === t[o].ty 11003 ? (c || (e[o] = this.createTransformElement(t[o], s)), 11004 (p = e[o].transform), 11005 u.push(p)) 11006 : "sh" === t[o].ty || 11007 "rc" === t[o].ty || 11008 "el" === t[o].ty || 11009 "sr" === t[o].ty 11010 ? (c || (e[o] = this.createShapeElement(t[o], u, r)), 11011 this.setElementStyles(e[o])) 11012 : "tm" === t[o].ty || 11013 "rd" === t[o].ty || 11014 "ms" === t[o].ty || 11015 "pb" === t[o].ty || 11016 "zz" === t[o].ty || 11017 "op" === t[o].ty 11018 ? (c 11019 ? ((f = e[o]).closed = !1) 11020 : ((f = ShapeModifiers.getModifier(t[o].ty)).init( 11021 this, 11022 t[o] 11023 ), 11024 (e[o] = f), 11025 this.shapeModifiers.push(f)), 11026 g.push(f)) 11027 : "rp" === t[o].ty && 11028 (c 11029 ? ((f = e[o]).closed = !0) 11030 : ((f = ShapeModifiers.getModifier(t[o].ty)), 11031 (e[o] = f), 11032 f.init(this, t, o, e), 11033 this.shapeModifiers.push(f), 11034 (a = !1)), 11035 g.push(f)); 11036 this.addProcessedElement(t[o], o + 1); 11037 } 11038 for (m = d.length, o = 0; o < m; o += 1) d[o].closed = !0; 11039 for (m = g.length, o = 0; o < m; o += 1) g[o].closed = !0; 11040 }), 11041 (SVGShapeElement.prototype.renderInnerContent = function () { 11042 this.renderModifiers(); 11043 var t, 11044 e = this.stylesList.length; 11045 for (t = 0; t < e; t += 1) this.stylesList[t].reset(); 11046 for (this.renderShape(), t = 0; t < e; t += 1) 11047 (this.stylesList[t]._mdf || this._isFirstFrame) && 11048 (this.stylesList[t].msElem && 11049 (this.stylesList[t].msElem.setAttribute( 11050 "d", 11051 this.stylesList[t].d 11052 ), 11053 (this.stylesList[t].d = "M0 0" + this.stylesList[t].d)), 11054 this.stylesList[t].pElem.setAttribute( 11055 "d", 11056 this.stylesList[t].d || "M0 0" 11057 )); 11058 }), 11059 (SVGShapeElement.prototype.renderShape = function () { 11060 var t, 11061 e, 11062 i = this.animatedContents.length; 11063 for (t = 0; t < i; t += 1) 11064 (e = this.animatedContents[t]), 11065 (this._isFirstFrame || e.element._isAnimated) && 11066 !0 !== e.data && 11067 e.fn(e.data, e.element, this._isFirstFrame); 11068 }), 11069 (SVGShapeElement.prototype.destroy = function () { 11070 this.destroyBaseElement(), 11071 (this.shapesData = null), 11072 (this.itemsData = null); 11073 }), 11074 (LetterProps.prototype.update = function (t, e, i, s, r, n) { 11075 (this._mdf.o = !1), 11076 (this._mdf.sw = !1), 11077 (this._mdf.sc = !1), 11078 (this._mdf.fc = !1), 11079 (this._mdf.m = !1), 11080 (this._mdf.p = !1); 11081 var a = !1; 11082 return ( 11083 this.o !== t && ((this.o = t), (this._mdf.o = !0), (a = !0)), 11084 this.sw !== e && ((this.sw = e), (this._mdf.sw = !0), (a = !0)), 11085 this.sc !== i && ((this.sc = i), (this._mdf.sc = !0), (a = !0)), 11086 this.fc !== s && ((this.fc = s), (this._mdf.fc = !0), (a = !0)), 11087 this.m !== r && ((this.m = r), (this._mdf.m = !0), (a = !0)), 11088 n.length && 11089 (this.p[0] !== n[0] || 11090 this.p[1] !== n[1] || 11091 this.p[4] !== n[4] || 11092 this.p[5] !== n[5] || 11093 this.p[12] !== n[12] || 11094 this.p[13] !== n[13]) && 11095 ((this.p = n), (this._mdf.p = !0), (a = !0)), 11096 a 11097 ); 11098 }), 11099 (TextProperty.prototype.defaultBoxWidth = [0, 0]), 11100 (TextProperty.prototype.copyData = function (t, e) { 11101 for (var i in e) 11102 Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]); 11103 return t; 11104 }), 11105 (TextProperty.prototype.setCurrentData = function (t) { 11106 t.__complete || this.completeTextData(t), 11107 (this.currentData = t), 11108 (this.currentData.boxWidth = 11109 this.currentData.boxWidth || this.defaultBoxWidth), 11110 (this._mdf = !0); 11111 }), 11112 (TextProperty.prototype.searchProperty = function () { 11113 return this.searchKeyframes(); 11114 }), 11115 (TextProperty.prototype.searchKeyframes = function () { 11116 return ( 11117 (this.kf = this.data.d.k.length > 1), 11118 this.kf && this.addEffect(this.getKeyframeValue.bind(this)), 11119 this.kf 11120 ); 11121 }), 11122 (TextProperty.prototype.addEffect = function (t) { 11123 this.effectsSequence.push(t), this.elem.addDynamicProperty(this); 11124 }), 11125 (TextProperty.prototype.getValue = function (t) { 11126 if ( 11127 (this.elem.globalData.frameId !== this.frameId && 11128 this.effectsSequence.length) || 11129 t 11130 ) { 11131 this.currentData.t = this.data.d.k[this.keysIndex].s.t; 11132 var e = this.currentData, 11133 i = this.keysIndex; 11134 if (this.lock) this.setCurrentData(this.currentData); 11135 else { 11136 (this.lock = !0), (this._mdf = !1); 11137 var s, 11138 r = this.effectsSequence.length, 11139 n = t || this.data.d.k[this.keysIndex].s; 11140 for (s = 0; s < r; s += 1) 11141 n = 11142 i !== this.keysIndex 11143 ? this.effectsSequence[s](n, n.t) 11144 : this.effectsSequence[s](this.currentData, n.t); 11145 e !== n && this.setCurrentData(n), 11146 (this.v = this.currentData), 11147 (this.pv = this.v), 11148 (this.lock = !1), 11149 (this.frameId = this.elem.globalData.frameId); 11150 } 11151 } 11152 }), 11153 (TextProperty.prototype.getKeyframeValue = function () { 11154 for ( 11155 var t = this.data.d.k, 11156 e = this.elem.comp.renderedFrame, 11157 i = 0, 11158 s = t.length; 11159 i <= s - 1 && !(i === s - 1 || t[i + 1].t > e); 11160 11161 ) 11162 i += 1; 11163 return ( 11164 this.keysIndex !== i && (this.keysIndex = i), 11165 this.data.d.k[this.keysIndex].s 11166 ); 11167 }), 11168 (TextProperty.prototype.buildFinalText = function (t) { 11169 for ( 11170 var e, i, s = [], r = 0, n = t.length, a = !1, o = !1, h = ""; 11171 r < n; 11172 11173 ) 11174 (a = o), 11175 (o = !1), 11176 (e = t.charCodeAt(r)), 11177 (h = t.charAt(r)), 11178 FontManager.isCombinedCharacter(e) 11179 ? (a = !0) 11180 : e >= 55296 && e <= 56319 11181 ? FontManager.isRegionalFlag(t, r) 11182 ? (h = t.substr(r, 14)) 11183 : (i = t.charCodeAt(r + 1)) >= 56320 && 11184 i <= 57343 && 11185 (FontManager.isModifier(e, i) 11186 ? ((h = t.substr(r, 2)), (a = !0)) 11187 : (h = FontManager.isFlagEmoji(t.substr(r, 4)) 11188 ? t.substr(r, 4) 11189 : t.substr(r, 2))) 11190 : e > 56319 11191 ? ((i = t.charCodeAt(r + 1)), 11192 FontManager.isVariationSelector(e) && (a = !0)) 11193 : FontManager.isZeroWidthJoiner(e) && ((a = !0), (o = !0)), 11194 a ? ((s[s.length - 1] += h), (a = !1)) : s.push(h), 11195 (r += h.length); 11196 return s; 11197 }), 11198 (TextProperty.prototype.completeTextData = function (t) { 11199 t.__complete = !0; 11200 var e, 11201 i, 11202 s, 11203 r, 11204 n, 11205 a, 11206 o, 11207 h = this.elem.globalData.fontManager, 11208 l = this.data, 11209 p = [], 11210 f = 0, 11211 c = l.m.g, 11212 u = 0, 11213 m = 0, 11214 d = 0, 11215 g = [], 11216 v = 0, 11217 y = 0, 11218 b = h.getFontByName(t.f), 11219 x = 0, 11220 _ = getFontProperties(b); 11221 (t.fWeight = _.weight),
11222 (t.fStyle = _.style), 11223 (t.finalSize = t.s), 11224 (t.finalText = this.buildFinalText(t.t)), 11225 (i = t.finalText.length), 11226 (t.finalLineHeight = t.lh); 11227 var k, 11228 A = (t.tr / 1e3) * t.finalSize; 11229 if (t.sz) 11230 for (var C, P, w = !0, S = t.sz[0], D = t.sz[1]; w; ) { 11231 (C = 0), 11232 (v = 0), 11233 (i = (P = this.buildFinalText(t.t)).length), 11234 (A = (t.tr / 1e3) * t.finalSize); 11235 var T = -1; 11236 for (e = 0; e < i; e += 1) 11237 (k = P[e].charCodeAt(0)), 11238 (s = !1), 11239 " " === P[e] 11240 ? (T = e) 11241 : (13 !== k && 3 !== k) || 11242 ((v = 0), 11243 (s = !0), 11244 (C += t.finalLineHeight || 1.2 * t.finalSize)), 11245 h.chars 11246 ? ((o = h.getCharData(P[e], b.fStyle, b.fFamily)), 11247 (x = s ? 0 : (o.w * t.finalSize) / 100)) 11248 : (x = h.measureText(P[e], t.f, t.finalSize)), 11249 v + x > S && " " !== P[e] 11250 ? (-1 === T ? (i += 1) : (e = T), 11251 (C += t.finalLineHeight || 1.2 * t.finalSize), 11252 P.splice(e, +(T === e), "\r"), 11253 (T = -1), 11254 (v = 0)) 11255 : ((v += x), (v += A)); 11256 (C += (b.ascent * t.finalSize) / 100), 11257 this.canResize && 11258 t.finalSize > this.minimumFontSize && 11259 D < C 11260 ? ((t.finalSize -= 1), 11261 (t.finalLineHeight = (t.finalSize * t.lh) / t.s)) 11262 : ((t.finalText = P), (i = t.finalText.length), (w = !1)); 11263 } 11264 (v = -A), (x = 0); 11265 var E, 11266 M = 0; 11267 for (e = 0; e < i; e += 1) 11268 if ( 11269 ((s = !1), 11270 13 === (k = (E = t.finalText[e]).charCodeAt(0)) || 3 === k 11271 ? ((M = 0), 11272 g.push(v), 11273 (y = v > y ? v : y), 11274 (v = -2 * A), 11275 (r = ""), 11276 (s = !0), 11277 (d += 1)) 11278 : (r = E), 11279 h.chars 11280 ? ((o = h.getCharData( 11281 E, 11282 b.fStyle, 11283 h.getFontByName(t.f).fFamily 11284 )), 11285 (x = s ? 0 : (o.w * t.finalSize) / 100)) 11286 : (x = h.measureText(r, t.f, t.finalSize)), 11287 " " === E ? (M += x + A) : ((v += x + A + M), (M = 0)), 11288 p.push({ 11289 l: x, 11290 an: x, 11291 add: u, 11292 n: s, 11293 anIndexes: [], 11294 val: r, 11295 line: d, 11296 animatorJustifyOffset: 0, 11297 }), 11298 2 == c) 11299 ) { 11300 if (((u += x), "" === r || " " === r || e === i - 1)) { 11301 for (("" !== r && " " !== r) || (u -= x); m <= e; ) 11302 (p[m].an = u), (p[m].ind = f), (p[m].extra = x), (m += 1); 11303 (f += 1), (u = 0); 11304 } 11305 } else if (3 == c) { 11306 if (((u += x), "" === r || e === i - 1)) { 11307 for ("" === r && (u -= x); m <= e; ) 11308 (p[m].an = u), (p[m].ind = f), (p[m].extra = x), (m += 1); 11309 (u = 0), (f += 1); 11310 } 11311 } else (p[f].ind = f), (p[f].extra = 0), (f += 1); 11312 if (((t.l = p), (y = v > y ? v : y), g.push(v), t.sz)) 11313 (t.boxWidth = t.sz[0]), (t.justifyOffset = 0); 11314 else 11315 switch (((t.boxWidth = y), t.j)) { 11316 case 1: 11317 t.justifyOffset = -t.boxWidth; 11318 break; 11319 case 2: 11320 t.justifyOffset = -t.boxWidth / 2; 11321 break; 11322 default: 11323 t.justifyOffset = 0; 11324 } 11325 t.lineWidths = g; 11326 var F, 11327 I, 11328 L, 11329 O, 11330 B = l.a; 11331 a = B.length; 11332 var R = []; 11333 for (n = 0; n < a; n += 1) { 11334 for ( 11335 (F = B[n]).a.sc && (t.strokeColorAnim = !0), 11336 F.a.sw && (t.strokeWidthAnim = !0), 11337 (F.a.fc || F.a.fh || F.a.fs || F.a.fb) && 11338 (t.fillColorAnim = !0), 11339 O = 0, 11340 L = F.s.b, 11341 e = 0; 11342 e < i; 11343 e += 1 11344 ) 11345 ((I = p[e]).anIndexes[n] = O), 11346 ((1 == L && "" !== I.val) || 11347 (2 == L && "" !== I.val && " " !== I.val) || 11348 (3 == L && (I.n || " " == I.val || e == i - 1)) || 11349 (4 == L && (I.n || e == i - 1))) && 11350 (1 === F.s.rn && R.push(O), (O += 1)); 11351 l.a[n].s.totalChars = O; 11352 var z, 11353 j = -1; 11354 if (1 === F.s.rn) 11355 for (e = 0; e < i; e += 1) 11356 j != (I = p[e]).anIndexes[n] && 11357 ((j = I.anIndexes[n]), 11358 (z = R.splice( 11359 Math.floor(Math.random() * R.length), 11360 1 11361 )[0])), 11362 (I.anIndexes[n] = z); 11363 } 11364 (t.yOffset = t.finalLineHeight || 1.2 * t.finalSize), 11365 (t.ls = t.ls || 0), 11366 (t.ascent = (b.ascent * t.finalSize) / 100); 11367 }), 11368 (TextProperty.prototype.updateDocumentData = function (t, e) { 11369 e = void 0 === e ? this.keysIndex : e; 11370 var i = this.copyData({}, this.data.d.k[e].s); 11371 (i = this.copyData(i, t)), 11372 (this.data.d.k[e].s = i), 11373 this.recalculate(e), 11374 this.setCurrentData(i), 11375 this.elem.addDynamicProperty(this); 11376 }), 11377 (TextProperty.prototype.recalculate = function (t) { 11378 var e = this.data.d.k[t].s; 11379 (e.__complete = !1), 11380 (this.keysIndex = 0), 11381 (this._isFirstFrame = !0), 11382 this.getValue(e); 11383 }), 11384 (TextProperty.prototype.canResizeFont = function (t) { 11385 (this.canResize = t), 11386 this.recalculate(this.keysIndex), 11387 this.elem.addDynamicProperty(this); 11388 }), 11389 (TextProperty.prototype.setMinimumFontSize = function (t) { 11390 (this.minimumFontSize = Math.floor(t) || 1), 11391 this.recalculate(this.keysIndex), 11392 this.elem.addDynamicProperty(this); 11393 }); 11394 var TextSelectorProp = (function () { 11395 var t = Math.max, 11396 e = Math.min, 11397 i = Math.floor; 11398 function s(t, e) { 11399 (this._currentTextLength = -1), 11400 (this.k = !1), 11401 (this.data = e), 11402 (this.elem = t), 11403 (this.comp = t.comp), 11404 (this.finalS = 0), 11405 (this.finalE = 0), 11406 this.initDynamicPropertyContainer(t), 11407 (this.s = PropertyFactory.getProp( 11408 t, 11409 e.s || { k: 0 }, 11410 0, 11411 0, 11412 this 11413 )), 11414 (this.e = 11415 "e" in e 11416 ? PropertyFactory.getProp(t, e.e, 0, 0, this) 11417 : { v: 100 }), 11418 (this.o = PropertyFactory.getProp( 11419 t, 11420 e.o || { k: 0 }, 11421 0, 11422 0, 11423 this 11424 )), 11425 (this.xe = PropertyFactory.getProp( 11426 t, 11427 e.xe || { k: 0 }, 11428 0, 11429 0, 11430 this 11431 )), 11432 (this.ne = PropertyFactory.getProp( 11433 t, 11434 e.ne || { k: 0 }, 11435 0, 11436 0, 11437 this 11438 )), 11439 (this.sm = PropertyFactory.getProp( 11440 t, 11441 e.sm || { k: 100 }, 11442 0, 11443 0, 11444 this 11445 )), 11446 (this.a = PropertyFactory.getProp(t, e.a, 0, 0.01, this)), 11447 this.dynamicProperties.length || this.getValue(); 11448 } 11449 return ( 11450 (s.prototype = { 11451 getMult: function (s) { 11452 this._currentTextLength !== 11453 this.elem.textProperty.currentData.l.length && 11454 this.getValue(); 11455 var r = 0, 11456 n = 0, 11457 a = 1, 11458 o = 1; 11459 this.ne.v > 0 11460 ? (r = this.ne.v / 100) 11461 : (n = -this.ne.v / 100), 11462 this.xe.v > 0 11463 ? (a = 1 - this.xe.v / 100) 11464 : (o = 1 + this.xe.v / 100); 11465 var h = BezierFactory.getBezierEasing(r, n, a, o).get, 11466 l = 0, 11467 p = this.finalS, 11468 f = this.finalE, 11469 c = this.data.sh; 11470 if (2 === c) 11471 l = h( 11472 (l = 11473 f === p 11474 ? +(s >= f) 11475 : t(0, e(0.5 / (f - p) + (s - p) / (f - p), 1))) 11476 ); 11477 else if (3 === c) 11478 l = h( 11479 (l = 11480 f === p 11481 ? s >= f 11482 ? 0 11483 : 1 11484 : 1 - t(0, e(0.5 / (f - p) + (s - p) / (f - p), 1))) 11485 ); 11486 else if (4 === c) 11487 f === p 11488 ? (l = 0) 11489 : (l = t(0, e(0.5 / (f - p) + (s - p) / (f - p), 1))) < 11490 0.5 11491 ? (l *= 2) 11492 : (l = 1 - 2 * (l - 0.5)), 11493 (l = h(l)); 11494 else if (5 === c) { 11495 if (f === p) l = 0; 11496 else { 11497 var u = f - p, 11498 m = -u / 2 + (s = e(t(0, s + 0.5 - p), f - p)), 11499 d = u / 2; 11500 l = Math.sqrt(1 - (m * m) / (d * d)); 11501 } 11502 l = h(l); 11503 } else 11504 6 === c 11505 ? (l = h( 11506 (l = 11507 f === p 11508 ? 0 11509 : (1 + 11510 Math.cos( 11511 Math.PI + 11512 (2 * 11513 Math.PI * 11514 (s = e(t(0, s + 0.5 - p), f - p))) / 11515 (f - p) 11516 )) / 11517 2) 11518 )) 11519 : (s >= i(p) && 11520 (l = t( 11521 0, 11522 e(s - p < 0 ? e(f, 1) - (p - s) : f - s, 1) 11523 )), 11524 (l = h(l))); 11525 if (100 !== this.sm.v) { 11526 var g = 0.01 * this.sm.v; 11527 0 === g && (g = 1e-8); 11528 var v = 0.5 - 0.5 * g; 11529 l < v ? (l = 0) : (l = (l - v) / g) > 1 && (l = 1); 11530 } 11531 return l * this.a.v; 11532 }, 11533 getValue: function (t) { 11534 this.iterateDynamicProperties(), 11535 (this._mdf = t || this._mdf), 11536 (this._currentTextLength = 11537 this.elem.textProperty.currentData.l.length || 0), 11538 t && 11539 2 === this.data.r && 11540 (this.e.v = this._currentTextLength); 11541 var e = 2 === this.data.r ? 1 : 100 / this.data.totalChars, 11542 i = this.o.v / e, 11543 s = this.s.v / e + i, 11544 r = this.e.v / e + i; 11545 if (s > r) { 11546 var n = s; 11547 (s = r), (r = n); 11548 } 11549 (this.finalS = s), (this.finalE = r); 11550 }, 11551 }), 11552 extendPrototype([DynamicPropertyContainer], s), 11553 { 11554 getTextSelectorProp: function (t, e, i) { 11555 return new s(t, e, i); 11556 }, 11557 } 11558 ); 11559 })(); 11560 function TextAnimatorDataProperty(t, e, i) { 11561 var s = { propType: !1 },
11562 r = PropertyFactory.getProp, 11563 n = e.a; 11564 (this.a = { 11565 r: n.r ? r(t, n.r, 0, degToRads, i) : s, 11566 rx: n.rx ? r(t, n.rx, 0, degToRads, i) : s, 11567 ry: n.ry ? r(t, n.ry, 0, degToRads, i) : s, 11568 sk: n.sk ? r(t, n.sk, 0, degToRads, i) : s, 11569 sa: n.sa ? r(t, n.sa, 0, degToRads, i) : s, 11570 s: n.s ? r(t, n.s, 1, 0.01, i) : s, 11571 a: n.a ? r(t, n.a, 1, 0, i) : s, 11572 o: n.o ? r(t, n.o, 0, 0.01, i) : s, 11573 p: n.p ? r(t, n.p, 1, 0, i) : s, 11574 sw: n.sw ? r(t, n.sw, 0, 0, i) : s, 11575 sc: n.sc ? r(t, n.sc, 1, 0, i) : s, 11576 fc: n.fc ? r(t, n.fc, 1, 0, i) : s, 11577 fh: n.fh ? r(t, n.fh, 0, 0, i) : s, 11578 fs: n.fs ? r(t, n.fs, 0, 0.01, i) : s, 11579 fb: n.fb ? r(t, n.fb, 0, 0.01, i) : s, 11580 t: n.t ? r(t, n.t, 0, 0, i) : s, 11581 }), 11582 (this.s = TextSelectorProp.getTextSelectorProp(t, e.s, i)), 11583 (this.s.t = e.s.t); 11584 } 11585 function TextAnimatorProperty(t, e, i) { 11586 (this._isFirstFrame = !0), 11587 (this._hasMaskedPath = !1), 11588 (this._frameId = -1), 11589 (this._textData = t), 11590 (this._renderType = e), 11591 (this._elem = i), 11592 (this._animatorsData = createSizedArray(this._textData.a.length)), 11593 (this._pathData = {}), 11594 (this._moreOptions = { alignment: {} }), 11595 (this.renderedLetters = []), 11596 (this.lettersChangedFlag = !1), 11597 this.initDynamicPropertyContainer(i); 11598 } 11599 function ITextElement() {} 11600 (TextAnimatorProperty.prototype.searchProperties = function () { 11601 var t, 11602 e, 11603 i = this._textData.a.length, 11604 s = PropertyFactory.getProp; 11605 for (t = 0; t < i; t += 1) 11606 (e = this._textData.a[t]), 11607 (this._animatorsData[t] = new TextAnimatorDataProperty( 11608 this._elem, 11609 e, 11610 this 11611 )); 11612 this._textData.p && "m" in this._textData.p 11613 ? ((this._pathData = { 11614 a: s(this._elem, this._textData.p.a, 0, 0, this), 11615 f: s(this._elem, this._textData.p.f, 0, 0, this), 11616 l: s(this._elem, this._textData.p.l, 0, 0, this), 11617 r: s(this._elem, this._textData.p.r, 0, 0, this), 11618 p: s(this._elem, this._textData.p.p, 0, 0, this), 11619 m: this._elem.maskManager.getMaskProperty(this._textData.p.m), 11620 }), 11621 (this._hasMaskedPath = !0)) 11622 : (this._hasMaskedPath = !1), 11623 (this._moreOptions.alignment = s( 11624 this._elem, 11625 this._textData.m.a, 11626 1, 11627 0, 11628 this 11629 )); 11630 }), 11631 (TextAnimatorProperty.prototype.getMeasures = function (t, e) { 11632 if ( 11633 ((this.lettersChangedFlag = e), 11634 this._mdf || 11635 this._isFirstFrame || 11636 e || 11637 (this._hasMaskedPath && this._pathData.m._mdf)) 11638 ) { 11639 this._isFirstFrame = !1; 11640 var i, 11641 s, 11642 r, 11643 n, 11644 a, 11645 o, 11646 h, 11647 l, 11648 p, 11649 f, 11650 c, 11651 u, 11652 m, 11653 d, 11654 g, 11655 v, 11656 y, 11657 b, 11658 x, 11659 _ = this._moreOptions.alignment.v, 11660 k = this._animatorsData, 11661 A = this._textData, 11662 C = this.mHelper, 11663 P = this._renderType, 11664 w = this.renderedLetters.length, 11665 S = t.l; 11666 if (this._hasMaskedPath) { 11667 if ( 11668 ((x = this._pathData.m), 11669 !this._pathData.n || this._pathData._mdf) 11670 ) { 11671 var D, 11672 T = x.v; 11673 for ( 11674 this._pathData.r.v && (T = T.reverse()), 11675 a = { tLength: 0, segments: [] }, 11676 n = T._length - 1, 11677 v = 0, 11678 r = 0; 11679 r < n; 11680 r += 1 11681 ) 11682 (D = bez.buildBezierData( 11683 T.v[r], 11684 T.v[r + 1], 11685 [T.o[r][0] - T.v[r][0], T.o[r][1] - T.v[r][1]], 11686 [ 11687 T.i[r + 1][0] - T.v[r + 1][0], 11688 T.i[r + 1][1] - T.v[r + 1][1], 11689 ] 11690 )), 11691 (a.tLength += D.segmentLength), 11692 a.segments.push(D), 11693 (v += D.segmentLength); 11694 (r = n), 11695 x.v.c && 11696 ((D = bez.buildBezierData( 11697 T.v[r], 11698 T.v[0], 11699 [T.o[r][0] - T.v[r][0], T.o[r][1] - T.v[r][1]], 11700 [T.i[0][0] - T.v[0][0], T.i[0][1] - T.v[0][1]] 11701 )), 11702 (a.tLength += D.segmentLength), 11703 a.segments.push(D), 11704 (v += D.segmentLength)), 11705 (this._pathData.pi = a); 11706 } 11707 if ( 11708 ((a = this._pathData.pi), 11709 (o = this._pathData.f.v), 11710 (c = 0), 11711 (f = 1), 11712 (l = 0), 11713 (p = !0), 11714 (d = a.segments), 11715 o < 0 && x.v.c) 11716 ) 11717 for ( 11718 a.tLength < Math.abs(o) && (o = -Math.abs(o) % a.tLength), 11719 f = (m = d[(c = d.length - 1)].points).length - 1; 11720 o < 0; 11721 11722 ) 11723 (o += m[f].partialLength), 11724 (f -= 1) < 0 && 11725 (f = (m = d[(c -= 1)].points).length - 1); 11726 (u = (m = d[c].points)[f - 1]), 11727 (g = (h = m[f]).partialLength); 11728 } 11729 (n = S.length), (i = 0), (s = 0); 11730 var E, 11731 M, 11732 F, 11733 I, 11734 L, 11735 O = 1.2 * t.finalSize * 0.714, 11736 B = !0; 11737 F = k.length; 11738 var R, 11739 z, 11740 j, 11741 V, 11742 N, 11743 G, 11744 q, 11745 W, 11746 Y, 11747 H, 11748 X, 11749 J, 11750 K = -1, 11751 U = o, 11752 Z = c, 11753 $ = f, 11754 Q = -1, 11755 tt = "", 11756 te = this.defaultPropsArray; 11757 if (2 === t.j || 1 === t.j) { 11758 var ti = 0, 11759 ts = 0, 11760 tr = 2 === t.j ? -0.5 : -1, 11761 tn = 0, 11762 ta = !0; 11763 for (r = 0; r < n; r += 1) 11764 if (S[r].n) { 11765 for (ti && (ti += ts); tn < r; ) 11766 (S[tn].animatorJustifyOffset = ti), (tn += 1); 11767 (ti = 0), (ta = !0); 11768 } else { 11769 for (M = 0; M < F; M += 1)
11770 (E = k[M].a).t.propType && 11771 (ta && 2 === t.j && (ts += E.t.v * tr), 11772 (L = k[M].s.getMult( 11773 S[r].anIndexes[M], 11774 A.a[M].s.totalChars 11775 )).length 11776 ? (ti += E.t.v * L[0] * tr) 11777 : (ti += E.t.v * L * tr)); 11778 ta = !1; 11779 } 11780 for (ti && (ti += ts); tn < r; ) 11781 (S[tn].animatorJustifyOffset = ti), (tn += 1); 11782 } 11783 for (r = 0; r < n; r += 1) { 11784 if ((C.reset(), (V = 1), S[r].n)) 11785 (i = 0), 11786 (s += t.yOffset), 11787 (s += +!!B), 11788 (o = U), 11789 (B = !1), 11790 this._hasMaskedPath && 11791 ((f = $), 11792 (u = (m = d[(c = Z)].points)[f - 1]), 11793 (g = (h = m[f]).partialLength), 11794 (l = 0)), 11795 (tt = ""), 11796 (X = ""), 11797 (Y = ""), 11798 (J = ""), 11799 (te = this.defaultPropsArray); 11800 else { 11801 if (this._hasMaskedPath) { 11802 if (Q !== S[r].line) { 11803 switch (t.j) { 11804 case 1: 11805 o += v - t.lineWidths[S[r].line]; 11806 break; 11807 case 2: 11808 o += (v - t.lineWidths[S[r].line]) / 2; 11809 } 11810 Q = S[r].line; 11811 } 11812 K !== S[r].ind && 11813 (S[K] && (o += S[K].extra), 11814 (o += S[r].an / 2), 11815 (K = S[r].ind)), 11816 (o += _[0] * S[r].an * 0.005); 11817 var to = 0; 11818 for (M = 0; M < F; M += 1) 11819 (E = k[M].a).p.propType && 11820 ((L = k[M].s.getMult( 11821 S[r].anIndexes[M], 11822 A.a[M].s.totalChars 11823 )).length 11824 ? (to += E.p.v[0] * L[0]) 11825 : (to += E.p.v[0] * L)), 11826 E.a.propType && 11827 ((L = k[M].s.getMult( 11828 S[r].anIndexes[M], 11829 A.a[M].s.totalChars 11830 )).length 11831 ? (to += E.a.v[0] * L[0]) 11832 : (to += E.a.v[0] * L)); 11833 for ( 11834 p = !0, 11835 this._pathData.a.v && 11836 (o = 11837 0.5 * S[0].an + 11838 ((v - 11839 this._pathData.f.v - 11840 0.5 * S[0].an - 11841 0.5 * S[S.length - 1].an) * 11842 K) / 11843 (n - 1) + 11844 this._pathData.f.v); 11845 p; 11846 11847 ) 11848 l + g >= o + to || !m 11849 ? ((y = (o + to - l) / h.partialLength), 11850 (z = u.point[0] + (h.point[0] - u.point[0]) * y), 11851 (j = u.point[1] + (h.point[1] - u.point[1]) * y), 11852 C.translate( 11853 -_[0] * S[r].an * 0.005, 11854 -_[1] * O * 0.01 11855 ), 11856 (p = !1)) 11857 : m && 11858 ((l += h.partialLength), 11859 (f += 1) >= m.length && 11860 ((f = 0), 11861 d[(c += 1)] 11862 ? (m = d[c].points) 11863 : x.v.c 11864 ? ((f = 0), (m = d[(c = 0)].points)) 11865 : ((l -= h.partialLength), (m = null))), 11866 m && ((u = h), (g = (h = m[f]).partialLength))); 11867 (R = S[r].an / 2 - S[r].add), C.translate(-R, 0, 0); 11868 } else 11869 (R = S[r].an / 2 - S[r].add), 11870 C.translate(-R, 0, 0), 11871 C.translate( 11872 -_[0] * S[r].an * 0.005, 11873 -_[1] * O * 0.01, 11874 0 11875 ); 11876 for (M = 0; M < F; M += 1)
11877 (E = k[M].a).t.propType && 11878 ((L = k[M].s.getMult( 11879 S[r].anIndexes[M], 11880 A.a[M].s.totalChars 11881 )), 11882 (0 === i && 0 === t.j) || 11883 (this._hasMaskedPath 11884 ? L.length 11885 ? (o += E.t.v * L[0]) 11886 : (o += E.t.v * L) 11887 : L.length 11888 ? (i += E.t.v * L[0]) 11889 : (i += E.t.v * L))); 11890 for ( 11891 t.strokeWidthAnim && (G = t.sw || 0), 11892 t.strokeColorAnim && 11893 (N = t.sc ? [t.sc[0], t.sc[1], t.sc[2]] : [0, 0, 0]), 11894 t.fillColorAnim && 11895 t.fc && 11896 (q = [t.fc[0], t.fc[1], t.fc[2]]), 11897 M = 0; 11898 M < F; 11899 M += 1 11900 ) 11901 (E = k[M].a).a.propType && 11902 ((L = k[M].s.getMult( 11903 S[r].anIndexes[M], 11904 A.a[M].s.totalChars 11905 )).length 11906 ? C.translate( 11907 -E.a.v[0] * L[0], 11908 -E.a.v[1] * L[1], 11909 E.a.v[2] * L[2] 11910 ) 11911 : C.translate( 11912 -E.a.v[0] * L, 11913 -E.a.v[1] * L, 11914 E.a.v[2] * L 11915 )); 11916 for (M = 0; M < F; M += 1) 11917 (E = k[M].a).s.propType && 11918 ((L = k[M].s.getMult( 11919 S[r].anIndexes[M], 11920 A.a[M].s.totalChars 11921 )).length 11922 ? C.scale( 11923 1 + (E.s.v[0] - 1) * L[0], 11924 1 + (E.s.v[1] - 1) * L[1], 11925 1 11926 ) 11927 : C.scale( 11928 1 + (E.s.v[0] - 1) * L, 11929 1 + (E.s.v[1] - 1) * L, 11930 1 11931 )); 11932 for (M = 0; M < F; M += 1) { 11933 if ( 11934 ((E = k[M].a), 11935 (L = k[M].s.getMult( 11936 S[r].anIndexes[M], 11937 A.a[M].s.totalChars 11938 )), 11939 E.sk.propType && 11940 (L.length 11941 ? C.skewFromAxis(-E.sk.v * L[0], E.sa.v * L[1]) 11942 : C.skewFromAxis(-E.sk.v * L, E.sa.v * L)), 11943 E.r.propType && 11944 (L.length 11945 ? C.rotateZ(-E.r.v * L[2]) 11946 : C.rotateZ(-E.r.v * L)), 11947 E.ry.propType && 11948 (L.length 11949 ? C.rotateY(E.ry.v * L[1]) 11950 : C.rotateY(E.ry.v * L)), 11951 E.rx.propType && 11952 (L.length 11953 ? C.rotateX(E.rx.v * L[0]) 11954 : C.rotateX(E.rx.v * L)), 11955 E.o.propType && 11956 (L.length 11957 ? (V += (E.o.v * L[0] - V) * L[0]) 11958 : (V += (E.o.v * L - V) * L)), 11959 t.strokeWidthAnim && 11960 E.sw.propType && 11961 (L.length ? (G += E.sw.v * L[0]) : (G += E.sw.v * L)), 11962 t.strokeColorAnim && E.sc.propType) 11963 ) 11964 for (W = 0; W < 3; W += 1) 11965 L.length
11966 ? (N[W] += (E.sc.v[W] - N[W]) * L[0]) 11967 : (N[W] += (E.sc.v[W] - N[W]) * L); 11968 if (t.fillColorAnim && t.fc) { 11969 if (E.fc.propType) 11970 for (W = 0; W < 3; W += 1) 11971 L.length 11972 ? (q[W] += (E.fc.v[W] - q[W]) * L[0]) 11973 : (q[W] += (E.fc.v[W] - q[W]) * L); 11974 E.fh.propType && 11975 (q = L.length 11976 ? addHueToRGB(q, E.fh.v * L[0]) 11977 : addHueToRGB(q, E.fh.v * L)), 11978 E.fs.propType && 11979 (q = L.length 11980 ? addSaturationToRGB(q, E.fs.v * L[0]) 11981 : addSaturationToRGB(q, E.fs.v * L)), 11982 E.fb.propType && 11983 (q = L.length 11984 ? addBrightnessToRGB(q, E.fb.v * L[0]) 11985 : addBrightnessToRGB(q, E.fb.v * L)); 11986 } 11987 } 11988 for (M = 0; M < F; M += 1) 11989 (E = k[M].a).p.propType && 11990 ((L = k[M].s.getMult( 11991 S[r].anIndexes[M], 11992 A.a[M].s.totalChars 11993 )), 11994 this._hasMaskedPath 11995 ? L.length 11996 ? C.translate(0, E.p.v[1] * L[0], -E.p.v[2] * L[1]) 11997 : C.translate(0, E.p.v[1] * L, -E.p.v[2] * L) 11998 : L.length 11999 ? C.translate( 12000 E.p.v[0] * L[0], 12001 E.p.v[1] * L[1], 12002 -E.p.v[2] * L[2] 12003 ) 12004 : C.translate( 12005 E.p.v[0] * L, 12006 E.p.v[1] * L, 12007 -E.p.v[2] * L 12008 )); 12009 if ( 12010 (t.strokeWidthAnim && (Y = G < 0 ? 0 : G), 12011 t.strokeColorAnim && 12012 (H = 12013 "rgb(" + 12014 Math.round(255 * N[0]) + 12015 "," + 12016 Math.round(255 * N[1]) + 12017 "," + 12018 Math.round(255 * N[2]) + 12019 ")"), 12020 t.fillColorAnim && 12021 t.fc && 12022 (X = 12023 "rgb(" + 12024 Math.round(255 * q[0]) + 12025 "," + 12026 Math.round(255 * q[1]) + 12027 "," + 12028 Math.round(255 * q[2]) + 12029 ")"), 12030 this._hasMaskedPath) 12031 ) { 12032 if ( 12033 (C.translate(0, -t.ls), 12034 C.translate(0, _[1] * O * 0.01 + s, 0), 12035 this._pathData.p.v) 12036 ) { 12037 var th = 12038 (180 * 12039 Math.atan( 12040 (b = 12041 (h.point[1] - u.point[1]) / 12042 (h.point[0] - u.point[0])) 12043 )) / 12044 Math.PI; 12045 h.point[0] < u.point[0] && (th += 180), 12046 C.rotate((-th * Math.PI) / 180); 12047 } 12048 C.translate(z, j, 0), 12049 (o -= _[0] * S[r].an * 0.005), 12050 S[r + 1] && 12051 K !== S[r + 1].ind && 12052 ((o += S[r].an / 2), 12053 (o += 0.001 * t.tr * t.finalSize)); 12054 } else { 12055 switch ( 12056 (C.translate(i, s, 0), 12057 t.ps && C.translate(t.ps[0], t.ps[1] + t.ascent, 0), 12058 t.j) 12059 ) { 12060 case 1: 12061 C.translate( 12062 S[r].animatorJustifyOffset + 12063 t.justifyOffset + 12064 (t.boxWidth - t.lineWidths[S[r].line]), 12065 0, 12066 0 12067 ); 12068 break; 12069 case 2: 12070 C.translate( 12071 S[r].animatorJustifyOffset + 12072 t.justifyOffset + 12073 (t.boxWidth - t.lineWidths[S[r].line]) / 2, 12074 0, 12075 0 12076 ); 12077 } 12078 C.translate(0, -t.ls), 12079 C.translate(R, 0, 0), 12080 C.translate(_[0] * S[r].an * 0.005, _[1] * O * 0.01, 0), 12081 (i += S[r].l + 0.001 * t.tr * t.finalSize); 12082 } 12083 "html" === P 12084 ? (tt = C.toCSS()) 12085 : "svg" === P 12086 ? (tt = C.to2dCSS()) 12087 : (te = [ 12088 C.props[0], 12089 C.props[1], 12090 C.props[2], 12091 C.props[3], 12092 C.props[4], 12093 C.props[5], 12094 C.props[6], 12095 C.props[7], 12096 C.props[8], 12097 C.props[9], 12098 C.props[10], 12099 C.props[11], 12100 C.props[12], 12101 C.props[13], 12102 C.props[14], 12103 C.props[15], 12104 ]), 12105 (J = V); 12106 } 12107 w <= r 12108 ? ((I = new LetterProps(J, Y, H, X, tt, te)), 12109 this.renderedLetters.push(I), 12110 (w += 1), 12111 (this.lettersChangedFlag = !0)) 12112 : ((I = this.renderedLetters[r]), 12113 (this.lettersChangedFlag = 12114 I.update(J, Y, H, X, tt, te) || 12115 this.lettersChangedFlag)); 12116 } 12117 } 12118 }), 12119 (TextAnimatorProperty.prototype.getValue = function () { 12120 this._elem.globalData.frameId !== this._frameId && 12121 ((this._frameId = this._elem.globalData.frameId), 12122 this.iterateDynamicProperties()); 12123 }), 12124 (TextAnimatorProperty.prototype.mHelper = new Matrix()), 12125 (TextAnimatorProperty.prototype.defaultPropsArray = []), 12126 extendPrototype([DynamicPropertyContainer], TextAnimatorProperty), 12127 (ITextElement.prototype.initElement = function (t, e, i) { 12128 (this.lettersChangedFlag = !0), 12129 this.initFrame(), 12130 this.initBaseData(t, e, i), 12131 (this.textProperty = new TextProperty( 12132 this, 12133 t.t, 12134 this.dynamicProperties 12135 )), 12136 (this.textAnimator = new TextAnimatorProperty( 12137 t.t, 12138 this.renderType, 12139 this 12140 )), 12141 this.initTransform(t, e, i), 12142 this.initHierarchy(), 12143 this.initRenderable(), 12144 this.initRendererElement(), 12145 this.createContainerElements(), 12146 this.createRenderableComponents(), 12147 this.createContent(), 12148 this.hide(), 12149 this.textAnimator.searchProperties(this.dynamicProperties); 12150 }), 12151 (ITextElement.prototype.prepareFrame = function (t) { 12152 (this._mdf = !1), 12153 this.prepareRenderableFrame(t), 12154 this.prepareProperties(t, this.isInRange); 12155 }), 12156 (ITextElement.prototype.createPathShape = function (t, e) { 12157 var i, 12158 s, 12159 r = e.length, 12160 n = ""; 12161 for (i = 0; i < r; i += 1) 12162 "sh" === e[i].ty && 12163 (n += buildShapeString((s = e[i].ks.k), s.i.length, !0, t)); 12164 return n; 12165 }), 12166 (ITextElement.prototype.updateDocumentData = function (t, e) { 12167 this.textProperty.updateDocumentData(t, e); 12168 }), 12169 (ITextElement.prototype.canResizeFont = function (t) { 12170 this.textProperty.canResizeFont(t); 12171 }), 12172 (ITextElement.prototype.setMinimumFontSize = function (t) { 12173 this.textProperty.setMinimumFontSize(t); 12174 }), 12175 (ITextElement.prototype.applyTextPropertiesToMatrix = function ( 12176 t, 12177 e, 12178 i, 12179 s, 12180 r 12181 ) { 12182 switch ( 12183 (t.ps && e.translate(t.ps[0], t.ps[1] + t.ascent, 0), 12184 e.translate(0, -t.ls, 0), 12185 t.j) 12186 ) { 12187 case 1: 12188 e.translate( 12189 t.justifyOffset + (t.boxWidth - t.lineWidths[i]), 12190 0, 12191 0 12192 ); 12193 break; 12194 case 2: 12195 e.translate( 12196 t.justifyOffset + (t.boxWidth - t.lineWidths[i]) / 2, 12197 0, 12198 0 12199 ); 12200 } 12201 e.translate(s, r, 0); 12202 }), 12203 (ITextElement.prototype.buildColor = function (t) { 12204 return ( 12205 "rgb(" + 12206 Math.round(255 * t[0]) + 12207 "," + 12208 Math.round(255 * t[1]) + 12209 "," + 12210 Math.round(255 * t[2]) + 12211 ")" 12212 ); 12213 }), 12214 (ITextElement.prototype.emptyProp = new LetterProps()), 12215 (ITextElement.prototype.destroy = function () {}), 12216 (ITextElement.prototype.validateText = function () { 12217 (this.textProperty._mdf || this.textProperty._isFirstFrame) && 12218 (this.buildNewText(), 12219 (this.textProperty._isFirstFrame = !1), 12220 (this.textProperty._mdf = !1)); 12221 });
12222 var emptyShapeData = { shapes: [] }; 12223 function SVGTextLottieElement(t, e, i) { 12224 (this.textSpans = []), 12225 (this.renderType = "svg"), 12226 this.initElement(t, e, i); 12227 } 12228 function ISolidElement(t, e, i) { 12229 this.initElement(t, e, i); 12230 } 12231 function NullElement(t, e, i) { 12232 this.initFrame(), 12233 this.initBaseData(t, e, i), 12234 this.initFrame(), 12235 this.initTransform(t, e, i), 12236 this.initHierarchy(); 12237 } 12238 function SVGRendererBase() {} 12239 function ICompElement() {} 12240 function SVGCompElement(t, e, i) { 12241 (this.layers = t.layers), 12242 (this.supports3d = !0), 12243 (this.completeLayers = !1), 12244 (this.pendingElements = []), 12245 (this.elements = this.layers 12246 ? createSizedArray(this.layers.length) 12247 : []), 12248 this.initElement(t, e, i), 12249 (this.tm = t.tm 12250 ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) 12251 : { _placeholder: !0 }); 12252 } 12253 function SVGRenderer(t, e) { 12254 (this.animationItem = t), 12255 (this.layers = null), 12256 (this.renderedFrame = -1), 12257 (this.svgElement = createNS("svg")); 12258 var i = ""; 12259 if (e && e.title) { 12260 var s = createNS("title"), 12261 r = createElementID(); 12262 s.setAttribute("id", r), 12263 (s.textContent = e.title), 12264 this.svgElement.appendChild(s), 12265 (i += r); 12266 } 12267 if (e && e.description) { 12268 var n = createNS("desc"), 12269 a = createElementID(); 12270 n.setAttribute("id", a), 12271 (n.textContent = e.description), 12272 this.svgElement.appendChild(n), 12273 (i += " " + a); 12274 } 12275 i && this.svgElement.setAttribute("aria-labelledby", i); 12276 var o = createNS("defs"); 12277 this.svgElement.appendChild(o); 12278 var h = createNS("g"); 12279 this.svgElement.appendChild(h), 12280 (this.layerElement = h), 12281 (this.renderConfig = { 12282 preserveAspectRatio: 12283 (e && e.preserveAspectRatio) || "xMidYMid meet", 12284 imagePreserveAspectRatio: 12285 (e && e.imagePreserveAspectRatio) || "xMidYMid slice", 12286 contentVisibility: (e && e.contentVisibility) || "visible", 12287 progressiveLoad: (e && e.progressiveLoad) || !1, 12288 hideOnTransparent: !(e && !1 === e.hideOnTransparent),
12289 viewBoxOnly: (e && e.viewBoxOnly) || !1, 12290 viewBoxSize: (e && e.viewBoxSize) || !1, 12291 className: (e && e.className) || "", 12292 id: (e && e.id) || "", 12293 focusable: e && e.focusable, 12294 filterSize: { 12295 width: (e && e.filterSize && e.filterSize.width) || "100%", 12296 height: (e && e.filterSize && e.filterSize.height) || "100%", 12297 x: (e && e.filterSize && e.filterSize.x) || "0%", 12298 y: (e && e.filterSize && e.filterSize.y) || "0%", 12299 }, 12300 width: e && e.width, 12301 height: e && e.height, 12302 runExpressions: 12303 !e || void 0 === e.runExpressions || e.runExpressions, 12304 }), 12305 (this.globalData = { 12306 _mdf: !1, 12307 frameNum: -1, 12308 defs: o, 12309 renderConfig: this.renderConfig, 12310 }), 12311 (this.elements = []), 12312 (this.pendingElements = []), 12313 (this.destroyed = !1), 12314 (this.rendererType = "svg"); 12315 } 12316 function ShapeTransformManager() { 12317 (this.sequences = {}), 12318 (this.sequenceList = []), 12319 (this.transform_key_count = 0); 12320 } 12321 extendPrototype( 12322 [ 12323 BaseElement, 12324 TransformElement, 12325 SVGBaseElement, 12326 HierarchyElement, 12327 FrameElement, 12328 RenderableDOMElement, 12329 ITextElement, 12330 ], 12331 SVGTextLottieElement 12332 ), 12333 (SVGTextLottieElement.prototype.createContent = function () { 12334 this.data.singleShape && 12335 !this.globalData.fontManager.chars && 12336 (this.textContainer = createNS("text")); 12337 }), 12338 (SVGTextLottieElement.prototype.buildTextContents = function (t) { 12339 for (var e = 0, i = t.length, s = [], r = ""; e < i; ) 12340 "\r" === t[e] || "\x03" === t[e] 12341 ? (s.push(r), (r = "")) 12342 : (r += t[e]), 12343 (e += 1); 12344 return s.push(r), s; 12345 }), 12346 (SVGTextLottieElement.prototype.buildShapeData = function (t, e) { 12347 if (t.shapes && t.shapes.length) { 12348 var i = t.shapes[0]; 12349 if (i.it) { 12350 var s = i.it[i.it.length - 1]; 12351 s.s && ((s.s.k[0] = e), (s.s.k[1] = e)); 12352 } 12353 } 12354 return t; 12355 }), 12356 (SVGTextLottieElement.prototype.buildNewText = function () { 12357 this.addDynamicProperty(this); 12358 var t = this.textProperty.currentData; 12359 (this.renderedLetters = createSizedArray(t ? t.l.length : 0)), 12360 t.fc 12361 ? this.layerElement.setAttribute( 12362 "fill", 12363 this.buildColor(t.fc) 12364 ) 12365 : this.layerElement.setAttribute("fill", "rgba(0,0,0,0)"), 12366 t.sc && 12367 (this.layerElement.setAttribute( 12368 "stroke", 12369 this.buildColor(t.sc) 12370 ), 12371 this.layerElement.setAttribute("stroke-width", t.sw)), 12372 this.layerElement.setAttribute("font-size", t.finalSize); 12373 var e = this.globalData.fontManager.getFontByName(t.f); 12374 if (e.fClass) this.layerElement.setAttribute("class", e.fClass); 12375 else { 12376 this.layerElement.setAttribute("font-family", e.fFamily); 12377 var i = t.fWeight, 12378 s = t.fStyle; 12379 this.layerElement.setAttribute("font-style", s), 12380 this.layerElement.setAttribute("font-weight", i); 12381 } 12382 this.layerElement.setAttribute("aria-label", t.t); 12383 var r, 12384 n, 12385 a, 12386 o = t.l || [], 12387 h = !!this.globalData.fontManager.chars; 12388 n = o.length; 12389 var l = this.mHelper, 12390 p = this.data.singleShape, 12391 f = 0, 12392 c = 0, 12393 u = !0, 12394 m = 0.001 * t.tr * t.finalSize; 12395 if (!p || h || t.sz) { 12396 var d, 12397 g = this.textSpans.length; 12398 for (r = 0; r < n; r += 1) { 12399 if ( 12400 (this.textSpans[r] || 12401 (this.textSpans[r] = { 12402 span: null, 12403 childSpan: null, 12404 glyph: null, 12405 }), 12406 !h || !p || 0 === r) 12407 ) { 12408 if ( 12409 ((a = 12410 g > r 12411 ? this.textSpans[r].span 12412 : createNS(h ? "g" : "text")), 12413 g <= r) 12414 ) { 12415 if ( 12416 (a.setAttribute("stroke-linecap", "butt"), 12417 a.setAttribute("stroke-linejoin", "round"), 12418 a.setAttribute("stroke-miterlimit", "4"), 12419 (this.textSpans[r].span = a), 12420 h) 12421 ) { 12422 var v, 12423 y = createNS("g"); 12424 a.appendChild(y), (this.textSpans[r].childSpan = y); 12425 } 12426 (this.textSpans[r].span = a), 12427 this.layerElement.appendChild(a); 12428 } 12429 a.style.display = "inherit"; 12430 } 12431 if ( 12432 (l.reset(), 12433 p && 12434 (o[r].n && 12435 ((f = -m), (c += t.yOffset), (c += +!!u), (u = !1)), 12436 this.applyTextPropertiesToMatrix(t, l, o[r].line, f, c),
12437 (f += o[r].l || 0), 12438 (f += m)), 12439 h) 12440 ) { 12441 if ( 12442 1 === 12443 (d = this.globalData.fontManager.getCharData( 12444 t.finalText[r], 12445 e.fStyle, 12446 this.globalData.fontManager.getFontByName(t.f).fFamily 12447 )).t 12448 ) 12449 v = new SVGCompElement(d.data, this.globalData, this); 12450 else { 12451 var b = emptyShapeData; 12452 d.data && 12453 d.data.shapes && 12454 (b = this.buildShapeData(d.data, t.finalSize)), 12455 (v = new SVGShapeElement(b, this.globalData, this)); 12456 } 12457 if (this.textSpans[r].glyph) { 12458 var x = this.textSpans[r].glyph; 12459 this.textSpans[r].childSpan.removeChild(x.layerElement), 12460 x.destroy(); 12461 } 12462 (this.textSpans[r].glyph = v), 12463 (v._debug = !0), 12464 v.prepareFrame(0), 12465 v.renderFrame(), 12466 this.textSpans[r].childSpan.appendChild(v.layerElement), 12467 1 === d.t && 12468 this.textSpans[r].childSpan.setAttribute( 12469 "transform", 12470 "scale(" + 12471 t.finalSize / 100 + 12472 "," + 12473 t.finalSize / 100 + 12474 ")" 12475 ); 12476 } else 12477 p && 12478 a.setAttribute( 12479 "transform", 12480 "translate(" + l.props[12] + "," + l.props[13] + ")" 12481 ), 12482 (a.textContent = o[r].val), 12483 a.setAttributeNS( 12484 "http://www.w3.org/XML/1998/namespace", 12485 "xml:space", 12486 "preserve" 12487 ); 12488 } 12489 p && a && a.setAttribute("d", ""); 12490 } else { 12491 var _ = this.textContainer, 12492 k = "start"; 12493 switch (t.j) { 12494 case 1: 12495 k = "end"; 12496 break; 12497 case 2: 12498 k = "middle"; 12499 break; 12500 default: 12501 k = "start"; 12502 } 12503 _.setAttribute("text-anchor", k), 12504 _.setAttribute("letter-spacing", m); 12505 var A = this.buildTextContents(t.finalText); 12506 for ( 12507 n = A.length, c = t.ps ? t.ps[1] + t.ascent : 0, r = 0; 12508 r < n; 12509 r += 1 12510 ) 12511 ((a = 12512 this.textSpans[r].span || createNS("tspan")).textContent = 12513 A[r]), 12514 a.setAttribute("x", 0), 12515 a.setAttribute("y", c), 12516 (a.style.display = "inherit"), 12517 _.appendChild(a), 12518 this.textSpans[r] || 12519 (this.textSpans[r] = { span: null, glyph: null }), 12520 (this.textSpans[r].span = a), 12521 (c += t.finalLineHeight); 12522 this.layerElement.appendChild(_); 12523 } 12524 for (; r < this.textSpans.length; ) 12525 (this.textSpans[r].span.style.display = "none"), (r += 1); 12526 this._sizeChanged = !0; 12527 }), 12528 (SVGTextLottieElement.prototype.sourceRectAtTime = function () { 12529 if ( 12530 (this.prepareFrame(this.comp.renderedFrame - this.data.st), 12531 this.renderInnerContent(), 12532 this._sizeChanged) 12533 ) { 12534 this._sizeChanged = !1; 12535 var t = this.layerElement.getBBox(); 12536 this.bbox = { 12537 top: t.y, 12538 left: t.x, 12539 width: t.width, 12540 height: t.height, 12541 }; 12542 } 12543 return this.bbox; 12544 }), 12545 (SVGTextLottieElement.prototype.getValue = function () { 12546 var t, 12547 e, 12548 i = this.textSpans.length; 12549 for ( 12550 this.renderedFrame = this.comp.renderedFrame, t = 0; 12551 t < i; 12552 t += 1 12553 ) 12554 (e = this.textSpans[t].glyph) && 12555 (e.prepareFrame(this.comp.renderedFrame - this.data.st), 12556 e._mdf && (this._mdf = !0)); 12557 }), 12558 (SVGTextLottieElement.prototype.renderInnerContent = function () { 12559 if ( 12560 (this.validateText(), 12561 (!this.data.singleShape || this._mdf) && 12562 (this.textAnimator.getMeasures( 12563 this.textProperty.currentData, 12564 this.lettersChangedFlag 12565 ), 12566 this.lettersChangedFlag || 12567 this.textAnimator.lettersChangedFlag)) 12568 ) { 12569 this._sizeChanged = !0; 12570 var t, 12571 e, 12572 i, 12573 s, 12574 r, 12575 n = this.textAnimator.renderedLetters, 12576 a = this.textProperty.currentData.l; 12577 for (e = a.length, t = 0; t < e; t += 1) 12578 a[t].n || 12579 ((i = n[t]), 12580 (s = this.textSpans[t].span), 12581 (r = this.textSpans[t].glyph) && r.renderFrame(), 12582 i._mdf.m && s.setAttribute("transform", i.m),
12583 i._mdf.o && s.setAttribute("opacity", i.o), 12584 i._mdf.sw && s.setAttribute("stroke-width", i.sw), 12585 i._mdf.sc && s.setAttribute("stroke", i.sc), 12586 i._mdf.fc && s.setAttribute("fill", i.fc)); 12587 } 12588 }), 12589 extendPrototype([IImageElement], ISolidElement), 12590 (ISolidElement.prototype.createContent = function () { 12591 var t = createNS("rect"); 12592 t.setAttribute("width", this.data.sw), 12593 t.setAttribute("height", this.data.sh), 12594 t.setAttribute("fill", this.data.sc), 12595 this.layerElement.appendChild(t); 12596 }), 12597 (NullElement.prototype.prepareFrame = function (t) { 12598 this.prepareProperties(t, !0); 12599 }), 12600 (NullElement.prototype.renderFrame = function () {}), 12601 (NullElement.prototype.getBaseElement = function () { 12602 return null; 12603 }), 12604 (NullElement.prototype.destroy = function () {}), 12605 (NullElement.prototype.sourceRectAtTime = function () {}), 12606 (NullElement.prototype.hide = function () {}), 12607 extendPrototype( 12608 [BaseElement, TransformElement, HierarchyElement, FrameElement], 12609 NullElement 12610 ), 12611 extendPrototype([BaseRenderer], SVGRendererBase), 12612 (SVGRendererBase.prototype.createNull = function (t) { 12613 return new NullElement(t, this.globalData, this); 12614 }), 12615 (SVGRendererBase.prototype.createShape = function (t) { 12616 return new SVGShapeElement(t, this.globalData, this); 12617 }), 12618 (SVGRendererBase.prototype.createText = function (t) { 12619 return new SVGTextLottieElement(t, this.globalData, this); 12620 }), 12621 (SVGRendererBase.prototype.createImage = function (t) { 12622 return new IImageElement(t, this.globalData, this); 12623 }), 12624 (SVGRendererBase.prototype.createSolid = function (t) { 12625 return new ISolidElement(t, this.globalData, this); 12626 }), 12627 (SVGRendererBase.prototype.configAnimation = function (t) { 12628 this.svgElement.setAttribute( 12629 "xmlns", 12630 "http://www.w3.org/2000/svg" 12631 ), 12632 this.svgElement.setAttribute( 12633 "xmlns:xlink", 12634 "http://www.w3.org/1999/xlink" 12635 ), 12636 this.renderConfig.viewBoxSize 12637 ? this.svgElement.setAttribute( 12638 "viewBox", 12639 this.renderConfig.viewBoxSize 12640 ) 12641 : this.svgElement.setAttribute( 12642 "viewBox", 12643 "0 0 " + t.w + " " + t.h 12644 ), 12645 this.renderConfig.viewBoxOnly || 12646 (this.svgElement.setAttribute("width", t.w), 12647 this.svgElement.setAttribute("height", t.h), 12648 (this.svgElement.style.width = "100%"), 12649 (this.svgElement.style.height = "100%"), 12650 (this.svgElement.style.transform = "translate3d(0,0,0)"), 12651 (this.svgElement.style.contentVisibility = 12652 this.renderConfig.contentVisibility)), 12653 this.renderConfig.width && 12654 this.svgElement.setAttribute( 12655 "width", 12656 this.renderConfig.width 12657 ), 12658 this.renderConfig.height && 12659 this.svgElement.setAttribute( 12660 "height", 12661 this.renderConfig.height 12662 ), 12663 this.renderConfig.className && 12664 this.svgElement.setAttribute( 12665 "class", 12666 this.renderConfig.className 12667 ), 12668 this.renderConfig.id && 12669 this.svgElement.setAttribute("id", this.renderConfig.id), 12670 void 0 !== this.renderConfig.focusable && 12671 this.svgElement.setAttribute( 12672 "focusable", 12673 this.renderConfig.focusable 12674 ), 12675 this.svgElement.setAttribute( 12676 "preserveAspectRatio", 12677 this.renderConfig.preserveAspectRatio 12678 ), 12679 this.animationItem.wrapper.appendChild(this.svgElement); 12680 var e = this.globalData.defs; 12681 this.setupGlobalData(t, e), 12682 (this.globalData.progressiveLoad = 12683 this.renderConfig.progressiveLoad), 12684 (this.data = t); 12685 var i = createNS("clipPath"), 12686 s = createNS("rect"); 12687 s.setAttribute("width", t.w), 12688 s.setAttribute("height", t.h), 12689 s.setAttribute("x", 0), 12690 s.setAttribute("y", 0); 12691 var r = createElementID(); 12692 i.setAttribute("id", r), 12693 i.appendChild(s), 12694 this.layerElement.setAttribute( 12695 "clip-path", 12696 "url(" + getLocationHref() + "#" + r + ")" 12697 ), 12698 e.appendChild(i),
12699 (this.layers = t.layers), 12700 (this.elements = createSizedArray(t.layers.length)); 12701 }), 12702 (SVGRendererBase.prototype.destroy = function () { 12703 this.animationItem.wrapper && 12704 (this.animationItem.wrapper.innerText = ""), 12705 (this.layerElement = null), 12706 (this.globalData.defs = null); 12707 var t, 12708 e = this.layers ? this.layers.length : 0; 12709 for (t = 0; t < e; t += 1) 12710 this.elements[t] && 12711 this.elements[t].destroy && 12712 this.elements[t].destroy(); 12713 (this.elements.length = 0), 12714 (this.destroyed = !0), 12715 (this.animationItem = null); 12716 }), 12717 (SVGRendererBase.prototype.updateContainerSize = function () {}), 12718 (SVGRendererBase.prototype.findIndexByInd = function (t) { 12719 var e = 0, 12720 i = this.layers.length; 12721 for (e = 0; e < i; e += 1) if (this.layers[e].ind === t) return e; 12722 return -1; 12723 }), 12724 (SVGRendererBase.prototype.buildItem = function (t) { 12725 var e = this.elements; 12726 if (!e[t] && 99 !== this.layers[t].ty) { 12727 e[t] = !0; 12728 var i = this.createItem(this.layers[t]); 12729 if ( 12730 ((e[t] = i), 12731 getExpressionsPlugin() && 12732 (0 === this.layers[t].ty && 12733 this.globalData.projectInterface.registerComposition(i), 12734 i.initExpressions()), 12735 this.appendElementInPos(i, t), 12736 this.layers[t].tt) 12737 ) { 12738 var s = 12739 "tp" in this.layers[t] 12740 ? this.findIndexByInd(this.layers[t].tp) 12741 : t - 1; 12742 if (-1 === s) return; 12743 if (this.elements[s] && !0 !== this.elements[s]) { 12744 var r = e[s].getMatte(this.layers[t].tt); 12745 i.setMatte(r); 12746 } else this.buildItem(s), this.addPendingElement(i); 12747 } 12748 } 12749 }), 12750 (SVGRendererBase.prototype.checkPendingElements = function () { 12751 for (; this.pendingElements.length; ) { 12752 var t = this.pendingElements.pop(); 12753 if ((t.checkParenting(), t.data.tt)) 12754 for (var e = 0, i = this.elements.length; e < i; ) { 12755 if (this.elements[e] === t) { 12756 var s = 12757 "tp" in t.data 12758 ? this.findIndexByInd(t.data.tp) 12759 : e - 1, 12760 r = this.elements[s].getMatte(this.layers[e].tt); 12761 t.setMatte(r); 12762 break; 12763 } 12764 e += 1; 12765 } 12766 } 12767 }), 12768 (SVGRendererBase.prototype.renderFrame = function (t) { 12769 if (this.renderedFrame !== t && !this.destroyed) { 12770 null === t 12771 ? (t = this.renderedFrame) 12772 : (this.renderedFrame = t), 12773 (this.globalData.frameNum = t), 12774 (this.globalData.frameId += 1), 12775 (this.globalData.projectInterface.currentFrame = t), 12776 (this.globalData._mdf = !1); 12777 var e, 12778 i = this.layers.length; 12779 for ( 12780 this.completeLayers || this.checkLayers(t), e = i - 1; 12781 e >= 0; 12782 e -= 1 12783 ) 12784 (this.completeLayers || this.elements[e]) && 12785 this.elements[e].prepareFrame(t - this.layers[e].st); 12786 if (this.globalData._mdf) 12787 for (e = 0; e < i; e += 1) 12788 (this.completeLayers || this.elements[e]) && 12789 this.elements[e].renderFrame(); 12790 } 12791 }), 12792 (SVGRendererBase.prototype.appendElementInPos = function (t, e) { 12793 var i = t.getBaseElement(); 12794 if (i) { 12795 for (var s, r = 0; r < e; ) 12796 this.elements[r] && 12797 !0 !== this.elements[r] && 12798 this.elements[r].getBaseElement() && 12799 (s = this.elements[r].getBaseElement()), 12800 (r += 1); 12801 s 12802 ? this.layerElement.insertBefore(i, s) 12803 : this.layerElement.appendChild(i); 12804 } 12805 }), 12806 (SVGRendererBase.prototype.hide = function () { 12807 this.layerElement.style.display = "none"; 12808 }), 12809 (SVGRendererBase.prototype.show = function () { 12810 this.layerElement.style.display = "block"; 12811 }), 12812 extendPrototype( 12813 [ 12814 BaseElement, 12815 TransformElement, 12816 HierarchyElement, 12817 FrameElement, 12818 RenderableDOMElement, 12819 ], 12820 ICompElement 12821 ), 12822 (ICompElement.prototype.initElement = function (t, e, i) { 12823 this.initFrame(), 12824 this.initBaseData(t, e, i), 12825 this.initTransform(t, e, i), 12826 this.initRenderable(), 12827 this.initHierarchy(), 12828 this.initRendererElement(), 12829 this.createContainerElements(), 12830 this.createRenderableComponents(), 12831 (!this.data.xt && e.progressiveLoad) || this.buildAllItems(), 12832 this.hide(); 12833 }), 12834 (ICompElement.prototype.prepareFrame = function (t) { 12835 if ( 12836 ((this._mdf = !1), 12837 this.prepareRenderableFrame(t), 12838 this.prepareProperties(t, this.isInRange), 12839 this.isInRange || this.data.xt) 12840 ) { 12841 if (this.tm._placeholder) this.renderedFrame = t / this.data.sr; 12842 else { 12843 var e = this.tm.v; 12844 e === this.data.op && (e = this.data.op - 1), 12845 (this.renderedFrame = e); 12846 } 12847 var i, 12848 s = this.elements.length; 12849 for ( 12850 this.completeLayers || this.checkLayers(this.renderedFrame), 12851 i = s - 1; 12852 i >= 0; 12853 i -= 1 12854 ) 12855 (this.completeLayers || this.elements[i]) && 12856 (this.elements[i].prepareFrame( 12857 this.renderedFrame - this.layers[i].st 12858 ), 12859 this.elements[i]._mdf && (this._mdf = !0)); 12860 } 12861 }), 12862 (ICompElement.prototype.renderInnerContent = function () { 12863 var t, 12864 e = this.layers.length; 12865 for (t = 0; t < e; t += 1) 12866 (this.completeLayers || this.elements[t]) && 12867 this.elements[t].renderFrame(); 12868 }), 12869 (ICompElement.prototype.setElements = function (t) { 12870 this.elements = t; 12871 }), 12872 (ICompElement.prototype.getElements = function () { 12873 return this.elements; 12874 }), 12875 (ICompElement.prototype.destroyElements = function () { 12876 var t, 12877 e = this.layers.length; 12878 for (t = 0; t < e; t += 1) 12879 this.elements[t] && this.elements[t].destroy(); 12880 }), 12881 (ICompElement.prototype.destroy = function () { 12882 this.destroyElements(), this.destroyBaseElement(); 12883 }), 12884 extendPrototype( 12885 [SVGRendererBase, ICompElement, SVGBaseElement], 12886 SVGCompElement 12887 ), 12888 (SVGCompElement.prototype.createComp = function (t) { 12889 return new SVGCompElement(t, this.globalData, this); 12890 }), 12891 extendPrototype([SVGRendererBase], SVGRenderer), 12892 (SVGRenderer.prototype.createComp = function (t) { 12893 return new SVGCompElement(t, this.globalData, this); 12894 }), 12895 (ShapeTransformManager.prototype = { 12896 addTransformSequence: function (t) { 12897 var e, 12898 i = t.length, 12899 s = "_"; 12900 for (e = 0; e < i; e += 1) s += t[e].transform.key + "_"; 12901 var r = this.sequences[s]; 12902 return ( 12903 r || 12904 ((r = { 12905 transforms: [].concat(t), 12906 finalTransform: new Matrix(), 12907 _mdf: !1, 12908 }), 12909 (this.sequences[s] = r), 12910 this.sequenceList.push(r)), 12911 r 12912 ); 12913 }, 12914 processSequence: function (t, e) { 12915 for (var i = 0, s = t.transforms.length, r = e; i < s && !e; ) { 12916 if (t.transforms[i].transform.mProps._mdf) { 12917 r = !0; 12918 break; 12919 } 12920 i += 1; 12921 } 12922 if (r) 12923 for (t.finalTransform.reset(), i = s - 1; i >= 0; i -= 1) 12924 t.finalTransform.multiply( 12925 t.transforms[i].transform.mProps.v 12926 ); 12927 t._mdf = r; 12928 }, 12929 processSequences: function (t) { 12930 var e, 12931 i = this.sequenceList.length; 12932 for (e = 0; e < i; e += 1) 12933 this.processSequence(this.sequenceList[e], t); 12934 }, 12935 getNewKey: function () { 12936 return ( 12937 (this.transform_key_count += 1), 12938 "_" + this.transform_key_count 12939 ); 12940 }, 12941 }); 12942 var lumaLoader = function () { 12943 var t = "__lottie_element_luma_buffer", 12944 e = null, 12945 i = null, 12946 s = null; 12947 function r() { 12948 var r, n, a; 12949 e || 12950 ((r = createNS("svg")), 12951 (n = createNS("filter")), 12952 (a = createNS("feColorMatrix")), 12953 n.setAttribute("id", t), 12954 a.setAttribute("type", "matrix"), 12955 a.setAttribute("color-interpolation-filters", "sRGB"), 12956 a.setAttribute( 12957 "values", 12958 "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" 12959 ), 12960 n.appendChild(a), 12961 r.appendChild(n), 12962 r.setAttribute("id", t + "_svg"), 12963 featureSupport.svgLumaHidden && (r.style.display = "none"), 12964 (s = r), 12965 document.body.appendChild(s), 12966 ((i = (e = createTag("canvas")).getContext("2d")).filter = 12967 "url(#" + t + ")"), 12968 (i.fillStyle = "rgba(0,0,0,0)"), 12969 i.fillRect(0, 0, 1, 1)); 12970 } 12971 return { 12972 load: r, 12973 get: function (s) { 12974 return ( 12975 e || r(), 12976 (e.width = s.width), 12977 (e.height = s.height), 12978 (i.filter = "url(#" + t + ")"), 12979 e 12980 ); 12981 }, 12982 }; 12983 }; 12984 function createCanvas(t, e) { 12985 if (featureSupport.offscreenCanvas) 12986 return new OffscreenCanvas(t, e); 12987 var i = createTag("canvas"); 12988 return (i.width = t), (i.height = e), i; 12989 } 12990 var assetLoader = { 12991 loadLumaCanvas: lumaLoader.load, 12992 getLumaCanvas: lumaLoader.get, 12993 createCanvas: createCanvas, 12994 }, 12995 registeredEffects = {}; 12996 function CVEffects(t) { 12997 var e, 12998 i, 12999 s = t.data.ef ? t.data.ef.length : 0; 13000 for (this.filters = [], e = 0; e < s; e += 1) { 13001 i = null; 13002 var r = t.data.ef[e].ty; 13003 registeredEffects[r] && 13004 (i = new (0, registeredEffects[r].effect)( 13005 t.effectsManager.effectElements[e], 13006 t 13007 )), 13008 i && this.filters.push(i); 13009 } 13010 this.filters.length && t.addRenderableComponent(this); 13011 } 13012 function registerEffect(t, e) { 13013 registeredEffects[t] = { effect: e }; 13014 } 13015 function CVMaskElement(t, e) { 13016 (this.data = t), 13017 (this.element = e), 13018 (this.masksProperties = this.data.masksProperties || []), 13019 (this.viewData = createSizedArray(this.masksProperties.length)); 13020 var i, 13021 s = this.masksProperties.length, 13022 r = !1; 13023 for (i = 0; i < s; i += 1) 13024 "n" !== this.masksProperties[i].mode && (r = !0), 13025 (this.viewData[i] = ShapePropertyFactory.getShapeProp( 13026 this.element, 13027 this.masksProperties[i], 13028 3 13029 )); 13030 (this.hasMasks = r), r && this.element.addRenderableComponent(this); 13031 } 13032 function CVBaseElement() {} 13033 (CVEffects.prototype.renderFrame = function (t) { 13034 var e, 13035 i = this.filters.length; 13036 for (e = 0; e < i; e += 1) this.filters[e].renderFrame(t); 13037 }), 13038 (CVEffects.prototype.getEffects = function (t) { 13039 var e, 13040 i = this.filters.length, 13041 s = []; 13042 for (e = 0; e < i; e += 1)
13043 this.filters[e].type === t && s.push(this.filters[e]); 13044 return s; 13045 }), 13046 (CVMaskElement.prototype.renderFrame = function () { 13047 if (this.hasMasks) { 13048 var t, 13049 e, 13050 i, 13051 s, 13052 r = this.element.finalTransform.mat, 13053 n = this.element.canvasContext, 13054 a = this.masksProperties.length; 13055 for (n.beginPath(), t = 0; t < a; t += 1) 13056 if ("n" !== this.masksProperties[t].mode) { 13057 this.masksProperties[t].inv && 13058 (n.moveTo(0, 0), 13059 n.lineTo(this.element.globalData.compSize.w, 0), 13060 n.lineTo( 13061 this.element.globalData.compSize.w, 13062 this.element.globalData.compSize.h 13063 ), 13064 n.lineTo(0, this.element.globalData.compSize.h), 13065 n.lineTo(0, 0)), 13066 (s = this.viewData[t].v), 13067 (e = r.applyToPointArray(s.v[0][0], s.v[0][1], 0)), 13068 n.moveTo(e[0], e[1]); 13069 var o, 13070 h = s._length; 13071 for (o = 1; o < h; o += 1) 13072 (i = r.applyToTriplePoints(s.o[o - 1], s.i[o], s.v[o])), 13073 n.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]); 13074 (i = r.applyToTriplePoints(s.o[o - 1], s.i[0], s.v[0])), 13075 n.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]); 13076 } 13077 this.element.globalData.renderer.save(!0), n.clip(); 13078 } 13079 }), 13080 (CVMaskElement.prototype.getMaskProperty = 13081 MaskElement.prototype.getMaskProperty), 13082 (CVMaskElement.prototype.destroy = function () { 13083 this.element = null; 13084 }); 13085 var operationsMap = { 13086 1: "source-in", 13087 2: "source-out", 13088 3: "source-in", 13089 4: "source-out", 13090 }; 13091 function CVShapeData(t, e, i, s) { 13092 (this.styledShapes = []), (this.tr = [0, 0, 0, 0, 0, 0]); 13093 var r, 13094 n = 4; 13095 "rc" === e.ty 13096 ? (n = 5) 13097 : "el" === e.ty 13098 ? (n = 6) 13099 : "sr" === e.ty && (n = 7), 13100 (this.sh = ShapePropertyFactory.getShapeProp(t, e, n, t)); 13101 var a, 13102 o = i.length; 13103 for (r = 0; r < o; r += 1) 13104 i[r].closed || 13105 ((a = { 13106 transforms: s.addTransformSequence(i[r].transforms), 13107 trNodes: [], 13108 }), 13109 this.styledShapes.push(a), 13110 i[r].elements.push(a)); 13111 } 13112 function CVShapeElement(t, e, i) { 13113 (this.shapes = []), 13114 (this.shapesData = t.shapes), 13115 (this.stylesList = []), 13116 (this.itemsData = []), 13117 (this.prevViewData = []), 13118 (this.shapeModifiers = []), 13119 (this.processedElements = []), 13120 (this.transformsManager = new ShapeTransformManager()), 13121 this.initElement(t, e, i); 13122 } 13123 function CVTextElement(t, e, i) { 13124 (this.textSpans = []), 13125 (this.yOffset = 0), 13126 (this.fillColorAnim = !1), 13127 (this.strokeColorAnim = !1), 13128 (this.strokeWidthAnim = !1), 13129 (this.stroke = !1), 13130 (this.fill = !1), 13131 (this.justifyOffset = 0), 13132 (this.currentRender = null), 13133 (this.renderType = "canvas"), 13134 (this.values = { 13135 fill: "rgba(0,0,0,0)", 13136 stroke: "rgba(0,0,0,0)", 13137 sWidth: 0, 13138 fValue: "", 13139 }), 13140 this.initElement(t, e, i); 13141 } 13142 function CVImageElement(t, e, i) { 13143 (this.assetData = e.getAssetData(t.refId)), 13144 (this.img = e.imageLoader.getAsset(this.assetData)), 13145 this.initElement(t, e, i); 13146 } 13147 function CVSolidElement(t, e, i) { 13148 this.initElement(t, e, i); 13149 } 13150 function CanvasRendererBase() {} 13151 function CanvasContext() { 13152 (this.opacity = -1), 13153 (this.transform = createTypedArray("float32", 16)), 13154 (this.fillStyle = ""), 13155 (this.strokeStyle = ""), 13156 (this.lineWidth = ""), 13157 (this.lineCap = ""), 13158 (this.lineJoin = ""), 13159 (this.miterLimit = ""), 13160 (this.id = Math.random()); 13161 } 13162 function CVContextData() { 13163 var t; 13164 for ( 13165 this.stack = [], this.cArrPos = 0, this.cTr = new Matrix(), t = 0; 13166 t < 15; 13167 t += 1 13168 ) { 13169 var e = new CanvasContext(); 13170 this.stack[t] = e; 13171 } 13172 (this._length = 15), 13173 (this.nativeContext = null),
13174 (this.transformMat = new Matrix()), 13175 (this.currentOpacity = 1), 13176 (this.currentFillStyle = ""), 13177 (this.appliedFillStyle = ""), 13178 (this.currentStrokeStyle = ""), 13179 (this.appliedStrokeStyle = ""), 13180 (this.currentLineWidth = ""), 13181 (this.appliedLineWidth = ""), 13182 (this.currentLineCap = ""), 13183 (this.appliedLineCap = ""), 13184 (this.currentLineJoin = ""), 13185 (this.appliedLineJoin = ""), 13186 (this.appliedMiterLimit = ""), 13187 (this.currentMiterLimit = ""); 13188 } 13189 function CVCompElement(t, e, i) { 13190 (this.completeLayers = !1), 13191 (this.layers = t.layers), 13192 (this.pendingElements = []), 13193 (this.elements = createSizedArray(this.layers.length)), 13194 this.initElement(t, e, i), 13195 (this.tm = t.tm 13196 ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) 13197 : { _placeholder: !0 }); 13198 } 13199 function CanvasRenderer(t, e) { 13200 (this.animationItem = t), 13201 (this.renderConfig = { 13202 clearCanvas: !e || void 0 === e.clearCanvas || e.clearCanvas, 13203 context: (e && e.context) || null, 13204 progressiveLoad: (e && e.progressiveLoad) || !1, 13205 preserveAspectRatio: 13206 (e && e.preserveAspectRatio) || "xMidYMid meet", 13207 imagePreserveAspectRatio: 13208 (e && e.imagePreserveAspectRatio) || "xMidYMid slice", 13209 contentVisibility: (e && e.contentVisibility) || "visible", 13210 className: (e && e.className) || "", 13211 id: (e && e.id) || "", 13212 runExpressions: 13213 !e || void 0 === e.runExpressions || e.runExpressions, 13214 }), 13215 (this.renderConfig.dpr = (e && e.dpr) || 1), 13216 this.animationItem.wrapper && 13217 (this.renderConfig.dpr = 13218 (e && e.dpr) || window.devicePixelRatio || 1), 13219 (this.renderedFrame = -1), 13220 (this.globalData = { 13221 frameNum: -1, 13222 _mdf: !1, 13223 renderConfig: this.renderConfig, 13224 currentGlobalAlpha: -1, 13225 }), 13226 (this.contextData = new CVContextData()), 13227 (this.elements = []), 13228 (this.pendingElements = []), 13229 (this.transformMat = new Matrix()), 13230 (this.completeLayers = !1), 13231 (this.rendererType = "canvas"), 13232 this.renderConfig.clearCanvas && 13233 ((this.ctxTransform = this.contextData.transform.bind( 13234 this.contextData 13235 )), 13236 (this.ctxOpacity = this.contextData.opacity.bind( 13237 this.contextData 13238 )), 13239 (this.ctxFillStyle = this.contextData.fillStyle.bind( 13240 this.contextData 13241 )), 13242 (this.ctxStrokeStyle = this.contextData.strokeStyle.bind( 13243 this.contextData 13244 )), 13245 (this.ctxLineWidth = this.contextData.lineWidth.bind( 13246 this.contextData 13247 )), 13248 (this.ctxLineCap = this.contextData.lineCap.bind( 13249 this.contextData 13250 )), 13251 (this.ctxLineJoin = this.contextData.lineJoin.bind( 13252 this.contextData 13253 )), 13254 (this.ctxMiterLimit = this.contextData.miterLimit.bind( 13255 this.contextData 13256 )), 13257 (this.ctxFill = this.contextData.fill.bind(this.contextData)), 13258 (this.ctxFillRect = this.contextData.fillRect.bind( 13259 this.contextData 13260 )), 13261 (this.ctxStroke = this.contextData.stroke.bind( 13262 this.contextData 13263 )), 13264 (this.save = this.contextData.save.bind(this.contextData))); 13265 } 13266 function HBaseElement() {} 13267 function HSolidElement(t, e, i) { 13268 this.initElement(t, e, i); 13269 } 13270 function HShapeElement(t, e, i) { 13271 (this.shapes = []), 13272 (this.shapesData = t.shapes), 13273 (this.stylesList = []), 13274 (this.shapeModifiers = []), 13275 (this.itemsData = []), 13276 (this.processedElements = []), 13277 (this.animatedContents = []), 13278 (this.shapesContainer = createNS("g")), 13279 this.initElement(t, e, i), 13280 (this.prevViewData = []), 13281 (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }); 13282 } 13283 function HTextElement(t, e, i) { 13284 (this.textSpans = []), 13285 (this.textPaths = []), 13286 (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }), 13287 (this.renderType = "svg"), 13288 (this.isMasked = !1), 13289 this.initElement(t, e, i); 13290 } 13291 function HCameraElement(t, e, i) { 13292 this.initFrame(), this.initBaseData(t, e, i), this.initHierarchy(); 13293 var s = PropertyFactory.getProp; 13294 if ( 13295 ((this.pe = s(this, t.pe, 0, 0, this)), 13296 t.ks.p.s 13297 ? ((this.px = s(this, t.ks.p.x, 1, 0, this)), 13298 (this.py = s(this, t.ks.p.y, 1, 0, this)), 13299 (this.pz = s(this, t.ks.p.z, 1, 0, this))) 13300 : (this.p = s(this, t.ks.p, 1, 0, this)), 13301 t.ks.a && (this.a = s(this, t.ks.a, 1, 0, this)), 13302 t.ks.or.k.length && t.ks.or.k[0].to) 13303 ) { 13304 var r, 13305 n = t.ks.or.k.length; 13306 for (r = 0; r < n; r += 1) 13307 (t.ks.or.k[r].to = null), (t.ks.or.k[r].ti = null); 13308 } 13309 (this.or = s(this, t.ks.or, 1, degToRads, this)), 13310 (this.or.sh = !0), 13311 (this.rx = s(this, t.ks.rx, 0, degToRads, this)), 13312 (this.ry = s(this, t.ks.ry, 0, degToRads, this)), 13313 (this.rz = s(this, t.ks.rz, 0, degToRads, this)), 13314 (this.mat = new Matrix()), 13315 (this._prevMat = new Matrix()), 13316 (this._isFirstFrame = !0), 13317 (this.finalTransform = { mProp: this }); 13318 } 13319 function HImageElement(t, e, i) { 13320 (this.assetData = e.getAssetData(t.refId)), 13321 this.initElement(t, e, i); 13322 } 13323 function HybridRendererBase(t, e) { 13324 (this.animationItem = t), 13325 (this.layers = null),
13326 (this.renderedFrame = -1), 13327 (this.renderConfig = { 13328 className: (e && e.className) || "", 13329 imagePreserveAspectRatio: 13330 (e && e.imagePreserveAspectRatio) || "xMidYMid slice", 13331 hideOnTransparent: !(e && !1 === e.hideOnTransparent), 13332 filterSize: { 13333 width: (e && e.filterSize && e.filterSize.width) || "400%", 13334 height: (e && e.filterSize && e.filterSize.height) || "400%", 13335 x: (e && e.filterSize && e.filterSize.x) || "-100%", 13336 y: (e && e.filterSize && e.filterSize.y) || "-100%", 13337 }, 13338 }), 13339 (this.globalData = { 13340 _mdf: !1, 13341 frameNum: -1, 13342 renderConfig: this.renderConfig, 13343 }), 13344 (this.pendingElements = []), 13345 (this.elements = []), 13346 (this.threeDElements = []), 13347 (this.destroyed = !1), 13348 (this.camera = null), 13349 (this.supports3d = !0), 13350 (this.rendererType = "html"); 13351 } 13352 function HCompElement(t, e, i) { 13353 (this.layers = t.layers), 13354 (this.supports3d = !t.hasMask), 13355 (this.completeLayers = !1), 13356 (this.pendingElements = []), 13357 (this.elements = this.layers 13358 ? createSizedArray(this.layers.length) 13359 : []), 13360 this.initElement(t, e, i), 13361 (this.tm = t.tm 13362 ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) 13363 : { _placeholder: !0 }); 13364 } 13365 function HybridRenderer(t, e) { 13366 (this.animationItem = t), 13367 (this.layers = null), 13368 (this.renderedFrame = -1), 13369 (this.renderConfig = { 13370 className: (e && e.className) || "", 13371 imagePreserveAspectRatio: 13372 (e && e.imagePreserveAspectRatio) || "xMidYMid slice", 13373 hideOnTransparent: !(e && !1 === e.hideOnTransparent), 13374 filterSize: { 13375 width: (e && e.filterSize && e.filterSize.width) || "400%", 13376 height: (e && e.filterSize && e.filterSize.height) || "400%", 13377 x: (e && e.filterSize && e.filterSize.x) || "-100%", 13378 y: (e && e.filterSize && e.filterSize.y) || "-100%", 13379 }, 13380 runExpressions: 13381 !e || void 0 === e.runExpressions || e.runExpressions, 13382 }), 13383 (this.globalData = { 13384 _mdf: !1, 13385 frameNum: -1, 13386 renderConfig: this.renderConfig, 13387 }), 13388 (this.pendingElements = []), 13389 (this.elements = []), 13390 (this.threeDElements = []), 13391 (this.destroyed = !1), 13392 (this.camera = null), 13393 (this.supports3d = !0), 13394 (this.rendererType = "html"); 13395 } 13396 (CVBaseElement.prototype = { 13397 createElements: function () {}, 13398 initRendererElement: function () {}, 13399 createContainerElements: function () { 13400 if (this.data.tt >= 1) { 13401 this.buffers = []; 13402 var t = this.globalData.canvasContext, 13403 e = assetLoader.createCanvas(t.canvas.width, t.canvas.height); 13404 this.buffers.push(e); 13405 var i = assetLoader.createCanvas( 13406 t.canvas.width, 13407 t.canvas.height 13408 ); 13409 this.buffers.push(i), 13410 this.data.tt >= 3 && 13411 !document._isProxy && 13412 assetLoader.loadLumaCanvas(); 13413 } 13414 (this.canvasContext = this.globalData.canvasContext), 13415 (this.transformCanvas = this.globalData.transformCanvas), 13416 (this.renderableEffectsManager = new CVEffects(this)), 13417 this.searchEffectTransforms(); 13418 }, 13419 createContent: function () {}, 13420 setBlendMode: function () { 13421 var t = this.globalData; 13422 if (t.blendMode !== this.data.bm) { 13423 t.blendMode = this.data.bm;
13424 var e = getBlendMode(this.data.bm); 13425 t.canvasContext.globalCompositeOperation = e; 13426 } 13427 }, 13428 createRenderableComponents: function () { 13429 (this.maskManager = new CVMaskElement(this.data, this)), 13430 (this.transformEffects = 13431 this.renderableEffectsManager.getEffects( 13432 effectTypes.TRANSFORM_EFFECT 13433 )); 13434 }, 13435 hideElement: function () { 13436 this.hidden || 13437 (this.isInRange && !this.isTransparent) || 13438 (this.hidden = !0); 13439 }, 13440 showElement: function () { 13441 this.isInRange && 13442 !this.isTransparent && 13443 ((this.hidden = !1), 13444 (this._isFirstFrame = !0), 13445 (this.maskManager._isFirstFrame = !0)); 13446 }, 13447 clearCanvas: function (t) { 13448 t.clearRect( 13449 this.transformCanvas.tx, 13450 this.transformCanvas.ty, 13451 this.transformCanvas.w * this.transformCanvas.sx, 13452 this.transformCanvas.h * this.transformCanvas.sy 13453 ); 13454 }, 13455 prepareLayer: function () { 13456 if (this.data.tt >= 1) { 13457 var t = this.buffers[0].getContext("2d"); 13458 this.clearCanvas(t), 13459 t.drawImage(this.canvasContext.canvas, 0, 0), 13460 (this.currentTransform = this.canvasContext.getTransform()), 13461 this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), 13462 this.clearCanvas(this.canvasContext), 13463 this.canvasContext.setTransform(this.currentTransform); 13464 } 13465 }, 13466 exitLayer: function () { 13467 if (this.data.tt >= 1) { 13468 var t = this.buffers[1], 13469 e = t.getContext("2d"); 13470 if ( 13471 (this.clearCanvas(e), 13472 e.drawImage(this.canvasContext.canvas, 0, 0), 13473 this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), 13474 this.clearCanvas(this.canvasContext), 13475 this.canvasContext.setTransform(this.currentTransform), 13476 this.comp 13477 .getElementById( 13478 "tp" in this.data ? this.data.tp : this.data.ind - 1 13479 ) 13480 .renderFrame(!0), 13481 this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), 13482 this.data.tt >= 3 && !document._isProxy) 13483 ) { 13484 var i = assetLoader.getLumaCanvas(this.canvasContext.canvas); 13485 i.getContext("2d").drawImage(this.canvasContext.canvas, 0, 0), 13486 this.clearCanvas(this.canvasContext), 13487 this.canvasContext.drawImage(i, 0, 0); 13488 } 13489 (this.canvasContext.globalCompositeOperation = 13490 operationsMap[this.data.tt]), 13491 this.canvasContext.drawImage(t, 0, 0), 13492 (this.canvasContext.globalCompositeOperation = 13493 "destination-over"), 13494 this.canvasContext.drawImage(this.buffers[0], 0, 0), 13495 this.canvasContext.setTransform(this.currentTransform), 13496 (this.canvasContext.globalCompositeOperation = "source-over"); 13497 } 13498 }, 13499 renderFrame: function (t) { 13500 if (!this.hidden && !this.data.hd && (1 !== this.data.td || t)) { 13501 this.renderTransform(), 13502 this.renderRenderable(), 13503 this.renderLocalTransform(), 13504 this.setBlendMode(); 13505 var e = 0 === this.data.ty; 13506 this.prepareLayer(), 13507 this.globalData.renderer.save(e), 13508 this.globalData.renderer.ctxTransform( 13509 this.finalTransform.localMat.props 13510 ), 13511 this.globalData.renderer.ctxOpacity( 13512 this.finalTransform.localOpacity 13513 ), 13514 this.renderInnerContent(), 13515 this.globalData.renderer.restore(e), 13516 this.exitLayer(), 13517 this.maskManager.hasMasks && 13518 this.globalData.renderer.restore(!0), 13519 this._isFirstFrame && (this._isFirstFrame = !1); 13520 } 13521 }, 13522 destroy: function () { 13523 (this.canvasContext = null),
13524 (this.data = null), 13525 (this.globalData = null), 13526 this.maskManager.destroy(); 13527 }, 13528 mHelper: new Matrix(), 13529 }), 13530 (CVBaseElement.prototype.hide = 13531 CVBaseElement.prototype.hideElement), 13532 (CVBaseElement.prototype.show = 13533 CVBaseElement.prototype.showElement), 13534 (CVShapeData.prototype.setAsAnimated = 13535 SVGShapeData.prototype.setAsAnimated), 13536 extendPrototype( 13537 [ 13538 BaseElement, 13539 TransformElement, 13540 CVBaseElement, 13541 IShapeElement, 13542 HierarchyElement, 13543 FrameElement, 13544 RenderableElement, 13545 ], 13546 CVShapeElement 13547 ), 13548 (CVShapeElement.prototype.initElement = 13549 RenderableDOMElement.prototype.initElement), 13550 (CVShapeElement.prototype.transformHelper = { 13551 opacity: 1, 13552 _opMdf: !1, 13553 }), 13554 (CVShapeElement.prototype.dashResetter = []), 13555 (CVShapeElement.prototype.createContent = function () { 13556 this.searchShapes( 13557 this.shapesData, 13558 this.itemsData, 13559 this.prevViewData, 13560 !0, 13561 [] 13562 ); 13563 }), 13564 (CVShapeElement.prototype.createStyleElement = function (t, e) { 13565 var i = { 13566 data: t, 13567 type: t.ty, 13568 preTransforms: this.transformsManager.addTransformSequence(e), 13569 transforms: [], 13570 elements: [], 13571 closed: !0 === t.hd, 13572 }, 13573 s = {}; 13574 return ( 13575 ("fl" === t.ty || "st" === t.ty 13576 ? ((s.c = PropertyFactory.getProp(this, t.c, 1, 255, this)), 13577 s.c.k || 13578 (i.co = 13579 "rgb(" + 13580 bmFloor(s.c.v[0]) + 13581 "," + 13582 bmFloor(s.c.v[1]) + 13583 "," + 13584 bmFloor(s.c.v[2]) + 13585 ")")) 13586 : ("gf" !== t.ty && "gs" !== t.ty) || 13587 ((s.s = PropertyFactory.getProp(this, t.s, 1, null, this)), 13588 (s.e = PropertyFactory.getProp(this, t.e, 1, null, this)), 13589 (s.h = PropertyFactory.getProp( 13590 this, 13591 t.h || { k: 0 }, 13592 0, 13593 0.01, 13594 this 13595 )), 13596 (s.a = PropertyFactory.getProp( 13597 this, 13598 t.a || { k: 0 }, 13599 0, 13600 degToRads, 13601 this 13602 )), 13603 (s.g = new GradientProperty(this, t.g, this))), 13604 (s.o = PropertyFactory.getProp(this, t.o, 0, 0.01, this)), 13605 "st" === t.ty || "gs" === t.ty) 13606 ? ((i.lc = lineCapEnum[t.lc || 2]), 13607 (i.lj = lineJoinEnum[t.lj || 2]), 13608 1 == t.lj && (i.ml = t.ml), 13609 (s.w = PropertyFactory.getProp(this, t.w, 0, null, this)), 13610 s.w.k || (i.wi = s.w.v), 13611 t.d && 13612 ((s.d = new DashProperty(this, t.d, "canvas", this)), 13613 s.d.k || 13614 ((i.da = s.d.dashArray), (i.do = s.d.dashoffset[0])))) 13615 : (i.r = 2 === t.r ? "evenodd" : "nonzero"), 13616 this.stylesList.push(i), 13617 (s.style = i), 13618 s 13619 ); 13620 }), 13621 (CVShapeElement.prototype.createGroupElement = function () { 13622 return { it: [], prevViewData: [] }; 13623 }), 13624 (CVShapeElement.prototype.createTransformElement = function (t) { 13625 return { 13626 transform: { 13627 opacity: 1, 13628 _opMdf: !1, 13629 key: this.transformsManager.getNewKey(), 13630 op: PropertyFactory.getProp(this, t.o, 0, 0.01, this), 13631 mProps: TransformPropertyFactory.getTransformProperty( 13632 this, 13633 t, 13634 this 13635 ), 13636 }, 13637 }; 13638 }), 13639 (CVShapeElement.prototype.createShapeElement = function (t) { 13640 var e = new CVShapeData( 13641 this, 13642 t, 13643 this.stylesList, 13644 this.transformsManager 13645 ); 13646 return this.shapes.push(e), this.addShapeToModifiers(e), e; 13647 }), 13648 (CVShapeElement.prototype.reloadShapes = function () { 13649 this._isFirstFrame = !0; 13650 var t, 13651 e = this.itemsData.length; 13652 for (t = 0; t < e; t += 1) 13653 this.prevViewData[t] = this.itemsData[t]; 13654 for ( 13655 this.searchShapes( 13656 this.shapesData, 13657 this.itemsData, 13658 this.prevViewData, 13659 !0, 13660 [] 13661 ), 13662 e = this.dynamicProperties.length, 13663 t = 0; 13664 t < e; 13665 t += 1 13666 ) 13667 this.dynamicProperties[t].getValue(); 13668 this.renderModifiers(), 13669 this.transformsManager.processSequences(this._isFirstFrame); 13670 }), 13671 (CVShapeElement.prototype.addTransformToStyleList = function (t) { 13672 var e, 13673 i = this.stylesList.length; 13674 for (e = 0; e < i; e += 1) 13675 this.stylesList[e].closed || 13676 this.stylesList[e].transforms.push(t); 13677 }), 13678 (CVShapeElement.prototype.removeTransformFromStyleList = 13679 function () { 13680 var t, 13681 e = this.stylesList.length; 13682 for (t = 0; t < e; t += 1) 13683 this.stylesList[t].closed || 13684 this.stylesList[t].transforms.pop(); 13685 }), 13686 (CVShapeElement.prototype.closeStyles = function (t) { 13687 var e, 13688 i = t.length; 13689 for (e = 0; e < i; e += 1) t[e].closed = !0; 13690 }), 13691 (CVShapeElement.prototype.searchShapes = function (t, e, i, s, r) { 13692 var n, 13693 a, 13694 o, 13695 h, 13696 l, 13697 p, 13698 f = t.length - 1, 13699 c = [], 13700 u = [], 13701 m = [].concat(r); 13702 for (n = f; n >= 0; n -= 1) { 13703 if ( 13704 ((h = this.searchProcessedElement(t[n])) 13705 ? (e[n] = i[h - 1]) 13706 : (t[n]._shouldRender = s), 13707 "fl" === t[n].ty || 13708 "st" === t[n].ty || 13709 "gf" === t[n].ty || 13710 "gs" === t[n].ty) 13711 ) 13712 h 13713 ? (e[n].style.closed = !1) 13714 : (e[n] = this.createStyleElement(t[n], m)), 13715 c.push(e[n].style); 13716 else if ("gr" === t[n].ty) { 13717 if (h) 13718 for (o = e[n].it.length, a = 0; a < o; a += 1) 13719 e[n].prevViewData[a] = e[n].it[a]; 13720 else e[n] = this.createGroupElement(t[n]); 13721 this.searchShapes(t[n].it, e[n].it, e[n].prevViewData, s, m); 13722 } else 13723 "tr" === t[n].ty 13724 ? (h || 13725 ((p = this.createTransformElement(t[n])), (e[n] = p)), 13726 m.push(e[n]), 13727 this.addTransformToStyleList(e[n])) 13728 : "sh" === t[n].ty || 13729 "rc" === t[n].ty || 13730 "el" === t[n].ty || 13731 "sr" === t[n].ty 13732 ? h || (e[n] = this.createShapeElement(t[n])) 13733 : "tm" === t[n].ty || 13734 "rd" === t[n].ty || 13735 "pb" === t[n].ty || 13736 "zz" === t[n].ty || 13737 "op" === t[n].ty 13738 ? (h 13739 ? ((l = e[n]).closed = !1) 13740 : ((l = ShapeModifiers.getModifier(t[n].ty)).init( 13741 this, 13742 t[n] 13743 ), 13744 (e[n] = l), 13745 this.shapeModifiers.push(l)), 13746 u.push(l)) 13747 : "rp" === t[n].ty && 13748 (h 13749 ? ((l = e[n]).closed = !0) 13750 : ((l = ShapeModifiers.getModifier(t[n].ty)), 13751 (e[n] = l), 13752 l.init(this, t, n, e), 13753 this.shapeModifiers.push(l), 13754 (s = !1)), 13755 u.push(l)); 13756 this.addProcessedElement(t[n], n + 1); 13757 } 13758 for ( 13759 this.removeTransformFromStyleList(), 13760 this.closeStyles(c), 13761 f = u.length, 13762 n = 0; 13763 n < f; 13764 n += 1 13765 ) 13766 u[n].closed = !0; 13767 }), 13768 (CVShapeElement.prototype.renderInnerContent = function () { 13769 (this.transformHelper.opacity = 1), 13770 (this.transformHelper._opMdf = !1), 13771 this.renderModifiers(), 13772 this.transformsManager.processSequences(this._isFirstFrame), 13773 this.renderShape( 13774 this.transformHelper, 13775 this.shapesData, 13776 this.itemsData, 13777 !0 13778 ); 13779 }), 13780 (CVShapeElement.prototype.renderShapeTransform = function (t, e) { 13781 (t._opMdf || e.op._mdf || this._isFirstFrame) && 13782 ((e.opacity = t.opacity), 13783 (e.opacity *= e.op.v), 13784 (e._opMdf = !0)); 13785 }), 13786 (CVShapeElement.prototype.drawLayer = function () { 13787 var t, 13788 e, 13789 i, 13790 s, 13791 r, 13792 n, 13793 a, 13794 o, 13795 h, 13796 l = this.stylesList.length, 13797 p = this.globalData.renderer, 13798 f = this.globalData.canvasContext; 13799 for (t = 0; t < l; t += 1) 13800 if ( 13801 (("st" !== (o = (h = this.stylesList[t]).type) && 13802 "gs" !== o) || 13803 0 !== h.wi) && 13804 h.data._shouldRender && 13805 0 !== h.coOp && 13806 0 !== this.globalData.currentGlobalAlpha 13807 ) { 13808 for ( 13809 p.save(), 13810 n = h.elements, 13811 "st" === o || "gs" === o 13812 ? (p.ctxStrokeStyle("st" === o ? h.co : h.grd), 13813 p.ctxLineWidth(h.wi),
13814 p.ctxLineCap(h.lc), 13815 p.ctxLineJoin(h.lj), 13816 p.ctxMiterLimit(h.ml || 0)) 13817 : p.ctxFillStyle("fl" === o ? h.co : h.grd), 13818 p.ctxOpacity(h.coOp), 13819 "st" !== o && "gs" !== o && f.beginPath(), 13820 p.ctxTransform(h.preTransforms.finalTransform.props), 13821 i = n.length, 13822 e = 0; 13823 e < i; 13824 e += 1 13825 ) { 13826 for ( 13827 ("st" !== o && "gs" !== o) || 13828 (f.beginPath(), 13829 h.da && 13830 (f.setLineDash(h.da), (f.lineDashOffset = h.do))), 13831 r = (a = n[e].trNodes).length, 13832 s = 0; 13833 s < r; 13834 s += 1 13835 ) 13836 "m" === a[s].t 13837 ? f.moveTo(a[s].p[0], a[s].p[1]) 13838 : "c" === a[s].t 13839 ? f.bezierCurveTo( 13840 a[s].pts[0], 13841 a[s].pts[1], 13842 a[s].pts[2], 13843 a[s].pts[3], 13844 a[s].pts[4], 13845 a[s].pts[5] 13846 ) 13847 : f.closePath(); 13848 ("st" !== o && "gs" !== o) || 13849 (p.ctxStroke(), h.da && f.setLineDash(this.dashResetter)); 13850 } 13851 "st" !== o && 13852 "gs" !== o && 13853 this.globalData.renderer.ctxFill(h.r), 13854 p.restore(); 13855 } 13856 }), 13857 (CVShapeElement.prototype.renderShape = function (t, e, i, s) { 13858 var r, n; 13859 for (n = t, r = e.length - 1; r >= 0; r -= 1) 13860 "tr" === e[r].ty 13861 ? ((n = i[r].transform), this.renderShapeTransform(t, n)) 13862 : "sh" === e[r].ty || 13863 "el" === e[r].ty || 13864 "rc" === e[r].ty || 13865 "sr" === e[r].ty 13866 ? this.renderPath(e[r], i[r]) 13867 : "fl" === e[r].ty 13868 ? this.renderFill(e[r], i[r], n) 13869 : "st" === e[r].ty 13870 ? this.renderStroke(e[r], i[r], n) 13871 : "gf" === e[r].ty || "gs" === e[r].ty 13872 ? this.renderGradientFill(e[r], i[r], n) 13873 : "gr" === e[r].ty 13874 ? this.renderShape(n, e[r].it, i[r].it) 13875 : e[r].ty; 13876 s && this.drawLayer(); 13877 }), 13878 (CVShapeElement.prototype.renderStyledShape = function (t, e) { 13879 if (this._isFirstFrame || e._mdf || t.transforms._mdf) { 13880 var i, 13881 s, 13882 r, 13883 n = t.trNodes, 13884 a = e.paths, 13885 o = a._length; 13886 n.length = 0; 13887 var h = t.transforms.finalTransform; 13888 for (r = 0; r < o; r += 1) { 13889 var l = a.shapes[r]; 13890 if (l && l.v) { 13891 for (s = l._length, i = 1; i < s; i += 1) 13892 1 === i && 13893 n.push({ 13894 t: "m", 13895 p: h.applyToPointArray(l.v[0][0], l.v[0][1], 0), 13896 }), 13897 n.push({ 13898 t: "c", 13899 pts: h.applyToTriplePoints( 13900 l.o[i - 1], 13901 l.i[i], 13902 l.v[i] 13903 ), 13904 }); 13905 1 === s && 13906 n.push({ 13907 t: "m", 13908 p: h.applyToPointArray(l.v[0][0], l.v[0][1], 0), 13909 }), 13910 l.c && 13911 s && 13912 (n.push({ 13913 t: "c", 13914 pts: h.applyToTriplePoints( 13915 l.o[i - 1], 13916 l.i[0], 13917 l.v[0] 13918 ), 13919 }), 13920 n.push({ t: "z" })); 13921 } 13922 } 13923 t.trNodes = n; 13924 } 13925 }), 13926 (CVShapeElement.prototype.renderPath = function (t, e) { 13927 if (!0 !== t.hd && t._shouldRender) { 13928 var i, 13929 s = e.styledShapes.length; 13930 for (i = 0; i < s; i += 1) 13931 this.renderStyledShape(e.styledShapes[i], e.sh); 13932 } 13933 }), 13934 (CVShapeElement.prototype.renderFill = function (t, e, i) { 13935 var s = e.style; 13936 (e.c._mdf || this._isFirstFrame) && 13937 (s.co = 13938 "rgb(" + 13939 bmFloor(e.c.v[0]) + 13940 "," + 13941 bmFloor(e.c.v[1]) + 13942 "," + 13943 bmFloor(e.c.v[2]) + 13944 ")"), 13945 (e.o._mdf || i._opMdf || this._isFirstFrame) && 13946 (s.coOp = e.o.v * i.opacity); 13947 }), 13948 (CVShapeElement.prototype.renderGradientFill = function (t, e, i) { 13949 var s, 13950 r = e.style; 13951 if ( 13952 !r.grd || 13953 e.g._mdf || 13954 e.s._mdf || 13955 e.e._mdf || 13956 (1 !== t.t && (e.h._mdf || e.a._mdf)) 13957 ) { 13958 var n, 13959 a = this.globalData.canvasContext, 13960 o = e.s.v, 13961 h = e.e.v; 13962 if (1 === t.t) 13963 s = a.createLinearGradient(o[0], o[1], h[0], h[1]); 13964 else { 13965 var l = Math.sqrt( 13966 Math.pow(o[0] - h[0], 2) + Math.pow(o[1] - h[1], 2) 13967 ), 13968 p = Math.atan2(h[1] - o[1], h[0] - o[0]), 13969 f = e.h.v; 13970 f >= 1 ? (f = 0.99) : f <= -1 && (f = -0.99); 13971 var c = l * f,
13972 u = Math.cos(p + e.a.v) * c + o[0], 13973 m = Math.sin(p + e.a.v) * c + o[1]; 13974 s = a.createRadialGradient(u, m, 0, o[0], o[1], l); 13975 } 13976 var d = t.g.p, 13977 g = e.g.c, 13978 v = 1; 13979 for (n = 0; n < d; n += 1) 13980 e.g._hasOpacity && e.g._collapsable && (v = e.g.o[2 * n + 1]), 13981 s.addColorStop( 13982 g[4 * n] / 100, 13983 "rgba(" + 13984 g[4 * n + 1] + 13985 "," + 13986 g[4 * n + 2] + 13987 "," + 13988 g[4 * n + 3] + 13989 "," + 13990 v + 13991 ")" 13992 ); 13993 r.grd = s; 13994 } 13995 r.coOp = e.o.v * i.opacity; 13996 }), 13997 (CVShapeElement.prototype.renderStroke = function (t, e, i) { 13998 var s = e.style, 13999 r = e.d; 14000 r && 14001 (r._mdf || this._isFirstFrame) && 14002 ((s.da = r.dashArray), (s.do = r.dashoffset[0])), 14003 (e.c._mdf || this._isFirstFrame) && 14004 (s.co = 14005 "rgb(" + 14006 bmFloor(e.c.v[0]) + 14007 "," + 14008 bmFloor(e.c.v[1]) + 14009 "," + 14010 bmFloor(e.c.v[2]) + 14011 ")"), 14012 (e.o._mdf || i._opMdf || this._isFirstFrame) && 14013 (s.coOp = e.o.v * i.opacity), 14014 (e.w._mdf || this._isFirstFrame) && (s.wi = e.w.v); 14015 }), 14016 (CVShapeElement.prototype.destroy = function () { 14017 (this.shapesData = null), 14018 (this.globalData = null), 14019 (this.canvasContext = null), 14020 (this.stylesList.length = 0), 14021 (this.itemsData.length = 0); 14022 }), 14023 extendPrototype( 14024 [ 14025 BaseElement, 14026 TransformElement, 14027 CVBaseElement, 14028 HierarchyElement, 14029 FrameElement, 14030 RenderableElement, 14031 ITextElement, 14032 ], 14033 CVTextElement 14034 ), 14035 (CVTextElement.prototype.tHelper = 14036 createTag("canvas").getContext("2d")), 14037 (CVTextElement.prototype.buildNewText = function () { 14038 var t = this.textProperty.currentData; 14039 this.renderedLetters = createSizedArray(t.l ? t.l.length : 0); 14040 var e = !1; 14041 t.fc 14042 ? ((e = !0), (this.values.fill = this.buildColor(t.fc))) 14043 : (this.values.fill = "rgba(0,0,0,0)"), 14044 (this.fill = e); 14045 var i = !1; 14046 t.sc && 14047 ((i = !0), 14048 (this.values.stroke = this.buildColor(t.sc)), 14049 (this.values.sWidth = t.sw)); 14050 var s, 14051 r, 14052 n, 14053 a, 14054 o, 14055 h, 14056 l, 14057 p, 14058 f, 14059 c, 14060 u, 14061 m, 14062 d = this.globalData.fontManager.getFontByName(t.f), 14063 g = t.l, 14064 v = this.mHelper; 14065 (this.stroke = i), 14066 (this.values.fValue = 14067 t.finalSize + 14068 "px " + 14069 this.globalData.fontManager.getFontByName(t.f).fFamily), 14070 (r = t.finalText.length); 14071 var y = this.data.singleShape, 14072 b = 0.001 * t.tr * t.finalSize, 14073 x = 0, 14074 _ = 0, 14075 k = !0, 14076 A = 0; 14077 for (s = 0; s < r; s += 1) { 14078 (a = 14079 ((n = this.globalData.fontManager.getCharData( 14080 t.finalText[s], 14081 d.fStyle, 14082 this.globalData.fontManager.getFontByName(t.f).fFamily 14083 )) && 14084 n.data) || 14085 {}), 14086 v.reset(), 14087 y && 14088 g[s].n && 14089 ((x = -b), (_ += t.yOffset), (_ += +!!k), (k = !1)), 14090 (f = (l = a.shapes ? a.shapes[0].it : []).length), 14091 v.scale(t.finalSize / 100, t.finalSize / 100), 14092 y && this.applyTextPropertiesToMatrix(t, v, g[s].line, x, _), 14093 (u = createSizedArray(f - 1)); 14094 var C = 0; 14095 for (p = 0; p < f; p += 1) 14096 if ("sh" === l[p].ty) { 14097 for ( 14098 h = l[p].ks.k.i.length, c = l[p].ks.k, m = [], o = 1; 14099 o < h; 14100 o += 1 14101 ) 14102 1 === o && 14103 m.push( 14104 v.applyToX(c.v[0][0], c.v[0][1], 0), 14105 v.applyToY(c.v[0][0], c.v[0][1], 0) 14106 ), 14107 m.push( 14108 v.applyToX(c.o[o - 1][0], c.o[o - 1][1], 0), 14109 v.applyToY(c.o[o - 1][0], c.o[o - 1][1], 0), 14110 v.applyToX(c.i[o][0], c.i[o][1], 0), 14111 v.applyToY(c.i[o][0], c.i[o][1], 0), 14112 v.applyToX(c.v[o][0], c.v[o][1], 0), 14113 v.applyToY(c.v[o][0], c.v[o][1], 0) 14114 ); 14115 m.push( 14116 v.applyToX(c.o[o - 1][0], c.o[o - 1][1], 0), 14117 v.applyToY(c.o[o - 1][0], c.o[o - 1][1], 0), 14118 v.applyToX(c.i[0][0], c.i[0][1], 0), 14119 v.applyToY(c.i[0][0], c.i[0][1], 0), 14120 v.applyToX(c.v[0][0], c.v[0][1], 0), 14121 v.applyToY(c.v[0][0], c.v[0][1], 0) 14122 ), 14123 (u[C] = m), 14124 (C += 1); 14125 } 14126 y && ((x += g[s].l), (x += b)), 14127 this.textSpans[A] 14128 ? (this.textSpans[A].elem = u) 14129 : (this.textSpans[A] = { elem: u }), 14130 (A += 1); 14131 } 14132 }), 14133 (CVTextElement.prototype.renderInnerContent = function () { 14134 this.validateText(), 14135 (this.canvasContext.font = this.values.fValue), 14136 this.globalData.renderer.ctxLineCap("butt"), 14137 this.globalData.renderer.ctxLineJoin("miter"), 14138 this.globalData.renderer.ctxMiterLimit(4), 14139 this.data.singleShape || 14140 this.textAnimator.getMeasures( 14141 this.textProperty.currentData, 14142 this.lettersChangedFlag 14143 ); 14144 var t, 14145 e, 14146 i, 14147 s, 14148 r, 14149 n, 14150 a, 14151 o = this.textAnimator.renderedLetters, 14152 h = this.textProperty.currentData.l; 14153 e = h.length; 14154 var l, 14155 p, 14156 f = null, 14157 c = null, 14158 u = null, 14159 m = this.globalData.renderer; 14160 for (t = 0; t < e; t += 1) 14161 if (!h[t].n) { 14162 if ( 14163 ((a = o[t]) && 14164 (m.save(), m.ctxTransform(a.p), m.ctxOpacity(a.o)), 14165 this.fill) 14166 ) { 14167 for ( 14168 a && a.fc 14169 ? f !== a.fc && (m.ctxFillStyle(a.fc), (f = a.fc)) 14170 : f !== this.values.fill && 14171 ((f = this.values.fill), 14172 m.ctxFillStyle(this.values.fill)), 14173 s = (l = this.textSpans[t].elem).length, 14174 this.globalData.canvasContext.beginPath(), 14175 i = 0; 14176 i < s; 14177 i += 1 14178 ) 14179 for ( 14180 n = (p = l[i]).length, 14181 this.globalData.canvasContext.moveTo(p[0], p[1]), 14182 r = 2; 14183 r < n; 14184 r += 6 14185 ) 14186 this.globalData.canvasContext.bezierCurveTo( 14187 p[r], 14188 p[r + 1], 14189 p[r + 2], 14190 p[r + 3], 14191 p[r + 4], 14192 p[r + 5] 14193 ); 14194 this.globalData.canvasContext.closePath(), m.ctxFill(); 14195 } 14196 if (this.stroke) { 14197 for ( 14198 a && a.sw 14199 ? u !== a.sw && ((u = a.sw), m.ctxLineWidth(a.sw)) 14200 : u !== this.values.sWidth && 14201 ((u = this.values.sWidth), 14202 m.ctxLineWidth(this.values.sWidth)), 14203 a && a.sc 14204 ? c !== a.sc && ((c = a.sc), m.ctxStrokeStyle(a.sc)) 14205 : c !== this.values.stroke && 14206 ((c = this.values.stroke), 14207 m.ctxStrokeStyle(this.values.stroke)), 14208 s = (l = this.textSpans[t].elem).length, 14209 this.globalData.canvasContext.beginPath(), 14210 i = 0; 14211 i < s; 14212 i += 1 14213 ) 14214 for ( 14215 n = (p = l[i]).length, 14216 this.globalData.canvasContext.moveTo(p[0], p[1]), 14217 r = 2; 14218 r < n; 14219 r += 6 14220 ) 14221 this.globalData.canvasContext.bezierCurveTo( 14222 p[r], 14223 p[r + 1], 14224 p[r + 2], 14225 p[r + 3], 14226 p[r + 4], 14227 p[r + 5] 14228 ); 14229 this.globalData.canvasContext.closePath(), m.ctxStroke(); 14230 }
14231 a && this.globalData.renderer.restore(); 14232 } 14233 }), 14234 extendPrototype( 14235 [ 14236 BaseElement, 14237 TransformElement, 14238 CVBaseElement, 14239 HierarchyElement, 14240 FrameElement, 14241 RenderableElement, 14242 ], 14243 CVImageElement 14244 ), 14245 (CVImageElement.prototype.initElement = 14246 SVGShapeElement.prototype.initElement), 14247 (CVImageElement.prototype.prepareFrame = 14248 IImageElement.prototype.prepareFrame), 14249 (CVImageElement.prototype.createContent = function () { 14250 if ( 14251 this.img.width && 14252 (this.assetData.w !== this.img.width || 14253 this.assetData.h !== this.img.height) 14254 ) { 14255 var t = createTag("canvas"); 14256 (t.width = this.assetData.w), (t.height = this.assetData.h); 14257 var e, 14258 i, 14259 s = t.getContext("2d"), 14260 r = this.img.width, 14261 n = this.img.height, 14262 a = r / n, 14263 o = this.assetData.w / this.assetData.h, 14264 h = 14265 this.assetData.pr || 14266 this.globalData.renderConfig.imagePreserveAspectRatio; 14267 (a > o && "xMidYMid slice" === h) || 14268 (a < o && "xMidYMid slice" !== h) 14269 ? (e = (i = n) * o) 14270 : (i = (e = r) / o), 14271 s.drawImage( 14272 this.img, 14273 (r - e) / 2, 14274 (n - i) / 2, 14275 e, 14276 i, 14277 0, 14278 0, 14279 this.assetData.w, 14280 this.assetData.h 14281 ), 14282 (this.img = t); 14283 } 14284 }), 14285 (CVImageElement.prototype.renderInnerContent = function () { 14286 this.canvasContext.drawImage(this.img, 0, 0); 14287 }), 14288 (CVImageElement.prototype.destroy = function () { 14289 this.img = null; 14290 }), 14291 extendPrototype( 14292 [ 14293 BaseElement, 14294 TransformElement, 14295 CVBaseElement, 14296 HierarchyElement, 14297 FrameElement, 14298 RenderableElement, 14299 ], 14300 CVSolidElement 14301 ), 14302 (CVSolidElement.prototype.initElement = 14303 SVGShapeElement.prototype.initElement), 14304 (CVSolidElement.prototype.prepareFrame = 14305 IImageElement.prototype.prepareFrame), 14306 (CVSolidElement.prototype.renderInnerContent = function () { 14307 this.globalData.renderer.ctxFillStyle(this.data.sc), 14308 this.globalData.renderer.ctxFillRect( 14309 0, 14310 0, 14311 this.data.sw, 14312 this.data.sh 14313 ); 14314 }), 14315 extendPrototype([BaseRenderer], CanvasRendererBase), 14316 (CanvasRendererBase.prototype.createShape = function (t) { 14317 return new CVShapeElement(t, this.globalData, this); 14318 }), 14319 (CanvasRendererBase.prototype.createText = function (t) { 14320 return new CVTextElement(t, this.globalData, this); 14321 }), 14322 (CanvasRendererBase.prototype.createImage = function (t) { 14323 return new CVImageElement(t, this.globalData, this); 14324 }), 14325 (CanvasRendererBase.prototype.createSolid = function (t) { 14326 return new CVSolidElement(t, this.globalData, this); 14327 }), 14328 (CanvasRendererBase.prototype.createNull = 14329 SVGRenderer.prototype.createNull), 14330 (CanvasRendererBase.prototype.ctxTransform = function (t) { 14331 (1 === t[0] && 14332 0 === t[1] && 14333 0 === t[4] && 14334 1 === t[5] && 14335 0 === t[12] && 14336 0 === t[13]) || 14337 this.canvasContext.transform( 14338 t[0], 14339 t[1], 14340 t[4], 14341 t[5], 14342 t[12], 14343 t[13] 14344 ); 14345 }), 14346 (CanvasRendererBase.prototype.ctxOpacity = function (t) { 14347 this.canvasContext.globalAlpha *= t < 0 ? 0 : t; 14348 }), 14349 (CanvasRendererBase.prototype.ctxFillStyle = function (t) { 14350 this.canvasContext.fillStyle = t; 14351 }), 14352 (CanvasRendererBase.prototype.ctxStrokeStyle = function (t) { 14353 this.canvasContext.strokeStyle = t; 14354 }), 14355 (CanvasRendererBase.prototype.ctxLineWidth = function (t) { 14356 this.canvasContext.lineWidth = t; 14357 }), 14358 (CanvasRendererBase.prototype.ctxLineCap = function (t) { 14359 this.canvasContext.lineCap = t; 14360 }), 14361 (CanvasRendererBase.prototype.ctxLineJoin = function (t) { 14362 this.canvasContext.lineJoin = t; 14363 }), 14364 (CanvasRendererBase.prototype.ctxMiterLimit = function (t) { 14365 this.canvasContext.miterLimit = t; 14366 }), 14367 (CanvasRendererBase.prototype.ctxFill = function (t) { 14368 this.canvasContext.fill(t); 14369 }), 14370 (CanvasRendererBase.prototype.ctxFillRect = function (t, e, i, s) { 14371 this.canvasContext.fillRect(t, e, i, s); 14372 }), 14373 (CanvasRendererBase.prototype.ctxStroke = function () { 14374 this.canvasContext.stroke(); 14375 }), 14376 (CanvasRendererBase.prototype.reset = function () { 14377 this.renderConfig.clearCanvas 14378 ? this.contextData.reset()
14379 : this.canvasContext.restore(); 14380 }), 14381 (CanvasRendererBase.prototype.save = function () { 14382 this.canvasContext.save(); 14383 }), 14384 (CanvasRendererBase.prototype.restore = function (t) { 14385 this.renderConfig.clearCanvas 14386 ? (t && (this.globalData.blendMode = "source-over"), 14387 this.contextData.restore(t)) 14388 : this.canvasContext.restore(); 14389 }), 14390 (CanvasRendererBase.prototype.configAnimation = function (t) { 14391 if (this.animationItem.wrapper) { 14392 this.animationItem.container = createTag("canvas"); 14393 var e = this.animationItem.container.style; 14394 (e.width = "100%"), (e.height = "100%"); 14395 var i = "0px 0px 0px"; 14396 (e.transformOrigin = i), 14397 (e.mozTransformOrigin = i), 14398 (e.webkitTransformOrigin = i), 14399 (e["-webkit-transform"] = i), 14400 (e.contentVisibility = this.renderConfig.contentVisibility), 14401 this.animationItem.wrapper.appendChild( 14402 this.animationItem.container 14403 ), 14404 (this.canvasContext = 14405 this.animationItem.container.getContext("2d")), 14406 this.renderConfig.className && 14407 this.animationItem.container.setAttribute( 14408 "class", 14409 this.renderConfig.className 14410 ), 14411 this.renderConfig.id && 14412 this.animationItem.container.setAttribute( 14413 "id", 14414 this.renderConfig.id 14415 ); 14416 } else this.canvasContext = this.renderConfig.context; 14417 this.contextData.setContext(this.canvasContext), 14418 (this.data = t), 14419 (this.layers = t.layers), 14420 (this.transformCanvas = { 14421 w: t.w, 14422 h: t.h, 14423 sx: 0, 14424 sy: 0, 14425 tx: 0, 14426 ty: 0, 14427 }), 14428 this.setupGlobalData(t, document.body), 14429 (this.globalData.canvasContext = this.canvasContext), 14430 (this.globalData.renderer = this), 14431 (this.globalData.isDashed = !1), 14432 (this.globalData.progressiveLoad = 14433 this.renderConfig.progressiveLoad), 14434 (this.globalData.transformCanvas = this.transformCanvas), 14435 (this.elements = createSizedArray(t.layers.length)), 14436 this.updateContainerSize(); 14437 }), 14438 (CanvasRendererBase.prototype.updateContainerSize = function ( 14439 t, 14440 e 14441 ) { 14442 var i, s, r, n; 14443 if ( 14444 (this.reset(), 14445 t 14446 ? ((i = t), 14447 (s = e), 14448 (this.canvasContext.canvas.width = i), 14449 (this.canvasContext.canvas.height = s)) 14450 : (this.animationItem.wrapper && this.animationItem.container 14451 ? ((i = this.animationItem.wrapper.offsetWidth), 14452 (s = this.animationItem.wrapper.offsetHeight)) 14453 : ((i = this.canvasContext.canvas.width), 14454 (s = this.canvasContext.canvas.height)), 14455 (this.canvasContext.canvas.width = 14456 i * this.renderConfig.dpr), 14457 (this.canvasContext.canvas.height = 14458 s * this.renderConfig.dpr)), 14459 -1 !== this.renderConfig.preserveAspectRatio.indexOf("meet") || 14460 -1 !== this.renderConfig.preserveAspectRatio.indexOf("slice")) 14461 ) { 14462 var a = this.renderConfig.preserveAspectRatio.split(" "), 14463 o = a[1] || "meet", 14464 h = a[0] || "xMidYMid", 14465 l = h.substr(0, 4), 14466 p = h.substr(4); 14467 (r = i / s), 14468 ((n = this.transformCanvas.w / this.transformCanvas.h) > r && 14469 "meet" === o) || 14470 (n < r && "slice" === o) 14471 ? ((this.transformCanvas.sx = 14472 i / (this.transformCanvas.w / this.renderConfig.dpr)), 14473 (this.transformCanvas.sy = 14474 i / (this.transformCanvas.w / this.renderConfig.dpr))) 14475 : ((this.transformCanvas.sx = 14476 s / (this.transformCanvas.h / this.renderConfig.dpr)), 14477 (this.transformCanvas.sy = 14478 s / (this.transformCanvas.h / this.renderConfig.dpr))), 14479 (this.transformCanvas.tx = 14480 "xMid" === l && 14481 ((n < r && "meet" === o) || (n > r && "slice" === o)) 14482 ? ((i - 14483 this.transformCanvas.w * 14484 (s / this.transformCanvas.h)) / 14485 2) * 14486 this.renderConfig.dpr 14487 : "xMax" === l && 14488 ((n < r && "meet" === o) || (n > r && "slice" === o)) 14489 ? (i - 14490 this.transformCanvas.w * 14491 (s / this.transformCanvas.h)) * 14492 this.renderConfig.dpr 14493 : 0),
14494 (this.transformCanvas.ty = 14495 "YMid" === p && 14496 ((n > r && "meet" === o) || (n < r && "slice" === o)) 14497 ? ((s - 14498 this.transformCanvas.h * 14499 (i / this.transformCanvas.w)) / 14500 2) * 14501 this.renderConfig.dpr 14502 : "YMax" === p && 14503 ((n > r && "meet" === o) || (n < r && "slice" === o)) 14504 ? (s - 14505 this.transformCanvas.h * 14506 (i / this.transformCanvas.w)) * 14507 this.renderConfig.dpr 14508 : 0); 14509 } else 14510 "none" === this.renderConfig.preserveAspectRatio 14511 ? ((this.transformCanvas.sx = 14512 i / (this.transformCanvas.w / this.renderConfig.dpr)), 14513 (this.transformCanvas.sy = 14514 s / (this.transformCanvas.h / this.renderConfig.dpr))) 14515 : ((this.transformCanvas.sx = this.renderConfig.dpr), 14516 (this.transformCanvas.sy = this.renderConfig.dpr)), 14517 (this.transformCanvas.tx = 0), 14518 (this.transformCanvas.ty = 0); 14519 (this.transformCanvas.props = [ 14520 this.transformCanvas.sx, 14521 0, 14522 0, 14523 0, 14524 0, 14525 this.transformCanvas.sy, 14526 0, 14527 0, 14528 0, 14529 0, 14530 1, 14531 0, 14532 this.transformCanvas.tx, 14533 this.transformCanvas.ty, 14534 0, 14535 1, 14536 ]), 14537 this.ctxTransform(this.transformCanvas.props), 14538 this.canvasContext.beginPath(), 14539 this.canvasContext.rect( 14540 0, 14541 0, 14542 this.transformCanvas.w, 14543 this.transformCanvas.h 14544 ), 14545 this.canvasContext.closePath(), 14546 this.canvasContext.clip(), 14547 this.renderFrame(this.renderedFrame, !0); 14548 }), 14549 (CanvasRendererBase.prototype.destroy = function () { 14550 var t; 14551 for ( 14552 this.renderConfig.clearCanvas && 14553 this.animationItem.wrapper && 14554 (this.animationItem.wrapper.innerText = ""), 14555 t = (this.layers ? this.layers.length : 0) - 1; 14556 t >= 0; 14557 t -= 1 14558 ) 14559 this.elements[t] && 14560 this.elements[t].destroy && 14561 this.elements[t].destroy(); 14562 (this.elements.length = 0), 14563 (this.globalData.canvasContext = null), 14564 (this.animationItem.container = null), 14565 (this.destroyed = !0); 14566 }), 14567 (CanvasRendererBase.prototype.renderFrame = function (t, e) { 14568 if ( 14569 (this.renderedFrame !== t || 14570 !0 !== this.renderConfig.clearCanvas || 14571 e) && 14572 !this.destroyed && 14573 -1 !== t 14574 ) { 14575 (this.renderedFrame = t), 14576 (this.globalData.frameNum = 14577 t - this.animationItem._isFirstFrame), 14578 (this.globalData.frameId += 1), 14579 (this.globalData._mdf = !this.renderConfig.clearCanvas || e), 14580 (this.globalData.projectInterface.currentFrame = t); 14581 var i, 14582 s = this.layers.length; 14583 for ( 14584 this.completeLayers || this.checkLayers(t), i = s - 1; 14585 i >= 0; 14586 i -= 1 14587 ) 14588 (this.completeLayers || this.elements[i]) && 14589 this.elements[i].prepareFrame(t - this.layers[i].st); 14590 if (this.globalData._mdf) { 14591 for ( 14592 !0 === this.renderConfig.clearCanvas 14593 ? this.canvasContext.clearRect( 14594 0, 14595 0, 14596 this.transformCanvas.w, 14597 this.transformCanvas.h 14598 ) 14599 : this.save(), 14600 i = s - 1; 14601 i >= 0; 14602 i -= 1 14603 ) 14604 (this.completeLayers || this.elements[i]) && 14605 this.elements[i].renderFrame(); 14606 !0 !== this.renderConfig.clearCanvas && this.restore(
14606); 14607 } 14608 } 14609 }), 14610 (CanvasRendererBase.prototype.buildItem = function (t) { 14611 var e = this.elements; 14612 if (!e[t] && 99 !== this.layers[t].ty) { 14613 var i = this.createItem(this.layers[t], this, this.globalData); 14614 (e[t] = i), i.initExpressions(); 14615 } 14616 }), 14617 (CanvasRendererBase.prototype.checkPendingElements = function () { 14618 for (; this.pendingElements.length; ) 14619 this.pendingElements.pop().checkParenting(); 14620 }), 14621 (CanvasRendererBase.prototype.hide = function () { 14622 this.animationItem.container.style.display = "none"; 14623 }), 14624 (CanvasRendererBase.prototype.show = function () { 14625 this.animationItem.container.style.display = "block"; 14626 }), 14627 (CVContextData.prototype.duplicate = function () { 14628 var t = 2 * this._length, 14629 e = 0; 14630 for (e = this._length; e < t; e += 1) 14631 this.stack[e] = new CanvasContext(); 14632 this._length = t; 14633 }), 14634 (CVContextData.prototype.reset = function () { 14635 (this.cArrPos = 0), 14636 this.cTr.reset(), 14637 (this.stack[this.cArrPos].opacity = 1); 14638 }), 14639 (CVContextData.prototype.restore = function (t) { 14640 this.cArrPos -= 1; 14641 var e, 14642 i = this.stack[this.cArrPos], 14643 s = i.transform, 14644 r = this.cTr.props; 14645 for (e = 0; e < 16; e += 1) r[e] = s[e]; 14646 if (t) { 14647 this.nativeContext.restore(); 14648 var n = this.stack[this.cArrPos + 1]; 14649 (this.appliedFillStyle = n.fillStyle), 14650 (this.appliedStrokeStyle = n.strokeStyle), 14651 (this.appliedLineWidth = n.lineWidth), 14652 (this.appliedLineCap = n.lineCap), 14653 (this.appliedLineJoin = n.lineJoin), 14654 (this.appliedMiterLimit = n.miterLimit); 14655 } 14656 this.nativeContext.setTransform( 14657 s[0], 14658 s[1], 14659 s[4], 14660 s[5], 14661 s[12], 14662 s[13] 14663 ), 14664 (t || 14665 (-1 !== i.opacity && this.currentOpacity !== i.opacity)) && 14666 ((this.nativeContext.globalAlpha = i.opacity), 14667 (this.currentOpacity = i.opacity)), 14668 (this.currentFillStyle = i.fillStyle), 14669 (this.currentStrokeStyle = i.strokeStyle), 14670 (this.currentLineWidth = i.lineWidth), 14671 (this.currentLineCap = i.lineCap), 14672 (this.currentLineJoin = i.lineJoin), 14673 (this.currentMiterLimit = i.miterLimit); 14674 }), 14675 (CVContextData.prototype.save = function (t) { 14676 t && this.nativeContext.save(); 14677 var e = this.cTr.props; 14678 this._length <= this.cArrPos && this.duplicate(); 14679 var i, 14680 s = this.stack[this.cArrPos]; 14681 for (i = 0; i < 16; i += 1) s.transform[i] = e[i]; 14682 this.cArrPos += 1; 14683 var r = this.stack[this.cArrPos]; 14684 (r.opacity = s.opacity), 14685 (r.fillStyle = s.fillStyle), 14686 (r.strokeStyle = s.strokeStyle), 14687 (r.lineWidth = s.lineWidth), 14688 (r.lineCap = s.lineCap), 14689 (r.lineJoin = s.lineJoin), 14690 (r.miterLimit = s.miterLimit); 14691 }), 14692 (CVContextData.prototype.setOpacity = function (t) { 14693 this.stack[this.cArrPos].opacity = t; 14694 }), 14695 (CVContextData.prototype.setContext = function (t) { 14696 this.nativeContext = t; 14697 }), 14698 (CVContextData.prototype.fillStyle = function (t) { 14699 this.stack[this.cArrPos].fillStyle !== t && 14700 ((this.currentFillStyle = t), 14701 (this.stack[this.cArrPos].fillStyle = t)); 14702 }), 14703 (CVContextData.prototype.strokeStyle = function (t) { 14704 this.stack[this.cArrPos].strokeStyle !== t && 14705 ((this.currentStrokeStyle = t), 14706 (this.stack[this.cArrPos].strokeStyle = t)); 14707 }), 14708 (CVContextData.prototype.lineWidth = function (t) { 14709 this.stack[this.cArrPos].lineWidth !== t && 14710 ((this.currentLineWidth = t), 14711 (this.stack[this.cArrPos].lineWidth = t)); 14712 }), 14713 (CVContextData.prototype.lineCap = function (t) { 14714 this.stack[this.cArrPos].lineCap !== t && 14715 ((this.currentLineCap = t), 14716 (this.stack[this.cArrPos].lineCap = t)); 14717 }), 14718 (CVContextData.prototype.lineJoin = function (t) { 14719 this.stack[this.cArrPos].lineJoin !== t && 14720 ((this.currentLineJoin = t), 14721 (this.stack[this.cArrPos].lineJoin = t)); 14722 }), 14723 (CVContextData.prototype.miterLimit = function (t) { 14724 this.stack[this.cArrPos].miterLimit !== t && 14725 ((this.currentMiterLimit = t), 14726 (this.stack[this.cArrPos].miterLimit = t)); 14727 }), 14728 (CVContextData.prototype.transform = function (t) { 14729 this.transformMat.cloneFromProps(t); 14730 var e = this.cTr; 14731 this.transformMat.multiply(e), 14732 e.cloneFromProps(this.transformMat.props); 14733 var i = e.props; 14734 this.nativeContext.setTransform( 14735 i[0], 14736 i[1], 14737 i[4], 14738 i[5], 14739 i[12], 14740 i[13] 14741 ); 14742 }), 14743 (CVContextData.prototype.opacity = function (t) { 14744 var e = this.stack[this.cArrPos].opacity; 14745 (e *= t < 0 ? 0 : t), 14746 this.stack[this.cArrPos].opacity !== e && 14747 (this.currentOpacity !== t && 14748 ((this.nativeContext.globalAlpha = t), 14749 (this.currentOpacity = t)), 14750 (this.stack[this.cArrPos].opacity = e)); 14751 }), 14752 (CVContextData.prototype.fill = function (t) { 14753 this.appliedFillStyle !== this.currentFillStyle && 14754 ((this.appliedFillStyle = this.currentFillStyle), 14755 (this.nativeContext.fillStyle = this.appliedFillStyle)), 14756 this.nativeContext.fill(t); 14757 }), 14758 (CVContextData.prototype.fillRect = function (t, e, i, s) { 14759 this.appliedFillStyle !== this.currentFillStyle && 14760 ((this.appliedFillStyle = this.currentFillStyle), 14761 (this.nativeContext.fillStyle = this.appliedFillStyle)), 14762 this.nativeContext.fillRect(t, e, i, s); 14763 }), 14764 (CVContextData.prototype.stroke = function () { 14765 this.appliedStrokeStyle !== this.currentStrokeStyle && 14766 ((this.appliedStrokeStyle = this.currentStrokeStyle), 14767 (this.nativeContext.strokeStyle = this.appliedStrokeStyle)),
14768 this.appliedLineWidth !== this.currentLineWidth && 14769 ((this.appliedLineWidth = this.currentLineWidth), 14770 (this.nativeContext.lineWidth = this.appliedLineWidth)), 14771 this.appliedLineCap !== this.currentLineCap && 14772 ((this.appliedLineCap = this.currentLineCap), 14773 (this.nativeContext.lineCap = this.appliedLineCap)), 14774 this.appliedLineJoin !== this.currentLineJoin && 14775 ((this.appliedLineJoin = this.currentLineJoin), 14776 (this.nativeContext.lineJoin = this.appliedLineJoin)), 14777 this.appliedMiterLimit !== this.currentMiterLimit && 14778 ((this.appliedMiterLimit = this.currentMiterLimit), 14779 (this.nativeContext.miterLimit = this.appliedMiterLimit)), 14780 this.nativeContext.stroke(); 14781 }), 14782 extendPrototype( 14783 [CanvasRendererBase, ICompElement, CVBaseElement], 14784 CVCompElement 14785 ), 14786 (CVCompElement.prototype.renderInnerContent = function () { 14787 var t, 14788 e = this.canvasContext; 14789 for ( 14790 e.beginPath(), 14791 e.moveTo(0, 0), 14792 e.lineTo(this.data.w, 0), 14793 e.lineTo(this.data.w, this.data.h), 14794 e.lineTo(0, this.data.h), 14795 e.lineTo(0, 0), 14796 e.clip(), 14797 t = this.layers.length - 1; 14798 t >= 0; 14799 t -= 1 14800 ) 14801 (this.completeLayers || this.elements[t]) && 14802 this.elements[t].renderFrame(); 14803 }), 14804 (CVCompElement.prototype.destroy = function () { 14805 var t; 14806 for (t = this.layers.length - 1; t >= 0; t -= 1) 14807 this.elements[t] && this.elements[t].destroy(); 14808 (this.layers = null), (this.elements = null); 14809 }), 14810 (CVCompElement.prototype.createComp = function (t) { 14811 return new CVCompElement(t, this.globalData, this); 14812 }), 14813 extendPrototype([CanvasRendererBase], CanvasRenderer), 14814 (CanvasRenderer.prototype.createComp = function (t) { 14815 return new CVCompElement(t, this.globalData, this); 14816 }), 14817 (HBaseElement.prototype = { 14818 checkBlendMode: function () {}, 14819 initRendererElement: function () { 14820 (this.baseElement = createTag(this.data.tg || "div")), 14821 this.data.hasMask 14822 ? ((this.svgElement = createNS("svg")), 14823 (this.layerElement = createNS("g")), 14824 (this.maskedElement = this.layerElement), 14825 this.svgElement.appendChild(this.layerElement), 14826 this.baseElement.appendChild(this.svgElement)) 14827 : (this.layerElement = this.baseElement), 14828 styleDiv(this.baseElement); 14829 }, 14830 createContainerElements: function () { 14831 (this.renderableEffectsManager = new CVEffects(this)), 14832 (this.transformedElement = this.baseElement), 14833 (this.maskedElement = this.layerElement), 14834 this.data.ln && 14835 this.layerElement.setAttribute("id", this.data.ln), 14836 this.data.cl && 14837 this.layerElement.setAttribute("class", this.data.cl), 14838 0 !== this.data.bm && this.setBlendMode(); 14839 }, 14840 renderElement: function () { 14841 var t = this.transformedElement 14842 ? this.transformedElement.style 14843 : {}; 14844 if (this.finalTransform._matMdf) { 14845 var e = this.finalTransform.mat.toCSS(); 14846 (t.transform = e), (t.webkitTransform = e); 14847 } 14848 this.finalTransform._opMdf && 14849 (t.opacity = this.finalTransform.mProp.o.v); 14850 }, 14851 renderFrame: function () { 14852 this.data.hd || 14853 this.hidden || 14854 (this.renderTransform(), 14855 this.renderRenderable(), 14856 this.renderElement(), 14857 this.renderInnerContent(), 14858 this._isFirstFrame && (this._isFirstFrame = !1)); 14859 }, 14860 destroy: function () { 14861 (this.layerElement = null),
14862 (this.transformedElement = null), 14863 this.matteElement && (this.matteElement = null), 14864 this.maskManager && 14865 (this.maskManager.destroy(), (this.maskManager = null)); 14866 }, 14867 createRenderableComponents: function () { 14868 this.maskManager = new MaskElement( 14869 this.data, 14870 this, 14871 this.globalData 14872 ); 14873 }, 14874 addEffects: function () {}, 14875 setMatte: function () {}, 14876 }), 14877 (HBaseElement.prototype.getBaseElement = 14878 SVGBaseElement.prototype.getBaseElement), 14879 (HBaseElement.prototype.destroyBaseElement = 14880 HBaseElement.prototype.destroy), 14881 (HBaseElement.prototype.buildElementParenting = 14882 BaseRenderer.prototype.buildElementParenting), 14883 extendPrototype( 14884 [ 14885 BaseElement, 14886 TransformElement, 14887 HBaseElement, 14888 HierarchyElement, 14889 FrameElement, 14890 RenderableDOMElement, 14891 ], 14892 HSolidElement 14893 ), 14894 (HSolidElement.prototype.createContent = function () { 14895 var t; 14896 this.data.hasMask 14897 ? ((t = createNS("rect")).setAttribute("width", this.data.sw), 14898 t.setAttribute("height", this.data.sh), 14899 t.setAttribute("fill", this.data.sc), 14900 this.svgElement.setAttribute("width", this.data.sw), 14901 this.svgElement.setAttribute("height", this.data.sh)) 14902 : (((t = createTag("div")).style.width = this.data.sw + "px"), 14903 (t.style.height = this.data.sh + "px"), 14904 (t.style.backgroundColor = this.data.sc)), 14905 this.layerElement.appendChild(t); 14906 }), 14907 extendPrototype( 14908 [ 14909 BaseElement, 14910 TransformElement, 14911 HSolidElement, 14912 SVGShapeElement, 14913 HBaseElement, 14914 HierarchyElement, 14915 FrameElement, 14916 RenderableElement, 14917 ], 14918 HShapeElement 14919 ), 14920 (HShapeElement.prototype._renderShapeFrame = 14921 HShapeElement.prototype.renderInnerContent), 14922 (HShapeElement.prototype.createContent = function () { 14923 var t; 14924 if (((this.baseElement.style.fontSize = 0), this.data.hasMask)) 14925 this.layerElement.appendChild(this.shapesContainer), 14926 (t = this.svgElement); 14927 else { 14928 t = createNS("svg"); 14929 var e = this.comp.data 14930 ? this.comp.data 14931 : this.globalData.compSize; 14932 t.setAttribute("width", e.w), 14933 t.setAttribute("height", e.h), 14934 t.appendChild(this.shapesContainer), 14935 this.layerElement.appendChild(t); 14936 } 14937 this.searchShapes( 14938 this.shapesData, 14939 this.itemsData, 14940 this.prevViewData, 14941 this.shapesContainer, 14942 0, 14943 [], 14944 !0 14945 ), 14946 this.filterUniqueShapes(), 14947 (this.shapeCont = t); 14948 }), 14949 (HShapeElement.prototype.getTransformedPoint = function (t, e) { 14950 var i, 14951 s = t.length; 14952 for (i = 0; i < s; i += 1) 14953 e = t[i].mProps.v.applyToPointArray(e[0], e[1], 0); 14954 return e; 14955 }), 14956 (HShapeElement.prototype.calculateShapeBoundingBox = function ( 14957 t, 14958 e 14959 ) { 14960 var i, 14961 s, 14962 r, 14963 n, 14964 a, 14965 o = t.sh.v, 14966 h = t.transformers, 14967 l = o._length; 14968 if (!(l <= 1)) { 14969 for (i = 0; i < l - 1; i += 1) 14970 (s = this.getTransformedPoint(h, o.v[i])), 14971 (r = this.getTransformedPoint(h, o.o[i])), 14972 (n = this.getTransformedPoint(h, o.i[i + 1])
14972), 14973 (a = this.getTransformedPoint(h, o.v[i + 1])), 14974 this.checkBounds(s, r, n, a, e); 14975 o.c && 14976 ((s = this.getTransformedPoint(h, o.v[i])), 14977 (r = this.getTransformedPoint(h, o.o[i])), 14978 (n = this.getTransformedPoint(h, o.i[0])), 14979 (a = this.getTransformedPoint(h, o.v[0])), 14980 this.checkBounds(s, r, n, a, e)); 14981 } 14982 }), 14983 (HShapeElement.prototype.checkBounds = function (t, e, i, s, r) { 14984 this.getBoundsOfCurve(t, e, i, s); 14985 var n = this.shapeBoundingBox; 14986 (r.x = bmMin(n.left, r.x)), 14987 (r.xMax = bmMax(n.right, r.xMax)), 14988 (r.y = bmMin(n.top, r.y)), 14989 (r.yMax = bmMax(n.bottom, r.yMax)); 14990 }), 14991 (HShapeElement.prototype.shapeBoundingBox = { 14992 left: 0, 14993 right: 0, 14994 top: 0, 14995 bottom: 0, 14996 }), 14997 (HShapeElement.prototype.tempBoundingBox = { 14998 x: 0, 14999 xMax: 0, 15000 y: 0, 15001 yMax: 0, 15002 width: 0, 15003 height: 0, 15004 }), 15005 (HShapeElement.prototype.getBoundsOfCurve = function (t, e, i, s) { 15006 for ( 15007 var r, 15008 n, 15009 a, 15010 o, 15011 h, 15012 l, 15013 p, 15014 f = [ 15015 [t[0], s[0]], 15016 [t[1], s[1]], 15017 ], 15018 c = 0; 15019 c < 2; 15020 ++c 15021 ) 15022 (n = 6 * t[c] - 12 * e[c] + 6 * i[c]), 15023 (r = -3 * t[c] + 9 * e[c] - 9 * i[c] + 3 * s[c]), 15024 (a = 3 * e[c] - 3 * t[c]), 15025 (n |= 0), 15026 (a |= 0), 15027 (0 == (r |= 0) && 0 === n) || 15028 (0 === r 15029 ? (o = -a / n) > 0 && 15030 o < 1 && 15031 f[c].push(this.calculateF(o, t, e, i, s, c)) 15032 : (h = n * n - 4 * a * r) >= 0 && 15033 ((l = (-n + bmSqrt(h)) / (2 * r)) > 0 && 15034 l < 1 && 15035 f[c].push(this.calculateF(l, t, e, i, s, c)), 15036 (p = (-n - bmSqrt(h)) / (2 * r)) > 0 && 15037 p < 1 && 15038 f[c].push(this.calculateF(p, t, e, i, s, c)))); 15039 (this.shapeBoundingBox.left = bmMin.apply(null, f[0])), 15040 (this.shapeBoundingBox.top = bmMin.apply(null, f[1])), 15041 (this.shapeBoundingBox.right = bmMax.apply(null, f[0])), 15042 (this.shapeBoundingBox.bottom = bmMax.apply(null, f[1])); 15043 }), 15044 (HShapeElement.prototype.calculateF = function (t, e, i, s, r, n) { 15045 return ( 15046 bmPow(1 - t, 3) * e[n] + 15047 3 * bmPow(1 - t, 2) * t * i[n] + 15048 3 * (1 - t) * bmPow(t, 2) * s[n] + 15049 bmPow(t, 3) * r[n] 15050 ); 15051 }), 15052 (HShapeElement.prototype.calculateBoundingBox = function (t, e) { 15053 var i, 15054 s = t.length; 15055 for (i = 0; i < s; i += 1) 15056 t[i] && t[i].sh 15057 ? this.calculateShapeBoundingBox(t[i], e) 15058 : t[i] && t[i].it 15059 ? this.calculateBoundingBox(t[i].it, e) 15060 : t[i] && 15061 t[i].style && 15062 t[i].w && 15063 this.expandStrokeBoundingBox(t[i].w, e); 15064 }), 15065 (HShapeElement.prototype.expandStrokeBoundingBox = function (t, e) { 15066 var i = 0; 15067 if (t.keyframes) { 15068 for (var s = 0; s < t.keyframes.length; s += 1) { 15069 var r = t.keyframes[s].s; 15070 r > i && (i = r); 15071 } 15072 i *= t.mult; 15073 } else i = t.v * t.mult; 15074 (e.x -= i), (e.xMax += i), (e.y -= i), (e.yMax += i); 15075 }), 15076 (HShapeElement.prototype.currentBoxContains = function (t) { 15077 return ( 15078 this.currentBBox.x <= t.x && 15079 this.currentBBox.y <= t.y && 15080 this.currentBBox.width + this.currentBBox.x >= t.x + t.width && 15081 this.currentBBox.height + this.currentBBox.y >= t.y + t.height 15082 ); 15083 }), 15084 (HShapeElement.prototype.renderInnerContent = function () { 15085 if ( 15086 (this._renderShapeFrame(), 15087 !this.hidden && (this._isFirstFrame || this._mdf)) 15088 ) { 15089 var t = this.tempBoundingBox, 15090 e = 999999; 15091 if ( 15092 ((t.x = 999999), 15093 (t.xMax = -e), 15094 (t.y = e), 15095 (t.yMax = -e), 15096 this.calculateBoundingBox(this.itemsData, t), 15097 (t.width = t.xMax < t.x ? 0 : t.xMax - t.x),
15098 (t.height = t.yMax < t.y ? 0 : t.yMax - t.y), 15099 !this.currentBoxContains(t)) 15100 ) { 15101 var i = !1; 15102 if ( 15103 (this.currentBBox.w !== t.width && 15104 ((this.currentBBox.w = t.width), 15105 this.shapeCont.setAttribute("width", t.width), 15106 (i = !0)), 15107 this.currentBBox.h !== t.height && 15108 ((this.currentBBox.h = t.height), 15109 this.shapeCont.setAttribute("height", t.height), 15110 (i = !0)), 15111 i || 15112 this.currentBBox.x !== t.x || 15113 this.currentBBox.y !== t.y) 15114 ) { 15115 (this.currentBBox.w = t.width), 15116 (this.currentBBox.h = t.height), 15117 (this.currentBBox.x = t.x), 15118 (this.currentBBox.y = t.y), 15119 this.shapeCont.setAttribute( 15120 "viewBox", 15121 this.currentBBox.x + 15122 " " + 15123 this.currentBBox.y + 15124 " " + 15125 this.currentBBox.w + 15126 " " + 15127 this.currentBBox.h 15128 ); 15129 var s = this.shapeCont.style, 15130 r = 15131 "translate(" + 15132 this.currentBBox.x + 15133 "px," + 15134 this.currentBBox.y + 15135 "px)"; 15136 (s.transform = r), (s.webkitTransform = r); 15137 } 15138 } 15139 } 15140 }), 15141 extendPrototype( 15142 [ 15143 BaseElement, 15144 TransformElement, 15145 HBaseElement, 15146 HierarchyElement, 15147 FrameElement, 15148 RenderableDOMElement, 15149 ITextElement, 15150 ], 15151 HTextElement 15152 ), 15153 (HTextElement.prototype.createContent = function () { 15154 if (((this.isMasked = this.checkMasks()), this.isMasked)) { 15155 (this.renderType = "svg"), 15156 (this.compW = this.comp.data.w), 15157 (this.compH = this.comp.data.h), 15158 this.svgElement.setAttribute("width", this.compW), 15159 this.svgElement.setAttribute("height", this.compH); 15160 var t = createNS("g"); 15161 this.maskedElement.appendChild(t), (this.innerElem = t); 15162 } else 15163 (this.renderType = "html"), 15164 (this.innerElem = this.layerElement); 15165 this.checkParenting(); 15166 }), 15167 (HTextElement.prototype.buildNewText = function () { 15168 var t = this.textProperty.currentData; 15169 this.renderedLetters = createSizedArray(t.l ? t.l.length : 0); 15170 var e = this.innerElem.style, 15171 i = t.fc ? this.buildColor(t.fc) : "rgba(0,0,0,0)"; 15172 (e.fill = i), 15173 (e.color = i), 15174 t.sc && 15175 ((e.stroke = this.buildColor(t.sc)), 15176 (e.strokeWidth = t.sw + "px")); 15177 var s, 15178 r, 15179 n = this.globalData.fontManager.getFontByName(t.f); 15180 if (!this.globalData.fontManager.chars) 15181 if ( 15182 ((e.fontSize = t.finalSize + "px"), 15183 (e.lineHeight = t.finalSize + "px"), 15184 n.fClass) 15185 ) 15186 this.innerElem.className = n.fClass; 15187 else { 15188 e.fontFamily = n.fFamily; 15189 var a = t.fWeight; 15190 (e.fontStyle = t.fStyle), (e.fontWeight = a); 15191 } 15192 var o, 15193 h, 15194 l, 15195 p = t.l; 15196 r = p.length; 15197 var f, 15198 c = this.mHelper, 15199 u = "", 15200 m = 0; 15201 for (s = 0; s < r; s += 1) { 15202 if ( 15203 (this.globalData.fontManager.chars 15204 ? (this.textPaths[m] 15205 ? (o = this.textPaths[m]) 15206 : ((o = createNS("path")).setAttribute( 15207 "stroke-linecap", 15208 lineCapEnum[1] 15209 ), 15210 o.setAttribute("stroke-linejoin", lineJoinEnum[2]), 15211 o.setAttribute("stroke-miterlimit", "4")), 15212 this.isMasked || 15213 (this.textSpans[m] 15214 ? (l = (h = this.textSpans[m]).children[0]) 15215 : (((h = createTag("div")).style.lineHeight = 0), 15216 (l = createNS("svg")).appendChild(o), 15217 styleDiv(h)))) 15218 : this.isMasked 15219 ? (o = this.textPaths[m] 15220 ? this.textPaths[m] 15221 : createNS("text")) 15222 : this.textSpans[m] 15223 ? ((h = this.textSpans[m]), (o = this.textPaths[m])) 15224 : (styleDiv((h = createTag("span"))), 15225 styleDiv((o = createTag("span"))), 15226 h.appendChild(o)), 15227 this.globalData.fontManager.chars) 15228 ) { 15229 var d, 15230 g = this.globalData.fontManager.getCharData( 15231 t.finalText[s], 15232 n.fStyle, 15233 this.globalData.fontManager.getFontByName(t.f).fFamily 15234 ); 15235 if ( 15236 ((d = g ? g.data : null),
15237 c.reset(), 15238 d && 15239 d.shapes && 15240 d.shapes.length && 15241 ((f = d.shapes[0].it), 15242 c.scale(t.finalSize / 100, t.finalSize / 100), 15243 (u = this.createPathShape(c, f)), 15244 o.setAttribute("d", u)), 15245 this.isMasked) 15246 ) 15247 this.innerElem.appendChild(o); 15248 else { 15249 if ((this.innerElem.appendChild(h), d && d.shapes)) { 15250 document.body.appendChild(l); 15251 var v = l.getBBox(); 15252 l.setAttribute("width", v.width + 2), 15253 l.setAttribute("height", v.height + 2), 15254 l.setAttribute( 15255 "viewBox", 15256 v.x - 15257 1 + 15258 " " + 15259 (v.y - 1) + 15260 " " + 15261 (v.width + 2) + 15262 " " + 15263 (v.height + 2) 15264 ); 15265 var y = l.style, 15266 b = 15267 "translate(" + (v.x - 1) + "px," + (v.y - 1) + "px)"; 15268 (y.transform = b), 15269 (y.webkitTransform = b), 15270 (p[s].yOffset = v.y - 1); 15271 } else 15272 l.setAttribute("width", 1), l.setAttribute("height", 1); 15273 h.appendChild(l); 15274 } 15275 } else if ( 15276 ((o.textContent = p[s].val), 15277 o.setAttributeNS( 15278 "http://www.w3.org/XML/1998/namespace", 15279 "xml:space", 15280 "preserve" 15281 ), 15282 this.isMasked) 15283 ) 15284 this.innerElem.appendChild(o); 15285 else { 15286 this.innerElem.appendChild(h); 15287 var x = o.style, 15288 _ = "translate3d(0," + -t.finalSize / 1.2 + "px,0)"; 15289 (x.transform = _), (x.webkitTransform = _); 15290 } 15291 this.isMasked 15292 ? (this.textSpans[m] = o) 15293 : (this.textSpans[m] = h), 15294 (this.textSpans[m].style.display = "block"), 15295 (this.textPaths[m] = o), 15296 (m += 1); 15297 } 15298 for (; m < this.textSpans.length; ) 15299 (this.textSpans[m].style.display = "none"), (m += 1); 15300 }), 15301 (HTextElement.prototype.renderInnerContent = function () { 15302 var t; 15303 if ((this.validateText(), this.data.singleShape)) { 15304 if (!this._isFirstFrame && !this.lettersChangedFlag) return; 15305 if (this.isMasked && this.finalTransform._matMdf) { 15306 this.svgElement.setAttribute( 15307 "viewBox", 15308 -this.finalTransform.mProp.p.v[0] + 15309 " " + 15310 -this.finalTransform.mProp.p.v[1] + 15311 " " + 15312 this.compW + 15313 " " + 15314 this.compH 15315 ), 15316 (t = this.svgElement.style); 15317 var e = 15318 "translate(" + 15319 -this.finalTransform.mProp.p.v[0] + 15320 "px," + 15321 -this.finalTransform.mProp.p.v[1] + 15322 "px)"; 15323 (t.transform = e), (t.webkitTransform = e); 15324 } 15325 } 15326 if ( 15327 (this.textAnimator.getMeasures( 15328 this.textProperty.currentData, 15329 this.lettersChangedFlag 15330 ), 15331 this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) 15332 ) { 15333 var i, 15334 s, 15335 r, 15336 n, 15337 a, 15338 o = 0, 15339 h = this.textAnimator.renderedLetters, 15340 l = this.textProperty.currentData.l; 15341 for (s = l.length, i = 0; i < s; i += 1) 15342 l[i].n 15343 ? (o += 1) 15344 : ((n = this.textSpans[i]), 15345 (a = this.textPaths[i]), 15346 (r = h[o]), 15347 (o += 1), 15348 r._mdf.m && 15349 (this.isMasked 15350 ? n.setAttribute("transform", r.m) 15351 : ((n.style.webkitTransform = r.m), 15352 (n.style.transform = r.m))), 15353 (n.style.opacity = r.o), 15354 r.sw && r._mdf.sw && a.setAttribute("stroke-width", r.sw), 15355 r.sc && r._mdf.sc && a.setAttribute("stroke", r.sc), 15356 r.fc && 15357 r._mdf.fc && 15358 (a.setAttribute("fill", r.fc), (a.style.color = r.fc))); 15359 if ( 15360 this.innerElem.getBBox && 15361 !this.hidden && 15362 (this._isFirstFrame || this._mdf) 15363 ) { 15364 var p = this.innerElem.getBBox(); 15365 if ( 15366 (this.currentBBox.w !== p.width && 15367 ((this.currentBBox.w = p.width), 15368 this.svgElement.setAttribute("width", p.width)), 15369 this.currentBBox.h !== p.height && 15370 ((this.currentBBox.h = p.height), 15371 this.svgElement.setAttribute("height", p.height)), 15372 this.currentBBox.w !== p.width + 2 || 15373 this.currentBBox.h !== p.height + 2 || 15374 this.currentBBox.x !== p.x - 1 || 15375 this.currentBBox.y !== p.y - 1) 15376 ) { 15377 (this.currentBBox.w = p.width + 2), 15378 (this.currentBBox.h = p.height + 2), 15379 (this.currentBBox.x = p.x - 1), 15380 (this.currentBBox.y = p.y - 1), 15381 this.svgElement.setAttribute( 15382 "viewBox", 15383 this.currentBBox.x + 15384 " " + 15385 this.currentBBox.y + 15386 " " + 15387 this.currentBBox.w + 15388 " " + 15389 this.currentBBox.h 15390 ), 15391 (t = this.svgElement.style); 15392 var f = 15393 "translate(" + 15394 this.currentBBox.x + 15395 "px," + 15396 this.currentBBox.y + 15397 "px)"; 15398 (t.transform = f), (t.webkitTransform = f); 15399 } 15400 } 15401 } 15402 }), 15403 extendPrototype( 15404 [BaseElement, FrameElement, HierarchyElement], 15405 HCameraElement 15406 ), 15407 (HCameraElement.prototype.setup = function () { 15408 var t, 15409 e, 15410 i, 15411 s, 15412 r = this.comp.threeDElements.length; 15413 for (t = 0; t < r; t += 1) 15414 if ("3d" === (e = this.comp.threeDElements[t]).type) { 15415 (i = e.perspectiveElem.style), (s = e.container.style); 15416 var n = this.pe.v + "px", 15417 a = "0px 0px 0px", 15418 o = "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"; 15419 (i.perspective = n), 15420 (i.webkitPerspective = n), 15421 (s.transformOrigin = a), 15422 (s.mozTransformOrigin = a), 15423 (s.webkitTransformOrigin = a), 15424 (i.transform = o), 15425 (i.webkitTransform = o); 15426 } 15427 }), 15428 (HCameraElement.prototype.createElements = function () {}), 15429 (HCameraElement.prototype.hide = function () {}), 15430 (HCameraElement.prototype.renderFrame = function () { 15431 var t, 15432 e, 15433 i = this._isFirstFrame; 15434 if (this.hierarchy) 15435 for (e = this.hierarchy.length, t = 0; t < e; t += 1) 15436 i = this.hierarchy[t].finalTransform.mProp._mdf || i; 15437 if ( 15438 i || 15439 this.pe._mdf || 15440 (this.p && this.p._mdf) || 15441 (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) || 15442 this.rx._mdf || 15443 this.ry._mdf || 15444 this.rz._mdf || 15445 this.or._mdf || 15446 (this.a && this.a._mdf) 15447 ) { 15448 if ((this.mat.reset(), this.hierarchy)) 15449 for (t = e = this.hierarchy.length - 1; t >= 0; t -= 1) { 15450 var s, 15451 r, 15452 n, 15453 a = this.hierarchy[t].finalTransform.mProp; 15454 this.mat.translate(-a.p.v[0], -a.p.v[1], a.p.v[2]), 15455 this.mat 15456 .rotateX(-a.or.v[0]) 15457 .rotateY(-a.or.v[1]) 15458 .rotateZ(a.or.v[2]), 15459 this.mat 15460 .rotateX(-a.rx.v) 15461 .rotateY(-a.ry.v) 15462 .rotateZ(a.rz.v), 15463 this.mat.scale(1 / a.s.v[0], 1 / a.s.v[1], 1 / a.s.v[2]), 15464 this.mat.translate(a.a.v[0], a.a.v[1], a.a.v[2]); 15465 } 15466 if ( 15467 (this.p 15468 ? this.mat.translate( 15469 -this.p.v[0], 15470 -this.p.v[1], 15471 this.p.v[2] 15472 ) 15473 : this.mat.translate(-this.px.v, -this.py.v, this.pz.v), 15474 this.a) 15475 ) { 15476 var o = this.p 15477 ? [ 15478 this.p.v[0] - this.a.v[0], 15479 this.p.v[1] - this.a.v[1], 15480 this.p.v[2] - this.a.v[2], 15481 ] 15482 : [ 15483 this.px.v - this.a.v[0], 15484 this.py.v - this.a.v[1], 15485 this.pz.v - this.a.v[2], 15486 ], 15487 h = Math.sqrt( 15488 Math.pow(o[0], 2) + Math.pow(o[1], 2) + Math.pow(o[2], 2) 15489 ), 15490 l = [o[0] / h, o[1] / h, o[2] / h], 15491 p = Math.sqrt(l[2] * l[2] + l[0] * l[0]), 15492 f = Math.atan2(l[1], p), 15493 c = Math.atan2(l[0], -l[2]); 15494 this.mat.rotateY(c).rotateX(-f); 15495 } 15496 this.mat 15497 .rotateX(-this.rx.v) 15498 .rotateY(-this.ry.v) 15499 .rotateZ(this.rz.v), 15500 this.mat 15501 .rotateX(-this.or.v[0]) 15502 .rotateY(-this.or.v[1]) 15503 .rotateZ(this.or.v[2]), 15504 this.mat.translate( 15505 this.globalData.compSize.w / 2, 15506 this.globalData.compSize.h / 2, 15507 0 15508 ), 15509 this.mat.translate(0, 0, this.pe.v); 15510 var u = !this._prevMat.equals(this.mat); 15511 if ((u || this.pe._mdf) && this.comp.threeDElements) { 15512 for ( 15513 e = this.comp.threeDElements.length, t = 0; 15514 t < e; 15515 t += 1 15516 ) 15517 if ("3d" === (s = this.comp.threeDElements[t]).type) { 15518 if (u) { 15519 var m = this.mat.toCSS(); 15520 ((n = s.container.style).transform = m), 15521 (n.webkitTransform = m); 15522 } 15523 this.pe._mdf && 15524 (((r = s.perspectiveElem.style).perspective = 15525 this.pe.v + "px"), 15526 (r.webkitPerspective = this.pe.v + "px")); 15527 } 15528 this.mat.clone(this._prevMat); 15529 } 15530 } 15531 this._isFirstFrame = !1; 15532 }), 15533 (HCameraElement.prototype.prepareFrame = function (t) { 15534 this.prepareProperties(t, !0); 15535 }), 15536 (HCameraElement.prototype.destroy = function () {}), 15537 (HCameraElement.prototype.getBaseElement = function () { 15538 return null; 15539 }), 15540 extendPrototype( 15541 [ 15542 BaseElement, 15543 TransformElement, 15544 HBaseElement, 15545 HSolidElement, 15546 HierarchyElement, 15547 FrameElement, 15548 RenderableElement, 15549 ], 15550 HImageElement 15551 ), 15552 (HImageElement.prototype.createContent = function () { 15553 var t = this.globalData.getAssetsPath(this.assetData), 15554 e = new Image(); 15555 this.data.hasMask 15556 ? ((this.imageElem = createNS("image")), 15557 this.imageElem.setAttribute("width", this.assetData.w + "px"), 15558 this.imageElem.setAttribute( 15559 "height", 15560 this.assetData.h + "px" 15561 ), 15562 this.imageElem.setAttributeNS( 15563 "http://www.w3.org/1999/xlink", 15564 "href", 15565 t 15566 ), 15567 this.layerElement.appendChild(this.imageElem), 15568 this.baseElement.setAttribute("width", this.assetData.w), 15569 this.baseElement.setAttribute("height", this.assetData.h)) 15570 : this.layerElement.appendChild(e), 15571 (e.crossOrigin = "anonymous"), 15572 (e.src = t), 15573 this.data.ln && 15574 this.baseElement.setAttribute("id", this.data.ln); 15575 }), 15576 extendPrototype([BaseRenderer], HybridRendererBase), 15577 (HybridRendererBase.prototype.buildItem = 15578 SVGRenderer.prototype.buildItem), 15579 (HybridRendererBase.prototype.checkPendingElements = function () { 15580 for (; this.pendingElements.length; ) 15581 this.pendingElements.pop().checkParenting(); 15582 }), 15583 (HybridRendererBase.prototype.appendElementInPos = function (t, e) { 15584 var i = t.getBaseElement(); 15585 if (i) { 15586 var s = this.layers[e]; 15587 if (s.ddd && this.supports3d) this.addTo3dContainer(i, e); 15588 else if (this.threeDElements) this.addTo3dContainer(i, e); 15589 else { 15590 for (var r, n, a = 0; a < e; ) 15591 this.elements[a] && 15592 !0 !== this.elements[a] && 15593 this.elements[a].getBaseElement && 15594 ((n = this.elements[a]), 15595 (r = 15596 (this.layers[a].ddd 15597 ? this.getThreeDContainerByPos(a) 15598 : n.getBaseElement()) || r)), 15599 (a += 1); 15600 r 15601 ? (s.ddd && this.supports3d) || 15602 this.layerElement.insertBefore(i, r) 15603 : (s.ddd && this.supports3d) || 15604 this.layerElement.appendChild(i); 15605 } 15606 } 15607 }), 15608 (HybridRendererBase.prototype.createShape = function (t) { 15609 return this.supports3d 15610 ? new HShapeElement(t, this.globalData, this) 15611 : new SVGShapeElement(t, this.globalData, this); 15612 }), 15613 (HybridRendererBase.prototype.createText = function (t) { 15614 return this.supports3d 15615 ? new HTextElement(t, this.globalData, this) 15616 : new SVGTextLottieElement(t, this.globalData, this); 15617 }), 15618 (HybridRendererBase.prototype.createCamera = function (t) { 15619 return ( 15620 (this.camera = new HCameraElement(t, this.globalData, this)), 15621 this.camera 15622 ); 15623 }), 15624 (HybridRendererBase.prototype.cre
15624ateImage = function (t) { 15625 return this.supports3d 15626 ? new HImageElement(t, this.globalData, this) 15627 : new IImageElement(t, this.globalData, this); 15628 }), 15629 (HybridRendererBase.prototype.createSolid = function (t) { 15630 return this.supports3d 15631 ? new HSolidElement(t, this.globalData, this) 15632 : new ISolidElement(t, this.globalData, this); 15633 }), 15634 (HybridRendererBase.prototype.createNull = 15635 SVGRenderer.prototype.createNull), 15636 (HybridRendererBase.prototype.getThreeDContainerByPos = function ( 15637 t 15638 ) { 15639 for (var e = 0, i = this.threeDElements.length; e < i; ) { 15640 if ( 15641 this.threeDElements[e].startPos <= t && 15642 this.threeDElements[e].endPos >= t 15643 ) 15644 return this.threeDElements[e].perspectiveElem; 15645 e += 1; 15646 } 15647 return null; 15648 }), 15649 (HybridRendererBase.prototype.createThreeDContainer = function ( 15650 t, 15651 e 15652 ) { 15653 var i, 15654 s, 15655 r = createTag("div"); 15656 styleDiv(r); 15657 var n = createTag("div"); 15658 if ((styleDiv(n), "3d" === e)) { 15659 ((i = r.style).width = this.globalData.compSize.w + "px"), 15660 (i.height = this.globalData.compSize.h + "px"); 15661 var a = "50% 50%"; 15662 (i.webkitTransformOrigin = a), 15663 (i.mozTransformOrigin = a), 15664 (i.transformOrigin = a); 15665 var o = "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"; 15666 ((s = n.style).transform = o), (s.webkitTransform = o); 15667 } 15668 r.appendChild(n); 15669 var h = { 15670 container: n, 15671 perspectiveElem: r, 15672 startPos: t, 15673 endPos: t, 15674 type: e, 15675 }; 15676 return this.threeDElements.push(h), h; 15677 }), 15678 (HybridRendererBase.prototype.build3dContainers = function () { 15679 var t, 15680 e, 15681 i = this.layers.length, 15682 s = ""; 15683 for (t = 0; t < i; t += 1) 15684 this.layers[t].ddd && 3 !== this.layers[t].ty 15685 ? "3d" !== s && 15686 ((s = "3d"), (e = this.createThreeDContainer(t, "3d"))) 15687 : "2d" !== s && 15688 ((s = "2d"), (e = this.createThreeDContainer(t, "2d"))), 15689 (e.endPos = Math.max(e.endPos, t)); 15690 for (t = (i = this.threeDElements.length) - 1; t >= 0; t -= 1) 15691 this.resizerElem.appendChild( 15692 this.threeDElements[t].perspectiveElem 15693 ); 15694 }), 15695 (HybridRendererBase.prototype.addTo3dContainer = function (t, e) { 15696 for (var i = 0, s = this.threeDElements.length; i < s; ) { 15697 if (e <= this.threeDElements[i].endPos) { 15698 for (var r, n = this.threeDElements[i].startPos; n < e; ) 15699 this.elements[n] && 15700 this.elements[n].getBaseElement && 15701 (r = this.elements[n].getBaseElement()), 15702 (n += 1); 15703 r 15704 ? this.threeDElements[i].container.insertBefore(t, r) 15705 : this.threeDElements[i].container.appendChild(t); 15706 break; 15707 } 15708 i += 1; 15709 } 15710 }), 15711 (HybridRendererBase.prototype.configAnimation = function (t) { 15712 var e = createTag("div"), 15713 i = this.animationItem.wrapper, 15714 s = e.style; 15715 (s.width = t.w + "px"), 15716 (s.height = t.h + "px"), 15717 (this.resizerElem = e), 15718 styleDiv(e), 15719 (s.transformStyle = "flat"), 15720 (s.mozTransformStyle = "flat"), 15721 (s.webkitTransformStyle = "flat"), 15722 this.renderConfig.className && 15723 e.setAttribute("class", this.renderConfig.className), 15724 i.appendChild(e), 15725 (s.overflow = "hidden"); 15726 var r = createNS("svg"); 15727 r.setAttribute("width", "1"), 15728 r.setAttribute("height", "1"), 15729 styleDiv(r), 15730 this.resizerElem.appendChild(r); 15731 var n = createNS("defs"); 15732 r.appendChild(n), 15733 (this.data = t), 15734 this.setupGlobalData(t, r), 15735 (this.globalData.defs = n),
15736 (this.layers = t.layers), 15737 (this.layerElement = this.resizerElem), 15738 this.build3dContainers(), 15739 this.updateContainerSize(); 15740 }), 15741 (HybridRendererBase.prototype.destroy = function () { 15742 this.animationItem.wrapper && 15743 (this.animationItem.wrapper.innerText = ""), 15744 (this.animationItem.container = null), 15745 (this.globalData.defs = null); 15746 var t, 15747 e = this.layers ? this.layers.length : 0; 15748 for (t = 0; t < e; t += 1) 15749 this.elements[t] && 15750 this.elements[t].destroy && 15751 this.elements[t].destroy(); 15752 (this.elements.length = 0), 15753 (this.destroyed = !0), 15754 (this.animationItem = null); 15755 }), 15756 (HybridRendererBase.prototype.updateContainerSize = function () { 15757 var t, 15758 e, 15759 i, 15760 s, 15761 r = this.animationItem.wrapper.offsetWidth, 15762 n = this.animationItem.wrapper.offsetHeight, 15763 a = r / n; 15764 this.globalData.compSize.w / this.globalData.compSize.h > a 15765 ? ((t = r / this.globalData.compSize.w), 15766 (e = r / this.globalData.compSize.w), 15767 (i = 0), 15768 (s = 15769 (n - 15770 this.globalData.compSize.h * 15771 (r / this.globalData.compSize.w)) / 15772 2)) 15773 : ((t = n / this.globalData.compSize.h), 15774 (e = n / this.globalData.compSize.h), 15775 (i = 15776 (r - 15777 this.globalData.compSize.w * 15778 (n / this.globalData.compSize.h)) / 15779 2), 15780 (s = 0)); 15781 var o = this.resizerElem.style; 15782 (o.webkitTransform = 15783 "matrix3d(" + 15784 t + 15785 ",0,0,0,0," + 15786 e + 15787 ",0,0,0,0,1,0," + 15788 i + 15789 "," + 15790 s + 15791 ",0,1)"), 15792 (o.transform = o.webkitTransform); 15793 }), 15794 (HybridRendererBase.prototype.renderFrame = 15795 SVGRenderer.prototype.renderFrame), 15796 (HybridRendererBase.prototype.hide = function () { 15797 this.resizerElem.style.display = "none"; 15798 }), 15799 (HybridRendererBase.prototype.show = function () { 15800 this.resizerElem.style.display = "block"; 15801 }), 15802 (HybridRendererBase.prototype.initItems = function () { 15803 if ((this.buildAllItems(), this.camera)) this.camera.setup(); 15804 else { 15805 var t, 15806 e = this.globalData.compSize.w, 15807 i = this.globalData.compSize.h, 15808 s = this.threeDElements.length; 15809 for (t = 0; t < s; t += 1) { 15810 var r = this.threeDElements[t].perspectiveElem.style; 15811 (r.webkitPerspective = 15812 Math.sqrt(Math.pow(e, 2) + Math.pow(i, 2)) + "px"), 15813 (r.perspective = r.webkitPerspective); 15814 } 15815 } 15816 }), 15817 (HybridRendererBase.prototype.searchExtraCompositions = function ( 15818 t 15819 ) { 15820 var e, 15821 i = t.length, 15822 s = createTag("div"); 15823 for (e = 0; e < i; e += 1) 15824 if (t[e].xt) { 15825 var r = this.createComp(t[e], s, this.globalData.comp, null); 15826 r.initExpressions(), 15827 this.globalData.projectInterface.registerComposition(r); 15828 } 15829 }), 15830 extendPrototype( 15831 [HybridRendererBase, ICompElement, HBaseElement], 15832 HCompElement 15833 ), 15834 (HCompElement.prototype._createBaseContainerElements = 15835 HCompElement.prototype.createContainerElements), 15836 (HCompElement.prototype.createContainerElements = function () { 15837 this._createBaseContainerElements(), 15838 this.data.hasMask 15839 ? (this.svgElement.setAttribute("width", this.data.w), 15840 this.svgElement.setAttribute("height", this.data.h), 15841 (this.transformedElement = this.baseElement)) 15842 : (this.transformedElement = this.layerElement); 15843 }), 15844 (HCompElement.prototype.addTo3dContainer = function (t, e) { 15845 for (var i, s = 0; s < e; ) 15846 this.elements[s] && 15847 this.elements[s].getBaseElement && 15848 (i = this.elements[s].getBaseElement()), 15849 (s += 1); 15850 i 15851 ? this.layerElement.insertBefore(t, i) 15852 : this.layerElement.appendChild(t); 15853 }), 15854 (HCompElement.prototype.createComp = function (t) { 15855 return this.supports3d 15856 ? new HCompElement(t, this.globalData, this) 15857 : new SVGCompElement(t, this.globalData, this); 15858 }), 15859 extendPrototype([HybridRendererBase], HybridRenderer), 15860 (HybridRenderer.prototype.createComp = function (t) { 15861 return this.supports3d 15862 ? new HCompElement(t, this.globalData, this) 15863 : new SVGCompElement(t, this.globalData, this); 15864 }); 15865 var CompExpressionInterface = function (t) { 15866 function e(e) { 15867 for (var i = 0, s = t.layers.length; i < s; ) { 15868 if (t.layers[i].nm === e || t.layers[i].ind === e) 15869 return t.elements[i].layerInterface; 15870 i += 1; 15871 } 15872 return null; 15873 } 15874 return ( 15875 Object.defineProperty(e, "_name", { value: t.data.nm }), 15876 (e.layer = e), 15877 (e.pixelAspect = 1), 15878 (e.height = t.data.h || t.globalData.compSize.h), 15879 (e.width = t.data.w || t.globalData.compSize.w), 15880 (e.pixelAspect = 1), 15881 (e.frameDuration = 1 / t.globalData.frameRate),
15882 (e.displayStartTime = 0), 15883 (e.numLayers = t.layers.length), 15884 e 15885 ); 15886 }; 15887 function _typeof$2(t) { 15888 return (_typeof$2 = 15889 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 15890 ? function (t) { 15891 return typeof t; 15892 } 15893 : function (t) { 15894 return t && 15895 "function" == typeof Symbol && 15896 t.constructor === Symbol && 15897 t !== Symbol.prototype 15898 ? "symbol" 15899 : typeof t; 15900 })(t); 15901 } 15902 function seedRandom(t, e) { 15903 var i = this, 15904 s = 256, 15905 r = "random", 15906 n = e.pow(s, 6), 15907 a = e.pow(2, 52), 15908 o = 2 * a, 15909 h = 255; 15910 function l(t) { 15911 var e, 15912 i = t.length, 15913 r = this, 15914 n = 0, 15915 a = (r.i = r.j = 0), 15916 o = (r.S = []); 15917 for (i || (t = [i++]); n < s; ) o[n] = n++; 15918 for (n = 0; n < s; n++) 15919 (o[n] = o[(a = h & (a + t[n % i] + (e = o[n])))]), (o[a] = e); 15920 r.g = function (t) { 15921 for (var e, i = 0, n = r.i, a = r.j, o = r.S; t--; ) 15922 (e = o[(n = h & (n + 1))]), 15923 (i = 15924 i * s + 15925 o[h & ((o[n] = o[(a = h & (a + e))]) + (o[a] = e))]); 15926 return (r.i = n), (r.j = a), i; 15927 }; 15928 } 15929 function p(t, e) { 15930 return (e.i = t.i), (e.j = t.j), (e.S = t.S.slice()), e; 15931 } 15932 function f(t, e) { 15933 var i, 15934 s = [], 15935 r = _typeof$2(t); 15936 if (e && "object" == r) 15937 for (i in t) 15938 try { 15939 s.push(f(t[i], e - 1)); 15940 } catch (t) {} 15941 return s.length ? s : "string" == r ? t : t + "\0"; 15942 } 15943 function c(t, e) { 15944 for (var i, s = t + "", r = 0; r < s.length; ) 15945 e[h & r] = h & ((i ^= 19 * e[h & r]) + s.charCodeAt(r++)); 15946 return u(e); 15947 } 15948 function u(t) { 15949 return String.fromCharCode.apply(0, t); 15950 } 15951 (e["seed" + r] = function (h, m, d) { 15952 var g = [], 15953 v = c( 15954 f( 15955 (m = !0 === m ? { entropy: !0 } : m || {}).entropy 15956 ? [h, u(t)] 15957 : null === h 15958 ? (function () { 15959 try { 15960 var e = new Uint8Array(s); 15961 return ( 15962 (i.crypto || i.msCrypto).getRandomValues(e), u(e) 15963 ); 15964 } catch (e) { 15965 var r = i.navigator, 15966 n = r && r.plugins; 15967 return [+new Date(), i, n, i.screen, u(t)]; 15968 } 15969 })() 15970 : h, 15971 3 15972 ), 15973 g 15974 ), 15975 y = new l(g), 15976 b = function () { 15977 for (var t = y.g(6), e = n, i = 0; t < a; ) 15978 (t = (t + i) * s), (e *= s), (i = y.g(1)); 15979 for (; t >= o; ) (t /= 2), (e /= 2), (i >>>= 1); 15980 return (t + i) / e; 15981 }; 15982 return ( 15983 (b.int32 = function () { 15984 return 0 | y.g(4); 15985 }), 15986 (b.quick = function () { 15987 return y.g(4) / 0x100000000; 15988 }), 15989 (b.double = b), 15990 c(u(y.S), t), 15991 ( 15992 m.pass || 15993 d || 15994 function (t, i, s, n) { 15995 return ( 15996 n && 15997 (n.S && p(n, y), 15998 (t.state = function () { 15999 return p(y, {}); 16000 })), 16001 s ? ((e[r] = t), i) : t 16002 ); 16003 }
16004 )(b, v, "global" in m ? m.global : this == e, m.state) 16005 ); 16006 }), 16007 c(e.random(), t); 16008 } 16009 function initialize$2(t) { 16010 seedRandom([], t); 16011 } 16012 var propTypes = { SHAPE: "shape" }; 16013 function _typeof$1(t) { 16014 return (_typeof$1 = 16015 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 16016 ? function (t) { 16017 return typeof t; 16018 } 16019 : function (t) { 16020 return t && 16021 "function" == typeof Symbol && 16022 t.constructor === Symbol && 16023 t !== Symbol.prototype 16024 ? "symbol" 16025 : typeof t; 16026 })(t); 16027 } 16028 var ExpressionManager = (function () { 16029 var ob = {}, 16030 Math = BMMath, 16031 window = null, 16032 document = null, 16033 XMLHttpRequest = null, 16034 fetch = null, 16035 frames = null, 16036 _lottieGlobal = {}; 16037 function resetFrame() { 16038 _lottieGlobal = {}; 16039 } 16040 function $bm_isInstanceOfArray(t) { 16041 return ( 16042 t.constructor === Array || t.constructor === Float32Array 16043 ); 16044 } 16045 function isNumerable(t, e) { 16046 return ( 16047 "number" === t || 16048 e instanceof Number || 16049 "boolean" === t || 16050 "string" === t 16051 ); 16052 } 16053 function $bm_neg(t) { 16054 var e = _typeof$1(t); 16055 if ("number" === e || t instanceof Number || "boolean" === e) 16056 return -t; 16057 if ($bm_isInstanceOfArray(t)) { 16058 var i, 16059 s = t.length, 16060 r = []; 16061 for (i = 0; i < s; i += 1) r[i] = -t[i]; 16062 return r; 16063 } 16064 return t.propType ? t.v : -t; 16065 } 16066 initialize$2(BMMath); 16067 var easeInBez = BezierFactory.getBezierEasing( 16068 0.333, 16069 0, 16070 0.833, 16071 0.833, 16072 "easeIn" 16073 ).get, 16074 easeOutBez = BezierFactory.getBezierEasing( 16075 0.167, 16076 0.167, 16077 0.667, 16078 1, 16079 "easeOut" 16080 ).get, 16081 easeInOutBez = BezierFactory.getBezierEasing( 16082 0.33, 16083 0, 16084 0.667, 16085 1, 16086 "easeInOut" 16087 ).get; 16088 function sum(t, e) { 16089 var i = _typeof$1(t), 16090 s = _typeof$1(e); 16091 if ( 16092 (isNumerable(i, t) && isNumerable(s, e)) || 16093 "string" === i || 16094 "string" === s 16095 ) 16096 return t + e; 16097 if ($bm_isInstanceOfArray(t) && isNumerable(s, e)) 16098 return ((t = t.slice(0))[0] += e), t; 16099 if (isNumerable(i, t) && $bm_isInstanceOfArray(e)) 16100 return ((e = e.slice(0))[0] = t + e[0]), e; 16101 if ($bm_isInstanceOfArray(t) && $bm_isInstanceOfArray(e)) { 16102 for ( 16103 var r = 0, n = t.length, a = e.length, o = []; 16104 r < n || r < a; 16105 16106 ) 16107 ("number" == typeof t[r] || t[r] instanceof Number) && 16108 ("number" == typeof e[r] || e[r] instanceof Number) 16109 ? (o[r] = t[r] + e[r]) 16110 : (o[r] = void 0 === e[r] ? t[r] : t[r] || e[r]), 16111 (r += 1); 16112 return o; 16113 } 16114 return 0; 16115 } 16116 var add = sum; 16117 function sub(t, e) { 16118 var i = _typeof$1(t), 16119 s = _typeof$1(e); 16120 if (isNumerable(i, t) && isNumerable(s, e)) 16121 return ( 16122 "string" === i && (t = parseInt(t, 10)), 16123 "string" === s && (e = parseInt(e, 10)), 16124 t - e 16125 ); 16126 if ($bm_isInstanceOfArray(t) && isNumerable(s, e)) 16127 return ((t = t.slice(0))[0] -= e), t; 16128 if (isNumerable(i, t) && $bm_isInstanceOfArray(e)) 16129 return ((e = e.slice(0))[0] = t - e[0]), e; 16130 if ($bm_isInstanceOfArray(t) && $bm_isInstanceOfArray(e)) { 16131 for ( 16132 var r = 0, n = t.length, a = e.length, o = []; 16133 r < n || r < a; 16134 16135 ) 16136 ("number" == typeof t[r] || t[r] instanceof Number) && 16137 ("number" == typeof e[r] || e[r] instanceof Number) 16138 ? (o[r] = t[r] - e[r]) 16139 : (o[r] = void 0 === e[r] ? t[r] : t[r] || e[r]), 16140 (r += 1); 16141 return o; 16142 } 16143 return 0; 16144 } 16145 function mul(t, e) { 16146 var i, 16147 s, 16148 r, 16149 n = _typeof$1(t),
16150 a = _typeof$1(e); 16151 if (isNumerable(n, t) && isNumerable(a, e)) return t * e; 16152 if ($bm_isInstanceOfArray(t) && isNumerable(a, e)) { 16153 for ( 16154 i = createTypedArray("float32", (r = t.length)), s = 0; 16155 s < r; 16156 s += 1 16157 ) 16158 i[s] = t[s] * e; 16159 return i; 16160 } 16161 if (isNumerable(n, t) && $bm_isInstanceOfArray(e)) { 16162 for ( 16163 i = createTypedArray("float32", (r = e.length)), s = 0; 16164 s < r; 16165 s += 1 16166 ) 16167 i[s] = t * e[s]; 16168 return i; 16169 } 16170 return 0; 16171 } 16172 function div(t, e) { 16173 var i, 16174 s, 16175 r, 16176 n = _typeof$1(t), 16177 a = _typeof$1(e); 16178 if (isNumerable(n, t) && isNumerable(a, e)) return t / e; 16179 if ($bm_isInstanceOfArray(t) && isNumerable(a, e)) { 16180 for ( 16181 i = createTypedArray("float32", (r = t.length)), s = 0; 16182 s < r; 16183 s += 1 16184 ) 16185 i[s] = t[s] / e; 16186 return i; 16187 } 16188 if (isNumerable(n, t) && $bm_isInstanceOfArray(e)) { 16189 for ( 16190 i = createTypedArray("float32", (r = e.length)), s = 0; 16191 s < r; 16192 s += 1 16193 ) 16194 i[s] = t / e[s]; 16195 return i; 16196 } 16197 return 0; 16198 } 16199 function mod(t, e) { 16200 return ( 16201 "string" == typeof t && (t = parseInt(t, 10)), 16202 "string" == typeof e && (e = parseInt(e, 10)), 16203 t % e 16204 ); 16205 } 16206 var $bm_sum = sum, 16207 $bm_sub = sub, 16208 $bm_mul = mul, 16209 $bm_div = div, 16210 $bm_mod = mod; 16211 function clamp(t, e, i) { 16212 if (e > i) { 16213 var s = i; 16214 (i = e), (e = s); 16215 } 16216 return Math.min(Math.max(t, e), i); 16217 } 16218 function radiansToDegrees(t) { 16219 return t / degToRads; 16220 } 16221 var radians_to_degrees = radiansToDegrees; 16222 function degreesToRadians(t) { 16223 return t * degToRads; 16224 } 16225 var degrees_to_radians = radiansToDegrees, 16226 helperLengthArray = [0, 0, 0, 0, 0, 0]; 16227 function length(t, e) { 16228 if ("number" == typeof t || t instanceof Number) 16229 return (e = e || 0), Math.abs(t - e); 16230 e || (e = helperLengthArray); 16231 var i, 16232 s = Math.min(t.length, e.length), 16233 r = 0; 16234 for (i = 0; i < s; i += 1) r += Math.pow(e[i] - t[i], 2); 16235 return Math.sqrt(r); 16236 } 16237 function normalize(t) { 16238 return div(t, length(t)); 16239 } 16240 function rgbToHsl(t) { 16241 var e, 16242 i, 16243 s = t[0], 16244 r = t[1], 16245 n = t[2], 16246 a = Math.max(s, r, n), 16247 o = Math.min(s, r, n), 16248 h = (a + o) / 2; 16249 if (a === o) (e = 0), (i = 0); 16250 else { 16251 var l = a - o; 16252 switch (((i = h > 0.5 ? l / (2 - a - o) : l / (a + o)), a)) { 16253 case s: 16254 e = (r - n) / l + 6 * (r < n); 16255 break; 16256 case r: 16257 e = (n - s) / l + 2; 16258 break; 16259 case n: 16260 e = (s - r) / l + 4; 16261 } 16262 e /= 6; 16263 } 16264 return [e, i, h, t[3]]; 16265 } 16266 function hue2rgb(t, e, i) { 16267 return ( 16268 i < 0 && (i += 1), 16269 i > 1 && (i -= 1), 16270 i < 1 / 6 16271 ? t + 6 * (e - t) * i 16272 : i < 0.5 16273 ? e 16274 : i < 2 / 3 16275 ? t + (e - t) * (2 / 3 - i) * 6 16276 : t 16277 ); 16278 } 16279 function hslToRgb(t) { 16280 var e, 16281 i, 16282 s, 16283 r = t[0], 16284 n = t[1], 16285 a = t[2]; 16286 if (0 === n) (e = a), (s = a), (i = a); 16287 else { 16288 var o = a < 0.5 ? a * (1 + n) : a + n - a * n, 16289 h = 2 * a - o; 16290 (e = hue2rgb(h, o, r + 1 / 3)), 16291 (i = hue2rgb(h, o, r)), 16292 (s = hue2rgb(h, o, r - 1 / 3)); 16293 } 16294 return [e, i, s, t[3]]; 16295 } 16296 function linear(t, e, i, s, r) { 16297 if ( 16298 ((void 0 !== s && void 0 !== r) || 16299 ((s = e), (r = i), (e = 0), (i = 1)), 16300 i < e) 16301 ) { 16302 var n = i; 16303 (i = e), (e = n); 16304 } 16305 if (t <= e) return s; 16306 if (t >= i) return r; 16307 var a, 16308 o = i === e ? 0 : (t - e) / (i - e); 16309 if (!s.length) return s + (r - s) * o; 16310 var h = s.length, 16311 l = createTypedArray("float32", h); 16312 for (a = 0; a < h; a += 1) l[a] = s[a] + (r[a] - s[a]) * o; 16313 return l; 16314 } 16315 function random(t, e) { 16316 if ( 16317 (void 0 === e && 16318 (void 0 === t 16319 ? ((t = 0), (e = 1)) 16320 : ((e = t), (t = void 0))), 16321 e.length) 16322 ) { 16323 var i, 16324 s = e.length; 16325 t || (t = createTypedArray("float32", s)); 16326 var r = createTypedArray("float32", s), 16327 n = BMMath.random(); 16328 for (i = 0; i < s; i += 1) r[i] = t[i] + n * (e[i] - t[i]); 16329 return r; 16330 } 16331 return void 0 === t && (t = 0), t + BMMath.random() * (e - t); 16332 } 16333 function createPath(t, e, i, s) { 16334 var r, 16335 n = t.length, 16336 a = shapePool.newElement(); 16337 a.setPathData(!!s, n); 16338 var o, 16339 h, 16340 l = [0, 0]; 16341 for (r = 0; r < n; r += 1) 16342 (o = e && e[r] ? e[r] : l), 16343 (h = i && i[r] ? i[r] : l), 16344 a.setTripleAt( 16345 t[r][0], 16346 t[r][1], 16347 h[0] + t[r][0], 16348 h[1] + t[r][1], 16349 o[0] + t[r][0], 16350 o[1] + t[r][1], 16351 r, 16352 !0 16353 ); 16354 return a; 16355 } 16356 function initiateExpression(elem, data, property) { 16357 function noOp(t) { 16358 return t; 16359 } 16360 if (!elem.globalData.renderConfig.runExpressions) return noOp; 16361 var transform, 16362 $bm_transform, 16363 content, 16364 effect, 16365 val = data.x, 16366 needsVelocity = /velocity(?![\w\d])/.test(val), 16367 _needsRandom = -1 !== val.indexOf("random"), 16368 elemType = elem.data.ty, 16369 thisProperty = property; 16370 (thisProperty._name = elem.data.nm), 16371 (thisProperty.valueAtTime = thisProperty.getValueAtTime), 16372 Object.defineProperty(thisProperty, "value", { 16373 get: function () { 16374 return thisProperty.v; 16375 }, 16376 }), 16377 (elem.comp.frameDuration = 16378 1 / elem.comp.globalData.frameRate), 16379 (elem.comp.displayStartTime = 0); 16380 var loopIn, 16381 loop_in, 16382 loopOut, 16383 loop_out, 16384 smooth, 16385 toWorld, 16386 fromWorld, 16387 fromComp, 16388 toComp, 16389 fromCompToSurface, 16390 position, 16391 rotation, 16392 anchorPoint, 16393 scale, 16394 thisLayer, 16395 thisComp, 16396 mask, 16397 valueAtTime, 16398 velocityAtTime, 16399 scoped_bm_rt, 16400 inPoint = elem.data.ip / elem.comp.globalData.frameRate, 16401 outPoint = elem.data.op / elem.comp.globalData.frameRate, 16402 width = elem.data.sw ? elem.data.sw : 0, 16403 height = elem.data.sh ? elem.data.sh : 0, 16404 name = elem.data.nm, 16405 expression_function = eval( 16406 "[function _expression_function(){" + 16407 val + 16408 ";scoped_bm_rt=$bm_rt}]" 16409 )[0], 16410 numKeys = property.kf ? data.k.length : 0, 16411 active = !this.data || !0 !== this.data.hd, 16412 wiggle = function (t, e) { 16413 var i, 16414 s, 16415 r = this.pv.length ? this.pv.length : 1, 16416 n = createTypedArray("float32", r), 16417 a = Math.floor(5 * time); 16418 for (i = 0, s = 0; i < a; ) { 16419 for (s = 0; s < r; s += 1) 16420 n[s] += -e + 2 * e * BMMath.random(); 16421 i += 1; 16422 } 16423 var o = 5 * time, 16424 h = o - Math.floor(o), 16425 l = createTypedArray("float32", r); 16426 if (r > 1) { 16427 for (s = 0; s < r; s += 1) 16428 l[s] = 16429 this.pv[s] + 16430 n[s] + 16431 (-e + 2 * e * BMMath.random()) * h; 16432 return l; 16433 } 16434 return this.pv + n[0] + (-e + 2 * e * BMMath.random()) * h; 16435 }.bind(this); 16436 function loopInDuration(t, e) { 16437 return loopIn(t, e, !0); 16438 } 16439 function loopOutDuration(t, e) { 16440 return loopOut(t, e, !0); 16441 } 16442 thisProperty.loopIn && 16443 ((loopIn = thisProperty.loopIn.bind(thisProperty)), 16444 (loop_in = loopIn)), 16445 thisProperty.loopOut && 16446 ((loopOut = thisProperty.loopOut.bind(thisProperty)), 16447 (loop_out = loopOut)), 16448 thisProperty.smooth && 16449 (smooth = thisProperty.smooth.bind(thisProperty)), 16450 this.getValueAtTime && 16451 (valueAtTime = this.getValueAtTime.bind(this)), 16452 this.getVelocityAtTime && 16453 (velocityAtTime = this.getVelocityAtTime.bind(this)); 16454 var time, 16455 velocity, 16456 value, 16457 text, 16458 textIndex, 16459 textTotal, 16460 selectorValue, 16461 comp = elem.comp.globalData.projectInterface.b
16461ind( 16462 elem.comp.globalData.projectInterface 16463 ); 16464 function lookAt(t, e) { 16465 var i = [e[0] - t[0], e[1] - t[1], e[2] - t[2]], 16466 s = 16467 Math.atan2(i[0], Math.sqrt(i[1] * i[1] + i[2] * i[2])) / 16468 degToRads; 16469 return [-Math.atan2(i[1], i[2]) / degToRads, s, 0]; 16470 } 16471 function easeOut(t, e, i, s, r) { 16472 return applyEase(easeOutBez, t, e, i, s, r); 16473 } 16474 function easeIn(t, e, i, s, r) { 16475 return applyEase(easeInBez, t, e, i, s, r); 16476 } 16477 function ease(t, e, i, s, r) { 16478 return applyEase(easeInOutBez, t, e, i, s, r); 16479 } 16480 function applyEase(t, e, i, s, r, n) { 16481 void 0 === r ? ((r = i), (n = s)) : (e = (e - i) / (s - i)), 16482 e > 1 ? (e = 1) : e < 0 && (e = 0); 16483 var a = t(e); 16484 if ($bm_isInstanceOfArray(r)) { 16485 var o, 16486 h = r.length, 16487 l = createTypedArray("float32", h); 16488 for (o = 0; o < h; o += 1) l[o] = (n[o] - r[o]) * a + r[o]; 16489 return l; 16490 } 16491 return (n - r) * a + r; 16492 } 16493 function nearestKey(t) { 16494 var e, 16495 i, 16496 s, 16497 r = data.k.length; 16498 if (data.k.length && "number" != typeof data.k[0]) 16499 if ( 16500 ((i = -1), 16501 (t *= elem.comp.globalData.frameRate) < data.k[0].t) 16502 ) 16503 (i = 1), (s = data.k[0].t); 16504 else { 16505 for (e = 0; e < r - 1; e += 1) { 16506 if (t === data.k[e].t) { 16507 (i = e + 1), (s = data.k[e].t); 16508 break; 16509 } 16510 if (t > data.k[e].t && t < data.k[e + 1].t) { 16511 t - data.k[e].t > data.k[e + 1].t - t 16512 ? ((i = e + 2), (s = data.k[e + 1].t)) 16513 : ((i = e + 1), (s = data.k[e].t)); 16514 break; 16515 } 16516 } 16517 -1 === i && ((i = e + 1), (s = data.k[e].t)); 16518 } 16519 else (i = 0), (s = 0); 16520 var n = {}; 16521 return ( 16522 (n.index = i), 16523 (n.time = s / elem.comp.globalData.frameRate), 16524 n 16525 ); 16526 } 16527 function key(t) { 16528 if (!data.k.length || "number" == typeof data.k[0]) 16529 throw Error("The property has no keyframe at index " + t); 16530 (t -= 1), 16531 (e = { 16532 time: data.k[t].t / elem.comp.globalData.frameRate, 16533 value: [], 16534 }); 16535 var e, 16536 i, 16537 s, 16538 r = Object.prototype.hasOwnProperty.call(data.k[t], "s") 16539 ? data.k[t].s 16540 : data.k[t - 1].e; 16541 for (s = r.length, i = 0; i < s; i += 1) 16542 (e[i] = r[i]), (e.value[i] = r[i]); 16543 return e; 16544 } 16545 function framesToTime(t, e) { 16546 return e || (e = elem.comp.globalData.frameRate), t / e; 16547 } 16548 function timeToFrames(t, e) { 16549 return ( 16550 t || 0 === t || (t = time), 16551 e || (e = elem.comp.globalData.frameRate), 16552 t * e 16553 ); 16554 } 16555 function seedRandom(t) { 16556 BMMath.seedrandom(randSeed + t); 16557 } 16558 function sourceRectAtTime() { 16559 return elem.sourceRectAtTime(); 16560 } 16561 function substring(t, e) { 16562 return "string" == typeof value 16563 ? void 0 === e 16564 ? value.substring(t) 16565 : value.substring(t, e) 16566 : ""; 16567 } 16568 function substr(t, e) { 16569 return "string" == typeof value 16570 ? void 0 === e 16571 ? value.substr(t) 16572 : value.substr(t, e) 16573 : ""; 16574 } 16575 function posterizeTime(t) { 16576 (time = 0 === t ? 0 : Math.floor(time * t) / t), 16577 (value = valueAtTime(time)); 16578 } 16579 var parent, 16580 index = elem.data.ind, 16581 hasParent = !(!elem.hierarchy || !elem.hierarchy.length), 16582 randSeed = Math.floor(1e6 * Math.random()), 16583 globalData = elem.globalData; 16584 function executeExpression(t) { 16585 return ( 16586 (value = t), 16587 this.frameExpressionId === elem.globalData.frameId && 16588 "textSelector" !== this.propType 16589 ? value 16590 : ("textSelector" === this.propType && 16591 ((textIndex = this.textIndex), 16592 (textTotal = this.textTotal), 16593 (selectorValue = this.selectorValue)), 16594 thisLayer || 16595 ((text = elem.layerInterface.text), 16596 (thisLayer = elem.layerInterface), 16597 (thisComp = elem.comp.compInterface), 16598 (toWorld = thisLayer.toWorld.bind(thisLayer)), 16599 (fromWorld = thisLayer.fromWorld.bind(thisLayer)), 16600 (fromComp = thisLayer.fromComp.bind(thisLayer)), 16601 (toComp = thisLayer.toComp.bind(thisLayer)), 16602 (mask = thisLayer.mask 16603 ? thisLayer.mask.bind(thisLayer) 16604 : null),
16605 (fromCompToSurface = fromComp)), 16606 transform || 16607 (($bm_transform = transform = 16608 elem.layerInterface("ADBE Transform Group")), 16609 transform && (anchorPoint = transform.anchorPoint)), 16610 4 !== elemType || 16611 content || 16612 (content = thisLayer("ADBE Root Vectors Group")), 16613 effect || (effect = thisLayer(4)), 16614 (hasParent = !( 16615 !elem.hierarchy || !elem.hierarchy.length 16616 )) && 16617 !parent && 16618 (parent = elem.hierarchy[0].layerInterface), 16619 (time = 16620 this.comp.renderedFrame / 16621 this.comp.globalData.frameRate), 16622 _needsRandom && seedRandom(randSeed + time), 16623 needsVelocity && (velocity = velocityAtTime(time)), 16624 expression_function(), 16625 (this.frameExpressionId = elem.globalData.frameId), 16626 (scoped_bm_rt = 16627 scoped_bm_rt.propType === propTypes.SHAPE 16628 ? scoped_bm_rt.v 16629 : scoped_bm_rt)) 16630 ); 16631 } 16632 return ( 16633 (executeExpression.__preventDeadCodeRemoval = [ 16634 $bm_transform, 16635 anchorPoint, 16636 time, 16637 velocity, 16638 inPoint, 16639 outPoint, 16640 width, 16641 height, 16642 name, 16643 loop_in, 16644 loop_out, 16645 smooth, 16646 toComp, 16647 fromCompToSurface, 16648 toWorld, 16649 fromWorld, 16650 mask, 16651 position, 16652 rotation, 16653 scale, 16654 thisComp, 16655 numKeys, 16656 active, 16657 wiggle, 16658 loopInDuration, 16659 loopOutDuration, 16660 comp, 16661 lookAt, 16662 easeOut, 16663 easeIn, 16664 ease, 16665 nearestKey, 16666 key, 16667 text, 16668 textIndex, 16669 textTotal, 16670 selectorValue, 16671 framesToTime, 16672 timeToFrames, 16673 sourceRectAtTime, 16674 substring, 16675 substr, 16676 posterizeTime, 16677 index, 16678 globalData, 16679 ]), 16680 executeExpression 16681 ); 16682 } 16683 return ( 16684 (ob.initiateExpression = initiateExpression), 16685 (ob.__preventDeadCodeRemoval = [ 16686 window, 16687 document, 16688 XMLHttpRequest, 16689 fetch, 16690 frames, 16691 $bm_neg, 16692 add, 16693 $bm_sum, 16694 $bm_sub, 16695 $bm_mul, 16696 $bm_div, 16697 $bm_mod, 16698 clamp, 16699 radians_to_degrees, 16700 degreesToRadians, 16701 degrees_to_radians, 16702 normalize, 16703 rgbToHsl, 16704 hslToRgb, 16705 linear, 16706 random, 16707 createPath, 16708 _lottieGlobal, 16709 ]), 16710 (ob.resetFrame = resetFrame), 16711 ob 16712 ); 16713 })(), 16714 Expressions = (function () { 16715 var t = {}; 16716 return ( 16717 (t.initExpressions = function (t) { 16718 var e = 0, 16719 i = []; 16720 (t.renderer.compInterface = CompExpressionInterface( 16721 t.renderer 16722 )), 16723 t.renderer.globalData.projectInterface.registerComposition( 16724 t.renderer 16725 ), 16726 (t.renderer.globalData.pushExpression = function () { 16727 e += 1; 16728 }), 16729 (t.renderer.globalData.popExpression = function () { 16730 0 == (e -= 1) && 16731 (function () { 16732 var t, 16733 e = i.length; 16734 for (t = 0; t < e; t += 1) i[t].release(); 16735 i.length = 0; 16736 })(); 16737 }), 16738 (t.renderer.globalData.registerExpressionProperty = 16739 function (t) { 16740 -1 === i.indexOf(t) && i.push(t); 16741 }); 16742 }), 16743 (t.resetFrame = ExpressionManager.resetFrame), 16744 t 16745 ); 16746 })(), 16747 MaskManagerInterface = (function () { 16748 function t(t, e) { 16749 (this._mask = t), (this._data = e); 16750 } 16751 return ( 16752 Object.defineProperty(t.prototype, "maskPath", { 16753 get: function () { 16754 return ( 16755 this._mask.prop.k && this._mask.prop.getValue(), 16756 this._mask.prop 16757 ); 16758 }, 16759 }), 16760 Object.defineProperty(t.prototype, "maskOpacity", { 16761 get: function () { 16762 return ( 16763 this._mask.op.k && this._mask.op.getValue(), 16764 100 * this._mask.op.v 16765 ); 16766 }, 16767 }), 16768 function (e) { 16769 var i,
16770 s = createSizedArray(e.viewData.length), 16771 r = e.viewData.length; 16772 for (i = 0; i < r; i += 1) 16773 s[i] = new t(e.viewData[i], e.masksProperties[i]); 16774 return function (t) { 16775 for (i = 0; i < r; ) { 16776 if (e.masksProperties[i].nm === t) return s[i]; 16777 i += 1; 16778 } 16779 return null; 16780 }; 16781 } 16782 ); 16783 })(), 16784 ExpressionPropertyInterface = (function () { 16785 var t = { pv: 0, v: 0, mult: 1 }, 16786 e = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 }; 16787 function i(t, e, i) { 16788 Object.defineProperty(t, "velocity", { 16789 get: function () { 16790 return e.getVelocityAtTime(e.comp.currentFrame); 16791 }, 16792 }), 16793 (t.numKeys = e.keyframes ? e.keyframes.length : 0), 16794 (t.key = function (s) { 16795 if (!t.numKeys) return 0; 16796 var r = ""; 16797 r = 16798 "s" in e.keyframes[s - 1] 16799 ? e.keyframes[s - 1].s 16800 : "e" in e.keyframes[s - 2] 16801 ? e.keyframes[s - 2].e 16802 : e.keyframes[s - 2].s; 16803 var n = 16804 "unidimensional" === i 16805 ? new Number(r) 16806 : Object.assign({}, r); 16807 return ( 16808 (n.time = 16809 e.keyframes[s - 1].t / 16810 e.elem.comp.globalData.frameRate), 16811 (n.value = "unidimensional" === i ? r[0] : r), 16812 n 16813 ); 16814 }), 16815 (t.valueAtTime = e.getValueAtTime), 16816 (t.speedAtTime = e.getSpeedAtTime), 16817 (t.velocityAtTime = e.getVelocityAtTime), 16818 (t.propertyGroup = e.propertyGroup); 16819 } 16820 function s() { 16821 return t; 16822 } 16823 return function (r) { 16824 return r 16825 ? "unidimensional" === r.propType 16826 ? (function (e) { 16827 (e && "pv" in e) || (e = t); 16828 var s = 1 / e.mult, 16829 r = e.pv * s, 16830 n = new Number(r); 16831 return ( 16832 (n.value = r), 16833 i(n, e, "unidimensional"), 16834 function () { 16835 return ( 16836 e.k && e.getValue(), 16837 (r = e.v * s), 16838 n.value !== r && 16839 (((n = new Number(r)).value = r), 16840 (n[0] = r), 16841 i(n, e, "unidimensional")), 16842 n 16843 ); 16844 } 16845 ); 16846 })(r) 16847 : (function (t) { 16848 (t && "pv" in t) || (t = e); 16849 var s = 1 / t.mult, 16850 r = (t.data && t.data.l) || t.pv.length, 16851 n = createTypedArray("float32", r), 16852 a = createTypedArray("float32", r); 16853 return ( 16854 (n.value = a), 16855 i(n, t, "multidimensional"), 16856 function () { 16857 t.k && t.getValue(); 16858 for (var e = 0; e < r; e += 1) 16859 (a[e] = t.v[e] * s), (n[e] = a[e]); 16860 return n; 16861 } 16862 ); 16863 })(r) 16864 : s; 16865 }; 16866 })(), 16867 TransformExpressionInterface = function (t) { 16868 var e, i, s, r; 16869 function n(t) { 16870 switch (t) { 16871 case "scale": 16872 case "Scale": 16873 case "ADBE Scale": 16874 case 6: 16875 return n.scale; 16876 case "rotation": 16877 case "Rotation": 16878 case "ADBE Rotation": 16879 case "ADBE Rotate Z": 16880 case 10: 16881 return n.rotation; 16882 case "ADBE Rotate X": 16883 return n.xRotation; 16884 case "ADBE Rotate Y": 16885 return n.yRotation; 16886 case "position": 16887 case "Position": 16888 case "ADBE Position": 16889 case 2: 16890 return n.position; 16891 case "ADBE Position_0": 16892 return n.xPosition; 16893 case "ADBE Position_1": 16894 return n.yPosition; 16895 case "ADBE Position_2": 16896 return n.zPosition; 16897 case "anchorPoint": 16898 case "AnchorPoint": 16899 case "Anchor Point": 16900 case "ADBE AnchorPoint": 16901 case 1: 16902 return n.anchorPoint; 16903 case "opacity": 16904 case "Opacity": 16905 case 11: 16906 return n.opacity; 16907 default: 16908 return null; 16909 } 16910 } 16911 return ( 16912 Object.defineProperty(n, "rotation", { 16913 get: ExpressionPropertyInterface(t.r || t.rz), 16914 }), 16915 Object.defineProperty(n, "zRotation", { 16916 get: ExpressionPropertyInterface(t.rz || t.r), 16917 }), 16918 Object.defineProperty(n, "xRotation", { 16919 get: ExpressionPropertyInterface(t.rx), 16920 }), 16921 Object.defineProperty(n, "yRotation", { 16922 get: ExpressionPropertyInterface(t.ry), 16923 }), 16924 Object.defineProperty(n, "scale", { 16925 get: ExpressionPropertyInterface(t.s), 16926 }), 16927 t.p 16928 ? (r = ExpressionPropertyInterface(t.p)) 16929 : ((e = ExpressionPropertyInterface(t.px)), 16930 (i = ExpressionPropertyInterface(t.py)), 16931 t.pz && (s = ExpressionPropertyInterface(t.pz))), 16932 Object.defineProperty(n, "position", { 16933 get: function () {
16934 return t.p ? r() : [e(), i(), s ? s() : 0]; 16935 }, 16936 }), 16937 Object.defineProperty(n, "xPosition", { 16938 get: ExpressionPropertyInterface(t.px), 16939 }), 16940 Object.defineProperty(n, "yPosition", { 16941 get: ExpressionPropertyInterface(t.py), 16942 }), 16943 Object.defineProperty(n, "zPosition", { 16944 get: ExpressionPropertyInterface(t.pz), 16945 }), 16946 Object.defineProperty(n, "anchorPoint", { 16947 get: ExpressionPropertyInterface(t.a), 16948 }), 16949 Object.defineProperty(n, "opacity", { 16950 get: ExpressionPropertyInterface(t.o), 16951 }), 16952 Object.defineProperty(n, "skew", { 16953 get: ExpressionPropertyInterface(t.sk), 16954 }), 16955 Object.defineProperty(n, "skewAxis", { 16956 get: ExpressionPropertyInterface(t.sa), 16957 }), 16958 Object.defineProperty(n, "orientation", { 16959 get: ExpressionPropertyInterface(t.or), 16960 }), 16961 n 16962 ); 16963 }, 16964 LayerExpressionInterface = (function () { 16965 function t(t) { 16966 var e = new Matrix(); 16967 return ( 16968 void 0 !== t 16969 ? this._elem.finalTransform.mProp.getValueAtTime(t).clone(e) 16970 : this._elem.finalTransform.mProp.applyToMatrix(e), 16971 e 16972 ); 16973 } 16974 function e(t, e) { 16975 var i = this.getMatrix(e); 16976 return ( 16977 (i.props[12] = 0), 16978 (i.props[13] = 0), 16979 (i.props[14] = 0), 16980 this.applyPoint(i, t) 16981 ); 16982 } 16983 function i(t, e) { 16984 var i = this.getMatrix(e); 16985 return this.applyPoint(i, t); 16986 } 16987 function s(t, e) { 16988 var i = this.getMatrix(e); 16989 return ( 16990 (i.props[12] = 0), 16991 (i.props[13] = 0), 16992 (i.props[14] = 0), 16993 this.invertPoint(i, t) 16994 ); 16995 } 16996 function r(t, e) { 16997 var i = this.getMatrix(e); 16998 return this.invertPoint(i, t); 16999 } 17000 function n(t, e) { 17001 if (this._elem.hierarchy && this._elem.hierarchy.length) { 17002 var i, 17003 s = this._elem.hierarchy.length; 17004 for (i = 0; i < s; i += 1) 17005 this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix( 17006 t 17007 ); 17008 } 17009 return t.applyToPointArray(e[0], e[1], e[2] || 0); 17010 } 17011 function a(t, e) { 17012 if (this._elem.hierarchy && this._elem.hierarchy.length) { 17013 var i, 17014 s = this._elem.hierarchy.length; 17015 for (i = 0; i < s; i += 1) 17016 this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix( 17017 t 17018 ); 17019 } 17020 return t.inversePoint(e); 17021 } 17022 function o(t) { 17023 var e = new Matrix(); 17024 if ( 17025 (e.reset(), 17026 this._elem.finalTransform.mProp.applyToMatrix(e), 17027 this._elem.hierarchy && this._elem.hierarchy.length) 17028 ) { 17029 var i, 17030 s = this._elem.hierarchy.length; 17031 for (i = 0; i < s; i += 1) 17032 this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix( 17033 e 17034 ); 17035 } 17036 return e.inversePoint(t); 17037 } 17038 function h() { 17039 return [1, 1, 1, 1]; 17040 } 17041 return function (l) { 17042 function p(t) { 17043 switch (t) { 17044 case "ADBE Root Vectors Group": 17045 case "Contents": 17046 case 2: 17047 return p.shapeInterface; 17048 case 1: 17049 case 6: 17050 case "Transform": 17051 case "transform": 17052 case "ADBE Transform Group": 17053 return f; 17054 case 4: 17055 case "ADBE Effect Parade": 17056 case "effects": 17057 case "Effects": 17058 return p.effect; 17059 case "ADBE Text Properties": 17060 return p.textInterface; 17061 default: 17062 return null; 17063 } 17064 } 17065 (p.getMatrix = t), 17066 (p.invertPoint = a), 17067 (p.applyPoint = n), 17068 (p.toWorld = i), 17069 (p.toWorldVec = e), 17070 (p.fromWorld = r), 17071 (p.fromWorldVec = s), 17072 (p.toComp = i), 17073 (p.fromComp = o), 17074 (p.sampleImage = h), 17075 (p.sourceRectAtTime = l.sourceRectAtTime.bind(l)), 17076 (p._elem = l); 17077 var f, 17078 c = getDescriptor( 17079 (f = TransformExpressionInterface(l.finalTransform.mProp)), 17080 "anchorPoint" 17081 ); 17082 return ( 17083 Object.defineProperties(p, { 17084 hasParent: { 17085 get: function () { 17086 return l.hierarchy.length; 17087 }, 17088 }, 17089 parent: { 17090 get: function () { 17091 return l.hierarchy[0].layerInterface; 17092 }, 17093 }, 17094 rotation: getDescriptor(f, "rotation"), 17095 scale: getDescriptor(f, "scale"), 17096 position: getDescriptor(f, "position"), 17097 opacity: getDescriptor(f, "opacity"), 17098 anchorPoint: c, 17099 anchor_point: c, 17100 transform: { 17101 get: function () { 17102 return f; 17103 }, 17104 }, 17105 active: { 17106 get: function () { 17107 return l.isInRange; 17108 }, 17109 }, 17110 }), 17111 (p.startTime = l.data.st), 17112 (p.index = l.data.ind), 17113 (p.source = l.data.refId), 17114 (p.height = 0 === l.data.ty ? l.data.h : 100), 17115 (p.width = 0 === l.data.ty ? l.data.w : 100), 17116 (p.inPoint = l.data.ip / l.comp.globalData.frameRate), 17117 (p.outPoint = l.data.op / l.comp.globalData.frameRate), 17118 (p._name = l.data.nm), 17119 (p.registerMaskInterface = function (t) { 17120 p.mask = new MaskManagerInterface(t, l); 17121 }), 17122 (p.registerEffectsInterface = function (t) { 17123 p.effect = t; 17124 }), 17125 p 17126 ); 17127 }; 17128 })(), 17129 propertyGroupFactory = function (t, e) { 17130 return function (i) { 17131 return (i = void 0 === i ? 1 : i) <= 0 ? t : e(i - 1); 17132 }; 17133 }, 17134 PropertyInterface = function (t, e) { 17135 var i = { _name: t }; 17136 return function (t) { 17137 return (t = void 0 === t ? 1 : t) <= 0 ? i : e(t - 1); 17138 }; 17139 },
17140 EffectsExpressionInterface = (function () { 17141 function t(i, s, r, n) { 17142 function a(t) { 17143 for (var e = i.ef, s = 0, r = e.length; s < r; ) { 17144 if (t === e[s].nm || t === e[s].mn || t === e[s].ix) 17145 return 5 === e[s].ty ? l[s] : l[s](); 17146 s += 1; 17147 } 17148 throw Error(); 17149 } 17150 var o, 17151 h = propertyGroupFactory(a, r), 17152 l = [], 17153 p = i.ef.length; 17154 for (o = 0; o < p; o += 1) 17155 5 === i.ef[o].ty 17156 ? l.push( 17157 t( 17158 i.ef[o], 17159 s.effectElements[o], 17160 s.effectElements[o].propertyGroup, 17161 n 17162 ) 17163 ) 17164 : l.push(e(s.effectElements[o], i.ef[o].ty, n, h)); 17165 return ( 17166 "ADBE Color Control" === i.mn && 17167 Object.defineProperty(a, "color", { 17168 get: function () { 17169 return l[0](); 17170 }, 17171 }), 17172 Object.defineProperties(a, { 17173 numProperties: { 17174 get: function () { 17175 return i.np; 17176 }, 17177 }, 17178 _name: { value: i.nm }, 17179 propertyGroup: { value: h }, 17180 }), 17181 (a.enabled = 0 !== i.en), 17182 (a.active = a.enabled), 17183 a 17184 ); 17185 } 17186 function e(t, e, i, s) { 17187 var r = ExpressionPropertyInterface(t.p); 17188 return ( 17189 t.p.setGroupProperty && 17190 t.p.setGroupProperty(PropertyInterface("", s)), 17191 function () { 17192 return 10 === e ? i.comp.compInterface(t.p.v) : r(); 17193 } 17194 ); 17195 } 17196 return { 17197 createEffectsInterface: function (e, i) { 17198 if (e.effectsManager) { 17199 var s, 17200 r = [], 17201 n = e.data.ef, 17202 a = e.effectsManager.effectElements.length; 17203 for (s = 0; s < a; s += 1) 17204 r.push(t(n[s], e.effectsManager.effectElements[s], i, e)); 17205 var o = e.data.ef || [], 17206 h = function (t) { 17207 for (s = 0, a = o.length; s < a; ) { 17208 if (t === o[s].nm || t === o[s].mn || t === o[s].ix) 17209 return r[s]; 17210 s += 1; 17211 } 17212 return null; 17213 }; 17214 return ( 17215 Object.defineProperty(h, "numProperties", { 17216 get: function () { 17217 return o.length; 17218 }, 17219 }), 17220 h 17221 ); 17222 } 17223 return null; 17224 }, 17225 }; 17226 })(), 17227 ShapePathInterface = function (t, e, i) { 17228 var s = e.sh; 17229 function r(t) { 17230 return "Shape" === t || 17231 "shape" === t || 17232 "Path" === t || 17233 "path" === t || 17234 "ADBE Vector Shape" === t || 17235 2 === t 17236 ? r.path 17237 : null; 17238 } 17239 var n = propertyGroupFactory(r, i); 17240 return ( 17241 s.setGroupProperty(PropertyInterface("Path", n)), 17242 Object.defineProperties(r, { 17243 path: { 17244 get: function () { 17245 return s.k && s.getValue(), s; 17246 }, 17247 }, 17248 shape: { 17249 get: function () { 17250 return s.k && s.getValue(), s; 17251 }, 17252 }, 17253 _name: { value: t.nm }, 17254 ix: { value: t.ix }, 17255 propertyIndex: { value: t.ix }, 17256 mn: { value: t.mn }, 17257 propertyGroup: { value: i }, 17258 }), 17259 r 17260 ); 17261 }, 17262 ShapeExpressionInterface = (function () { 17263 function t(t, o, u) { 17264 var m, 17265 d = [], 17266 g = t ? t.length : 0; 17267 for (m = 0; m < g; m += 1) 17268 "gr" === t[m].ty 17269 ? d.push(e(t[m], o[m], u)) 17270 : "fl" === t[m].ty 17271 ? d.push(i(t[m], o[m], u)) 17272 : "st" === t[m].ty 17273 ? d.push(n(t[m], o[m], u)) 17274 : "tm" === t[m].ty 17275 ? d.push(a(t[m], o[m], u)) 17276 : "tr" === t[m].ty || 17277 ("el" === t[m].ty 17278 ? d.push(h(t[m], o[m], u)) 17279 : "sr" === t[m].ty 17280 ? d.push(l(t[m], o[m], u)) 17281 : "sh" === t[m].ty 17282 ? d.push(ShapePathInterface(t[m], o[m], u)) 17283 : "rc" === t[m].ty 17284 ? d.push(p(t[m], o[m], u)) 17285 : "rd" === t[m].ty 17286 ? d.push(f(t[m], o[m], u)) 17287 : "rp" === t[m].ty 17288 ? d.push(c(t[m], o[m], u)) 17289 : "gf" === t[m].ty 17290 ? d.push(s(t[m], o[m], u)) 17291 : d.push(r(t[m], o[m]))); 17292 return d; 17293 } 17294 function e(e, i, s) { 17295 var r = function (t) { 17296 switch (t) { 17297 case "ADBE Vectors Group": 17298 case "Contents": 17299 case 2: 17300 return r.content; 17301 default: 17302 return r.transform; 17303 } 17304 }; 17305 r.propertyGroup = propertyGroupFactory(r, s); 17306 var n = (function (e, i, s) { 17307 var r, 17308 n = function (t) { 17309 for (var e = 0, i = r.length; e < i; ) { 17310 if ( 17311 r[e]._name === t || 17312 r[e].mn === t || 17313 r[e].propertyIndex === t || 17314 r[e].ix === t || 17315 r[e].ind === t 17316 ) 17317 return r[e]; 17318 e += 1; 17319 } 17320 return "number" == typeof t ? r[t - 1] : null; 17321 }; 17322 (n.propertyGroup = propertyGroupFactory(n, s)), 17323 (r = t(e.it, i.it, n.propertyGroup)), 17324 (n.numProperties = r.length); 17325 var a = o( 17326 e.it[e.it.length - 1], 17327 i.it[i.it.length - 1], 17328 n.propertyGroup 17329 ); 17330 return ( 17331 (n.transform = a), 17332 (n.propertyIndex = e.cix), 17333 (n._name = e.nm), 17334 n 17335 ); 17336 })(e, i, r.propertyGroup), 17337 a = o( 17338 e.it[e.it.length - 1], 17339 i.it[i.it.length - 1], 17340 r.propertyGroup 17341 ); 17342 return ( 17343 (r.content = n), 17344 (r.transform = a), 17345 Object.defineProperty(r, "_name", { 17346 get: function () { 17347 return e.nm; 17348 }, 17349 }), 17350 (r.numProperties = e.np), 17351 (r.propertyIndex = e.ix), 17352 (r.nm = e.nm), 17353 (r.mn = e.mn), 17354 r 17355 ); 17356 } 17357 function i(t, e, i) { 17358 function s(t) { 17359 return "Color" === t || "color" === t 17360 ? s.color 17361 : "Opacity" === t || "opacity" === t 17362 ? s.opacity 17363 : null; 17364 } 17365 return ( 17366 Object.defineProperties(s, { 17367 color: { get: ExpressionPropertyInterface(e.c) }, 17368 opacity: { get: ExpressionPropertyInterface(e.o) }, 17369 _name: { value: t.nm }, 17370 mn: { value: t.mn }, 17371 }), 17372 e.c.setGroupProperty(PropertyInterface("Color", i)), 17373 e.o.setGroupProperty(PropertyInterface("Opacity", i)), 17374 s 17375 ); 17376 } 17377 function s(t, e, i) { 17378 function s(t) { 17379 return "Start Point" === t || "start point" === t 17380 ? s.startPoint 17381 : "End Point" === t || "end point" === t 17382 ? s.endPoint 17383 : "Opacity" === t || "opacity" === t 17384 ? s.opacity 17385 : null; 17386 } 17387 return ( 17388 Object.defineProperties(s, { 17389 startPoint: { get: ExpressionPropertyInterface(e.s) }, 17390 endPoint: { get: ExpressionPropertyInterface(e.e) }, 17391 opacity: { get: ExpressionPropertyInterface(e.o) }, 17392 type: { 17393 get: function () { 17394 return "a"; 17395 }, 17396 }, 17397 _name: { value: t.nm }, 17398 mn: { value: t.mn }, 17399 }), 17400 e.s.setGroupProperty(PropertyInterface("Start Point", i)), 17401 e.e.setGroupProperty(PropertyInterface("End Point", i)), 17402 e.o.setGroupProperty(PropertyInterface("Opacity", i)), 17403 s 17404 ); 17405 } 17406 function r() { 17407 return function () { 17408 return null; 17409 }; 17410 } 17411 function n(t, e, i) { 17412 var s, 17413 r = propertyGroupFactory(l, i), 17414 n = propertyGroupFactory(h, r); 17415 function a(i) { 17416 Object.defineProperty(h, t.d[i].nm, { 17417 get: ExpressionPropertyInterface(e.d.dataProps[i].p), 17418 }); 17419 } 17420 var o = t.d ? t.d.length : 0, 17421 h = {}; 17422 for (s = 0; s < o; s += 1) 17423 a(s), e.d.dataProps[s].p.setGroupProperty(n); 17424 function l(t) { 17425 return "Color" === t || "color" === t 17426 ? l.color 17427 : "Opacity" === t || "opacity" === t 17428 ? l.opacity 17429 : "Stroke Width" === t || "stroke width" === t 17430 ? l.strokeWidth 17431 : null; 17432 } 17433 return ( 17434 Object.defineProperties(l, { 17435 color: { get: ExpressionPropertyInterface(e.c) }, 17436 opacity: { get: ExpressionPropertyInterface(e.o) }, 17437 strokeWidth: { get: ExpressionPropertyInterface(e.w) }, 17438 dash: { 17439 get: function () { 17440 return h; 17441 }, 17442 }, 17443 _name: { value: t.nm }, 17444 mn: { value: t.mn }, 17445 }), 17446 e.c.setGroupProperty(PropertyInterface("Color", r)), 17447 e.o.setGroupProperty(PropertyInterface("Opacity", r)),
17448 e.w.setGroupProperty(PropertyInterface("Stroke Width", r)), 17449 l 17450 ); 17451 } 17452 function a(t, e, i) { 17453 function s(e) { 17454 return e === t.e.ix || "End" === e || "end" === e 17455 ? s.end 17456 : e === t.s.ix 17457 ? s.start 17458 : e === t.o.ix 17459 ? s.offset 17460 : null; 17461 } 17462 var r = propertyGroupFactory(s, i); 17463 return ( 17464 (s.propertyIndex = t.ix), 17465 e.s.setGroupProperty(PropertyInterface("Start", r)), 17466 e.e.setGroupProperty(PropertyInterface("End", r)), 17467 e.o.setGroupProperty(PropertyInterface("Offset", r)), 17468 (s.propertyIndex = t.ix), 17469 (s.propertyGroup = i), 17470 Object.defineProperties(s, { 17471 start: { get: ExpressionPropertyInterface(e.s) }, 17472 end: { get: ExpressionPropertyInterface(e.e) }, 17473 offset: { get: ExpressionPropertyInterface(e.o) }, 17474 _name: { value: t.nm }, 17475 }), 17476 (s.mn = t.mn), 17477 s 17478 ); 17479 } 17480 function o(t, e, i) { 17481 function s(e) { 17482 return t.a.ix === e || "Anchor Point" === e 17483 ? s.anchorPoint 17484 : t.o.ix === e || "Opacity" === e 17485 ? s.opacity 17486 : t.p.ix === e || "Position" === e 17487 ? s.position 17488 : t.r.ix === e || 17489 "Rotation" === e || 17490 "ADBE Vector Rotation" === e 17491 ? s.rotation 17492 : t.s.ix === e || "Scale" === e 17493 ? s.scale 17494 : (t.sk && t.sk.ix === e) || "Skew" === e 17495 ? s.skew 17496 : (t.sa && t.sa.ix === e) || "Skew Axis" === e 17497 ? s.skewAxis 17498 : null; 17499 } 17500 var r = propertyGroupFactory(s, i); 17501 return ( 17502 e.transform.mProps.o.setGroupProperty( 17503 PropertyInterface("Opacity", r) 17504 ), 17505 e.transform.mProps.p.setGroupProperty( 17506 PropertyInterface("Position", r) 17507 ), 17508 e.transform.mProps.a.setGroupProperty( 17509 PropertyInterface("Anchor Point", r) 17510 ), 17511 e.transform.mProps.s.setGroupProperty( 17512 PropertyInterface("Scale", r) 17513 ), 17514 e.transform.mProps.r.setGroupProperty( 17515 PropertyInterface("Rotation", r) 17516 ), 17517 e.transform.mProps.sk && 17518 (e.transform.mProps.sk.setGroupProperty( 17519 PropertyInterface("Skew", r) 17520 ), 17521 e.transform.mProps.sa.setGroupProperty( 17522 PropertyInterface("Skew Angle", r) 17523 )), 17524 e.transform.op.setGroupProperty( 17525 PropertyInterface("Opacity", r) 17526 ), 17527 Object.defineProperties(s, { 17528 opacity: { 17529 get: ExpressionPropertyInterface(e.transform.mProps.o), 17530 }, 17531 position: { 17532 get: ExpressionPropertyInterface(e.transform.mProps.p), 17533 }, 17534 anchorPoint: { 17535 get: ExpressionPropertyInterface(e.transform.mProps.a), 17536 }, 17537 scale: { 17538 get: ExpressionPropertyInterface(e.transform.mProps.s), 17539 }, 17540 rotation: { 17541 get: ExpressionPropertyInterface(e.transform.mProps.r), 17542 }, 17543 skew: { 17544 get: ExpressionPropertyInterface(e.transform.mProps.sk), 17545 }, 17546 skewAxis: { 17547 get: ExpressionPropertyInterface(e.transform.mProps.sa), 17548 }, 17549 _name: { value: t.nm }, 17550 }), 17551 (s.ty = "tr"), 17552 (s.mn = t.mn), 17553 (s.propertyGroup = i), 17554 s 17555 ); 17556 } 17557 function h(t, e, i) { 17558 function s(e) { 17559 return t.p.ix === e 17560 ? s.position 17561 : t.s.ix === e 17562 ? s.size 17563 : null; 17564 } 17565 var r = propertyGroupFactory(s, i); 17566 s.propertyIndex = t.ix; 17567 var n = "tm" === e.sh.ty ? e.sh.prop : e.sh; 17568 return ( 17569 n.s.setGroupProperty(PropertyInterface("Size", r)), 17570 n.p.setGroupProperty(PropertyInterface("Position", r)), 17571 Object.defineProperties(s, { 17572 size: { get: ExpressionPropertyInterface(n.s) }, 17573 position: { get: ExpressionPropertyInterface(n.p) }, 17574 _name: { value: t.nm }, 17575 }), 17576 (s.mn = t.mn), 17577 s 17578 ); 17579 } 17580 function l(t, e, i) { 17581 function s(e) { 17582 return t.p.ix === e 17583 ? s.position 17584 : t.r.ix === e 17585 ? s.rotation 17586 : t.pt.ix === e 17587 ? s.points 17588 : t.or.ix === e || "ADBE Vector Star Outer Radius" === e 17589 ? s.outerRadius 17590 : t.os.ix === e 17591 ? s.outerRoundness 17592 : t.ir && 17593 (t.ir.ix === e || "ADBE Vector Star Inner Radius" === e) 17594 ? s.innerRadius 17595 : t.is && t.is.ix === e 17596 ? s.innerRoundness 17597 : null; 17598 } 17599 var r = propertyGroupFactory(s, i), 17600 n = "tm" === e.sh.ty ? e.sh.prop : e.sh; 17601 return ( 17602 (s.propertyIndex = t.ix), 17603 n.or.setGroupProperty(PropertyInterface("Outer Radius", r)), 17604 n.os.setGroupProperty( 17605 PropertyInterface("Outer Roundness", r) 17606 ), 17607 n.pt.setGroupProperty(PropertyInterface("Points", r)), 17608 n.p.setGroupProperty(PropertyInterface("Position", r)), 17609 n.r.setGroupProperty(PropertyInterface("Rotation", r)), 17610 t.ir && 17611 (n.ir.setGroupProperty( 17612 PropertyInterface("Inner Radius", r) 17613 ), 17614 n.is.setGroupProperty( 17615 PropertyInterface("Inner Roundness", r) 17616 )), 17617 Object.defineProperties(s, { 17618 position: { get: ExpressionPropertyInterface(n.p) }, 17619 rotation: { get: ExpressionPropertyInterface(n.r) }, 17620 points: { get: ExpressionPropertyInterface(n.pt) }, 17621 outerRadius: { get: ExpressionPropertyInterface(n.or) }, 17622 outerRoundness: { get: ExpressionPropertyInterface(n.os) }, 17623 innerRadius: { get: ExpressionPropertyInterface(n.ir) }, 17624 innerRoundness: { get: ExpressionPropertyInterface(n.is) }, 17625 _name: { value: t.nm }, 17626 }), 17627 (s.mn = t.mn), 17628 s 17629 ); 17630 } 17631 function p(t, e, i) { 17632 function s(e) { 17633 return t.p.ix === e 17634 ? s.position 17635 : t.r.ix === e 17636 ? s.roundness 17637 : t.s.ix === e || 17638 "Size" === e || 17639 "ADBE Vector Rect Size" === e 17640 ? s.size 17641 : null; 17642 } 17643 var r = propertyGroupFactory(s, i), 17644 n = "tm" === e.sh.ty ? e.sh.prop : e.sh; 17645 return ( 17646 (s.propertyIndex = t.ix), 17647 n.p.setGroupProperty(PropertyInterface("Position", r)), 17648 n.s.setGroupProperty(PropertyInterface("Size", r)), 17649 n.r.setGroupProperty(PropertyInterface("Rotation", r)), 17650 Object.defineProperties(s, { 17651 position: { get: ExpressionPropertyInterface(n.p) }, 17652 roundness: { get: ExpressionPropertyInterface(n.r) }, 17653 size: { get: ExpressionPropertyInterface(n.s) }, 17654 _name: { value: t.nm }, 17655 }), 17656 (s.mn = t.mn), 17657 s 17658 ); 17659 } 17660 function f(t, e, i) { 17661 function s(e) { 17662 return t.r.ix === e || "Round Corners 1" === e 17663 ? s.radius 17664 : null; 17665 } 17666 var r = propertyGroupFactory(s, i), 17667 n = e; 17668 return ( 17669 (s.propertyIndex = t.ix), 17670 n.rd.setGroupProperty(PropertyInterface("Radius", r)), 17671 Object.defineProperties(s, { 17672 radius: { get: ExpressionPropertyInterface(n.rd) }, 17673 _name: { value: t.nm }, 17674 }), 17675 (s.mn = t.mn), 17676 s 17677 ); 17678 } 17679 function c(t, e, i) { 17680 function s(e) { 17681 return t.c.ix === e || "Copies" === e 17682 ? s.copies 17683 : t.o.ix === e || "Offset" === e 17684 ? s.offset 17685 : null; 17686 } 17687 var r = propertyGroupFactory(s, i), 17688 n = e; 17689 return ( 17690 (s.propertyIndex = t.ix), 17691 n.c.setGroupProperty(PropertyInterface("Copies", r)), 17692 n.o.setGroupProperty(PropertyInterface("Offset", r)), 17693 Object.defineProperties(s, { 17694 copies: { get: ExpressionPropertyInterface(n.c) }, 17695 offset: { get: ExpressionPropertyInterface(n.o) }, 17696 _name: { value: t.nm }, 17697 }), 17698 (s.mn = t.mn), 17699 s 17700 ); 17701 } 17702 return function (e, i, s) { 17703 var r; 17704 function n(t) { 17705 if ("number" == typeof t) 17706 return 0 === (t = void 0 === t ? 1 : t) ? s : r[t - 1]; 17707 for (var e = 0, i = r.length; e < i; ) { 17708 if (r[e]._name === t) return r[e]; 17709 e += 1; 17710 } 17711 return null; 17712 } 17713 return ( 17714 (n.propertyGroup = propertyGroupFactory(n, function () { 17715 return s; 17716 })), 17717 (r = t(e, i, n.propertyGroup)), 17718 (n.numProperties = r.length), 17719 (n._name = "Contents"), 17720 n 17721 ); 17722 }; 17723 })(), 17724 TextExpressionInterface = function (t) { 17725 var e; 17726 function i(t) { 17727 return "ADBE Text Document" === t ? i.sourceText : null; 17728 } 17729 return ( 17730 Object.defineProperty(i, "sourceText", { 17731 get: function () { 17732 t.textProperty.getValue(); 17733 var i = t.textProperty.currentData.t; 17734 return ( 17735 (e && i === e.value) || 17736 (((e = new String(i)).value = i || new String(i)), 17737 Object.defineProperty(e, "style", { 17738 get: function () { 17739 return { fillColor: t.textProperty.currentData.fc }; 17740 }, 17741 })), 17742 e 17743 ); 17744 }, 17745 }), 17746 i 17747 ); 17748 }; 17749 function _typeof(t) { 17750 return (_typeof = 17751 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 17752 ? function (t) { 17753 return typeof t; 17754 } 17755 : function (t) { 17756 return t && 17757 "function" == typeof Symbol && 17758 t.constructor === Symbol && 17759 t !== Symbol.prototype 17760 ? "symbol" 17761 : typeof t; 17762 })(t); 17763 } 17764 var dataInterfaceFactory, 17765 FootageInterface = 17766 ((dataInterfaceFactory = function (t) { 17767 function e(t) { 17768 return "Outline" === t ? e.outlineInterface() : null; 17769 } 17770 return ( 17771 (e._name = "Outline"), 17772 (e.outlineInterface = (function (t) { 17773 var e = "", 17774 i = t.getFootageData(); 17775 function s(t) { 17776 if (i[t]) 17777 return ( 17778 (e = t), "object" === _typeof((i = i[t])) ? s : i 17779 ); 17780 var r = t.indexOf(e); 17781 if (-1 !== r) { 17782 var n = parseInt(t.substr(r + e.length), 10); 17783 return "object" === _typeof((i = i[n])) ? s : i; 17784 } 17785 return ""; 17786 } 17787 return function () { 17788 return (e = ""), (i = t.getFootageData()), s; 17789 }; 17790 })(t)), 17791 e 17792 ); 17793 }), 17794 function (t) { 17795 function e(t) { 17796 return "Data" === t ? e.dataInterface : null; 17797 } 17798 return ( 17799 (e._name = "Data"), 17800 (e.dataInterface = dataInterfaceFactory(t)), 17801 e 17802 ); 17803 }), 17804 interfaces = { 17805 layer: LayerExpressionInterface, 17806 effects: EffectsExpressionInterface, 17807 comp: CompExpressionInterface, 17808 shape: ShapeExpressionInterface, 17809 text: TextExpressionInterface, 17810 footage: FootageInterface, 17811 }; 17812 function getInterface(t) { 17813 return interfaces[t] || null; 17814 } 17815 var expressionHelpers = { 17816 searchExpressions: function (t, e, i) { 17817 e.x && 17818 ((i.k = !0), 17819 (i.x = !0), 17820 (i.initiateExpression = ExpressionManager.initiateExpression), 17821 i.effectsSequence.push(i.initiateExpression(t, e, i).bind(i))); 17822 }, 17823 getSpeedAtTime: function (t) { 17824 var e, 17825 i = this.getValueAtTime(t), 17826 s = this.getValueAtTime(t + -0.01), 17827 r = 0; 17828 if (i.length) { 17829 for (e = 0; e < i.length; e += 1) r += Math.pow(s[e] - i[e], 2); 17830 r = 100 * Math.sqrt(r); 17831 } else r = 0; 17832 return r; 17833 }, 17834 getVelocityAtTime: function (t) { 17835 if (void 0 !== this.vel) return this.vel; 17836 var e, 17837 i, 17838 s = -0.001, 17839 r = this.getValueAtTime(t), 17840 n = this.getValueAtTime(t + s); 17841 if (r.length) 17842 for ( 17843 e = createTypedArray("float32", r.length), i = 0; 17844 i < r.length; 17845 i += 1 17846 ) 17847 e[i] = (n[i] - r[i]) / s; 17848 else e = (n - r) / s; 17849 return e; 17850 }, 17851 getValueAtTime: function (t) { 17852 return ( 17853 (t *= this.elem.globalData.frameRate), 17854 (t -= this.offsetTime) !== this._cachingAtTime.lastFrame && 17855 ((this._cachingAtTime.lastIndex = 17856
17856 this._cachingAtTime.lastFrame < t 17857 ? this._cachingAtTime.lastIndex 17858 : 0), 17859 (this._cachingAtTime.value = this.interpolateValue( 17860 t, 17861 this._cachingAtTime 17862 )), 17863 (this._cachingAtTime.lastFrame = t)), 17864 this._cachingAtTime.value 17865 ); 17866 }, 17867 getStaticValueAtTime: function () { 17868 return this.pv; 17869 }, 17870 setGroupProperty: function (t) { 17871 this.propertyGroup = t; 17872 }, 17873 }; 17874 function addPropertyDecorator() { 17875 function t(t, e, i) { 17876 if (!this.k || !this.keyframes) return this.pv; 17877 t = t ? t.toLowerCase() : ""; 17878 var s, 17879 r, 17880 n, 17881 a, 17882 o, 17883 h = this.comp.renderedFrame, 17884 l = this.keyframes, 17885 p = l[l.length - 1].t; 17886 if (h <= p) return this.pv; 17887 if ( 17888 (i 17889 ? (r = 17890 p - 17891 (s = e 17892 ? Math.abs(p - this.elem.comp.globalData.frameRate * e) 17893 : Math.max(0, p - this.elem.data.ip))) 17894 : ((!e || e > l.length - 1) && (e = l.length - 1), 17895 (s = p - (r = l[l.length - 1 - e].t))), 17896 "pingpong" === t) 17897 ) { 17898 if (Math.floor((h - r) / s) % 2 != 0) 17899 return this.getValueAtTime( 17900 (s - ((h - r) % s) + r) / this.comp.globalData.frameRate, 17901 0 17902 ); 17903 } else { 17904 if ("offset" === t) { 17905 var f = this.getValueAtTime( 17906 r / this.comp.globalData.frameRate, 17907 0 17908 ), 17909 c = this.getValueAtTime( 17910 p / this.comp.globalData.frameRate, 17911 0 17912 ), 17913 u = this.getValueAtTime( 17914 (((h - r) % s) + r) / this.comp.globalData.frameRate, 17915 0 17916 ), 17917 m = Math.floor((h - r) / s); 17918 if (this.pv.length) { 17919 for (a = (o = Array(f.length)).length, n = 0; n < a; n += 1) 17920 o[n] = (c[n] - f[n]) * m + u[n]; 17921 return o; 17922 } 17923 return (c - f) * m + u; 17924 } 17925 if ("continue" === t) { 17926 var d = this.getValueAtTime( 17927 p / this.comp.globalData.frameRate, 17928 0 17929 ), 17930 g = this.getValueAtTime( 17931 (p - 0.001) / this.comp.globalData.frameRate, 17932 0 17933 ); 17934 if (this.pv.length) { 17935 for (a = (o = Array(d.length)).length, n = 0; n < a; n += 1) 17936 o[n] = 17937 d[n] + 17938 ((d[n] - g[n]) * 17939 ((h - p) / this.comp.globalData.frameRate)) / 17940 5e-4; 17941 return o; 17942 } 17943 return d + ((h - p) / 0.001) * (d - g); 17944 } 17945 } 17946 return this.getValueAtTime( 17947 (((h - r) % s) + r) / this.comp.globalData.frameRate, 17948 0 17949 ); 17950 } 17951 function e(t, e, i) { 17952 if (!this.k) return this.pv; 17953 t = t ? t.toLowerCase() : ""; 17954 var s, 17955 r, 17956 n, 17957 a, 17958 o, 17959 h = this.comp.renderedFrame, 17960 l = this.keyframes, 17961 p = l[0].t; 17962 if (h >= p) return this.pv; 17963 if ( 17964 (i 17965 ? (r = 17966 p + 17967 (s = e 17968 ? Math.abs(this.elem.comp.globalData.frameRate * e) 17969 : Math.max(0, this.elem.data.op - p))) 17970 : ((!e || e > l.length - 1) && (e = l.length - 1), 17971 (s = (r = l[e].t) - p)), 17972 "pingpong" === t) 17973 ) { 17974 if (Math.floor((p - h) / s) % 2 == 0) 17975 return this.getValueAtTime( 17976 (((p - h) % s) + p) / this.comp.globalData.frameRate, 17977 0 17978 ); 17979 } else { 17980 if ("offset" === t) { 17981 var f = this.getValueAtTime( 17982 p / this.comp.globalData.frameRate, 17983 0 17984 ), 17985 c = this.getValueAtTime( 17986 r / this.comp.globalData.frameRate, 17987 0 17988 ), 17989 u = this.getValueAtTime( 17990 (s - ((p - h) % s) + p) / this.comp.globalData.frameRate, 17991 0 17992 ), 17993 m = Math.floor((p - h) / s) + 1; 17994 if (this.pv.length) { 17995 for (a = (o = Array(f.length)).length, n = 0; n < a; n += 1) 17996 o[n] = u[n] - (c[n] - f[n]) * m; 17997 return o; 17998 } 17999 return u - (c - f) * m; 18000 } 18001 if ("continue" === t) { 18002 var d = this.getValueAtTime( 18003 p / this.comp.globalData.frameRate, 18004 0 18005 ), 18006 g = this.getValueAtTime( 18007 (p + 0.001) / this.comp.globalData.frameRate, 18008 0 18009 ); 18010 if (this.pv.length) { 18011 for (a = (o = Array(d.length)).length, n = 0; n < a; n += 1) 18012 o[n] = d[n] + ((d[n] - g[n]) * (p - h)) / 0.001; 18013 return o; 18014 } 18015 return d + ((d - g) * (p - h)) / 0.001; 18016 } 18017 } 18018 return this.getValueAtTime( 18019 (s - (((p - h) % s) + p)) / this.comp.globalData.frameRate, 18020 0 18021 ); 18022 } 18023 function i(t, e) { 18024 if ( 18025 !this.k || 18026 ((t = 0.5 * (t || 0.4)), (e = Math.floor(e || 5)) <= 1) 18027 ) 18028 return this.pv; 18029 var i, 18030 s, 18031 r = this.comp.renderedFrame / this.comp.globalData.frameRate, 18032 n = r - t, 18033 a = e > 1 ? (r + t - n) / (e - 1) : 1, 18034 o = 0, 18035 h = 0; 18036 for ( 18037 i = this.pv.length 18038 ? createTypedArray("float32", this.pv.length) 18039 : 0; 18040 o < e; 18041 18042 ) { 18043 if (((s = this.getValueAtTime(n + o * a)), this.pv.length)) 18044 for (h = 0; h < this.pv.length; h += 1) i[h] += s[h]; 18045 else i += s; 18046 o += 1; 18047 } 18048 if (this.pv.length) 18049 for (h = 0; h < this.pv.length; h += 1) i[h] /= e; 18050 else i /= e; 18051 return i; 18052 } 18053 function s(t) { 18054 this._transformCachingAtTime || 18055 (this._transformCachingAtTime = { v: new Matrix() }); 18056 var e = this._transformCachingAtTime.v; 18057 if ( 18058 (e.cloneFromProps(this.pre.props), 18059 this.appliedTransformations < 1) 18060 ) { 18061 var i = this.a.getValueAtTime(t); 18062 e.translate( 18063 -i[0] * this.a.mult, 18064 -i[1] * this.a.mult, 18065 i[2] * this.a.mult 18066 ); 18067 } 18068 if (this.appliedTransformations < 2) { 18069 var s = this.s.getValueAtTime(t); 18070 e.scale( 18071 s[0] * this.s.mult, 18072 s[1] * this.s.mult, 18073 s[2] * this.s.mult 18074 ); 18075 } 18076 if (this.sk && this.appliedTransformations < 3) { 18077 var r = this.sk.getValueAtTime(t), 18078 n = this.sa.getValueAtTime(t); 18079 e.skewFromAxis(-r * this.sk.mult, n * this.sa.mult); 18080 } 18081 if (this.r && this.appliedTransformations < 4) { 18082 var a = this.r.getValueAtTime(t); 18083 e.rotate(-a * this.r.mult); 18084 } else if (!this.r && this.appliedTransformations < 4) { 18085 var o = this.rz.getValueAtTime(t), 18086 h = this.ry.getValueAtTime(t), 18087 l = this.rx.getValueAtTime(t), 18088 p = this.or.getValueAtTime(t); 18089 e.rotateZ(-o * this.rz.mult) 18090 .rotateY(h * this.ry.mult) 18091 .rotateX(l * this.rx.mult) 18092 .rotateZ(-p[2] * this.or.mult) 18093 .rotateY(p[1] * this.or.mult) 18094 .rotateX(p[0] * this.or.mult); 18095 } 18096 if (this.data.p && this.data.p.s) { 18097 var f = this.px.getValueAtTime(t), 18098 c = this.py.getValueAtTime(t); 18099 if (this.data.p.z) { 18100 var u = this.pz.getValueAtTime(t); 18101 e.translate( 18102 f * this.px.mult, 18103 c * this.py.mult, 18104 -u * this.pz.mult 18105 ); 18106 } else e.translate(f * this.px.mult, c * this.py.mult, 0); 18107 } else { 18108 var m = this.p.getValueAtTime(t); 18109 e.translate( 18110 m[0] * this.p.mult, 18111 m[1] * this.p.mult, 18112 -m[2] * this.p.mult 18113 ); 18114 } 18115 return e; 18116 } 18117 function r() { 18118 return this.v.clone(new Matrix()); 18119 } 18120 var n = TransformPropertyFactory.getTransformProperty; 18121 TransformPropertyFactory.getTransformProperty = function (t, e, i) { 18122 var a = n(t, e, i); 18123 return ( 18124 a.dynamicProperties.length 18125 ? (a.getValueAtTime = s.bind(a)) 18126 : (a.getValueAtTime = r.bind(a)), 18127 (a.setGroupProperty = expressionHelpers.setGroupProperty), 18128 a 18129 ); 18130 }; 18131 var a = PropertyFactory.getProp; 18132 PropertyFactory.getProp = function (s, r, n, o, h) { 18133 var l = a(s, r, n, o, h); 18134 l.kf 18135 ? (l.getValueAtTime = expressionHelpers.getValueAtTime.bind(l)) 18136 : (l.getValueAtTime = 18137 expressionHelpers.getStaticValueAtTime.bind(l)), 18138 (l.setGroupProperty = expressionHelpers.setGroupProperty), 18139 (l.loopOut = t), 18140 (l.loopIn = e), 18141 (l.smooth = i), 18142 (l.getVelocityAtTime = 18143 expressionHelpers.getVelocityAtTime.bind(l)), 18144 (l.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(l)), 18145 (l.numKeys = 1 === r.a ? r.k.length : 0), 18146 (l.propertyIndex = r.ix); 18147 var p = 0; 18148 return ( 18149 0 !== n && 18150 (p = createTypedArray( 18151 "float32", 18152 1 === r.a ? r.k[0].s.length : r.k.length 18153 )), 18154 (l._cachingAtTime = { 18155 lastFrame: initialDefaultFrame, 18156 lastIndex: 0, 18157 value: p, 18158 }), 18159 expressionHelpers.searchExpressions(s, r, l), 18160 l.k && h.addDynamicProperty(l), 18161 l 18162 ); 18163 }; 18164 var o = ShapePropertyFactory.getConstructorFunction(), 18165 h = ShapePropertyFactory.getKeyframedConstructorFunction(); 18166 function l() {} 18167 (l.prototype = { 18168 vertices: function (t, e) { 18169 this.k && this.getValue(); 18170 var i, 18171 s = this.v; 18172 void 0 !== e && (s = this.getValueAtTime(e, 0)); 18173 var r = s._length, 18174 n = s[t], 18175 a = s.v, 18176 o = createSizedArray(r); 18177 for (i = 0; i < r; i += 1) 18178 o[i] = 18179 "i" === t || "o" === t 18180 ? [n[i][0] - a[i][0], n[i][1] - a[i][1]] 18181 : [n[i][0], n[i][1]]; 18182 return o; 18183 }, 18184 points: function (t) { 18185 return this.vertices("v", t); 18186 }, 18187 inTangents: function (t) { 18188 return this.vertices("i", t); 18189 }, 18190 outTangents: function (t) { 18191 return this.vertices("o", t); 18192 }, 18193 isClosed: function () { 18194 return this.v.c; 18195 }, 18196 pointOnPath: function (t, e) { 18197 var i = this.v; 18198 void 0 !== e && (i = this.getValueAtTime(e, 0)), 18199 this._segmentsLength || 18200 (this._segmentsLength = bez.getSegmentsLength(i)); 18201 for ( 18202 var s, 18203 r = this._segmentsLength,
18204 n = r.lengths, 18205 a = r.totalLength * t, 18206 o = 0, 18207 h = n.length, 18208 l = 0; 18209 o < h; 18210 18211 ) { 18212 if (l + n[o].addedLength > a) { 18213 var p = o, 18214 f = i.c && o === h - 1 ? 0 : o + 1, 18215 c = (a - l) / n[o].addedLength; 18216 s = bez.getPointInSegment( 18217 i.v[p], 18218 i.v[f], 18219 i.o[p], 18220 i.i[f], 18221 c, 18222 n[o] 18223 ); 18224 break; 18225 } 18226 (l += n[o].addedLength), (o += 1); 18227 } 18228 return ( 18229 s || 18230 (s = i.c 18231 ? [i.v[0][0], i.v[0][1]] 18232 : [i.v[i._length - 1][0], i.v[i._length - 1][1]]), 18233 s 18234 ); 18235 }, 18236 vectorOnPath: function (t, e, i) { 18237 1 == t ? (t = this.v.c) : 0 == t && (t = 0.999); 18238 var s = this.pointOnPath(t, e), 18239 r = this.pointOnPath(t + 0.001, e), 18240 n = r[0] - s[0], 18241 a = r[1] - s[1], 18242 o = Math.sqrt(Math.pow(n, 2) + Math.pow(a, 2)); 18243 return 0 === o 18244 ? [0, 0] 18245 : "tangent" === i 18246 ? [n / o, a / o] 18247 : [-a / o, n / o]; 18248 }, 18249 tangentOnPath: function (t, e) { 18250 return this.vectorOnPath(t, e, "tangent"); 18251 }, 18252 normalOnPath: function (t, e) { 18253 return this.vectorOnPath(t, e, "normal"); 18254 }, 18255 setGroupProperty: expressionHelpers.setGroupProperty, 18256 getValueAtTime: expressionHelpers.getStaticValueAtTime, 18257 }), 18258 extendPrototype([l], o), 18259 extendPrototype([l], h), 18260 (h.prototype.getValueAtTime = function (t) { 18261 return ( 18262 this._cachingAtTime || 18263 (this._cachingAtTime = { 18264 shapeValue: shapePool.clone(this.pv), 18265 lastIndex: 0, 18266 lastTime: initialDefaultFrame, 18267 }), 18268 (t *= this.elem.globalData.frameRate), 18269 (t -= this.offsetTime) !== this._cachingAtTime.lastTime && 18270 ((this._cachingAtTime.lastIndex = 18271 this._cachingAtTime.lastTime < t 18272 ? this._caching.lastIndex 18273 : 0), 18274 (this._cachingAtTime.lastTime = t), 18275 this.interpolateShape( 18276 t, 18277 this._cachingAtTime.shapeValue, 18278 this._cachingAtTime 18279 )), 18280 this._cachingAtTime.shapeValue 18281 ); 18282 }), 18283 (h.prototype.initiateExpression = 18284 ExpressionManager.initiateExpression); 18285 var p = ShapePropertyFactory.getShapeProp; 18286 ShapePropertyFactory.getShapeProp = function (t, e, i, s, r) { 18287 var n = p(t, e, i, s, r); 18288 return ( 18289 (n.propertyIndex = e.ix), 18290 (n.lock = !1), 18291 3 === i 18292 ? expressionHelpers.searchExpressions(t, e.pt, n) 18293 : 4 === i && expressionHelpers.searchExpressions(t, e.ks, n), 18294 n.k && t.addDynamicProperty(n), 18295 n 18296 ); 18297 }; 18298 } 18299 function initialize$1() { 18300 addPropertyDecorator(); 18301 } 18302 function addDecorator() { 18303 (TextProperty.prototype.getExpressionValue = function (t, e) { 18304 var i = this.calculateExpression(e); 18305 if (t.t !== i) { 18306 var s = {}; 18307 return ( 18308 this.copyData(s, t), 18309 (s.t = i.toString()), 18310 (s.__complete = !1), 18311 s 18312 ); 18313 } 18314 return t; 18315 }), 18316 (TextProperty.prototype.searchProperty = function () { 18317 var t = this.searchKeyframes(), 18318 e = this.searchExpressions(); 18319 return (this.kf = t || e), this.kf; 18320 }), 18321 (TextProperty.prototype.searchExpressions = function () { 18322 return this.data.d.x 18323 ? ((this.calculateExpression = 18324 ExpressionManager.initiateExpression.bind(this)( 18325 this.elem, 18326 this.data.d, 18327 this 18328 )), 18329 this.addEffect(this.getExpressionValue.bind(this)), 18330 !0) 18331 : null; 18332 }); 18333 } 18334 function initialize() { 18335 addDecorator(); 18336 } 18337 function SVGComposableEffect() {} 18338 SVGComposableEffect.prototype = { 18339 createMergeNode: function (t, e) { 18340 var i, 18341 s, 18342 r = createNS("feMerge"); 18343 for (r.setAttribute("result", t), s = 0; s < e.length; s += 1) 18344 (i = createNS("feMergeNode")).setAttribute("in", e[s]), 18345 r.appendChild(i), 18346 r.appendChild(i); 18347 return r; 18348 }, 18349 }; 18350 var linearFilterValue = 18351 "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0"; 18352 function SVGTintFilter(t, e, i, s, r) { 18353 this.filterManager = e; 18354 var n = createNS("feColorMatrix"); 18355 n.setAttribute("type", "matrix"), 18356 n.setAttribute("color-interpolation-filters", "linearRGB"), 18357 n.setAttribute("values", linearFilterValue + " 1 0"), 18358 (this.linearFilter = n), 18359 n.setAttribute("result", s + "_tint_1"), 18360 t.appendChild(n), 18361 (n = createNS("feColorMatrix")).setAttribute("type", "matrix"), 18362 n.setAttribute("color-interpolation-filters", "sRGB"), 18363 n.setAttribute( 18364 "values", 18365 "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" 18366 ), 18367 n.setAttribute("result", s + "_tint_2"), 18368 t.appendChild(n), 18369 (this.matrixFilter = n); 18370 var a = this.createMergeNode(s, [r, s + "_tint_1", s + "_tint_2"]); 18371 t.appendChild(a); 18372 } 18373 function SVGFillFilter(t, e, i, s) { 18374 this.filterManager = e; 18375 var r = createNS("feColorMatrix"); 18376 r.setAttribute("type", "matrix"), 18377 r.setAttribute("color-interpolation-filters", "sRGB"), 18378 r.setAttribute( 18379 "values", 18380 "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" 18381 ), 18382 r.setAttribute("result", s), 18383 t.appendChild(r), 18384 (this.matrixFilter = r); 18385 } 18386 function SVGStrokeEffect(t, e, i) { 18387 (this.initialized = !1), 18388 (this.filterManager = e), 18389 (this.elem = i), 18390 (this.paths = []); 18391 } 18392 function SVGTritoneFilter(t, e, i, s) { 18393 this.filterManager = e; 18394 var r = createNS("feColorMatrix"); 18395 r.setAttribute("type", "matrix"), 18396 r.setAttribute("color-interpolation-filters", "linearRGB"), 18397 r.setAttribute( 18398 "values", 18399 "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0" 18400 ), 18401 t.appendChild(r); 18402 var n = createNS("feComponentTransfer"); 18403 n.setAttribute("color-interpolation-filters", "sRGB"), 18404 n.setAttribute("result", s), 18405 (this.matrixFilter = n); 18406 var a = createNS("feFuncR"); 18407 a.setAttribute("type", "table"), 18408 n.appendChild(a), 18409 (this.feFuncR = a); 18410 var o = createNS("feFuncG"); 18411 o.setAttribute("type", "table"), 18412 n.appendChild(o), 18413 (this.feFuncG = o); 18414 var h = createNS("feFuncB"); 18415 h.setAttribute("type", "table"), 18416 n.appendChild(h), 18417 (this.feFuncB = h), 18418 t.appendChild(n); 18419 } 18420 function SVGProLevelsFilter(t, e, i, s) { 18421 this.filterManager = e; 18422 var r = this.filterManager.effectElements, 18423 n = createNS("feComponentTransfer"); 18424 (r[10].p.k || 18425 0 !== r[10].p.v || 18426 r[11].p.k || 18427 1 !== r[11].p.v || 18428 r[12].p.k || 18429 1 !== r[12].p.v || 18430 r[13].p.k || 18431 0 !== r[13].p.v || 18432 r[14].p.k || 18433 1 !== r[14].p.v) && 18434 (this.feFuncR = this.createFeFunc("feFuncR", n)), 18435 (r[17].p.k || 18436 0 !== r[17].p.v || 18437 r[18].p.k || 18438 1 !== r[18].p.v || 18439 r[19].p.k || 18440 1 !== r[19].p.v || 18441 r[20].p.k || 18442 0 !== r[20].p.v || 18443 r[21].p.k || 18444 1 !== r[21].p.v) && 18445 (this.feFuncG = this.createFeFunc("feFuncG", n)), 18446 (r[24].p.k || 18447 0 !== r[24].p.v || 18448 r[25].p.k || 18449 1 !== r[25].p.v || 18450 r[26].p.k || 18451 1 !== r[26].p.v || 18452 r[27].p.k || 18453 0 !== r[27].p.v || 18454 r[28].p.k || 18455 1 !== r[28].p.v) && 18456 (this.feFuncB = this.createFeFunc("feFuncB", n)),
18457 (r[31].p.k || 18458 0 !== r[31].p.v || 18459 r[32].p.k || 18460 1 !== r[32].p.v || 18461 r[33].p.k || 18462 1 !== r[33].p.v || 18463 r[34].p.k || 18464 0 !== r[34].p.v || 18465 r[35].p.k || 18466 1 !== r[35].p.v) && 18467 (this.feFuncA = this.createFeFunc("feFuncA", n)), 18468 (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) && 18469 (n.setAttribute("color-interpolation-filters", "sRGB"), 18470 t.appendChild(n)), 18471 (r[3].p.k || 18472 0 !== r[3].p.v || 18473 r[4].p.k || 18474 1 !== r[4].p.v || 18475 r[5].p.k || 18476 1 !== r[5].p.v || 18477 r[6].p.k || 18478 0 !== r[6].p.v || 18479 r[7].p.k || 18480 1 !== r[7].p.v) && 18481 ((n = createNS("feComponentTransfer")).setAttribute( 18482 "color-interpolation-filters", 18483 "sRGB" 18484 ), 18485 n.setAttribute("result", s), 18486 t.appendChild(n), 18487 (this.feFuncRComposed = this.createFeFunc("feFuncR", n)), 18488 (this.feFuncGComposed = this.createFeFunc("feFuncG", n)), 18489 (this.feFuncBComposed = this.createFeFunc("feFuncB", n))); 18490 } 18491 function SVGDropShadowEffect(t, e, i, s, r) { 18492 var n = e.container.globalData.renderConfig.filterSize, 18493 a = e.data.fs || n; 18494 t.setAttribute("x", a.x || n.x), 18495 t.setAttribute("y", a.y || n.y), 18496 t.setAttribute("width", a.width || n.width), 18497 t.setAttribute("height", a.height || n.height), 18498 (this.filterManager = e); 18499 var o = createNS("feGaussianBlur"); 18500 o.setAttribute("in", "SourceAlpha"), 18501 o.setAttribute("result", s + "_drop_shadow_1"), 18502 o.setAttribute("stdDeviation", "0"), 18503 (this.feGaussianBlur = o), 18504 t.appendChild(o); 18505 var h = createNS("feOffset"); 18506 h.setAttribute("dx", "25"), 18507 h.setAttribute("dy", "0"), 18508 h.setAttribute("in", s + "_drop_shadow_1"), 18509 h.setAttribute("result", s + "_drop_shadow_2"), 18510 (this.feOffset = h), 18511 t.appendChild(h); 18512 var l = createNS("feFlood"); 18513 l.setAttribute("flood-color", "#00ff00"), 18514 l.setAttribute("flood-opacity", "1"), 18515 l.setAttribute("result", s + "_drop_shadow_3"), 18516 (this.feFlood = l), 18517 t.appendChild(l); 18518 var p = createNS("feComposite"); 18519 p.setAttribute("in", s + "_drop_shadow_3"), 18520 p.setAttribute("in2", s + "_drop_shadow_2"), 18521 p.setAttribute("operator", "in"), 18522 p.setAttribute("result", s + "_drop_shadow_4"), 18523 t.appendChild(p); 18524 var f = this.createMergeNode(s, [s + "_drop_shadow_4", r]); 18525 t.appendChild(f); 18526 } 18527 extendPrototype([SVGComposableEffect], SVGTintFilter), 18528 (SVGTintFilter.prototype.renderFrame = function (t) { 18529 if (t || this.filterManager._mdf) { 18530 var e = this.filterManager.effectElements[0].p.v, 18531 i = this.filterManager.effectElements[1].p.v, 18532 s = this.filterManager.effectElements[2].p.v / 100; 18533 this.linearFilter.setAttribute( 18534 "values", 18535 linearFilterValue + " " + s + " 0" 18536 ), 18537 this.matrixFilter.setAttribute( 18538 "values", 18539 i[0] - 18540 e[0] + 18541 " 0 0 0 " + 18542 e[0] + 18543 " " + 18544 (i[1] - e[1]) + 18545 " 0 0 0 " + 18546 e[1] + 18547 " " + 18548 (i[2] - e[2]) + 18549 " 0 0 0 " + 18550 e[2] + 18551 " 0 0 0 1 0" 18552 ); 18553 } 18554 }), 18555 (SVGFillFilter.prototype.renderFrame = function (t) { 18556 if (t || this.filterManager._mdf) { 18557 var e = this.filterManager.effectElements[2].p.v, 18558 i = this.filterManager.effectElements[6].p.v; 18559 this.matrixFilter.setAttribute( 18560 "values", 18561 "0 0 0 0 " + 18562 e[0] + 18563 " 0 0 0 0 " + 18564 e[1] + 18565 " 0 0 0 0 " + 18566 e[2] + 18567 " 0 0 0 " + 18568 i + 18569 " 0" 18570 ); 18571 } 18572 }), 18573 (SVGStrokeEffect.prototype.initialize = function () { 18574 var t, 18575 e, 18576 i, 18577 s, 18578 r = 18579 this.elem.layerElement.children || 18580 this.elem.layerElement.childNodes; 18581 for ( 18582 1 === this.filterManager.effectElements[1].p.v 18583 ? ((s = this.elem.maskManager.masksProperties.length), 18584 (i = 0)) 18585 : (s = 18586 (i = this.filterManager.effectElements[0].p.v - 1) + 1), 18587 (e = createNS("g")).setAttribute("fill", "none"), 18588 e.setAttribute("stroke-linecap", "round"), 18589 e.setAttribute("stroke-dashoffset", 1); 18590 i < s; 18591 i += 1 18592 ) 18593 (t = createNS("path")), 18594 e.appendChild(t), 18595 this.paths.push({ p: t, m: i }); 18596 if (3 === this.filterManager.effectElements[10].p.v) { 18597 var n = createNS("mask"), 18598 a = createElementID(); 18599 n.setAttribute("id", a), 18600 n.setAttribute("mask-type", "alpha"), 18601 n.appendChild(e), 18602 this.elem.globalData.defs.appendChild(n); 18603 var o = createNS("g"); 18604 for ( 18605 o.setAttribute( 18606 "mask", 18607 "url(" + getLocationHref() + "#" + a + ")" 18608 ); 18609 r[0]; 18610 18611 ) 18612 o.appendChild(r[0]); 18613 this.elem.layerElement.appendChild(o), 18614 (this.masker = n), 18615 e.setAttribute("stroke", "#fff"); 18616 } else if ( 18617 1 === this.filterManager.effectElements[10].p.v || 18618 2 === this.filterManager.effectElements[10].p.v 18619 ) { 18620 if (2 === this.filterManager.effectElements[10].p.v) 18621 for ( 18622 r = 18623 this.elem.layerElement.children || 18624 this.elem.layerElement.childNodes; 18625 r.length; 18626 18627 ) 18628 this.elem.layerElement.removeChild(r[0]); 18629 this.elem.layerElement.appendChild(e), 18630 this.elem.layerElement.removeAttribute("mask"), 18631 e.setAttribute("stroke", "#fff"); 18632 } 18633 (this.initialized = !0), (this.pathMasker = e); 18634 }), 18635 (SVGStrokeEffect.prototype.renderFrame = function (t) { 18636 this.initialized || this.initialize(); 18637 var e, 18638 i, 18639 s, 18640 r = this.paths.length; 18641 for (e = 0; e < r; e += 1) 18642 if ( 18643 -1 !== this.paths[e].m &&
18644 ((i = this.elem.maskManager.viewData[this.paths[e].m]), 18645 (s = this.paths[e].p), 18646 (t || this.filterManager._mdf || i.prop._mdf) && 18647 s.setAttribute("d", i.lastPath), 18648 t || 18649 this.filterManager.effectElements[9].p._mdf || 18650 this.filterManager.effectElements[4].p._mdf || 18651 this.filterManager.effectElements[7].p._mdf || 18652 this.filterManager.effectElements[8].p._mdf || 18653 i.prop._mdf) 18654 ) { 18655 if ( 18656 0 !== this.filterManager.effectElements[7].p.v || 18657 100 !== this.filterManager.effectElements[8].p.v 18658 ) { 18659 var n, 18660 a = 18661 0.01 * 18662 Math.min( 18663 this.filterManager.effectElements[7].p.v, 18664 this.filterManager.effectElements[8].p.v 18665 ), 18666 o = 18667 0.01 * 18668 Math.max( 18669 this.filterManager.effectElements[7].p.v, 18670 this.filterManager.effectElements[8].p.v 18671 ), 18672 h = s.getTotalLength(), 18673 l = "0 0 0 " + h * a + " ", 18674 p = Math.floor( 18675 (h * (o - a)) / 18676 (1 + 18677 2 * 18678 this.filterManager.effectElements[4].p.v * 18679 this.filterManager.effectElements[9].p.v * 18680 0.01) 18681 ); 18682 for (n = 0; n < p; n += 1) 18683 l += 18684 "1 " + 18685 2 * 18686 this.filterManager.effectElements[4].p.v * 18687 this.filterManager.effectElements[9].p.v * 18688 0.01 + 18689 " "; 18690 l += "0 " + 10 * h + " 0 0"; 18691 } else 18692 l = 18693 "1 " + 18694 2 * 18695 this.filterManager.effectElements[4].p.v * 18696 this.filterManager.effectElements[9].p.v * 18697 0.01; 18698 s.setAttribute("stroke-dasharray", l); 18699 } 18700 if ( 18701 ((t || this.filterManager.effectElements[4].p._mdf) && 18702 this.pathMasker.setAttribute( 18703 "stroke-width", 18704 2 * this.filterManager.effectElements[4].p.v 18705 ), 18706 (t || this.filterManager.effectElements[6].p._mdf) && 18707 this.pathMasker.setAttribute( 18708 "opacity", 18709 this.filterManager.effectElements[6].p.v 18710 ), 18711 (1 === this.filterManager.effectElements[10].p.v || 18712 2 === this.filterManager.effectElements[10].p.v) && 18713 (t || this.filterManager.effectElements[3].p._mdf)) 18714 ) { 18715 var f = this.filterManager.effectElements[3].p.v; 18716 this.pathMasker.setAttribute( 18717 "stroke", 18718 "rgb(" + 18719 bmFloor(255 * f[0]) + 18720 "," + 18721 bmFloor(255 * f[1]) + 18722 "," + 18723 bmFloor(255 * f[2]) + 18724 ")" 18725 ); 18726 } 18727 }), 18728 (SVGTritoneFilter.prototype.renderFrame = function (t) { 18729 if (t || this.filterManager._mdf) { 18730 var e = this.filterManager.effectElements[0].p.v, 18731 i = this.filterManager.effectElements[1].p.v, 18732 s = this.filterManager.effectElements[2].p.v, 18733 r = s[0] + " " + i[0] + " " + e[0], 18734 n = s[1] + " " + i[1] + " " + e[1], 18735 a = s[2] + " " + i[2] + " " + e[2]; 18736 this.feFuncR.setAttribute("tableValues", r), 18737 this.feFuncG.setAttribute("tableValues", n), 18738 this.feFuncB.setAttribute("tableValues", a); 18739 } 18740 }), 18741 (SVGProLevelsFilter.prototype.createFeFunc = function (t, e) { 18742 var i = createNS(t); 18743 return i.setAttribute("type", "table"), e.appendChild(i), i; 18744 }), 18745 (SVGProLevelsFilter.prototype.getTableValue = function ( 18746 t, 18747 e, 18748 i, 18749 s, 18750 r 18751 ) { 18752 for ( 18753 var n, 18754 a, 18755 o = 0, 18756 h = Math.min(t, e), 18757 l = Math.max(t, e), 18758 p = Array.call(null, { length: 256 }), 18759 f = 0, 18760 c = r - s, 18761 u = e - t; 18762 o <= 256; 18763 18764 ) 18765 (a = 18766 (n = o / 256) <= h 18767 ? u < 0 18768 ? r 18769 : s 18770 : n >= l 18771 ? u < 0 18772 ? s 18773 : r 18774 : s + c * Math.pow((n - t) / u, 1 / i)), 18775 (p[f] = a), 18776 (f += 1), 18777 (o += 256 / 255); 18778 return p.join(" "); 18779 }), 18780 (SVGProLevelsFilter.prototype.renderFrame = function (t) { 18781 if (t || this.filterManager._mdf) { 18782 var e, 18783 i = this.filterManager.effectElements; 18784 this.feFuncRComposed && 18785 (t || 18786 i[3].p._mdf || 18787 i[4].p._mdf || 18788 i[5].p._mdf || 18789 i[6].p._mdf || 18790 i[7].p._mdf) && 18791 ((e = this.getTableValue( 18792 i[3].p.v, 18793 i[4].p.v, 18794 i[5].p.v, 18795 i[6].p.v, 18796 i[7].p.v 18797 )), 18798 this.feFuncRComposed.setAttribute("tableValues", e), 18799 this.feFuncGComposed.setAttribute("tableValues", e), 18800 this.feFuncBComposed.setAttribute("tableValues", e)), 18801 this.feFuncR && 18802 (t || 18803 i[10].p._mdf || 18804 i[11].p._mdf || 18805 i[12].p._mdf || 18806 i[13].p._mdf || 18807 i[14].p._mdf) && 18808 ((e = this.getTableValue( 18809 i[10].p.v, 18810 i[11].p.v, 18811 i[12].p.v, 18812 i[13].p.v, 18813 i[14].p.v 18814 )), 18815 this.feFuncR.setAttribute("tableValues", e)), 18816 this.feFuncG && 18817 (t || 18818 i[17].p._mdf || 18819 i[18].p._mdf || 18820 i[19].p._mdf || 18821 i[20].p._mdf || 18822 i[21].p._mdf) && 18823 ((e = this.getTableValue( 18824 i[17].p.v, 18825 i[18].p.v, 18826 i[19].p.v, 18827 i[20].p.v, 18828 i[21].p.v 18829 )), 18830 this.feFuncG.setAttribute("tableValues", e)), 18831 this.feFuncB && 18832 (t || 18833 i[24].p._mdf || 18834 i[25].p._mdf || 18835 i[26].p._mdf || 18836 i[27].p._mdf || 18837 i[28].p._mdf) && 18838 ((e = this.getTableValue( 18839 i[24].p.v, 18840 i[25].p.v, 18841 i[26].p.v, 18842 i[27].p.v, 18843 i[28].p.v 18844 )), 18845 this.feFuncB.setAttribute("tableValues", e)), 18846 this.feFuncA && 18847 (t || 18848 i[31].p._mdf || 18849 i[32].p._mdf || 18850 i[33].p._mdf || 18851 i[34].p._mdf || 18852 i[35].p._mdf) && 18853 ((e = this.getTableValue( 18854 i[31].p.v, 18855 i[32].p.v, 18856 i[33].p.v, 18857 i[34].p.v, 18858 i[35].p.v 18859 )), 18860 this.feFuncA.setAttribute("tableValues", e)); 18861 } 18862 }), 18863 extendPrototype([SVGComposableEffect], SVGDropShadowEffect), 18864 (SVGDropShadowEffect.prototype.renderFrame = function (t) { 18865 if (t || this.filterManager._mdf) { 18866 if ( 18867 ((t || this.filterManager.effectElements[4].p._mdf) && 18868 this.feGaussianBlur.setAttribute( 18869 "stdDeviation", 18870 this.filterManager.effectElements[4].p.v / 4 18871 ), 18872 t || this.filterManager.effectElements[0].p._mdf) 18873 ) { 18874 var e = this.filterManager.effectElements[0].p.v; 18875 this.feFlood.setAttribute( 18876 "flood-color", 18877 rgbToHex( 18878 Math.round(255 * e[0]), 18879 Math.round(255 * e[1]), 18880 Math.round(255 * e[2]) 18881 ) 18882 ); 18883 } 18884 if ( 18885 ((t || this.filterManager.effectElements[1].p._mdf) && 18886 this.feFlood.setAttribute( 18887 "flood-opacity", 18888 this.filterManager.effectElements[1].p.v / 255 18889 ), 18890 t || 18891 this.filterManager.effectElements[2].p._mdf || 18892 this.filterManager.effectElements[3].p._mdf) 18893 ) { 18894 var i = this.filterManager.effectElements[3].p.v, 18895 s = 18896 (this.filterManager.effectElements[2].p.v - 90) * 18897 degToRads, 18898 r = i * Math.cos(s), 18899 n = i * Math.sin(s);
18900 this.feOffset.setAttribute("dx", r), 18901 this.feOffset.setAttribute("dy", n); 18902 } 18903 } 18904 }); 18905 var _svgMatteSymbols = []; 18906 function SVGMatte3Effect(t, e, i) { 18907 (this.initialized = !1), 18908 (this.filterManager = e), 18909 (this.filterElem = t), 18910 (this.elem = i), 18911 (i.matteElement = createNS("g")), 18912 i.matteElement.appendChild(i.layerElement), 18913 i.matteElement.appendChild(i.transformedElement), 18914 (i.baseElement = i.matteElement); 18915 } 18916 function SVGGaussianBlurEffect(t, e, i, s) { 18917 t.setAttribute("x", "-100%"), 18918 t.setAttribute("y", "-100%"), 18919 t.setAttribute("width", "300%"), 18920 t.setAttribute("height", "300%"), 18921 (this.filterManager = e); 18922 var r = createNS("feGaussianBlur"); 18923 r.setAttribute("result", s), 18924 t.appendChild(r), 18925 (this.feGaussianBlur = r); 18926 } 18927 function TransformEffect() {} 18928 function SVGTransformEffect(t, e) { 18929 this.init(e); 18930 } 18931 function CVTransformEffect(t) { 18932 this.init(t); 18933 } 18934 return ( 18935 (SVGMatte3Effect.prototype.findSymbol = function (t) { 18936 for (var e = 0, i = _svgMatteSymbols.length; e < i; ) { 18937 if (_svgMatteSymbols[e] === t) return _svgMatteSymbols[e]; 18938 e += 1; 18939 } 18940 return null; 18941 }), 18942 (SVGMatte3Effect.prototype.replaceInParent = function (t, e) { 18943 var i = t.layerElement.parentNode; 18944 if (i) { 18945 for ( 18946 var s, r = i.children, n = 0, a = r.length; 18947 n < a && r[n] !== t.layerElement; 18948 18949 ) 18950 n += 1; 18951 n <= a - 2 && (s = r[n + 1]); 18952 var o = createNS("use"); 18953 o.setAttribute("href", "#" + e), 18954 s ? i.insertBefore(o, s) : i.appendChild(o); 18955 } 18956 }), 18957 (SVGMatte3Effect.prototype.setElementAsMask = function (t, e) { 18958 if (!this.findSymbol(e)) { 18959 var i = createElementID(), 18960 s = createNS("mask"); 18961 s.setAttribute("id", e.layerId), 18962 s.setAttribute("mask-type", "alpha"), 18963 _svgMatteSymbols.push(e); 18964 var r = t.globalData.defs; 18965 r.appendChild(s); 18966 var n = createNS("symbol"); 18967 n.setAttribute("id", i), 18968 this.replaceInParent(e, i), 18969 n.appendChild(e.layerElement), 18970 r.appendChild(n); 18971 var a = createNS("use"); 18972 a.setAttribute("href", "#" + i), 18973 s.appendChild(a), 18974 (e.data.hd = !1), 18975 e.show(); 18976 } 18977 t.setMatte(e.layerId); 18978 }), 18979 (SVGMatte3Effect.prototype.initialize = function () { 18980 for ( 18981 var t = this.filterManager.effectElements[0].p.v, 18982 e = this.elem.comp.elements, 18983 i = 0, 18984 s = e.length; 18985 i < s; 18986 18987 ) 18988 e[i] && 18989 e[i].data.ind === t && 18990 this.setElementAsMask(this.elem, e[i]), 18991 (i += 1); 18992 this.initialized = !0; 18993 }), 18994 (SVGMatte3Effect.prototype.renderFrame = function () { 18995 this.initialized || this.initialize(); 18996 }), 18997 (SVGGaussianBlurEffect.prototype.renderFrame = function (t) { 18998 if (t || this.filterManager._mdf) { 18999 var e = 0.3 * this.filterManager.effectElements[0].p.v, 19000 i = this.filterManager.effectElements[1].p.v, 19001 s = 3 == i ? 0 : e, 19002 r = 2 == i ? 0 : e; 19003 this.feGaussianBlur.setAttribute("stdDeviation", s + " " + r); 19004 var n = 19005 1 == this.filterManager.effectElements[2].p.v 19006 ? "wrap" 19007 : "duplicate"; 19008 this.feGaussianBlur.setAttribute("edgeMode", n); 19009 } 19010 }), 19011 (TransformEffect.prototype.init = function (t) { 19012 (this.effectsManager = t),
19013 (this.type = effectTypes.TRANSFORM_EFFECT), 19014 (this.matrix = new Matrix()), 19015 (this.opacity = -1), 19016 (this._mdf = !1), 19017 (this._opMdf = !1); 19018 }), 19019 (TransformEffect.prototype.renderFrame = function (t) { 19020 if ( 19021 ((this._opMdf = !1), 19022 (this._mdf = !1), 19023 t || this.effectsManager._mdf) 19024 ) { 19025 var e = this.effectsManager.effectElements, 19026 i = e[0].p.v, 19027 s = e[1].p.v, 19028 r = 1 === e[2].p.v, 19029 n = e[3].p.v, 19030 a = r ? n : e[4].p.v, 19031 o = e[5].p.v, 19032 h = e[6].p.v, 19033 l = e[7].p.v; 19034 this.matrix.reset(), 19035 this.matrix.translate(-i[0], -i[1], i[2]), 19036 this.matrix.scale(0.01 * a, 0.01 * n, 1), 19037 this.matrix.rotate(-l * degToRads), 19038 this.matrix.skewFromAxis( 19039 -o * degToRads, 19040 (h + 90) * degToRads 19041 ), 19042 this.matrix.translate(s[0], s[1], 0), 19043 (this._mdf = !0), 19044 this.opacity !== e[8].p.v && 19045 ((this.opacity = e[8].p.v), (this._opMdf = !0)); 19046 } 19047 }), 19048 extendPrototype([TransformEffect], SVGTransformEffect), 19049 extendPrototype([TransformEffect], CVTransformEffect), 19050 registerRenderer("canvas", CanvasRenderer), 19051 registerRenderer("html", HybridRenderer), 19052 registerRenderer("svg", SVGRenderer), 19053 ShapeModifiers.registerModifier("tm", TrimModifier), 19054 ShapeModifiers.registerModifier("pb", PuckerAndBloatModifier), 19055 ShapeModifiers.registerModifier("rp", RepeaterModifier), 19056 ShapeModifiers.registerModifier("rd", RoundCornersModifier), 19057 ShapeModifiers.registerModifier("zz", ZigZagModifier), 19058 ShapeModifiers.registerModifier("op", OffsetPathModifier), 19059 setExpressionsPlugin(Expressions), 19060 setExpressionInterfaces(getInterface), 19061 initialize$1(), 19062 initialize(), 19063 registerEffect$1(20, SVGTintFilter, !0), 19064 registerEffect$1(21, SVGFillFilter, !0), 19065 registerEffect$1(22, SVGStrokeEffect, !1), 19066 registerEffect$1(23, SVGTritoneFilter, !0), 19067 registerEffect$1(24, SVGProLevelsFilter, !0), 19068 registerEffect$1(25, SVGDropShadowEffect, !0), 19069 registerEffect$1(28, SVGMatte3Effect, !1), 19070 registerEffect$1(29, SVGGaussianBlurEffect, !0), 19071 registerEffect$1(35, SVGTransformEffect, !1), 19072 registerEffect(35, CVTransformEffect), 19073 lottie 19074 ); 19075 }); 19076 }, 19077 9516: function (t, e, i) { 19078 "use strict"; 19079 i.r(e), 19080 i.d(e, { 19081 compose: () => I, 19082 createStore: () => S, 19083 bindActionCreators: () => F, 19084 combineReducers: () => E, 19085 applyMiddleware: () => O, 19086 }); 19087 let s = 19088 "object" == typeof global && 19089 global && 19090 global.Object === Object && 19091 global; 19092 var r = "object" == typeof self && self && self.Object === Object && self; 19093 let n = (s || r || Function("return this")()).Symbol; 19094 var a = Object.prototype, 19095 o = a.hasOwnProperty, 19096 h = a.toString, 19097 l = n ? n.toStringTag : void 0; 19098 let p = function (t) { 19099 var e = o.call(t, l), 19100 i = t[l]; 19101 try { 19102 t[l] = void 0; 19103 var s = !0; 19104 } catch (t) {} 19105 var r = h.call(t); 19106 return s && (e ? (t[l] = i) : delete t[l]), r; 19107 }; 19108 var f = Object.prototype.toString; 19109 let c = function (t) { 19110 return f.call(t); 19111 }; 19112 var u = "[object Null]", 19113 m = "[object Undefined]", 19114 d = n ? n.toStringTag : void 0; 19115 let g = function (t) { 19116 return null == t 19117 ? void 0 === t 19118 ? m 19119 : u 19120 : d && d in Object(t) 19121 ? p(t) 19122 : c(t); 19123 }, 19124 v = (function (t, e) { 19125 return function (i) { 19126 return t(e(i)); 19127 }; 19128 })(Object.getPrototypeOf, Object), 19129 y = function (t) { 19130 return null != t && "object" == typeof t; 19131 }; 19132 var b = "[object Object]", 19133 x = Object.prototype, 19134 _ = Function.prototype.toString, 19135 k = x.hasOwnProperty, 19136 A = _.call(Object); 19137 let C = function (t) { 19138 if (!y(t) || g(t) != b) return !1; 19139 var e = v(t); 19140 if (null === e) return !0; 19141 var i = k.call(e, "constructor") && e.constructor; 19142 return "function" == typeof i && i instanceof i && _.call(i) == A; 19143 }; 19144 var P = i(3485), 19145 w = { INIT: "@@redux/INIT" }; 19146 function S(t, e, i) { 19147 if ( 19148 ("function" == typeof e && void 0 === i && ((i = e), (e = void 0)), 19149 void 0 !== i) 19150 ) { 19151 if ("function" != typeof i) 19152 throw Error("Expected the enhancer to be a function."); 19153 return i(S)(t, e); 19154 } 19155 if ("function" != typeof t) 19156 throw Error("Expected the reducer to be a function."); 19157 var s, 19158 r = t, 19159 n = e, 19160 a = [], 19161 o = a, 19162 h = !1; 19163 function l() { 19164 o === a && (o = a.slice()); 19165 } 19166 function p() { 19167 return n; 19168 } 19169 function f(t) { 19170 if ("function" != typeof t) 19171 throw Error("Expected listener to be a function."); 19172 var e = !0; 19173 return ( 19174 l(), 19175 o.push(t), 19176 function () { 19177 if (e) { 19178 (e = !1), l(); 19179 var i = o.indexOf(t); 19180 o.splice(i, 1); 19181 } 19182 } 19183 ); 19184 } 19185 function c(t) { 19186 if (!C(t)) 19187 throw Error( 19188 "Actions must be plain objects. Use custom middleware for async actions." 19189 ); 19190 if (void 0 === t.type) 19191 throw Error( 19192 'Actions may not have an undefined "type" property. Have you misspelled a constant?' 19193 ); 19194 if (h) throw Error("Reducers may not dispatch actions."); 19195 try { 19196 (h = !0), (n = r(n, t)); 19197 } finally { 19198 h = !1; 19199 } 19200 for (var e = (a = o), i = 0; i < e.length; i++) e[i](); 19201 return t; 19202 } 19203 function u(t) { 19204 if ("function" != typeof t) 19205 throw Error("Expected the nextReducer to be a function."); 19206 (r = t), c({ type: w.INIT }); 19207 } 19208 function m() { 19209 var t, 19210 e = f; 19211 return ( 19212 ((t = { 19213 subscribe: function (t) { 19214 if ("object" != typeof t) 19215 throw TypeError("Expected the observer to be an object."); 19216 function i() { 19217 t.next && t.next(p()); 19218 } 19219 return i(), { unsubscribe: e(i) }; 19220 }, 19221 })[P.Z] = function () { 19222 return this; 19223 }), 19224 t 19225 ); 19226 } 19227 return (
19228 c({ type: w.INIT }), 19229 ((s = { dispatch: c, subscribe: f, getState: p, replaceReducer: u })[ 19230 P.Z 19231 ] = m), 19232 s 19233 ); 19234 } 19235 function D(t, e) { 19236 var i = e && e.type; 19237 return ( 19238 "Given action " + 19239 ((i && '"' + i.toString() + '"') || "an action") + 19240 ', reducer "' + 19241 t + 19242 '" returned undefined. To ignore an action, you must explicitly return the previous state.' 19243 ); 19244 } 19245 function T(t) { 19246 Object.keys(t).forEach(function (e) { 19247 var i = t[e]; 19248 if (void 0 === i(void 0, { type: w.INIT })) 19249 throw Error( 19250 'Reducer "' + 19251 e + 19252 '" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.' 19253 ); 19254 if ( 19255 void 0 === 19256 i(void 0, { 19257 type: 19258 "@@redux/PROBE_UNKNOWN_ACTION_" + 19259 Math.random().toString(36).substring(7).split("").join("."), 19260 }) 19261 ) 19262 throw Error( 19263 'Reducer "' + 19264 e + 19265 "\" returned undefined when probed with a random type. Don't try to handle " + 19266 w.INIT + 19267 ' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.' 19268 ); 19269 }); 19270 } 19271 function E(t) { 19272 for (var e, i = Object.keys(t), s = {}, r = 0; r < i.length; r++) { 19273 var n = i[r]; 19274 "function" == typeof t[n] && (s[n] = t[n]); 19275 } 19276 var a = Object.keys(s); 19277 try { 19278 T(s); 19279 } catch (t) { 19280 e = t; 19281 } 19282 return function () { 19283 var t = 19284 arguments.length <= 0 || void 0 === arguments[0] 19285 ? {} 19286 : arguments[0], 19287 i = arguments[1]; 19288 if (e) throw e; 19289 for (var r = !1, n = {}, o = 0; o < a.length; o++) { 19290 var h = a[o], 19291 l = s[h], 19292 p = t[h], 19293 f = l(p, i); 19294 if (void 0 === f) throw Error(D(h, i)); 19295 (n[h] = f), (r = r || f !== p); 19296 } 19297 return r ? n : t; 19298 }; 19299 } 19300 function M(t, e) { 19301 return function () { 19302 return e(t.apply(void 0, arguments)); 19303 }; 19304 } 19305 function F(t, e) { 19306 if ("function" == typeof t) return M(t, e); 19307 if ("object" != typeof t || null === t) 19308 throw Error( 19309 "bindActionCreators expected an object or a function, instead received " + 19310 (null === t ? "null" : typeof t) + 19311 '. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?' 19312 ); 19313 for (var i = Object.keys(t), s = {}, r = 0; r < i.length; r++) { 19314 var n = i[r], 19315 a = t[n]; 19316 "function" == typeof a && (s[n] = M(a, e)); 19317 } 19318 return s; 19319 } 19320 function I() { 19321 for (var t = arguments.length, e = Array(t), i = 0; i < t; i++) 19322 e[i] = arguments[i]; 19323 if (0 === e.length) 19324 return function (t) { 19325 return t; 19326 }; 19327 if (1 === e.length) return e[0]; 19328 var s = e[e.length - 1], 19329 r = e.slice(0, -1); 19330 return function () { 19331 return r.reduceRight(function (t, e) { 19332 return e(t); 19333 }, s.apply(void 0, arguments)); 19334 }; 19335 } 19336 var L = 19337 Object.assign || 19338 function (t) { 19339 for (var e = 1; e < arguments.length; e++) { 19340 var i = arguments[e]; 19341 for (var s in i) 19342 Object.prototype.hasOwnProperty.call(i, s) && (t[s] = i[s]); 19343 } 19344 return t; 19345 }; 19346 function O() { 19347 for (var t = arguments.length, e = Array(t), i = 0; i < t; i++) 19348 e[i] = arguments[i]; 19349 return function (t) { 19350 return function (i, s, r) { 19351 var n = t(i, s, r), 19352 a = n.dispatch, 19353 o = [], 19354 h = { 19355 getState: n.getState, 19356 dispatch: function (t) { 19357 return a(t); 19358 }, 19359 }; 19360 return ( 19361 (o = e.map(function (t) { 19362 return t(h); 19363 })), 19364 (a = I.apply(void 0, o)(n.dispatch)), 19365 L({}, n, { dispatch: a }) 19366 ); 19367 }; 19368 }; 19369 } 19370 }, 19371 3485: function (t, e, i) { 19372 "use strict"; 19373 var s; 19374 function r(t) { 19375 var e, 19376 i = t.Symbol; 19377 return ( 19378 "function" == typeof i 19379 ? i.observable 19380 ? (e = i.observable) 19381 : ((e = i("observable")), (i.observable = e)) 19382 : (e = "@@observable"), 19383 e 19384 ); 19385 } 19386 i.d(e, { Z: () => n }), (t = i.hmd(t)); 19387 let n = r( 19388 (s = 19389 "undefined" != typeof self 19390 ? self 19391 : "undefined" != typeof window 19392 ? window 19393 : void 0 !== i.g 19394 ? i.g 19395 : t) 19396 ); 19397 }, 19398 1185: function (t, e) { 19399 "use strict"; 19400 Object.defineProperty(e, "__esModule", { value: !0 }); 19401 var i = 19402 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 19403 ? function (t) { 19404 return typeof t; 19405 } 19406 : function (t) { 19407 return t && 19408 "function" == typeof Symbol && 19409 t.constructor === Symbol && 19410 t !== Symbol.prototype 19411 ? "symbol" 19412 : typeof t; 19413 }; 19414 (e.clone = o), 19415 (e.addLast = p), 19416 (e.addFirst = f), 19417 (e.removeLast = c), 19418 (e.removeFirst = u), 19419 (e.insert = m), 19420 (e.removeAt = d), 19421 (e.replaceAt = g), 19422 (e.getIn = v), 19423 (e.set = y), 19424 (e.setIn = x), 19425 (e.update = _), 19426 (e.updateIn = k), 19427 (e.merge = A), 19428 (e.mergeDeep = C), 19429 (e.mergeIn = P), 19430 (e.omit = w), 19431 (e.addDefaults = S); 19432 var s = "INVALID_ARGS"; 19433 function r(t) { 19434 throw Error(t); 19435 } 19436 function n(t) { 19437 var e = Object.keys(t); 19438 return Object.getOwnPropertySymbols 19439 ? e.concat(Object.getOwnPropertySymbols(t)) 19440 : e; 19441 } 19442 var a = {}.hasOwnProperty; 19443 function o(t) { 19444 if (Array.isArray(t)) return t.slice(); 19445 for (var e = n(t), i = {}, s = 0; s < e.length; s++) { 19446 var r = e[s]; 19447 i[r] = t[r]; 19448 } 19449 return i; 19450 } 19451 function h(t, e, i) { 19452 var a = i; 19453 null == a && r(s); 19454 for ( 19455 var p = !1, f = arguments.length, c = Array(f > 3 ? f - 3 : 0), u = 3; 19456 u < f; 19457 u++ 19458 ) 19459 c[u - 3] = arguments[u]; 19460 for (var m = 0; m < c.length; m++) { 19461 var d = c[m]; 19462 if (null != d) { 19463 var g = n(d); 19464 if (g.length) 19465 for (var v = 0; v <= g.length; v++) { 19466 var y = g[v]; 19467 if (!t || void 0 === a[y]) { 19468 var b = d[y]; 19469 e && l(a[y]) && l(b) && (b = h(t, e, a[y], b)), 19470 void 0 !== b && 19471 b !== a[y] && 19472 (p || ((p = !0), (a = o(a))), (a[y] = b)); 19473 } 19474 } 19475 } 19476 } 19477 return a; 19478 } 19479 function l(t) { 19480 var e = void 0 === t ? "undefined" : i(t); 19481 return null != t && ("object" === e || "function" === e); 19482 } 19483 function p(t, e) { 19484 return Array.isArray(e) ? t.concat(e) : t.concat([e]); 19485 } 19486 function f(t, e) { 19487 return Array.isArray(e) ? e.concat(t) : [e].concat(t); 19488 } 19489 function c(t) { 19490 return t.length ? t.slice(0, t.length - 1) : t; 19491 } 19492 function u(t) { 19493 return t.length ? t.slice(1) : t; 19494 } 19495 function m(t, e, i) { 19496 return t 19497 .slice(0, e) 19498 .concat(Array.isArray(i) ? i : [i]) 19499 .concat(t.slice(e)); 19500 } 19501 function d(t, e) { 19502 return e >= t.length || e < 0 19503 ? t 19504 : t.slice(0, e).concat(t.slice(e + 1)); 19505 } 19506 function g(t, e, i) { 19507 if (t[e] === i) return t; 19508 for (var s = t.length, r = Array(s), n = 0; n < s; n++) r[n] = t[n]; 19509 return (r[e] = i), r; 19510 } 19511 function v(t, e) { 19512 if ((Array.isArray(e) || r(s), null != t)) { 19513 for (var i = t, n = 0; n < e.length; n++) { 19514 var a = e[n]; 19515 if (void 0 === (i = null != i ? i[a] : void 0)) break; 19516 } 19517 return i; 19518 } 19519 } 19520 function y(t, e, i) { 19521 var s = "number" == typeof e ? [] : {}, 19522 r = null == t ? s : t; 19523 if (r[e] === i) return r; 19524 var n = o(r); 19525 return (n[e] = i), n; 19526 } 19527 function b(t, e, i, s) { 19528 var r = void 0, 19529 n = e[s]; 19530 return ( 19531 (r = 19532 s === e.length - 1 19533 ? i 19534 : b( 19535 l(t) && l(t[n]) 19536 ? t[n] 19537 : "number" == typeof e[s + 1] 19538 ? [] 19539 : {}, 19540 e, 19541 i, 19542 s + 1 19543 )), 19544 y(t, n, r) 19545 ); 19546 } 19547 function x(t, e, i) { 19548 return e.length ? b(t, e, i, 0) : i; 19549 } 19550 function _(t, e, i) { 19551 var s = i(null == t ? void 0 : t[e]); 19552 return y(t, e, s); 19553 } 19554 function k(t, e, i) { 19555 var s = i(v(t, e)); 19556 return x(t, e, s); 19557 } 19558 function A(t, e, i, s, r, n) { 19559 for ( 19560 var a = arguments.length, o = Array(a > 6 ? a - 6 : 0), l = 6; 19561 l < a; 19562 l++ 19563 ) 19564 o[l - 6] = arguments[l]; 19565 return o.length 19566 ? h.call.apply(h, [null, !1, !1, t, e, i, s, r, n].concat(o)) 19567 : h(!1, !1, t, e, i, s, r, n); 19568 } 19569 function C(t, e, i, s, r, n) { 19570 for ( 19571 var a = arguments.length, o = Array(a > 6 ? a - 6 : 0), l = 6; 19572 l < a; 19573 l++ 19574 ) 19575 o[l - 6] = arguments[l]; 19576 return o.length 19577 ? h.call.apply(h, [null, !1, !0, t, e, i, s, r, n].concat(o)) 19578 : h(!1, !0, t, e, i, s, r, n); 19579 } 19580 function P(t, e, i, s, r, n, a) { 19581 var o = v(t, e); 19582 null == o && (o = {}); 19583 for ( 19584 var l = void 0, 19585 p = arguments.length, 19586 f = Array(p > 7 ? p - 7 : 0), 19587 c = 7; 19588 c < p; 19589 c++ 19590 ) 19591 f[c - 7] = arguments[c]; 19592 return x( 19593 t, 19594 e, 19595 (l = f.length 19596 ? h.call.apply(h, [null, !1, !1, o, i, s, r, n, a].concat(f)) 19597 : h(!1, !1, o, i, s, r, n, a)) 19598 ); 19599 } 19600 function w(t, e) { 19601 for ( 19602 var i = Array.isArray(e) ? e : [e], s = !1, r = 0; 19603 r < i.length; 19604 r++ 19605 ) 19606 if (a.call(t, i[r])) { 19607 s = !0; 19608 break; 19609 } 19610 if (!s) return t; 19611 for (var o = {}, h = n(t), l = 0; l < h.length; l++) { 19612 var p = h[l]; 19613 i.indexOf(p) >= 0 || (o[p] = t[p]); 19614 } 19615 return o; 19616 } 19617 function S(t, e, i, s, r, n) { 19618 for ( 19619 var a = arguments.length, o = Array(a > 6 ? a - 6 : 0), l = 6; 19620 l < a; 19621 l++ 19622 ) 19623 o[l - 6] = arguments[l]; 19624 return o.length 19625 ? h.call.apply(h, [null, !0, !1, t, e, i, s, r, n].concat(o)) 19626 : h(!0, !1, t, e, i, s, r, n); 19627 } 19628 e.default = { 19629 clone: o, 19630 addLast: p, 19631 addFirst: f, 19632 removeLast: c, 19633 removeFirst: u, 19634 insert: m, 19635 removeAt: d, 19636 replaceAt: g, 19637 getIn: v, 19638 set: y, 19639 setIn: x, 19640 update: _, 19641 updateIn: k, 19642 merge: A, 19643 mergeDeep: C, 19644 mergeIn: P, 19645 omit: w, 19646 addDefaults: S, 19647 }; 19648 }, 19649 }, 19650]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.