@lottiefiles/lottie-player 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/dist/lottie-player.d.ts +233 -252
- package/dist/lottie-player.d.ts.map +1 -0
- package/dist/lottie-player.esm.js +77 -0
- package/dist/lottie-player.esm.js.map +1 -0
- package/dist/lottie-player.js +77 -350
- package/dist/lottie-player.js.map +1 -1
- package/dist/lottie-player.styles.d.ts +6 -0
- package/dist/lottie-player.styles.d.ts.map +1 -0
- package/dist/tgs-player.d.ts +29 -263
- package/dist/tgs-player.d.ts.map +1 -0
- package/dist/tgs-player.esm.js +54 -0
- package/dist/tgs-player.esm.js.map +1 -0
- package/dist/tgs-player.js +54 -355
- package/dist/tgs-player.js.map +1 -1
- package/dist/tgs-player.styles.d.ts +6 -0
- package/dist/tgs-player.styles.d.ts.map +1 -0
- package/dist/versions.d.ts +3 -0
- package/dist/versions.d.ts.map +1 -0
- package/package.json +83 -56
- package/dist/lottie-player.mjs +0 -339
- package/dist/lottie-player.mjs.map +0 -1
- package/dist/tgs-player.mjs +0 -349
- package/dist/tgs-player.mjs.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tgs-player.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../node_modules/pako/dist/pako.esm.mjs","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/lottie-web/build/player/lottie.js","../src/lottie-player.styles.ts","../src/versions.ts","../src/lottie-player.ts","../node_modules/lit-element/index.js","../src/tgs-player.styles.ts","../src/tgs-player.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst n=n=>e=>\"function\"==typeof e?((n,e)=>(window.customElements.define(n,e),e))(n,e):((n,e)=>{const{kind:t,elements:i}=e;return{kind:t,elements:i,finisher(e){window.customElements.define(n,e)}}})(n,e);export{n as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}};function e(e){return(n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i)})(e,n,t):i(e,n)}export{e as property};\n//# sourceMappingURL=property.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,o)=>{Object.defineProperty(t,o,e)},t=(e,t)=>({kind:\"method\",placement:\"prototype\",key:t.key,descriptor:e}),o=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:\"method\",placement:\"prototype\",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n)}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod};\n//# sourceMappingURL=base.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function i(i,n){return o({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n=\"symbol\"==typeof o?Symbol():\"__\"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]}}return t}})}export{i as query};\n//# sourceMappingURL=query.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","\n/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED$1 = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN$1 = 2;\n\n/*============================================================================*/\n\n\nfunction zero$1(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES$1 = 30;\n/* number of distance codes */\n\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\n\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES$1 + 2) * 2);\nzero$1(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES$1 * 2);\nzero$1(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero$1(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH$1 - MIN_MATCH$1 + 1);\nzero$1(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES$1);\nzero$1(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES$1);\nzero$1(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE$1; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n const next_code = new Array(MAX_BITS$1 + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS$1; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n let len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES$1 - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES$1; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES$1 + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES$1; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS$1 + 1, L_CODES$1, MAX_BITS$1);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES$1, MAX_BITS$1);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES$1, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES$1; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES$1; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES$1; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let lx = 0; /* running index in l_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS$1 + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE$1;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES$1 - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let black_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS$1; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init$1 = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block$1 = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align$1 = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block$1 = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN$1) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block$1(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED$1 || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally$1 = (s, dist, lc) =>\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //let out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n};\n\nvar _tr_init_1 = _tr_init$1;\nvar _tr_stored_block_1 = _tr_stored_block$1;\nvar _tr_flush_block_1 = _tr_flush_block$1;\nvar _tr_tally_1 = _tr_tally$1;\nvar _tr_align_1 = _tr_align$1;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants$2 = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$3, Z_BLOCK: Z_BLOCK$1,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_UNKNOWN,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants$2;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED$2; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH$2;\n _tr_init(s);\n return Z_OK$3;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK$3) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$2; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR$2; }\n strm.state.gzhead = head;\n return Z_OK$3;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR$2;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION$1) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$2 ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED$2, MAX_WBITS$1, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY$1);\n};\n\n\nconst deflate$2 = (strm, flush) => {\n\n let beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK$1 || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR$2) : Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH$3)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);\n }\n\n s.strm = strm; /* just in case */\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n let header = (Z_DEFLATED$2 + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK$3;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH$3) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH$2 && s.status !== FINISH_STATE)) {\n let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK$3;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK$1) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH$1) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK$3;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH$3) { return Z_OK$3; }\n if (s.wrap <= 0) { return Z_STREAM_END$3; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK$3 : Z_STREAM_END$3;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR$2;\n }\n\n const status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR$2) : Z_OK$3;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR$2;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK$3;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2$1 = deflate$2;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1$2 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2$1,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH: Z_FINISH$2,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate$1(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1$2.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1$2.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1$2.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$2 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1$2.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$2) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1$2.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$2;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$2) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate$1(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip$1(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_2 = deflate$1;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar constants$1 = constants$2;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD$1 = 30; /* got a data error -- remain here until reset */\nconst TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE$1;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n// let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES$1 || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES$1) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS$1) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,\n Z_DEFLATED\n} = constants$2;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 1; /* i: waiting for magic header */\nconst FLAGS = 2; /* i: waiting for method and flags (gzip) */\nconst TIME = 3; /* i: waiting for modification time (gzip) */\nconst OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 5; /* i: waiting for extra length (gzip) */\nconst EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nconst NAME = 7; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 8; /* i: waiting for end of comment (gzip) */\nconst HCRC = 9; /* i: waiting for header crc (gzip) */\nconst DICTID = 10; /* i: waiting for dictionary check value */\nconst DICT = 11; /* waiting for inflateSetDictionary() call */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 14; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 17; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 18; /* i: waiting for code length code lengths */\nconst CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 20; /* i: same as LEN below, but only first time in */\nconst LEN = 21; /* i: waiting for length/lit/eob code */\nconst LENEXT = 22; /* i: waiting for length extra bits */\nconst DIST = 23; /* i: waiting for distance code */\nconst DISTEXT = 24; /* i: waiting for distance extra bits */\nconst MATCH = 25; /* o: waiting for output space to copy string */\nconst LIT = 26; /* o: waiting for output space to write literal */\nconst CHECK = 27; /* i: waiting for 32-bit check value */\nconst LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 29; /* finished check, done -- remain here until reset */\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst MEM = 31; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$1;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$1) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate$2 = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$1;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT$1;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$1;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR$1;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH$1))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$1;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$1;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR$1;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$1;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2$1 = inflate$2;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1$2 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2$1,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate$1(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1$2.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1$2.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1$2.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1$2.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = inflate_1$2.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = inflate_1$2.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1$2.inflateReset(strm);\n status = inflate_1$2.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = inflate_1$2.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate$1(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1$1 = Inflate$1;\nvar inflate_2 = inflate$1;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip$1 = inflate$1;\nvar constants = constants$2;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1$1,\n\tinflate: inflate_2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip$1,\n\tconstants: constants\n};\n\nconst { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;\n\nconst { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;\n\n\n\nvar Deflate_1 = Deflate;\nvar deflate_1 = deflate;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar Inflate_1 = Inflate;\nvar inflate_1 = inflate;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip_1 = ungzip;\nvar constants_1 = constants$2;\n\nvar pako = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tInflate: Inflate_1,\n\tinflate: inflate_1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\nexport { Deflate_1 as Deflate, Inflate_1 as Inflate, constants_1 as constants, pako as default, deflate_1 as deflate, deflateRaw_1 as deflateRaw, gzip_1 as gzip, inflate_1 as inflate, inflateRaw_1 as inflateRaw, ungzip_1 as ungzip };\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,e=Symbol(),n=new Map;class s{constructor(t,n){if(this._$cssResult$=!0,n!==e)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t}get styleSheet(){let e=n.get(this.cssText);return t&&void 0===e&&(n.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const o=t=>new s(\"string\"==typeof t?t:t+\"\",e),r=(t,...n)=>{const o=1===t.length?t[0]:n.reduce(((e,n,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(n)+t[s+1]),t[0]);return new s(o,e)},i=(e,n)=>{t?e.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((t=>{const n=document.createElement(\"style\"),s=window.litNonce;void 0!==s&&n.setAttribute(\"nonce\",s),n.textContent=t.cssText,e.appendChild(n)}))},S=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t;export{s as CSSResult,i as adoptStyles,r as css,S as getCompatibleStyle,t as supportsAdoptingStyleSheets,o as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window.trustedTypes,r=e?e.emptyScript:\"\",h=window.reactiveElementPolyfillSupport,o={toAttribute(t,i){switch(i){case Boolean:t=t?r:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},n=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:o,reflect:!1,hasChanged:n};class a extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Eh(s,i);void 0!==e&&(this._$Eu.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(\"finalized\"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Eh(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$ES(t,i,s=l){var e,r;const h=this.constructor._$Eh(t,s);if(void 0!==h&&!0===s.reflect){const n=(null!==(r=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==r?r:o.toAttribute)(i,s.type);this._$Ei=t,null==n?this.removeAttribute(h):this.setAttribute(h,n),this._$Ei=null}}_$AK(t,i){var s,e,r;const h=this.constructor,n=h._$Eu.get(t);if(void 0!==n&&this._$Ei!==n){const t=h.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(e=null===(s=l)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:\"function\"==typeof l?l:null)&&void 0!==r?r:o.fromAttribute;this._$Ei=n,this[n]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||n)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}a.finalized=!0,a.elementProperties=new Map,a.elementStyles=[],a.shadowRootOptions={mode:\"open\"},null==h||h({ReactiveElement:a}),(null!==(s=globalThis.reactiveElementVersions)&&void 0!==s?s:globalThis.reactiveElementVersions=[]).push(\"1.2.1\");export{a as ReactiveElement,o as defaultConverter,n as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=globalThis.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+e,n=`<${o}>`,l=document,h=(t=\"\")=>l.createComment(t),r=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||\"function\"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \t\\n\f\\r](?:([^\\s\"'>=/]+)([ \t\\n\f\\r]*=[ \t\\n\f\\r]*(?:[^ \t\\n\f\\r\"'`<>=]|(\"|')|))|$)/g,_=/'/g,m=/\"/g,g=/^(?:script|style|textarea)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for(\"lit-noChange\"),w=Symbol.for(\"lit-nothing\"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?\"<svg>\":\"\",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?\"!--\"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp(\"</\"+u[2],\"g\")),d=f):void 0!==u[3]&&(d=f):d===f?\">\"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'\"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+\"$lit$\"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||\"<?>\")+(2===i?\"</svg>\":\"\");if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith(\"$lit$\")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+\"$lit$\").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?M:\"?\"===i[1]?H:\"@\"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||\"\"===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):u(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.S(l.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.S(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}A(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.M(h()),this.M(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.k(t)}k(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class M extends S{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===w?void 0:t}}const k=i?i.emptyScript:\"\";class H extends S{constructor(){super(...arguments),this.type=4}k(t){t&&t!==w?this.element.setAttribute(this.name,k):this.element.removeAttribute(this.name)}}class I extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const R={P:\"$lit$\",V:e,L:o,I:1,N:C,R:V,D:u,j:P,H:N,O:S,F:H,B:I,W:M,Z:L},z=window.litHtmlPolyfillSupport;null==z||z(E,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push(\"2.1.2\");export{R as _$LH,$ as html,b as noChange,w as nothing,x as render,y as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.1.2\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","(typeof navigator !== \"undefined\") && (function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());\r\n})(this, (function () { 'use strict';\r\n\r\n var svgNS = 'http://www.w3.org/2000/svg';\r\n var locationHref = '';\r\n var _useWebWorker = false;\r\n var initialDefaultFrame = -999999;\r\n\r\n var setWebWorker = function setWebWorker(flag) {\r\n _useWebWorker = !!flag;\r\n };\r\n\r\n var getWebWorker = function getWebWorker() {\r\n return _useWebWorker;\r\n };\r\n\r\n var setLocationHref = function setLocationHref(value) {\r\n locationHref = value;\r\n };\r\n\r\n var getLocationHref = function getLocationHref() {\r\n return locationHref;\r\n };\r\n\r\n function createTag(type) {\r\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n return document.createElement(type);\r\n }\r\n\r\n function extendPrototype(sources, destination) {\r\n var i;\r\n var len = sources.length;\r\n var sourcePrototype;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n sourcePrototype = sources[i].prototype;\r\n\r\n for (var attr in sourcePrototype) {\r\n if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\r\n }\r\n }\r\n }\r\n\r\n function getDescriptor(object, prop) {\r\n return Object.getOwnPropertyDescriptor(object, prop);\r\n }\r\n\r\n function createProxyFunction(prototype) {\r\n function ProxyFunction() {}\r\n\r\n ProxyFunction.prototype = prototype;\r\n return ProxyFunction;\r\n }\r\n\r\n // import Howl from '../../3rd_party/howler';\r\n var audioControllerFactory = function () {\r\n function AudioController(audioFactory) {\r\n this.audios = [];\r\n this.audioFactory = audioFactory;\r\n this._volume = 1;\r\n this._isMuted = false;\r\n }\r\n\r\n AudioController.prototype = {\r\n addAudio: function addAudio(audio) {\r\n this.audios.push(audio);\r\n },\r\n pause: function pause() {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].pause();\r\n }\r\n },\r\n resume: function resume() {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].resume();\r\n }\r\n },\r\n setRate: function setRate(rateValue) {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].setRate(rateValue);\r\n }\r\n },\r\n createAudio: function createAudio(assetPath) {\r\n if (this.audioFactory) {\r\n return this.audioFactory(assetPath);\r\n }\r\n\r\n if (window.Howl) {\r\n return new window.Howl({\r\n src: [assetPath]\r\n });\r\n }\r\n\r\n return {\r\n isPlaying: false,\r\n play: function play() {\r\n this.isPlaying = true;\r\n },\r\n seek: function seek() {\r\n this.isPlaying = false;\r\n },\r\n playing: function playing() {},\r\n rate: function rate() {},\r\n setVolume: function setVolume() {}\r\n };\r\n },\r\n setAudioFactory: function setAudioFactory(audioFactory) {\r\n this.audioFactory = audioFactory;\r\n },\r\n setVolume: function setVolume(value) {\r\n this._volume = value;\r\n\r\n this._updateVolume();\r\n },\r\n mute: function mute() {\r\n this._isMuted = true;\r\n\r\n this._updateVolume();\r\n },\r\n unmute: function unmute() {\r\n this._isMuted = false;\r\n\r\n this._updateVolume();\r\n },\r\n getVolume: function getVolume() {\r\n return this._volume;\r\n },\r\n _updateVolume: function _updateVolume() {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\r\n }\r\n }\r\n };\r\n return function () {\r\n return new AudioController();\r\n };\r\n }();\r\n\r\n var createTypedArray = function () {\r\n function createRegularArray(type, len) {\r\n var i = 0;\r\n var arr = [];\r\n var value;\r\n\r\n switch (type) {\r\n case 'int16':\r\n case 'uint8c':\r\n value = 1;\r\n break;\r\n\r\n default:\r\n value = 1.1;\r\n break;\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr.push(value);\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function createTypedArrayFactory(type, len) {\r\n if (type === 'float32') {\r\n return new Float32Array(len);\r\n }\r\n\r\n if (type === 'int16') {\r\n return new Int16Array(len);\r\n }\r\n\r\n if (type === 'uint8c') {\r\n return new Uint8ClampedArray(len);\r\n }\r\n\r\n return createRegularArray(type, len);\r\n }\r\n\r\n if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\r\n return createTypedArrayFactory;\r\n }\r\n\r\n return createRegularArray;\r\n }();\r\n\r\n function createSizedArray(len) {\r\n return Array.apply(null, {\r\n length: len\r\n });\r\n }\r\n\r\n function _typeof$6(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\r\n var subframeEnabled = true;\r\n var expressionsPlugin = null;\r\n var expressionsInterfaces = null;\r\n var idPrefix$1 = '';\r\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\n var _shouldRoundValues = false;\r\n var bmPow = Math.pow;\r\n var bmSqrt = Math.sqrt;\r\n var bmFloor = Math.floor;\r\n var bmMax = Math.max;\r\n var bmMin = Math.min;\r\n var BMMath = {};\r\n\r\n (function () {\r\n var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\r\n var i;\r\n var len = propertyNames.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n BMMath[propertyNames[i]] = Math[propertyNames[i]];\r\n }\r\n })();\r\n\r\n function ProjectInterface$1() {\r\n return {};\r\n }\r\n\r\n BMMath.random = Math.random;\r\n\r\n BMMath.abs = function (val) {\r\n var tOfVal = _typeof$6(val);\r\n\r\n if (tOfVal === 'object' && val.length) {\r\n var absArr = createSizedArray(val.length);\r\n var i;\r\n var len = val.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n absArr[i] = Math.abs(val[i]);\r\n }\r\n\r\n return absArr;\r\n }\r\n\r\n return Math.abs(val);\r\n };\r\n\r\n var defaultCurveSegments = 150;\r\n var degToRads = Math.PI / 180;\r\n var roundCorner = 0.5519;\r\n\r\n function roundValues(flag) {\r\n _shouldRoundValues = !!flag;\r\n }\r\n\r\n function bmRnd(value) {\r\n if (_shouldRoundValues) {\r\n return Math.round(value);\r\n }\r\n\r\n return value;\r\n }\r\n\r\n function styleDiv(element) {\r\n element.style.position = 'absolute';\r\n element.style.top = 0;\r\n element.style.left = 0;\r\n element.style.display = 'block';\r\n element.style.transformOrigin = '0 0';\r\n element.style.webkitTransformOrigin = '0 0';\r\n element.style.backfaceVisibility = 'visible';\r\n element.style.webkitBackfaceVisibility = 'visible';\r\n element.style.transformStyle = 'preserve-3d';\r\n element.style.webkitTransformStyle = 'preserve-3d';\r\n element.style.mozTransformStyle = 'preserve-3d';\r\n }\r\n\r\n function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\r\n this.type = type;\r\n this.currentTime = currentTime;\r\n this.totalTime = totalTime;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n }\r\n\r\n function BMCompleteEvent(type, frameMultiplier) {\r\n this.type = type;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n }\r\n\r\n function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\r\n this.type = type;\r\n this.currentLoop = currentLoop;\r\n this.totalLoops = totalLoops;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n }\r\n\r\n function BMSegmentStartEvent(type, firstFrame, totalFrames) {\r\n this.type = type;\r\n this.firstFrame = firstFrame;\r\n this.totalFrames = totalFrames;\r\n }\r\n\r\n function BMDestroyEvent(type, target) {\r\n this.type = type;\r\n this.target = target;\r\n }\r\n\r\n function BMRenderFrameErrorEvent(nativeError, currentTime) {\r\n this.type = 'renderFrameError';\r\n this.nativeError = nativeError;\r\n this.currentTime = currentTime;\r\n }\r\n\r\n function BMConfigErrorEvent(nativeError) {\r\n this.type = 'configError';\r\n this.nativeError = nativeError;\r\n }\r\n\r\n function BMAnimationConfigErrorEvent(type, nativeError) {\r\n this.type = type;\r\n this.nativeError = nativeError;\r\n }\r\n\r\n var createElementID = function () {\r\n var _count = 0;\r\n return function createID() {\r\n _count += 1;\r\n return idPrefix$1 + '__lottie_element_' + _count;\r\n };\r\n }();\r\n\r\n function HSVtoRGB(h, s, v) {\r\n var r;\r\n var g;\r\n var b;\r\n var i;\r\n var f;\r\n var p;\r\n var q;\r\n var t;\r\n i = Math.floor(h * 6);\r\n f = h * 6 - i;\r\n p = v * (1 - s);\r\n q = v * (1 - f * s);\r\n t = v * (1 - (1 - f) * s);\r\n\r\n switch (i % 6) {\r\n case 0:\r\n r = v;\r\n g = t;\r\n b = p;\r\n break;\r\n\r\n case 1:\r\n r = q;\r\n g = v;\r\n b = p;\r\n break;\r\n\r\n case 2:\r\n r = p;\r\n g = v;\r\n b = t;\r\n break;\r\n\r\n case 3:\r\n r = p;\r\n g = q;\r\n b = v;\r\n break;\r\n\r\n case 4:\r\n r = t;\r\n g = p;\r\n b = v;\r\n break;\r\n\r\n case 5:\r\n r = v;\r\n g = p;\r\n b = q;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return [r, g, b];\r\n }\r\n\r\n function RGBtoHSV(r, g, b) {\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var d = max - min;\r\n var h;\r\n var s = max === 0 ? 0 : d / max;\r\n var v = max / 255;\r\n\r\n switch (max) {\r\n case min:\r\n h = 0;\r\n break;\r\n\r\n case r:\r\n h = g - b + d * (g < b ? 6 : 0);\r\n h /= 6 * d;\r\n break;\r\n\r\n case g:\r\n h = b - r + d * 2;\r\n h /= 6 * d;\r\n break;\r\n\r\n case b:\r\n h = r - g + d * 4;\r\n h /= 6 * d;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return [h, s, v];\r\n }\r\n\r\n function addSaturationToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[1] += offset;\r\n\r\n if (hsv[1] > 1) {\r\n hsv[1] = 1;\r\n } else if (hsv[1] <= 0) {\r\n hsv[1] = 0;\r\n }\r\n\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n }\r\n\r\n function addBrightnessToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[2] += offset;\r\n\r\n if (hsv[2] > 1) {\r\n hsv[2] = 1;\r\n } else if (hsv[2] < 0) {\r\n hsv[2] = 0;\r\n }\r\n\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n }\r\n\r\n function addHueToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[0] += offset / 360;\r\n\r\n if (hsv[0] > 1) {\r\n hsv[0] -= 1;\r\n } else if (hsv[0] < 0) {\r\n hsv[0] += 1;\r\n }\r\n\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n }\r\n\r\n var rgbToHex = function () {\r\n var colorMap = [];\r\n var i;\r\n var hex;\r\n\r\n for (i = 0; i < 256; i += 1) {\r\n hex = i.toString(16);\r\n colorMap[i] = hex.length === 1 ? '0' + hex : hex;\r\n }\r\n\r\n return function (r, g, b) {\r\n if (r < 0) {\r\n r = 0;\r\n }\r\n\r\n if (g < 0) {\r\n g = 0;\r\n }\r\n\r\n if (b < 0) {\r\n b = 0;\r\n }\r\n\r\n return '#' + colorMap[r] + colorMap[g] + colorMap[b];\r\n };\r\n }();\r\n\r\n var setSubframeEnabled = function setSubframeEnabled(flag) {\r\n subframeEnabled = !!flag;\r\n };\r\n\r\n var getSubframeEnabled = function getSubframeEnabled() {\r\n return subframeEnabled;\r\n };\r\n\r\n var setExpressionsPlugin = function setExpressionsPlugin(value) {\r\n expressionsPlugin = value;\r\n };\r\n\r\n var getExpressionsPlugin = function getExpressionsPlugin() {\r\n return expressionsPlugin;\r\n };\r\n\r\n var setExpressionInterfaces = function setExpressionInterfaces(value) {\r\n expressionsInterfaces = value;\r\n };\r\n\r\n var getExpressionInterfaces = function getExpressionInterfaces() {\r\n return expressionsInterfaces;\r\n };\r\n\r\n var setDefaultCurveSegments = function setDefaultCurveSegments(value) {\r\n defaultCurveSegments = value;\r\n };\r\n\r\n var getDefaultCurveSegments = function getDefaultCurveSegments() {\r\n return defaultCurveSegments;\r\n };\r\n\r\n var setIdPrefix = function setIdPrefix(value) {\r\n idPrefix$1 = value;\r\n };\r\n\r\n var getIdPrefix = function getIdPrefix() {\r\n return idPrefix$1;\r\n };\r\n\r\n function createNS(type) {\r\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n return document.createElementNS(svgNS, type);\r\n }\r\n\r\n function _typeof$5(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\r\n\r\n var dataManager = function () {\r\n var _counterId = 1;\r\n var processes = [];\r\n var workerFn;\r\n var workerInstance;\r\n var workerProxy = {\r\n onmessage: function onmessage() {},\r\n postMessage: function postMessage(path) {\r\n workerFn({\r\n data: path\r\n });\r\n }\r\n };\r\n var _workerSelf = {\r\n postMessage: function postMessage(data) {\r\n workerProxy.onmessage({\r\n data: data\r\n });\r\n }\r\n };\r\n\r\n function createWorker(fn) {\r\n if (window.Worker && window.Blob && getWebWorker()) {\r\n var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {\r\n type: 'text/javascript'\r\n }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\r\n\r\n var url = URL.createObjectURL(blob);\r\n return new Worker(url);\r\n }\r\n\r\n workerFn = fn;\r\n return workerProxy;\r\n }\r\n\r\n function setupWorker() {\r\n if (!workerInstance) {\r\n workerInstance = createWorker(function workerStart(e) {\r\n function dataFunctionManager() {\r\n function completeLayers(layers, comps) {\r\n var layerData;\r\n var i;\r\n var len = layers.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n layerData = layers[i];\r\n\r\n if ('ks' in layerData && !layerData.completed) {\r\n layerData.completed = true;\r\n\r\n if (layerData.hasMask) {\r\n var maskProps = layerData.masksProperties;\r\n jLen = maskProps.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (maskProps[j].pt.k.i) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k);\r\n } else {\r\n kLen = maskProps[j].pt.k.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (maskProps[j].pt.k[k].s) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\r\n }\r\n\r\n if (maskProps[j].pt.k[k].e) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (layerData.ty === 0) {\r\n layerData.layers = findCompLayers(layerData.refId, comps);\r\n completeLayers(layerData.layers, comps);\r\n } else if (layerData.ty === 4) {\r\n completeShapes(layerData.shapes);\r\n } else if (layerData.ty === 5) {\r\n completeText(layerData);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function completeChars(chars, assets) {\r\n if (chars) {\r\n var i = 0;\r\n var len = chars.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (chars[i].t === 1) {\r\n // var compData = findComp(chars[i].data.refId, assets);\r\n chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;\r\n // chars[i].data.op = 99999;\r\n // chars[i].data.st = 0;\r\n // chars[i].data.sr = 1;\r\n // chars[i].w = compData.w;\r\n // chars[i].data.ks = {\r\n // a: { k: [0, 0, 0], a: 0 },\r\n // p: { k: [0, -compData.h, 0], a: 0 },\r\n // r: { k: 0, a: 0 },\r\n // s: { k: [100, 100], a: 0 },\r\n // o: { k: 100, a: 0 },\r\n // };\r\n\r\n completeLayers(chars[i].data.layers, assets);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function findComp(id, comps) {\r\n var i = 0;\r\n var len = comps.length;\r\n\r\n while (i < len) {\r\n if (comps[i].id === id) {\r\n return comps[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function findCompLayers(id, comps) {\r\n var comp = findComp(id, comps);\r\n\r\n if (comp) {\r\n if (!comp.layers.__used) {\r\n comp.layers.__used = true;\r\n return comp.layers;\r\n }\r\n\r\n return JSON.parse(JSON.stringify(comp.layers));\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function completeShapes(arr) {\r\n var i;\r\n var len = arr.length;\r\n var j;\r\n var jLen;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (arr[i].ty === 'sh') {\r\n if (arr[i].ks.k.i) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k);\r\n } else {\r\n jLen = arr[i].ks.k.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (arr[i].ks.k[j].s) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\r\n }\r\n\r\n if (arr[i].ks.k[j].e) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\r\n }\r\n }\r\n }\r\n } else if (arr[i].ty === 'gr') {\r\n completeShapes(arr[i].it);\r\n }\r\n }\r\n }\r\n\r\n function convertPathsToAbsoluteValues(path) {\r\n var i;\r\n var len = path.i.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n path.i[i][0] += path.v[i][0];\r\n path.i[i][1] += path.v[i][1];\r\n path.o[i][0] += path.v[i][0];\r\n path.o[i][1] += path.v[i][1];\r\n }\r\n }\r\n\r\n function checkVersion(minimum, animVersionString) {\r\n var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\r\n\r\n if (minimum[0] > animVersion[0]) {\r\n return true;\r\n }\r\n\r\n if (animVersion[0] > minimum[0]) {\r\n return false;\r\n }\r\n\r\n if (minimum[1] > animVersion[1]) {\r\n return true;\r\n }\r\n\r\n if (animVersion[1] > minimum[1]) {\r\n return false;\r\n }\r\n\r\n if (minimum[2] > animVersion[2]) {\r\n return true;\r\n }\r\n\r\n if (animVersion[2] > minimum[2]) {\r\n return false;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var checkText = function () {\r\n var minimumVersion = [4, 4, 14];\r\n\r\n function updateTextLayer(textLayer) {\r\n var documentData = textLayer.t.d;\r\n textLayer.t.d = {\r\n k: [{\r\n s: documentData,\r\n t: 0\r\n }]\r\n };\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 5) {\r\n updateTextLayer(layers[i]);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkChars = function () {\r\n var minimumVersion = [4, 7, 99];\r\n return function (animationData) {\r\n if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\r\n var i;\r\n var len = animationData.chars.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n var charData = animationData.chars[i];\r\n\r\n if (charData.data && charData.data.shapes) {\r\n completeShapes(charData.data.shapes);\r\n charData.data.ip = 0;\r\n charData.data.op = 99999;\r\n charData.data.st = 0;\r\n charData.data.sr = 1;\r\n charData.data.ks = {\r\n p: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n s: {\r\n k: [100, 100],\r\n a: 0\r\n },\r\n a: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n r: {\r\n k: 0,\r\n a: 0\r\n },\r\n o: {\r\n k: 100,\r\n a: 0\r\n }\r\n };\r\n\r\n if (!animationData.chars[i].t) {\r\n charData.data.shapes.push({\r\n ty: 'no'\r\n });\r\n charData.data.shapes[0].it.push({\r\n p: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n s: {\r\n k: [100, 100],\r\n a: 0\r\n },\r\n a: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n r: {\r\n k: 0,\r\n a: 0\r\n },\r\n o: {\r\n k: 100,\r\n a: 0\r\n },\r\n sk: {\r\n k: 0,\r\n a: 0\r\n },\r\n sa: {\r\n k: 0,\r\n a: 0\r\n },\r\n ty: 'tr'\r\n });\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkPathProperties = function () {\r\n var minimumVersion = [5, 7, 15];\r\n\r\n function updateTextLayer(textLayer) {\r\n var pathData = textLayer.t.p;\r\n\r\n if (typeof pathData.a === 'number') {\r\n pathData.a = {\r\n a: 0,\r\n k: pathData.a\r\n };\r\n }\r\n\r\n if (typeof pathData.p === 'number') {\r\n pathData.p = {\r\n a: 0,\r\n k: pathData.p\r\n };\r\n }\r\n\r\n if (typeof pathData.r === 'number') {\r\n pathData.r = {\r\n a: 0,\r\n k: pathData.r\r\n };\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 5) {\r\n updateTextLayer(layers[i]);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkColors = function () {\r\n var minimumVersion = [4, 1, 9];\r\n\r\n function iterateShapes(shapes) {\r\n var i;\r\n var len = shapes.length;\r\n var j;\r\n var jLen;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (shapes[i].ty === 'gr') {\r\n iterateShapes(shapes[i].it);\r\n } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\r\n if (shapes[i].c.k && shapes[i].c.k[0].i) {\r\n jLen = shapes[i].c.k.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[i].c.k[j].s) {\r\n shapes[i].c.k[j].s[0] /= 255;\r\n shapes[i].c.k[j].s[1] /= 255;\r\n shapes[i].c.k[j].s[2] /= 255;\r\n shapes[i].c.k[j].s[3] /= 255;\r\n }\r\n\r\n if (shapes[i].c.k[j].e) {\r\n shapes[i].c.k[j].e[0] /= 255;\r\n shapes[i].c.k[j].e[1] /= 255;\r\n shapes[i].c.k[j].e[2] /= 255;\r\n shapes[i].c.k[j].e[3] /= 255;\r\n }\r\n }\r\n } else {\r\n shapes[i].c.k[0] /= 255;\r\n shapes[i].c.k[1] /= 255;\r\n shapes[i].c.k[2] /= 255;\r\n shapes[i].c.k[3] /= 255;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 4) {\r\n iterateShapes(layers[i].shapes);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkShapes = function () {\r\n var minimumVersion = [4, 4, 18];\r\n\r\n function completeClosingShapes(arr) {\r\n var i;\r\n var len = arr.length;\r\n var j;\r\n var jLen;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (arr[i].ty === 'sh') {\r\n if (arr[i].ks.k.i) {\r\n arr[i].ks.k.c = arr[i].closed;\r\n } else {\r\n jLen = arr[i].ks.k.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (arr[i].ks.k[j].s) {\r\n arr[i].ks.k[j].s[0].c = arr[i].closed;\r\n }\r\n\r\n if (arr[i].ks.k[j].e) {\r\n arr[i].ks.k[j].e[0].c = arr[i].closed;\r\n }\r\n }\r\n }\r\n } else if (arr[i].ty === 'gr') {\r\n completeClosingShapes(arr[i].it);\r\n }\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var layerData;\r\n var i;\r\n var len = layers.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n layerData = layers[i];\r\n\r\n if (layerData.hasMask) {\r\n var maskProps = layerData.masksProperties;\r\n jLen = maskProps.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (maskProps[j].pt.k.i) {\r\n maskProps[j].pt.k.c = maskProps[j].cl;\r\n } else {\r\n kLen = maskProps[j].pt.k.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (maskProps[j].pt.k[k].s) {\r\n maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\r\n }\r\n\r\n if (maskProps[j].pt.k[k].e) {\r\n maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (layerData.ty === 4) {\r\n completeClosingShapes(layerData.shapes);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n function completeData(animationData) {\r\n if (animationData.__complete) {\r\n return;\r\n }\r\n\r\n checkColors(animationData);\r\n checkText(animationData);\r\n checkChars(animationData);\r\n checkPathProperties(animationData);\r\n checkShapes(animationData);\r\n completeLayers(animationData.layers, animationData.assets);\r\n completeChars(animationData.chars, animationData.assets);\r\n animationData.__complete = true;\r\n }\r\n\r\n function completeText(data) {\r\n if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;\r\n }\r\n }\r\n\r\n var moduleOb = {};\r\n moduleOb.completeData = completeData;\r\n moduleOb.checkColors = checkColors;\r\n moduleOb.checkChars = checkChars;\r\n moduleOb.checkPathProperties = checkPathProperties;\r\n moduleOb.checkShapes = checkShapes;\r\n moduleOb.completeLayers = completeLayers;\r\n return moduleOb;\r\n }\r\n\r\n if (!_workerSelf.dataManager) {\r\n _workerSelf.dataManager = dataFunctionManager();\r\n }\r\n\r\n if (!_workerSelf.assetLoader) {\r\n _workerSelf.assetLoader = function () {\r\n function formatResponse(xhr) {\r\n // using typeof doubles the time of execution of this method,\r\n // so if available, it's better to use the header to validate the type\r\n var contentTypeHeader = xhr.getResponseHeader('content-type');\r\n\r\n if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\r\n return xhr.response;\r\n }\r\n\r\n if (xhr.response && _typeof$5(xhr.response) === 'object') {\r\n return xhr.response;\r\n }\r\n\r\n if (xhr.response && typeof xhr.response === 'string') {\r\n return JSON.parse(xhr.response);\r\n }\r\n\r\n if (xhr.responseText) {\r\n return JSON.parse(xhr.responseText);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function loadAsset(path, fullPath, callback, errorCallback) {\r\n var response;\r\n var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.\r\n\r\n try {\r\n // This crashes on Android WebView prior to KitKat\r\n xhr.responseType = 'json';\r\n } catch (err) {} // eslint-disable-line no-empty\r\n\r\n\r\n xhr.onreadystatechange = function () {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 200) {\r\n response = formatResponse(xhr);\r\n callback(response);\r\n } else {\r\n try {\r\n response = formatResponse(xhr);\r\n callback(response);\r\n } catch (err) {\r\n if (errorCallback) {\r\n errorCallback(err);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n try {\r\n // Hack to workaround banner validation\r\n xhr.open(['G', 'E', 'T'].join(''), path, true);\r\n } catch (error) {\r\n // Hack to workaround banner validation\r\n xhr.open(['G', 'E', 'T'].join(''), fullPath + '/' + path, true);\r\n }\r\n\r\n xhr.send();\r\n }\r\n\r\n return {\r\n load: loadAsset\r\n };\r\n }();\r\n }\r\n\r\n if (e.data.type === 'loadAnimation') {\r\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\r\n _workerSelf.dataManager.completeData(data);\r\n\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: data,\r\n status: 'success'\r\n });\r\n }, function () {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n status: 'error'\r\n });\r\n });\r\n } else if (e.data.type === 'complete') {\r\n var animation = e.data.animation;\r\n\r\n _workerSelf.dataManager.completeData(animation);\r\n\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: animation,\r\n status: 'success'\r\n });\r\n } else if (e.data.type === 'loadData') {\r\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: data,\r\n status: 'success'\r\n });\r\n }, function () {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n status: 'error'\r\n });\r\n });\r\n }\r\n });\r\n\r\n workerInstance.onmessage = function (event) {\r\n var data = event.data;\r\n var id = data.id;\r\n var process = processes[id];\r\n processes[id] = null;\r\n\r\n if (data.status === 'success') {\r\n process.onComplete(data.payload);\r\n } else if (process.onError) {\r\n process.onError();\r\n }\r\n };\r\n }\r\n }\r\n\r\n function createProcess(onComplete, onError) {\r\n _counterId += 1;\r\n var id = 'processId_' + _counterId;\r\n processes[id] = {\r\n onComplete: onComplete,\r\n onError: onError\r\n };\r\n return id;\r\n }\r\n\r\n function loadAnimation(path, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'loadAnimation',\r\n path: path,\r\n fullPath: window.location.origin + window.location.pathname,\r\n id: processId\r\n });\r\n }\r\n\r\n function loadData(path, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'loadData',\r\n path: path,\r\n fullPath: window.location.origin + window.location.pathname,\r\n id: processId\r\n });\r\n }\r\n\r\n function completeAnimation(anim, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'complete',\r\n animation: anim,\r\n id: processId\r\n });\r\n }\r\n\r\n return {\r\n loadAnimation: loadAnimation,\r\n loadData: loadData,\r\n completeAnimation: completeAnimation\r\n };\r\n }();\r\n\r\n var ImagePreloader = function () {\r\n var proxyImage = function () {\r\n var canvas = createTag('canvas');\r\n canvas.width = 1;\r\n canvas.height = 1;\r\n var ctx = canvas.getContext('2d');\r\n ctx.fillStyle = 'rgba(0,0,0,0)';\r\n ctx.fillRect(0, 0, 1, 1);\r\n return canvas;\r\n }();\r\n\r\n function imageLoaded() {\r\n this.loadedAssets += 1;\r\n\r\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n if (this.imagesLoadedCb) {\r\n this.imagesLoadedCb(null);\r\n }\r\n }\r\n }\r\n\r\n function footageLoaded() {\r\n this.loadedFootagesCount += 1;\r\n\r\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n if (this.imagesLoadedCb) {\r\n this.imagesLoadedCb(null);\r\n }\r\n }\r\n }\r\n\r\n function getAssetsPath(assetData, assetsPath, originalPath) {\r\n var path = '';\r\n\r\n if (assetData.e) {\r\n path = assetData.p;\r\n } else if (assetsPath) {\r\n var imagePath = assetData.p;\r\n\r\n if (imagePath.indexOf('images/') !== -1) {\r\n imagePath = imagePath.split('/')[1];\r\n }\r\n\r\n path = assetsPath + imagePath;\r\n } else {\r\n path = originalPath;\r\n path += assetData.u ? assetData.u : '';\r\n path += assetData.p;\r\n }\r\n\r\n return path;\r\n }\r\n\r\n function testImageLoaded(img) {\r\n var _count = 0;\r\n var intervalId = setInterval(function () {\r\n var box = img.getBBox();\r\n\r\n if (box.width || _count > 500) {\r\n this._imageLoaded();\r\n\r\n clearInterval(intervalId);\r\n }\r\n\r\n _count += 1;\r\n }.bind(this), 50);\r\n }\r\n\r\n function createImageData(assetData) {\r\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n var img = createNS('image');\r\n\r\n if (isSafari) {\r\n this.testImageLoaded(img);\r\n } else {\r\n img.addEventListener('load', this._imageLoaded, false);\r\n }\r\n\r\n img.addEventListener('error', function () {\r\n ob.img = proxyImage;\r\n\r\n this._imageLoaded();\r\n }.bind(this), false);\r\n img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\r\n\r\n if (this._elementHelper.append) {\r\n this._elementHelper.append(img);\r\n } else {\r\n this._elementHelper.appendChild(img);\r\n }\r\n\r\n var ob = {\r\n img: img,\r\n assetData: assetData\r\n };\r\n return ob;\r\n }\r\n\r\n function createImgData(assetData) {\r\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n var img = createTag('img');\r\n img.crossOrigin = 'anonymous';\r\n img.addEventListener('load', this._imageLoaded, false);\r\n img.addEventListener('error', function () {\r\n ob.img = proxyImage;\r\n\r\n this._imageLoaded();\r\n }.bind(this), false);\r\n img.src = path;\r\n var ob = {\r\n img: img,\r\n assetData: assetData\r\n };\r\n return ob;\r\n }\r\n\r\n function createFootageData(data) {\r\n var ob = {\r\n assetData: data\r\n };\r\n var path = getAssetsPath(data, this.assetsPath, this.path);\r\n dataManager.loadData(path, function (footageData) {\r\n ob.img = footageData;\r\n\r\n this._footageLoaded();\r\n }.bind(this), function () {\r\n ob.img = {};\r\n\r\n this._footageLoaded();\r\n }.bind(this));\r\n return ob;\r\n }\r\n\r\n function loadAssets(assets, cb) {\r\n this.imagesLoadedCb = cb;\r\n var i;\r\n var len = assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!assets[i].layers) {\r\n if (!assets[i].t || assets[i].t === 'seq') {\r\n this.totalImages += 1;\r\n this.images.push(this._createImageData(assets[i]));\r\n } else if (assets[i].t === 3) {\r\n this.totalFootages += 1;\r\n this.images.push(this.createFootageData(assets[i]));\r\n }\r\n }\r\n }\r\n }\r\n\r\n function setPath(path) {\r\n this.path = path || '';\r\n }\r\n\r\n function setAssetsPath(path) {\r\n this.assetsPath = path || '';\r\n }\r\n\r\n function getAsset(assetData) {\r\n var i = 0;\r\n var len = this.images.length;\r\n\r\n while (i < len) {\r\n if (this.images[i].assetData === assetData) {\r\n return this.images[i].img;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function destroy() {\r\n this.imagesLoadedCb = null;\r\n this.images.length = 0;\r\n }\r\n\r\n function loadedImages() {\r\n return this.totalImages === this.loadedAssets;\r\n }\r\n\r\n function loadedFootages() {\r\n return this.totalFootages === this.loadedFootagesCount;\r\n }\r\n\r\n function setCacheType(type, elementHelper) {\r\n if (type === 'svg') {\r\n this._elementHelper = elementHelper;\r\n this._createImageData = this.createImageData.bind(this);\r\n } else {\r\n this._createImageData = this.createImgData.bind(this);\r\n }\r\n }\r\n\r\n function ImagePreloaderFactory() {\r\n this._imageLoaded = imageLoaded.bind(this);\r\n this._footageLoaded = footageLoaded.bind(this);\r\n this.testImageLoaded = testImageLoaded.bind(this);\r\n this.createFootageData = createFootageData.bind(this);\r\n this.assetsPath = '';\r\n this.path = '';\r\n this.totalImages = 0;\r\n this.totalFootages = 0;\r\n this.loadedAssets = 0;\r\n this.loadedFootagesCount = 0;\r\n this.imagesLoadedCb = null;\r\n this.images = [];\r\n }\r\n\r\n ImagePreloaderFactory.prototype = {\r\n loadAssets: loadAssets,\r\n setAssetsPath: setAssetsPath,\r\n setPath: setPath,\r\n loadedImages: loadedImages,\r\n loadedFootages: loadedFootages,\r\n destroy: destroy,\r\n getAsset: getAsset,\r\n createImgData: createImgData,\r\n createImageData: createImageData,\r\n imageLoaded: imageLoaded,\r\n footageLoaded: footageLoaded,\r\n setCacheType: setCacheType\r\n };\r\n return ImagePreloaderFactory;\r\n }();\r\n\r\n function BaseEvent() {}\r\n\r\n BaseEvent.prototype = {\r\n triggerEvent: function triggerEvent(eventName, args) {\r\n if (this._cbs[eventName]) {\r\n var callbacks = this._cbs[eventName];\r\n\r\n for (var i = 0; i < callbacks.length; i += 1) {\r\n callbacks[i](args);\r\n }\r\n }\r\n },\r\n addEventListener: function addEventListener(eventName, callback) {\r\n if (!this._cbs[eventName]) {\r\n this._cbs[eventName] = [];\r\n }\r\n\r\n this._cbs[eventName].push(callback);\r\n\r\n return function () {\r\n this.removeEventListener(eventName, callback);\r\n }.bind(this);\r\n },\r\n removeEventListener: function removeEventListener(eventName, callback) {\r\n if (!callback) {\r\n this._cbs[eventName] = null;\r\n } else if (this._cbs[eventName]) {\r\n var i = 0;\r\n var len = this._cbs[eventName].length;\r\n\r\n while (i < len) {\r\n if (this._cbs[eventName][i] === callback) {\r\n this._cbs[eventName].splice(i, 1);\r\n\r\n i -= 1;\r\n len -= 1;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (!this._cbs[eventName].length) {\r\n this._cbs[eventName] = null;\r\n }\r\n }\r\n }\r\n };\r\n\r\n var markerParser = function () {\r\n function parsePayloadLines(payload) {\r\n var lines = payload.split('\\r\\n');\r\n var keys = {};\r\n var line;\r\n var keysCount = 0;\r\n\r\n for (var i = 0; i < lines.length; i += 1) {\r\n line = lines[i].split(':');\r\n\r\n if (line.length === 2) {\r\n keys[line[0]] = line[1].trim();\r\n keysCount += 1;\r\n }\r\n }\r\n\r\n if (keysCount === 0) {\r\n throw new Error();\r\n }\r\n\r\n return keys;\r\n }\r\n\r\n return function (_markers) {\r\n var markers = [];\r\n\r\n for (var i = 0; i < _markers.length; i += 1) {\r\n var _marker = _markers[i];\r\n var markerData = {\r\n time: _marker.tm,\r\n duration: _marker.dr\r\n };\r\n\r\n try {\r\n markerData.payload = JSON.parse(_markers[i].cm);\r\n } catch (_) {\r\n try {\r\n markerData.payload = parsePayloadLines(_markers[i].cm);\r\n } catch (__) {\r\n markerData.payload = {\r\n name: _markers[i].cm\r\n };\r\n }\r\n }\r\n\r\n markers.push(markerData);\r\n }\r\n\r\n return markers;\r\n };\r\n }();\r\n\r\n var ProjectInterface = function () {\r\n function registerComposition(comp) {\r\n this.compositions.push(comp);\r\n }\r\n\r\n return function () {\r\n function _thisProjectFunction(name) {\r\n var i = 0;\r\n var len = this.compositions.length;\r\n\r\n while (i < len) {\r\n if (this.compositions[i].data && this.compositions[i].data.nm === name) {\r\n if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\r\n this.compositions[i].prepareFrame(this.currentFrame);\r\n }\r\n\r\n return this.compositions[i].compInterface;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _thisProjectFunction.compositions = [];\r\n _thisProjectFunction.currentFrame = 0;\r\n _thisProjectFunction.registerComposition = registerComposition;\r\n return _thisProjectFunction;\r\n };\r\n }();\r\n\r\n var renderers = {};\r\n\r\n var registerRenderer = function registerRenderer(key, value) {\r\n renderers[key] = value;\r\n };\r\n\r\n function getRenderer(key) {\r\n return renderers[key];\r\n }\r\n\r\n function _typeof$4(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\r\n\r\n var AnimationItem = function AnimationItem() {\r\n this._cbs = [];\r\n this.name = '';\r\n this.path = '';\r\n this.isLoaded = false;\r\n this.currentFrame = 0;\r\n this.currentRawFrame = 0;\r\n this.firstFrame = 0;\r\n this.totalFrames = 0;\r\n this.frameRate = 0;\r\n this.frameMult = 0;\r\n this.playSpeed = 1;\r\n this.playDirection = 1;\r\n this.playCount = 0;\r\n this.animationData = {};\r\n this.assets = [];\r\n this.isPaused = true;\r\n this.autoplay = false;\r\n this.loop = true;\r\n this.renderer = null;\r\n this.animationID = createElementID();\r\n this.assetsPath = '';\r\n this.timeCompleted = 0;\r\n this.segmentPos = 0;\r\n this.isSubframeEnabled = getSubframeEnabled();\r\n this.segments = [];\r\n this._idle = true;\r\n this._completedLoop = false;\r\n this.projectInterface = ProjectInterface();\r\n this.imagePreloader = new ImagePreloader();\r\n this.audioController = audioControllerFactory();\r\n this.markers = [];\r\n this.configAnimation = this.configAnimation.bind(this);\r\n this.onSetupError = this.onSetupError.bind(this);\r\n this.onSegmentComplete = this.onSegmentComplete.bind(this);\r\n this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0);\r\n };\r\n\r\n extendPrototype([BaseEvent], AnimationItem);\r\n\r\n AnimationItem.prototype.setParams = function (params) {\r\n if (params.wrapper || params.container) {\r\n this.wrapper = params.wrapper || params.container;\r\n }\r\n\r\n var animType = 'svg';\r\n\r\n if (params.animType) {\r\n animType = params.animType;\r\n } else if (params.renderer) {\r\n animType = params.renderer;\r\n }\r\n\r\n var RendererClass = getRenderer(animType);\r\n this.renderer = new RendererClass(this, params.rendererSettings);\r\n this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\r\n this.renderer.setProjectInterface(this.projectInterface);\r\n this.animType = animType;\r\n\r\n if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {\r\n this.loop = true;\r\n } else if (params.loop === false) {\r\n this.loop = false;\r\n } else {\r\n this.loop = parseInt(params.loop, 10);\r\n }\r\n\r\n this.autoplay = 'autoplay' in params ? params.autoplay : true;\r\n this.name = params.name ? params.name : '';\r\n this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\r\n this.assetsPath = params.assetsPath;\r\n this.initialSegment = params.initialSegment;\r\n\r\n if (params.audioFactory) {\r\n this.audioController.setAudioFactory(params.audioFactory);\r\n }\r\n\r\n if (params.animationData) {\r\n this.setupAnimation(params.animationData);\r\n } else if (params.path) {\r\n if (params.path.lastIndexOf('\\\\') !== -1) {\r\n this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\r\n } else {\r\n this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\r\n }\r\n\r\n this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\r\n this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\r\n dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.onSetupError = function () {\r\n this.trigger('data_failed');\r\n };\r\n\r\n AnimationItem.prototype.setupAnimation = function (data) {\r\n dataManager.completeAnimation(data, this.configAnimation);\r\n };\r\n\r\n AnimationItem.prototype.setData = function (wrapper, animationData) {\r\n if (animationData) {\r\n if (_typeof$4(animationData) !== 'object') {\r\n animationData = JSON.parse(animationData);\r\n }\r\n }\r\n\r\n var params = {\r\n wrapper: wrapper,\r\n animationData: animationData\r\n };\r\n var wrapperAttributes = wrapper.attributes;\r\n params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';\r\n params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';\r\n var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';\r\n\r\n if (loop === 'false') {\r\n params.loop = false;\r\n } else if (loop === 'true') {\r\n params.loop = true;\r\n } else if (loop !== '') {\r\n params.loop = parseInt(loop, 10);\r\n }\r\n\r\n var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;\r\n params.autoplay = autoplay !== 'false';\r\n params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';\r\n var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';\r\n\r\n if (prerender === 'false') {\r\n params.prerender = false;\r\n }\r\n\r\n this.setParams(params);\r\n };\r\n\r\n AnimationItem.prototype.includeLayers = function (data) {\r\n if (data.op > this.animationData.op) {\r\n this.animationData.op = data.op;\r\n this.totalFrames = Math.floor(data.op - this.animationData.ip);\r\n }\r\n\r\n var layers = this.animationData.layers;\r\n var i;\r\n var len = layers.length;\r\n var newLayers = data.layers;\r\n var j;\r\n var jLen = newLayers.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n i = 0;\r\n\r\n while (i < len) {\r\n if (layers[i].id === newLayers[j].id) {\r\n layers[i] = newLayers[j];\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n if (data.chars || data.fonts) {\r\n this.renderer.globalData.fontManager.addChars(data.chars);\r\n this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\r\n }\r\n\r\n if (data.assets) {\r\n len = data.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.animationData.assets.push(data.assets[i]);\r\n }\r\n }\r\n\r\n this.animationData.__complete = false;\r\n dataManager.completeAnimation(this.animationData, this.onSegmentComplete);\r\n };\r\n\r\n AnimationItem.prototype.onSegmentComplete = function (data) {\r\n this.animationData = data;\r\n var expressionsPlugin = getExpressionsPlugin();\r\n\r\n if (expressionsPlugin) {\r\n expressionsPlugin.initExpressions(this);\r\n }\r\n\r\n this.loadNextSegment();\r\n };\r\n\r\n AnimationItem.prototype.loadNextSegment = function () {\r\n var segments = this.animationData.segments;\r\n\r\n if (!segments || segments.length === 0 || !this.autoloadSegments) {\r\n this.trigger('data_ready');\r\n this.timeCompleted = this.totalFrames;\r\n return;\r\n }\r\n\r\n var segment = segments.shift();\r\n this.timeCompleted = segment.time * this.frameRate;\r\n var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\r\n this.segmentPos += 1;\r\n dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\r\n this.trigger('data_failed');\r\n }.bind(this));\r\n };\r\n\r\n AnimationItem.prototype.loadSegments = function () {\r\n var segments = this.animationData.segments;\r\n\r\n if (!segments) {\r\n this.timeCompleted = this.totalFrames;\r\n }\r\n\r\n this.loadNextSegment();\r\n };\r\n\r\n AnimationItem.prototype.imagesLoaded = function () {\r\n this.trigger('loaded_images');\r\n this.checkLoaded();\r\n };\r\n\r\n AnimationItem.prototype.preloadImages = function () {\r\n this.imagePreloader.setAssetsPath(this.assetsPath);\r\n this.imagePreloader.setPath(this.path);\r\n this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\r\n };\r\n\r\n AnimationItem.prototype.configAnimation = function (animData) {\r\n if (!this.renderer) {\r\n return;\r\n }\r\n\r\n try {\r\n this.animationData = animData;\r\n\r\n if (this.initialSegment) {\r\n this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\r\n this.firstFrame = Math.round(this.initialSegment[0]);\r\n } else {\r\n this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\r\n this.firstFrame = Math.round(this.animationData.ip);\r\n }\r\n\r\n this.renderer.configAnimation(animData);\r\n\r\n if (!animData.assets) {\r\n animData.assets = [];\r\n }\r\n\r\n this.assets = this.animationData.assets;\r\n this.frameRate = this.animationData.fr;\r\n this.frameMult = this.animationData.fr / 1000;\r\n this.renderer.searchExtraCompositions(animData.assets);\r\n this.markers = markerParser(animData.markers || []);\r\n this.trigger('config_ready');\r\n this.preloadImages();\r\n this.loadSegments();\r\n this.updaFrameModifier();\r\n this.waitForFontsLoaded();\r\n\r\n if (this.isPaused) {\r\n this.audioController.pause();\r\n }\r\n } catch (error) {\r\n this.triggerConfigError(error);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.waitForFontsLoaded = function () {\r\n if (!this.renderer) {\r\n return;\r\n }\r\n\r\n if (this.renderer.globalData.fontManager.isLoaded) {\r\n this.checkLoaded();\r\n } else {\r\n setTimeout(this.waitForFontsLoaded.bind(this), 20);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.checkLoaded = function () {\r\n if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {\r\n this.isLoaded = true;\r\n var expressionsPlugin = getExpressionsPlugin();\r\n\r\n if (expressionsPlugin) {\r\n expressionsPlugin.initExpressions(this);\r\n }\r\n\r\n this.renderer.initItems();\r\n setTimeout(function () {\r\n this.trigger('DOMLoaded');\r\n }.bind(this), 0);\r\n this.gotoFrame();\r\n\r\n if (this.autoplay) {\r\n this.play();\r\n }\r\n }\r\n };\r\n\r\n AnimationItem.prototype.resize = function (width, height) {\r\n // Adding this validation for backwards compatibility in case an event object was being passed down\r\n var _width = typeof width === 'number' ? width : undefined;\r\n\r\n var _height = typeof height === 'number' ? height : undefined;\r\n\r\n this.renderer.updateContainerSize(_width, _height);\r\n };\r\n\r\n AnimationItem.prototype.setSubframe = function (flag) {\r\n this.isSubframeEnabled = !!flag;\r\n };\r\n\r\n AnimationItem.prototype.gotoFrame = function () {\r\n this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\r\n\r\n if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\r\n this.currentFrame = this.timeCompleted;\r\n }\r\n\r\n this.trigger('enterFrame');\r\n this.renderFrame();\r\n this.trigger('drawnFrame');\r\n };\r\n\r\n AnimationItem.prototype.renderFrame = function () {\r\n if (this.isLoaded === false || !this.renderer) {\r\n return;\r\n }\r\n\r\n try {\r\n this.renderer.renderFrame(this.currentFrame + this.firstFrame);\r\n } catch (error) {\r\n this.triggerRenderFrameError(error);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.play = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n if (this.isPaused === true) {\r\n this.isPaused = false;\r\n this.trigger('_pause');\r\n this.audioController.resume();\r\n\r\n if (this._idle) {\r\n this._idle = false;\r\n this.trigger('_active');\r\n }\r\n }\r\n };\r\n\r\n AnimationItem.prototype.pause = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n if (this.isPaused === false) {\r\n this.isPaused = true;\r\n this.trigger('_play');\r\n this._idle = true;\r\n this.trigger('_idle');\r\n this.audioController.pause();\r\n }\r\n };\r\n\r\n AnimationItem.prototype.togglePause = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n if (this.isPaused === true) {\r\n this.play();\r\n } else {\r\n this.pause();\r\n }\r\n };\r\n\r\n AnimationItem.prototype.stop = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.pause();\r\n this.playCount = 0;\r\n this._completedLoop = false;\r\n this.setCurrentRawFrameValue(0);\r\n };\r\n\r\n AnimationItem.prototype.getMarkerData = function (markerName) {\r\n var marker;\r\n\r\n for (var i = 0; i < this.markers.length; i += 1) {\r\n marker = this.markers[i];\r\n\r\n if (marker.payload && marker.payload.name === markerName) {\r\n return marker;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n var numValue = Number(value);\r\n\r\n if (isNaN(numValue)) {\r\n var marker = this.getMarkerData(value);\r\n\r\n if (marker) {\r\n this.goToAndStop(marker.time, true);\r\n }\r\n } else if (isFrame) {\r\n this.setCurrentRawFrameValue(value);\r\n } else {\r\n this.setCurrentRawFrameValue(value * this.frameModifier);\r\n }\r\n\r\n this.pause();\r\n };\r\n\r\n AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n var numValue = Number(value);\r\n\r\n if (isNaN(numValue)) {\r\n var marker = this.getMarkerData(value);\r\n\r\n if (marker) {\r\n if (!marker.duration) {\r\n this.goToAndStop(marker.time, true);\r\n } else {\r\n this.playSegments([marker.time, marker.time + marker.duration], true);\r\n }\r\n }\r\n } else {\r\n this.goToAndStop(numValue, isFrame, name);\r\n }\r\n\r\n this.play();\r\n };\r\n\r\n AnimationItem.prototype.advanceTime = function (value) {\r\n if (this.isPaused === true || this.isLoaded === false) {\r\n return;\r\n }\r\n\r\n var nextValue = this.currentRawFrame + value * this.frameModifier;\r\n var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\r\n // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\r\n\r\n if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\r\n if (!this.loop || this.playCount === this.loop) {\r\n if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\r\n _isComplete = true;\r\n nextValue = this.totalFrames - 1;\r\n }\r\n } else if (nextValue >= this.totalFrames) {\r\n this.playCount += 1;\r\n\r\n if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n this.setCurrentRawFrameValue(nextValue % this.totalFrames);\r\n this._completedLoop = true;\r\n this.trigger('loopComplete');\r\n }\r\n } else {\r\n this.setCurrentRawFrameValue(nextValue);\r\n }\r\n } else if (nextValue < 0) {\r\n if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {\r\n // eslint-disable-line no-plusplus\r\n this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);\r\n\r\n if (!this._completedLoop) {\r\n this._completedLoop = true;\r\n } else {\r\n this.trigger('loopComplete');\r\n }\r\n } else {\r\n _isComplete = true;\r\n nextValue = 0;\r\n }\r\n }\r\n } else {\r\n this.setCurrentRawFrameValue(nextValue);\r\n }\r\n\r\n if (_isComplete) {\r\n this.setCurrentRawFrameValue(nextValue);\r\n this.pause();\r\n this.trigger('complete');\r\n }\r\n };\r\n\r\n AnimationItem.prototype.adjustSegment = function (arr, offset) {\r\n this.playCount = 0;\r\n\r\n if (arr[1] < arr[0]) {\r\n if (this.frameModifier > 0) {\r\n if (this.playSpeed < 0) {\r\n this.setSpeed(-this.playSpeed);\r\n } else {\r\n this.setDirection(-1);\r\n }\r\n }\r\n\r\n this.totalFrames = arr[0] - arr[1];\r\n this.timeCompleted = this.totalFrames;\r\n this.firstFrame = arr[1];\r\n this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\r\n } else if (arr[1] > arr[0]) {\r\n if (this.frameModifier < 0) {\r\n if (this.playSpeed < 0) {\r\n this.setSpeed(-this.playSpeed);\r\n } else {\r\n this.setDirection(1);\r\n }\r\n }\r\n\r\n this.totalFrames = arr[1] - arr[0];\r\n this.timeCompleted = this.totalFrames;\r\n this.firstFrame = arr[0];\r\n this.setCurrentRawFrameValue(0.001 + offset);\r\n }\r\n\r\n this.trigger('segmentStart');\r\n };\r\n\r\n AnimationItem.prototype.setSegment = function (init, end) {\r\n var pendingFrame = -1;\r\n\r\n if (this.isPaused) {\r\n if (this.currentRawFrame + this.firstFrame < init) {\r\n pendingFrame = init;\r\n } else if (this.currentRawFrame + this.firstFrame > end) {\r\n pendingFrame = end - init;\r\n }\r\n }\r\n\r\n this.firstFrame = init;\r\n this.totalFrames = end - init;\r\n this.timeCompleted = this.totalFrames;\r\n\r\n if (pendingFrame !== -1) {\r\n this.goToAndStop(pendingFrame, true);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.playSegments = function (arr, forceFlag) {\r\n if (forceFlag) {\r\n this.segments.length = 0;\r\n }\r\n\r\n if (_typeof$4(arr[0]) === 'object') {\r\n var i;\r\n var len = arr.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.segments.push(arr[i]);\r\n }\r\n } else {\r\n this.segments.push(arr);\r\n }\r\n\r\n if (this.segments.length && forceFlag) {\r\n this.adjustSegment(this.segments.shift(), 0);\r\n }\r\n\r\n if (this.isPaused) {\r\n this.play();\r\n }\r\n };\r\n\r\n AnimationItem.prototype.resetSegments = function (forceFlag) {\r\n this.segments.length = 0;\r\n this.segments.push([this.animationData.ip, this.animationData.op]);\r\n\r\n if (forceFlag) {\r\n this.checkSegments(0);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.checkSegments = function (offset) {\r\n if (this.segments.length) {\r\n this.adjustSegment(this.segments.shift(), offset);\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n AnimationItem.prototype.destroy = function (name) {\r\n if (name && this.name !== name || !this.renderer) {\r\n return;\r\n }\r\n\r\n this.renderer.destroy();\r\n this.imagePreloader.destroy();\r\n this.trigger('destroy');\r\n this._cbs = null;\r\n this.onEnterFrame = null;\r\n this.onLoopComplete = null;\r\n this.onComplete = null;\r\n this.onSegmentStart = null;\r\n this.onDestroy = null;\r\n this.renderer = null;\r\n this.renderer = null;\r\n this.imagePreloader = null;\r\n this.projectInterface = null;\r\n };\r\n\r\n AnimationItem.prototype.setCurrentRawFrameValue = function (value) {\r\n this.currentRawFrame = value;\r\n this.gotoFrame();\r\n };\r\n\r\n AnimationItem.prototype.setSpeed = function (val) {\r\n this.playSpeed = val;\r\n this.updaFrameModifier();\r\n };\r\n\r\n AnimationItem.prototype.setDirection = function (val) {\r\n this.playDirection = val < 0 ? -1 : 1;\r\n this.updaFrameModifier();\r\n };\r\n\r\n AnimationItem.prototype.setVolume = function (val, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.audioController.setVolume(val);\r\n };\r\n\r\n AnimationItem.prototype.getVolume = function () {\r\n return this.audioController.getVolume();\r\n };\r\n\r\n AnimationItem.prototype.mute = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.audioController.mute();\r\n };\r\n\r\n AnimationItem.prototype.unmute = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.audioController.unmute();\r\n };\r\n\r\n AnimationItem.prototype.updaFrameModifier = function () {\r\n this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\r\n this.audioController.setRate(this.playSpeed * this.playDirection);\r\n };\r\n\r\n AnimationItem.prototype.getPath = function () {\r\n return this.path;\r\n };\r\n\r\n AnimationItem.prototype.getAssetsPath = function (assetData) {\r\n var path = '';\r\n\r\n if (assetData.e) {\r\n path = assetData.p;\r\n } else if (this.assetsPath) {\r\n var imagePath = assetData.p;\r\n\r\n if (imagePath.indexOf('images/') !== -1) {\r\n imagePath = imagePath.split('/')[1];\r\n }\r\n\r\n path = this.assetsPath + imagePath;\r\n } else {\r\n path = this.path;\r\n path += assetData.u ? assetData.u : '';\r\n path += assetData.p;\r\n }\r\n\r\n return path;\r\n };\r\n\r\n AnimationItem.prototype.getAssetData = function (id) {\r\n var i = 0;\r\n var len = this.assets.length;\r\n\r\n while (i < len) {\r\n if (id === this.assets[i].id) {\r\n return this.assets[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n AnimationItem.prototype.hide = function () {\r\n this.renderer.hide();\r\n };\r\n\r\n AnimationItem.prototype.show = function () {\r\n this.renderer.show();\r\n };\r\n\r\n AnimationItem.prototype.getDuration = function (isFrame) {\r\n return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\r\n };\r\n\r\n AnimationItem.prototype.updateDocumentData = function (path, documentData, index) {\r\n try {\r\n var element = this.renderer.getElementByPath(path);\r\n element.updateDocumentData(documentData, index);\r\n } catch (error) {// TODO: decide how to handle catch case\r\n }\r\n };\r\n\r\n AnimationItem.prototype.trigger = function (name) {\r\n if (this._cbs && this._cbs[name]) {\r\n switch (name) {\r\n case 'enterFrame':\r\n this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\r\n break;\r\n\r\n case 'drawnFrame':\r\n this.drawnFrameEvent.currentTime = this.currentFrame;\r\n this.drawnFrameEvent.totalTime = this.totalFrames;\r\n this.drawnFrameEvent.direction = this.frameModifier;\r\n this.triggerEvent(name, this.drawnFrameEvent);\r\n break;\r\n\r\n case 'loopComplete':\r\n this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n break;\r\n\r\n case 'complete':\r\n this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\r\n break;\r\n\r\n case 'segmentStart':\r\n this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n break;\r\n\r\n case 'destroy':\r\n this.triggerEvent(name, new BMDestroyEvent(name, this));\r\n break;\r\n\r\n default:\r\n this.triggerEvent(name);\r\n }\r\n }\r\n\r\n if (name === 'enterFrame' && this.onEnterFrame) {\r\n this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\r\n }\r\n\r\n if (name === 'loopComplete' && this.onLoopComplete) {\r\n this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n }\r\n\r\n if (name === 'complete' && this.onComplete) {\r\n this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\r\n }\r\n\r\n if (name === 'segmentStart' && this.onSegmentStart) {\r\n this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n }\r\n\r\n if (name === 'destroy' && this.onDestroy) {\r\n this.onDestroy.call(this, new BMDestroyEvent(name, this));\r\n }\r\n };\r\n\r\n AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\r\n var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\r\n this.triggerEvent('error', error);\r\n\r\n if (this.onError) {\r\n this.onError.call(this, error);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.triggerConfigError = function (nativeError) {\r\n var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\r\n this.triggerEvent('error', error);\r\n\r\n if (this.onError) {\r\n this.onError.call(this, error);\r\n }\r\n };\r\n\r\n var animationManager = function () {\r\n var moduleOb = {};\r\n var registeredAnimations = [];\r\n var initTime = 0;\r\n var len = 0;\r\n var playingAnimationsNum = 0;\r\n var _stopped = true;\r\n var _isFrozen = false;\r\n\r\n function removeElement(ev) {\r\n var i = 0;\r\n var animItem = ev.target;\r\n\r\n while (i < len) {\r\n if (registeredAnimations[i].animation === animItem) {\r\n registeredAnimations.splice(i, 1);\r\n i -= 1;\r\n len -= 1;\r\n\r\n if (!animItem.isPaused) {\r\n subtractPlayingCount();\r\n }\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n function registerAnimation(element, animationData) {\r\n if (!element) {\r\n return null;\r\n }\r\n\r\n var i = 0;\r\n\r\n while (i < len) {\r\n if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\r\n return registeredAnimations[i].animation;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n var animItem = new AnimationItem();\r\n setupAnimation(animItem, element);\r\n animItem.setData(element, animationData);\r\n return animItem;\r\n }\r\n\r\n function getRegisteredAnimations() {\r\n var i;\r\n var lenAnims = registeredAnimations.length;\r\n var animations = [];\r\n\r\n for (i = 0; i < lenAnims; i += 1) {\r\n animations.push(registeredAnimations[i].animation);\r\n }\r\n\r\n return animations;\r\n }\r\n\r\n function addPlayingCount() {\r\n playingAnimationsNum += 1;\r\n activate();\r\n }\r\n\r\n function subtractPlayingCount() {\r\n playingAnimationsNum -= 1;\r\n }\r\n\r\n function setupAnimation(animItem, element) {\r\n animItem.addEventListener('destroy', removeElement);\r\n animItem.addEventListener('_active', addPlayingCount);\r\n animItem.addEventListener('_idle', subtractPlayingCount);\r\n registeredAnimations.push({\r\n elem: element,\r\n animation: animItem\r\n });\r\n len += 1;\r\n }\r\n\r\n function loadAnimation(params) {\r\n var animItem = new AnimationItem();\r\n setupAnimation(animItem, null);\r\n animItem.setParams(params);\r\n return animItem;\r\n }\r\n\r\n function setSpeed(val, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setSpeed(val, animation);\r\n }\r\n }\r\n\r\n function setDirection(val, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setDirection(val, animation);\r\n }\r\n }\r\n\r\n function play(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.play(animation);\r\n }\r\n }\r\n\r\n function resume(nowTime) {\r\n var elapsedTime = nowTime - initTime;\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.advanceTime(elapsedTime);\r\n }\r\n\r\n initTime = nowTime;\r\n\r\n if (playingAnimationsNum && !_isFrozen) {\r\n window.requestAnimationFrame(resume);\r\n } else {\r\n _stopped = true;\r\n }\r\n }\r\n\r\n function first(nowTime) {\r\n initTime = nowTime;\r\n window.requestAnimationFrame(resume);\r\n }\r\n\r\n function pause(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.pause(animation);\r\n }\r\n }\r\n\r\n function goToAndStop(value, isFrame, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\r\n }\r\n }\r\n\r\n function stop(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.stop(animation);\r\n }\r\n }\r\n\r\n function togglePause(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.togglePause(animation);\r\n }\r\n }\r\n\r\n function destroy(animation) {\r\n var i;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n registeredAnimations[i].animation.destroy(animation);\r\n }\r\n }\r\n\r\n function searchAnimations(animationData, standalone, renderer) {\r\n var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));\r\n var i;\r\n var lenAnims = animElements.length;\r\n\r\n for (i = 0; i < lenAnims; i += 1) {\r\n if (renderer) {\r\n animElements[i].setAttribute('data-bm-type', renderer);\r\n }\r\n\r\n registerAnimation(animElements[i], animationData);\r\n }\r\n\r\n if (standalone && lenAnims === 0) {\r\n if (!renderer) {\r\n renderer = 'svg';\r\n }\r\n\r\n var body = document.getElementsByTagName('body')[0];\r\n body.innerText = '';\r\n var div = createTag('div');\r\n div.style.width = '100%';\r\n div.style.height = '100%';\r\n div.setAttribute('data-bm-type', renderer);\r\n body.appendChild(div);\r\n registerAnimation(div, animationData);\r\n }\r\n }\r\n\r\n function resize() {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.resize();\r\n }\r\n }\r\n\r\n function activate() {\r\n if (!_isFrozen && playingAnimationsNum) {\r\n if (_stopped) {\r\n window.requestAnimationFrame(first);\r\n _stopped = false;\r\n }\r\n }\r\n }\r\n\r\n function freeze() {\r\n _isFrozen = true;\r\n }\r\n\r\n function unfreeze() {\r\n _isFrozen = false;\r\n activate();\r\n }\r\n\r\n function setVolume(val, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setVolume(val, animation);\r\n }\r\n }\r\n\r\n function mute(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.mute(animation);\r\n }\r\n }\r\n\r\n function unmute(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.unmute(animation);\r\n }\r\n }\r\n\r\n moduleOb.registerAnimation = registerAnimation;\r\n moduleOb.loadAnimation = loadAnimation;\r\n moduleOb.setSpeed = setSpeed;\r\n moduleOb.setDirection = setDirection;\r\n moduleOb.play = play;\r\n moduleOb.pause = pause;\r\n moduleOb.stop = stop;\r\n moduleOb.togglePause = togglePause;\r\n moduleOb.searchAnimations = searchAnimations;\r\n moduleOb.resize = resize; // moduleOb.start = start;\r\n\r\n moduleOb.goToAndStop = goToAndStop;\r\n moduleOb.destroy = destroy;\r\n moduleOb.freeze = freeze;\r\n moduleOb.unfreeze = unfreeze;\r\n moduleOb.setVolume = setVolume;\r\n moduleOb.mute = mute;\r\n moduleOb.unmute = unmute;\r\n moduleOb.getRegisteredAnimations = getRegisteredAnimations;\r\n return moduleOb;\r\n }();\r\n\r\n /* eslint-disable */\r\n var BezierFactory = function () {\r\n /**\r\n * BezierEasing - use bezier curve for transition easing function\r\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n *\r\n * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n * Usage:\r\n * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n *\r\n */\r\n var ob = {};\r\n ob.getBezierEasing = getBezierEasing;\r\n var beziers = {};\r\n\r\n function getBezierEasing(a, b, c, d, nm) {\r\n var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\r\n\r\n if (beziers[str]) {\r\n return beziers[str];\r\n }\r\n\r\n var bezEasing = new BezierEasing([a, b, c, d]);\r\n beziers[str] = bezEasing;\r\n return bezEasing;\r\n } // These values are established by empiricism with tests (tradeoff: performance VS precision)\r\n\r\n\r\n var NEWTON_ITERATIONS = 4;\r\n var NEWTON_MIN_SLOPE = 0.001;\r\n var SUBDIVISION_PRECISION = 0.0000001;\r\n var SUBDIVISION_MAX_ITERATIONS = 10;\r\n var kSplineTableSize = 11;\r\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\r\n var float32ArraySupported = typeof Float32Array === 'function';\r\n\r\n function A(aA1, aA2) {\r\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n }\r\n\r\n function B(aA1, aA2) {\r\n return 3.0 * aA2 - 6.0 * aA1;\r\n }\r\n\r\n function C(aA1) {\r\n return 3.0 * aA1;\r\n } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\r\n\r\n\r\n function calcBezier(aT, aA1, aA2) {\r\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\r\n\r\n\r\n function getSlope(aT, aA1, aA2) {\r\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n }\r\n\r\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\r\n var currentX,\r\n currentT,\r\n i = 0;\r\n\r\n do {\r\n currentT = aA + (aB - aA) / 2.0;\r\n currentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\r\n if (currentX > 0.0) {\r\n aB = currentT;\r\n } else {\r\n aA = currentT;\r\n }\r\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n return currentT;\r\n }\r\n\r\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\r\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n var currentSlope = getSlope(aGuessT, mX1, mX2);\r\n if (currentSlope === 0.0) return aGuessT;\r\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n aGuessT -= currentX / currentSlope;\r\n }\r\n\r\n return aGuessT;\r\n }\r\n /**\r\n * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n */\r\n\r\n\r\n function BezierEasing(points) {\r\n this._p = points;\r\n this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n this._precomputed = false;\r\n this.get = this.get.bind(this);\r\n }\r\n\r\n BezierEasing.prototype = {\r\n get: function get(x) {\r\n var mX1 = this._p[0],\r\n mY1 = this._p[1],\r\n mX2 = this._p[2],\r\n mY2 = this._p[3];\r\n if (!this._precomputed) this._precompute();\r\n if (mX1 === mY1 && mX2 === mY2) return x; // linear\r\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\r\n\r\n if (x === 0) return 0;\r\n if (x === 1) return 1;\r\n return calcBezier(this._getTForX(x), mY1, mY2);\r\n },\r\n // Private part\r\n _precompute: function _precompute() {\r\n var mX1 = this._p[0],\r\n mY1 = this._p[1],\r\n mX2 = this._p[2],\r\n mY2 = this._p[3];\r\n this._precomputed = true;\r\n\r\n if (mX1 !== mY1 || mX2 !== mY2) {\r\n this._calcSampleValues();\r\n }\r\n },\r\n _calcSampleValues: function _calcSampleValues() {\r\n var mX1 = this._p[0],\r\n mX2 = this._p[2];\r\n\r\n for (var i = 0; i < kSplineTableSize; ++i) {\r\n this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n }\r\n },\r\n\r\n /**\r\n * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n */\r\n _getTForX: function _getTForX(aX) {\r\n var mX1 = this._p[0],\r\n mX2 = this._p[2],\r\n mSampleValues = this._mSampleValues;\r\n var intervalStart = 0.0;\r\n var currentSample = 1;\r\n var lastSample = kSplineTableSize - 1;\r\n\r\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n intervalStart += kSampleStepSize;\r\n }\r\n\r\n --currentSample; // Interpolate to provide an initial guess for t\r\n\r\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\r\n var guessForT = intervalStart + dist * kSampleStepSize;\r\n var initialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n if (initialSlope >= NEWTON_MIN_SLOPE) {\r\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\r\n }\r\n\r\n if (initialSlope === 0.0) {\r\n return guessForT;\r\n }\r\n\r\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\r\n }\r\n };\r\n return ob;\r\n }();\r\n\r\n var pooling = function () {\r\n function _double(arr) {\r\n return arr.concat(createSizedArray(arr.length));\r\n }\r\n\r\n return {\r\n \"double\": _double\r\n };\r\n }();\r\n\r\n var poolFactory = function () {\r\n return function (initialLength, _create, _release) {\r\n var _length = 0;\r\n var _maxLength = initialLength;\r\n var pool = createSizedArray(_maxLength);\r\n var ob = {\r\n newElement: newElement,\r\n release: release\r\n };\r\n\r\n function newElement() {\r\n var element;\r\n\r\n if (_length) {\r\n _length -= 1;\r\n element = pool[_length];\r\n } else {\r\n element = _create();\r\n }\r\n\r\n return element;\r\n }\r\n\r\n function release(element) {\r\n if (_length === _maxLength) {\r\n pool = pooling[\"double\"](pool);\r\n _maxLength *= 2;\r\n }\r\n\r\n if (_release) {\r\n _release(element);\r\n }\r\n\r\n pool[_length] = element;\r\n _length += 1;\r\n }\r\n\r\n return ob;\r\n };\r\n }();\r\n\r\n var bezierLengthPool = function () {\r\n function create() {\r\n return {\r\n addedLength: 0,\r\n percents: createTypedArray('float32', getDefaultCurveSegments()),\r\n lengths: createTypedArray('float32', getDefaultCurveSegments())\r\n };\r\n }\r\n\r\n return poolFactory(8, create);\r\n }();\r\n\r\n var segmentsLengthPool = function () {\r\n function create() {\r\n return {\r\n lengths: [],\r\n totalLength: 0\r\n };\r\n }\r\n\r\n function release(element) {\r\n var i;\r\n var len = element.lengths.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n bezierLengthPool.release(element.lengths[i]);\r\n }\r\n\r\n element.lengths.length = 0;\r\n }\r\n\r\n return poolFactory(8, create, release);\r\n }();\r\n\r\n function bezFunction() {\r\n var math = Math;\r\n\r\n function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\r\n var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;\r\n return det1 > -0.001 && det1 < 0.001;\r\n }\r\n\r\n function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\r\n if (z1 === 0 && z2 === 0 && z3 === 0) {\r\n return pointOnLine2D(x1, y1, x2, y2, x3, y3);\r\n }\r\n\r\n var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\r\n var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\r\n var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\r\n var diffDist;\r\n\r\n if (dist1 > dist2) {\r\n if (dist1 > dist3) {\r\n diffDist = dist1 - dist2 - dist3;\r\n } else {\r\n diffDist = dist3 - dist2 - dist1;\r\n }\r\n } else if (dist3 > dist2) {\r\n diffDist = dist3 - dist2 - dist1;\r\n } else {\r\n diffDist = dist2 - dist1 - dist3;\r\n }\r\n\r\n return diffDist > -0.0001 && diffDist < 0.0001;\r\n }\r\n\r\n var getBezierLength = function () {\r\n return function (pt1, pt2, pt3, pt4) {\r\n var curveSegments = getDefaultCurveSegments();\r\n var k;\r\n var i;\r\n var len;\r\n var ptCoord;\r\n var perc;\r\n var addedLength = 0;\r\n var ptDistance;\r\n var point = [];\r\n var lastPoint = [];\r\n var lengthData = bezierLengthPool.newElement();\r\n len = pt3.length;\r\n\r\n for (k = 0; k < curveSegments; k += 1) {\r\n perc = k / (curveSegments - 1);\r\n ptDistance = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\r\n point[i] = ptCoord;\r\n\r\n if (lastPoint[i] !== null) {\r\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n }\r\n\r\n lastPoint[i] = point[i];\r\n }\r\n\r\n if (ptDistance) {\r\n ptDistance = bmSqrt(ptDistance);\r\n addedLength += ptDistance;\r\n }\r\n\r\n lengthData.percents[k] = perc;\r\n lengthData.lengths[k] = addedLength;\r\n }\r\n\r\n lengthData.addedLength = addedLength;\r\n return lengthData;\r\n };\r\n }();\r\n\r\n function getSegmentsLength(shapeData) {\r\n var segmentsLength = segmentsLengthPool.newElement();\r\n var closed = shapeData.c;\r\n var pathV = shapeData.v;\r\n var pathO = shapeData.o;\r\n var pathI = shapeData.i;\r\n var i;\r\n var len = shapeData._length;\r\n var lengths = segmentsLength.lengths;\r\n var totalLength = 0;\r\n\r\n for (i = 0; i < len - 1; i += 1) {\r\n lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\r\n totalLength += lengths[i].addedLength;\r\n }\r\n\r\n if (closed && len) {\r\n lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\r\n totalLength += lengths[i].addedLength;\r\n }\r\n\r\n segmentsLength.totalLength = totalLength;\r\n return segmentsLength;\r\n }\r\n\r\n function BezierData(length) {\r\n this.segmentLength = 0;\r\n this.points = new Array(length);\r\n }\r\n\r\n function PointData(partial, point) {\r\n this.partialLength = partial;\r\n this.point = point;\r\n }\r\n\r\n var buildBezierData = function () {\r\n var storedData = {};\r\n return function (pt1, pt2, pt3, pt4) {\r\n var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\r\n\r\n if (!storedData[bezierName]) {\r\n var curveSegments = getDefaultCurveSegments();\r\n var k;\r\n var i;\r\n var len;\r\n var ptCoord;\r\n var perc;\r\n var addedLength = 0;\r\n var ptDistance;\r\n var point;\r\n var lastPoint = null;\r\n\r\n if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\r\n curveSegments = 2;\r\n }\r\n\r\n var bezierData = new BezierData(curveSegments);\r\n len = pt3.length;\r\n\r\n for (k = 0; k < curveSegments; k += 1) {\r\n point = createSizedArray(len);\r\n perc = k / (curveSegments - 1);\r\n ptDistance = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\r\n point[i] = ptCoord;\r\n\r\n if (lastPoint !== null) {\r\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n }\r\n }\r\n\r\n ptDistance = bmSqrt(ptDistance);\r\n addedLength += ptDistance;\r\n bezierData.points[k] = new PointData(ptDistance, point);\r\n lastPoint = point;\r\n }\r\n\r\n bezierData.segmentLength = addedLength;\r\n storedData[bezierName] = bezierData;\r\n }\r\n\r\n return storedData[bezierName];\r\n };\r\n }();\r\n\r\n function getDistancePerc(perc, bezierData) {\r\n var percents = bezierData.percents;\r\n var lengths = bezierData.lengths;\r\n var len = percents.length;\r\n var initPos = bmFloor((len - 1) * perc);\r\n var lengthPos = perc * bezierData.addedLength;\r\n var lPerc = 0;\r\n\r\n if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\r\n return percents[initPos];\r\n }\r\n\r\n var dir = lengths[initPos] > lengthPos ? -1 : 1;\r\n var flag = true;\r\n\r\n while (flag) {\r\n if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\r\n lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\r\n flag = false;\r\n } else {\r\n initPos += dir;\r\n }\r\n\r\n if (initPos < 0 || initPos >= len - 1) {\r\n // FIX for TypedArrays that don't store floating point values with enough accuracy\r\n if (initPos === len - 1) {\r\n return percents[initPos];\r\n }\r\n\r\n flag = false;\r\n }\r\n }\r\n\r\n return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\r\n }\r\n\r\n function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\r\n var t1 = getDistancePerc(percent, bezierData);\r\n var u1 = 1 - t1;\r\n var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\r\n var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\r\n return [ptX, ptY];\r\n }\r\n\r\n var bezierSegmentPoints = createTypedArray('float32', 8);\r\n\r\n function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\r\n if (startPerc < 0) {\r\n startPerc = 0;\r\n } else if (startPerc > 1) {\r\n startPerc = 1;\r\n }\r\n\r\n var t0 = getDistancePerc(startPerc, bezierData);\r\n endPerc = endPerc > 1 ? 1 : endPerc;\r\n var t1 = getDistancePerc(endPerc, bezierData);\r\n var i;\r\n var len = pt1.length;\r\n var u0 = 1 - t0;\r\n var u1 = 1 - t1;\r\n var u0u0u0 = u0 * u0 * u0;\r\n var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\r\n\r\n var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\r\n\r\n var t0t0t0 = t0 * t0 * t0; //\r\n\r\n var u0u0u1 = u0 * u0 * u1;\r\n var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t0t1 = t0 * t0 * t1; //\r\n\r\n var u0u1u1 = u0 * u1 * u1;\r\n var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t1t1 = t0 * t1 * t1; //\r\n\r\n var u1u1u1 = u1 * u1 * u1;\r\n var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t1t1t1 = t1 * t1 * t1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n }\r\n\r\n return bezierSegmentPoints;\r\n }\r\n\r\n return {\r\n getSegmentsLength: getSegmentsLength,\r\n getNewSegment: getNewSegment,\r\n getPointInSegment: getPointInSegment,\r\n buildBezierData: buildBezierData,\r\n pointOnLine2D: pointOnLine2D,\r\n pointOnLine3D: pointOnLine3D\r\n };\r\n }\r\n\r\n var bez = bezFunction();\r\n\r\n var PropertyFactory = function () {\r\n var initFrame = initialDefaultFrame;\r\n var mathAbs = Math.abs;\r\n\r\n function interpolateValue(frameNum, caching) {\r\n var offsetTime = this.offsetTime;\r\n var newValue;\r\n\r\n if (this.propType === 'multidimensional') {\r\n newValue = createTypedArray('float32', this.pv.length);\r\n }\r\n\r\n var iterationIndex = caching.lastIndex;\r\n var i = iterationIndex;\r\n var len = this.keyframes.length - 1;\r\n var flag = true;\r\n var keyData;\r\n var nextKeyData;\r\n var keyframeMetadata;\r\n\r\n while (flag) {\r\n keyData = this.keyframes[i];\r\n nextKeyData = this.keyframes[i + 1];\r\n\r\n if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\r\n if (keyData.h) {\r\n keyData = nextKeyData;\r\n }\r\n\r\n iterationIndex = 0;\r\n break;\r\n }\r\n\r\n if (nextKeyData.t - offsetTime > frameNum) {\r\n iterationIndex = i;\r\n break;\r\n }\r\n\r\n if (i < len - 1) {\r\n i += 1;\r\n } else {\r\n iterationIndex = 0;\r\n flag = false;\r\n }\r\n }\r\n\r\n keyframeMetadata = this.keyframesMetadata[i] || {};\r\n var k;\r\n var kLen;\r\n var perc;\r\n var jLen;\r\n var j;\r\n var fnc;\r\n var nextKeyTime = nextKeyData.t - offsetTime;\r\n var keyTime = keyData.t - offsetTime;\r\n var endValue;\r\n\r\n if (keyData.to) {\r\n if (!keyframeMetadata.bezierData) {\r\n keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\r\n }\r\n\r\n var bezierData = keyframeMetadata.bezierData;\r\n\r\n if (frameNum >= nextKeyTime || frameNum < keyTime) {\r\n var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\r\n kLen = bezierData.points[ind].point.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[ind].point[k];\r\n } // caching._lastKeyframeIndex = -1;\r\n\r\n } else {\r\n if (keyframeMetadata.__fnct) {\r\n fnc = keyframeMetadata.__fnct;\r\n } else {\r\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\r\n keyframeMetadata.__fnct = fnc;\r\n }\r\n\r\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n var distanceInLine = bezierData.segmentLength * perc;\r\n var segmentPerc;\r\n var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;\r\n j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;\r\n flag = true;\r\n jLen = bezierData.points.length;\r\n\r\n while (flag) {\r\n addedLength += bezierData.points[j].partialLength;\r\n\r\n if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\r\n kLen = bezierData.points[j].point.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[j].point[k];\r\n }\r\n\r\n break;\r\n } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\r\n segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\r\n kLen = bezierData.points[j].point.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\r\n }\r\n\r\n break;\r\n }\r\n\r\n if (j < jLen - 1) {\r\n j += 1;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n\r\n caching._lastPoint = j;\r\n caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\r\n caching._lastKeyframeIndex = i;\r\n }\r\n } else {\r\n var outX;\r\n var outY;\r\n var inX;\r\n var inY;\r\n var keyValue;\r\n len = keyData.s.length;\r\n endValue = nextKeyData.s || keyData.e;\r\n\r\n if (this.sh && keyData.h !== 1) {\r\n if (frameNum >= nextKeyTime) {\r\n newValue[0] = endValue[0];\r\n newValue[1] = endValue[1];\r\n newValue[2] = endValue[2];\r\n } else if (frameNum <= keyTime) {\r\n newValue[0] = keyData.s[0];\r\n newValue[1] = keyData.s[1];\r\n newValue[2] = keyData.s[2];\r\n } else {\r\n var quatStart = createQuaternion(keyData.s);\r\n var quatEnd = createQuaternion(endValue);\r\n var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\r\n quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\r\n }\r\n } else {\r\n for (i = 0; i < len; i += 1) {\r\n if (keyData.h !== 1) {\r\n if (frameNum >= nextKeyTime) {\r\n perc = 1;\r\n } else if (frameNum < keyTime) {\r\n perc = 0;\r\n } else {\r\n if (keyData.o.x.constructor === Array) {\r\n if (!keyframeMetadata.__fnct) {\r\n keyframeMetadata.__fnct = [];\r\n }\r\n\r\n if (!keyframeMetadata.__fnct[i]) {\r\n outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\r\n outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\r\n inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\r\n inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\r\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n keyframeMetadata.__fnct[i] = fnc;\r\n } else {\r\n fnc = keyframeMetadata.__fnct[i];\r\n }\r\n } else if (!keyframeMetadata.__fnct) {\r\n outX = keyData.o.x;\r\n outY = keyData.o.y;\r\n inX = keyData.i.x;\r\n inY = keyData.i.y;\r\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n keyData.keyframeMetadata = fnc;\r\n } else {\r\n fnc = keyframeMetadata.__fnct;\r\n }\r\n\r\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n }\r\n }\r\n\r\n endValue = nextKeyData.s || keyData.e;\r\n keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\r\n\r\n if (this.propType === 'multidimensional') {\r\n newValue[i] = keyValue;\r\n } else {\r\n newValue = keyValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n caching.lastIndex = iterationIndex;\r\n return newValue;\r\n } // based on @Toji's https://github.com/toji/gl-matrix/\r\n\r\n\r\n function slerp(a, b, t) {\r\n var out = [];\r\n var ax = a[0];\r\n var ay = a[1];\r\n var az = a[2];\r\n var aw = a[3];\r\n var bx = b[0];\r\n var by = b[1];\r\n var bz = b[2];\r\n var bw = b[3];\r\n var omega;\r\n var cosom;\r\n var sinom;\r\n var scale0;\r\n var scale1;\r\n cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n if (cosom < 0.0) {\r\n cosom = -cosom;\r\n bx = -bx;\r\n by = -by;\r\n bz = -bz;\r\n bw = -bw;\r\n }\r\n\r\n if (1.0 - cosom > 0.000001) {\r\n omega = Math.acos(cosom);\r\n sinom = Math.sin(omega);\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n } else {\r\n scale0 = 1.0 - t;\r\n scale1 = t;\r\n }\r\n\r\n out[0] = scale0 * ax + scale1 * bx;\r\n out[1] = scale0 * ay + scale1 * by;\r\n out[2] = scale0 * az + scale1 * bz;\r\n out[3] = scale0 * aw + scale1 * bw;\r\n return out;\r\n }\r\n\r\n function quaternionToEuler(out, quat) {\r\n var qx = quat[0];\r\n var qy = quat[1];\r\n var qz = quat[2];\r\n var qw = quat[3];\r\n var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\r\n var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\r\n var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\r\n out[0] = heading / degToRads;\r\n out[1] = attitude / degToRads;\r\n out[2] = bank / degToRads;\r\n }\r\n\r\n function createQuaternion(values) {\r\n var heading = values[0] * degToRads;\r\n var attitude = values[1] * degToRads;\r\n var bank = values[2] * degToRads;\r\n var c1 = Math.cos(heading / 2);\r\n var c2 = Math.cos(attitude / 2);\r\n var c3 = Math.cos(bank / 2);\r\n var s1 = Math.sin(heading / 2);\r\n var s2 = Math.sin(attitude / 2);\r\n var s3 = Math.sin(bank / 2);\r\n var w = c1 * c2 * c3 - s1 * s2 * s3;\r\n var x = s1 * s2 * c3 + c1 * c2 * s3;\r\n var y = s1 * c2 * c3 + c1 * s2 * s3;\r\n var z = c1 * s2 * c3 - s1 * c2 * s3;\r\n return [x, y, z, w];\r\n }\r\n\r\n function getValueAtCurrentTime() {\r\n var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n var initTime = this.keyframes[0].t - this.offsetTime;\r\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n\r\n if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {\r\n if (this._caching.lastFrame >= frameNum) {\r\n this._caching._lastKeyframeIndex = -1;\r\n this._caching.lastIndex = 0;\r\n }\r\n\r\n var renderResult = this.interpolateValue(frameNum, this._caching);\r\n this.pv = renderResult;\r\n }\r\n\r\n this._caching.lastFrame = frameNum;\r\n return this.pv;\r\n }\r\n\r\n function setVValue(val) {\r\n var multipliedValue;\r\n\r\n if (this.propType === 'unidimensional') {\r\n multipliedValue = val * this.mult;\r\n\r\n if (mathAbs(this.v - multipliedValue) > 0.00001) {\r\n this.v = multipliedValue;\r\n this._mdf = true;\r\n }\r\n } else {\r\n var i = 0;\r\n var len = this.v.length;\r\n\r\n while (i < len) {\r\n multipliedValue = val[i] * this.mult;\r\n\r\n if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\r\n this.v[i] = multipliedValue;\r\n this._mdf = true;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n }\r\n\r\n function processEffectsSequence() {\r\n if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\r\n return;\r\n }\r\n\r\n if (this.lock) {\r\n this.setVValue(this.pv);\r\n return;\r\n }\r\n\r\n this.lock = true;\r\n this._mdf = this._isFirstFrame;\r\n var i;\r\n var len = this.effectsSequence.length;\r\n var finalValue = this.kf ? this.pv : this.data.k;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n finalValue = this.effectsSequence[i](finalValue);\r\n }\r\n\r\n this.setVValue(finalValue);\r\n this._isFirstFrame = false;\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function addEffect(effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.container.addDynamicProperty(this);\r\n }\r\n\r\n function ValueProperty(elem, data, mult, container) {\r\n this.propType = 'unidimensional';\r\n this.mult = mult || 1;\r\n this.data = data;\r\n this.v = mult ? data.k * mult : data.k;\r\n this.pv = data.k;\r\n this._mdf = false;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.k = false;\r\n this.kf = false;\r\n this.vel = 0;\r\n this.effectsSequence = [];\r\n this._isFirstFrame = true;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function MultiDimensionalProperty(elem, data, mult, container) {\r\n this.propType = 'multidimensional';\r\n this.mult = mult || 1;\r\n this.data = data;\r\n this._mdf = false;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.k = false;\r\n this.kf = false;\r\n this.frameId = -1;\r\n var i;\r\n var len = data.k.length;\r\n this.v = createTypedArray('float32', len);\r\n this.pv = createTypedArray('float32', len);\r\n this.vel = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.v[i] = data.k[i] * this.mult;\r\n this.pv[i] = data.k[i];\r\n }\r\n\r\n this._isFirstFrame = true;\r\n this.effectsSequence = [];\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function KeyframedValueProperty(elem, data, mult, container) {\r\n this.propType = 'unidimensional';\r\n this.keyframes = data.k;\r\n this.keyframesMetadata = [];\r\n this.offsetTime = elem.data.st;\r\n this.frameId = -1;\r\n this._caching = {\r\n lastFrame: initFrame,\r\n lastIndex: 0,\r\n value: 0,\r\n _lastKeyframeIndex: -1\r\n };\r\n this.k = true;\r\n this.kf = true;\r\n this.data = data;\r\n this.mult = mult || 1;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.v = initFrame;\r\n this.pv = initFrame;\r\n this._isFirstFrame = true;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.interpolateValue = interpolateValue;\r\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function KeyframedMultidimensionalProperty(elem, data, mult, container) {\r\n this.propType = 'multidimensional';\r\n var i;\r\n var len = data.k.length;\r\n var s;\r\n var e;\r\n var to;\r\n var ti;\r\n\r\n for (i = 0; i < len - 1; i += 1) {\r\n if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\r\n s = data.k[i].s;\r\n e = data.k[i + 1].s;\r\n to = data.k[i].to;\r\n ti = data.k[i].ti;\r\n\r\n if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) {\r\n data.k[i].to = null;\r\n data.k[i].ti = null;\r\n }\r\n\r\n if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\r\n if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {\r\n data.k[i].to = null;\r\n data.k[i].ti = null;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n this.data = data;\r\n this.keyframes = data.k;\r\n this.keyframesMetadata = [];\r\n this.offsetTime = elem.data.st;\r\n this.k = true;\r\n this.kf = true;\r\n this._isFirstFrame = true;\r\n this.mult = mult || 1;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.interpolateValue = interpolateValue;\r\n this.frameId = -1;\r\n var arrLen = data.k[0].s.length;\r\n this.v = createTypedArray('float32', arrLen);\r\n this.pv = createTypedArray('float32', arrLen);\r\n\r\n for (i = 0; i < arrLen; i += 1) {\r\n this.v[i] = initFrame;\r\n this.pv[i] = initFrame;\r\n }\r\n\r\n this._caching = {\r\n lastFrame: initFrame,\r\n lastIndex: 0,\r\n value: createTypedArray('float32', arrLen)\r\n };\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function getProp(elem, data, type, mult, container) {\r\n var p;\r\n\r\n if (!data.k.length) {\r\n p = new ValueProperty(elem, data, mult, container);\r\n } else if (typeof data.k[0] === 'number') {\r\n p = new MultiDimensionalProperty(elem, data, mult, container);\r\n } else {\r\n switch (type) {\r\n case 0:\r\n p = new KeyframedValueProperty(elem, data, mult, container);\r\n break;\r\n\r\n case 1:\r\n p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (p.effectsSequence.length) {\r\n container.addDynamicProperty(p);\r\n }\r\n\r\n return p;\r\n }\r\n\r\n var ob = {\r\n getProp: getProp\r\n };\r\n return ob;\r\n }();\r\n\r\n function DynamicPropertyContainer() {}\r\n\r\n DynamicPropertyContainer.prototype = {\r\n addDynamicProperty: function addDynamicProperty(prop) {\r\n if (this.dynamicProperties.indexOf(prop) === -1) {\r\n this.dynamicProperties.push(prop);\r\n this.container.addDynamicProperty(this);\r\n this._isAnimated = true;\r\n }\r\n },\r\n iterateDynamicProperties: function iterateDynamicProperties() {\r\n this._mdf = false;\r\n var i;\r\n var len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n\r\n if (this.dynamicProperties[i]._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n },\r\n initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {\r\n this.container = container;\r\n this.dynamicProperties = [];\r\n this._mdf = false;\r\n this._isAnimated = false;\r\n }\r\n };\r\n\r\n var pointPool = function () {\r\n function create() {\r\n return createTypedArray('float32', 2);\r\n }\r\n\r\n return poolFactory(8, create);\r\n }();\r\n\r\n function ShapePath() {\r\n this.c = false;\r\n this._length = 0;\r\n this._maxLength = 8;\r\n this.v = createSizedArray(this._maxLength);\r\n this.o = createSizedArray(this._maxLength);\r\n this.i = createSizedArray(this._maxLength);\r\n }\r\n\r\n ShapePath.prototype.setPathData = function (closed, len) {\r\n this.c = closed;\r\n this.setLength(len);\r\n var i = 0;\r\n\r\n while (i < len) {\r\n this.v[i] = pointPool.newElement();\r\n this.o[i] = pointPool.newElement();\r\n this.i[i] = pointPool.newElement();\r\n i += 1;\r\n }\r\n };\r\n\r\n ShapePath.prototype.setLength = function (len) {\r\n while (this._maxLength < len) {\r\n this.doubleArrayLength();\r\n }\r\n\r\n this._length = len;\r\n };\r\n\r\n ShapePath.prototype.doubleArrayLength = function () {\r\n this.v = this.v.concat(createSizedArray(this._maxLength));\r\n this.i = this.i.concat(createSizedArray(this._maxLength));\r\n this.o = this.o.concat(createSizedArray(this._maxLength));\r\n this._maxLength *= 2;\r\n };\r\n\r\n ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\r\n var arr;\r\n this._length = Math.max(this._length, pos + 1);\r\n\r\n if (this._length >= this._maxLength) {\r\n this.doubleArrayLength();\r\n }\r\n\r\n switch (type) {\r\n case 'v':\r\n arr = this.v;\r\n break;\r\n\r\n case 'i':\r\n arr = this.i;\r\n break;\r\n\r\n case 'o':\r\n arr = this.o;\r\n break;\r\n\r\n default:\r\n arr = [];\r\n break;\r\n }\r\n\r\n if (!arr[pos] || arr[pos] && !replace) {\r\n arr[pos] = pointPool.newElement();\r\n }\r\n\r\n arr[pos][0] = x;\r\n arr[pos][1] = y;\r\n };\r\n\r\n ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\r\n this.setXYAt(vX, vY, 'v', pos, replace);\r\n this.setXYAt(oX, oY, 'o', pos, replace);\r\n this.setXYAt(iX, iY, 'i', pos, replace);\r\n };\r\n\r\n ShapePath.prototype.reverse = function () {\r\n var newPath = new ShapePath();\r\n newPath.setPathData(this.c, this._length);\r\n var vertices = this.v;\r\n var outPoints = this.o;\r\n var inPoints = this.i;\r\n var init = 0;\r\n\r\n if (this.c) {\r\n newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\r\n init = 1;\r\n }\r\n\r\n var cnt = this._length - 1;\r\n var len = this._length;\r\n var i;\r\n\r\n for (i = init; i < len; i += 1) {\r\n newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\r\n cnt -= 1;\r\n }\r\n\r\n return newPath;\r\n };\r\n\r\n ShapePath.prototype.length = function () {\r\n return this._length;\r\n };\r\n\r\n var shapePool = function () {\r\n function create() {\r\n return new ShapePath();\r\n }\r\n\r\n function release(shapePath) {\r\n var len = shapePath._length;\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n pointPool.release(shapePath.v[i]);\r\n pointPool.release(shapePath.i[i]);\r\n pointPool.release(shapePath.o[i]);\r\n shapePath.v[i] = null;\r\n shapePath.i[i] = null;\r\n shapePath.o[i] = null;\r\n }\r\n\r\n shapePath._length = 0;\r\n shapePath.c = false;\r\n }\r\n\r\n function clone(shape) {\r\n var cloned = factory.newElement();\r\n var i;\r\n var len = shape._length === undefined ? shape.v.length : shape._length;\r\n cloned.setLength(len);\r\n cloned.c = shape.c;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\r\n }\r\n\r\n return cloned;\r\n }\r\n\r\n var factory = poolFactory(4, create, release);\r\n factory.clone = clone;\r\n return factory;\r\n }();\r\n\r\n function ShapeCollection() {\r\n this._length = 0;\r\n this._maxLength = 4;\r\n this.shapes = createSizedArray(this._maxLength);\r\n }\r\n\r\n ShapeCollection.prototype.addShape = function (shapeData) {\r\n if (this._length === this._maxLength) {\r\n this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\r\n this._maxLength *= 2;\r\n }\r\n\r\n this.shapes[this._length] = shapeData;\r\n this._length += 1;\r\n };\r\n\r\n ShapeCollection.prototype.releaseShapes = function () {\r\n var i;\r\n\r\n for (i = 0; i < this._length; i += 1) {\r\n shapePool.release(this.shapes[i]);\r\n }\r\n\r\n this._length = 0;\r\n };\r\n\r\n var shapeCollectionPool = function () {\r\n var ob = {\r\n newShapeCollection: newShapeCollection,\r\n release: release\r\n };\r\n var _length = 0;\r\n var _maxLength = 4;\r\n var pool = createSizedArray(_maxLength);\r\n\r\n function newShapeCollection() {\r\n var shapeCollection;\r\n\r\n if (_length) {\r\n _length -= 1;\r\n shapeCollection = pool[_length];\r\n } else {\r\n shapeCollection = new ShapeCollection();\r\n }\r\n\r\n return shapeCollection;\r\n }\r\n\r\n function release(shapeCollection) {\r\n var i;\r\n var len = shapeCollection._length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapePool.release(shapeCollection.shapes[i]);\r\n }\r\n\r\n shapeCollection._length = 0;\r\n\r\n if (_length === _maxLength) {\r\n pool = pooling[\"double\"](pool);\r\n _maxLength *= 2;\r\n }\r\n\r\n pool[_length] = shapeCollection;\r\n _length += 1;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var ShapePropertyFactory = function () {\r\n var initFrame = -999999;\r\n\r\n function interpolateShape(frameNum, previousValue, caching) {\r\n var iterationIndex = caching.lastIndex;\r\n var keyPropS;\r\n var keyPropE;\r\n var isHold;\r\n var j;\r\n var k;\r\n var jLen;\r\n var kLen;\r\n var perc;\r\n var vertexValue;\r\n var kf = this.keyframes;\r\n\r\n if (frameNum < kf[0].t - this.offsetTime) {\r\n keyPropS = kf[0].s[0];\r\n isHold = true;\r\n iterationIndex = 0;\r\n } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\r\n keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\r\n /* if(kf[kf.length - 1].s){\r\n keyPropS = kf[kf.length - 1].s[0];\r\n }else{\r\n keyPropS = kf[kf.length - 2].e[0];\r\n } */\r\n\r\n isHold = true;\r\n } else {\r\n var i = iterationIndex;\r\n var len = kf.length - 1;\r\n var flag = true;\r\n var keyData;\r\n var nextKeyData;\r\n var keyframeMetadata;\r\n\r\n while (flag) {\r\n keyData = kf[i];\r\n nextKeyData = kf[i + 1];\r\n\r\n if (nextKeyData.t - this.offsetTime > frameNum) {\r\n break;\r\n }\r\n\r\n if (i < len - 1) {\r\n i += 1;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n\r\n keyframeMetadata = this.keyframesMetadata[i] || {};\r\n isHold = keyData.h === 1;\r\n iterationIndex = i;\r\n\r\n if (!isHold) {\r\n if (frameNum >= nextKeyData.t - this.offsetTime) {\r\n perc = 1;\r\n } else if (frameNum < keyData.t - this.offsetTime) {\r\n perc = 0;\r\n } else {\r\n var fnc;\r\n\r\n if (keyframeMetadata.__fnct) {\r\n fnc = keyframeMetadata.__fnct;\r\n } else {\r\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\r\n keyframeMetadata.__fnct = fnc;\r\n }\r\n\r\n perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));\r\n }\r\n\r\n keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\r\n }\r\n\r\n keyPropS = keyData.s[0];\r\n }\r\n\r\n jLen = previousValue._length;\r\n kLen = keyPropS.i[0].length;\r\n caching.lastIndex = iterationIndex;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n for (k = 0; k < kLen; k += 1) {\r\n vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\r\n previousValue.i[j][k] = vertexValue;\r\n vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\r\n previousValue.o[j][k] = vertexValue;\r\n vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\r\n previousValue.v[j][k] = vertexValue;\r\n }\r\n }\r\n }\r\n\r\n function interpolateShapeCurrentTime() {\r\n var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n var initTime = this.keyframes[0].t - this.offsetTime;\r\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n var lastFrame = this._caching.lastFrame;\r\n\r\n if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {\r\n /// /\r\n this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\r\n this.interpolateShape(frameNum, this.pv, this._caching); /// /\r\n }\r\n\r\n this._caching.lastFrame = frameNum;\r\n return this.pv;\r\n }\r\n\r\n function resetShape() {\r\n this.paths = this.localShapeCollection;\r\n }\r\n\r\n function shapesEqual(shape1, shape2) {\r\n if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\r\n return false;\r\n }\r\n\r\n var i;\r\n var len = shape1._length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function setVValue(newPath) {\r\n if (!shapesEqual(this.v, newPath)) {\r\n this.v = shapePool.clone(newPath);\r\n this.localShapeCollection.releaseShapes();\r\n this.localShapeCollection.addShape(this.v);\r\n this._mdf = true;\r\n this.paths = this.localShapeCollection;\r\n }\r\n }\r\n\r\n function processEffectsSequence() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n if (!this.effectsSequence.length) {\r\n this._mdf = false;\r\n return;\r\n }\r\n\r\n if (this.lock) {\r\n this.setVValue(this.pv);\r\n return;\r\n }\r\n\r\n this.lock = true;\r\n this._mdf = false;\r\n var finalValue;\r\n\r\n if (this.kf) {\r\n finalValue = this.pv;\r\n } else if (this.data.ks) {\r\n finalValue = this.data.ks.k;\r\n } else {\r\n finalValue = this.data.pt.k;\r\n }\r\n\r\n var i;\r\n var len = this.effectsSequence.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n finalValue = this.effectsSequence[i](finalValue);\r\n }\r\n\r\n this.setVValue(finalValue);\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function ShapeProperty(elem, data, type) {\r\n this.propType = 'shape';\r\n this.comp = elem.comp;\r\n this.container = elem;\r\n this.elem = elem;\r\n this.data = data;\r\n this.k = false;\r\n this.kf = false;\r\n this._mdf = false;\r\n var pathData = type === 3 ? data.pt.k : data.ks.k;\r\n this.v = shapePool.clone(pathData);\r\n this.pv = shapePool.clone(this.v);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.paths.addShape(this.v);\r\n this.reset = resetShape;\r\n this.effectsSequence = [];\r\n }\r\n\r\n function addEffect(effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.container.addDynamicProperty(this);\r\n }\r\n\r\n ShapeProperty.prototype.interpolateShape = interpolateShape;\r\n ShapeProperty.prototype.getValue = processEffectsSequence;\r\n ShapeProperty.prototype.setVValue = setVValue;\r\n ShapeProperty.prototype.addEffect = addEffect;\r\n\r\n function KeyframedShapeProperty(elem, data, type) {\r\n this.propType = 'shape';\r\n this.comp = elem.comp;\r\n this.elem = elem;\r\n this.container = elem;\r\n this.offsetTime = elem.data.st;\r\n this.keyframes = type === 3 ? data.pt.k : data.ks.k;\r\n this.keyframesMetadata = [];\r\n this.k = true;\r\n this.kf = true;\r\n var len = this.keyframes[0].s[0].i.length;\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(this.keyframes[0].s[0].c, len);\r\n this.pv = shapePool.clone(this.v);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.paths.addShape(this.v);\r\n this.lastFrame = initFrame;\r\n this.reset = resetShape;\r\n this._caching = {\r\n lastFrame: initFrame,\r\n lastIndex: 0\r\n };\r\n this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\r\n }\r\n\r\n KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\r\n KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\r\n KeyframedShapeProperty.prototype.setVValue = setVValue;\r\n KeyframedShapeProperty.prototype.addEffect = addEffect;\r\n\r\n var EllShapeProperty = function () {\r\n var cPoint = roundCorner;\r\n\r\n function EllShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(true, 4);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.localShapeCollection.addShape(this.v);\r\n this.d = data.d;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.frameId = -1;\r\n this.initDynamicPropertyContainer(elem);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertEllToPath();\r\n }\r\n }\r\n\r\n EllShapePropertyFactory.prototype = {\r\n reset: resetShape,\r\n getValue: function getValue() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertEllToPath();\r\n }\r\n },\r\n convertEllToPath: function convertEllToPath() {\r\n var p0 = this.p.v[0];\r\n var p1 = this.p.v[1];\r\n var s0 = this.s.v[0] / 2;\r\n var s1 = this.s.v[1] / 2;\r\n\r\n var _cw = this.d !== 3;\r\n\r\n var _v = this.v;\r\n _v.v[0][0] = p0;\r\n _v.v[0][1] = p1 - s1;\r\n _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.v[1][1] = p1;\r\n _v.v[2][0] = p0;\r\n _v.v[2][1] = p1 + s1;\r\n _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.v[3][1] = p1;\r\n _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n _v.i[0][1] = p1 - s1;\r\n _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.i[1][1] = p1 - s1 * cPoint;\r\n _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n _v.i[2][1] = p1 + s1;\r\n _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.i[3][1] = p1 + s1 * cPoint;\r\n _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n _v.o[0][1] = p1 - s1;\r\n _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.o[1][1] = p1 + s1 * cPoint;\r\n _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n _v.o[2][1] = p1 + s1;\r\n _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.o[3][1] = p1 - s1 * cPoint;\r\n }\r\n };\r\n extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\r\n return EllShapePropertyFactory;\r\n }();\r\n\r\n var StarShapeProperty = function () {\r\n function StarShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(true, 0);\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.data = data;\r\n this.frameId = -1;\r\n this.d = data.d;\r\n this.initDynamicPropertyContainer(elem);\r\n\r\n if (data.sy === 1) {\r\n this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\r\n this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\r\n this.convertToPath = this.convertStarToPath;\r\n } else {\r\n this.convertToPath = this.convertPolygonToPath;\r\n }\r\n\r\n this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\r\n this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\r\n this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.localShapeCollection.addShape(this.v);\r\n this.paths = this.localShapeCollection;\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertToPath();\r\n }\r\n }\r\n\r\n StarShapePropertyFactory.prototype = {\r\n reset: resetShape,\r\n getValue: function getValue() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertToPath();\r\n }\r\n },\r\n convertStarToPath: function convertStarToPath() {\r\n var numPts = Math.floor(this.pt.v) * 2;\r\n var angle = Math.PI * 2 / numPts;\r\n /* this.v.v.length = numPts;\r\n this.v.i.length = numPts;\r\n this.v.o.length = numPts; */\r\n\r\n var longFlag = true;\r\n var longRad = this.or.v;\r\n var shortRad = this.ir.v;\r\n var longRound = this.os.v;\r\n var shortRound = this.is.v;\r\n var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);\r\n var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);\r\n var i;\r\n var rad;\r\n var roundness;\r\n var perimSegment;\r\n var currentAng = -Math.PI / 2;\r\n currentAng += this.r.v;\r\n var dir = this.data.d === 3 ? -1 : 1;\r\n this.v._length = 0;\r\n\r\n for (i = 0; i < numPts; i += 1) {\r\n rad = longFlag ? longRad : shortRad;\r\n roundness = longFlag ? longRound : shortRound;\r\n perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\r\n var x = rad * Math.cos(currentAng);\r\n var y = rad * Math.sin(currentAng);\r\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n x += +this.p.v[0];\r\n y += +this.p.v[1];\r\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n /* this.v.v[i] = [x,y];\r\n this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n this.v._length = numPts; */\r\n\r\n longFlag = !longFlag;\r\n currentAng += angle * dir;\r\n }\r\n },\r\n convertPolygonToPath: function convertPolygonToPath() {\r\n var numPts = Math.floor(this.pt.v);\r\n var angle = Math.PI * 2 / numPts;\r\n var rad = this.or.v;\r\n var roundness = this.os.v;\r\n var perimSegment = 2 * Math.PI * rad / (numPts * 4);\r\n var i;\r\n var currentAng = -Math.PI * 0.5;\r\n var dir = this.data.d === 3 ? -1 : 1;\r\n currentAng += this.r.v;\r\n this.v._length = 0;\r\n\r\n for (i = 0; i < numPts; i += 1) {\r\n var x = rad * Math.cos(currentAng);\r\n var y = rad * Math.sin(currentAng);\r\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n x += +this.p.v[0];\r\n y += +this.p.v[1];\r\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n currentAng += angle * dir;\r\n }\r\n\r\n this.paths.length = 0;\r\n this.paths[0] = this.v;\r\n }\r\n };\r\n extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\r\n return StarShapePropertyFactory;\r\n }();\r\n\r\n var RectShapeProperty = function () {\r\n function RectShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.c = true;\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.localShapeCollection.addShape(this.v);\r\n this.paths = this.localShapeCollection;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.frameId = -1;\r\n this.d = data.d;\r\n this.initDynamicPropertyContainer(elem);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertRectToPath();\r\n }\r\n }\r\n\r\n RectShapePropertyFactory.prototype = {\r\n convertRectToPath: function convertRectToPath() {\r\n var p0 = this.p.v[0];\r\n var p1 = this.p.v[1];\r\n var v0 = this.s.v[0] / 2;\r\n var v1 = this.s.v[1] / 2;\r\n var round = bmMin(v0, v1, this.r.v);\r\n var cPoint = round * (1 - roundCorner);\r\n this.v._length = 0;\r\n\r\n if (this.d === 2 || this.d === 1) {\r\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\r\n\r\n if (round !== 0) {\r\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\r\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\r\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\r\n } else {\r\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\r\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\r\n }\r\n } else {\r\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\r\n\r\n if (round !== 0) {\r\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\r\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\r\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\r\n } else {\r\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\r\n }\r\n }\r\n },\r\n getValue: function getValue() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertRectToPath();\r\n }\r\n },\r\n reset: resetShape\r\n };\r\n extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\r\n return RectShapePropertyFactory;\r\n }();\r\n\r\n function getShapeProp(elem, data, type) {\r\n var prop;\r\n\r\n if (type === 3 || type === 4) {\r\n var dataProp = type === 3 ? data.pt : data.ks;\r\n var keys = dataProp.k;\r\n\r\n if (keys.length) {\r\n prop = new KeyframedShapeProperty(elem, data, type);\r\n } else {\r\n prop = new ShapeProperty(elem, data, type);\r\n }\r\n } else if (type === 5) {\r\n prop = new RectShapeProperty(elem, data);\r\n } else if (type === 6) {\r\n prop = new EllShapeProperty(elem, data);\r\n } else if (type === 7) {\r\n prop = new StarShapeProperty(elem, data);\r\n }\r\n\r\n if (prop.k) {\r\n elem.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n }\r\n\r\n function getConstructorFunction() {\r\n return ShapeProperty;\r\n }\r\n\r\n function getKeyframedConstructorFunction() {\r\n return KeyframedShapeProperty;\r\n }\r\n\r\n var ob = {};\r\n ob.getShapeProp = getShapeProp;\r\n ob.getConstructorFunction = getConstructorFunction;\r\n ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\r\n return ob;\r\n }();\r\n\r\n /*!\r\n Transformation Matrix v2.0\r\n (c) Epistemex 2014-2015\r\n www.epistemex.com\r\n By Ken Fyrstenberg\r\n Contributions by leeoniya.\r\n License: MIT, header required.\r\n */\r\n\r\n /**\r\n * 2D transformation matrix object initialized with identity matrix.\r\n *\r\n * The matrix can synchronize a canvas context by supplying the context\r\n * as an argument, or later apply current absolute transform to an\r\n * existing context.\r\n *\r\n * All values are handled as floating point values.\r\n *\r\n * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n * @prop {number} a - scale x\r\n * @prop {number} b - shear y\r\n * @prop {number} c - shear x\r\n * @prop {number} d - scale y\r\n * @prop {number} e - translate x\r\n * @prop {number} f - translate y\r\n * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n * @constructor\r\n */\r\n\r\n var Matrix = function () {\r\n var _cos = Math.cos;\r\n var _sin = Math.sin;\r\n var _tan = Math.tan;\r\n var _rnd = Math.round;\r\n\r\n function reset() {\r\n this.props[0] = 1;\r\n this.props[1] = 0;\r\n this.props[2] = 0;\r\n this.props[3] = 0;\r\n this.props[4] = 0;\r\n this.props[5] = 1;\r\n this.props[6] = 0;\r\n this.props[7] = 0;\r\n this.props[8] = 0;\r\n this.props[9] = 0;\r\n this.props[10] = 1;\r\n this.props[11] = 0;\r\n this.props[12] = 0;\r\n this.props[13] = 0;\r\n this.props[14] = 0;\r\n this.props[15] = 1;\r\n return this;\r\n }\r\n\r\n function rotate(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateX(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateY(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateZ(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function shear(sx, sy) {\r\n return this._t(1, sy, sx, 1, 0, 0);\r\n }\r\n\r\n function skew(ax, ay) {\r\n return this.shear(_tan(ax), _tan(ay));\r\n }\r\n\r\n function skewFromAxis(ax, angle) {\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\r\n }\r\n\r\n function scale(sx, sy, sz) {\r\n if (!sz && sz !== 0) {\r\n sz = 1;\r\n }\r\n\r\n if (sx === 1 && sy === 1 && sz === 1) {\r\n return this;\r\n }\r\n\r\n return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\r\n this.props[0] = a;\r\n this.props[1] = b;\r\n this.props[2] = c;\r\n this.props[3] = d;\r\n this.props[4] = e;\r\n this.props[5] = f;\r\n this.props[6] = g;\r\n this.props[7] = h;\r\n this.props[8] = i;\r\n this.props[9] = j;\r\n this.props[10] = k;\r\n this.props[11] = l;\r\n this.props[12] = m;\r\n this.props[13] = n;\r\n this.props[14] = o;\r\n this.props[15] = p;\r\n return this;\r\n }\r\n\r\n function translate(tx, ty, tz) {\r\n tz = tz || 0;\r\n\r\n if (tx !== 0 || ty !== 0 || tz !== 0) {\r\n return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\r\n var _p = this.props;\r\n\r\n if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\r\n // NOTE: commenting this condition because TurboFan deoptimizes code when present\r\n // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\r\n _p[12] = _p[12] * a2 + _p[15] * m2;\r\n _p[13] = _p[13] * f2 + _p[15] * n2;\r\n _p[14] = _p[14] * k2 + _p[15] * o2;\r\n _p[15] *= p2; // }\r\n\r\n this._identityCalculated = false;\r\n return this;\r\n }\r\n\r\n var a1 = _p[0];\r\n var b1 = _p[1];\r\n var c1 = _p[2];\r\n var d1 = _p[3];\r\n var e1 = _p[4];\r\n var f1 = _p[5];\r\n var g1 = _p[6];\r\n var h1 = _p[7];\r\n var i1 = _p[8];\r\n var j1 = _p[9];\r\n var k1 = _p[10];\r\n var l1 = _p[11];\r\n var m1 = _p[12];\r\n var n1 = _p[13];\r\n var o1 = _p[14];\r\n var p1 = _p[15];\r\n /* matrix order (canvas compatible):\r\n * ace\r\n * bdf\r\n * 001\r\n */\r\n\r\n _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\r\n _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\r\n _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\r\n _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\r\n _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\r\n _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\r\n _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\r\n _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\r\n _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\r\n _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\r\n _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\r\n _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\r\n _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\r\n _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\r\n _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\r\n _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\r\n this._identityCalculated = false;\r\n return this;\r\n }\r\n\r\n function isIdentity() {\r\n if (!this._identityCalculated) {\r\n this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\r\n this._identityCalculated = true;\r\n }\r\n\r\n return this._identity;\r\n }\r\n\r\n function equals(matr) {\r\n var i = 0;\r\n\r\n while (i < 16) {\r\n if (matr.props[i] !== this.props[i]) {\r\n return false;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function clone(matr) {\r\n var i;\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n matr.props[i] = this.props[i];\r\n }\r\n\r\n return matr;\r\n }\r\n\r\n function cloneFromProps(props) {\r\n var i;\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n this.props[i] = props[i];\r\n }\r\n }\r\n\r\n function applyToPoint(x, y, z) {\r\n return {\r\n x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\r\n y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\r\n z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]\r\n };\r\n /* return {\r\n x: x * me.a + y * me.c + me.e,\r\n y: x * me.b + y * me.d + me.f\r\n }; */\r\n }\r\n\r\n function applyToX(x, y, z) {\r\n return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\r\n }\r\n\r\n function applyToY(x, y, z) {\r\n return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\r\n }\r\n\r\n function applyToZ(x, y, z) {\r\n return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\r\n }\r\n\r\n function getInverseMatrix() {\r\n var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\r\n var a = this.props[5] / determinant;\r\n var b = -this.props[1] / determinant;\r\n var c = -this.props[4] / determinant;\r\n var d = this.props[0] / determinant;\r\n var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\r\n var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\r\n var inverseMatrix = new Matrix();\r\n inverseMatrix.props[0] = a;\r\n inverseMatrix.props[1] = b;\r\n inverseMatrix.props[4] = c;\r\n inverseMatrix.props[5] = d;\r\n inverseMatrix.props[12] = e;\r\n inverseMatrix.props[13] = f;\r\n return inverseMatrix;\r\n }\r\n\r\n function inversePoint(pt) {\r\n var inverseMatrix = this.getInverseMatrix();\r\n return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\r\n }\r\n\r\n function inversePoints(pts) {\r\n var i;\r\n var len = pts.length;\r\n var retPts = [];\r\n\r\n for (i = 0; i < len; i += 1) {\r\n retPts[i] = inversePoint(pts[i]);\r\n }\r\n\r\n return retPts;\r\n }\r\n\r\n function applyToTriplePoints(pt1, pt2, pt3) {\r\n var arr = createTypedArray('float32', 6);\r\n\r\n if (this.isIdentity()) {\r\n arr[0] = pt1[0];\r\n arr[1] = pt1[1];\r\n arr[2] = pt2[0];\r\n arr[3] = pt2[1];\r\n arr[4] = pt3[0];\r\n arr[5] = pt3[1];\r\n } else {\r\n var p0 = this.props[0];\r\n var p1 = this.props[1];\r\n var p4 = this.props[4];\r\n var p5 = this.props[5];\r\n var p12 = this.props[12];\r\n var p13 = this.props[13];\r\n arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\r\n arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\r\n arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\r\n arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\r\n arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\r\n arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function applyToPointArray(x, y, z) {\r\n var arr;\r\n\r\n if (this.isIdentity()) {\r\n arr = [x, y, z];\r\n } else {\r\n arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function applyToPointStringified(x, y) {\r\n if (this.isIdentity()) {\r\n return x + ',' + y;\r\n }\r\n\r\n var _p = this.props;\r\n return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\r\n }\r\n\r\n function toCSS() {\r\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n\r\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\r\n var i = 0;\r\n var props = this.props;\r\n var cssValue = 'matrix3d(';\r\n var v = 10000;\r\n\r\n while (i < 16) {\r\n cssValue += _rnd(props[i] * v) / v;\r\n cssValue += i === 15 ? ')' : ',';\r\n i += 1;\r\n }\r\n\r\n return cssValue;\r\n }\r\n\r\n function roundMatrixProperty(val) {\r\n var v = 10000;\r\n\r\n if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {\r\n return _rnd(val * v) / v;\r\n }\r\n\r\n return val;\r\n }\r\n\r\n function to2dCSS() {\r\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n\r\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\r\n var props = this.props;\r\n\r\n var _a = roundMatrixProperty(props[0]);\r\n\r\n var _b = roundMatrixProperty(props[1]);\r\n\r\n var _c = roundMatrixProperty(props[4]);\r\n\r\n var _d = roundMatrixProperty(props[5]);\r\n\r\n var _e = roundMatrixProperty(props[12]);\r\n\r\n var _f = roundMatrixProperty(props[13]);\r\n\r\n return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\r\n }\r\n\r\n return function () {\r\n this.reset = reset;\r\n this.rotate = rotate;\r\n this.rotateX = rotateX;\r\n this.rotateY = rotateY;\r\n this.rotateZ = rotateZ;\r\n this.skew = skew;\r\n this.skewFromAxis = skewFromAxis;\r\n this.shear = shear;\r\n this.scale = scale;\r\n this.setTransform = setTransform;\r\n this.translate = translate;\r\n this.transform = transform;\r\n this.applyToPoint = applyToPoint;\r\n this.applyToX = applyToX;\r\n this.applyToY = applyToY;\r\n this.applyToZ = applyToZ;\r\n this.applyToPointArray = applyToPointArray;\r\n this.applyToTriplePoints = applyToTriplePoints;\r\n this.applyToPointStringified = applyToPointStringified;\r\n this.toCSS = toCSS;\r\n this.to2dCSS = to2dCSS;\r\n this.clone = clone;\r\n this.cloneFromProps = cloneFromProps;\r\n this.equals = equals;\r\n this.inversePoints = inversePoints;\r\n this.inversePoint = inversePoint;\r\n this.getInverseMatrix = getInverseMatrix;\r\n this._t = this.transform;\r\n this.isIdentity = isIdentity;\r\n this._identity = true;\r\n this._identityCalculated = false;\r\n this.props = createTypedArray('float32', 16);\r\n this.reset();\r\n };\r\n }();\r\n\r\n function _typeof$3(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\r\n var lottie = {};\r\n var standalone = '__[STANDALONE]__';\r\n var animationData = '__[ANIMATIONDATA]__';\r\n var renderer = '';\r\n\r\n function setLocation(href) {\r\n setLocationHref(href);\r\n }\r\n\r\n function searchAnimations() {\r\n if (standalone === true) {\r\n animationManager.searchAnimations(animationData, standalone, renderer);\r\n } else {\r\n animationManager.searchAnimations();\r\n }\r\n }\r\n\r\n function setSubframeRendering(flag) {\r\n setSubframeEnabled(flag);\r\n }\r\n\r\n function setPrefix(prefix) {\r\n setIdPrefix(prefix);\r\n }\r\n\r\n function loadAnimation(params) {\r\n if (standalone === true) {\r\n params.animationData = JSON.parse(animationData);\r\n }\r\n\r\n return animationManager.loadAnimation(params);\r\n }\r\n\r\n function setQuality(value) {\r\n if (typeof value === 'string') {\r\n switch (value) {\r\n case 'high':\r\n setDefaultCurveSegments(200);\r\n break;\r\n\r\n default:\r\n case 'medium':\r\n setDefaultCurveSegments(50);\r\n break;\r\n\r\n case 'low':\r\n setDefaultCurveSegments(10);\r\n break;\r\n }\r\n } else if (!isNaN(value) && value > 1) {\r\n setDefaultCurveSegments(value);\r\n }\r\n\r\n if (getDefaultCurveSegments() >= 50) {\r\n roundValues(false);\r\n } else {\r\n roundValues(true);\r\n }\r\n }\r\n\r\n function inBrowser() {\r\n return typeof navigator !== 'undefined';\r\n }\r\n\r\n function installPlugin(type, plugin) {\r\n if (type === 'expressions') {\r\n setExpressionsPlugin(plugin);\r\n }\r\n }\r\n\r\n function getFactory(name) {\r\n switch (name) {\r\n case 'propertyFactory':\r\n return PropertyFactory;\r\n\r\n case 'shapePropertyFactory':\r\n return ShapePropertyFactory;\r\n\r\n case 'matrix':\r\n return Matrix;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n lottie.play = animationManager.play;\r\n lottie.pause = animationManager.pause;\r\n lottie.setLocationHref = setLocation;\r\n lottie.togglePause = animationManager.togglePause;\r\n lottie.setSpeed = animationManager.setSpeed;\r\n lottie.setDirection = animationManager.setDirection;\r\n lottie.stop = animationManager.stop;\r\n lottie.searchAnimations = searchAnimations;\r\n lottie.registerAnimation = animationManager.registerAnimation;\r\n lottie.loadAnimation = loadAnimation;\r\n lottie.setSubframeRendering = setSubframeRendering;\r\n lottie.resize = animationManager.resize; // lottie.start = start;\r\n\r\n lottie.goToAndStop = animationManager.goToAndStop;\r\n lottie.destroy = animationManager.destroy;\r\n lottie.setQuality = setQuality;\r\n lottie.inBrowser = inBrowser;\r\n lottie.installPlugin = installPlugin;\r\n lottie.freeze = animationManager.freeze;\r\n lottie.unfreeze = animationManager.unfreeze;\r\n lottie.setVolume = animationManager.setVolume;\r\n lottie.mute = animationManager.mute;\r\n lottie.unmute = animationManager.unmute;\r\n lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\r\n lottie.useWebWorker = setWebWorker;\r\n lottie.setIDPrefix = setPrefix;\r\n lottie.__getFactory = getFactory;\r\n lottie.version = '5.10.0';\r\n\r\n function checkReady() {\r\n if (document.readyState === 'complete') {\r\n clearInterval(readyStateCheckInterval);\r\n searchAnimations();\r\n }\r\n }\r\n\r\n function getQueryVariable(variable) {\r\n var vars = queryString.split('&');\r\n\r\n for (var i = 0; i < vars.length; i += 1) {\r\n var pair = vars[i].split('=');\r\n\r\n if (decodeURIComponent(pair[0]) == variable) {\r\n // eslint-disable-line eqeqeq\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var queryString = '';\r\n\r\n if (standalone) {\r\n var scripts = document.getElementsByTagName('script');\r\n var index = scripts.length - 1;\r\n var myScript = scripts[index] || {\r\n src: ''\r\n };\r\n queryString = myScript.src ? myScript.src.replace(/^[^\\?]+\\??/, '') : ''; // eslint-disable-line no-useless-escape\r\n\r\n renderer = getQueryVariable('renderer');\r\n }\r\n\r\n var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility\r\n\r\n try {\r\n if (!((typeof exports === \"undefined\" ? \"undefined\" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef\r\n ) {\r\n window.bodymovin = lottie;\r\n }\r\n } catch (err) {//\r\n }\r\n\r\n var ShapeModifiers = function () {\r\n var ob = {};\r\n var modifiers = {};\r\n ob.registerModifier = registerModifier;\r\n ob.getModifier = getModifier;\r\n\r\n function registerModifier(nm, factory) {\r\n if (!modifiers[nm]) {\r\n modifiers[nm] = factory;\r\n }\r\n }\r\n\r\n function getModifier(nm, elem, data) {\r\n return new modifiers[nm](elem, data);\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n function ShapeModifier() {}\r\n\r\n ShapeModifier.prototype.initModifierProperties = function () {};\r\n\r\n ShapeModifier.prototype.addShapeToModifier = function () {};\r\n\r\n ShapeModifier.prototype.addShape = function (data) {\r\n if (!this.closed) {\r\n // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\r\n data.sh.container.addDynamicProperty(data.sh);\r\n var shapeData = {\r\n shape: data.sh,\r\n data: data,\r\n localShapeCollection: shapeCollectionPool.newShapeCollection()\r\n };\r\n this.shapes.push(shapeData);\r\n this.addShapeToModifier(shapeData);\r\n\r\n if (this._isAnimated) {\r\n data.setAsAnimated();\r\n }\r\n }\r\n };\r\n\r\n ShapeModifier.prototype.init = function (elem, data) {\r\n this.shapes = [];\r\n this.elem = elem;\r\n this.initDynamicPropertyContainer(elem);\r\n this.initModifierProperties(elem, data);\r\n this.frameId = initialDefaultFrame;\r\n this.closed = false;\r\n this.k = false;\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.getValue(true);\r\n }\r\n };\r\n\r\n ShapeModifier.prototype.processKeys = function () {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], ShapeModifier);\r\n\r\n function TrimModifier() {}\r\n\r\n extendPrototype([ShapeModifier], TrimModifier);\r\n\r\n TrimModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\r\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\r\n this.sValue = 0;\r\n this.eValue = 0;\r\n this.getValue = this.processKeys;\r\n this.m = data.m;\r\n this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\r\n };\r\n\r\n TrimModifier.prototype.addShapeToModifier = function (shapeData) {\r\n shapeData.pathsData = [];\r\n };\r\n\r\n TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\r\n var segments = [];\r\n\r\n if (e <= 1) {\r\n segments.push({\r\n s: s,\r\n e: e\r\n });\r\n } else if (s >= 1) {\r\n segments.push({\r\n s: s - 1,\r\n e: e - 1\r\n });\r\n } else {\r\n segments.push({\r\n s: s,\r\n e: 1\r\n });\r\n segments.push({\r\n s: 0,\r\n e: e - 1\r\n });\r\n }\r\n\r\n var shapeSegments = [];\r\n var i;\r\n var len = segments.length;\r\n var segmentOb;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n segmentOb = segments[i];\r\n\r\n if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\r\n var shapeS;\r\n var shapeE;\r\n\r\n if (segmentOb.s * totalModifierLength <= addedLength) {\r\n shapeS = 0;\r\n } else {\r\n shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\r\n }\r\n\r\n if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\r\n shapeE = 1;\r\n } else {\r\n shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;\r\n }\r\n\r\n shapeSegments.push([shapeS, shapeE]);\r\n }\r\n }\r\n\r\n if (!shapeSegments.length) {\r\n shapeSegments.push([0, 0]);\r\n }\r\n\r\n return shapeSegments;\r\n };\r\n\r\n TrimModifier.prototype.releasePathsData = function (pathsData) {\r\n var i;\r\n var len = pathsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n segmentsLengthPool.release(pathsData[i]);\r\n }\r\n\r\n pathsData.length = 0;\r\n return pathsData;\r\n };\r\n\r\n TrimModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var s;\r\n var e;\r\n\r\n if (this._mdf || _isFirstFrame) {\r\n var o = this.o.v % 360 / 360;\r\n\r\n if (o < 0) {\r\n o += 1;\r\n }\r\n\r\n if (this.s.v > 1) {\r\n s = 1 + o;\r\n } else if (this.s.v < 0) {\r\n s = 0 + o;\r\n } else {\r\n s = this.s.v + o;\r\n }\r\n\r\n if (this.e.v > 1) {\r\n e = 1 + o;\r\n } else if (this.e.v < 0) {\r\n e = 0 + o;\r\n } else {\r\n e = this.e.v + o;\r\n }\r\n\r\n if (s > e) {\r\n var _s = s;\r\n s = e;\r\n e = _s;\r\n }\r\n\r\n s = Math.round(s * 10000) * 0.0001;\r\n e = Math.round(e * 10000) * 0.0001;\r\n this.sValue = s;\r\n this.eValue = e;\r\n } else {\r\n s = this.sValue;\r\n e = this.eValue;\r\n }\r\n\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var pathsData;\r\n var pathData;\r\n var totalShapeLength;\r\n var totalModifierLength = 0;\r\n\r\n if (e === s) {\r\n for (i = 0; i < len; i += 1) {\r\n this.shapes[i].localShapeCollection.releaseShapes();\r\n this.shapes[i].shape._mdf = true;\r\n this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\r\n\r\n if (this._mdf) {\r\n this.shapes[i].pathsData.length = 0;\r\n }\r\n }\r\n } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {\r\n var segments = [];\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\r\n\r\n if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n } else {\r\n shapePaths = shapeData.shape.paths;\r\n jLen = shapePaths._length;\r\n totalShapeLength = 0;\r\n\r\n if (!shapeData.shape._mdf && shapeData.pathsData.length) {\r\n totalShapeLength = shapeData.totalShapeLength;\r\n } else {\r\n pathsData = this.releasePathsData(shapeData.pathsData);\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\r\n pathsData.push(pathData);\r\n totalShapeLength += pathData.totalLength;\r\n }\r\n\r\n shapeData.totalShapeLength = totalShapeLength;\r\n shapeData.pathsData = pathsData;\r\n }\r\n\r\n totalModifierLength += totalShapeLength;\r\n shapeData.shape._mdf = true;\r\n }\r\n }\r\n\r\n var shapeS = s;\r\n var shapeE = e;\r\n var addedLength = 0;\r\n var edges;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n shapeData = this.shapes[i];\r\n\r\n if (shapeData.shape._mdf) {\r\n localShapeCollection = shapeData.localShapeCollection;\r\n localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\r\n\r\n if (this.m === 2 && len > 1) {\r\n edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\r\n addedLength += shapeData.totalShapeLength;\r\n } else {\r\n edges = [[shapeS, shapeE]];\r\n }\r\n\r\n jLen = edges.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n shapeS = edges[j][0];\r\n shapeE = edges[j][1];\r\n segments.length = 0;\r\n\r\n if (shapeE <= 1) {\r\n segments.push({\r\n s: shapeData.totalShapeLength * shapeS,\r\n e: shapeData.totalShapeLength * shapeE\r\n });\r\n } else if (shapeS >= 1) {\r\n segments.push({\r\n s: shapeData.totalShapeLength * (shapeS - 1),\r\n e: shapeData.totalShapeLength * (shapeE - 1)\r\n });\r\n } else {\r\n segments.push({\r\n s: shapeData.totalShapeLength * shapeS,\r\n e: shapeData.totalShapeLength\r\n });\r\n segments.push({\r\n s: 0,\r\n e: shapeData.totalShapeLength * (shapeE - 1)\r\n });\r\n }\r\n\r\n var newShapesData = this.addShapes(shapeData, segments[0]);\r\n\r\n if (segments[0].s !== segments[0].e) {\r\n if (segments.length > 1) {\r\n var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\r\n\r\n if (lastShapeInCollection.c) {\r\n var lastShape = newShapesData.pop();\r\n this.addPaths(newShapesData, localShapeCollection);\r\n newShapesData = this.addShapes(shapeData, segments[1], lastShape);\r\n } else {\r\n this.addPaths(newShapesData, localShapeCollection);\r\n newShapesData = this.addShapes(shapeData, segments[1]);\r\n }\r\n }\r\n\r\n this.addPaths(newShapesData, localShapeCollection);\r\n }\r\n }\r\n\r\n shapeData.shape.paths = localShapeCollection;\r\n }\r\n }\r\n } else if (this._mdf) {\r\n for (i = 0; i < len; i += 1) {\r\n // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\r\n // Don't remove this even if it's losing cached info.\r\n this.shapes[i].pathsData.length = 0;\r\n this.shapes[i].shape._mdf = true;\r\n }\r\n }\r\n };\r\n\r\n TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\r\n var i;\r\n var len = newPaths.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n localShapeCollection.addShape(newPaths[i]);\r\n }\r\n };\r\n\r\n TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\r\n shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\r\n shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\r\n\r\n if (newShape) {\r\n shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\r\n }\r\n\r\n shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\r\n };\r\n\r\n TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\r\n shapePath.setXYAt(points[1], points[5], 'o', pos);\r\n shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\r\n\r\n if (newShape) {\r\n shapePath.setXYAt(points[0], points[4], 'v', pos);\r\n }\r\n\r\n shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\r\n };\r\n\r\n TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\r\n var pathsData = shapeData.pathsData;\r\n var shapePaths = shapeData.shape.paths.shapes;\r\n var i;\r\n var len = shapeData.shape.paths._length;\r\n var j;\r\n var jLen;\r\n var addedLength = 0;\r\n var currentLengthData;\r\n var segmentCount;\r\n var lengths;\r\n var segment;\r\n var shapes = [];\r\n var initPos;\r\n var newShape = true;\r\n\r\n if (!shapePath) {\r\n shapePath = shapePool.newElement();\r\n segmentCount = 0;\r\n initPos = 0;\r\n } else {\r\n segmentCount = shapePath._length;\r\n initPos = shapePath._length;\r\n }\r\n\r\n shapes.push(shapePath);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n lengths = pathsData[i].lengths;\r\n shapePath.c = shapePaths[i].c;\r\n jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\r\n\r\n for (j = 1; j < jLen; j += 1) {\r\n currentLengthData = lengths[j - 1];\r\n\r\n if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\r\n addedLength += currentLengthData.addedLength;\r\n shapePath.c = false;\r\n } else if (addedLength > shapeSegment.e) {\r\n shapePath.c = false;\r\n break;\r\n } else {\r\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\r\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\r\n newShape = false;\r\n } else {\r\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\r\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n\r\n newShape = false;\r\n shapePath.c = false;\r\n }\r\n\r\n addedLength += currentLengthData.addedLength;\r\n segmentCount += 1;\r\n }\r\n }\r\n\r\n if (shapePaths[i].c && lengths.length) {\r\n currentLengthData = lengths[j - 1];\r\n\r\n if (addedLength <= shapeSegment.e) {\r\n var segmentLength = lengths[j - 1].addedLength;\r\n\r\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\r\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\r\n newShape = false;\r\n } else {\r\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\r\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n\r\n newShape = false;\r\n shapePath.c = false;\r\n }\r\n } else {\r\n shapePath.c = false;\r\n }\r\n\r\n addedLength += currentLengthData.addedLength;\r\n segmentCount += 1;\r\n }\r\n\r\n if (shapePath._length) {\r\n shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\r\n shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\r\n }\r\n\r\n if (addedLength > shapeSegment.e) {\r\n break;\r\n }\r\n\r\n if (i < len - 1) {\r\n shapePath = shapePool.newElement();\r\n newShape = true;\r\n shapes.push(shapePath);\r\n segmentCount = 0;\r\n }\r\n }\r\n\r\n return shapes;\r\n };\r\n\r\n function PuckerAndBloatModifier() {}\r\n\r\n extendPrototype([ShapeModifier], PuckerAndBloatModifier);\r\n\r\n PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n this._isAnimated = !!this.amount.effectsSequence.length;\r\n };\r\n\r\n PuckerAndBloatModifier.prototype.processPath = function (path, amount) {\r\n var percent = amount / 100;\r\n var centerPoint = [0, 0];\r\n var pathLength = path._length;\r\n var i = 0;\r\n\r\n for (i = 0; i < pathLength; i += 1) {\r\n centerPoint[0] += path.v[i][0];\r\n centerPoint[1] += path.v[i][1];\r\n }\r\n\r\n centerPoint[0] /= pathLength;\r\n centerPoint[1] /= pathLength;\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n var vX;\r\n var vY;\r\n var oX;\r\n var oY;\r\n var iX;\r\n var iY;\r\n\r\n for (i = 0; i < pathLength; i += 1) {\r\n vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\r\n vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\r\n oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\r\n oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\r\n iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\r\n iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\r\n }\r\n\r\n return clonedPath;\r\n };\r\n\r\n PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amount = this.amount.v;\r\n\r\n if (amount !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n var TransformPropertyFactory = function () {\r\n var defaultVector = [0, 0];\r\n\r\n function applyToMatrix(mat) {\r\n var _mdf = this._mdf;\r\n this.iterateDynamicProperties();\r\n this._mdf = this._mdf || _mdf;\r\n\r\n if (this.a) {\r\n mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n }\r\n\r\n if (this.s) {\r\n mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n }\r\n\r\n if (this.sk) {\r\n mat.skewFromAxis(-this.sk.v, this.sa.v);\r\n }\r\n\r\n if (this.r) {\r\n mat.rotate(-this.r.v);\r\n } else {\r\n mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n }\r\n\r\n if (this.data.p.s) {\r\n if (this.data.p.z) {\r\n mat.translate(this.px.v, this.py.v, -this.pz.v);\r\n } else {\r\n mat.translate(this.px.v, this.py.v, 0);\r\n }\r\n } else {\r\n mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n }\r\n }\r\n\r\n function processKeys(forceRender) {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n if (this._isDirty) {\r\n this.precalculateMatrix();\r\n this._isDirty = false;\r\n }\r\n\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf || forceRender) {\r\n var frameRate;\r\n this.v.cloneFromProps(this.pre.props);\r\n\r\n if (this.appliedTransformations < 1) {\r\n this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n }\r\n\r\n if (this.appliedTransformations < 2) {\r\n this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n }\r\n\r\n if (this.sk && this.appliedTransformations < 3) {\r\n this.v.skewFromAxis(-this.sk.v, this.sa.v);\r\n }\r\n\r\n if (this.r && this.appliedTransformations < 4) {\r\n this.v.rotate(-this.r.v);\r\n } else if (!this.r && this.appliedTransformations < 4) {\r\n this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n }\r\n\r\n if (this.autoOriented) {\r\n var v1;\r\n var v2;\r\n frameRate = this.elem.globalData.frameRate;\r\n\r\n if (this.p && this.p.keyframes && this.p.getValueAtTime) {\r\n if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\r\n v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\r\n v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\r\n } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\r\n v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);\r\n v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\r\n } else {\r\n v1 = this.p.pv;\r\n v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\r\n }\r\n } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\r\n v1 = [];\r\n v2 = [];\r\n var px = this.px;\r\n var py = this.py;\r\n\r\n if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\r\n v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\r\n v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\r\n v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);\r\n v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);\r\n } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\r\n v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);\r\n v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);\r\n v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n } else {\r\n v1 = [px.pv, py.pv];\r\n v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\r\n v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\r\n }\r\n } else {\r\n v2 = defaultVector;\r\n v1 = v2;\r\n }\r\n\r\n this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\r\n }\r\n\r\n if (this.data.p && this.data.p.s) {\r\n if (this.data.p.z) {\r\n this.v.translate(this.px.v, this.py.v, -this.pz.v);\r\n } else {\r\n this.v.translate(this.px.v, this.py.v, 0);\r\n }\r\n } else {\r\n this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n }\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function precalculateMatrix() {\r\n if (!this.a.k) {\r\n this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n this.appliedTransformations = 1;\r\n } else {\r\n return;\r\n }\r\n\r\n if (!this.s.effectsSequence.length) {\r\n this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n this.appliedTransformations = 2;\r\n } else {\r\n return;\r\n }\r\n\r\n if (this.sk) {\r\n if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\r\n this.pre.skewFromAxis(-this.sk.v, this.sa.v);\r\n this.appliedTransformations = 3;\r\n } else {\r\n return;\r\n }\r\n }\r\n\r\n if (this.r) {\r\n if (!this.r.effectsSequence.length) {\r\n this.pre.rotate(-this.r.v);\r\n this.appliedTransformations = 4;\r\n }\r\n } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\r\n this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n this.appliedTransformations = 4;\r\n }\r\n }\r\n\r\n function autoOrient() {//\r\n // var prevP = this.getValueAtTime();\r\n }\r\n\r\n function addDynamicProperty(prop) {\r\n this._addDynamicProperty(prop);\r\n\r\n this.elem.addDynamicProperty(prop);\r\n this._isDirty = true;\r\n }\r\n\r\n function TransformProperty(elem, data, container) {\r\n this.elem = elem;\r\n this.frameId = -1;\r\n this.propType = 'transform';\r\n this.data = data;\r\n this.v = new Matrix(); // Precalculated matrix with non animated properties\r\n\r\n this.pre = new Matrix();\r\n this.appliedTransformations = 0;\r\n this.initDynamicPropertyContainer(container || elem);\r\n\r\n if (data.p && data.p.s) {\r\n this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\r\n this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\r\n\r\n if (data.p.z) {\r\n this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\r\n }\r\n } else {\r\n this.p = PropertyFactory.getProp(elem, data.p || {\r\n k: [0, 0, 0]\r\n }, 1, 0, this);\r\n }\r\n\r\n if (data.rx) {\r\n this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\r\n this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\r\n this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\r\n\r\n if (data.or.k[0].ti) {\r\n var i;\r\n var len = data.or.k.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n data.or.k[i].to = null;\r\n data.or.k[i].ti = null;\r\n }\r\n }\r\n\r\n this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180\r\n\r\n this.or.sh = true;\r\n } else {\r\n this.r = PropertyFactory.getProp(elem, data.r || {\r\n k: 0\r\n }, 0, degToRads, this);\r\n }\r\n\r\n if (data.sk) {\r\n this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\r\n this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\r\n }\r\n\r\n this.a = PropertyFactory.getProp(elem, data.a || {\r\n k: [0, 0, 0]\r\n }, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s || {\r\n k: [100, 100, 100]\r\n }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\r\n\r\n if (data.o) {\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\r\n } else {\r\n this.o = {\r\n _mdf: false,\r\n v: 1\r\n };\r\n }\r\n\r\n this._isDirty = true;\r\n\r\n if (!this.dynamicProperties.length) {\r\n this.getValue(true);\r\n }\r\n }\r\n\r\n TransformProperty.prototype = {\r\n applyToMatrix: applyToMatrix,\r\n getValue: processKeys,\r\n precalculateMatrix: precalculateMatrix,\r\n autoOrient: autoOrient\r\n };\r\n extendPrototype([DynamicPropertyContainer], TransformProperty);\r\n TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\r\n TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\r\n\r\n function getTransformProperty(elem, data, container) {\r\n return new TransformProperty(elem, data, container);\r\n }\r\n\r\n return {\r\n getTransformProperty: getTransformProperty\r\n };\r\n }();\r\n\r\n function RepeaterModifier() {}\r\n\r\n extendPrototype([ShapeModifier], RepeaterModifier);\r\n\r\n RepeaterModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\r\n this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\r\n this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\r\n this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\r\n this.data = data;\r\n\r\n if (!this.dynamicProperties.length) {\r\n this.getValue(true);\r\n }\r\n\r\n this._isAnimated = !!this.dynamicProperties.length;\r\n this.pMatrix = new Matrix();\r\n this.rMatrix = new Matrix();\r\n this.sMatrix = new Matrix();\r\n this.tMatrix = new Matrix();\r\n this.matrix = new Matrix();\r\n };\r\n\r\n RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\r\n var dir = inv ? -1 : 1;\r\n var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\r\n var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\r\n pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\r\n rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n rMatrix.rotate(-transform.r.v * dir * perc);\r\n rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\r\n sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n };\r\n\r\n RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\r\n this.elem = elem;\r\n this.arr = arr;\r\n this.pos = pos;\r\n this.elemsData = elemsData;\r\n this._currentCopies = 0;\r\n this._elements = [];\r\n this._groups = [];\r\n this.frameId = -1;\r\n this.initDynamicPropertyContainer(elem);\r\n this.initModifierProperties(elem, arr[pos]);\r\n\r\n while (pos > 0) {\r\n pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);\r\n\r\n this._elements.unshift(arr[pos]);\r\n }\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.getValue(true);\r\n }\r\n };\r\n\r\n RepeaterModifier.prototype.resetElements = function (elements) {\r\n var i;\r\n var len = elements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n elements[i]._processed = false;\r\n\r\n if (elements[i].ty === 'gr') {\r\n this.resetElements(elements[i].it);\r\n }\r\n }\r\n };\r\n\r\n RepeaterModifier.prototype.cloneElements = function (elements) {\r\n var newElements = JSON.parse(JSON.stringify(elements));\r\n this.resetElements(newElements);\r\n return newElements;\r\n };\r\n\r\n RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\r\n var i;\r\n var len = elements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n elements[i]._render = renderFlag;\r\n\r\n if (elements[i].ty === 'gr') {\r\n this.changeGroupRender(elements[i].it, renderFlag);\r\n }\r\n }\r\n };\r\n\r\n RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var items;\r\n var itemsTransform;\r\n var i;\r\n var dir;\r\n var cont;\r\n var hasReloaded = false;\r\n\r\n if (this._mdf || _isFirstFrame) {\r\n var copies = Math.ceil(this.c.v);\r\n\r\n if (this._groups.length < copies) {\r\n while (this._groups.length < copies) {\r\n var group = {\r\n it: this.cloneElements(this._elements),\r\n ty: 'gr'\r\n };\r\n group.it.push({\r\n a: {\r\n a: 0,\r\n ix: 1,\r\n k: [0, 0]\r\n },\r\n nm: 'Transform',\r\n o: {\r\n a: 0,\r\n ix: 7,\r\n k: 100\r\n },\r\n p: {\r\n a: 0,\r\n ix: 2,\r\n k: [0, 0]\r\n },\r\n r: {\r\n a: 1,\r\n ix: 6,\r\n k: [{\r\n s: 0,\r\n e: 0,\r\n t: 0\r\n }, {\r\n s: 0,\r\n e: 0,\r\n t: 1\r\n }]\r\n },\r\n s: {\r\n a: 0,\r\n ix: 3,\r\n k: [100, 100]\r\n },\r\n sa: {\r\n a: 0,\r\n ix: 5,\r\n k: 0\r\n },\r\n sk: {\r\n a: 0,\r\n ix: 4,\r\n k: 0\r\n },\r\n ty: 'tr'\r\n });\r\n this.arr.splice(0, 0, group);\r\n\r\n this._groups.splice(0, 0, group);\r\n\r\n this._currentCopies += 1;\r\n }\r\n\r\n this.elem.reloadShapes();\r\n hasReloaded = true;\r\n }\r\n\r\n cont = 0;\r\n var renderFlag;\r\n\r\n for (i = 0; i <= this._groups.length - 1; i += 1) {\r\n renderFlag = cont < copies;\r\n this._groups[i]._render = renderFlag;\r\n this.changeGroupRender(this._groups[i].it, renderFlag);\r\n\r\n if (!renderFlag) {\r\n var elems = this.elemsData[i].it;\r\n var transformData = elems[elems.length - 1];\r\n\r\n if (transformData.transform.op.v !== 0) {\r\n transformData.transform.op._mdf = true;\r\n transformData.transform.op.v = 0;\r\n } else {\r\n transformData.transform.op._mdf = false;\r\n }\r\n }\r\n\r\n cont += 1;\r\n }\r\n\r\n this._currentCopies = copies; /// /\r\n\r\n var offset = this.o.v;\r\n var offsetModulo = offset % 1;\r\n var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\r\n var pProps = this.pMatrix.props;\r\n var rProps = this.rMatrix.props;\r\n var sProps = this.sMatrix.props;\r\n this.pMatrix.reset();\r\n this.rMatrix.reset();\r\n this.sMatrix.reset();\r\n this.tMatrix.reset();\r\n this.matrix.reset();\r\n var iteration = 0;\r\n\r\n if (offset > 0) {\r\n while (iteration < roundOffset) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n iteration += 1;\r\n }\r\n\r\n if (offsetModulo) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\r\n iteration += offsetModulo;\r\n }\r\n } else if (offset < 0) {\r\n while (iteration > roundOffset) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\r\n iteration -= 1;\r\n }\r\n\r\n if (offsetModulo) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\r\n iteration -= offsetModulo;\r\n }\r\n }\r\n\r\n i = this.data.m === 1 ? 0 : this._currentCopies - 1;\r\n dir = this.data.m === 1 ? 1 : -1;\r\n cont = this._currentCopies;\r\n var j;\r\n var jLen;\r\n\r\n while (cont) {\r\n items = this.elemsData[i].it;\r\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n jLen = itemsTransform.length;\r\n items[items.length - 1].transform.mProps._mdf = true;\r\n items[items.length - 1].transform.op._mdf = true;\r\n items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\r\n\r\n if (iteration !== 0) {\r\n if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n }\r\n\r\n this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\r\n this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\r\n this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsTransform[j] = this.matrix.props[j];\r\n }\r\n\r\n this.matrix.reset();\r\n } else {\r\n this.matrix.reset();\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsTransform[j] = this.matrix.props[j];\r\n }\r\n }\r\n\r\n iteration += 1;\r\n cont -= 1;\r\n i += dir;\r\n }\r\n } else {\r\n cont = this._currentCopies;\r\n i = 0;\r\n dir = 1;\r\n\r\n while (cont) {\r\n items = this.elemsData[i].it;\r\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n items[items.length - 1].transform.mProps._mdf = false;\r\n items[items.length - 1].transform.op._mdf = false;\r\n cont -= 1;\r\n i += dir;\r\n }\r\n }\r\n\r\n return hasReloaded;\r\n };\r\n\r\n RepeaterModifier.prototype.addShape = function () {};\r\n\r\n function RoundCornersModifier() {}\r\n\r\n extendPrototype([ShapeModifier], RoundCornersModifier);\r\n\r\n RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n this._isAnimated = !!this.rd.effectsSequence.length;\r\n };\r\n\r\n RoundCornersModifier.prototype.processPath = function (path, round) {\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n var i;\r\n var len = path._length;\r\n var currentV;\r\n var currentI;\r\n var currentO;\r\n var closerV;\r\n var distance;\r\n var newPosPerc;\r\n var index = 0;\r\n var vX;\r\n var vY;\r\n var oX;\r\n var oY;\r\n var iX;\r\n var iY;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n currentV = path.v[i];\r\n currentO = path.o[i];\r\n currentI = path.i[i];\r\n\r\n if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\r\n if ((i === 0 || i === len - 1) && !path.c) {\r\n clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\r\n /* clonedPath.v[index] = currentV;\r\n clonedPath.o[index] = currentO;\r\n clonedPath.i[index] = currentI; */\r\n\r\n index += 1;\r\n } else {\r\n if (i === 0) {\r\n closerV = path.v[len - 1];\r\n } else {\r\n closerV = path.v[i - 1];\r\n }\r\n\r\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n vX = iX;\r\n iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\r\n vY = iY;\r\n oX = vX - (vX - currentV[0]) * roundCorner;\r\n oY = vY - (vY - currentV[1]) * roundCorner;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n index += 1;\r\n\r\n if (i === len - 1) {\r\n closerV = path.v[0];\r\n } else {\r\n closerV = path.v[i + 1];\r\n }\r\n\r\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n vX = oX;\r\n oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\r\n vY = oY;\r\n iX = vX - (vX - currentV[0]) * roundCorner;\r\n iY = vY - (vY - currentV[1]) * roundCorner;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n index += 1;\r\n }\r\n } else {\r\n clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\r\n index += 1;\r\n }\r\n }\r\n\r\n return clonedPath;\r\n };\r\n\r\n RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var rd = this.rd.v;\r\n\r\n if (rd !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n function floatEqual(a, b) {\r\n return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b));\r\n }\r\n\r\n function floatZero(f) {\r\n return Math.abs(f) <= 0.00001;\r\n }\r\n\r\n function lerp(p0, p1, amount) {\r\n return p0 * (1 - amount) + p1 * amount;\r\n }\r\n\r\n function lerpPoint(p0, p1, amount) {\r\n return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)];\r\n }\r\n\r\n function quadRoots(a, b, c) {\r\n // no root\r\n if (a === 0) return [];\r\n var s = b * b - 4 * a * c; // Complex roots\r\n\r\n if (s < 0) return [];\r\n var singleRoot = -b / (2 * a); // 1 root\r\n\r\n if (s === 0) return [singleRoot];\r\n var delta = Math.sqrt(s) / (2 * a); // 2 roots\r\n\r\n return [singleRoot - delta, singleRoot + delta];\r\n }\r\n\r\n function polynomialCoefficients(p0, p1, p2, p3) {\r\n return [-p0 + 3 * p1 - 3 * p2 + p3, 3 * p0 - 6 * p1 + 3 * p2, -3 * p0 + 3 * p1, p0];\r\n }\r\n\r\n function singlePoint(p) {\r\n return new PolynomialBezier(p, p, p, p, false);\r\n }\r\n\r\n function PolynomialBezier(p0, p1, p2, p3, linearize) {\r\n if (linearize && pointEqual(p0, p1)) {\r\n p1 = lerpPoint(p0, p3, 1 / 3);\r\n }\r\n\r\n if (linearize && pointEqual(p2, p3)) {\r\n p2 = lerpPoint(p0, p3, 2 / 3);\r\n }\r\n\r\n var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]);\r\n var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]);\r\n this.a = [coeffx[0], coeffy[0]];\r\n this.b = [coeffx[1], coeffy[1]];\r\n this.c = [coeffx[2], coeffy[2]];\r\n this.d = [coeffx[3], coeffy[3]];\r\n this.points = [p0, p1, p2, p3];\r\n }\r\n\r\n PolynomialBezier.prototype.point = function (t) {\r\n return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]];\r\n };\r\n\r\n PolynomialBezier.prototype.derivative = function (t) {\r\n return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]];\r\n };\r\n\r\n PolynomialBezier.prototype.tangentAngle = function (t) {\r\n var p = this.derivative(t);\r\n return Math.atan2(p[1], p[0]);\r\n };\r\n\r\n PolynomialBezier.prototype.normalAngle = function (t) {\r\n var p = this.derivative(t);\r\n return Math.atan2(p[0], p[1]);\r\n };\r\n\r\n PolynomialBezier.prototype.inflectionPoints = function () {\r\n var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1];\r\n if (floatZero(denom)) return [];\r\n var tcusp = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / denom;\r\n var square = tcusp * tcusp - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / denom;\r\n if (square < 0) return [];\r\n var root = Math.sqrt(square);\r\n\r\n if (floatZero(root)) {\r\n if (root > 0 && root < 1) return [tcusp];\r\n return [];\r\n }\r\n\r\n return [tcusp - root, tcusp + root].filter(function (r) {\r\n return r > 0 && r < 1;\r\n });\r\n };\r\n\r\n PolynomialBezier.prototype.split = function (t) {\r\n if (t <= 0) return [singlePoint(this.points[0]), this];\r\n if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])];\r\n var p10 = lerpPoint(this.points[0], this.points[1], t);\r\n var p11 = lerpPoint(this.points[1], this.points[2], t);\r\n var p12 = lerpPoint(this.points[2], this.points[3], t);\r\n var p20 = lerpPoint(p10, p11, t);\r\n var p21 = lerpPoint(p11, p12, t);\r\n var p3 = lerpPoint(p20, p21, t);\r\n return [new PolynomialBezier(this.points[0], p10, p20, p3, true), new PolynomialBezier(p3, p21, p12, this.points[3], true)];\r\n };\r\n\r\n function extrema(bez, comp) {\r\n var min = bez.points[0][comp];\r\n var max = bez.points[bez.points.length - 1][comp];\r\n\r\n if (min > max) {\r\n var e = max;\r\n max = min;\r\n min = e;\r\n } // Derivative roots to find min/max\r\n\r\n\r\n var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]);\r\n\r\n for (var i = 0; i < f.length; i += 1) {\r\n if (f[i] > 0 && f[i] < 1) {\r\n var val = bez.point(f[i])[comp];\r\n if (val < min) min = val;else if (val > max) max = val;\r\n }\r\n }\r\n\r\n return {\r\n min: min,\r\n max: max\r\n };\r\n }\r\n\r\n PolynomialBezier.prototype.bounds = function () {\r\n return {\r\n x: extrema(this, 0),\r\n y: extrema(this, 1)\r\n };\r\n };\r\n\r\n PolynomialBezier.prototype.boundingBox = function () {\r\n var bounds = this.bounds();\r\n return {\r\n left: bounds.x.min,\r\n right: bounds.x.max,\r\n top: bounds.y.min,\r\n bottom: bounds.y.max,\r\n width: bounds.x.max - bounds.x.min,\r\n height: bounds.y.max - bounds.y.min,\r\n cx: (bounds.x.max + bounds.x.min) / 2,\r\n cy: (bounds.y.max + bounds.y.min) / 2\r\n };\r\n };\r\n\r\n function intersectData(bez, t1, t2) {\r\n var box = bez.boundingBox();\r\n return {\r\n cx: box.cx,\r\n cy: box.cy,\r\n width: box.width,\r\n height: box.height,\r\n bez: bez,\r\n t: (t1 + t2) / 2,\r\n t1: t1,\r\n t2: t2\r\n };\r\n }\r\n\r\n function splitData(data) {\r\n var split = data.bez.split(0.5);\r\n return [intersectData(split[0], data.t1, data.t), intersectData(split[1], data.t, data.t2)];\r\n }\r\n\r\n function boxIntersect(b1, b2) {\r\n return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height;\r\n }\r\n\r\n function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) {\r\n if (!boxIntersect(d1, d2)) return;\r\n\r\n if (depth >= maxRecursion || d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance) {\r\n intersections.push([d1.t, d2.t]);\r\n return;\r\n }\r\n\r\n var d1s = splitData(d1);\r\n var d2s = splitData(d2);\r\n intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\r\n intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\r\n intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\r\n intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\r\n }\r\n\r\n PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) {\r\n if (tolerance === undefined) tolerance = 2;\r\n if (maxRecursion === undefined) maxRecursion = 7;\r\n var intersections = [];\r\n intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion);\r\n return intersections;\r\n };\r\n\r\n PolynomialBezier.shapeSegment = function (shapePath, index) {\r\n var nextIndex = (index + 1) % shapePath.length();\r\n return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true);\r\n };\r\n\r\n PolynomialBezier.shapeSegmentInverted = function (shapePath, index) {\r\n var nextIndex = (index + 1) % shapePath.length();\r\n return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true);\r\n };\r\n\r\n function crossProduct(a, b) {\r\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\r\n }\r\n\r\n function lineIntersection(start1, end1, start2, end2) {\r\n var v1 = [start1[0], start1[1], 1];\r\n var v2 = [end1[0], end1[1], 1];\r\n var v3 = [start2[0], start2[1], 1];\r\n var v4 = [end2[0], end2[1], 1];\r\n var r = crossProduct(crossProduct(v1, v2), crossProduct(v3, v4));\r\n if (floatZero(r[2])) return null;\r\n return [r[0] / r[2], r[1] / r[2]];\r\n }\r\n\r\n function polarOffset(p, angle, length) {\r\n return [p[0] + Math.cos(angle) * length, p[1] - Math.sin(angle) * length];\r\n }\r\n\r\n function pointDistance(p1, p2) {\r\n return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]);\r\n }\r\n\r\n function pointEqual(p1, p2) {\r\n return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]);\r\n }\r\n\r\n function ZigZagModifier() {}\r\n\r\n extendPrototype([ShapeModifier], ZigZagModifier);\r\n\r\n ZigZagModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this);\r\n this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this);\r\n this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;\r\n };\r\n\r\n function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) {\r\n var angO = angle - Math.PI / 2;\r\n var angI = angle + Math.PI / 2;\r\n var px = point[0] + Math.cos(angle) * direction * amplitude;\r\n var py = point[1] - Math.sin(angle) * direction * amplitude;\r\n outputBezier.setTripleAt(px, py, px + Math.cos(angO) * outAmplitude, py - Math.sin(angO) * outAmplitude, px + Math.cos(angI) * inAmplitude, py - Math.sin(angI) * inAmplitude, outputBezier.length());\r\n }\r\n\r\n function getPerpendicularVector(pt1, pt2) {\r\n var vector = [pt2[0] - pt1[0], pt2[1] - pt1[1]];\r\n var rot = -Math.PI * 0.5;\r\n var rotatedVector = [Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1]];\r\n return rotatedVector;\r\n }\r\n\r\n function getProjectingAngle(path, cur) {\r\n var prevIndex = cur === 0 ? path.length() - 1 : cur - 1;\r\n var nextIndex = (cur + 1) % path.length();\r\n var prevPoint = path.v[prevIndex];\r\n var nextPoint = path.v[nextIndex];\r\n var pVector = getPerpendicularVector(prevPoint, nextPoint);\r\n return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]);\r\n }\r\n\r\n function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) {\r\n var angle = getProjectingAngle(path, cur);\r\n var point = path.v[cur % path._length];\r\n var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1];\r\n var nextPoint = path.v[(cur + 1) % path._length];\r\n var prevDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) : 0;\r\n var nextDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) : 0;\r\n setPoint(outputBezier, path.v[cur % path._length], angle, direction, amplitude, nextDist / ((frequency + 1) * 2), prevDist / ((frequency + 1) * 2), pointType);\r\n }\r\n\r\n function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) {\r\n for (var i = 0; i < frequency; i += 1) {\r\n var t = (i + 1) / (frequency + 1);\r\n var dist = pointType === 2 ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) : 0;\r\n var angle = segment.normalAngle(t);\r\n var point = segment.point(t);\r\n setPoint(outputBezier, point, angle, direction, amplitude, dist / ((frequency + 1) * 2), dist / ((frequency + 1) * 2), pointType);\r\n direction = -direction;\r\n }\r\n\r\n return direction;\r\n }\r\n\r\n ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) {\r\n var count = path._length;\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n\r\n if (!path.c) {\r\n count -= 1;\r\n }\r\n\r\n if (count === 0) return clonedPath;\r\n var direction = -1;\r\n var segment = PolynomialBezier.shapeSegment(path, 0);\r\n zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction);\r\n\r\n for (var i = 0; i < count; i += 1) {\r\n direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction);\r\n\r\n if (i === count - 1 && !path.c) {\r\n segment = null;\r\n } else {\r\n segment = PolynomialBezier.shapeSegment(path, (i + 1) % count);\r\n }\r\n\r\n zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction);\r\n }\r\n\r\n return clonedPath;\r\n };\r\n\r\n ZigZagModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amplitude = this.amplitude.v;\r\n var frequency = Math.max(0, Math.round(this.frequency.v));\r\n var pointType = this.pointsType.v;\r\n\r\n if (amplitude !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n function linearOffset(p1, p2, amount) {\r\n var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]);\r\n return [polarOffset(p1, angle, amount), polarOffset(p2, angle, amount)];\r\n }\r\n\r\n function offsetSegment(segment, amount) {\r\n var p0;\r\n var p1a;\r\n var p1b;\r\n var p2b;\r\n var p2a;\r\n var p3;\r\n var e;\r\n e = linearOffset(segment.points[0], segment.points[1], amount);\r\n p0 = e[0];\r\n p1a = e[1];\r\n e = linearOffset(segment.points[1], segment.points[2], amount);\r\n p1b = e[0];\r\n p2b = e[1];\r\n e = linearOffset(segment.points[2], segment.points[3], amount);\r\n p2a = e[0];\r\n p3 = e[1];\r\n var p1 = lineIntersection(p0, p1a, p1b, p2b);\r\n if (p1 === null) p1 = p1a;\r\n var p2 = lineIntersection(p2a, p3, p1b, p2b);\r\n if (p2 === null) p2 = p2a;\r\n return new PolynomialBezier(p0, p1, p2, p3);\r\n }\r\n\r\n function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) {\r\n var p0 = seg1.points[3];\r\n var p1 = seg2.points[0]; // Bevel\r\n\r\n if (lineJoin === 3) return p0; // Connected, they don't need a joint\r\n\r\n if (pointEqual(p0, p1)) return p0; // Round\r\n\r\n if (lineJoin === 2) {\r\n var angleOut = -seg1.tangentAngle(1);\r\n var angleIn = -seg2.tangentAngle(0) + Math.PI;\r\n var center = lineIntersection(p0, polarOffset(p0, angleOut + Math.PI / 2, 100), p1, polarOffset(p1, angleOut + Math.PI / 2, 100));\r\n var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2;\r\n var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner);\r\n outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1);\r\n tan = polarOffset(p1, angleIn, 2 * radius * roundCorner);\r\n outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length());\r\n return p1;\r\n } // Miter\r\n\r\n\r\n var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2];\r\n var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1];\r\n var intersection = lineIntersection(t0, p0, p1, t1);\r\n\r\n if (intersection && pointDistance(intersection, p0) < miterLimit) {\r\n outputBezier.setTripleAt(intersection[0], intersection[1], intersection[0], intersection[1], intersection[0], intersection[1], outputBezier.length());\r\n return intersection;\r\n }\r\n\r\n return p0;\r\n }\r\n\r\n function getIntersection(a, b) {\r\n var intersect = a.intersections(b);\r\n if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift();\r\n if (intersect.length) return intersect[0];\r\n return null;\r\n }\r\n\r\n function pruneSegmentIntersection(a, b) {\r\n var outa = a.slice();\r\n var outb = b.slice();\r\n var intersect = getIntersection(a[a.length - 1], b[0]);\r\n\r\n if (intersect) {\r\n outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0];\r\n outb[0] = b[0].split(intersect[1])[1];\r\n }\r\n\r\n if (a.length > 1 && b.length > 1) {\r\n intersect = getIntersection(a[0], b[b.length - 1]);\r\n\r\n if (intersect) {\r\n return [[a[0].split(intersect[0])[0]], [b[b.length - 1].split(intersect[1])[1]]];\r\n }\r\n }\r\n\r\n return [outa, outb];\r\n }\r\n\r\n function pruneIntersections(segments) {\r\n var e;\r\n\r\n for (var i = 1; i < segments.length; i += 1) {\r\n e = pruneSegmentIntersection(segments[i - 1], segments[i]);\r\n segments[i - 1] = e[0];\r\n segments[i] = e[1];\r\n }\r\n\r\n if (segments.length > 1) {\r\n e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]);\r\n segments[segments.length - 1] = e[0];\r\n segments[0] = e[1];\r\n }\r\n\r\n return segments;\r\n }\r\n\r\n function offsetSegmentSplit(segment, amount) {\r\n /*\r\n We split each bezier segment into smaller pieces based\r\n on inflection points, this ensures the control point\r\n polygon is convex.\r\n (A cubic bezier can have none, one, or two inflection points)\r\n */\r\n var flex = segment.inflectionPoints();\r\n var left;\r\n var right;\r\n var split;\r\n var mid;\r\n\r\n if (flex.length === 0) {\r\n return [offsetSegment(segment, amount)];\r\n }\r\n\r\n if (flex.length === 1 || floatEqual(flex[1], 1)) {\r\n split = segment.split(flex[0]);\r\n left = split[0];\r\n right = split[1];\r\n return [offsetSegment(left, amount), offsetSegment(right, amount)];\r\n }\r\n\r\n split = segment.split(flex[0]);\r\n left = split[0];\r\n var t = (flex[1] - flex[0]) / (1 - flex[0]);\r\n split = split[1].split(t);\r\n mid = split[0];\r\n right = split[1];\r\n return [offsetSegment(left, amount), offsetSegment(mid, amount), offsetSegment(right, amount)];\r\n }\r\n\r\n function OffsetPathModifier() {}\r\n\r\n extendPrototype([ShapeModifier], OffsetPathModifier);\r\n\r\n OffsetPathModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this);\r\n this.lineJoin = data.lj;\r\n this._isAnimated = this.amount.effectsSequence.length !== 0;\r\n };\r\n\r\n OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) {\r\n var outputBezier = shapePool.newElement();\r\n outputBezier.c = inputBezier.c;\r\n var count = inputBezier.length();\r\n\r\n if (!inputBezier.c) {\r\n count -= 1;\r\n }\r\n\r\n var i;\r\n var j;\r\n var segment;\r\n var multiSegments = [];\r\n\r\n for (i = 0; i < count; i += 1) {\r\n segment = PolynomialBezier.shapeSegment(inputBezier, i);\r\n multiSegments.push(offsetSegmentSplit(segment, amount));\r\n }\r\n\r\n if (!inputBezier.c) {\r\n for (i = count - 1; i >= 0; i -= 1) {\r\n segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i);\r\n multiSegments.push(offsetSegmentSplit(segment, amount));\r\n }\r\n }\r\n\r\n multiSegments = pruneIntersections(multiSegments); // Add bezier segments to the output and apply line joints\r\n\r\n var lastPoint = null;\r\n var lastSeg = null;\r\n\r\n for (i = 0; i < multiSegments.length; i += 1) {\r\n var multiSegment = multiSegments[i];\r\n if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit);\r\n lastSeg = multiSegment[multiSegment.length - 1];\r\n\r\n for (j = 0; j < multiSegment.length; j += 1) {\r\n segment = multiSegment[j];\r\n\r\n if (lastPoint && pointEqual(segment.points[0], lastPoint)) {\r\n outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1);\r\n } else {\r\n outputBezier.setTripleAt(segment.points[0][0], segment.points[0][1], segment.points[1][0], segment.points[1][1], segment.points[0][0], segment.points[0][1], outputBezier.length());\r\n }\r\n\r\n outputBezier.setTripleAt(segment.points[3][0], segment.points[3][1], segment.points[3][0], segment.points[3][1], segment.points[2][0], segment.points[2][1], outputBezier.length());\r\n lastPoint = segment.points[3];\r\n }\r\n }\r\n\r\n if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit);\r\n return outputBezier;\r\n };\r\n\r\n OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amount = this.amount.v;\r\n var miterLimit = this.miterLimit.v;\r\n var lineJoin = this.lineJoin;\r\n\r\n if (amount !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n function getFontProperties(fontData) {\r\n var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\r\n var fWeight = 'normal';\r\n var fStyle = 'normal';\r\n var len = styles.length;\r\n var styleName;\r\n\r\n for (var i = 0; i < len; i += 1) {\r\n styleName = styles[i].toLowerCase();\r\n\r\n switch (styleName) {\r\n case 'italic':\r\n fStyle = 'italic';\r\n break;\r\n\r\n case 'bold':\r\n fWeight = '700';\r\n break;\r\n\r\n case 'black':\r\n fWeight = '900';\r\n break;\r\n\r\n case 'medium':\r\n fWeight = '500';\r\n break;\r\n\r\n case 'regular':\r\n case 'normal':\r\n fWeight = '400';\r\n break;\r\n\r\n case 'light':\r\n case 'thin':\r\n fWeight = '200';\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return {\r\n style: fStyle,\r\n weight: fontData.fWeight || fWeight\r\n };\r\n }\r\n\r\n var FontManager = function () {\r\n var maxWaitingTime = 5000;\r\n var emptyChar = {\r\n w: 0,\r\n size: 0,\r\n shapes: [],\r\n data: {\r\n shapes: []\r\n }\r\n };\r\n var combinedCharacters = []; // Hindi characters\r\n\r\n combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\r\n var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];\r\n var zeroWidthJoiner = [65039, 8205];\r\n\r\n function trimFontOptions(font) {\r\n var familyArray = font.split(',');\r\n var i;\r\n var len = familyArray.length;\r\n var enabledFamilies = [];\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\r\n enabledFamilies.push(familyArray[i]);\r\n }\r\n }\r\n\r\n return enabledFamilies.join(',');\r\n }\r\n\r\n function setUpNode(font, family) {\r\n var parentNode = createTag('span'); // Node is invisible to screen readers.\r\n\r\n parentNode.setAttribute('aria-hidden', true);\r\n parentNode.style.fontFamily = family;\r\n var node = createTag('span'); // Characters that vary significantly among different fonts\r\n\r\n node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen\r\n\r\n parentNode.style.position = 'absolute';\r\n parentNode.style.left = '-10000px';\r\n parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious\r\n\r\n parentNode.style.fontSize = '300px'; // Reset any font properties\r\n\r\n parentNode.style.fontVariant = 'normal';\r\n parentNode.style.fontStyle = 'normal';\r\n parentNode.style.fontWeight = 'normal';\r\n parentNode.style.letterSpacing = '0';\r\n parentNode.appendChild(node);\r\n document.body.appendChild(parentNode); // Remember width with no applied web font\r\n\r\n var width = node.offsetWidth;\r\n node.style.fontFamily = trimFontOptions(font) + ', ' + family;\r\n return {\r\n node: node,\r\n w: width,\r\n parent: parentNode\r\n };\r\n }\r\n\r\n function checkLoadedFonts() {\r\n var i;\r\n var len = this.fonts.length;\r\n var node;\r\n var w;\r\n var loadedCount = len;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.fonts[i].loaded) {\r\n loadedCount -= 1;\r\n } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\r\n this.fonts[i].loaded = true;\r\n } else {\r\n node = this.fonts[i].monoCase.node;\r\n w = this.fonts[i].monoCase.w;\r\n\r\n if (node.offsetWidth !== w) {\r\n loadedCount -= 1;\r\n this.fonts[i].loaded = true;\r\n } else {\r\n node = this.fonts[i].sansCase.node;\r\n w = this.fonts[i].sansCase.w;\r\n\r\n if (node.offsetWidth !== w) {\r\n loadedCount -= 1;\r\n this.fonts[i].loaded = true;\r\n }\r\n }\r\n\r\n if (this.fonts[i].loaded) {\r\n this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\r\n this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\r\n }\r\n }\r\n }\r\n\r\n if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\r\n setTimeout(this.checkLoadedFontsBinded, 20);\r\n } else {\r\n setTimeout(this.setIsLoadedBinded, 10);\r\n }\r\n }\r\n\r\n function createHelper(fontData, def) {\r\n var engine = document.body && def ? 'svg' : 'canvas';\r\n var helper;\r\n var fontProps = getFontProperties(fontData);\r\n\r\n if (engine === 'svg') {\r\n var tHelper = createNS('text');\r\n tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;\r\n\r\n tHelper.setAttribute('font-family', fontData.fFamily);\r\n tHelper.setAttribute('font-style', fontProps.style);\r\n tHelper.setAttribute('font-weight', fontProps.weight);\r\n tHelper.textContent = '1';\r\n\r\n if (fontData.fClass) {\r\n tHelper.style.fontFamily = 'inherit';\r\n tHelper.setAttribute('class', fontData.fClass);\r\n } else {\r\n tHelper.style.fontFamily = fontData.fFamily;\r\n }\r\n\r\n def.appendChild(tHelper);\r\n helper = tHelper;\r\n } else {\r\n var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d');\r\n tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily;\r\n helper = tCanvasHelper;\r\n }\r\n\r\n function measure(text) {\r\n if (engine === 'svg') {\r\n helper.textContent = text;\r\n return helper.getComputedTextLength();\r\n }\r\n\r\n return helper.measureText(text).width;\r\n }\r\n\r\n return {\r\n measureText: measure\r\n };\r\n }\r\n\r\n function addFonts(fontData, defs) {\r\n if (!fontData) {\r\n this.isLoaded = true;\r\n return;\r\n }\r\n\r\n if (this.chars) {\r\n this.isLoaded = true;\r\n this.fonts = fontData.list;\r\n return;\r\n }\r\n\r\n if (!document.body) {\r\n this.isLoaded = true;\r\n fontData.list.forEach(function (data) {\r\n data.helper = createHelper(data);\r\n data.cache = {};\r\n });\r\n this.fonts = fontData.list;\r\n return;\r\n }\r\n\r\n var fontArr = fontData.list;\r\n var i;\r\n var len = fontArr.length;\r\n var _pendingFonts = len;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n var shouldLoadFont = true;\r\n var loadedSelector;\r\n var j;\r\n fontArr[i].loaded = false;\r\n fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\r\n fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\r\n\r\n if (!fontArr[i].fPath) {\r\n fontArr[i].loaded = true;\r\n _pendingFonts -= 1;\r\n } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\r\n loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\r\n\r\n if (loadedSelector.length > 0) {\r\n shouldLoadFont = false;\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var s = createTag('style');\r\n s.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n s.setAttribute('f-origin', fontArr[i].origin);\r\n s.setAttribute('f-family', fontArr[i].fFamily);\r\n s.type = 'text/css';\r\n s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\r\n defs.appendChild(s);\r\n }\r\n } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\r\n loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\r\n\r\n for (j = 0; j < loadedSelector.length; j += 1) {\r\n if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\r\n // Font is already loaded\r\n shouldLoadFont = false;\r\n }\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var l = createTag('link');\r\n l.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n l.setAttribute('f-origin', fontArr[i].origin);\r\n l.type = 'text/css';\r\n l.rel = 'stylesheet';\r\n l.href = fontArr[i].fPath;\r\n document.body.appendChild(l);\r\n }\r\n } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\r\n loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\r\n\r\n for (j = 0; j < loadedSelector.length; j += 1) {\r\n if (fontArr[i].fPath === loadedSelector[j].src) {\r\n // Font is already loaded\r\n shouldLoadFont = false;\r\n }\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var sc = createTag('link');\r\n sc.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n sc.setAttribute('f-origin', fontArr[i].origin);\r\n sc.setAttribute('rel', 'stylesheet');\r\n sc.setAttribute('href', fontArr[i].fPath);\r\n defs.appendChild(sc);\r\n }\r\n }\r\n\r\n fontArr[i].helper = createHelper(fontArr[i], defs);\r\n fontArr[i].cache = {};\r\n this.fonts.push(fontArr[i]);\r\n }\r\n\r\n if (_pendingFonts === 0) {\r\n this.isLoaded = true;\r\n } else {\r\n // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\r\n // Adding this timeout seems to fix it\r\n setTimeout(this.checkLoadedFonts.bind(this), 100);\r\n }\r\n }\r\n\r\n function addChars(chars) {\r\n if (!chars) {\r\n return;\r\n }\r\n\r\n if (!this.chars) {\r\n this.chars = [];\r\n }\r\n\r\n var i;\r\n var len = chars.length;\r\n var j;\r\n var jLen = this.chars.length;\r\n var found;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n j = 0;\r\n found = false;\r\n\r\n while (j < jLen) {\r\n if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\r\n found = true;\r\n }\r\n\r\n j += 1;\r\n }\r\n\r\n if (!found) {\r\n this.chars.push(chars[i]);\r\n jLen += 1;\r\n }\r\n }\r\n }\r\n\r\n function getCharData(_char, style, font) {\r\n var i = 0;\r\n var len = this.chars.length;\r\n\r\n while (i < len) {\r\n if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {\r\n return this.chars[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console\r\n && !this._warned) {\r\n this._warned = true;\r\n console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console\r\n }\r\n\r\n return emptyChar;\r\n }\r\n\r\n function measureText(_char2, fontName, size) {\r\n var fontData = this.getFontByName(fontName);\r\n\r\n var index = _char2.charCodeAt(0);\r\n\r\n if (!fontData.cache[index + 1]) {\r\n var tHelper = fontData.helper;\r\n\r\n if (_char2 === ' ') {\r\n var doubleSize = tHelper.measureText('|' + _char2 + '|');\r\n var singleSize = tHelper.measureText('||');\r\n fontData.cache[index + 1] = (doubleSize - singleSize) / 100;\r\n } else {\r\n fontData.cache[index + 1] = tHelper.measureText(_char2) / 100;\r\n }\r\n }\r\n\r\n return fontData.cache[index + 1] * size;\r\n }\r\n\r\n function getFontByName(name) {\r\n var i = 0;\r\n var len = this.fonts.length;\r\n\r\n while (i < len) {\r\n if (this.fonts[i].fName === name) {\r\n return this.fonts[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return this.fonts[0];\r\n }\r\n\r\n function isModifier(firstCharCode, secondCharCode) {\r\n var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\r\n return surrogateModifiers.indexOf(sum) !== -1;\r\n }\r\n\r\n function isZeroWidthJoiner(firstCharCode, secondCharCode) {\r\n if (!secondCharCode) {\r\n return firstCharCode === zeroWidthJoiner[1];\r\n }\r\n\r\n return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];\r\n }\r\n\r\n function isCombinedCharacter(_char3) {\r\n return combinedCharacters.indexOf(_char3) !== -1;\r\n }\r\n\r\n function setIsLoaded() {\r\n this.isLoaded = true;\r\n }\r\n\r\n var Font = function Font() {\r\n this.fonts = [];\r\n this.chars = null;\r\n this.typekitLoaded = 0;\r\n this.isLoaded = false;\r\n this._warned = false;\r\n this.initTime = Date.now();\r\n this.setIsLoadedBinded = this.setIsLoaded.bind(this);\r\n this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\r\n };\r\n\r\n Font.isModifier = isModifier;\r\n Font.isZeroWidthJoiner = isZeroWidthJoiner;\r\n Font.isCombinedCharacter = isCombinedCharacter;\r\n var fontPrototype = {\r\n addChars: addChars,\r\n addFonts: addFonts,\r\n getCharData: getCharData,\r\n getFontByName: getFontByName,\r\n measureText: measureText,\r\n checkLoadedFonts: checkLoadedFonts,\r\n setIsLoaded: setIsLoaded\r\n };\r\n Font.prototype = fontPrototype;\r\n return Font;\r\n }();\r\n\r\n function RenderableElement() {}\r\n\r\n RenderableElement.prototype = {\r\n initRenderable: function initRenderable() {\r\n // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\r\n this.isInRange = false; // layer's display state\r\n\r\n this.hidden = false; // If layer's transparency equals 0, it can be hidden\r\n\r\n this.isTransparent = false; // list of animated components\r\n\r\n this.renderableComponents = [];\r\n },\r\n addRenderableComponent: function addRenderableComponent(component) {\r\n if (this.renderableComponents.indexOf(component) === -1) {\r\n this.renderableComponents.push(component);\r\n }\r\n },\r\n removeRenderableComponent: function removeRenderableComponent(component) {\r\n if (this.renderableComponents.indexOf(component) !== -1) {\r\n this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\r\n }\r\n },\r\n prepareRenderableFrame: function prepareRenderableFrame(num) {\r\n this.checkLayerLimits(num);\r\n },\r\n checkTransparency: function checkTransparency() {\r\n if (this.finalTransform.mProp.o.v <= 0) {\r\n if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\r\n this.isTransparent = true;\r\n this.hide();\r\n }\r\n } else if (this.isTransparent) {\r\n this.isTransparent = false;\r\n this.show();\r\n }\r\n },\r\n\r\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n *\r\n */\r\n checkLayerLimits: function checkLayerLimits(num) {\r\n if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\r\n if (this.isInRange !== true) {\r\n this.globalData._mdf = true;\r\n this._mdf = true;\r\n this.isInRange = true;\r\n this.show();\r\n }\r\n } else if (this.isInRange !== false) {\r\n this.globalData._mdf = true;\r\n this.isInRange = false;\r\n this.hide();\r\n }\r\n },\r\n renderRenderable: function renderRenderable() {\r\n var i;\r\n var len = this.renderableComponents.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.renderableComponents[i].renderFrame(this._isFirstFrame);\r\n }\r\n /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\r\n\r\n },\r\n sourceRectAtTime: function sourceRectAtTime() {\r\n return {\r\n top: 0,\r\n left: 0,\r\n width: 100,\r\n height: 100\r\n };\r\n },\r\n getLayerSize: function getLayerSize() {\r\n if (this.data.ty === 5) {\r\n return {\r\n w: this.data.textData.width,\r\n h: this.data.textData.height\r\n };\r\n }\r\n\r\n return {\r\n w: this.data.width,\r\n h: this.data.height\r\n };\r\n }\r\n };\r\n\r\n var getBlendMode = function () {\r\n var blendModeEnums = {\r\n 0: 'source-over',\r\n 1: 'multiply',\r\n 2: 'screen',\r\n 3: 'overlay',\r\n 4: 'darken',\r\n 5: 'lighten',\r\n 6: 'color-dodge',\r\n 7: 'color-burn',\r\n 8: 'hard-light',\r\n 9: 'soft-light',\r\n 10: 'difference',\r\n 11: 'exclusion',\r\n 12: 'hue',\r\n 13: 'saturation',\r\n 14: 'color',\r\n 15: 'luminosity'\r\n };\r\n return function (mode) {\r\n return blendModeEnums[mode] || '';\r\n };\r\n }();\r\n\r\n function SliderEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function AngleEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function ColorEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n }\r\n\r\n function PointEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n }\r\n\r\n function LayerIndexEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function MaskIndexEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function CheckboxEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function NoValueEffect() {\r\n this.p = {};\r\n }\r\n\r\n function EffectsManager(data, element) {\r\n var effects = data.ef || [];\r\n this.effectElements = [];\r\n var i;\r\n var len = effects.length;\r\n var effectItem;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n effectItem = new GroupEffect(effects[i], element);\r\n this.effectElements.push(effectItem);\r\n }\r\n }\r\n\r\n function GroupEffect(data, element) {\r\n this.init(data, element);\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], GroupEffect);\r\n GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\r\n\r\n GroupEffect.prototype.init = function (data, element) {\r\n this.data = data;\r\n this.effectElements = [];\r\n this.initDynamicPropertyContainer(element);\r\n var i;\r\n var len = this.data.ef.length;\r\n var eff;\r\n var effects = this.data.ef;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n eff = null;\r\n\r\n switch (effects[i].ty) {\r\n case 0:\r\n eff = new SliderEffect(effects[i], element, this);\r\n break;\r\n\r\n case 1:\r\n eff = new AngleEffect(effects[i], element, this);\r\n break;\r\n\r\n case 2:\r\n eff = new ColorEffect(effects[i], element, this);\r\n break;\r\n\r\n case 3:\r\n eff = new PointEffect(effects[i], element, this);\r\n break;\r\n\r\n case 4:\r\n case 7:\r\n eff = new CheckboxEffect(effects[i], element, this);\r\n break;\r\n\r\n case 10:\r\n eff = new LayerIndexEffect(effects[i], element, this);\r\n break;\r\n\r\n case 11:\r\n eff = new MaskIndexEffect(effects[i], element, this);\r\n break;\r\n\r\n case 5:\r\n eff = new EffectsManager(effects[i], element, this);\r\n break;\r\n // case 6:\r\n\r\n default:\r\n eff = new NoValueEffect(effects[i], element, this);\r\n break;\r\n }\r\n\r\n if (eff) {\r\n this.effectElements.push(eff);\r\n }\r\n }\r\n };\r\n\r\n function BaseElement() {}\r\n\r\n BaseElement.prototype = {\r\n checkMasks: function checkMasks() {\r\n if (!this.data.hasMask) {\r\n return false;\r\n }\r\n\r\n var i = 0;\r\n var len = this.data.masksProperties.length;\r\n\r\n while (i < len) {\r\n if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {\r\n return true;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return false;\r\n },\r\n initExpressions: function initExpressions() {\r\n var expressionsInterfaces = getExpressionInterfaces();\r\n\r\n if (!expressionsInterfaces) {\r\n return;\r\n }\r\n\r\n var LayerExpressionInterface = expressionsInterfaces('layer');\r\n var EffectsExpressionInterface = expressionsInterfaces('effects');\r\n var ShapeExpressionInterface = expressionsInterfaces('shape');\r\n var TextExpressionInterface = expressionsInterfaces('text');\r\n var CompExpressionInterface = expressionsInterfaces('comp');\r\n this.layerInterface = LayerExpressionInterface(this);\r\n\r\n if (this.data.hasMask && this.maskManager) {\r\n this.layerInterface.registerMaskInterface(this.maskManager);\r\n }\r\n\r\n var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\r\n this.layerInterface.registerEffectsInterface(effectsInterface);\r\n\r\n if (this.data.ty === 0 || this.data.xt) {\r\n this.compInterface = CompExpressionInterface(this);\r\n } else if (this.data.ty === 4) {\r\n this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\r\n this.layerInterface.content = this.layerInterface.shapeInterface;\r\n } else if (this.data.ty === 5) {\r\n this.layerInterface.textInterface = TextExpressionInterface(this);\r\n this.layerInterface.text = this.layerInterface.textInterface;\r\n }\r\n },\r\n setBlendMode: function setBlendMode() {\r\n var blendModeValue = getBlendMode(this.data.bm);\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style['mix-blend-mode'] = blendModeValue;\r\n },\r\n initBaseData: function initBaseData(data, globalData, comp) {\r\n this.globalData = globalData;\r\n this.comp = comp;\r\n this.data = data;\r\n this.layerId = createElementID(); // Stretch factor for old animations missing this property.\r\n\r\n if (!this.data.sr) {\r\n this.data.sr = 1;\r\n } // effects manager\r\n\r\n\r\n this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\r\n },\r\n getType: function getType() {\r\n return this.type;\r\n },\r\n sourceRectAtTime: function sourceRectAtTime() {}\r\n };\r\n\r\n /**\r\n * @file\r\n * Handles element's layer frame update.\r\n * Checks layer in point and out point\r\n *\r\n */\r\n function FrameElement() {}\r\n\r\n FrameElement.prototype = {\r\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n */\r\n initFrame: function initFrame() {\r\n // set to true when inpoint is rendered\r\n this._isFirstFrame = false; // list of animated properties\r\n\r\n this.dynamicProperties = []; // If layer has been modified in current tick this will be true\r\n\r\n this._mdf = false;\r\n },\r\n\r\n /**\r\n * @function\r\n * Calculates all dynamic values\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n * @param {boolean} isVisible\r\n * if layers is currently in range\r\n *\r\n */\r\n prepareProperties: function prepareProperties(num, isVisible) {\r\n var i;\r\n var len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {\r\n this.dynamicProperties[i].getValue();\r\n\r\n if (this.dynamicProperties[i]._mdf) {\r\n this.globalData._mdf = true;\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n },\r\n addDynamicProperty: function addDynamicProperty(prop) {\r\n if (this.dynamicProperties.indexOf(prop) === -1) {\r\n this.dynamicProperties.push(prop);\r\n }\r\n }\r\n };\r\n\r\n function FootageElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initRenderable();\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.footageData = globalData.imageLoader.getAsset(this.assetData);\r\n this.initBaseData(data, globalData, comp);\r\n }\r\n\r\n FootageElement.prototype.prepareFrame = function () {};\r\n\r\n extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\r\n\r\n FootageElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n FootageElement.prototype.renderFrame = function () {};\r\n\r\n FootageElement.prototype.destroy = function () {};\r\n\r\n FootageElement.prototype.initExpressions = function () {\r\n var expressionsInterfaces = getExpressionInterfaces();\r\n\r\n if (!expressionsInterfaces) {\r\n return;\r\n }\r\n\r\n var FootageInterface = expressionsInterfaces('footage');\r\n this.layerInterface = FootageInterface(this);\r\n };\r\n\r\n FootageElement.prototype.getFootageData = function () {\r\n return this.footageData;\r\n };\r\n\r\n function AudioElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initRenderable();\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initBaseData(data, globalData, comp);\r\n this._isPlaying = false;\r\n this._canPlay = false;\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n this.audio = this.globalData.audioController.createAudio(assetPath);\r\n this._currentTime = 0;\r\n this.globalData.audioController.addAudio(this);\r\n this._volumeMultiplier = 1;\r\n this._volume = 1;\r\n this._previousVolume = null;\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {\r\n k: [100]\r\n }, 1, 0.01, this);\r\n }\r\n\r\n AudioElement.prototype.prepareFrame = function (num) {\r\n this.prepareRenderableFrame(num, true);\r\n this.prepareProperties(num, true);\r\n\r\n if (!this.tm._placeholder) {\r\n var timeRemapped = this.tm.v;\r\n this._currentTime = timeRemapped;\r\n } else {\r\n this._currentTime = num / this.data.sr;\r\n }\r\n\r\n this._volume = this.lv.v[0];\r\n var totalVolume = this._volume * this._volumeMultiplier;\r\n\r\n if (this._previousVolume !== totalVolume) {\r\n this._previousVolume = totalVolume;\r\n this.audio.volume(totalVolume);\r\n }\r\n };\r\n\r\n extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\r\n\r\n AudioElement.prototype.renderFrame = function () {\r\n if (this.isInRange && this._canPlay) {\r\n if (!this._isPlaying) {\r\n this.audio.play();\r\n this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n this._isPlaying = true;\r\n } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {\r\n this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n }\r\n }\r\n };\r\n\r\n AudioElement.prototype.show = function () {// this.audio.play()\r\n };\r\n\r\n AudioElement.prototype.hide = function () {\r\n this.audio.pause();\r\n this._isPlaying = false;\r\n };\r\n\r\n AudioElement.prototype.pause = function () {\r\n this.audio.pause();\r\n this._isPlaying = false;\r\n this._canPlay = false;\r\n };\r\n\r\n AudioElement.prototype.resume = function () {\r\n this._canPlay = true;\r\n };\r\n\r\n AudioElement.prototype.setRate = function (rateValue) {\r\n this.audio.rate(rateValue);\r\n };\r\n\r\n AudioElement.prototype.volume = function (volumeValue) {\r\n this._volumeMultiplier = volumeValue;\r\n this._previousVolume = volumeValue * this._volume;\r\n this.audio.volume(this._previousVolume);\r\n };\r\n\r\n AudioElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n AudioElement.prototype.destroy = function () {};\r\n\r\n AudioElement.prototype.sourceRectAtTime = function () {};\r\n\r\n AudioElement.prototype.initExpressions = function () {};\r\n\r\n function BaseRenderer() {}\r\n\r\n BaseRenderer.prototype.checkLayers = function (num) {\r\n var i;\r\n var len = this.layers.length;\r\n var data;\r\n this.completeLayers = true;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (!this.elements[i]) {\r\n data = this.layers[i];\r\n\r\n if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {\r\n this.buildItem(i);\r\n }\r\n }\r\n\r\n this.completeLayers = this.elements[i] ? this.completeLayers : false;\r\n }\r\n\r\n this.checkPendingElements();\r\n };\r\n\r\n BaseRenderer.prototype.createItem = function (layer) {\r\n switch (layer.ty) {\r\n case 2:\r\n return this.createImage(layer);\r\n\r\n case 0:\r\n return this.createComp(layer);\r\n\r\n case 1:\r\n return this.createSolid(layer);\r\n\r\n case 3:\r\n return this.createNull(layer);\r\n\r\n case 4:\r\n return this.createShape(layer);\r\n\r\n case 5:\r\n return this.createText(layer);\r\n\r\n case 6:\r\n return this.createAudio(layer);\r\n\r\n case 13:\r\n return this.createCamera(layer);\r\n\r\n case 15:\r\n return this.createFootage(layer);\r\n\r\n default:\r\n return this.createNull(layer);\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.createCamera = function () {\r\n throw new Error('You\\'re using a 3d camera. Try the html renderer.');\r\n };\r\n\r\n BaseRenderer.prototype.createAudio = function (data) {\r\n return new AudioElement(data, this.globalData, this);\r\n };\r\n\r\n BaseRenderer.prototype.createFootage = function (data) {\r\n return new FootageElement(data, this.globalData, this);\r\n };\r\n\r\n BaseRenderer.prototype.buildAllItems = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.buildItem(i);\r\n }\r\n\r\n this.checkPendingElements();\r\n };\r\n\r\n BaseRenderer.prototype.includeLayers = function (newLayers) {\r\n this.completeLayers = false;\r\n var i;\r\n var len = newLayers.length;\r\n var j;\r\n var jLen = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n j = 0;\r\n\r\n while (j < jLen) {\r\n if (this.layers[j].id === newLayers[i].id) {\r\n this.layers[j] = newLayers[i];\r\n break;\r\n }\r\n\r\n j += 1;\r\n }\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.setProjectInterface = function (pInterface) {\r\n this.globalData.projectInterface = pInterface;\r\n };\r\n\r\n BaseRenderer.prototype.initItems = function () {\r\n if (!this.globalData.progressiveLoad) {\r\n this.buildAllItems();\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\r\n var elements = this.elements;\r\n var layers = this.layers;\r\n var i = 0;\r\n var len = layers.length;\r\n\r\n while (i < len) {\r\n if (layers[i].ind == parentName) {\r\n // eslint-disable-line eqeqeq\r\n if (!elements[i] || elements[i] === true) {\r\n this.buildItem(i);\r\n this.addPendingElement(element);\r\n } else {\r\n hierarchy.push(elements[i]);\r\n elements[i].setAsParent();\r\n\r\n if (layers[i].parent !== undefined) {\r\n this.buildElementParenting(element, layers[i].parent, hierarchy);\r\n } else {\r\n element.setHierarchy(hierarchy);\r\n }\r\n }\r\n }\r\n\r\n i += 1;\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.addPendingElement = function (element) {\r\n this.pendingElements.push(element);\r\n };\r\n\r\n BaseRenderer.prototype.searchExtraCompositions = function (assets) {\r\n var i;\r\n var len = assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (assets[i].xt) {\r\n var comp = this.createComp(assets[i]);\r\n comp.initExpressions();\r\n this.globalData.projectInterface.registerComposition(comp);\r\n }\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.getElementByPath = function (path) {\r\n var pathValue = path.shift();\r\n var element;\r\n\r\n if (typeof pathValue === 'number') {\r\n element = this.elements[pathValue];\r\n } else {\r\n var i;\r\n var len = this.elements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i].data.nm === pathValue) {\r\n element = this.elements[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (path.length === 0) {\r\n return element;\r\n }\r\n\r\n return element.getElementByPath(path);\r\n };\r\n\r\n BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\r\n this.globalData.fontManager = new FontManager();\r\n this.globalData.fontManager.addChars(animData.chars);\r\n this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\r\n this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\r\n this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\r\n this.globalData.imageLoader = this.animationItem.imagePreloader;\r\n this.globalData.audioController = this.animationItem.audioController;\r\n this.globalData.frameId = 0;\r\n this.globalData.frameRate = animData.fr;\r\n this.globalData.nm = animData.nm;\r\n this.globalData.compSize = {\r\n w: animData.w,\r\n h: animData.h\r\n };\r\n };\r\n\r\n function TransformElement() {}\r\n\r\n TransformElement.prototype = {\r\n initTransform: function initTransform() {\r\n this.finalTransform = {\r\n mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {\r\n o: 0\r\n },\r\n _matMdf: false,\r\n _opMdf: false,\r\n mat: new Matrix()\r\n };\r\n\r\n if (this.data.ao) {\r\n this.finalTransform.mProp.autoOriented = true;\r\n } // TODO: check TYPE 11: Guided elements\r\n\r\n\r\n if (this.data.ty !== 11) {// this.createElements();\r\n }\r\n },\r\n renderTransform: function renderTransform() {\r\n this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\r\n this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\r\n\r\n if (this.hierarchy) {\r\n var mat;\r\n var finalMat = this.finalTransform.mat;\r\n var i = 0;\r\n var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.\r\n\r\n if (!this.finalTransform._matMdf) {\r\n while (i < len) {\r\n if (this.hierarchy[i].finalTransform.mProp._mdf) {\r\n this.finalTransform._matMdf = true;\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n if (this.finalTransform._matMdf) {\r\n mat = this.finalTransform.mProp.v.props;\r\n finalMat.cloneFromProps(mat);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n mat = this.hierarchy[i].finalTransform.mProp.v.props;\r\n finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]);\r\n }\r\n }\r\n }\r\n },\r\n globalToLocal: function globalToLocal(pt) {\r\n var transforms = [];\r\n transforms.push(this.finalTransform);\r\n var flag = true;\r\n var comp = this.comp;\r\n\r\n while (flag) {\r\n if (comp.finalTransform) {\r\n if (comp.data.hasMask) {\r\n transforms.splice(0, 0, comp.finalTransform);\r\n }\r\n\r\n comp = comp.comp;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n\r\n var i;\r\n var len = transforms.length;\r\n var ptNew;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\r\n\r\n pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\r\n }\r\n\r\n return pt;\r\n },\r\n mHelper: new Matrix()\r\n };\r\n\r\n function MaskElement(data, element, globalData) {\r\n this.data = data;\r\n this.element = element;\r\n this.globalData = globalData;\r\n this.storedData = [];\r\n this.masksProperties = this.data.masksProperties || [];\r\n this.maskElement = null;\r\n var defs = this.globalData.defs;\r\n var i;\r\n var len = this.masksProperties ? this.masksProperties.length : 0;\r\n this.viewData = createSizedArray(len);\r\n this.solidPath = '';\r\n var path;\r\n var properties = this.masksProperties;\r\n var count = 0;\r\n var currentMasks = [];\r\n var j;\r\n var jLen;\r\n var layerId = createElementID();\r\n var rect;\r\n var expansor;\r\n var feMorph;\r\n var x;\r\n var maskType = 'clipPath';\r\n var maskRef = 'clip-path';\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\r\n maskType = 'mask';\r\n maskRef = 'mask';\r\n }\r\n\r\n if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\r\n rect = createNS('rect');\r\n rect.setAttribute('fill', '#ffffff');\r\n rect.setAttribute('width', this.element.comp.data.w || 0);\r\n rect.setAttribute('height', this.element.comp.data.h || 0);\r\n currentMasks.push(rect);\r\n } else {\r\n rect = null;\r\n }\r\n\r\n path = createNS('path');\r\n\r\n if (properties[i].mode === 'n') {\r\n // TODO move this to a factory or to a constructor\r\n this.viewData[i] = {\r\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n elem: path,\r\n lastPath: ''\r\n };\r\n defs.appendChild(path);\r\n } else {\r\n count += 1;\r\n path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n path.setAttribute('clip-rule', 'nonzero');\r\n var filterID;\r\n\r\n if (properties[i].x.k !== 0) {\r\n maskType = 'mask';\r\n maskRef = 'mask';\r\n x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\r\n filterID = createElementID();\r\n expansor = createNS('filter');\r\n expansor.setAttribute('id', filterID);\r\n feMorph = createNS('feMorphology');\r\n feMorph.setAttribute('operator', 'erode');\r\n feMorph.setAttribute('in', 'SourceGraphic');\r\n feMorph.setAttribute('radius', '0');\r\n expansor.appendChild(feMorph);\r\n defs.appendChild(expansor);\r\n path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n } else {\r\n feMorph = null;\r\n x = null;\r\n } // TODO move this to a factory or to a constructor\r\n\r\n\r\n this.storedData[i] = {\r\n elem: path,\r\n x: x,\r\n expan: feMorph,\r\n lastPath: '',\r\n lastOperator: '',\r\n filterId: filterID,\r\n lastRadius: 0\r\n };\r\n\r\n if (properties[i].mode === 'i') {\r\n jLen = currentMasks.length;\r\n var g = createNS('g');\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n g.appendChild(currentMasks[j]);\r\n }\r\n\r\n var mask = createNS('mask');\r\n mask.setAttribute('mask-type', 'alpha');\r\n mask.setAttribute('id', layerId + '_' + count);\r\n mask.appendChild(path);\r\n defs.appendChild(mask);\r\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');\r\n currentMasks.length = 0;\r\n currentMasks.push(g);\r\n } else {\r\n currentMasks.push(path);\r\n }\r\n\r\n if (properties[i].inv && !this.solidPath) {\r\n this.solidPath = this.createLayerSolidPath();\r\n } // TODO move this to a factory or to a constructor\r\n\r\n\r\n this.viewData[i] = {\r\n elem: path,\r\n lastPath: '',\r\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n invRect: rect\r\n };\r\n\r\n if (!this.viewData[i].prop.k) {\r\n this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n }\r\n }\r\n }\r\n\r\n this.maskElement = createNS(maskType);\r\n len = currentMasks.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.maskElement.appendChild(currentMasks[i]);\r\n }\r\n\r\n if (count > 0) {\r\n this.maskElement.setAttribute('id', layerId);\r\n this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');\r\n defs.appendChild(this.maskElement);\r\n }\r\n\r\n if (this.viewData.length) {\r\n this.element.addRenderableComponent(this);\r\n }\r\n }\r\n\r\n MaskElement.prototype.getMaskProperty = function (pos) {\r\n return this.viewData[pos].prop;\r\n };\r\n\r\n MaskElement.prototype.renderFrame = function (isFirstFrame) {\r\n var finalMat = this.element.finalTransform.mat;\r\n var i;\r\n var len = this.masksProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.viewData[i].prop._mdf || isFirstFrame) {\r\n this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n }\r\n\r\n if (this.viewData[i].op._mdf || isFirstFrame) {\r\n this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\r\n }\r\n\r\n if (this.masksProperties[i].mode !== 'n') {\r\n if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\r\n this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\r\n }\r\n\r\n if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\r\n var feMorph = this.storedData[i].expan;\r\n\r\n if (this.storedData[i].x.v < 0) {\r\n if (this.storedData[i].lastOperator !== 'erode') {\r\n this.storedData[i].lastOperator = 'erode';\r\n this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');\r\n }\r\n\r\n feMorph.setAttribute('radius', -this.storedData[i].x.v);\r\n } else {\r\n if (this.storedData[i].lastOperator !== 'dilate') {\r\n this.storedData[i].lastOperator = 'dilate';\r\n this.storedData[i].elem.setAttribute('filter', null);\r\n }\r\n\r\n this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n MaskElement.prototype.getMaskelement = function () {\r\n return this.maskElement;\r\n };\r\n\r\n MaskElement.prototype.createLayerSolidPath = function () {\r\n var path = 'M0,0 ';\r\n path += ' h' + this.globalData.compSize.w;\r\n path += ' v' + this.globalData.compSize.h;\r\n path += ' h-' + this.globalData.compSize.w;\r\n path += ' v-' + this.globalData.compSize.h + ' ';\r\n return path;\r\n };\r\n\r\n MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\r\n var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n var i;\r\n var len;\r\n len = pathNodes._length;\r\n\r\n for (i = 1; i < len; i += 1) {\r\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\r\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\r\n } // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\r\n\r\n\r\n if (pathNodes.c && len > 1) {\r\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n } // pathNodes.__renderedString = pathString;\r\n\r\n\r\n if (viewData.lastPath !== pathString) {\r\n var pathShapeValue = '';\r\n\r\n if (viewData.elem) {\r\n if (pathNodes.c) {\r\n pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\r\n }\r\n\r\n viewData.elem.setAttribute('d', pathShapeValue);\r\n }\r\n\r\n viewData.lastPath = pathString;\r\n }\r\n };\r\n\r\n MaskElement.prototype.destroy = function () {\r\n this.element = null;\r\n this.globalData = null;\r\n this.maskElement = null;\r\n this.data = null;\r\n this.masksProperties = null;\r\n };\r\n\r\n var filtersFactory = function () {\r\n var ob = {};\r\n ob.createFilter = createFilter;\r\n ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\r\n\r\n function createFilter(filId, skipCoordinates) {\r\n var fil = createNS('filter');\r\n fil.setAttribute('id', filId);\r\n\r\n if (skipCoordinates !== true) {\r\n fil.setAttribute('filterUnits', 'objectBoundingBox');\r\n fil.setAttribute('x', '0%');\r\n fil.setAttribute('y', '0%');\r\n fil.setAttribute('width', '100%');\r\n fil.setAttribute('height', '100%');\r\n }\r\n\r\n return fil;\r\n }\r\n\r\n function createAlphaToLuminanceFilter() {\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');\r\n return feColorMatrix;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var featureSupport = function () {\r\n var ob = {\r\n maskType: true\r\n };\r\n\r\n if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\r\n ob.maskType = false;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var registeredEffects = {};\r\n var idPrefix = 'filter_result_';\r\n\r\n function SVGEffects(elem) {\r\n var i;\r\n var source = 'SourceGraphic';\r\n var len = elem.data.ef ? elem.data.ef.length : 0;\r\n var filId = createElementID();\r\n var fil = filtersFactory.createFilter(filId, true);\r\n var count = 0;\r\n this.filters = [];\r\n var filterManager;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n filterManager = null;\r\n var type = elem.data.ef[i].ty;\r\n\r\n if (registeredEffects[type]) {\r\n var Effect = registeredEffects[type].effect;\r\n filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source);\r\n source = idPrefix + count;\r\n\r\n if (registeredEffects[type].countsAsEffect) {\r\n count += 1;\r\n }\r\n }\r\n\r\n if (filterManager) {\r\n this.filters.push(filterManager);\r\n }\r\n }\r\n\r\n if (count) {\r\n elem.globalData.defs.appendChild(fil);\r\n elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n }\r\n\r\n if (this.filters.length) {\r\n elem.addRenderableComponent(this);\r\n }\r\n }\r\n\r\n SVGEffects.prototype.renderFrame = function (_isFirstFrame) {\r\n var i;\r\n var len = this.filters.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.filters[i].renderFrame(_isFirstFrame);\r\n }\r\n };\r\n\r\n function registerEffect(id, effect, countsAsEffect) {\r\n registeredEffects[id] = {\r\n effect: effect,\r\n countsAsEffect: countsAsEffect\r\n };\r\n }\r\n\r\n function SVGBaseElement() {}\r\n\r\n SVGBaseElement.prototype = {\r\n initRendererElement: function initRendererElement() {\r\n this.layerElement = createNS('g');\r\n },\r\n createContainerElements: function createContainerElements() {\r\n this.matteElement = createNS('g');\r\n this.transformedElement = this.layerElement;\r\n this.maskedElement = this.layerElement;\r\n this._sizeChanged = false;\r\n var layerElementParent = null; // If this layer acts as a mask for the following layer\r\n\r\n if (this.data.td) {\r\n this.matteMasks = {};\r\n var symbolElement = createNS('symbol');\r\n symbolElement.setAttribute('id', this.layerId);\r\n var gg = createNS('g');\r\n gg.appendChild(this.layerElement);\r\n symbolElement.appendChild(gg);\r\n layerElementParent = gg;\r\n this.globalData.defs.appendChild(symbolElement);\r\n } else if (this.data.tt) {\r\n this.matteElement.appendChild(this.layerElement);\r\n layerElementParent = this.matteElement;\r\n this.baseElement = this.matteElement;\r\n } else {\r\n this.baseElement = this.layerElement;\r\n }\r\n\r\n if (this.data.ln) {\r\n this.layerElement.setAttribute('id', this.data.ln);\r\n }\r\n\r\n if (this.data.cl) {\r\n this.layerElement.setAttribute('class', this.data.cl);\r\n } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\r\n\r\n\r\n if (this.data.ty === 0 && !this.data.hd) {\r\n var cp = createNS('clipPath');\r\n var pt = createNS('path');\r\n pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\r\n var clipId = createElementID();\r\n cp.setAttribute('id', clipId);\r\n cp.appendChild(pt);\r\n this.globalData.defs.appendChild(cp);\r\n\r\n if (this.checkMasks()) {\r\n var cpGroup = createNS('g');\r\n cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\r\n cpGroup.appendChild(this.layerElement);\r\n this.transformedElement = cpGroup;\r\n\r\n if (layerElementParent) {\r\n layerElementParent.appendChild(this.transformedElement);\r\n } else {\r\n this.baseElement = this.transformedElement;\r\n }\r\n } else {\r\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\r\n }\r\n }\r\n\r\n if (this.data.bm !== 0) {\r\n this.setBlendMode();\r\n }\r\n },\r\n renderElement: function renderElement() {\r\n if (this.finalTransform._matMdf) {\r\n this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());\r\n }\r\n\r\n if (this.finalTransform._opMdf) {\r\n this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);\r\n }\r\n },\r\n destroyBaseElement: function destroyBaseElement() {\r\n this.layerElement = null;\r\n this.matteElement = null;\r\n this.maskManager.destroy();\r\n },\r\n getBaseElement: function getBaseElement() {\r\n if (this.data.hd) {\r\n return null;\r\n }\r\n\r\n return this.baseElement;\r\n },\r\n createRenderableComponents: function createRenderableComponents() {\r\n this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n this.renderableEffectsManager = new SVGEffects(this);\r\n },\r\n getMatte: function getMatte(matteType) {\r\n if (!this.matteMasks[matteType]) {\r\n var id = this.layerId + '_' + matteType;\r\n var filId;\r\n var fil;\r\n var useElement;\r\n var gg;\r\n\r\n if (matteType === 1 || matteType === 3) {\r\n var masker = createNS('mask');\r\n masker.setAttribute('id', id);\r\n masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha');\r\n useElement = createNS('use');\r\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\r\n masker.appendChild(useElement);\r\n this.globalData.defs.appendChild(masker);\r\n\r\n if (!featureSupport.maskType && matteType === 1) {\r\n masker.setAttribute('mask-type', 'luminance');\r\n filId = createElementID();\r\n fil = filtersFactory.createFilter(filId);\r\n this.globalData.defs.appendChild(fil);\r\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n gg = createNS('g');\r\n gg.appendChild(useElement);\r\n masker.appendChild(gg);\r\n gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n }\r\n } else if (matteType === 2) {\r\n var maskGroup = createNS('mask');\r\n maskGroup.setAttribute('id', id);\r\n maskGroup.setAttribute('mask-type', 'alpha');\r\n var maskGrouper = createNS('g');\r\n maskGroup.appendChild(maskGrouper);\r\n filId = createElementID();\r\n fil = filtersFactory.createFilter(filId); /// /\r\n\r\n var feCTr = createNS('feComponentTransfer');\r\n feCTr.setAttribute('in', 'SourceGraphic');\r\n fil.appendChild(feCTr);\r\n var feFunc = createNS('feFuncA');\r\n feFunc.setAttribute('type', 'table');\r\n feFunc.setAttribute('tableValues', '1.0 0.0');\r\n feCTr.appendChild(feFunc); /// /\r\n\r\n this.globalData.defs.appendChild(fil);\r\n var alphaRect = createNS('rect');\r\n alphaRect.setAttribute('width', this.comp.data.w);\r\n alphaRect.setAttribute('height', this.comp.data.h);\r\n alphaRect.setAttribute('x', '0');\r\n alphaRect.setAttribute('y', '0');\r\n alphaRect.setAttribute('fill', '#ffffff');\r\n alphaRect.setAttribute('opacity', '0');\r\n maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n maskGrouper.appendChild(alphaRect);\r\n useElement = createNS('use');\r\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\r\n maskGrouper.appendChild(useElement);\r\n\r\n if (!featureSupport.maskType) {\r\n maskGroup.setAttribute('mask-type', 'luminance');\r\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n gg = createNS('g');\r\n maskGrouper.appendChild(alphaRect);\r\n gg.appendChild(this.layerElement);\r\n maskGrouper.appendChild(gg);\r\n }\r\n\r\n this.globalData.defs.appendChild(maskGroup);\r\n }\r\n\r\n this.matteMasks[matteType] = id;\r\n }\r\n\r\n return this.matteMasks[matteType];\r\n },\r\n setMatte: function setMatte(id) {\r\n if (!this.matteElement) {\r\n return;\r\n }\r\n\r\n this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\r\n }\r\n };\r\n\r\n /**\r\n * @file\r\n * Handles AE's layer parenting property.\r\n *\r\n */\r\n function HierarchyElement() {}\r\n\r\n HierarchyElement.prototype = {\r\n /**\r\n * @function\r\n * Initializes hierarchy properties\r\n *\r\n */\r\n initHierarchy: function initHierarchy() {\r\n // element's parent list\r\n this.hierarchy = []; // if element is parent of another layer _isParent will be true\r\n\r\n this._isParent = false;\r\n this.checkParenting();\r\n },\r\n\r\n /**\r\n * @function\r\n * Sets layer's hierarchy.\r\n * @param {array} hierarch\r\n * layer's parent list\r\n *\r\n */\r\n setHierarchy: function setHierarchy(hierarchy) {\r\n this.hierarchy = hierarchy;\r\n },\r\n\r\n /**\r\n * @function\r\n * Sets layer as parent.\r\n *\r\n */\r\n setAsParent: function setAsParent() {\r\n this._isParent = true;\r\n },\r\n\r\n /**\r\n * @function\r\n * Searches layer's parenting chain\r\n *\r\n */\r\n checkParenting: function checkParenting() {\r\n if (this.data.parent !== undefined) {\r\n this.comp.buildElementParenting(this, this.data.parent, []);\r\n }\r\n }\r\n };\r\n\r\n function RenderableDOMElement() {}\r\n\r\n (function () {\r\n var _prototype = {\r\n initElement: function initElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n this.initRenderable();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n this.createContent();\r\n this.hide();\r\n },\r\n hide: function hide() {\r\n // console.log('HIDE', this);\r\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style.display = 'none';\r\n this.hidden = true;\r\n }\r\n },\r\n show: function show() {\r\n // console.log('SHOW', this);\r\n if (this.isInRange && !this.isTransparent) {\r\n if (!this.data.hd) {\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style.display = 'block';\r\n }\r\n\r\n this.hidden = false;\r\n this._isFirstFrame = true;\r\n }\r\n },\r\n renderFrame: function renderFrame() {\r\n // If it is exported as hidden (data.hd === true) no need to render\r\n // If it is not visible no need to render\r\n if (this.data.hd || this.hidden) {\r\n return;\r\n }\r\n\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.renderElement();\r\n this.renderInnerContent();\r\n\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n renderInnerContent: function renderInnerContent() {},\r\n prepareFrame: function prepareFrame(num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n this.checkTransparency();\r\n },\r\n destroy: function destroy() {\r\n this.innerElem = null;\r\n this.destroyBaseElement();\r\n }\r\n };\r\n extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\r\n })();\r\n\r\n function IImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initElement(data, globalData, comp);\r\n this.sourceRect = {\r\n top: 0,\r\n left: 0,\r\n width: this.assetData.w,\r\n height: this.assetData.h\r\n };\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\r\n\r\n IImageElement.prototype.createContent = function () {\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n this.innerElem = createNS('image');\r\n this.innerElem.setAttribute('width', this.assetData.w + 'px');\r\n this.innerElem.setAttribute('height', this.assetData.h + 'px');\r\n this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\r\n this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n this.layerElement.appendChild(this.innerElem);\r\n };\r\n\r\n IImageElement.prototype.sourceRectAtTime = function () {\r\n return this.sourceRect;\r\n };\r\n\r\n function ProcessedElement(element, position) {\r\n this.elem = element;\r\n this.pos = position;\r\n }\r\n\r\n function IShapeElement() {}\r\n\r\n IShapeElement.prototype = {\r\n addShapeToModifiers: function addShapeToModifiers(data) {\r\n var i;\r\n var len = this.shapeModifiers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.shapeModifiers[i].addShape(data);\r\n }\r\n },\r\n isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {\r\n var i = 0;\r\n var len = this.shapeModifiers.length;\r\n\r\n while (i < len) {\r\n if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n renderModifiers: function renderModifiers() {\r\n if (!this.shapeModifiers.length) {\r\n return;\r\n }\r\n\r\n var i;\r\n var len = this.shapes.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.shapes[i].sh.reset();\r\n }\r\n\r\n len = this.shapeModifiers.length;\r\n var shouldBreakProcess;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice\r\n // TODO: find a better solution for this\r\n\r\n if (shouldBreakProcess) {\r\n break;\r\n }\r\n }\r\n },\r\n searchProcessedElement: function searchProcessedElement(elem) {\r\n var elements = this.processedElements;\r\n var i = 0;\r\n var len = elements.length;\r\n\r\n while (i < len) {\r\n if (elements[i].elem === elem) {\r\n return elements[i].pos;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return 0;\r\n },\r\n addProcessedElement: function addProcessedElement(elem, pos) {\r\n var elements = this.processedElements;\r\n var i = elements.length;\r\n\r\n while (i) {\r\n i -= 1;\r\n\r\n if (elements[i].elem === elem) {\r\n elements[i].pos = pos;\r\n return;\r\n }\r\n }\r\n\r\n elements.push(new ProcessedElement(elem, pos));\r\n },\r\n prepareFrame: function prepareFrame(num) {\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n }\r\n };\r\n\r\n var lineCapEnum = {\r\n 1: 'butt',\r\n 2: 'round',\r\n 3: 'square'\r\n };\r\n var lineJoinEnum = {\r\n 1: 'miter',\r\n 2: 'round',\r\n 3: 'bevel'\r\n };\r\n\r\n function SVGShapeData(transformers, level, shape) {\r\n this.caches = [];\r\n this.styles = [];\r\n this.transformers = transformers;\r\n this.lStr = '';\r\n this.sh = shape;\r\n this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.\r\n // For now, since shapes add up with other shapes. They have to be calculated every time.\r\n // One way of finding out is checking if all styles associated to this shape depend only of this shape\r\n\r\n this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated\r\n\r\n var i = 0;\r\n var len = transformers.length;\r\n\r\n while (i < len) {\r\n if (transformers[i].mProps.dynamicProperties.length) {\r\n this._isAnimated = true;\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n SVGShapeData.prototype.setAsAnimated = function () {\r\n this._isAnimated = true;\r\n };\r\n\r\n function SVGStyleData(data, level) {\r\n this.data = data;\r\n this.type = data.ty;\r\n this.d = '';\r\n this.lvl = level;\r\n this._mdf = false;\r\n this.closed = data.hd === true;\r\n this.pElem = createNS('path');\r\n this.msElem = null;\r\n }\r\n\r\n SVGStyleData.prototype.reset = function () {\r\n this.d = '';\r\n this._mdf = false;\r\n };\r\n\r\n function DashProperty(elem, data, renderer, container) {\r\n this.elem = elem;\r\n this.frameId = -1;\r\n this.dataProps = createSizedArray(data.length);\r\n this.renderer = renderer;\r\n this.k = false;\r\n this.dashStr = '';\r\n this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\r\n this.dashoffset = createTypedArray('float32', 1);\r\n this.initDynamicPropertyContainer(container);\r\n var i;\r\n var len = data.length || 0;\r\n var prop;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\r\n this.k = prop.k || this.k;\r\n this.dataProps[i] = {\r\n n: data[i].n,\r\n p: prop\r\n };\r\n }\r\n\r\n if (!this.k) {\r\n this.getValue(true);\r\n }\r\n\r\n this._isAnimated = this.k;\r\n }\r\n\r\n DashProperty.prototype.getValue = function (forceRender) {\r\n if (this.elem.globalData.frameId === this.frameId && !forceRender) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n this._mdf = this._mdf || forceRender;\r\n\r\n if (this._mdf) {\r\n var i = 0;\r\n var len = this.dataProps.length;\r\n\r\n if (this.renderer === 'svg') {\r\n this.dashStr = '';\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.dataProps[i].n !== 'o') {\r\n if (this.renderer === 'svg') {\r\n this.dashStr += ' ' + this.dataProps[i].p.v;\r\n } else {\r\n this.dashArray[i] = this.dataProps[i].p.v;\r\n }\r\n } else {\r\n this.dashoffset[0] = this.dataProps[i].p.v;\r\n }\r\n }\r\n }\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], DashProperty);\r\n\r\n function SVGStrokeStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n this.style = styleOb;\r\n this._isAnimated = !!this._isAnimated;\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\r\n\r\n function SVGFillStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n this.style = styleOb;\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGFillStyleData);\r\n\r\n function SVGNoStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.style = styleOb;\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGNoStyleData);\r\n\r\n function GradientProperty(elem, data, container) {\r\n this.data = data;\r\n this.c = createTypedArray('uint8c', data.p * 4);\r\n var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;\r\n this.o = createTypedArray('float32', cLength);\r\n this._cmdf = false;\r\n this._omdf = false;\r\n this._collapsable = this.checkCollapsable();\r\n this._hasOpacity = cLength;\r\n this.initDynamicPropertyContainer(container);\r\n this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\r\n this.k = this.prop.k;\r\n this.getValue(true);\r\n }\r\n\r\n GradientProperty.prototype.comparePoints = function (values, points) {\r\n var i = 0;\r\n var len = this.o.length / 2;\r\n var diff;\r\n\r\n while (i < len) {\r\n diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\r\n\r\n if (diff > 0.01) {\r\n return false;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n GradientProperty.prototype.checkCollapsable = function () {\r\n if (this.o.length / 2 !== this.c.length / 4) {\r\n return false;\r\n }\r\n\r\n if (this.data.k.k[0].s) {\r\n var i = 0;\r\n var len = this.data.k.k.length;\r\n\r\n while (i < len) {\r\n if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\r\n return false;\r\n }\r\n\r\n i += 1;\r\n }\r\n } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n GradientProperty.prototype.getValue = function (forceRender) {\r\n this.prop.getValue();\r\n this._mdf = false;\r\n this._cmdf = false;\r\n this._omdf = false;\r\n\r\n if (this.prop._mdf || forceRender) {\r\n var i;\r\n var len = this.data.p * 4;\r\n var mult;\r\n var val;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n mult = i % 4 === 0 ? 100 : 255;\r\n val = Math.round(this.prop.v[i] * mult);\r\n\r\n if (this.c[i] !== val) {\r\n this.c[i] = val;\r\n this._cmdf = !forceRender;\r\n }\r\n }\r\n\r\n if (this.o.length) {\r\n len = this.prop.v.length;\r\n\r\n for (i = this.data.p * 4; i < len; i += 1) {\r\n mult = i % 2 === 0 ? 100 : 1;\r\n val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\r\n\r\n if (this.o[i - this.data.p * 4] !== val) {\r\n this.o[i - this.data.p * 4] = val;\r\n this._omdf = !forceRender;\r\n }\r\n }\r\n }\r\n\r\n this._mdf = !forceRender;\r\n }\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], GradientProperty);\r\n\r\n function SVGGradientFillStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.initGradientData(elem, data, styleOb);\r\n }\r\n\r\n SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\r\n this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\r\n this.h = PropertyFactory.getProp(elem, data.h || {\r\n k: 0\r\n }, 0, 0.01, this);\r\n this.a = PropertyFactory.getProp(elem, data.a || {\r\n k: 0\r\n }, 0, degToRads, this);\r\n this.g = new GradientProperty(elem, data.g, this);\r\n this.style = styleOb;\r\n this.stops = [];\r\n this.setGradientData(styleOb.pElem, data);\r\n this.setGradientOpacity(data, styleOb);\r\n this._isAnimated = !!this._isAnimated;\r\n };\r\n\r\n SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\r\n var gradientId = createElementID();\r\n var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n gfill.setAttribute('id', gradientId);\r\n gfill.setAttribute('spreadMethod', 'pad');\r\n gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n var stops = [];\r\n var stop;\r\n var j;\r\n var jLen;\r\n jLen = data.g.p * 4;\r\n\r\n for (j = 0; j < jLen; j += 4) {\r\n stop = createNS('stop');\r\n gfill.appendChild(stop);\r\n stops.push(stop);\r\n }\r\n\r\n pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');\r\n this.gf = gfill;\r\n this.cst = stops;\r\n };\r\n\r\n SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\r\n if (this.g._hasOpacity && !this.g._collapsable) {\r\n var stop;\r\n var j;\r\n var jLen;\r\n var mask = createNS('mask');\r\n var maskElement = createNS('path');\r\n mask.appendChild(maskElement);\r\n var opacityId = createElementID();\r\n var maskId = createElementID();\r\n mask.setAttribute('id', maskId);\r\n var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n opFill.setAttribute('id', opacityId);\r\n opFill.setAttribute('spreadMethod', 'pad');\r\n opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\r\n var stops = this.stops;\r\n\r\n for (j = data.g.p * 4; j < jLen; j += 2) {\r\n stop = createNS('stop');\r\n stop.setAttribute('stop-color', 'rgb(255,255,255)');\r\n opFill.appendChild(stop);\r\n stops.push(stop);\r\n }\r\n\r\n maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');\r\n\r\n if (data.ty === 'gs') {\r\n maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n\r\n if (data.lj === 1) {\r\n maskElement.setAttribute('stroke-miterlimit', data.ml);\r\n }\r\n }\r\n\r\n this.of = opFill;\r\n this.ms = mask;\r\n this.ost = stops;\r\n this.maskId = maskId;\r\n styleOb.msElem = maskElement;\r\n }\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\r\n\r\n function SVGGradientStrokeStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n this.initGradientData(elem, data, styleOb);\r\n this._isAnimated = !!this._isAnimated;\r\n }\r\n\r\n extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\r\n\r\n function ShapeGroupData() {\r\n this.it = [];\r\n this.prevViewData = [];\r\n this.gr = createNS('g');\r\n }\r\n\r\n function SVGTransformData(mProps, op, container) {\r\n this.transform = {\r\n mProps: mProps,\r\n op: op,\r\n container: container\r\n };\r\n this.elements = [];\r\n this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\r\n }\r\n\r\n var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {\r\n if (length === 0) {\r\n return '';\r\n }\r\n\r\n var _o = pathNodes.o;\r\n var _i = pathNodes.i;\r\n var _v = pathNodes.v;\r\n var i;\r\n var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n\r\n for (i = 1; i < length; i += 1) {\r\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\r\n }\r\n\r\n if (closed && length) {\r\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n shapeString += 'z';\r\n }\r\n\r\n return shapeString;\r\n };\r\n\r\n var SVGElementsRenderer = function () {\r\n var _identityMatrix = new Matrix();\r\n\r\n var _matrixHelper = new Matrix();\r\n\r\n var ob = {\r\n createRenderFunction: createRenderFunction\r\n };\r\n\r\n function createRenderFunction(data) {\r\n switch (data.ty) {\r\n case 'fl':\r\n return renderFill;\r\n\r\n case 'gf':\r\n return renderGradient;\r\n\r\n case 'gs':\r\n return renderGradientStroke;\r\n\r\n case 'st':\r\n return renderStroke;\r\n\r\n case 'sh':\r\n case 'el':\r\n case 'rc':\r\n case 'sr':\r\n return renderPath;\r\n\r\n case 'tr':\r\n return renderContentTransform;\r\n\r\n case 'no':\r\n return renderNoop;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n function renderContentTransform(styleData, itemData, isFirstFrame) {\r\n if (isFirstFrame || itemData.transform.op._mdf) {\r\n itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\r\n }\r\n\r\n if (isFirstFrame || itemData.transform.mProps._mdf) {\r\n itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\r\n }\r\n }\r\n\r\n function renderNoop() {}\r\n\r\n function renderPath(styleData, itemData, isFirstFrame) {\r\n var j;\r\n var jLen;\r\n var pathStringTransformed;\r\n var redraw;\r\n var pathNodes;\r\n var l;\r\n var lLen = itemData.styles.length;\r\n var lvl = itemData.lvl;\r\n var paths;\r\n var mat;\r\n var props;\r\n var iterations;\r\n var k;\r\n\r\n for (l = 0; l < lLen; l += 1) {\r\n redraw = itemData.sh._mdf || isFirstFrame;\r\n\r\n if (itemData.styles[l].lvl < lvl) {\r\n mat = _matrixHelper.reset();\r\n iterations = lvl - itemData.styles[l].lvl;\r\n k = itemData.transformers.length - 1;\r\n\r\n while (!redraw && iterations > 0) {\r\n redraw = itemData.transformers[k].mProps._mdf || redraw;\r\n iterations -= 1;\r\n k -= 1;\r\n }\r\n\r\n if (redraw) {\r\n iterations = lvl - itemData.styles[l].lvl;\r\n k = itemData.transformers.length - 1;\r\n\r\n while (iterations > 0) {\r\n props = itemData.transformers[k].mProps.v.props;\r\n mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n iterations -= 1;\r\n k -= 1;\r\n }\r\n }\r\n } else {\r\n mat = _identityMatrix;\r\n }\r\n\r\n paths = itemData.sh.paths;\r\n jLen = paths._length;\r\n\r\n if (redraw) {\r\n pathStringTransformed = '';\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathNodes = paths.shapes[j];\r\n\r\n if (pathNodes && pathNodes._length) {\r\n pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\r\n }\r\n }\r\n\r\n itemData.caches[l] = pathStringTransformed;\r\n } else {\r\n pathStringTransformed = itemData.caches[l];\r\n }\r\n\r\n itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\r\n itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\r\n }\r\n }\r\n\r\n function renderFill(styleData, itemData, isFirstFrame) {\r\n var styleElem = itemData.style;\r\n\r\n if (itemData.c._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n }\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\r\n }\r\n }\r\n\r\n function renderGradientStroke(styleData, itemData, isFirstFrame) {\r\n renderGradient(styleData, itemData, isFirstFrame);\r\n renderStroke(styleData, itemData, isFirstFrame);\r\n }\r\n\r\n function renderGradient(styleData, itemData, isFirstFrame) {\r\n var gfill = itemData.gf;\r\n var hasOpacity = itemData.g._hasOpacity;\r\n var pt1 = itemData.s.v;\r\n var pt2 = itemData.e.v;\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\r\n itemData.style.pElem.setAttribute(attr, itemData.o.v);\r\n }\r\n\r\n if (itemData.s._mdf || isFirstFrame) {\r\n var attr1 = styleData.t === 1 ? 'x1' : 'cx';\r\n var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\r\n gfill.setAttribute(attr1, pt1[0]);\r\n gfill.setAttribute(attr2, pt1[1]);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute(attr1, pt1[0]);\r\n itemData.of.setAttribute(attr2, pt1[1]);\r\n }\r\n }\r\n\r\n var stops;\r\n var i;\r\n var len;\r\n var stop;\r\n\r\n if (itemData.g._cmdf || isFirstFrame) {\r\n stops = itemData.cst;\r\n var cValues = itemData.g.c;\r\n len = stops.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n stop = stops[i];\r\n stop.setAttribute('offset', cValues[i * 4] + '%');\r\n stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\r\n }\r\n }\r\n\r\n if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\r\n var oValues = itemData.g.o;\r\n\r\n if (itemData.g._collapsable) {\r\n stops = itemData.cst;\r\n } else {\r\n stops = itemData.ost;\r\n }\r\n\r\n len = stops.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n stop = stops[i];\r\n\r\n if (!itemData.g._collapsable) {\r\n stop.setAttribute('offset', oValues[i * 2] + '%');\r\n }\r\n\r\n stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\r\n }\r\n }\r\n\r\n if (styleData.t === 1) {\r\n if (itemData.e._mdf || isFirstFrame) {\r\n gfill.setAttribute('x2', pt2[0]);\r\n gfill.setAttribute('y2', pt2[1]);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('x2', pt2[0]);\r\n itemData.of.setAttribute('y2', pt2[1]);\r\n }\r\n }\r\n } else {\r\n var rad;\r\n\r\n if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\r\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n gfill.setAttribute('r', rad);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('r', rad);\r\n }\r\n }\r\n\r\n if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\r\n if (!rad) {\r\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n }\r\n\r\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n var percent = itemData.h.v;\r\n\r\n if (percent >= 1) {\r\n percent = 0.99;\r\n } else if (percent <= -1) {\r\n percent = -0.99;\r\n }\r\n\r\n var dist = rad * percent;\r\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n gfill.setAttribute('fx', x);\r\n gfill.setAttribute('fy', y);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('fx', x);\r\n itemData.of.setAttribute('fy', y);\r\n }\r\n } // gfill.setAttribute('fy','200');\r\n\r\n }\r\n }\r\n\r\n function renderStroke(styleData, itemData, isFirstFrame) {\r\n var styleElem = itemData.style;\r\n var d = itemData.d;\r\n\r\n if (d && (d._mdf || isFirstFrame) && d.dashStr) {\r\n styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\r\n styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\r\n }\r\n\r\n if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\r\n styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n }\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\r\n }\r\n\r\n if (itemData.w._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\r\n\r\n if (styleElem.msElem) {\r\n styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\r\n }\r\n }\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n function SVGShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = []; // Full shape data\r\n\r\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\r\n\r\n this.stylesList = []; // List of modifiers that will be applied to shapes\r\n\r\n this.shapeModifiers = []; // List of items in shape tree\r\n\r\n this.itemsData = []; // List of items in previous shape tree\r\n\r\n this.processedElements = []; // List of animated components\r\n\r\n this.animatedContents = [];\r\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n\r\n this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\r\n\r\n SVGShapeElement.prototype.initSecondaryElement = function () {};\r\n\r\n SVGShapeElement.prototype.identityMatrix = new Matrix();\r\n\r\n SVGShapeElement.prototype.buildExpressionInterface = function () {};\r\n\r\n SVGShapeElement.prototype.createContent = function () {\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n this.filterUniqueShapes();\r\n };\r\n /*\r\n This method searches for multiple shapes that affect a single element and one of them is animated\r\n */\r\n\r\n\r\n SVGShapeElement.prototype.filterUniqueShapes = function () {\r\n var i;\r\n var len = this.shapes.length;\r\n var shape;\r\n var j;\r\n var jLen = this.stylesList.length;\r\n var style;\r\n var tempShapes = [];\r\n var areAnimated = false;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n style = this.stylesList[j];\r\n areAnimated = false;\r\n tempShapes.length = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shape = this.shapes[i];\r\n\r\n if (shape.styles.indexOf(style) !== -1) {\r\n tempShapes.push(shape);\r\n areAnimated = shape._isAnimated || areAnimated;\r\n }\r\n }\r\n\r\n if (tempShapes.length > 1 && areAnimated) {\r\n this.setShapesAsAnimated(tempShapes);\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\r\n var i;\r\n var len = shapes.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapes[i].setAsAnimated();\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.createStyleElement = function (data, level) {\r\n // TODO: prevent drawing of hidden styles\r\n var elementData;\r\n var styleOb = new SVGStyleData(data, level);\r\n var pathElement = styleOb.pElem;\r\n\r\n if (data.ty === 'st') {\r\n elementData = new SVGStrokeStyleData(this, data, styleOb);\r\n } else if (data.ty === 'fl') {\r\n elementData = new SVGFillStyleData(this, data, styleOb);\r\n } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\r\n elementData = new GradientConstructor(this, data, styleOb);\r\n this.globalData.defs.appendChild(elementData.gf);\r\n\r\n if (elementData.maskId) {\r\n this.globalData.defs.appendChild(elementData.ms);\r\n this.globalData.defs.appendChild(elementData.of);\r\n pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');\r\n }\r\n } else if (data.ty === 'no') {\r\n elementData = new SVGNoStyleData(this, data, styleOb);\r\n }\r\n\r\n if (data.ty === 'st' || data.ty === 'gs') {\r\n pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n pathElement.setAttribute('fill-opacity', '0');\r\n\r\n if (data.lj === 1) {\r\n pathElement.setAttribute('stroke-miterlimit', data.ml);\r\n }\r\n }\r\n\r\n if (data.r === 2) {\r\n pathElement.setAttribute('fill-rule', 'evenodd');\r\n }\r\n\r\n if (data.ln) {\r\n pathElement.setAttribute('id', data.ln);\r\n }\r\n\r\n if (data.cl) {\r\n pathElement.setAttribute('class', data.cl);\r\n }\r\n\r\n if (data.bm) {\r\n pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n }\r\n\r\n this.stylesList.push(styleOb);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.createGroupElement = function (data) {\r\n var elementData = new ShapeGroupData();\r\n\r\n if (data.ln) {\r\n elementData.gr.setAttribute('id', data.ln);\r\n }\r\n\r\n if (data.cl) {\r\n elementData.gr.setAttribute('class', data.cl);\r\n }\r\n\r\n if (data.bm) {\r\n elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n }\r\n\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.createTransformElement = function (data, container) {\r\n var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\r\n var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\r\n var ty = 4;\r\n\r\n if (data.ty === 'rc') {\r\n ty = 5;\r\n } else if (data.ty === 'el') {\r\n ty = 6;\r\n } else if (data.ty === 'sr') {\r\n ty = 7;\r\n }\r\n\r\n var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\r\n var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\r\n this.shapes.push(elementData);\r\n this.addShapeToModifiers(elementData);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\r\n var i = 0;\r\n var len = this.animatedContents.length;\r\n\r\n while (i < len) {\r\n if (this.animatedContents[i].element === element) {\r\n return;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n this.animatedContents.push({\r\n fn: SVGElementsRenderer.createRenderFunction(data),\r\n element: element,\r\n data: data\r\n });\r\n };\r\n\r\n SVGShapeElement.prototype.setElementStyles = function (elementData) {\r\n var arr = elementData.styles;\r\n var j;\r\n var jLen = this.stylesList.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (!this.stylesList[j].closed) {\r\n arr.push(this.stylesList[j]);\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.reloadShapes = function () {\r\n this._isFirstFrame = true;\r\n var i;\r\n var len = this.itemsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.prevViewData[i] = this.itemsData[i];\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n this.filterUniqueShapes();\r\n len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n }\r\n\r\n this.renderModifiers();\r\n };\r\n\r\n SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\r\n var ownTransformers = [].concat(transformers);\r\n var i;\r\n var len = arr.length - 1;\r\n var j;\r\n var jLen;\r\n var ownStyles = [];\r\n var ownModifiers = [];\r\n var currentTransform;\r\n var modifier;\r\n var processedPos;\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n processedPos = this.searchProcessedElement(arr[i]);\r\n\r\n if (!processedPos) {\r\n arr[i]._render = render;\r\n } else {\r\n itemsData[i] = prevViewData[processedPos - 1];\r\n }\r\n\r\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createStyleElement(arr[i], level);\r\n } else {\r\n itemsData[i].style.closed = false;\r\n }\r\n\r\n if (arr[i]._render) {\r\n if (itemsData[i].style.pElem.parentNode !== container) {\r\n container.appendChild(itemsData[i].style.pElem);\r\n }\r\n }\r\n\r\n ownStyles.push(itemsData[i].style);\r\n } else if (arr[i].ty === 'gr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createGroupElement(arr[i]);\r\n } else {\r\n jLen = itemsData[i].it.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n }\r\n }\r\n\r\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\r\n\r\n if (arr[i]._render) {\r\n if (itemsData[i].gr.parentNode !== container) {\r\n container.appendChild(itemsData[i].gr);\r\n }\r\n }\r\n } else if (arr[i].ty === 'tr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createTransformElement(arr[i], container);\r\n }\r\n\r\n currentTransform = itemsData[i].transform;\r\n ownTransformers.push(currentTransform);\r\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\r\n }\r\n\r\n this.setElementStyles(itemsData[i]);\r\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n modifier.init(this, arr[i]);\r\n itemsData[i] = modifier;\r\n this.shapeModifiers.push(modifier);\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = false;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n } else if (arr[i].ty === 'rp') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n itemsData[i] = modifier;\r\n modifier.init(this, arr, i, itemsData);\r\n this.shapeModifiers.push(modifier);\r\n render = false;\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = true;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n }\r\n\r\n this.addProcessedElement(arr[i], i + 1);\r\n }\r\n\r\n len = ownStyles.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ownStyles[i].closed = true;\r\n }\r\n\r\n len = ownModifiers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ownModifiers[i].closed = true;\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.renderInnerContent = function () {\r\n this.renderModifiers();\r\n var i;\r\n var len = this.stylesList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.stylesList[i].reset();\r\n }\r\n\r\n this.renderShape();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.stylesList[i]._mdf || this._isFirstFrame) {\r\n if (this.stylesList[i].msElem) {\r\n this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers\r\n\r\n this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\r\n }\r\n\r\n this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.renderShape = function () {\r\n var i;\r\n var len = this.animatedContents.length;\r\n var animatedContent;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n animatedContent = this.animatedContents[i];\r\n\r\n if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\r\n animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.destroy = function () {\r\n this.destroyBaseElement();\r\n this.shapesData = null;\r\n this.itemsData = null;\r\n };\r\n\r\n function LetterProps(o, sw, sc, fc, m, p) {\r\n this.o = o;\r\n this.sw = sw;\r\n this.sc = sc;\r\n this.fc = fc;\r\n this.m = m;\r\n this.p = p;\r\n this._mdf = {\r\n o: true,\r\n sw: !!sw,\r\n sc: !!sc,\r\n fc: !!fc,\r\n m: true,\r\n p: true\r\n };\r\n }\r\n\r\n LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\r\n this._mdf.o = false;\r\n this._mdf.sw = false;\r\n this._mdf.sc = false;\r\n this._mdf.fc = false;\r\n this._mdf.m = false;\r\n this._mdf.p = false;\r\n var updated = false;\r\n\r\n if (this.o !== o) {\r\n this.o = o;\r\n this._mdf.o = true;\r\n updated = true;\r\n }\r\n\r\n if (this.sw !== sw) {\r\n this.sw = sw;\r\n this._mdf.sw = true;\r\n updated = true;\r\n }\r\n\r\n if (this.sc !== sc) {\r\n this.sc = sc;\r\n this._mdf.sc = true;\r\n updated = true;\r\n }\r\n\r\n if (this.fc !== fc) {\r\n this.fc = fc;\r\n this._mdf.fc = true;\r\n updated = true;\r\n }\r\n\r\n if (this.m !== m) {\r\n this.m = m;\r\n this._mdf.m = true;\r\n updated = true;\r\n }\r\n\r\n if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\r\n this.p = p;\r\n this._mdf.p = true;\r\n updated = true;\r\n }\r\n\r\n return updated;\r\n };\r\n\r\n function TextProperty(elem, data) {\r\n this._frameId = initialDefaultFrame;\r\n this.pv = '';\r\n this.v = '';\r\n this.kf = false;\r\n this._isFirstFrame = true;\r\n this._mdf = false;\r\n this.data = data;\r\n this.elem = elem;\r\n this.comp = this.elem.comp;\r\n this.keysIndex = 0;\r\n this.canResize = false;\r\n this.minimumFontSize = 1;\r\n this.effectsSequence = [];\r\n this.currentData = {\r\n ascent: 0,\r\n boxWidth: this.defaultBoxWidth,\r\n f: '',\r\n fStyle: '',\r\n fWeight: '',\r\n fc: '',\r\n j: '',\r\n justifyOffset: '',\r\n l: [],\r\n lh: 0,\r\n lineWidths: [],\r\n ls: '',\r\n of: '',\r\n s: '',\r\n sc: '',\r\n sw: 0,\r\n t: 0,\r\n tr: 0,\r\n sz: 0,\r\n ps: null,\r\n fillColorAnim: false,\r\n strokeColorAnim: false,\r\n strokeWidthAnim: false,\r\n yOffset: 0,\r\n finalSize: 0,\r\n finalText: [],\r\n finalLineHeight: 0,\r\n __complete: false\r\n };\r\n this.copyData(this.currentData, this.data.d.k[0].s);\r\n\r\n if (!this.searchProperty()) {\r\n this.completeTextData(this.currentData);\r\n }\r\n }\r\n\r\n TextProperty.prototype.defaultBoxWidth = [0, 0];\r\n\r\n TextProperty.prototype.copyData = function (obj, data) {\r\n for (var s in data) {\r\n if (Object.prototype.hasOwnProperty.call(data, s)) {\r\n obj[s] = data[s];\r\n }\r\n }\r\n\r\n return obj;\r\n };\r\n\r\n TextProperty.prototype.setCurrentData = function (data) {\r\n if (!data.__complete) {\r\n this.completeTextData(data);\r\n }\r\n\r\n this.currentData = data;\r\n this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\r\n this._mdf = true;\r\n };\r\n\r\n TextProperty.prototype.searchProperty = function () {\r\n return this.searchKeyframes();\r\n };\r\n\r\n TextProperty.prototype.searchKeyframes = function () {\r\n this.kf = this.data.d.k.length > 1;\r\n\r\n if (this.kf) {\r\n this.addEffect(this.getKeyframeValue.bind(this));\r\n }\r\n\r\n return this.kf;\r\n };\r\n\r\n TextProperty.prototype.addEffect = function (effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n TextProperty.prototype.getValue = function (_finalValue) {\r\n if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\r\n return;\r\n }\r\n\r\n this.currentData.t = this.data.d.k[this.keysIndex].s.t;\r\n var currentValue = this.currentData;\r\n var currentIndex = this.keysIndex;\r\n\r\n if (this.lock) {\r\n this.setCurrentData(this.currentData);\r\n return;\r\n }\r\n\r\n this.lock = true;\r\n this._mdf = false;\r\n var i;\r\n var len = this.effectsSequence.length;\r\n var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n // Checking if index changed to prevent creating a new object every time the expression updates.\r\n if (currentIndex !== this.keysIndex) {\r\n finalValue = this.effectsSequence[i](finalValue, finalValue.t);\r\n } else {\r\n finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\r\n }\r\n }\r\n\r\n if (currentValue !== finalValue) {\r\n this.setCurrentData(finalValue);\r\n }\r\n\r\n this.v = this.currentData;\r\n this.pv = this.v;\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n };\r\n\r\n TextProperty.prototype.getKeyframeValue = function () {\r\n var textKeys = this.data.d.k;\r\n var frameNum = this.elem.comp.renderedFrame;\r\n var i = 0;\r\n var len = textKeys.length;\r\n\r\n while (i <= len - 1) {\r\n if (i === len - 1 || textKeys[i + 1].t > frameNum) {\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (this.keysIndex !== i) {\r\n this.keysIndex = i;\r\n }\r\n\r\n return this.data.d.k[this.keysIndex].s;\r\n };\r\n\r\n TextProperty.prototype.buildFinalText = function (text) {\r\n var charactersArray = [];\r\n var i = 0;\r\n var len = text.length;\r\n var charCode;\r\n var secondCharCode;\r\n var shouldCombine = false;\r\n\r\n while (i < len) {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (FontManager.isCombinedCharacter(charCode)) {\r\n charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\r\n secondCharCode = text.charCodeAt(i + 1);\r\n\r\n if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\r\n if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {\r\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n shouldCombine = false;\r\n } else {\r\n charactersArray.push(text.substr(i, 2));\r\n }\r\n\r\n i += 1;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n } else if (charCode > 0xDBFF) {\r\n secondCharCode = text.charCodeAt(i + 1);\r\n\r\n if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {\r\n shouldCombine = true;\r\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n i += 1;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n } else if (FontManager.isZeroWidthJoiner(charCode)) {\r\n charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n shouldCombine = true;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return charactersArray;\r\n };\r\n\r\n TextProperty.prototype.completeTextData = function (documentData) {\r\n documentData.__complete = true;\r\n var fontManager = this.elem.globalData.fontManager;\r\n var data = this.data;\r\n var letters = [];\r\n var i;\r\n var len;\r\n var newLineFlag;\r\n var index = 0;\r\n var val;\r\n var anchorGrouping = data.m.g;\r\n var currentSize = 0;\r\n var currentPos = 0;\r\n var currentLine = 0;\r\n var lineWidths = [];\r\n var lineWidth = 0;\r\n var maxLineWidth = 0;\r\n var j;\r\n var jLen;\r\n var fontData = fontManager.getFontByName(documentData.f);\r\n var charData;\r\n var cLength = 0;\r\n var fontProps = getFontProperties(fontData);\r\n documentData.fWeight = fontProps.weight;\r\n documentData.fStyle = fontProps.style;\r\n documentData.finalSize = documentData.s;\r\n documentData.finalText = this.buildFinalText(documentData.t);\r\n len = documentData.finalText.length;\r\n documentData.finalLineHeight = documentData.lh;\r\n var trackingOffset = documentData.tr / 1000 * documentData.finalSize;\r\n var charCode;\r\n\r\n if (documentData.sz) {\r\n var flag = true;\r\n var boxWidth = documentData.sz[0];\r\n var boxHeight = documentData.sz[1];\r\n var currentHeight;\r\n var finalText;\r\n\r\n while (flag) {\r\n finalText = this.buildFinalText(documentData.t);\r\n currentHeight = 0;\r\n lineWidth = 0;\r\n len = finalText.length;\r\n trackingOffset = documentData.tr / 1000 * documentData.finalSize;\r\n var lastSpaceIndex = -1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n charCode = finalText[i].charCodeAt(0);\r\n newLineFlag = false;\r\n\r\n if (finalText[i] === ' ') {\r\n lastSpaceIndex = i;\r\n } else if (charCode === 13 || charCode === 3) {\r\n lineWidth = 0;\r\n newLineFlag = true;\r\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n }\r\n\r\n if (fontManager.chars) {\r\n charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\r\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\r\n } else {\r\n // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\r\n cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\r\n }\r\n\r\n if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\r\n if (lastSpaceIndex === -1) {\r\n len += 1;\r\n } else {\r\n i = lastSpaceIndex;\r\n }\r\n\r\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r'); // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\r\n\r\n lastSpaceIndex = -1;\r\n lineWidth = 0;\r\n } else {\r\n lineWidth += cLength;\r\n lineWidth += trackingOffset;\r\n }\r\n }\r\n\r\n currentHeight += fontData.ascent * documentData.finalSize / 100;\r\n\r\n if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\r\n documentData.finalSize -= 1;\r\n documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;\r\n } else {\r\n documentData.finalText = finalText;\r\n len = documentData.finalText.length;\r\n flag = false;\r\n }\r\n }\r\n }\r\n\r\n lineWidth = -trackingOffset;\r\n cLength = 0;\r\n var uncollapsedSpaces = 0;\r\n var currentChar;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n newLineFlag = false;\r\n currentChar = documentData.finalText[i];\r\n charCode = currentChar.charCodeAt(0);\r\n\r\n if (charCode === 13 || charCode === 3) {\r\n uncollapsedSpaces = 0;\r\n lineWidths.push(lineWidth);\r\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n lineWidth = -2 * trackingOffset;\r\n val = '';\r\n newLineFlag = true;\r\n currentLine += 1;\r\n } else {\r\n val = currentChar;\r\n }\r\n\r\n if (fontManager.chars) {\r\n charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\r\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\r\n } else {\r\n // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\r\n cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n } //\r\n\r\n\r\n if (currentChar === ' ') {\r\n uncollapsedSpaces += cLength + trackingOffset;\r\n } else {\r\n lineWidth += cLength + trackingOffset + uncollapsedSpaces;\r\n uncollapsedSpaces = 0;\r\n }\r\n\r\n letters.push({\r\n l: cLength,\r\n an: cLength,\r\n add: currentSize,\r\n n: newLineFlag,\r\n anIndexes: [],\r\n val: val,\r\n line: currentLine,\r\n animatorJustifyOffset: 0\r\n });\r\n\r\n if (anchorGrouping == 2) {\r\n // eslint-disable-line eqeqeq\r\n currentSize += cLength;\r\n\r\n if (val === '' || val === ' ' || i === len - 1) {\r\n if (val === '' || val === ' ') {\r\n currentSize -= cLength;\r\n }\r\n\r\n while (currentPos <= i) {\r\n letters[currentPos].an = currentSize;\r\n letters[currentPos].ind = index;\r\n letters[currentPos].extra = cLength;\r\n currentPos += 1;\r\n }\r\n\r\n index += 1;\r\n currentSize = 0;\r\n }\r\n } else if (anchorGrouping == 3) {\r\n // eslint-disable-line eqeqeq\r\n currentSize += cLength;\r\n\r\n if (val === '' || i === len - 1) {\r\n if (val === '') {\r\n currentSize -= cLength;\r\n }\r\n\r\n while (currentPos <= i) {\r\n letters[currentPos].an = currentSize;\r\n letters[currentPos].ind = index;\r\n letters[currentPos].extra = cLength;\r\n currentPos += 1;\r\n }\r\n\r\n currentSize = 0;\r\n index += 1;\r\n }\r\n } else {\r\n letters[index].ind = index;\r\n letters[index].extra = 0;\r\n index += 1;\r\n }\r\n }\r\n\r\n documentData.l = letters;\r\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n lineWidths.push(lineWidth);\r\n\r\n if (documentData.sz) {\r\n documentData.boxWidth = documentData.sz[0];\r\n documentData.justifyOffset = 0;\r\n } else {\r\n documentData.boxWidth = maxLineWidth;\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n documentData.justifyOffset = -documentData.boxWidth;\r\n break;\r\n\r\n case 2:\r\n documentData.justifyOffset = -documentData.boxWidth / 2;\r\n break;\r\n\r\n default:\r\n documentData.justifyOffset = 0;\r\n }\r\n }\r\n\r\n documentData.lineWidths = lineWidths;\r\n var animators = data.a;\r\n var animatorData;\r\n var letterData;\r\n jLen = animators.length;\r\n var based;\r\n var ind;\r\n var indexes = [];\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorData = animators[j];\r\n\r\n if (animatorData.a.sc) {\r\n documentData.strokeColorAnim = true;\r\n }\r\n\r\n if (animatorData.a.sw) {\r\n documentData.strokeWidthAnim = true;\r\n }\r\n\r\n if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\r\n documentData.fillColorAnim = true;\r\n }\r\n\r\n ind = 0;\r\n based = animatorData.s.b;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n letterData = letters[i];\r\n letterData.anIndexes[j] = ind;\r\n\r\n if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {\r\n // eslint-disable-line eqeqeq\r\n if (animatorData.s.rn === 1) {\r\n indexes.push(ind);\r\n }\r\n\r\n ind += 1;\r\n }\r\n }\r\n\r\n data.a[j].s.totalChars = ind;\r\n var currentInd = -1;\r\n var newInd;\r\n\r\n if (animatorData.s.rn === 1) {\r\n for (i = 0; i < len; i += 1) {\r\n letterData = letters[i];\r\n\r\n if (currentInd != letterData.anIndexes[j]) {\r\n // eslint-disable-line eqeqeq\r\n currentInd = letterData.anIndexes[j];\r\n newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\r\n }\r\n\r\n letterData.anIndexes[j] = newInd;\r\n }\r\n }\r\n }\r\n\r\n documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n documentData.ls = documentData.ls || 0;\r\n documentData.ascent = fontData.ascent * documentData.finalSize / 100;\r\n };\r\n\r\n TextProperty.prototype.updateDocumentData = function (newData, index) {\r\n index = index === undefined ? this.keysIndex : index;\r\n var dData = this.copyData({}, this.data.d.k[index].s);\r\n dData = this.copyData(dData, newData);\r\n this.data.d.k[index].s = dData;\r\n this.recalculate(index);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n TextProperty.prototype.recalculate = function (index) {\r\n var dData = this.data.d.k[index].s;\r\n dData.__complete = false;\r\n this.keysIndex = 0;\r\n this._isFirstFrame = true;\r\n this.getValue(dData);\r\n };\r\n\r\n TextProperty.prototype.canResizeFont = function (_canResize) {\r\n this.canResize = _canResize;\r\n this.recalculate(this.keysIndex);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n TextProperty.prototype.setMinimumFontSize = function (_fontValue) {\r\n this.minimumFontSize = Math.floor(_fontValue) || 1;\r\n this.recalculate(this.keysIndex);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n var TextSelectorProp = function () {\r\n var max = Math.max;\r\n var min = Math.min;\r\n var floor = Math.floor;\r\n\r\n function TextSelectorPropFactory(elem, data) {\r\n this._currentTextLength = -1;\r\n this.k = false;\r\n this.data = data;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.finalS = 0;\r\n this.finalE = 0;\r\n this.initDynamicPropertyContainer(elem);\r\n this.s = PropertyFactory.getProp(elem, data.s || {\r\n k: 0\r\n }, 0, 0, this);\r\n\r\n if ('e' in data) {\r\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\r\n } else {\r\n this.e = {\r\n v: 100\r\n };\r\n }\r\n\r\n this.o = PropertyFactory.getProp(elem, data.o || {\r\n k: 0\r\n }, 0, 0, this);\r\n this.xe = PropertyFactory.getProp(elem, data.xe || {\r\n k: 0\r\n }, 0, 0, this);\r\n this.ne = PropertyFactory.getProp(elem, data.ne || {\r\n k: 0\r\n }, 0, 0, this);\r\n this.sm = PropertyFactory.getProp(elem, data.sm || {\r\n k: 100\r\n }, 0, 0, this);\r\n this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\r\n\r\n if (!this.dynamicProperties.length) {\r\n this.getValue();\r\n }\r\n }\r\n\r\n TextSelectorPropFactory.prototype = {\r\n getMult: function getMult(ind) {\r\n if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\r\n this.getValue();\r\n }\r\n\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 1;\r\n var y2 = 1;\r\n\r\n if (this.ne.v > 0) {\r\n x1 = this.ne.v / 100.0;\r\n } else {\r\n y1 = -this.ne.v / 100.0;\r\n }\r\n\r\n if (this.xe.v > 0) {\r\n x2 = 1.0 - this.xe.v / 100.0;\r\n } else {\r\n y2 = 1.0 + this.xe.v / 100.0;\r\n }\r\n\r\n var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\r\n var mult = 0;\r\n var s = this.finalS;\r\n var e = this.finalE;\r\n var type = this.data.sh;\r\n\r\n if (type === 2) {\r\n if (e === s) {\r\n mult = ind >= e ? 1 : 0;\r\n } else {\r\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 3) {\r\n if (e === s) {\r\n mult = ind >= e ? 0 : 1;\r\n } else {\r\n mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 4) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n\r\n if (mult < 0.5) {\r\n mult *= 2;\r\n } else {\r\n mult = 1 - 2 * (mult - 0.5);\r\n }\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 5) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n var tot = e - s;\r\n /* ind += 0.5;\r\n mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\r\n\r\n ind = min(max(0, ind + 0.5 - s), e - s);\r\n var x = -tot / 2 + ind;\r\n var a = tot / 2;\r\n mult = Math.sqrt(1 - x * x / (a * a));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 6) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n ind = min(max(0, ind + 0.5 - s), e - s);\r\n mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line\r\n }\r\n\r\n mult = easer(mult);\r\n } else {\r\n if (ind >= floor(s)) {\r\n if (ind - s < 0) {\r\n mult = max(0, min(min(e, 1) - (s - ind), 1));\r\n } else {\r\n mult = max(0, min(e - ind, 1));\r\n }\r\n }\r\n\r\n mult = easer(mult);\r\n } // Smoothness implementation.\r\n // The smoothness represents a reduced range of the original [0; 1] range.\r\n // if smoothness is 25%, the new range will be [0.375; 0.625]\r\n // Steps are:\r\n // - find the lower value of the new range (threshold)\r\n // - if multiplier is smaller than that value, floor it to 0\r\n // - if it is larger,\r\n // - subtract the threshold\r\n // - divide it by the smoothness (this will return the range to [0; 1])\r\n // Note: If it doesn't work on some scenarios, consider applying it before the easer.\r\n\r\n\r\n if (this.sm.v !== 100) {\r\n var smoothness = this.sm.v * 0.01;\r\n\r\n if (smoothness === 0) {\r\n smoothness = 0.00000001;\r\n }\r\n\r\n var threshold = 0.5 - smoothness * 0.5;\r\n\r\n if (mult < threshold) {\r\n mult = 0;\r\n } else {\r\n mult = (mult - threshold) / smoothness;\r\n\r\n if (mult > 1) {\r\n mult = 1;\r\n }\r\n }\r\n }\r\n\r\n return mult * this.a.v;\r\n },\r\n getValue: function getValue(newCharsFlag) {\r\n this.iterateDynamicProperties();\r\n this._mdf = newCharsFlag || this._mdf;\r\n this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\r\n\r\n if (newCharsFlag && this.data.r === 2) {\r\n this.e.v = this._currentTextLength;\r\n }\r\n\r\n var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\r\n var o = this.o.v / divisor;\r\n var s = this.s.v / divisor + o;\r\n var e = this.e.v / divisor + o;\r\n\r\n if (s > e) {\r\n var _s = s;\r\n s = e;\r\n e = _s;\r\n }\r\n\r\n this.finalS = s;\r\n this.finalE = e;\r\n }\r\n };\r\n extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\r\n\r\n function getTextSelectorProp(elem, data, arr) {\r\n return new TextSelectorPropFactory(elem, data, arr);\r\n }\r\n\r\n return {\r\n getTextSelectorProp: getTextSelectorProp\r\n };\r\n }();\r\n\r\n function TextAnimatorDataProperty(elem, animatorProps, container) {\r\n var defaultData = {\r\n propType: false\r\n };\r\n var getProp = PropertyFactory.getProp;\r\n var textAnimatorAnimatables = animatorProps.a;\r\n this.a = {\r\n r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\r\n rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\r\n ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\r\n sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\r\n sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\r\n s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\r\n a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\r\n o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\r\n p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\r\n sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\r\n sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\r\n fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\r\n fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\r\n fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\r\n fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\r\n t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData\r\n };\r\n this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\r\n this.s.t = animatorProps.s.t;\r\n }\r\n\r\n function TextAnimatorProperty(textData, renderType, elem) {\r\n this._isFirstFrame = true;\r\n this._hasMaskedPath = false;\r\n this._frameId = -1;\r\n this._textData = textData;\r\n this._renderType = renderType;\r\n this._elem = elem;\r\n this._animatorsData = createSizedArray(this._textData.a.length);\r\n this._pathData = {};\r\n this._moreOptions = {\r\n alignment: {}\r\n };\r\n this.renderedLetters = [];\r\n this.lettersChangedFlag = false;\r\n this.initDynamicPropertyContainer(elem);\r\n }\r\n\r\n TextAnimatorProperty.prototype.searchProperties = function () {\r\n var i;\r\n var len = this._textData.a.length;\r\n var animatorProps;\r\n var getProp = PropertyFactory.getProp;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n animatorProps = this._textData.a[i];\r\n this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\r\n }\r\n\r\n if (this._textData.p && 'm' in this._textData.p) {\r\n this._pathData = {\r\n a: getProp(this._elem, this._textData.p.a, 0, 0, this),\r\n f: getProp(this._elem, this._textData.p.f, 0, 0, this),\r\n l: getProp(this._elem, this._textData.p.l, 0, 0, this),\r\n r: getProp(this._elem, this._textData.p.r, 0, 0, this),\r\n p: getProp(this._elem, this._textData.p.p, 0, 0, this),\r\n m: this._elem.maskManager.getMaskProperty(this._textData.p.m)\r\n };\r\n this._hasMaskedPath = true;\r\n } else {\r\n this._hasMaskedPath = false;\r\n }\r\n\r\n this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\r\n };\r\n\r\n TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\r\n this.lettersChangedFlag = lettersChangedFlag;\r\n\r\n if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\r\n return;\r\n }\r\n\r\n this._isFirstFrame = false;\r\n var alignment = this._moreOptions.alignment.v;\r\n var animators = this._animatorsData;\r\n var textData = this._textData;\r\n var matrixHelper = this.mHelper;\r\n var renderType = this._renderType;\r\n var renderedLettersCount = this.renderedLetters.length;\r\n var xPos;\r\n var yPos;\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n var pathInfo;\r\n var currentLength;\r\n var currentPoint;\r\n var segmentLength;\r\n var flag;\r\n var pointInd;\r\n var segmentInd;\r\n var prevPoint;\r\n var points;\r\n var segments;\r\n var partialLength;\r\n var totalLength;\r\n var perc;\r\n var tanAngle;\r\n var mask;\r\n\r\n if (this._hasMaskedPath) {\r\n mask = this._pathData.m;\r\n\r\n if (!this._pathData.n || this._pathData._mdf) {\r\n var paths = mask.v;\r\n\r\n if (this._pathData.r.v) {\r\n paths = paths.reverse();\r\n } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\r\n\r\n\r\n pathInfo = {\r\n tLength: 0,\r\n segments: []\r\n };\r\n len = paths._length - 1;\r\n var bezierData;\r\n totalLength = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\r\n pathInfo.tLength += bezierData.segmentLength;\r\n pathInfo.segments.push(bezierData);\r\n totalLength += bezierData.segmentLength;\r\n }\r\n\r\n i = len;\r\n\r\n if (mask.v.c) {\r\n bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\r\n pathInfo.tLength += bezierData.segmentLength;\r\n pathInfo.segments.push(bezierData);\r\n totalLength += bezierData.segmentLength;\r\n }\r\n\r\n this._pathData.pi = pathInfo;\r\n }\r\n\r\n pathInfo = this._pathData.pi;\r\n currentLength = this._pathData.f.v;\r\n segmentInd = 0;\r\n pointInd = 1;\r\n segmentLength = 0;\r\n flag = true;\r\n segments = pathInfo.segments;\r\n\r\n if (currentLength < 0 && mask.v.c) {\r\n if (pathInfo.tLength < Math.abs(currentLength)) {\r\n currentLength = -Math.abs(currentLength) % pathInfo.tLength;\r\n }\r\n\r\n segmentInd = segments.length - 1;\r\n points = segments[segmentInd].points;\r\n pointInd = points.length - 1;\r\n\r\n while (currentLength < 0) {\r\n currentLength += points[pointInd].partialLength;\r\n pointInd -= 1;\r\n\r\n if (pointInd < 0) {\r\n segmentInd -= 1;\r\n points = segments[segmentInd].points;\r\n pointInd = points.length - 1;\r\n }\r\n }\r\n }\r\n\r\n points = segments[segmentInd].points;\r\n prevPoint = points[pointInd - 1];\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n }\r\n\r\n len = letters.length;\r\n xPos = 0;\r\n yPos = 0;\r\n var yOff = documentData.finalSize * 1.2 * 0.714;\r\n var firstLine = true;\r\n var animatorProps;\r\n var animatorSelector;\r\n var j;\r\n var jLen;\r\n var letterValue;\r\n jLen = animators.length;\r\n var mult;\r\n var ind = -1;\r\n var offf;\r\n var xPathPos;\r\n var yPathPos;\r\n var initPathPos = currentLength;\r\n var initSegmentInd = segmentInd;\r\n var initPointInd = pointInd;\r\n var currentLine = -1;\r\n var elemOpacity;\r\n var sc;\r\n var sw;\r\n var fc;\r\n var k;\r\n var letterSw;\r\n var letterSc;\r\n var letterFc;\r\n var letterM = '';\r\n var letterP = this.defaultPropsArray;\r\n var letterO; //\r\n\r\n if (documentData.j === 2 || documentData.j === 1) {\r\n var animatorJustifyOffset = 0;\r\n var animatorFirstCharOffset = 0;\r\n var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\r\n var lastIndex = 0;\r\n var isNewLine = true;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (letters[i].n) {\r\n if (animatorJustifyOffset) {\r\n animatorJustifyOffset += animatorFirstCharOffset;\r\n }\r\n\r\n while (lastIndex < i) {\r\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n lastIndex += 1;\r\n }\r\n\r\n animatorJustifyOffset = 0;\r\n isNewLine = true;\r\n } else {\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.t.propType) {\r\n if (isNewLine && documentData.j === 2) {\r\n animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\r\n }\r\n\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\r\n } else {\r\n animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\r\n }\r\n }\r\n }\r\n\r\n isNewLine = false;\r\n }\r\n }\r\n\r\n if (animatorJustifyOffset) {\r\n animatorJustifyOffset += animatorFirstCharOffset;\r\n }\r\n\r\n while (lastIndex < i) {\r\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n lastIndex += 1;\r\n }\r\n } //\r\n\r\n\r\n for (i = 0; i < len; i += 1) {\r\n matrixHelper.reset();\r\n elemOpacity = 1;\r\n\r\n if (letters[i].n) {\r\n xPos = 0;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n currentLength = initPathPos;\r\n firstLine = false;\r\n\r\n if (this._hasMaskedPath) {\r\n segmentInd = initSegmentInd;\r\n pointInd = initPointInd;\r\n points = segments[segmentInd].points;\r\n prevPoint = points[pointInd - 1];\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n segmentLength = 0;\r\n }\r\n\r\n letterM = '';\r\n letterFc = '';\r\n letterSw = '';\r\n letterO = '';\r\n letterP = this.defaultPropsArray;\r\n } else {\r\n if (this._hasMaskedPath) {\r\n if (currentLine !== letters[i].line) {\r\n switch (documentData.j) {\r\n case 1:\r\n currentLength += totalLength - documentData.lineWidths[letters[i].line];\r\n break;\r\n\r\n case 2:\r\n currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n currentLine = letters[i].line;\r\n }\r\n\r\n if (ind !== letters[i].ind) {\r\n if (letters[ind]) {\r\n currentLength += letters[ind].extra;\r\n }\r\n\r\n currentLength += letters[i].an / 2;\r\n ind = letters[i].ind;\r\n }\r\n\r\n currentLength += alignment[0] * letters[i].an * 0.005;\r\n var animatorOffset = 0;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.p.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n animatorOffset += animatorProps.p.v[0] * mult[0];\r\n } else {\r\n animatorOffset += animatorProps.p.v[0] * mult;\r\n }\r\n }\r\n\r\n if (animatorProps.a.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n animatorOffset += animatorProps.a.v[0] * mult[0];\r\n } else {\r\n animatorOffset += animatorProps.a.v[0] * mult;\r\n }\r\n }\r\n }\r\n\r\n flag = true; // Force alignment only works with a single line for now\r\n\r\n if (this._pathData.a.v) {\r\n currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);\r\n currentLength += this._pathData.f.v;\r\n }\r\n\r\n while (flag) {\r\n if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\r\n perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\r\n xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\r\n yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\r\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);\r\n flag = false;\r\n } else if (points) {\r\n segmentLength += currentPoint.partialLength;\r\n pointInd += 1;\r\n\r\n if (pointInd >= points.length) {\r\n pointInd = 0;\r\n segmentInd += 1;\r\n\r\n if (!segments[segmentInd]) {\r\n if (mask.v.c) {\r\n pointInd = 0;\r\n segmentInd = 0;\r\n points = segments[segmentInd].points;\r\n } else {\r\n segmentLength -= currentPoint.partialLength;\r\n points = null;\r\n }\r\n } else {\r\n points = segments[segmentInd].points;\r\n }\r\n }\r\n\r\n if (points) {\r\n prevPoint = currentPoint;\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n }\r\n }\r\n }\r\n\r\n offf = letters[i].an / 2 - letters[i].add;\r\n matrixHelper.translate(-offf, 0, 0);\r\n } else {\r\n offf = letters[i].an / 2 - letters[i].add;\r\n matrixHelper.translate(-offf, 0, 0); // Grouping alignment\r\n\r\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.t.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\r\n\r\n if (xPos !== 0 || documentData.j !== 0) {\r\n if (this._hasMaskedPath) {\r\n if (mult.length) {\r\n currentLength += animatorProps.t.v * mult[0];\r\n } else {\r\n currentLength += animatorProps.t.v * mult;\r\n }\r\n } else if (mult.length) {\r\n xPos += animatorProps.t.v * mult[0];\r\n } else {\r\n xPos += animatorProps.t.v * mult;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (documentData.strokeWidthAnim) {\r\n sw = documentData.sw || 0;\r\n }\r\n\r\n if (documentData.strokeColorAnim) {\r\n if (documentData.sc) {\r\n sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\r\n } else {\r\n sc = [0, 0, 0];\r\n }\r\n }\r\n\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.a.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\r\n } else {\r\n matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.s.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);\r\n } else {\r\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (animatorProps.sk.propType) {\r\n if (mult.length) {\r\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\r\n } else {\r\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.r.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\r\n } else {\r\n matrixHelper.rotateZ(-animatorProps.r.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.ry.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\r\n } else {\r\n matrixHelper.rotateY(animatorProps.ry.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.rx.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\r\n } else {\r\n matrixHelper.rotateX(animatorProps.rx.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.o.propType) {\r\n if (mult.length) {\r\n elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];\r\n } else {\r\n elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;\r\n }\r\n }\r\n\r\n if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\r\n if (mult.length) {\r\n sw += animatorProps.sw.v * mult[0];\r\n } else {\r\n sw += animatorProps.sw.v * mult;\r\n }\r\n }\r\n\r\n if (documentData.strokeColorAnim && animatorProps.sc.propType) {\r\n for (k = 0; k < 3; k += 1) {\r\n if (mult.length) {\r\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\r\n } else {\r\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\r\n }\r\n }\r\n }\r\n\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n if (animatorProps.fc.propType) {\r\n for (k = 0; k < 3; k += 1) {\r\n if (mult.length) {\r\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\r\n } else {\r\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\r\n }\r\n }\r\n }\r\n\r\n if (animatorProps.fh.propType) {\r\n if (mult.length) {\r\n fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\r\n } else {\r\n fc = addHueToRGB(fc, animatorProps.fh.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.fs.propType) {\r\n if (mult.length) {\r\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\r\n } else {\r\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.fb.propType) {\r\n if (mult.length) {\r\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\r\n } else {\r\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.p.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (this._hasMaskedPath) {\r\n if (mult.length) {\r\n matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\r\n } else {\r\n matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n }\r\n } else if (mult.length) {\r\n matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\r\n } else {\r\n matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n }\r\n }\r\n }\r\n\r\n if (documentData.strokeWidthAnim) {\r\n letterSw = sw < 0 ? 0 : sw;\r\n }\r\n\r\n if (documentData.strokeColorAnim) {\r\n letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\r\n }\r\n\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\r\n }\r\n\r\n if (this._hasMaskedPath) {\r\n matrixHelper.translate(0, -documentData.ls);\r\n matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);\r\n\r\n if (this._pathData.p.v) {\r\n tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\r\n var rot = Math.atan(tanAngle) * 180 / Math.PI;\r\n\r\n if (currentPoint.point[0] < prevPoint.point[0]) {\r\n rot += 180;\r\n }\r\n\r\n matrixHelper.rotate(-rot * Math.PI / 180);\r\n }\r\n\r\n matrixHelper.translate(xPathPos, yPathPos, 0);\r\n currentLength -= alignment[0] * letters[i].an * 0.005;\r\n\r\n if (letters[i + 1] && ind !== letters[i + 1].ind) {\r\n currentLength += letters[i].an / 2;\r\n currentLength += documentData.tr * 0.001 * documentData.finalSize;\r\n }\r\n } else {\r\n matrixHelper.translate(xPos, yPos, 0);\r\n\r\n if (documentData.ps) {\r\n // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\r\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n }\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\r\n break;\r\n\r\n case 2:\r\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n matrixHelper.translate(0, -documentData.ls);\r\n matrixHelper.translate(offf, 0, 0);\r\n matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);\r\n xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;\r\n }\r\n\r\n if (renderType === 'html') {\r\n letterM = matrixHelper.toCSS();\r\n } else if (renderType === 'svg') {\r\n letterM = matrixHelper.to2dCSS();\r\n } else {\r\n letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\r\n }\r\n\r\n letterO = elemOpacity;\r\n }\r\n\r\n if (renderedLettersCount <= i) {\r\n letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\r\n this.renderedLetters.push(letterValue);\r\n renderedLettersCount += 1;\r\n this.lettersChangedFlag = true;\r\n } else {\r\n letterValue = this.renderedLetters[i];\r\n this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\r\n }\r\n }\r\n };\r\n\r\n TextAnimatorProperty.prototype.getValue = function () {\r\n if (this._elem.globalData.frameId === this._frameId) {\r\n return;\r\n }\r\n\r\n this._frameId = this._elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n };\r\n\r\n TextAnimatorProperty.prototype.mHelper = new Matrix();\r\n TextAnimatorProperty.prototype.defaultPropsArray = [];\r\n extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\r\n\r\n function ITextElement() {}\r\n\r\n ITextElement.prototype.initElement = function (data, globalData, comp) {\r\n this.lettersChangedFlag = true;\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\r\n this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n this.initRenderable();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n this.createContent();\r\n this.hide();\r\n this.textAnimator.searchProperties(this.dynamicProperties);\r\n };\r\n\r\n ITextElement.prototype.prepareFrame = function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n\r\n if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\r\n this.buildNewText();\r\n this.textProperty._isFirstFrame = false;\r\n this.textProperty._mdf = false;\r\n }\r\n };\r\n\r\n ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\r\n var j;\r\n var jLen = shapes.length;\r\n var pathNodes;\r\n var shapeStr = '';\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[j].ty === 'sh') {\r\n pathNodes = shapes[j].ks.k;\r\n shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\r\n }\r\n }\r\n\r\n return shapeStr;\r\n };\r\n\r\n ITextElement.prototype.updateDocumentData = function (newData, index) {\r\n this.textProperty.updateDocumentData(newData, index);\r\n };\r\n\r\n ITextElement.prototype.canResizeFont = function (_canResize) {\r\n this.textProperty.canResizeFont(_canResize);\r\n };\r\n\r\n ITextElement.prototype.setMinimumFontSize = function (_fontSize) {\r\n this.textProperty.setMinimumFontSize(_fontSize);\r\n };\r\n\r\n ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\r\n if (documentData.ps) {\r\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n }\r\n\r\n matrixHelper.translate(0, -documentData.ls, 0);\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\r\n break;\r\n\r\n case 2:\r\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n matrixHelper.translate(xPos, yPos, 0);\r\n };\r\n\r\n ITextElement.prototype.buildColor = function (colorData) {\r\n return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\r\n };\r\n\r\n ITextElement.prototype.emptyProp = new LetterProps();\r\n\r\n ITextElement.prototype.destroy = function () {};\r\n\r\n var emptyShapeData = {\r\n shapes: []\r\n };\r\n\r\n function SVGTextLottieElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.renderType = 'svg';\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\r\n\r\n SVGTextLottieElement.prototype.createContent = function () {\r\n if (this.data.singleShape && !this.globalData.fontManager.chars) {\r\n this.textContainer = createNS('text');\r\n }\r\n };\r\n\r\n SVGTextLottieElement.prototype.buildTextContents = function (textArray) {\r\n var i = 0;\r\n var len = textArray.length;\r\n var textContents = [];\r\n var currentTextContent = '';\r\n\r\n while (i < len) {\r\n if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\r\n textContents.push(currentTextContent);\r\n currentTextContent = '';\r\n } else {\r\n currentTextContent += textArray[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n textContents.push(currentTextContent);\r\n return textContents;\r\n };\r\n\r\n SVGTextLottieElement.prototype.buildShapeData = function (data, scale) {\r\n // data should probably be cloned to apply scale separately to each instance of a text on different layers\r\n // but since text internal content gets only rendered once and then it's never rerendered,\r\n // it's probably safe not to clone data and reuse always the same instance even if the object is mutated.\r\n // Avoiding cloning is preferred since cloning each character shape data is expensive\r\n if (data.shapes && data.shapes.length) {\r\n var shape = data.shapes[0];\r\n\r\n if (shape.it) {\r\n var shapeItem = shape.it[shape.it.length - 1];\r\n\r\n if (shapeItem.s) {\r\n shapeItem.s.k[0] = scale;\r\n shapeItem.s.k[1] = scale;\r\n }\r\n }\r\n }\r\n\r\n return data;\r\n };\r\n\r\n SVGTextLottieElement.prototype.buildNewText = function () {\r\n this.addDynamicProperty(this);\r\n var i;\r\n var len;\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\r\n\r\n if (documentData.fc) {\r\n this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\r\n } else {\r\n this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\r\n }\r\n\r\n if (documentData.sc) {\r\n this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\r\n this.layerElement.setAttribute('stroke-width', documentData.sw);\r\n }\r\n\r\n this.layerElement.setAttribute('font-size', documentData.finalSize);\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n\r\n if (fontData.fClass) {\r\n this.layerElement.setAttribute('class', fontData.fClass);\r\n } else {\r\n this.layerElement.setAttribute('font-family', fontData.fFamily);\r\n var fWeight = documentData.fWeight;\r\n var fStyle = documentData.fStyle;\r\n this.layerElement.setAttribute('font-style', fStyle);\r\n this.layerElement.setAttribute('font-weight', fWeight);\r\n }\r\n\r\n this.layerElement.setAttribute('aria-label', documentData.t);\r\n var letters = documentData.l || [];\r\n var usesGlyphs = !!this.globalData.fontManager.chars;\r\n len = letters.length;\r\n var tSpan;\r\n var matrixHelper = this.mHelper;\r\n var shapeStr = '';\r\n var singleShape = this.data.singleShape;\r\n var xPos = 0;\r\n var yPos = 0;\r\n var firstLine = true;\r\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n\r\n if (singleShape && !usesGlyphs && !documentData.sz) {\r\n var tElement = this.textContainer;\r\n var justify = 'start';\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n justify = 'end';\r\n break;\r\n\r\n case 2:\r\n justify = 'middle';\r\n break;\r\n\r\n default:\r\n justify = 'start';\r\n break;\r\n }\r\n\r\n tElement.setAttribute('text-anchor', justify);\r\n tElement.setAttribute('letter-spacing', trackingOffset);\r\n var textContent = this.buildTextContents(documentData.finalText);\r\n len = textContent.length;\r\n yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n tSpan = this.textSpans[i].span || createNS('tspan');\r\n tSpan.textContent = textContent[i];\r\n tSpan.setAttribute('x', 0);\r\n tSpan.setAttribute('y', yPos);\r\n tSpan.style.display = 'inherit';\r\n tElement.appendChild(tSpan);\r\n\r\n if (!this.textSpans[i]) {\r\n this.textSpans[i] = {\r\n span: null,\r\n glyph: null\r\n };\r\n }\r\n\r\n this.textSpans[i].span = tSpan;\r\n yPos += documentData.finalLineHeight;\r\n }\r\n\r\n this.layerElement.appendChild(tElement);\r\n } else {\r\n var cachedSpansLength = this.textSpans.length;\r\n var charData;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.textSpans[i]) {\r\n this.textSpans[i] = {\r\n span: null,\r\n childSpan: null,\r\n glyph: null\r\n };\r\n }\r\n\r\n if (!usesGlyphs || !singleShape || i === 0) {\r\n tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');\r\n\r\n if (cachedSpansLength <= i) {\r\n tSpan.setAttribute('stroke-linecap', 'butt');\r\n tSpan.setAttribute('stroke-linejoin', 'round');\r\n tSpan.setAttribute('stroke-miterlimit', '4');\r\n this.textSpans[i].span = tSpan;\r\n\r\n if (usesGlyphs) {\r\n var childSpan = createNS('g');\r\n tSpan.appendChild(childSpan);\r\n this.textSpans[i].childSpan = childSpan;\r\n }\r\n\r\n this.textSpans[i].span = tSpan;\r\n this.layerElement.appendChild(tSpan);\r\n }\r\n\r\n tSpan.style.display = 'inherit';\r\n }\r\n\r\n matrixHelper.reset();\r\n\r\n if (singleShape) {\r\n if (letters[i].n) {\r\n xPos = -trackingOffset;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n firstLine = false;\r\n }\r\n\r\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\r\n\r\n xPos += trackingOffset;\r\n }\r\n\r\n if (usesGlyphs) {\r\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n var glyphElement; // t === 1 means the character has been replaced with an animated shaped\r\n\r\n if (charData.t === 1) {\r\n glyphElement = new SVGCompElement(charData.data, this.globalData, this);\r\n } else {\r\n var data = emptyShapeData;\r\n\r\n if (charData.data && charData.data.shapes) {\r\n data = this.buildShapeData(charData.data, documentData.finalSize);\r\n }\r\n\r\n glyphElement = new SVGShapeElement(data, this.globalData, this);\r\n }\r\n\r\n if (this.textSpans[i].glyph) {\r\n var glyph = this.textSpans[i].glyph;\r\n this.textSpans[i].childSpan.removeChild(glyph.layerElement);\r\n glyph.destroy();\r\n }\r\n\r\n this.textSpans[i].glyph = glyphElement;\r\n glyphElement._debug = true;\r\n glyphElement.prepareFrame(0);\r\n glyphElement.renderFrame();\r\n this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale\r\n // this might have issues with strokes and might need a different solution\r\n\r\n if (charData.t === 1) {\r\n this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');\r\n }\r\n } else {\r\n if (singleShape) {\r\n tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\r\n }\r\n\r\n tSpan.textContent = letters[i].val;\r\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n } //\r\n\r\n }\r\n\r\n if (singleShape && tSpan) {\r\n tSpan.setAttribute('d', shapeStr);\r\n }\r\n }\r\n\r\n while (i < this.textSpans.length) {\r\n this.textSpans[i].span.style.display = 'none';\r\n i += 1;\r\n }\r\n\r\n this._sizeChanged = true;\r\n };\r\n\r\n SVGTextLottieElement.prototype.sourceRectAtTime = function () {\r\n this.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n this.renderInnerContent();\r\n\r\n if (this._sizeChanged) {\r\n this._sizeChanged = false;\r\n var textBox = this.layerElement.getBBox();\r\n this.bbox = {\r\n top: textBox.y,\r\n left: textBox.x,\r\n width: textBox.width,\r\n height: textBox.height\r\n };\r\n }\r\n\r\n return this.bbox;\r\n };\r\n\r\n SVGTextLottieElement.prototype.getValue = function () {\r\n var i;\r\n var len = this.textSpans.length;\r\n var glyphElement;\r\n this.renderedFrame = this.comp.renderedFrame;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n glyphElement = this.textSpans[i].glyph;\r\n\r\n if (glyphElement) {\r\n glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n\r\n if (glyphElement._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n };\r\n\r\n SVGTextLottieElement.prototype.renderInnerContent = function () {\r\n if (!this.data.singleShape || this._mdf) {\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n\r\n if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\r\n this._sizeChanged = true;\r\n var i;\r\n var len;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n var letters = this.textProperty.currentData.l;\r\n len = letters.length;\r\n var renderedLetter;\r\n var textSpan;\r\n var glyphElement;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!letters[i].n) {\r\n renderedLetter = renderedLetters[i];\r\n textSpan = this.textSpans[i].span;\r\n glyphElement = this.textSpans[i].glyph;\r\n\r\n if (glyphElement) {\r\n glyphElement.renderFrame();\r\n }\r\n\r\n if (renderedLetter._mdf.m) {\r\n textSpan.setAttribute('transform', renderedLetter.m);\r\n }\r\n\r\n if (renderedLetter._mdf.o) {\r\n textSpan.setAttribute('opacity', renderedLetter.o);\r\n }\r\n\r\n if (renderedLetter._mdf.sw) {\r\n textSpan.setAttribute('stroke-width', renderedLetter.sw);\r\n }\r\n\r\n if (renderedLetter._mdf.sc) {\r\n textSpan.setAttribute('stroke', renderedLetter.sc);\r\n }\r\n\r\n if (renderedLetter._mdf.fc) {\r\n textSpan.setAttribute('fill', renderedLetter.fc);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n function ISolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([IImageElement], ISolidElement);\r\n\r\n ISolidElement.prototype.createContent = function () {\r\n var rect = createNS('rect'); /// /rect.style.width = this.data.sw;\r\n /// /rect.style.height = this.data.sh;\r\n /// /rect.style.fill = this.data.sc;\r\n\r\n rect.setAttribute('width', this.data.sw);\r\n rect.setAttribute('height', this.data.sh);\r\n rect.setAttribute('fill', this.data.sc);\r\n this.layerElement.appendChild(rect);\r\n };\r\n\r\n function NullElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initFrame();\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n }\r\n\r\n NullElement.prototype.prepareFrame = function (num) {\r\n this.prepareProperties(num, true);\r\n };\r\n\r\n NullElement.prototype.renderFrame = function () {};\r\n\r\n NullElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n NullElement.prototype.destroy = function () {};\r\n\r\n NullElement.prototype.sourceRectAtTime = function () {};\r\n\r\n NullElement.prototype.hide = function () {};\r\n\r\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\r\n\r\n function SVGRendererBase() {}\r\n\r\n extendPrototype([BaseRenderer], SVGRendererBase);\r\n\r\n SVGRendererBase.prototype.createNull = function (data) {\r\n return new NullElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createShape = function (data) {\r\n return new SVGShapeElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createText = function (data) {\r\n return new SVGTextLottieElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createImage = function (data) {\r\n return new IImageElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createSolid = function (data) {\r\n return new ISolidElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.configAnimation = function (animData) {\r\n this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\r\n this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\r\n\r\n if (this.renderConfig.viewBoxSize) {\r\n this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\r\n } else {\r\n this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\r\n }\r\n\r\n if (!this.renderConfig.viewBoxOnly) {\r\n this.svgElement.setAttribute('width', animData.w);\r\n this.svgElement.setAttribute('height', animData.h);\r\n this.svgElement.style.width = '100%';\r\n this.svgElement.style.height = '100%';\r\n this.svgElement.style.transform = 'translate3d(0,0,0)';\r\n this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\r\n }\r\n\r\n if (this.renderConfig.width) {\r\n this.svgElement.setAttribute('width', this.renderConfig.width);\r\n }\r\n\r\n if (this.renderConfig.height) {\r\n this.svgElement.setAttribute('height', this.renderConfig.height);\r\n }\r\n\r\n if (this.renderConfig.className) {\r\n this.svgElement.setAttribute('class', this.renderConfig.className);\r\n }\r\n\r\n if (this.renderConfig.id) {\r\n this.svgElement.setAttribute('id', this.renderConfig.id);\r\n }\r\n\r\n if (this.renderConfig.focusable !== undefined) {\r\n this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\r\n }\r\n\r\n this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';\r\n // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\r\n\r\n this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation\r\n\r\n var defs = this.globalData.defs;\r\n this.setupGlobalData(animData, defs);\r\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n this.data = animData;\r\n var maskElement = createNS('clipPath');\r\n var rect = createNS('rect');\r\n rect.setAttribute('width', animData.w);\r\n rect.setAttribute('height', animData.h);\r\n rect.setAttribute('x', 0);\r\n rect.setAttribute('y', 0);\r\n var maskId = createElementID();\r\n maskElement.setAttribute('id', maskId);\r\n maskElement.appendChild(rect);\r\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');\r\n defs.appendChild(maskElement);\r\n this.layers = animData.layers;\r\n this.elements = createSizedArray(animData.layers.length);\r\n };\r\n\r\n SVGRendererBase.prototype.destroy = function () {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n\r\n this.layerElement = null;\r\n this.globalData.defs = null;\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n\r\n this.elements.length = 0;\r\n this.destroyed = true;\r\n this.animationItem = null;\r\n };\r\n\r\n SVGRendererBase.prototype.updateContainerSize = function () {};\r\n\r\n SVGRendererBase.prototype.findIndexByInd = function (ind) {\r\n var i = 0;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.layers[i].ind === ind) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n };\r\n\r\n SVGRendererBase.prototype.buildItem = function (pos) {\r\n var elements = this.elements;\r\n\r\n if (elements[pos] || this.layers[pos].ty === 99) {\r\n return;\r\n }\r\n\r\n elements[pos] = true;\r\n var element = this.createItem(this.layers[pos]);\r\n elements[pos] = element;\r\n\r\n if (getExpressionsPlugin()) {\r\n if (this.layers[pos].ty === 0) {\r\n this.globalData.projectInterface.registerComposition(element);\r\n }\r\n\r\n element.initExpressions();\r\n }\r\n\r\n this.appendElementInPos(element, pos);\r\n\r\n if (this.layers[pos].tt) {\r\n var elementIndex = 'tp' in this.layers[pos] ? this.findIndexByInd(this.layers[pos].tp) : pos - 1;\r\n\r\n if (elementIndex === -1) {\r\n return;\r\n }\r\n\r\n if (!this.elements[elementIndex] || this.elements[elementIndex] === true) {\r\n this.buildItem(elementIndex);\r\n this.addPendingElement(element);\r\n } else {\r\n var matteElement = elements[elementIndex];\r\n var matteMask = matteElement.getMatte(this.layers[pos].tt);\r\n element.setMatte(matteMask);\r\n }\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n\r\n if (element.data.tt) {\r\n var i = 0;\r\n var len = this.elements.length;\r\n\r\n while (i < len) {\r\n if (this.elements[i] === element) {\r\n var elementIndex = 'tp' in element.data ? this.findIndexByInd(element.data.tp) : i - 1;\r\n var matteElement = this.elements[elementIndex];\r\n var matteMask = matteElement.getMatte(this.layers[i].tt);\r\n element.setMatte(matteMask);\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.renderFrame = function (num) {\r\n if (this.renderedFrame === num || this.destroyed) {\r\n return;\r\n }\r\n\r\n if (num === null) {\r\n num = this.renderedFrame;\r\n } else {\r\n this.renderedFrame = num;\r\n } // console.log('-------');\r\n // console.log('FRAME ',num);\r\n\r\n\r\n this.globalData.frameNum = num;\r\n this.globalData.frameId += 1;\r\n this.globalData.projectInterface.currentFrame = num;\r\n this.globalData._mdf = false;\r\n var i;\r\n var len = this.layers.length;\r\n\r\n if (!this.completeLayers) {\r\n this.checkLayers(num);\r\n }\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(num - this.layers[i].st);\r\n }\r\n }\r\n\r\n if (this.globalData._mdf) {\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.appendElementInPos = function (element, pos) {\r\n var newElement = element.getBaseElement();\r\n\r\n if (!newElement) {\r\n return;\r\n }\r\n\r\n var i = 0;\r\n var nextElement;\r\n\r\n while (i < pos) {\r\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\r\n nextElement = this.elements[i].getBaseElement();\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (nextElement) {\r\n this.layerElement.insertBefore(newElement, nextElement);\r\n } else {\r\n this.layerElement.appendChild(newElement);\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.hide = function () {\r\n this.layerElement.style.display = 'none';\r\n };\r\n\r\n SVGRendererBase.prototype.show = function () {\r\n this.layerElement.style.display = 'block';\r\n };\r\n\r\n function ICompElement() {}\r\n\r\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\r\n\r\n ICompElement.prototype.initElement = function (data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initTransform(data, globalData, comp);\r\n this.initRenderable();\r\n this.initHierarchy();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n\r\n if (this.data.xt || !globalData.progressiveLoad) {\r\n this.buildAllItems();\r\n }\r\n\r\n this.hide();\r\n };\r\n /* ICompElement.prototype.hide = function(){\r\n if(!this.hidden){\r\n this.hideElement();\r\n var i,len = this.elements.length;\r\n for( i = 0; i < len; i+=1 ){\r\n if(this.elements[i]){\r\n this.elements[i].hide();\r\n }\r\n }\r\n }\r\n }; */\r\n\r\n\r\n ICompElement.prototype.prepareFrame = function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n\r\n if (!this.isInRange && !this.data.xt) {\r\n return;\r\n }\r\n\r\n if (!this.tm._placeholder) {\r\n var timeRemapped = this.tm.v;\r\n\r\n if (timeRemapped === this.data.op) {\r\n timeRemapped = this.data.op - 1;\r\n }\r\n\r\n this.renderedFrame = timeRemapped;\r\n } else {\r\n this.renderedFrame = num / this.data.sr;\r\n }\r\n\r\n var i;\r\n var len = this.elements.length;\r\n\r\n if (!this.completeLayers) {\r\n this.checkLayers(this.renderedFrame);\r\n } // This iteration needs to be backwards because of how expressions connect between each other\r\n\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\r\n\r\n if (this.elements[i]._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n };\r\n\r\n ICompElement.prototype.renderInnerContent = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n };\r\n\r\n ICompElement.prototype.setElements = function (elems) {\r\n this.elements = elems;\r\n };\r\n\r\n ICompElement.prototype.getElements = function () {\r\n return this.elements;\r\n };\r\n\r\n ICompElement.prototype.destroyElements = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n };\r\n\r\n ICompElement.prototype.destroy = function () {\r\n this.destroyElements();\r\n this.destroyBaseElement();\r\n };\r\n\r\n function SVGCompElement(data, globalData, comp) {\r\n this.layers = data.layers;\r\n this.supports3d = true;\r\n this.completeLayers = false;\r\n this.pendingElements = [];\r\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n }\r\n\r\n extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);\r\n\r\n SVGCompElement.prototype.createComp = function (data) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n };\r\n\r\n function SVGRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.svgElement = createNS('svg');\r\n var ariaLabel = '';\r\n\r\n if (config && config.title) {\r\n var titleElement = createNS('title');\r\n var titleId = createElementID();\r\n titleElement.setAttribute('id', titleId);\r\n titleElement.textContent = config.title;\r\n this.svgElement.appendChild(titleElement);\r\n ariaLabel += titleId;\r\n }\r\n\r\n if (config && config.description) {\r\n var descElement = createNS('desc');\r\n var descId = createElementID();\r\n descElement.setAttribute('id', descId);\r\n descElement.textContent = config.description;\r\n this.svgElement.appendChild(descElement);\r\n ariaLabel += ' ' + descId;\r\n }\r\n\r\n if (ariaLabel) {\r\n this.svgElement.setAttribute('aria-labelledby', ariaLabel);\r\n }\r\n\r\n var defs = createNS('defs');\r\n this.svgElement.appendChild(defs);\r\n var maskElement = createNS('g');\r\n this.svgElement.appendChild(maskElement);\r\n this.layerElement = maskElement;\r\n this.renderConfig = {\r\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n contentVisibility: config && config.contentVisibility || 'visible',\r\n progressiveLoad: config && config.progressiveLoad || false,\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n viewBoxOnly: config && config.viewBoxOnly || false,\r\n viewBoxSize: config && config.viewBoxSize || false,\r\n className: config && config.className || '',\r\n id: config && config.id || '',\r\n focusable: config && config.focusable,\r\n filterSize: {\r\n width: config && config.filterSize && config.filterSize.width || '100%',\r\n height: config && config.filterSize && config.filterSize.height || '100%',\r\n x: config && config.filterSize && config.filterSize.x || '0%',\r\n y: config && config.filterSize && config.filterSize.y || '0%'\r\n },\r\n width: config && config.width,\r\n height: config && config.height,\r\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n defs: defs,\r\n renderConfig: this.renderConfig\r\n };\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.destroyed = false;\r\n this.rendererType = 'svg';\r\n }\r\n\r\n extendPrototype([SVGRendererBase], SVGRenderer);\r\n\r\n SVGRenderer.prototype.createComp = function (data) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n };\r\n\r\n function CVContextData() {\r\n this.saved = [];\r\n this.cArrPos = 0;\r\n this.cTr = new Matrix();\r\n this.cO = 1;\r\n var i;\r\n var len = 15;\r\n this.savedOp = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.saved[i] = createTypedArray('float32', 16);\r\n }\r\n\r\n this._length = len;\r\n }\r\n\r\n CVContextData.prototype.duplicate = function () {\r\n var newLength = this._length * 2;\r\n var currentSavedOp = this.savedOp;\r\n this.savedOp = createTypedArray('float32', newLength);\r\n this.savedOp.set(currentSavedOp);\r\n var i = 0;\r\n\r\n for (i = this._length; i < newLength; i += 1) {\r\n this.saved[i] = createTypedArray('float32', 16);\r\n }\r\n\r\n this._length = newLength;\r\n };\r\n\r\n CVContextData.prototype.reset = function () {\r\n this.cArrPos = 0;\r\n this.cTr.reset();\r\n this.cO = 1;\r\n };\r\n\r\n function ShapeTransformManager() {\r\n this.sequences = {};\r\n this.sequenceList = [];\r\n this.transform_key_count = 0;\r\n }\r\n\r\n ShapeTransformManager.prototype = {\r\n addTransformSequence: function addTransformSequence(transforms) {\r\n var i;\r\n var len = transforms.length;\r\n var key = '_';\r\n\r\n for (i = 0; i < len; i += 1) {\r\n key += transforms[i].transform.key + '_';\r\n }\r\n\r\n var sequence = this.sequences[key];\r\n\r\n if (!sequence) {\r\n sequence = {\r\n transforms: [].concat(transforms),\r\n finalTransform: new Matrix(),\r\n _mdf: false\r\n };\r\n this.sequences[key] = sequence;\r\n this.sequenceList.push(sequence);\r\n }\r\n\r\n return sequence;\r\n },\r\n processSequence: function processSequence(sequence, isFirstFrame) {\r\n var i = 0;\r\n var len = sequence.transforms.length;\r\n var _mdf = isFirstFrame;\r\n\r\n while (i < len && !isFirstFrame) {\r\n if (sequence.transforms[i].transform.mProps._mdf) {\r\n _mdf = true;\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (_mdf) {\r\n var props;\r\n sequence.finalTransform.reset();\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n props = sequence.transforms[i].transform.mProps.v.props;\r\n sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n }\r\n }\r\n\r\n sequence._mdf = _mdf;\r\n },\r\n processSequences: function processSequences(isFirstFrame) {\r\n var i;\r\n var len = this.sequenceList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.processSequence(this.sequenceList[i], isFirstFrame);\r\n }\r\n },\r\n getNewKey: function getNewKey() {\r\n this.transform_key_count += 1;\r\n return '_' + this.transform_key_count;\r\n }\r\n };\r\n\r\n function CVEffects() {}\r\n\r\n CVEffects.prototype.renderFrame = function () {};\r\n\r\n function CVMaskElement(data, element) {\r\n this.data = data;\r\n this.element = element;\r\n this.masksProperties = this.data.masksProperties || [];\r\n this.viewData = createSizedArray(this.masksProperties.length);\r\n var i;\r\n var len = this.masksProperties.length;\r\n var hasMasks = false;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.masksProperties[i].mode !== 'n') {\r\n hasMasks = true;\r\n }\r\n\r\n this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\r\n }\r\n\r\n this.hasMasks = hasMasks;\r\n\r\n if (hasMasks) {\r\n this.element.addRenderableComponent(this);\r\n }\r\n }\r\n\r\n CVMaskElement.prototype.renderFrame = function () {\r\n if (!this.hasMasks) {\r\n return;\r\n }\r\n\r\n var transform = this.element.finalTransform.mat;\r\n var ctx = this.element.canvasContext;\r\n var i;\r\n var len = this.masksProperties.length;\r\n var pt;\r\n var pts;\r\n var data;\r\n ctx.beginPath();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.masksProperties[i].mode !== 'n') {\r\n if (this.masksProperties[i].inv) {\r\n ctx.moveTo(0, 0);\r\n ctx.lineTo(this.element.globalData.compSize.w, 0);\r\n ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\r\n ctx.lineTo(0, this.element.globalData.compSize.h);\r\n ctx.lineTo(0, 0);\r\n }\r\n\r\n data = this.viewData[i].v;\r\n pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\r\n ctx.moveTo(pt[0], pt[1]);\r\n var j;\r\n var jLen = data._length;\r\n\r\n for (j = 1; j < jLen; j += 1) {\r\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\r\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n }\r\n\r\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\r\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n }\r\n }\r\n\r\n this.element.globalData.renderer.save(true);\r\n ctx.clip();\r\n };\r\n\r\n CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\r\n\r\n CVMaskElement.prototype.destroy = function () {\r\n this.element = null;\r\n };\r\n\r\n function CVBaseElement() {}\r\n\r\n CVBaseElement.prototype = {\r\n createElements: function createElements() {},\r\n initRendererElement: function initRendererElement() {},\r\n createContainerElements: function createContainerElements() {\r\n this.canvasContext = this.globalData.canvasContext;\r\n this.renderableEffectsManager = new CVEffects(this);\r\n },\r\n createContent: function createContent() {},\r\n setBlendMode: function setBlendMode() {\r\n var globalData = this.globalData;\r\n\r\n if (globalData.blendMode !== this.data.bm) {\r\n globalData.blendMode = this.data.bm;\r\n var blendModeValue = getBlendMode(this.data.bm);\r\n globalData.canvasContext.globalCompositeOperation = blendModeValue;\r\n }\r\n },\r\n createRenderableComponents: function createRenderableComponents() {\r\n this.maskManager = new CVMaskElement(this.data, this);\r\n },\r\n hideElement: function hideElement() {\r\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n this.hidden = true;\r\n }\r\n },\r\n showElement: function showElement() {\r\n if (this.isInRange && !this.isTransparent) {\r\n this.hidden = false;\r\n this._isFirstFrame = true;\r\n this.maskManager._isFirstFrame = true;\r\n }\r\n },\r\n renderFrame: function renderFrame() {\r\n if (this.hidden || this.data.hd) {\r\n return;\r\n }\r\n\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.setBlendMode();\r\n var forceRealStack = this.data.ty === 0;\r\n this.globalData.renderer.save(forceRealStack);\r\n this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);\r\n this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);\r\n this.renderInnerContent();\r\n this.globalData.renderer.restore(forceRealStack);\r\n\r\n if (this.maskManager.hasMasks) {\r\n this.globalData.renderer.restore(true);\r\n }\r\n\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n destroy: function destroy() {\r\n this.canvasContext = null;\r\n this.data = null;\r\n this.globalData = null;\r\n this.maskManager.destroy();\r\n },\r\n mHelper: new Matrix()\r\n };\r\n CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\r\n CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\r\n\r\n function CVShapeData(element, data, styles, transformsManager) {\r\n this.styledShapes = [];\r\n this.tr = [0, 0, 0, 0, 0, 0];\r\n var ty = 4;\r\n\r\n if (data.ty === 'rc') {\r\n ty = 5;\r\n } else if (data.ty === 'el') {\r\n ty = 6;\r\n } else if (data.ty === 'sr') {\r\n ty = 7;\r\n }\r\n\r\n this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\r\n var i;\r\n var len = styles.length;\r\n var styledShape;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!styles[i].closed) {\r\n styledShape = {\r\n transforms: transformsManager.addTransformSequence(styles[i].transforms),\r\n trNodes: []\r\n };\r\n this.styledShapes.push(styledShape);\r\n styles[i].elements.push(styledShape);\r\n }\r\n }\r\n }\r\n\r\n CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\r\n\r\n function CVShapeElement(data, globalData, comp) {\r\n this.shapes = [];\r\n this.shapesData = data.shapes;\r\n this.stylesList = [];\r\n this.itemsData = [];\r\n this.prevViewData = [];\r\n this.shapeModifiers = [];\r\n this.processedElements = [];\r\n this.transformsManager = new ShapeTransformManager();\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\r\n CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\r\n CVShapeElement.prototype.transformHelper = {\r\n opacity: 1,\r\n _opMdf: false\r\n };\r\n CVShapeElement.prototype.dashResetter = [];\r\n\r\n CVShapeElement.prototype.createContent = function () {\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n };\r\n\r\n CVShapeElement.prototype.createStyleElement = function (data, transforms) {\r\n var styleElem = {\r\n data: data,\r\n type: data.ty,\r\n preTransforms: this.transformsManager.addTransformSequence(transforms),\r\n transforms: [],\r\n elements: [],\r\n closed: data.hd === true\r\n };\r\n var elementData = {};\r\n\r\n if (data.ty === 'fl' || data.ty === 'st') {\r\n elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\r\n\r\n if (!elementData.c.k) {\r\n styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\r\n }\r\n } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\r\n elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\r\n elementData.h = PropertyFactory.getProp(this, data.h || {\r\n k: 0\r\n }, 0, 0.01, this);\r\n elementData.a = PropertyFactory.getProp(this, data.a || {\r\n k: 0\r\n }, 0, degToRads, this);\r\n elementData.g = new GradientProperty(this, data.g, this);\r\n }\r\n\r\n elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\r\n\r\n if (data.ty === 'st' || data.ty === 'gs') {\r\n styleElem.lc = lineCapEnum[data.lc || 2];\r\n styleElem.lj = lineJoinEnum[data.lj || 2];\r\n\r\n if (data.lj == 1) {\r\n // eslint-disable-line eqeqeq\r\n styleElem.ml = data.ml;\r\n }\r\n\r\n elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\r\n\r\n if (!elementData.w.k) {\r\n styleElem.wi = elementData.w.v;\r\n }\r\n\r\n if (data.d) {\r\n var d = new DashProperty(this, data.d, 'canvas', this);\r\n elementData.d = d;\r\n\r\n if (!elementData.d.k) {\r\n styleElem.da = elementData.d.dashArray;\r\n styleElem[\"do\"] = elementData.d.dashoffset[0];\r\n }\r\n }\r\n } else {\r\n styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\r\n }\r\n\r\n this.stylesList.push(styleElem);\r\n elementData.style = styleElem;\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.createGroupElement = function () {\r\n var elementData = {\r\n it: [],\r\n prevViewData: []\r\n };\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.createTransformElement = function (data) {\r\n var elementData = {\r\n transform: {\r\n opacity: 1,\r\n _opMdf: false,\r\n key: this.transformsManager.getNewKey(),\r\n op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\r\n mProps: TransformPropertyFactory.getTransformProperty(this, data, this)\r\n }\r\n };\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.createShapeElement = function (data) {\r\n var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\r\n this.shapes.push(elementData);\r\n this.addShapeToModifiers(elementData);\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.reloadShapes = function () {\r\n this._isFirstFrame = true;\r\n var i;\r\n var len = this.itemsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.prevViewData[i] = this.itemsData[i];\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n }\r\n\r\n this.renderModifiers();\r\n this.transformsManager.processSequences(this._isFirstFrame);\r\n };\r\n\r\n CVShapeElement.prototype.addTransformToStyleList = function (transform) {\r\n var i;\r\n var len = this.stylesList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.stylesList[i].closed) {\r\n this.stylesList[i].transforms.push(transform);\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.removeTransformFromStyleList = function () {\r\n var i;\r\n var len = this.stylesList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.stylesList[i].closed) {\r\n this.stylesList[i].transforms.pop();\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.closeStyles = function (styles) {\r\n var i;\r\n var len = styles.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n styles[i].closed = true;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\r\n var i;\r\n var len = arr.length - 1;\r\n var j;\r\n var jLen;\r\n var ownStyles = [];\r\n var ownModifiers = [];\r\n var processedPos;\r\n var modifier;\r\n var currentTransform;\r\n var ownTransforms = [].concat(transforms);\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n processedPos = this.searchProcessedElement(arr[i]);\r\n\r\n if (!processedPos) {\r\n arr[i]._shouldRender = shouldRender;\r\n } else {\r\n itemsData[i] = prevViewData[processedPos - 1];\r\n }\r\n\r\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\r\n } else {\r\n itemsData[i].style.closed = false;\r\n }\r\n\r\n ownStyles.push(itemsData[i].style);\r\n } else if (arr[i].ty === 'gr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createGroupElement(arr[i]);\r\n } else {\r\n jLen = itemsData[i].it.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n }\r\n }\r\n\r\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\r\n } else if (arr[i].ty === 'tr') {\r\n if (!processedPos) {\r\n currentTransform = this.createTransformElement(arr[i]);\r\n itemsData[i] = currentTransform;\r\n }\r\n\r\n ownTransforms.push(itemsData[i]);\r\n this.addTransformToStyleList(itemsData[i]);\r\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createShapeElement(arr[i]);\r\n }\r\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n modifier.init(this, arr[i]);\r\n itemsData[i] = modifier;\r\n this.shapeModifiers.push(modifier);\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = false;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n } else if (arr[i].ty === 'rp') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n itemsData[i] = modifier;\r\n modifier.init(this, arr, i, itemsData);\r\n this.shapeModifiers.push(modifier);\r\n shouldRender = false;\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = true;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n }\r\n\r\n this.addProcessedElement(arr[i], i + 1);\r\n }\r\n\r\n this.removeTransformFromStyleList();\r\n this.closeStyles(ownStyles);\r\n len = ownModifiers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ownModifiers[i].closed = true;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderInnerContent = function () {\r\n this.transformHelper.opacity = 1;\r\n this.transformHelper._opMdf = false;\r\n this.renderModifiers();\r\n this.transformsManager.processSequences(this._isFirstFrame);\r\n this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\r\n };\r\n\r\n CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\r\n if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\r\n groupTransform.opacity = parentTransform.opacity;\r\n groupTransform.opacity *= groupTransform.op.v;\r\n groupTransform._opMdf = true;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.drawLayer = function () {\r\n var i;\r\n var len = this.stylesList.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n var elems;\r\n var nodes;\r\n var renderer = this.globalData.renderer;\r\n var ctx = this.globalData.canvasContext;\r\n var type;\r\n var currentStyle;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n currentStyle = this.stylesList[i];\r\n type = currentStyle.type; // Skipping style when\r\n // Stroke width equals 0\r\n // style should not be rendered (extra unused repeaters)\r\n // current opacity equals 0\r\n // global opacity equals 0\r\n\r\n if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\r\n renderer.save();\r\n elems = currentStyle.elements;\r\n\r\n if (type === 'st' || type === 'gs') {\r\n ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\r\n ctx.lineWidth = currentStyle.wi;\r\n ctx.lineCap = currentStyle.lc;\r\n ctx.lineJoin = currentStyle.lj;\r\n ctx.miterLimit = currentStyle.ml || 0;\r\n } else {\r\n ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\r\n }\r\n\r\n renderer.ctxOpacity(currentStyle.coOp);\r\n\r\n if (type !== 'st' && type !== 'gs') {\r\n ctx.beginPath();\r\n }\r\n\r\n renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\r\n jLen = elems.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (type === 'st' || type === 'gs') {\r\n ctx.beginPath();\r\n\r\n if (currentStyle.da) {\r\n ctx.setLineDash(currentStyle.da);\r\n ctx.lineDashOffset = currentStyle[\"do\"];\r\n }\r\n }\r\n\r\n nodes = elems[j].trNodes;\r\n kLen = nodes.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (nodes[k].t === 'm') {\r\n ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\r\n } else if (nodes[k].t === 'c') {\r\n ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\r\n } else {\r\n ctx.closePath();\r\n }\r\n }\r\n\r\n if (type === 'st' || type === 'gs') {\r\n ctx.stroke();\r\n\r\n if (currentStyle.da) {\r\n ctx.setLineDash(this.dashResetter);\r\n }\r\n }\r\n }\r\n\r\n if (type !== 'st' && type !== 'gs') {\r\n ctx.fill(currentStyle.r);\r\n }\r\n\r\n renderer.restore();\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\r\n var i;\r\n var len = items.length - 1;\r\n var groupTransform;\r\n groupTransform = parentTransform;\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n if (items[i].ty === 'tr') {\r\n groupTransform = data[i].transform;\r\n this.renderShapeTransform(parentTransform, groupTransform);\r\n } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\r\n this.renderPath(items[i], data[i]);\r\n } else if (items[i].ty === 'fl') {\r\n this.renderFill(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'st') {\r\n this.renderStroke(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\r\n this.renderGradientFill(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'gr') {\r\n this.renderShape(groupTransform, items[i].it, data[i].it);\r\n } else if (items[i].ty === 'tm') {//\r\n }\r\n }\r\n\r\n if (isMain) {\r\n this.drawLayer();\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\r\n if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\r\n var shapeNodes = styledShape.trNodes;\r\n var paths = shape.paths;\r\n var i;\r\n var len;\r\n var j;\r\n var jLen = paths._length;\r\n shapeNodes.length = 0;\r\n var groupTransformMat = styledShape.transforms.finalTransform;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n var pathNodes = paths.shapes[j];\r\n\r\n if (pathNodes && pathNodes.v) {\r\n len = pathNodes._length;\r\n\r\n for (i = 1; i < len; i += 1) {\r\n if (i === 1) {\r\n shapeNodes.push({\r\n t: 'm',\r\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\r\n });\r\n }\r\n\r\n shapeNodes.push({\r\n t: 'c',\r\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])\r\n });\r\n }\r\n\r\n if (len === 1) {\r\n shapeNodes.push({\r\n t: 'm',\r\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\r\n });\r\n }\r\n\r\n if (pathNodes.c && len) {\r\n shapeNodes.push({\r\n t: 'c',\r\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])\r\n });\r\n shapeNodes.push({\r\n t: 'z'\r\n });\r\n }\r\n }\r\n }\r\n\r\n styledShape.trNodes = shapeNodes;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderPath = function (pathData, itemData) {\r\n if (pathData.hd !== true && pathData._shouldRender) {\r\n var i;\r\n var len = itemData.styledShapes.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n\r\n if (itemData.c._mdf || this._isFirstFrame) {\r\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n }\r\n\r\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n var grd;\r\n\r\n if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {\r\n var ctx = this.globalData.canvasContext;\r\n var pt1 = itemData.s.v;\r\n var pt2 = itemData.e.v;\r\n\r\n if (styleData.t === 1) {\r\n grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\r\n } else {\r\n var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n var percent = itemData.h.v;\r\n\r\n if (percent >= 1) {\r\n percent = 0.99;\r\n } else if (percent <= -1) {\r\n percent = -0.99;\r\n }\r\n\r\n var dist = rad * percent;\r\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\r\n }\r\n\r\n var i;\r\n var len = styleData.g.p;\r\n var cValues = itemData.g.c;\r\n var opacity = 1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (itemData.g._hasOpacity && itemData.g._collapsable) {\r\n opacity = itemData.g.o[i * 2 + 1];\r\n }\r\n\r\n grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\r\n }\r\n\r\n styleElem.grd = grd;\r\n }\r\n\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n };\r\n\r\n CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n var d = itemData.d;\r\n\r\n if (d && (d._mdf || this._isFirstFrame)) {\r\n styleElem.da = d.dashArray;\r\n styleElem[\"do\"] = d.dashoffset[0];\r\n }\r\n\r\n if (itemData.c._mdf || this._isFirstFrame) {\r\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n }\r\n\r\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n }\r\n\r\n if (itemData.w._mdf || this._isFirstFrame) {\r\n styleElem.wi = itemData.w.v;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.destroy = function () {\r\n this.shapesData = null;\r\n this.globalData = null;\r\n this.canvasContext = null;\r\n this.stylesList.length = 0;\r\n this.itemsData.length = 0;\r\n };\r\n\r\n function CVTextElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.yOffset = 0;\r\n this.fillColorAnim = false;\r\n this.strokeColorAnim = false;\r\n this.strokeWidthAnim = false;\r\n this.stroke = false;\r\n this.fill = false;\r\n this.justifyOffset = 0;\r\n this.currentRender = null;\r\n this.renderType = 'canvas';\r\n this.values = {\r\n fill: 'rgba(0,0,0,0)',\r\n stroke: 'rgba(0,0,0,0)',\r\n sWidth: 0,\r\n fValue: ''\r\n };\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\r\n CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\r\n\r\n CVTextElement.prototype.buildNewText = function () {\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n var hasFill = false;\r\n\r\n if (documentData.fc) {\r\n hasFill = true;\r\n this.values.fill = this.buildColor(documentData.fc);\r\n } else {\r\n this.values.fill = 'rgba(0,0,0,0)';\r\n }\r\n\r\n this.fill = hasFill;\r\n var hasStroke = false;\r\n\r\n if (documentData.sc) {\r\n hasStroke = true;\r\n this.values.stroke = this.buildColor(documentData.sc);\r\n this.values.sWidth = documentData.sw;\r\n }\r\n\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n var matrixHelper = this.mHelper;\r\n this.stroke = hasStroke;\r\n this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\r\n len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;\r\n\r\n var charData;\r\n var shapeData;\r\n var k;\r\n var kLen;\r\n var shapes;\r\n var j;\r\n var jLen;\r\n var pathNodes;\r\n var commands;\r\n var pathArr;\r\n var singleShape = this.data.singleShape;\r\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n var xPos = 0;\r\n var yPos = 0;\r\n var firstLine = true;\r\n var cnt = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n shapeData = charData && charData.data || {};\r\n matrixHelper.reset();\r\n\r\n if (singleShape && letters[i].n) {\r\n xPos = -trackingOffset;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n firstLine = false;\r\n }\r\n\r\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\r\n jLen = shapes.length;\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n\r\n if (singleShape) {\r\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n }\r\n\r\n commands = createSizedArray(jLen - 1);\r\n var commandsCounter = 0;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[j].ty === 'sh') {\r\n kLen = shapes[j].ks.k.i.length;\r\n pathNodes = shapes[j].ks.k;\r\n pathArr = [];\r\n\r\n for (k = 1; k < kLen; k += 1) {\r\n if (k === 1) {\r\n pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n }\r\n\r\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\r\n }\r\n\r\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n commands[commandsCounter] = pathArr;\r\n commandsCounter += 1;\r\n }\r\n }\r\n\r\n if (singleShape) {\r\n xPos += letters[i].l;\r\n xPos += trackingOffset;\r\n }\r\n\r\n if (this.textSpans[cnt]) {\r\n this.textSpans[cnt].elem = commands;\r\n } else {\r\n this.textSpans[cnt] = {\r\n elem: commands\r\n };\r\n }\r\n\r\n cnt += 1;\r\n }\r\n };\r\n\r\n CVTextElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.font = this.values.fValue;\r\n ctx.lineCap = 'butt';\r\n ctx.lineJoin = 'miter';\r\n ctx.miterLimit = 4;\r\n\r\n if (!this.data.singleShape) {\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n }\r\n\r\n var i;\r\n var len;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n var letters = this.textProperty.currentData.l;\r\n len = letters.length;\r\n var renderedLetter;\r\n var lastFill = null;\r\n var lastStroke = null;\r\n var lastStrokeW = null;\r\n var commands;\r\n var pathArr;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!letters[i].n) {\r\n renderedLetter = renderedLetters[i];\r\n\r\n if (renderedLetter) {\r\n this.globalData.renderer.save();\r\n this.globalData.renderer.ctxTransform(renderedLetter.p);\r\n this.globalData.renderer.ctxOpacity(renderedLetter.o);\r\n }\r\n\r\n if (this.fill) {\r\n if (renderedLetter && renderedLetter.fc) {\r\n if (lastFill !== renderedLetter.fc) {\r\n lastFill = renderedLetter.fc;\r\n ctx.fillStyle = renderedLetter.fc;\r\n }\r\n } else if (lastFill !== this.values.fill) {\r\n lastFill = this.values.fill;\r\n ctx.fillStyle = this.values.fill;\r\n }\r\n\r\n commands = this.textSpans[i].elem;\r\n jLen = commands.length;\r\n this.globalData.canvasContext.beginPath();\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathArr = commands[j];\r\n kLen = pathArr.length;\r\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n\r\n for (k = 2; k < kLen; k += 6) {\r\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n }\r\n }\r\n\r\n this.globalData.canvasContext.closePath();\r\n this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);\r\n }\r\n\r\n if (this.stroke) {\r\n if (renderedLetter && renderedLetter.sw) {\r\n if (lastStrokeW !== renderedLetter.sw) {\r\n lastStrokeW = renderedLetter.sw;\r\n ctx.lineWidth = renderedLetter.sw;\r\n }\r\n } else if (lastStrokeW !== this.values.sWidth) {\r\n lastStrokeW = this.values.sWidth;\r\n ctx.lineWidth = this.values.sWidth;\r\n }\r\n\r\n if (renderedLetter && renderedLetter.sc) {\r\n if (lastStroke !== renderedLetter.sc) {\r\n lastStroke = renderedLetter.sc;\r\n ctx.strokeStyle = renderedLetter.sc;\r\n }\r\n } else if (lastStroke !== this.values.stroke) {\r\n lastStroke = this.values.stroke;\r\n ctx.strokeStyle = this.values.stroke;\r\n }\r\n\r\n commands = this.textSpans[i].elem;\r\n jLen = commands.length;\r\n this.globalData.canvasContext.beginPath();\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathArr = commands[j];\r\n kLen = pathArr.length;\r\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n\r\n for (k = 2; k < kLen; k += 6) {\r\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n }\r\n }\r\n\r\n this.globalData.canvasContext.closePath();\r\n this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);\r\n }\r\n\r\n if (renderedLetter) {\r\n this.globalData.renderer.restore();\r\n }\r\n }\r\n }\r\n };\r\n\r\n function CVImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.img = globalData.imageLoader.getAsset(this.assetData);\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\r\n CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\n CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\n CVImageElement.prototype.createContent = function () {\r\n if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\r\n var canvas = createTag('canvas');\r\n canvas.width = this.assetData.w;\r\n canvas.height = this.assetData.h;\r\n var ctx = canvas.getContext('2d');\r\n var imgW = this.img.width;\r\n var imgH = this.img.height;\r\n var imgRel = imgW / imgH;\r\n var canvasRel = this.assetData.w / this.assetData.h;\r\n var widthCrop;\r\n var heightCrop;\r\n var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\r\n\r\n if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {\r\n heightCrop = imgH;\r\n widthCrop = heightCrop * canvasRel;\r\n } else {\r\n widthCrop = imgW;\r\n heightCrop = widthCrop / canvasRel;\r\n }\r\n\r\n ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\r\n this.img = canvas;\r\n }\r\n };\r\n\r\n CVImageElement.prototype.renderInnerContent = function () {\r\n this.canvasContext.drawImage(this.img, 0, 0);\r\n };\r\n\r\n CVImageElement.prototype.destroy = function () {\r\n this.img = null;\r\n };\r\n\r\n function CVSolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\r\n CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\n CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\n CVSolidElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.fillStyle = this.data.sc;\r\n ctx.fillRect(0, 0, this.data.sw, this.data.sh); //\r\n };\r\n\r\n function CanvasRendererBase(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.renderConfig = {\r\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\r\n context: config && config.context || null,\r\n progressiveLoad: config && config.progressiveLoad || false,\r\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n contentVisibility: config && config.contentVisibility || 'visible',\r\n className: config && config.className || '',\r\n id: config && config.id || ''\r\n };\r\n this.renderConfig.dpr = config && config.dpr || 1;\r\n\r\n if (this.animationItem.wrapper) {\r\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\r\n }\r\n\r\n this.renderedFrame = -1;\r\n this.globalData = {\r\n frameNum: -1,\r\n _mdf: false,\r\n renderConfig: this.renderConfig,\r\n currentGlobalAlpha: -1\r\n };\r\n this.contextData = new CVContextData();\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.transformMat = new Matrix();\r\n this.completeLayers = false;\r\n this.rendererType = 'canvas';\r\n }\r\n\r\n extendPrototype([BaseRenderer], CanvasRendererBase);\r\n\r\n CanvasRendererBase.prototype.createShape = function (data) {\r\n return new CVShapeElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createText = function (data) {\r\n return new CVTextElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createImage = function (data) {\r\n return new CVImageElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createSolid = function (data) {\r\n return new CVSolidElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\n CanvasRendererBase.prototype.ctxTransform = function (props) {\r\n if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\r\n return;\r\n }\r\n\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\r\n return;\r\n }\r\n\r\n this.transformMat.cloneFromProps(props);\r\n var cProps = this.contextData.cTr.props;\r\n this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]); // this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);\r\n\r\n this.contextData.cTr.cloneFromProps(this.transformMat.props);\r\n var trProps = this.contextData.cTr.props;\r\n this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\r\n };\r\n\r\n CanvasRendererBase.prototype.ctxOpacity = function (op) {\r\n /* if(op === 1){\r\n return;\r\n } */\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\r\n this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n return;\r\n }\r\n\r\n this.contextData.cO *= op < 0 ? 0 : op;\r\n\r\n if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {\r\n this.canvasContext.globalAlpha = this.contextData.cO;\r\n this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.reset = function () {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.restore();\r\n return;\r\n }\r\n\r\n this.contextData.reset();\r\n };\r\n\r\n CanvasRendererBase.prototype.save = function (actionFlag) {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.save();\r\n return;\r\n }\r\n\r\n if (actionFlag) {\r\n this.canvasContext.save();\r\n }\r\n\r\n var props = this.contextData.cTr.props;\r\n\r\n if (this.contextData._length <= this.contextData.cArrPos) {\r\n this.contextData.duplicate();\r\n }\r\n\r\n var i;\r\n var arr = this.contextData.saved[this.contextData.cArrPos];\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n arr[i] = props[i];\r\n }\r\n\r\n this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;\r\n this.contextData.cArrPos += 1;\r\n };\r\n\r\n CanvasRendererBase.prototype.restore = function (actionFlag) {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.restore();\r\n return;\r\n }\r\n\r\n if (actionFlag) {\r\n this.canvasContext.restore();\r\n this.globalData.blendMode = 'source-over';\r\n }\r\n\r\n this.contextData.cArrPos -= 1;\r\n var popped = this.contextData.saved[this.contextData.cArrPos];\r\n var i;\r\n var arr = this.contextData.cTr.props;\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n arr[i] = popped[i];\r\n }\r\n\r\n this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);\r\n popped = this.contextData.savedOp[this.contextData.cArrPos];\r\n this.contextData.cO = popped;\r\n\r\n if (this.globalData.currentGlobalAlpha !== popped) {\r\n this.canvasContext.globalAlpha = popped;\r\n this.globalData.currentGlobalAlpha = popped;\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.configAnimation = function (animData) {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.container = createTag('canvas');\r\n var containerStyle = this.animationItem.container.style;\r\n containerStyle.width = '100%';\r\n containerStyle.height = '100%';\r\n var origin = '0px 0px 0px';\r\n containerStyle.transformOrigin = origin;\r\n containerStyle.mozTransformOrigin = origin;\r\n containerStyle.webkitTransformOrigin = origin;\r\n containerStyle['-webkit-transform'] = origin;\r\n containerStyle.contentVisibility = this.renderConfig.contentVisibility;\r\n this.animationItem.wrapper.appendChild(this.animationItem.container);\r\n this.canvasContext = this.animationItem.container.getContext('2d');\r\n\r\n if (this.renderConfig.className) {\r\n this.animationItem.container.setAttribute('class', this.renderConfig.className);\r\n }\r\n\r\n if (this.renderConfig.id) {\r\n this.animationItem.container.setAttribute('id', this.renderConfig.id);\r\n }\r\n } else {\r\n this.canvasContext = this.renderConfig.context;\r\n }\r\n\r\n this.data = animData;\r\n this.layers = animData.layers;\r\n this.transformCanvas = {\r\n w: animData.w,\r\n h: animData.h,\r\n sx: 0,\r\n sy: 0,\r\n tx: 0,\r\n ty: 0\r\n };\r\n this.setupGlobalData(animData, document.body);\r\n this.globalData.canvasContext = this.canvasContext;\r\n this.globalData.renderer = this;\r\n this.globalData.isDashed = false;\r\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n this.globalData.transformCanvas = this.transformCanvas;\r\n this.elements = createSizedArray(animData.layers.length);\r\n this.updateContainerSize();\r\n };\r\n\r\n CanvasRendererBase.prototype.updateContainerSize = function (width, height) {\r\n this.reset();\r\n var elementWidth;\r\n var elementHeight;\r\n\r\n if (width) {\r\n elementWidth = width;\r\n elementHeight = height;\r\n this.canvasContext.canvas.width = elementWidth;\r\n this.canvasContext.canvas.height = elementHeight;\r\n } else {\r\n if (this.animationItem.wrapper && this.animationItem.container) {\r\n elementWidth = this.animationItem.wrapper.offsetWidth;\r\n elementHeight = this.animationItem.wrapper.offsetHeight;\r\n } else {\r\n elementWidth = this.canvasContext.canvas.width;\r\n elementHeight = this.canvasContext.canvas.height;\r\n }\r\n\r\n this.canvasContext.canvas.width = elementWidth * this.renderConfig.dpr;\r\n this.canvasContext.canvas.height = elementHeight * this.renderConfig.dpr;\r\n }\r\n\r\n var elementRel;\r\n var animationRel;\r\n\r\n if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\r\n var par = this.renderConfig.preserveAspectRatio.split(' ');\r\n var fillType = par[1] || 'meet';\r\n var pos = par[0] || 'xMidYMid';\r\n var xPos = pos.substr(0, 4);\r\n var yPos = pos.substr(4);\r\n elementRel = elementWidth / elementHeight;\r\n animationRel = this.transformCanvas.w / this.transformCanvas.h;\r\n\r\n if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {\r\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n } else {\r\n this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n }\r\n\r\n if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\r\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;\r\n } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\r\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\r\n } else {\r\n this.transformCanvas.tx = 0;\r\n }\r\n\r\n if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\r\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;\r\n } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\r\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;\r\n } else {\r\n this.transformCanvas.ty = 0;\r\n }\r\n } else if (this.renderConfig.preserveAspectRatio === 'none') {\r\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n this.transformCanvas.tx = 0;\r\n this.transformCanvas.ty = 0;\r\n } else {\r\n this.transformCanvas.sx = this.renderConfig.dpr;\r\n this.transformCanvas.sy = this.renderConfig.dpr;\r\n this.transformCanvas.tx = 0;\r\n this.transformCanvas.ty = 0;\r\n }\r\n\r\n this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\r\n /* var i, len = this.elements.length;\r\n for(i=0;i<len;i+=1){\r\n if(this.elements[i] && this.elements[i].data.ty === 0){\r\n this.elements[i].resize(this.globalData.transformCanvas);\r\n }\r\n } */\r\n\r\n this.ctxTransform(this.transformCanvas.props);\r\n this.canvasContext.beginPath();\r\n this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n this.canvasContext.closePath();\r\n this.canvasContext.clip();\r\n this.renderFrame(this.renderedFrame, true);\r\n };\r\n\r\n CanvasRendererBase.prototype.destroy = function () {\r\n if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n\r\n this.elements.length = 0;\r\n this.globalData.canvasContext = null;\r\n this.animationItem.container = null;\r\n this.destroyed = true;\r\n };\r\n\r\n CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {\r\n if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {\r\n return;\r\n }\r\n\r\n this.renderedFrame = num;\r\n this.globalData.frameNum = num - this.animationItem._isFirstFrame;\r\n this.globalData.frameId += 1;\r\n this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\r\n this.globalData.projectInterface.currentFrame = num; // console.log('--------');\r\n // console.log('NEW: ',num);\r\n\r\n var i;\r\n var len = this.layers.length;\r\n\r\n if (!this.completeLayers) {\r\n this.checkLayers(num);\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(num - this.layers[i].st);\r\n }\r\n }\r\n\r\n if (this.globalData._mdf) {\r\n if (this.renderConfig.clearCanvas === true) {\r\n this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n } else {\r\n this.save();\r\n }\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n\r\n if (this.renderConfig.clearCanvas !== true) {\r\n this.restore();\r\n }\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.buildItem = function (pos) {\r\n var elements = this.elements;\r\n\r\n if (elements[pos] || this.layers[pos].ty === 99) {\r\n return;\r\n }\r\n\r\n var element = this.createItem(this.layers[pos], this, this.globalData);\r\n elements[pos] = element;\r\n element.initExpressions();\r\n /* if(this.layers[pos].ty === 0){\r\n element.resize(this.globalData.transformCanvas);\r\n } */\r\n };\r\n\r\n CanvasRendererBase.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.hide = function () {\r\n this.animationItem.container.style.display = 'none';\r\n };\r\n\r\n CanvasRendererBase.prototype.show = function () {\r\n this.animationItem.container.style.display = 'block';\r\n };\r\n\r\n function CVCompElement(data, globalData, comp) {\r\n this.completeLayers = false;\r\n this.layers = data.layers;\r\n this.pendingElements = [];\r\n this.elements = createSizedArray(this.layers.length);\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n }\r\n\r\n extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);\r\n\r\n CVCompElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.beginPath();\r\n ctx.moveTo(0, 0);\r\n ctx.lineTo(this.data.w, 0);\r\n ctx.lineTo(this.data.w, this.data.h);\r\n ctx.lineTo(0, this.data.h);\r\n ctx.lineTo(0, 0);\r\n ctx.clip();\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n };\r\n\r\n CVCompElement.prototype.destroy = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n\r\n this.layers = null;\r\n this.elements = null;\r\n };\r\n\r\n CVCompElement.prototype.createComp = function (data) {\r\n return new CVCompElement(data, this.globalData, this);\r\n };\r\n\r\n function CanvasRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.renderConfig = {\r\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\r\n context: config && config.context || null,\r\n progressiveLoad: config && config.progressiveLoad || false,\r\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n contentVisibility: config && config.contentVisibility || 'visible',\r\n className: config && config.className || '',\r\n id: config && config.id || '',\r\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n };\r\n this.renderConfig.dpr = config && config.dpr || 1;\r\n\r\n if (this.animationItem.wrapper) {\r\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\r\n }\r\n\r\n this.renderedFrame = -1;\r\n this.globalData = {\r\n frameNum: -1,\r\n _mdf: false,\r\n renderConfig: this.renderConfig,\r\n currentGlobalAlpha: -1\r\n };\r\n this.contextData = new CVContextData();\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.transformMat = new Matrix();\r\n this.completeLayers = false;\r\n this.rendererType = 'canvas';\r\n }\r\n\r\n extendPrototype([CanvasRendererBase], CanvasRenderer);\r\n\r\n CanvasRenderer.prototype.createComp = function (data) {\r\n return new CVCompElement(data, this.globalData, this);\r\n };\r\n\r\n function HBaseElement() {}\r\n\r\n HBaseElement.prototype = {\r\n checkBlendMode: function checkBlendMode() {},\r\n initRendererElement: function initRendererElement() {\r\n this.baseElement = createTag(this.data.tg || 'div');\r\n\r\n if (this.data.hasMask) {\r\n this.svgElement = createNS('svg');\r\n this.layerElement = createNS('g');\r\n this.maskedElement = this.layerElement;\r\n this.svgElement.appendChild(this.layerElement);\r\n this.baseElement.appendChild(this.svgElement);\r\n } else {\r\n this.layerElement = this.baseElement;\r\n }\r\n\r\n styleDiv(this.baseElement);\r\n },\r\n createContainerElements: function createContainerElements() {\r\n this.renderableEffectsManager = new CVEffects(this);\r\n this.transformedElement = this.baseElement;\r\n this.maskedElement = this.layerElement;\r\n\r\n if (this.data.ln) {\r\n this.layerElement.setAttribute('id', this.data.ln);\r\n }\r\n\r\n if (this.data.cl) {\r\n this.layerElement.setAttribute('class', this.data.cl);\r\n }\r\n\r\n if (this.data.bm !== 0) {\r\n this.setBlendMode();\r\n }\r\n },\r\n renderElement: function renderElement() {\r\n var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\r\n\r\n if (this.finalTransform._matMdf) {\r\n var matrixValue = this.finalTransform.mat.toCSS();\r\n transformedElementStyle.transform = matrixValue;\r\n transformedElementStyle.webkitTransform = matrixValue;\r\n }\r\n\r\n if (this.finalTransform._opMdf) {\r\n transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\r\n }\r\n },\r\n renderFrame: function renderFrame() {\r\n // If it is exported as hidden (data.hd === true) no need to render\r\n // If it is not visible no need to render\r\n if (this.data.hd || this.hidden) {\r\n return;\r\n }\r\n\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.renderElement();\r\n this.renderInnerContent();\r\n\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n destroy: function destroy() {\r\n this.layerElement = null;\r\n this.transformedElement = null;\r\n\r\n if (this.matteElement) {\r\n this.matteElement = null;\r\n }\r\n\r\n if (this.maskManager) {\r\n this.maskManager.destroy();\r\n this.maskManager = null;\r\n }\r\n },\r\n createRenderableComponents: function createRenderableComponents() {\r\n this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n },\r\n addEffects: function addEffects() {},\r\n setMatte: function setMatte() {}\r\n };\r\n HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\r\n HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\r\n HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;\r\n\r\n function HSolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\r\n\r\n HSolidElement.prototype.createContent = function () {\r\n var rect;\r\n\r\n if (this.data.hasMask) {\r\n rect = createNS('rect');\r\n rect.setAttribute('width', this.data.sw);\r\n rect.setAttribute('height', this.data.sh);\r\n rect.setAttribute('fill', this.data.sc);\r\n this.svgElement.setAttribute('width', this.data.sw);\r\n this.svgElement.setAttribute('height', this.data.sh);\r\n } else {\r\n rect = createTag('div');\r\n rect.style.width = this.data.sw + 'px';\r\n rect.style.height = this.data.sh + 'px';\r\n rect.style.backgroundColor = this.data.sc;\r\n }\r\n\r\n this.layerElement.appendChild(rect);\r\n };\r\n\r\n function HShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = []; // Full shape data\r\n\r\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\r\n\r\n this.stylesList = []; // List of modifiers that will be applied to shapes\r\n\r\n this.shapeModifiers = []; // List of items in shape tree\r\n\r\n this.itemsData = []; // List of items in previous shape tree\r\n\r\n this.processedElements = []; // List of animated components\r\n\r\n this.animatedContents = [];\r\n this.shapesContainer = createNS('g');\r\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n\r\n this.prevViewData = [];\r\n this.currentBBox = {\r\n x: 999999,\r\n y: -999999,\r\n h: 0,\r\n w: 0\r\n };\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\r\n HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\r\n\r\n HShapeElement.prototype.createContent = function () {\r\n var cont;\r\n this.baseElement.style.fontSize = 0;\r\n\r\n if (this.data.hasMask) {\r\n this.layerElement.appendChild(this.shapesContainer);\r\n cont = this.svgElement;\r\n } else {\r\n cont = createNS('svg');\r\n var size = this.comp.data ? this.comp.data : this.globalData.compSize;\r\n cont.setAttribute('width', size.w);\r\n cont.setAttribute('height', size.h);\r\n cont.appendChild(this.shapesContainer);\r\n this.layerElement.appendChild(cont);\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\r\n this.filterUniqueShapes();\r\n this.shapeCont = cont;\r\n };\r\n\r\n HShapeElement.prototype.getTransformedPoint = function (transformers, point) {\r\n var i;\r\n var len = transformers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\r\n }\r\n\r\n return point;\r\n };\r\n\r\n HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\r\n var shape = item.sh.v;\r\n var transformers = item.transformers;\r\n var i;\r\n var len = shape._length;\r\n var vPoint;\r\n var oPoint;\r\n var nextIPoint;\r\n var nextVPoint;\r\n\r\n if (len <= 1) {\r\n return;\r\n }\r\n\r\n for (i = 0; i < len - 1; i += 1) {\r\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\r\n nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\r\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n }\r\n\r\n if (shape.c) {\r\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\r\n nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\r\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n }\r\n };\r\n\r\n HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\r\n this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\r\n var bounds = this.shapeBoundingBox;\r\n boundingBox.x = bmMin(bounds.left, boundingBox.x);\r\n boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\r\n boundingBox.y = bmMin(bounds.top, boundingBox.y);\r\n boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\r\n };\r\n\r\n HShapeElement.prototype.shapeBoundingBox = {\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n };\r\n HShapeElement.prototype.tempBoundingBox = {\r\n x: 0,\r\n xMax: 0,\r\n y: 0,\r\n yMax: 0,\r\n width: 0,\r\n height: 0\r\n };\r\n\r\n HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\r\n var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\r\n\r\n for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {\r\n // eslint-disable-line no-plusplus\r\n b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\r\n a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\r\n c = 3 * p1[i] - 3 * p0[i];\r\n b |= 0; // eslint-disable-line no-bitwise\r\n\r\n a |= 0; // eslint-disable-line no-bitwise\r\n\r\n c |= 0; // eslint-disable-line no-bitwise\r\n\r\n if (a === 0 && b === 0) {//\r\n } else if (a === 0) {\r\n t = -c / b;\r\n\r\n if (t > 0 && t < 1) {\r\n bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\r\n }\r\n } else {\r\n b2ac = b * b - 4 * c * a;\r\n\r\n if (b2ac >= 0) {\r\n t1 = (-b + bmSqrt(b2ac)) / (2 * a);\r\n if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\r\n t2 = (-b - bmSqrt(b2ac)) / (2 * a);\r\n if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\r\n }\r\n }\r\n }\r\n\r\n this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\r\n this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\r\n this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\r\n this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\r\n };\r\n\r\n HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\r\n return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];\r\n };\r\n\r\n HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\r\n var i;\r\n var len = itemsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (itemsData[i] && itemsData[i].sh) {\r\n this.calculateShapeBoundingBox(itemsData[i], boundingBox);\r\n } else if (itemsData[i] && itemsData[i].it) {\r\n this.calculateBoundingBox(itemsData[i].it, boundingBox);\r\n } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) {\r\n this.expandStrokeBoundingBox(itemsData[i].w, boundingBox);\r\n }\r\n }\r\n };\r\n\r\n HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) {\r\n var width = 0;\r\n\r\n if (widthProperty.keyframes) {\r\n for (var i = 0; i < widthProperty.keyframes.length; i += 1) {\r\n var kfw = widthProperty.keyframes[i].s;\r\n\r\n if (kfw > width) {\r\n width = kfw;\r\n }\r\n }\r\n\r\n width *= widthProperty.mult;\r\n } else {\r\n width = widthProperty.v * widthProperty.mult;\r\n }\r\n\r\n boundingBox.x -= width;\r\n boundingBox.xMax += width;\r\n boundingBox.y -= width;\r\n boundingBox.yMax += width;\r\n };\r\n\r\n HShapeElement.prototype.currentBoxContains = function (box) {\r\n return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\r\n };\r\n\r\n HShapeElement.prototype.renderInnerContent = function () {\r\n this._renderShapeFrame();\r\n\r\n if (!this.hidden && (this._isFirstFrame || this._mdf)) {\r\n var tempBoundingBox = this.tempBoundingBox;\r\n var max = 999999;\r\n tempBoundingBox.x = max;\r\n tempBoundingBox.xMax = -max;\r\n tempBoundingBox.y = max;\r\n tempBoundingBox.yMax = -max;\r\n this.calculateBoundingBox(this.itemsData, tempBoundingBox);\r\n tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\r\n tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();\r\n\r\n if (this.currentBoxContains(tempBoundingBox)) {\r\n return;\r\n }\r\n\r\n var changed = false;\r\n\r\n if (this.currentBBox.w !== tempBoundingBox.width) {\r\n this.currentBBox.w = tempBoundingBox.width;\r\n this.shapeCont.setAttribute('width', tempBoundingBox.width);\r\n changed = true;\r\n }\r\n\r\n if (this.currentBBox.h !== tempBoundingBox.height) {\r\n this.currentBBox.h = tempBoundingBox.height;\r\n this.shapeCont.setAttribute('height', tempBoundingBox.height);\r\n changed = true;\r\n }\r\n\r\n if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\r\n this.currentBBox.w = tempBoundingBox.width;\r\n this.currentBBox.h = tempBoundingBox.height;\r\n this.currentBBox.x = tempBoundingBox.x;\r\n this.currentBBox.y = tempBoundingBox.y;\r\n this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n var shapeStyle = this.shapeCont.style;\r\n var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n shapeStyle.transform = shapeTransform;\r\n shapeStyle.webkitTransform = shapeTransform;\r\n }\r\n }\r\n };\r\n\r\n function HTextElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.textPaths = [];\r\n this.currentBBox = {\r\n x: 999999,\r\n y: -999999,\r\n h: 0,\r\n w: 0\r\n };\r\n this.renderType = 'svg';\r\n this.isMasked = false;\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\r\n\r\n HTextElement.prototype.createContent = function () {\r\n this.isMasked = this.checkMasks();\r\n\r\n if (this.isMasked) {\r\n this.renderType = 'svg';\r\n this.compW = this.comp.data.w;\r\n this.compH = this.comp.data.h;\r\n this.svgElement.setAttribute('width', this.compW);\r\n this.svgElement.setAttribute('height', this.compH);\r\n var g = createNS('g');\r\n this.maskedElement.appendChild(g);\r\n this.innerElem = g;\r\n } else {\r\n this.renderType = 'html';\r\n this.innerElem = this.layerElement;\r\n }\r\n\r\n this.checkParenting();\r\n };\r\n\r\n HTextElement.prototype.buildNewText = function () {\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n var innerElemStyle = this.innerElem.style;\r\n var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\r\n innerElemStyle.fill = textColor;\r\n innerElemStyle.color = textColor;\r\n\r\n if (documentData.sc) {\r\n innerElemStyle.stroke = this.buildColor(documentData.sc);\r\n innerElemStyle.strokeWidth = documentData.sw + 'px';\r\n }\r\n\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n\r\n if (!this.globalData.fontManager.chars) {\r\n innerElemStyle.fontSize = documentData.finalSize + 'px';\r\n innerElemStyle.lineHeight = documentData.finalSize + 'px';\r\n\r\n if (fontData.fClass) {\r\n this.innerElem.className = fontData.fClass;\r\n } else {\r\n innerElemStyle.fontFamily = fontData.fFamily;\r\n var fWeight = documentData.fWeight;\r\n var fStyle = documentData.fStyle;\r\n innerElemStyle.fontStyle = fStyle;\r\n innerElemStyle.fontWeight = fWeight;\r\n }\r\n }\r\n\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n len = letters.length;\r\n var tSpan;\r\n var tParent;\r\n var tCont;\r\n var matrixHelper = this.mHelper;\r\n var shapes;\r\n var shapeStr = '';\r\n var cnt = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.globalData.fontManager.chars) {\r\n if (!this.textPaths[cnt]) {\r\n tSpan = createNS('path');\r\n tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\r\n tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\r\n tSpan.setAttribute('stroke-miterlimit', '4');\r\n } else {\r\n tSpan = this.textPaths[cnt];\r\n }\r\n\r\n if (!this.isMasked) {\r\n if (this.textSpans[cnt]) {\r\n tParent = this.textSpans[cnt];\r\n tCont = tParent.children[0];\r\n } else {\r\n tParent = createTag('div');\r\n tParent.style.lineHeight = 0;\r\n tCont = createNS('svg');\r\n tCont.appendChild(tSpan);\r\n styleDiv(tParent);\r\n }\r\n }\r\n } else if (!this.isMasked) {\r\n if (this.textSpans[cnt]) {\r\n tParent = this.textSpans[cnt];\r\n tSpan = this.textPaths[cnt];\r\n } else {\r\n tParent = createTag('span');\r\n styleDiv(tParent);\r\n tSpan = createTag('span');\r\n styleDiv(tSpan);\r\n tParent.appendChild(tSpan);\r\n }\r\n } else {\r\n tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\r\n } // tSpan.setAttribute('visibility', 'hidden');\r\n\r\n\r\n if (this.globalData.fontManager.chars) {\r\n var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n var shapeData;\r\n\r\n if (charData) {\r\n shapeData = charData.data;\r\n } else {\r\n shapeData = null;\r\n }\r\n\r\n matrixHelper.reset();\r\n\r\n if (shapeData && shapeData.shapes && shapeData.shapes.length) {\r\n shapes = shapeData.shapes[0].it;\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n shapeStr = this.createPathShape(matrixHelper, shapes);\r\n tSpan.setAttribute('d', shapeStr);\r\n }\r\n\r\n if (!this.isMasked) {\r\n this.innerElem.appendChild(tParent);\r\n\r\n if (shapeData && shapeData.shapes) {\r\n // document.body.appendChild is needed to get exact measure of shape\r\n document.body.appendChild(tCont);\r\n var boundingBox = tCont.getBBox();\r\n tCont.setAttribute('width', boundingBox.width + 2);\r\n tCont.setAttribute('height', boundingBox.height + 2);\r\n tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\r\n var tContStyle = tCont.style;\r\n var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\r\n tContStyle.transform = tContTranslation;\r\n tContStyle.webkitTransform = tContTranslation;\r\n letters[i].yOffset = boundingBox.y - 1;\r\n } else {\r\n tCont.setAttribute('width', 1);\r\n tCont.setAttribute('height', 1);\r\n }\r\n\r\n tParent.appendChild(tCont);\r\n } else {\r\n this.innerElem.appendChild(tSpan);\r\n }\r\n } else {\r\n tSpan.textContent = letters[i].val;\r\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n\r\n if (!this.isMasked) {\r\n this.innerElem.appendChild(tParent); //\r\n\r\n var tStyle = tSpan.style;\r\n var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\r\n tStyle.transform = tSpanTranslation;\r\n tStyle.webkitTransform = tSpanTranslation;\r\n } else {\r\n this.innerElem.appendChild(tSpan);\r\n }\r\n } //\r\n\r\n\r\n if (!this.isMasked) {\r\n this.textSpans[cnt] = tParent;\r\n } else {\r\n this.textSpans[cnt] = tSpan;\r\n }\r\n\r\n this.textSpans[cnt].style.display = 'block';\r\n this.textPaths[cnt] = tSpan;\r\n cnt += 1;\r\n }\r\n\r\n while (cnt < this.textSpans.length) {\r\n this.textSpans[cnt].style.display = 'none';\r\n cnt += 1;\r\n }\r\n };\r\n\r\n HTextElement.prototype.renderInnerContent = function () {\r\n var svgStyle;\r\n\r\n if (this.data.singleShape) {\r\n if (!this._isFirstFrame && !this.lettersChangedFlag) {\r\n return;\r\n }\r\n\r\n if (this.isMasked && this.finalTransform._matMdf) {\r\n // Todo Benchmark if using this is better than getBBox\r\n this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\r\n svgStyle = this.svgElement.style;\r\n var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\r\n svgStyle.transform = translation;\r\n svgStyle.webkitTransform = translation;\r\n }\r\n }\r\n\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n\r\n if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\r\n return;\r\n }\r\n\r\n var i;\r\n var len;\r\n var count = 0;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n var letters = this.textProperty.currentData.l;\r\n len = letters.length;\r\n var renderedLetter;\r\n var textSpan;\r\n var textPath;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (letters[i].n) {\r\n count += 1;\r\n } else {\r\n textSpan = this.textSpans[i];\r\n textPath = this.textPaths[i];\r\n renderedLetter = renderedLetters[count];\r\n count += 1;\r\n\r\n if (renderedLetter._mdf.m) {\r\n if (!this.isMasked) {\r\n textSpan.style.webkitTransform = renderedLetter.m;\r\n textSpan.style.transform = renderedLetter.m;\r\n } else {\r\n textSpan.setAttribute('transform', renderedLetter.m);\r\n }\r\n } /// /textSpan.setAttribute('opacity',renderedLetter.o);\r\n\r\n\r\n textSpan.style.opacity = renderedLetter.o;\r\n\r\n if (renderedLetter.sw && renderedLetter._mdf.sw) {\r\n textPath.setAttribute('stroke-width', renderedLetter.sw);\r\n }\r\n\r\n if (renderedLetter.sc && renderedLetter._mdf.sc) {\r\n textPath.setAttribute('stroke', renderedLetter.sc);\r\n }\r\n\r\n if (renderedLetter.fc && renderedLetter._mdf.fc) {\r\n textPath.setAttribute('fill', renderedLetter.fc);\r\n textPath.style.color = renderedLetter.fc;\r\n }\r\n }\r\n }\r\n\r\n if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\r\n var boundingBox = this.innerElem.getBBox();\r\n\r\n if (this.currentBBox.w !== boundingBox.width) {\r\n this.currentBBox.w = boundingBox.width;\r\n this.svgElement.setAttribute('width', boundingBox.width);\r\n }\r\n\r\n if (this.currentBBox.h !== boundingBox.height) {\r\n this.currentBBox.h = boundingBox.height;\r\n this.svgElement.setAttribute('height', boundingBox.height);\r\n }\r\n\r\n var margin = 1;\r\n\r\n if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) {\r\n this.currentBBox.w = boundingBox.width + margin * 2;\r\n this.currentBBox.h = boundingBox.height + margin * 2;\r\n this.currentBBox.x = boundingBox.x - margin;\r\n this.currentBBox.y = boundingBox.y - margin;\r\n this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n svgStyle = this.svgElement.style;\r\n var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n svgStyle.transform = svgTransform;\r\n svgStyle.webkitTransform = svgTransform;\r\n }\r\n }\r\n };\r\n\r\n function HCameraElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initHierarchy();\r\n var getProp = PropertyFactory.getProp;\r\n this.pe = getProp(this, data.pe, 0, 0, this);\r\n\r\n if (data.ks.p.s) {\r\n this.px = getProp(this, data.ks.p.x, 1, 0, this);\r\n this.py = getProp(this, data.ks.p.y, 1, 0, this);\r\n this.pz = getProp(this, data.ks.p.z, 1, 0, this);\r\n } else {\r\n this.p = getProp(this, data.ks.p, 1, 0, this);\r\n }\r\n\r\n if (data.ks.a) {\r\n this.a = getProp(this, data.ks.a, 1, 0, this);\r\n }\r\n\r\n if (data.ks.or.k.length && data.ks.or.k[0].to) {\r\n var i;\r\n var len = data.ks.or.k.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n data.ks.or.k[i].to = null;\r\n data.ks.or.k[i].ti = null;\r\n }\r\n }\r\n\r\n this.or = getProp(this, data.ks.or, 1, degToRads, this);\r\n this.or.sh = true;\r\n this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\r\n this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\r\n this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\r\n this.mat = new Matrix();\r\n this._prevMat = new Matrix();\r\n this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\r\n\r\n this.finalTransform = {\r\n mProp: this\r\n };\r\n }\r\n\r\n extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\r\n\r\n HCameraElement.prototype.setup = function () {\r\n var i;\r\n var len = this.comp.threeDElements.length;\r\n var comp;\r\n var perspectiveStyle;\r\n var containerStyle;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n // [perspectiveElem,container]\r\n comp = this.comp.threeDElements[i];\r\n\r\n if (comp.type === '3d') {\r\n perspectiveStyle = comp.perspectiveElem.style;\r\n containerStyle = comp.container.style;\r\n var perspective = this.pe.v + 'px';\r\n var origin = '0px 0px 0px';\r\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n perspectiveStyle.perspective = perspective;\r\n perspectiveStyle.webkitPerspective = perspective;\r\n containerStyle.transformOrigin = origin;\r\n containerStyle.mozTransformOrigin = origin;\r\n containerStyle.webkitTransformOrigin = origin;\r\n perspectiveStyle.transform = matrix;\r\n perspectiveStyle.webkitTransform = matrix;\r\n }\r\n }\r\n };\r\n\r\n HCameraElement.prototype.createElements = function () {};\r\n\r\n HCameraElement.prototype.hide = function () {};\r\n\r\n HCameraElement.prototype.renderFrame = function () {\r\n var _mdf = this._isFirstFrame;\r\n var i;\r\n var len;\r\n\r\n if (this.hierarchy) {\r\n len = this.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\r\n }\r\n }\r\n\r\n if (_mdf || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) {\r\n this.mat.reset();\r\n\r\n if (this.hierarchy) {\r\n len = this.hierarchy.length - 1;\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n var mTransf = this.hierarchy[i].finalTransform.mProp;\r\n this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\r\n this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\r\n this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\r\n this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\r\n this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\r\n }\r\n }\r\n\r\n if (this.p) {\r\n this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\r\n } else {\r\n this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\r\n }\r\n\r\n if (this.a) {\r\n var diffVector;\r\n\r\n if (this.p) {\r\n diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\r\n } else {\r\n diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\r\n }\r\n\r\n var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\r\n\r\n var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\r\n var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\r\n var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);\r\n var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);\r\n this.mat.rotateY(mRotationY).rotateX(-mRotationX);\r\n }\r\n\r\n this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\r\n this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\r\n this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\r\n this.mat.translate(0, 0, this.pe.v);\r\n var hasMatrixChanged = !this._prevMat.equals(this.mat);\r\n\r\n if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\r\n len = this.comp.threeDElements.length;\r\n var comp;\r\n var perspectiveStyle;\r\n var containerStyle;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n comp = this.comp.threeDElements[i];\r\n\r\n if (comp.type === '3d') {\r\n if (hasMatrixChanged) {\r\n var matValue = this.mat.toCSS();\r\n containerStyle = comp.container.style;\r\n containerStyle.transform = matValue;\r\n containerStyle.webkitTransform = matValue;\r\n }\r\n\r\n if (this.pe._mdf) {\r\n perspectiveStyle = comp.perspectiveElem.style;\r\n perspectiveStyle.perspective = this.pe.v + 'px';\r\n perspectiveStyle.webkitPerspective = this.pe.v + 'px';\r\n }\r\n }\r\n }\r\n\r\n this.mat.clone(this._prevMat);\r\n }\r\n }\r\n\r\n this._isFirstFrame = false;\r\n };\r\n\r\n HCameraElement.prototype.prepareFrame = function (num) {\r\n this.prepareProperties(num, true);\r\n };\r\n\r\n HCameraElement.prototype.destroy = function () {};\r\n\r\n HCameraElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n function HImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\r\n\r\n HImageElement.prototype.createContent = function () {\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n var img = new Image();\r\n\r\n if (this.data.hasMask) {\r\n this.imageElem = createNS('image');\r\n this.imageElem.setAttribute('width', this.assetData.w + 'px');\r\n this.imageElem.setAttribute('height', this.assetData.h + 'px');\r\n this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n this.layerElement.appendChild(this.imageElem);\r\n this.baseElement.setAttribute('width', this.assetData.w);\r\n this.baseElement.setAttribute('height', this.assetData.h);\r\n } else {\r\n this.layerElement.appendChild(img);\r\n }\r\n\r\n img.crossOrigin = 'anonymous';\r\n img.src = assetPath;\r\n\r\n if (this.data.ln) {\r\n this.baseElement.setAttribute('id', this.data.ln);\r\n }\r\n };\r\n\r\n function HybridRendererBase(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.renderConfig = {\r\n className: config && config.className || '',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n filterSize: {\r\n width: config && config.filterSize && config.filterSize.width || '400%',\r\n height: config && config.filterSize && config.filterSize.height || '400%',\r\n x: config && config.filterSize && config.filterSize.x || '-100%',\r\n y: config && config.filterSize && config.filterSize.y || '-100%'\r\n }\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n renderConfig: this.renderConfig\r\n };\r\n this.pendingElements = [];\r\n this.elements = [];\r\n this.threeDElements = [];\r\n this.destroyed = false;\r\n this.camera = null;\r\n this.supports3d = true;\r\n this.rendererType = 'html';\r\n }\r\n\r\n extendPrototype([BaseRenderer], HybridRendererBase);\r\n HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;\r\n\r\n HybridRendererBase.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.appendElementInPos = function (element, pos) {\r\n var newDOMElement = element.getBaseElement();\r\n\r\n if (!newDOMElement) {\r\n return;\r\n }\r\n\r\n var layer = this.layers[pos];\r\n\r\n if (!layer.ddd || !this.supports3d) {\r\n if (this.threeDElements) {\r\n this.addTo3dContainer(newDOMElement, pos);\r\n } else {\r\n var i = 0;\r\n var nextDOMElement;\r\n var nextLayer;\r\n var tmpDOMElement;\r\n\r\n while (i < pos) {\r\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\r\n nextLayer = this.elements[i];\r\n tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\r\n nextDOMElement = tmpDOMElement || nextDOMElement;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (nextDOMElement) {\r\n if (!layer.ddd || !this.supports3d) {\r\n this.layerElement.insertBefore(newDOMElement, nextDOMElement);\r\n }\r\n } else if (!layer.ddd || !this.supports3d) {\r\n this.layerElement.appendChild(newDOMElement);\r\n }\r\n }\r\n } else {\r\n this.addTo3dContainer(newDOMElement, pos);\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.createShape = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGShapeElement(data, this.globalData, this);\r\n }\r\n\r\n return new HShapeElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createText = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGTextLottieElement(data, this.globalData, this);\r\n }\r\n\r\n return new HTextElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createCamera = function (data) {\r\n this.camera = new HCameraElement(data, this.globalData, this);\r\n return this.camera;\r\n };\r\n\r\n HybridRendererBase.prototype.createImage = function (data) {\r\n if (!this.supports3d) {\r\n return new IImageElement(data, this.globalData, this);\r\n }\r\n\r\n return new HImageElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createSolid = function (data) {\r\n if (!this.supports3d) {\r\n return new ISolidElement(data, this.globalData, this);\r\n }\r\n\r\n return new HSolidElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\n HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {\r\n var i = 0;\r\n var len = this.threeDElements.length;\r\n\r\n while (i < len) {\r\n if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\r\n return this.threeDElements[i].perspectiveElem;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {\r\n var perspectiveElem = createTag('div');\r\n var style;\r\n var containerStyle;\r\n styleDiv(perspectiveElem);\r\n var container = createTag('div');\r\n styleDiv(container);\r\n\r\n if (type === '3d') {\r\n style = perspectiveElem.style;\r\n style.width = this.globalData.compSize.w + 'px';\r\n style.height = this.globalData.compSize.h + 'px';\r\n var center = '50% 50%';\r\n style.webkitTransformOrigin = center;\r\n style.mozTransformOrigin = center;\r\n style.transformOrigin = center;\r\n containerStyle = container.style;\r\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n containerStyle.transform = matrix;\r\n containerStyle.webkitTransform = matrix;\r\n }\r\n\r\n perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);\r\n\r\n var threeDContainerData = {\r\n container: container,\r\n perspectiveElem: perspectiveElem,\r\n startPos: pos,\r\n endPos: pos,\r\n type: type\r\n };\r\n this.threeDElements.push(threeDContainerData);\r\n return threeDContainerData;\r\n };\r\n\r\n HybridRendererBase.prototype.build3dContainers = function () {\r\n var i;\r\n var len = this.layers.length;\r\n var lastThreeDContainerData;\r\n var currentContainer = '';\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.layers[i].ddd && this.layers[i].ty !== 3) {\r\n if (currentContainer !== '3d') {\r\n currentContainer = '3d';\r\n lastThreeDContainerData = this.createThreeDContainer(i, '3d');\r\n }\r\n\r\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n } else {\r\n if (currentContainer !== '2d') {\r\n currentContainer = '2d';\r\n lastThreeDContainerData = this.createThreeDContainer(i, '2d');\r\n }\r\n\r\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n }\r\n }\r\n\r\n len = this.threeDElements.length;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {\r\n var i = 0;\r\n var len = this.threeDElements.length;\r\n\r\n while (i < len) {\r\n if (pos <= this.threeDElements[i].endPos) {\r\n var j = this.threeDElements[i].startPos;\r\n var nextElement;\r\n\r\n while (j < pos) {\r\n if (this.elements[j] && this.elements[j].getBaseElement) {\r\n nextElement = this.elements[j].getBaseElement();\r\n }\r\n\r\n j += 1;\r\n }\r\n\r\n if (nextElement) {\r\n this.threeDElements[i].container.insertBefore(elem, nextElement);\r\n } else {\r\n this.threeDElements[i].container.appendChild(elem);\r\n }\r\n\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.configAnimation = function (animData) {\r\n var resizerElem = createTag('div');\r\n var wrapper = this.animationItem.wrapper;\r\n var style = resizerElem.style;\r\n style.width = animData.w + 'px';\r\n style.height = animData.h + 'px';\r\n this.resizerElem = resizerElem;\r\n styleDiv(resizerElem);\r\n style.transformStyle = 'flat';\r\n style.mozTransformStyle = 'flat';\r\n style.webkitTransformStyle = 'flat';\r\n\r\n if (this.renderConfig.className) {\r\n resizerElem.setAttribute('class', this.renderConfig.className);\r\n }\r\n\r\n wrapper.appendChild(resizerElem);\r\n style.overflow = 'hidden';\r\n var svg = createNS('svg');\r\n svg.setAttribute('width', '1');\r\n svg.setAttribute('height', '1');\r\n styleDiv(svg);\r\n this.resizerElem.appendChild(svg);\r\n var defs = createNS('defs');\r\n svg.appendChild(defs);\r\n this.data = animData; // Mask animation\r\n\r\n this.setupGlobalData(animData, svg);\r\n this.globalData.defs = defs;\r\n this.layers = animData.layers;\r\n this.layerElement = this.resizerElem;\r\n this.build3dContainers();\r\n this.updateContainerSize();\r\n };\r\n\r\n HybridRendererBase.prototype.destroy = function () {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n\r\n this.animationItem.container = null;\r\n this.globalData.defs = null;\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.elements[i].destroy();\r\n }\r\n\r\n this.elements.length = 0;\r\n this.destroyed = true;\r\n this.animationItem = null;\r\n };\r\n\r\n HybridRendererBase.prototype.updateContainerSize = function () {\r\n var elementWidth = this.animationItem.wrapper.offsetWidth;\r\n var elementHeight = this.animationItem.wrapper.offsetHeight;\r\n var elementRel = elementWidth / elementHeight;\r\n var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\r\n var sx;\r\n var sy;\r\n var tx;\r\n var ty;\r\n\r\n if (animationRel > elementRel) {\r\n sx = elementWidth / this.globalData.compSize.w;\r\n sy = elementWidth / this.globalData.compSize.w;\r\n tx = 0;\r\n ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;\r\n } else {\r\n sx = elementHeight / this.globalData.compSize.h;\r\n sy = elementHeight / this.globalData.compSize.h;\r\n tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\r\n ty = 0;\r\n }\r\n\r\n var style = this.resizerElem.style;\r\n style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\r\n style.transform = style.webkitTransform;\r\n };\r\n\r\n HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\r\n\r\n HybridRendererBase.prototype.hide = function () {\r\n this.resizerElem.style.display = 'none';\r\n };\r\n\r\n HybridRendererBase.prototype.show = function () {\r\n this.resizerElem.style.display = 'block';\r\n };\r\n\r\n HybridRendererBase.prototype.initItems = function () {\r\n this.buildAllItems();\r\n\r\n if (this.camera) {\r\n this.camera.setup();\r\n } else {\r\n var cWidth = this.globalData.compSize.w;\r\n var cHeight = this.globalData.compSize.h;\r\n var i;\r\n var len = this.threeDElements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n var style = this.threeDElements[i].perspectiveElem.style;\r\n style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\r\n style.perspective = style.webkitPerspective;\r\n }\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.searchExtraCompositions = function (assets) {\r\n var i;\r\n var len = assets.length;\r\n var floatingContainer = createTag('div');\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (assets[i].xt) {\r\n var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\r\n comp.initExpressions();\r\n this.globalData.projectInterface.registerComposition(comp);\r\n }\r\n }\r\n };\r\n\r\n function HCompElement(data, globalData, comp) {\r\n this.layers = data.layers;\r\n this.supports3d = !data.hasMask;\r\n this.completeLayers = false;\r\n this.pendingElements = [];\r\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n }\r\n\r\n extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);\r\n HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\r\n\r\n HCompElement.prototype.createContainerElements = function () {\r\n this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\r\n\r\n\r\n if (this.data.hasMask) {\r\n this.svgElement.setAttribute('width', this.data.w);\r\n this.svgElement.setAttribute('height', this.data.h);\r\n this.transformedElement = this.baseElement;\r\n } else {\r\n this.transformedElement = this.layerElement;\r\n }\r\n };\r\n\r\n HCompElement.prototype.addTo3dContainer = function (elem, pos) {\r\n var j = 0;\r\n var nextElement;\r\n\r\n while (j < pos) {\r\n if (this.elements[j] && this.elements[j].getBaseElement) {\r\n nextElement = this.elements[j].getBaseElement();\r\n }\r\n\r\n j += 1;\r\n }\r\n\r\n if (nextElement) {\r\n this.layerElement.insertBefore(elem, nextElement);\r\n } else {\r\n this.layerElement.appendChild(elem);\r\n }\r\n };\r\n\r\n HCompElement.prototype.createComp = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n }\r\n\r\n return new HCompElement(data, this.globalData, this);\r\n };\r\n\r\n function HybridRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.renderConfig = {\r\n className: config && config.className || '',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n filterSize: {\r\n width: config && config.filterSize && config.filterSize.width || '400%',\r\n height: config && config.filterSize && config.filterSize.height || '400%',\r\n x: config && config.filterSize && config.filterSize.x || '-100%',\r\n y: config && config.filterSize && config.filterSize.y || '-100%'\r\n },\r\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n renderConfig: this.renderConfig\r\n };\r\n this.pendingElements = [];\r\n this.elements = [];\r\n this.threeDElements = [];\r\n this.destroyed = false;\r\n this.camera = null;\r\n this.supports3d = true;\r\n this.rendererType = 'html';\r\n }\r\n\r\n extendPrototype([HybridRendererBase], HybridRenderer);\r\n\r\n HybridRenderer.prototype.createComp = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n }\r\n\r\n return new HCompElement(data, this.globalData, this);\r\n };\r\n\r\n var CompExpressionInterface = function () {\r\n return function (comp) {\r\n function _thisLayerFunction(name) {\r\n var i = 0;\r\n var len = comp.layers.length;\r\n\r\n while (i < len) {\r\n if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\r\n return comp.elements[i].layerInterface;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null; // return {active:false};\r\n }\r\n\r\n Object.defineProperty(_thisLayerFunction, '_name', {\r\n value: comp.data.nm\r\n });\r\n _thisLayerFunction.layer = _thisLayerFunction;\r\n _thisLayerFunction.pixelAspect = 1;\r\n _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\r\n _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\r\n _thisLayerFunction.pixelAspect = 1;\r\n _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\r\n _thisLayerFunction.displayStartTime = 0;\r\n _thisLayerFunction.numLayers = comp.layers.length;\r\n return _thisLayerFunction;\r\n };\r\n }();\r\n\r\n var Expressions = function () {\r\n var ob = {};\r\n ob.initExpressions = initExpressions;\r\n\r\n function initExpressions(animation) {\r\n var stackCount = 0;\r\n var registers = [];\r\n\r\n function pushExpression() {\r\n stackCount += 1;\r\n }\r\n\r\n function popExpression() {\r\n stackCount -= 1;\r\n\r\n if (stackCount === 0) {\r\n releaseInstances();\r\n }\r\n }\r\n\r\n function registerExpressionProperty(expression) {\r\n if (registers.indexOf(expression) === -1) {\r\n registers.push(expression);\r\n }\r\n }\r\n\r\n function releaseInstances() {\r\n var i;\r\n var len = registers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registers[i].release();\r\n }\r\n\r\n registers.length = 0;\r\n }\r\n\r\n animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\r\n animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\r\n animation.renderer.globalData.pushExpression = pushExpression;\r\n animation.renderer.globalData.popExpression = popExpression;\r\n animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var MaskManagerInterface = function () {\r\n function MaskInterface(mask, data) {\r\n this._mask = mask;\r\n this._data = data;\r\n }\r\n\r\n Object.defineProperty(MaskInterface.prototype, 'maskPath', {\r\n get: function get() {\r\n if (this._mask.prop.k) {\r\n this._mask.prop.getValue();\r\n }\r\n\r\n return this._mask.prop;\r\n }\r\n });\r\n Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\r\n get: function get() {\r\n if (this._mask.op.k) {\r\n this._mask.op.getValue();\r\n }\r\n\r\n return this._mask.op.v * 100;\r\n }\r\n });\r\n\r\n var MaskManager = function MaskManager(maskManager) {\r\n var _masksInterfaces = createSizedArray(maskManager.viewData.length);\r\n\r\n var i;\r\n var len = maskManager.viewData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\r\n }\r\n\r\n var maskFunction = function maskFunction(name) {\r\n i = 0;\r\n\r\n while (i < len) {\r\n if (maskManager.masksProperties[i].nm === name) {\r\n return _masksInterfaces[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return maskFunction;\r\n };\r\n\r\n return MaskManager;\r\n }();\r\n\r\n var ExpressionPropertyInterface = function () {\r\n var defaultUnidimensionalValue = {\r\n pv: 0,\r\n v: 0,\r\n mult: 1\r\n };\r\n var defaultMultidimensionalValue = {\r\n pv: [0, 0, 0],\r\n v: [0, 0, 0],\r\n mult: 1\r\n };\r\n\r\n function completeProperty(expressionValue, property, type) {\r\n Object.defineProperty(expressionValue, 'velocity', {\r\n get: function get() {\r\n return property.getVelocityAtTime(property.comp.currentFrame);\r\n }\r\n });\r\n expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\r\n\r\n expressionValue.key = function (pos) {\r\n if (!expressionValue.numKeys) {\r\n return 0;\r\n }\r\n\r\n var value = '';\r\n\r\n if ('s' in property.keyframes[pos - 1]) {\r\n value = property.keyframes[pos - 1].s;\r\n } else if ('e' in property.keyframes[pos - 2]) {\r\n value = property.keyframes[pos - 2].e;\r\n } else {\r\n value = property.keyframes[pos - 2].s;\r\n }\r\n\r\n var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\r\n\r\n valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\r\n valueProp.value = type === 'unidimensional' ? value[0] : value;\r\n return valueProp;\r\n };\r\n\r\n expressionValue.valueAtTime = property.getValueAtTime;\r\n expressionValue.speedAtTime = property.getSpeedAtTime;\r\n expressionValue.velocityAtTime = property.getVelocityAtTime;\r\n expressionValue.propertyGroup = property.propertyGroup;\r\n }\r\n\r\n function UnidimensionalPropertyInterface(property) {\r\n if (!property || !('pv' in property)) {\r\n property = defaultUnidimensionalValue;\r\n }\r\n\r\n var mult = 1 / property.mult;\r\n var val = property.pv * mult;\r\n var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n\r\n expressionValue.value = val;\r\n completeProperty(expressionValue, property, 'unidimensional');\r\n return function () {\r\n if (property.k) {\r\n property.getValue();\r\n }\r\n\r\n val = property.v * mult;\r\n\r\n if (expressionValue.value !== val) {\r\n expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n\r\n expressionValue.value = val;\r\n completeProperty(expressionValue, property, 'unidimensional');\r\n }\r\n\r\n return expressionValue;\r\n };\r\n }\r\n\r\n function MultidimensionalPropertyInterface(property) {\r\n if (!property || !('pv' in property)) {\r\n property = defaultMultidimensionalValue;\r\n }\r\n\r\n var mult = 1 / property.mult;\r\n var len = property.data && property.data.l || property.pv.length;\r\n var expressionValue = createTypedArray('float32', len);\r\n var arrValue = createTypedArray('float32', len);\r\n expressionValue.value = arrValue;\r\n completeProperty(expressionValue, property, 'multidimensional');\r\n return function () {\r\n if (property.k) {\r\n property.getValue();\r\n }\r\n\r\n for (var i = 0; i < len; i += 1) {\r\n arrValue[i] = property.v[i] * mult;\r\n expressionValue[i] = arrValue[i];\r\n }\r\n\r\n return expressionValue;\r\n };\r\n } // TODO: try to avoid using this getter\r\n\r\n\r\n function defaultGetter() {\r\n return defaultUnidimensionalValue;\r\n }\r\n\r\n return function (property) {\r\n if (!property) {\r\n return defaultGetter;\r\n }\r\n\r\n if (property.propType === 'unidimensional') {\r\n return UnidimensionalPropertyInterface(property);\r\n }\r\n\r\n return MultidimensionalPropertyInterface(property);\r\n };\r\n }();\r\n\r\n var TransformExpressionInterface = function () {\r\n return function (transform) {\r\n function _thisFunction(name) {\r\n switch (name) {\r\n case 'scale':\r\n case 'Scale':\r\n case 'ADBE Scale':\r\n case 6:\r\n return _thisFunction.scale;\r\n\r\n case 'rotation':\r\n case 'Rotation':\r\n case 'ADBE Rotation':\r\n case 'ADBE Rotate Z':\r\n case 10:\r\n return _thisFunction.rotation;\r\n\r\n case 'ADBE Rotate X':\r\n return _thisFunction.xRotation;\r\n\r\n case 'ADBE Rotate Y':\r\n return _thisFunction.yRotation;\r\n\r\n case 'position':\r\n case 'Position':\r\n case 'ADBE Position':\r\n case 2:\r\n return _thisFunction.position;\r\n\r\n case 'ADBE Position_0':\r\n return _thisFunction.xPosition;\r\n\r\n case 'ADBE Position_1':\r\n return _thisFunction.yPosition;\r\n\r\n case 'ADBE Position_2':\r\n return _thisFunction.zPosition;\r\n\r\n case 'anchorPoint':\r\n case 'AnchorPoint':\r\n case 'Anchor Point':\r\n case 'ADBE AnchorPoint':\r\n case 1:\r\n return _thisFunction.anchorPoint;\r\n\r\n case 'opacity':\r\n case 'Opacity':\r\n case 11:\r\n return _thisFunction.opacity;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n Object.defineProperty(_thisFunction, 'rotation', {\r\n get: ExpressionPropertyInterface(transform.r || transform.rz)\r\n });\r\n Object.defineProperty(_thisFunction, 'zRotation', {\r\n get: ExpressionPropertyInterface(transform.rz || transform.r)\r\n });\r\n Object.defineProperty(_thisFunction, 'xRotation', {\r\n get: ExpressionPropertyInterface(transform.rx)\r\n });\r\n Object.defineProperty(_thisFunction, 'yRotation', {\r\n get: ExpressionPropertyInterface(transform.ry)\r\n });\r\n Object.defineProperty(_thisFunction, 'scale', {\r\n get: ExpressionPropertyInterface(transform.s)\r\n });\r\n\r\n var _px;\r\n\r\n var _py;\r\n\r\n var _pz;\r\n\r\n var _transformFactory;\r\n\r\n if (transform.p) {\r\n _transformFactory = ExpressionPropertyInterface(transform.p);\r\n } else {\r\n _px = ExpressionPropertyInterface(transform.px);\r\n _py = ExpressionPropertyInterface(transform.py);\r\n\r\n if (transform.pz) {\r\n _pz = ExpressionPropertyInterface(transform.pz);\r\n }\r\n }\r\n\r\n Object.defineProperty(_thisFunction, 'position', {\r\n get: function get() {\r\n if (transform.p) {\r\n return _transformFactory();\r\n }\r\n\r\n return [_px(), _py(), _pz ? _pz() : 0];\r\n }\r\n });\r\n Object.defineProperty(_thisFunction, 'xPosition', {\r\n get: ExpressionPropertyInterface(transform.px)\r\n });\r\n Object.defineProperty(_thisFunction, 'yPosition', {\r\n get: ExpressionPropertyInterface(transform.py)\r\n });\r\n Object.defineProperty(_thisFunction, 'zPosition', {\r\n get: ExpressionPropertyInterface(transform.pz)\r\n });\r\n Object.defineProperty(_thisFunction, 'anchorPoint', {\r\n get: ExpressionPropertyInterface(transform.a)\r\n });\r\n Object.defineProperty(_thisFunction, 'opacity', {\r\n get: ExpressionPropertyInterface(transform.o)\r\n });\r\n Object.defineProperty(_thisFunction, 'skew', {\r\n get: ExpressionPropertyInterface(transform.sk)\r\n });\r\n Object.defineProperty(_thisFunction, 'skewAxis', {\r\n get: ExpressionPropertyInterface(transform.sa)\r\n });\r\n Object.defineProperty(_thisFunction, 'orientation', {\r\n get: ExpressionPropertyInterface(transform.or)\r\n });\r\n return _thisFunction;\r\n };\r\n }();\r\n\r\n var LayerExpressionInterface = function () {\r\n function getMatrix(time) {\r\n var toWorldMat = new Matrix();\r\n\r\n if (time !== undefined) {\r\n var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\r\n\r\n propMatrix.clone(toWorldMat);\r\n } else {\r\n var transformMat = this._elem.finalTransform.mProp;\r\n transformMat.applyToMatrix(toWorldMat);\r\n }\r\n\r\n return toWorldMat;\r\n }\r\n\r\n function toWorldVec(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n toWorldMat.props[12] = 0;\r\n toWorldMat.props[13] = 0;\r\n toWorldMat.props[14] = 0;\r\n return this.applyPoint(toWorldMat, arr);\r\n }\r\n\r\n function toWorld(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n return this.applyPoint(toWorldMat, arr);\r\n }\r\n\r\n function fromWorldVec(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n toWorldMat.props[12] = 0;\r\n toWorldMat.props[13] = 0;\r\n toWorldMat.props[14] = 0;\r\n return this.invertPoint(toWorldMat, arr);\r\n }\r\n\r\n function fromWorld(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n return this.invertPoint(toWorldMat, arr);\r\n }\r\n\r\n function applyPoint(matrix, arr) {\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n }\r\n }\r\n\r\n return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\r\n }\r\n\r\n function invertPoint(matrix, arr) {\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n }\r\n }\r\n\r\n return matrix.inversePoint(arr);\r\n }\r\n\r\n function fromComp(arr) {\r\n var toWorldMat = new Matrix();\r\n toWorldMat.reset();\r\n\r\n this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\r\n\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\r\n }\r\n\r\n return toWorldMat.inversePoint(arr);\r\n }\r\n\r\n return toWorldMat.inversePoint(arr);\r\n }\r\n\r\n function sampleImage() {\r\n return [1, 1, 1, 1];\r\n }\r\n\r\n return function (elem) {\r\n var transformInterface;\r\n\r\n function _registerMaskInterface(maskManager) {\r\n _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\r\n }\r\n\r\n function _registerEffectsInterface(effects) {\r\n _thisLayerFunction.effect = effects;\r\n }\r\n\r\n function _thisLayerFunction(name) {\r\n switch (name) {\r\n case 'ADBE Root Vectors Group':\r\n case 'Contents':\r\n case 2:\r\n return _thisLayerFunction.shapeInterface;\r\n\r\n case 1:\r\n case 6:\r\n case 'Transform':\r\n case 'transform':\r\n case 'ADBE Transform Group':\r\n return transformInterface;\r\n\r\n case 4:\r\n case 'ADBE Effect Parade':\r\n case 'effects':\r\n case 'Effects':\r\n return _thisLayerFunction.effect;\r\n\r\n case 'ADBE Text Properties':\r\n return _thisLayerFunction.textInterface;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n _thisLayerFunction.getMatrix = getMatrix;\r\n _thisLayerFunction.invertPoint = invertPoint;\r\n _thisLayerFunction.applyPoint = applyPoint;\r\n _thisLayerFunction.toWorld = toWorld;\r\n _thisLayerFunction.toWorldVec = toWorldVec;\r\n _thisLayerFunction.fromWorld = fromWorld;\r\n _thisLayerFunction.fromWorldVec = fromWorldVec;\r\n _thisLayerFunction.toComp = toWorld;\r\n _thisLayerFunction.fromComp = fromComp;\r\n _thisLayerFunction.sampleImage = sampleImage;\r\n _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\r\n _thisLayerFunction._elem = elem;\r\n transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\r\n var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\r\n Object.defineProperties(_thisLayerFunction, {\r\n hasParent: {\r\n get: function get() {\r\n return elem.hierarchy.length;\r\n }\r\n },\r\n parent: {\r\n get: function get() {\r\n return elem.hierarchy[0].layerInterface;\r\n }\r\n },\r\n rotation: getDescriptor(transformInterface, 'rotation'),\r\n scale: getDescriptor(transformInterface, 'scale'),\r\n position: getDescriptor(transformInterface, 'position'),\r\n opacity: getDescriptor(transformInterface, 'opacity'),\r\n anchorPoint: anchorPointDescriptor,\r\n anchor_point: anchorPointDescriptor,\r\n transform: {\r\n get: function get() {\r\n return transformInterface;\r\n }\r\n },\r\n active: {\r\n get: function get() {\r\n return elem.isInRange;\r\n }\r\n }\r\n });\r\n _thisLayerFunction.startTime = elem.data.st;\r\n _thisLayerFunction.index = elem.data.ind;\r\n _thisLayerFunction.source = elem.data.refId;\r\n _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\r\n _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\r\n _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n _thisLayerFunction._name = elem.data.nm;\r\n _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\r\n _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\r\n return _thisLayerFunction;\r\n };\r\n }();\r\n\r\n var propertyGroupFactory = function () {\r\n return function (interfaceFunction, parentPropertyGroup) {\r\n return function (val) {\r\n val = val === undefined ? 1 : val;\r\n\r\n if (val <= 0) {\r\n return interfaceFunction;\r\n }\r\n\r\n return parentPropertyGroup(val - 1);\r\n };\r\n };\r\n }();\r\n\r\n var PropertyInterface = function () {\r\n return function (propertyName, propertyGroup) {\r\n var interfaceFunction = {\r\n _name: propertyName\r\n };\r\n\r\n function _propertyGroup(val) {\r\n val = val === undefined ? 1 : val;\r\n\r\n if (val <= 0) {\r\n return interfaceFunction;\r\n }\r\n\r\n return propertyGroup(val - 1);\r\n }\r\n\r\n return _propertyGroup;\r\n };\r\n }();\r\n\r\n var EffectsExpressionInterface = function () {\r\n var ob = {\r\n createEffectsInterface: createEffectsInterface\r\n };\r\n\r\n function createEffectsInterface(elem, propertyGroup) {\r\n if (elem.effectsManager) {\r\n var effectElements = [];\r\n var effectsData = elem.data.ef;\r\n var i;\r\n var len = elem.effectsManager.effectElements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\r\n }\r\n\r\n var effects = elem.data.ef || [];\r\n\r\n var groupInterface = function groupInterface(name) {\r\n i = 0;\r\n len = effects.length;\r\n\r\n while (i < len) {\r\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n return effectElements[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n Object.defineProperty(groupInterface, 'numProperties', {\r\n get: function get() {\r\n return effects.length;\r\n }\r\n });\r\n return groupInterface;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function createGroupInterface(data, elements, propertyGroup, elem) {\r\n function groupInterface(name) {\r\n var effects = data.ef;\r\n var i = 0;\r\n var len = effects.length;\r\n\r\n while (i < len) {\r\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n if (effects[i].ty === 5) {\r\n return effectElements[i];\r\n }\r\n\r\n return effectElements[i]();\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n throw new Error();\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\r\n\r\n var effectElements = [];\r\n var i;\r\n var len = data.ef.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (data.ef[i].ty === 5) {\r\n effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\r\n } else {\r\n effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\r\n }\r\n }\r\n\r\n if (data.mn === 'ADBE Color Control') {\r\n Object.defineProperty(groupInterface, 'color', {\r\n get: function get() {\r\n return effectElements[0]();\r\n }\r\n });\r\n }\r\n\r\n Object.defineProperties(groupInterface, {\r\n numProperties: {\r\n get: function get() {\r\n return data.np;\r\n }\r\n },\r\n _name: {\r\n value: data.nm\r\n },\r\n propertyGroup: {\r\n value: _propertyGroup\r\n }\r\n });\r\n groupInterface.enabled = data.en !== 0;\r\n groupInterface.active = groupInterface.enabled;\r\n return groupInterface;\r\n }\r\n\r\n function createValueInterface(element, type, elem, propertyGroup) {\r\n var expressionProperty = ExpressionPropertyInterface(element.p);\r\n\r\n function interfaceFunction() {\r\n if (type === 10) {\r\n return elem.comp.compInterface(element.p.v);\r\n }\r\n\r\n return expressionProperty();\r\n }\r\n\r\n if (element.p.setGroupProperty) {\r\n element.p.setGroupProperty(PropertyInterface('', propertyGroup));\r\n }\r\n\r\n return interfaceFunction;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var ShapePathInterface = function () {\r\n return function pathInterfaceFactory(shape, view, propertyGroup) {\r\n var prop = view.sh;\r\n\r\n function interfaceFunction(val) {\r\n if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\r\n return interfaceFunction.path;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n path: {\r\n get: function get() {\r\n if (prop.k) {\r\n prop.getValue();\r\n }\r\n\r\n return prop;\r\n }\r\n },\r\n shape: {\r\n get: function get() {\r\n if (prop.k) {\r\n prop.getValue();\r\n }\r\n\r\n return prop;\r\n }\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n ix: {\r\n value: shape.ix\r\n },\r\n propertyIndex: {\r\n value: shape.ix\r\n },\r\n mn: {\r\n value: shape.mn\r\n },\r\n propertyGroup: {\r\n value: propertyGroup\r\n }\r\n });\r\n return interfaceFunction;\r\n };\r\n }();\r\n\r\n var ShapeExpressionInterface = function () {\r\n function iterateElements(shapes, view, propertyGroup) {\r\n var arr = [];\r\n var i;\r\n var len = shapes ? shapes.length : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (shapes[i].ty === 'gr') {\r\n arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'fl') {\r\n arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'st') {\r\n arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'tm') {\r\n arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\r\n } else if (shapes[i].ty === 'el') {\r\n arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'sr') {\r\n arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'sh') {\r\n arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rc') {\r\n arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rd') {\r\n arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rp') {\r\n arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'gf') {\r\n arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else {\r\n arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n }\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function contentsInterfaceFactory(shape, view, propertyGroup) {\r\n var interfaces;\r\n\r\n var interfaceFunction = function _interfaceFunction(value) {\r\n var i = 0;\r\n var len = interfaces.length;\r\n\r\n while (i < len) {\r\n if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\r\n return interfaces[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n return interfaces[value - 1];\r\n }\r\n\r\n return null;\r\n };\r\n\r\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\r\n interfaceFunction.numProperties = interfaces.length;\r\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n interfaceFunction.transform = transformInterface;\r\n interfaceFunction.propertyIndex = shape.cix;\r\n interfaceFunction._name = shape.nm;\r\n return interfaceFunction;\r\n }\r\n\r\n function groupInterfaceFactory(shape, view, propertyGroup) {\r\n var interfaceFunction = function _interfaceFunction(value) {\r\n switch (value) {\r\n case 'ADBE Vectors Group':\r\n case 'Contents':\r\n case 2:\r\n return interfaceFunction.content;\r\n // Not necessary for now. Keeping them here in case a new case appears\r\n // case 'ADBE Vector Transform Group':\r\n // case 3:\r\n\r\n default:\r\n return interfaceFunction.transform;\r\n }\r\n };\r\n\r\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\r\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n interfaceFunction.content = content;\r\n interfaceFunction.transform = transformInterface;\r\n Object.defineProperty(interfaceFunction, '_name', {\r\n get: function get() {\r\n return shape.nm;\r\n }\r\n }); // interfaceFunction.content = interfaceFunction;\r\n\r\n interfaceFunction.numProperties = shape.np;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n interfaceFunction.nm = shape.nm;\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function fillInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === 'Color' || val === 'color') {\r\n return interfaceFunction.color;\r\n }\r\n\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n color: {\r\n get: ExpressionPropertyInterface(view.c)\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n mn: {\r\n value: shape.mn\r\n }\r\n });\r\n view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function gradientFillInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === 'Start Point' || val === 'start point') {\r\n return interfaceFunction.startPoint;\r\n }\r\n\r\n if (val === 'End Point' || val === 'end point') {\r\n return interfaceFunction.endPoint;\r\n }\r\n\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n startPoint: {\r\n get: ExpressionPropertyInterface(view.s)\r\n },\r\n endPoint: {\r\n get: ExpressionPropertyInterface(view.e)\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n type: {\r\n get: function get() {\r\n return 'a';\r\n }\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n mn: {\r\n value: shape.mn\r\n }\r\n });\r\n view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\r\n view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function defaultInterfaceFactory() {\r\n function interfaceFunction() {\r\n return null;\r\n }\r\n\r\n return interfaceFunction;\r\n }\r\n\r\n function strokeInterfaceFactory(shape, view, propertyGroup) {\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\r\n\r\n function addPropertyToDashOb(i) {\r\n Object.defineProperty(dashOb, shape.d[i].nm, {\r\n get: ExpressionPropertyInterface(view.d.dataProps[i].p)\r\n });\r\n }\r\n\r\n var i;\r\n var len = shape.d ? shape.d.length : 0;\r\n var dashOb = {};\r\n\r\n for (i = 0; i < len; i += 1) {\r\n addPropertyToDashOb(i);\r\n view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\r\n }\r\n\r\n function interfaceFunction(val) {\r\n if (val === 'Color' || val === 'color') {\r\n return interfaceFunction.color;\r\n }\r\n\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n if (val === 'Stroke Width' || val === 'stroke width') {\r\n return interfaceFunction.strokeWidth;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n color: {\r\n get: ExpressionPropertyInterface(view.c)\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n strokeWidth: {\r\n get: ExpressionPropertyInterface(view.w)\r\n },\r\n dash: {\r\n get: function get() {\r\n return dashOb;\r\n }\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n mn: {\r\n value: shape.mn\r\n }\r\n });\r\n view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function trimInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === shape.e.ix || val === 'End' || val === 'end') {\r\n return interfaceFunction.end;\r\n }\r\n\r\n if (val === shape.s.ix) {\r\n return interfaceFunction.start;\r\n }\r\n\r\n if (val === shape.o.ix) {\r\n return interfaceFunction.offset;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n interfaceFunction.propertyIndex = shape.ix;\r\n view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\r\n view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n interfaceFunction.propertyIndex = shape.ix;\r\n interfaceFunction.propertyGroup = propertyGroup;\r\n Object.defineProperties(interfaceFunction, {\r\n start: {\r\n get: ExpressionPropertyInterface(view.s)\r\n },\r\n end: {\r\n get: ExpressionPropertyInterface(view.e)\r\n },\r\n offset: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function transformInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.a.ix === value || value === 'Anchor Point') {\r\n return interfaceFunction.anchorPoint;\r\n }\r\n\r\n if (shape.o.ix === value || value === 'Opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n if (shape.p.ix === value || value === 'Position') {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\r\n return interfaceFunction.rotation;\r\n }\r\n\r\n if (shape.s.ix === value || value === 'Scale') {\r\n return interfaceFunction.scale;\r\n }\r\n\r\n if (shape.sk && shape.sk.ix === value || value === 'Skew') {\r\n return interfaceFunction.skew;\r\n }\r\n\r\n if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {\r\n return interfaceFunction.skewAxis;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\r\n view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\r\n view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n if (view.transform.mProps.sk) {\r\n view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\r\n view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\r\n }\r\n\r\n view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.o)\r\n },\r\n position: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.p)\r\n },\r\n anchorPoint: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.a)\r\n },\r\n scale: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.s)\r\n },\r\n rotation: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.r)\r\n },\r\n skew: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.sk)\r\n },\r\n skewAxis: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.sa)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.ty = 'tr';\r\n interfaceFunction.mn = shape.mn;\r\n interfaceFunction.propertyGroup = propertyGroup;\r\n return interfaceFunction;\r\n }\r\n\r\n function ellipseInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.s.ix === value) {\r\n return interfaceFunction.size;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n interfaceFunction.propertyIndex = shape.ix;\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n size: {\r\n get: ExpressionPropertyInterface(prop.s)\r\n },\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function starInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.r.ix === value) {\r\n return interfaceFunction.rotation;\r\n }\r\n\r\n if (shape.pt.ix === value) {\r\n return interfaceFunction.points;\r\n }\r\n\r\n if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\r\n return interfaceFunction.outerRadius;\r\n }\r\n\r\n if (shape.os.ix === value) {\r\n return interfaceFunction.outerRoundness;\r\n }\r\n\r\n if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\r\n return interfaceFunction.innerRadius;\r\n }\r\n\r\n if (shape.is && shape.is.ix === value) {\r\n return interfaceFunction.innerRoundness;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\r\n prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\r\n prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n if (shape.ir) {\r\n prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\r\n prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p)\r\n },\r\n rotation: {\r\n get: ExpressionPropertyInterface(prop.r)\r\n },\r\n points: {\r\n get: ExpressionPropertyInterface(prop.pt)\r\n },\r\n outerRadius: {\r\n get: ExpressionPropertyInterface(prop.or)\r\n },\r\n outerRoundness: {\r\n get: ExpressionPropertyInterface(prop.os)\r\n },\r\n innerRadius: {\r\n get: ExpressionPropertyInterface(prop.ir)\r\n },\r\n innerRoundness: {\r\n get: ExpressionPropertyInterface(prop.is)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function rectInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.r.ix === value) {\r\n return interfaceFunction.roundness;\r\n }\r\n\r\n if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\r\n return interfaceFunction.size;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p)\r\n },\r\n roundness: {\r\n get: ExpressionPropertyInterface(prop.r)\r\n },\r\n size: {\r\n get: ExpressionPropertyInterface(prop.s)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function roundedInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.r.ix === value || value === 'Round Corners 1') {\r\n return interfaceFunction.radius;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n radius: {\r\n get: ExpressionPropertyInterface(prop.rd)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function repeaterInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.c.ix === value || value === 'Copies') {\r\n return interfaceFunction.copies;\r\n }\r\n\r\n if (shape.o.ix === value || value === 'Offset') {\r\n return interfaceFunction.offset;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\r\n prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n copies: {\r\n get: ExpressionPropertyInterface(prop.c)\r\n },\r\n offset: {\r\n get: ExpressionPropertyInterface(prop.o)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n return function (shapes, view, propertyGroup) {\r\n var interfaces;\r\n\r\n function _interfaceFunction(value) {\r\n if (typeof value === 'number') {\r\n value = value === undefined ? 1 : value;\r\n\r\n if (value === 0) {\r\n return propertyGroup;\r\n }\r\n\r\n return interfaces[value - 1];\r\n }\r\n\r\n var i = 0;\r\n var len = interfaces.length;\r\n\r\n while (i < len) {\r\n if (interfaces[i]._name === value) {\r\n return interfaces[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function parentGroupWrapper() {\r\n return propertyGroup;\r\n }\r\n\r\n _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\r\n interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\r\n _interfaceFunction.numProperties = interfaces.length;\r\n _interfaceFunction._name = 'Contents';\r\n return _interfaceFunction;\r\n };\r\n }();\r\n\r\n var TextExpressionInterface = function () {\r\n return function (elem) {\r\n var _prevValue;\r\n\r\n var _sourceText;\r\n\r\n function _thisLayerFunction(name) {\r\n switch (name) {\r\n case 'ADBE Text Document':\r\n return _thisLayerFunction.sourceText;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n Object.defineProperty(_thisLayerFunction, 'sourceText', {\r\n get: function get() {\r\n elem.textProperty.getValue();\r\n var stringValue = elem.textProperty.currentData.t;\r\n\r\n if (stringValue !== _prevValue) {\r\n elem.textProperty.currentData.t = _prevValue;\r\n _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\r\n // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\r\n\r\n _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\r\n }\r\n\r\n return _sourceText;\r\n }\r\n });\r\n return _thisLayerFunction;\r\n };\r\n }();\r\n\r\n function _typeof$2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\r\n\r\n var FootageInterface = function () {\r\n var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {\r\n var currentPropertyName = '';\r\n var currentProperty = elem.getFootageData();\r\n\r\n function init() {\r\n currentPropertyName = '';\r\n currentProperty = elem.getFootageData();\r\n return searchProperty;\r\n }\r\n\r\n function searchProperty(value) {\r\n if (currentProperty[value]) {\r\n currentPropertyName = value;\r\n currentProperty = currentProperty[value];\r\n\r\n if (_typeof$2(currentProperty) === 'object') {\r\n return searchProperty;\r\n }\r\n\r\n return currentProperty;\r\n }\r\n\r\n var propertyNameIndex = value.indexOf(currentPropertyName);\r\n\r\n if (propertyNameIndex !== -1) {\r\n var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\r\n currentProperty = currentProperty[index];\r\n\r\n if (_typeof$2(currentProperty) === 'object') {\r\n return searchProperty;\r\n }\r\n\r\n return currentProperty;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n return init;\r\n };\r\n\r\n var dataInterfaceFactory = function dataInterfaceFactory(elem) {\r\n function interfaceFunction(value) {\r\n if (value === 'Outline') {\r\n return interfaceFunction.outlineInterface();\r\n }\r\n\r\n return null;\r\n }\r\n\r\n interfaceFunction._name = 'Outline';\r\n interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\r\n return interfaceFunction;\r\n };\r\n\r\n return function (elem) {\r\n function _interfaceFunction(value) {\r\n if (value === 'Data') {\r\n return _interfaceFunction.dataInterface;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _interfaceFunction._name = 'Data';\r\n _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\r\n return _interfaceFunction;\r\n };\r\n }();\r\n\r\n var interfaces = {\r\n layer: LayerExpressionInterface,\r\n effects: EffectsExpressionInterface,\r\n comp: CompExpressionInterface,\r\n shape: ShapeExpressionInterface,\r\n text: TextExpressionInterface,\r\n footage: FootageInterface\r\n };\r\n\r\n function getInterface(type) {\r\n return interfaces[type] || null;\r\n }\r\n\r\n function _typeof$1(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\r\n\r\n /* eslint-disable */\r\n\r\n /*\r\n Copyright 2014 David Bau.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining\r\n a copy of this software and associated documentation files (the\r\n \"Software\"), to deal in the Software without restriction, including\r\n without limitation the rights to use, copy, modify, merge, publish,\r\n distribute, sublicense, and/or sell copies of the Software, and to\r\n permit persons to whom the Software is furnished to do so, subject to\r\n the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be\r\n included in all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n */\r\n function seedRandom(pool, math) {\r\n //\r\n // The following constants are related to IEEE 754 limits.\r\n //\r\n var global = this,\r\n width = 256,\r\n // each RC4 output is 0 <= x < 256\r\n chunks = 6,\r\n // at least six RC4 outputs for each double\r\n digits = 52,\r\n // there are 52 significant digits in a double\r\n rngname = 'random',\r\n // rngname: name for Math.random and Math.seedrandom\r\n startdenom = math.pow(width, chunks),\r\n significance = math.pow(2, digits),\r\n overflow = significance * 2,\r\n mask = width - 1,\r\n nodecrypto; // node.js crypto module, initialized at the bottom.\r\n //\r\n // seedrandom()\r\n // This is the seedrandom function described above.\r\n //\r\n\r\n function seedrandom(seed, options, callback) {\r\n var key = [];\r\n options = options === true ? {\r\n entropy: true\r\n } : options || {}; // Flatten the seed string or build one from local entropy if needed.\r\n\r\n var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.\r\n\r\n var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains\r\n // randomness in every bit of the mantissa of the IEEE 754 value.\r\n\r\n var prng = function prng() {\r\n var n = arc4.g(chunks),\r\n // Start with a numerator n < 2 ^ 48\r\n d = startdenom,\r\n // and denominator d = 2 ^ 48.\r\n x = 0; // and no 'extra last byte'.\r\n\r\n while (n < significance) {\r\n // Fill up all significant digits by\r\n n = (n + x) * width; // shifting numerator and\r\n\r\n d *= width; // denominator and generating a\r\n\r\n x = arc4.g(1); // new least-significant-byte.\r\n }\r\n\r\n while (n >= overflow) {\r\n // To avoid rounding up, before adding\r\n n /= 2; // last byte, shift everything\r\n\r\n d /= 2; // right using integer math until\r\n\r\n x >>>= 1; // we have exactly the desired bits.\r\n }\r\n\r\n return (n + x) / d; // Form the number within [0, 1).\r\n };\r\n\r\n prng.int32 = function () {\r\n return arc4.g(4) | 0;\r\n };\r\n\r\n prng.quick = function () {\r\n return arc4.g(4) / 0x100000000;\r\n };\r\n\r\n prng[\"double\"] = prng; // Mix the randomness into accumulated entropy.\r\n\r\n mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.\r\n\r\n return (options.pass || callback || function (prng, seed, is_math_call, state) {\r\n if (state) {\r\n // Load the arc4 state from the given state if it has an S array.\r\n if (state.S) {\r\n copy(state, arc4);\r\n } // Only provide the .state method if requested via options.state.\r\n\r\n\r\n prng.state = function () {\r\n return copy(arc4, {});\r\n };\r\n } // If called as a method of Math (Math.seedrandom()), mutate\r\n // Math.random because that is how seedrandom.js has worked since v1.0.\r\n\r\n\r\n if (is_math_call) {\r\n math[rngname] = prng;\r\n return seed;\r\n } // Otherwise, it is a newer calling convention, so return the\r\n // prng directly.\r\n else return prng;\r\n })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);\r\n }\r\n\r\n math['seed' + rngname] = seedrandom; //\r\n // ARC4\r\n //\r\n // An ARC4 implementation. The constructor takes a key in the form of\r\n // an array of at most (width) integers that should be 0 <= x < (width).\r\n //\r\n // The g(count) method returns a pseudorandom integer that concatenates\r\n // the next (count) outputs from ARC4. Its return value is a number x\r\n // that is in the range 0 <= x < (width ^ count).\r\n //\r\n\r\n function ARC4(key) {\r\n var t,\r\n keylen = key.length,\r\n me = this,\r\n i = 0,\r\n j = me.i = me.j = 0,\r\n s = me.S = []; // The empty key [] is treated as [0].\r\n\r\n if (!keylen) {\r\n key = [keylen++];\r\n } // Set up S using the standard key scheduling algorithm.\r\n\r\n\r\n while (i < width) {\r\n s[i] = i++;\r\n }\r\n\r\n for (i = 0; i < width; i++) {\r\n s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\r\n s[j] = t;\r\n } // The \"g\" method returns the next (count) outputs as one number.\r\n\r\n\r\n me.g = function (count) {\r\n // Using instance members instead of closure state nearly doubles speed.\r\n var t,\r\n r = 0,\r\n i = me.i,\r\n j = me.j,\r\n s = me.S;\r\n\r\n while (count--) {\r\n t = s[i = mask & i + 1];\r\n r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];\r\n }\r\n\r\n me.i = i;\r\n me.j = j;\r\n return r; // For robust unpredictability, the function call below automatically\r\n // discards an initial batch of values. This is called RC4-drop[256].\r\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\r\n };\r\n } //\r\n // copy()\r\n // Copies internal state of ARC4 to or from a plain object.\r\n //\r\n\r\n\r\n function copy(f, t) {\r\n t.i = f.i;\r\n t.j = f.j;\r\n t.S = f.S.slice();\r\n return t;\r\n } //\r\n // flatten()\r\n // Converts an object tree to nested arrays of strings.\r\n //\r\n\r\n\r\n function flatten(obj, depth) {\r\n var result = [],\r\n typ = _typeof$1(obj),\r\n prop;\r\n\r\n if (depth && typ == 'object') {\r\n for (prop in obj) {\r\n try {\r\n result.push(flatten(obj[prop], depth - 1));\r\n } catch (e) {}\r\n }\r\n }\r\n\r\n return result.length ? result : typ == 'string' ? obj : obj + '\\0';\r\n } //\r\n // mixkey()\r\n // Mixes a string seed into a key that is an array of integers, and\r\n // returns a shortened string seed that is equivalent to the result key.\r\n //\r\n\r\n\r\n function mixkey(seed, key) {\r\n var stringseed = seed + '',\r\n smear,\r\n j = 0;\r\n\r\n while (j < stringseed.length) {\r\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\r\n }\r\n\r\n return tostring(key);\r\n } //\r\n // autoseed()\r\n // Returns an object for autoseeding, using window.crypto and Node crypto\r\n // module if available.\r\n //\r\n\r\n\r\n function autoseed() {\r\n try {\r\n if (nodecrypto) {\r\n return tostring(nodecrypto.randomBytes(width));\r\n }\r\n\r\n var out = new Uint8Array(width);\r\n (global.crypto || global.msCrypto).getRandomValues(out);\r\n return tostring(out);\r\n } catch (e) {\r\n var browser = global.navigator,\r\n plugins = browser && browser.plugins;\r\n return [+new Date(), global, plugins, global.screen, tostring(pool)];\r\n }\r\n } //\r\n // tostring()\r\n // Converts an array of charcodes to a string\r\n //\r\n\r\n\r\n function tostring(a) {\r\n return String.fromCharCode.apply(0, a);\r\n } //\r\n // When seedrandom.js is loaded, we immediately mix a few bits\r\n // from the built-in RNG into the entropy pool. Because we do\r\n // not want to interfere with deterministic PRNG state later,\r\n // seedrandom will not call math.random on its own again after\r\n // initialization.\r\n //\r\n\r\n\r\n mixkey(math.random(), pool); //\r\n // Nodejs and AMD support: export the implementation as a module using\r\n // either convention.\r\n //\r\n // End anonymous scope, and pass initial values.\r\n }\r\n\r\n ;\r\n\r\n function initialize$2(BMMath) {\r\n seedRandom([], BMMath);\r\n }\r\n\r\n var propTypes = {\r\n SHAPE: 'shape'\r\n };\r\n\r\n function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\r\n\r\n var ExpressionManager = function () {\r\n 'use strict';\r\n\r\n var ob = {};\r\n var Math = BMMath;\r\n var window = null;\r\n var document = null;\r\n var XMLHttpRequest = null;\r\n var fetch = null;\r\n var frames = null;\r\n initialize$2(BMMath);\r\n\r\n function $bm_isInstanceOfArray(arr) {\r\n return arr.constructor === Array || arr.constructor === Float32Array;\r\n }\r\n\r\n function isNumerable(tOfV, v) {\r\n return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;\r\n }\r\n\r\n function $bm_neg(a) {\r\n var tOfA = _typeof(a);\r\n\r\n if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {\r\n return -a;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a)) {\r\n var i;\r\n var lenA = a.length;\r\n var retArr = [];\r\n\r\n for (i = 0; i < lenA; i += 1) {\r\n retArr[i] = -a[i];\r\n }\r\n\r\n return retArr;\r\n }\r\n\r\n if (a.propType) {\r\n return a.v;\r\n }\r\n\r\n return -a;\r\n }\r\n\r\n var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\r\n var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\r\n var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\r\n\r\n function sum(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n if (tOfA === 'string' || tOfB === 'string') {\r\n return a + b;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a + b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n a = a.slice(0);\r\n a[0] += b;\r\n return a;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n b = b.slice(0);\r\n b[0] = a + b[0];\r\n return b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n var i = 0;\r\n var lenA = a.length;\r\n var lenB = b.length;\r\n var retArr = [];\r\n\r\n while (i < lenA || i < lenB) {\r\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n retArr[i] = a[i] + b[i];\r\n } else {\r\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return retArr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n var add = sum;\r\n\r\n function sub(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n if (tOfA === 'string') {\r\n a = parseInt(a, 10);\r\n }\r\n\r\n if (tOfB === 'string') {\r\n b = parseInt(b, 10);\r\n }\r\n\r\n return a - b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n a = a.slice(0);\r\n a[0] -= b;\r\n return a;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n b = b.slice(0);\r\n b[0] = a - b[0];\r\n return b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n var i = 0;\r\n var lenA = a.length;\r\n var lenB = b.length;\r\n var retArr = [];\r\n\r\n while (i < lenA || i < lenB) {\r\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n retArr[i] = a[i] - b[i];\r\n } else {\r\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return retArr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n function mul(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n var arr;\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a * b;\r\n }\r\n\r\n var i;\r\n var len;\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n len = a.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a[i] * b;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n len = b.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a * b[i];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n function div(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n var arr;\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a / b;\r\n }\r\n\r\n var i;\r\n var len;\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n len = a.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a[i] / b;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n len = b.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a / b[i];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n function mod(a, b) {\r\n if (typeof a === 'string') {\r\n a = parseInt(a, 10);\r\n }\r\n\r\n if (typeof b === 'string') {\r\n b = parseInt(b, 10);\r\n }\r\n\r\n return a % b;\r\n }\r\n\r\n var $bm_sum = sum;\r\n var $bm_sub = sub;\r\n var $bm_mul = mul;\r\n var $bm_div = div;\r\n var $bm_mod = mod;\r\n\r\n function clamp(num, min, max) {\r\n if (min > max) {\r\n var mm = max;\r\n max = min;\r\n min = mm;\r\n }\r\n\r\n return Math.min(Math.max(num, min), max);\r\n }\r\n\r\n function radiansToDegrees(val) {\r\n return val / degToRads;\r\n }\r\n\r\n var radians_to_degrees = radiansToDegrees;\r\n\r\n function degreesToRadians(val) {\r\n return val * degToRads;\r\n }\r\n\r\n var degrees_to_radians = radiansToDegrees;\r\n var helperLengthArray = [0, 0, 0, 0, 0, 0];\r\n\r\n function length(arr1, arr2) {\r\n if (typeof arr1 === 'number' || arr1 instanceof Number) {\r\n arr2 = arr2 || 0;\r\n return Math.abs(arr1 - arr2);\r\n }\r\n\r\n if (!arr2) {\r\n arr2 = helperLengthArray;\r\n }\r\n\r\n var i;\r\n var len = Math.min(arr1.length, arr2.length);\r\n var addedLength = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n addedLength += Math.pow(arr2[i] - arr1[i], 2);\r\n }\r\n\r\n return Math.sqrt(addedLength);\r\n }\r\n\r\n function normalize(vec) {\r\n return div(vec, length(vec));\r\n }\r\n\r\n function rgbToHsl(val) {\r\n var r = val[0];\r\n var g = val[1];\r\n var b = val[2];\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var h;\r\n var s;\r\n var l = (max + min) / 2;\r\n\r\n if (max === min) {\r\n h = 0; // achromatic\r\n\r\n s = 0; // achromatic\r\n } else {\r\n var d = max - min;\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n\r\n switch (max) {\r\n case r:\r\n h = (g - b) / d + (g < b ? 6 : 0);\r\n break;\r\n\r\n case g:\r\n h = (b - r) / d + 2;\r\n break;\r\n\r\n case b:\r\n h = (r - g) / d + 4;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n h /= 6;\r\n }\r\n\r\n return [h, s, l, val[3]];\r\n }\r\n\r\n function hue2rgb(p, q, t) {\r\n if (t < 0) t += 1;\r\n if (t > 1) t -= 1;\r\n if (t < 1 / 6) return p + (q - p) * 6 * t;\r\n if (t < 1 / 2) return q;\r\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\r\n return p;\r\n }\r\n\r\n function hslToRgb(val) {\r\n var h = val[0];\r\n var s = val[1];\r\n var l = val[2];\r\n var r;\r\n var g;\r\n var b;\r\n\r\n if (s === 0) {\r\n r = l; // achromatic\r\n\r\n b = l; // achromatic\r\n\r\n g = l; // achromatic\r\n } else {\r\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n var p = 2 * l - q;\r\n r = hue2rgb(p, q, h + 1 / 3);\r\n g = hue2rgb(p, q, h);\r\n b = hue2rgb(p, q, h - 1 / 3);\r\n }\r\n\r\n return [r, g, b, val[3]];\r\n }\r\n\r\n function linear(t, tMin, tMax, value1, value2) {\r\n if (value1 === undefined || value2 === undefined) {\r\n value1 = tMin;\r\n value2 = tMax;\r\n tMin = 0;\r\n tMax = 1;\r\n }\r\n\r\n if (tMax < tMin) {\r\n var _tMin = tMax;\r\n tMax = tMin;\r\n tMin = _tMin;\r\n }\r\n\r\n if (t <= tMin) {\r\n return value1;\r\n }\r\n\r\n if (t >= tMax) {\r\n return value2;\r\n }\r\n\r\n var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\r\n\r\n if (!value1.length) {\r\n return value1 + (value2 - value1) * perc;\r\n }\r\n\r\n var i;\r\n var len = value1.length;\r\n var arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function random(min, max) {\r\n if (max === undefined) {\r\n if (min === undefined) {\r\n min = 0;\r\n max = 1;\r\n } else {\r\n max = min;\r\n min = undefined;\r\n }\r\n }\r\n\r\n if (max.length) {\r\n var i;\r\n var len = max.length;\r\n\r\n if (!min) {\r\n min = createTypedArray('float32', len);\r\n }\r\n\r\n var arr = createTypedArray('float32', len);\r\n var rnd = BMMath.random();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = min[i] + rnd * (max[i] - min[i]);\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n if (min === undefined) {\r\n min = 0;\r\n }\r\n\r\n var rndm = BMMath.random();\r\n return min + rndm * (max - min);\r\n }\r\n\r\n function createPath(points, inTangents, outTangents, closed) {\r\n var i;\r\n var len = points.length;\r\n var path = shapePool.newElement();\r\n path.setPathData(!!closed, len);\r\n var arrPlaceholder = [0, 0];\r\n var inVertexPoint;\r\n var outVertexPoint;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;\r\n outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;\r\n path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\r\n }\r\n\r\n return path;\r\n }\r\n\r\n function initiateExpression(elem, data, property) {\r\n // Bail out if we don't want expressions\r\n function noOp(_value) {\r\n return _value;\r\n }\r\n\r\n if (!elem.globalData.renderConfig.runExpressions) {\r\n return noOp;\r\n }\r\n\r\n var val = data.x;\r\n var needsVelocity = /velocity(?![\\w\\d])/.test(val);\r\n\r\n var _needsRandom = val.indexOf('random') !== -1;\r\n\r\n var elemType = elem.data.ty;\r\n var transform;\r\n var $bm_transform;\r\n var content;\r\n var effect;\r\n var thisProperty = property;\r\n thisProperty.valueAtTime = thisProperty.getValueAtTime;\r\n Object.defineProperty(thisProperty, 'value', {\r\n get: function get() {\r\n return thisProperty.v;\r\n }\r\n });\r\n elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\r\n elem.comp.displayStartTime = 0;\r\n var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n var outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n var width = elem.data.sw ? elem.data.sw : 0;\r\n var height = elem.data.sh ? elem.data.sh : 0;\r\n var name = elem.data.nm;\r\n var loopIn;\r\n var loop_in;\r\n var loopOut;\r\n var loop_out;\r\n var smooth;\r\n var toWorld;\r\n var fromWorld;\r\n var fromComp;\r\n var toComp;\r\n var fromCompToSurface;\r\n var position;\r\n var rotation;\r\n var anchorPoint;\r\n var scale;\r\n var thisLayer;\r\n var thisComp;\r\n var mask;\r\n var valueAtTime;\r\n var velocityAtTime;\r\n var scoped_bm_rt; // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\r\n\r\n var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\r\n\r\n var numKeys = property.kf ? data.k.length : 0;\r\n var active = !this.data || this.data.hd !== true;\r\n\r\n var wiggle = function wiggle(freq, amp) {\r\n var iWiggle;\r\n var j;\r\n var lenWiggle = this.pv.length ? this.pv.length : 1;\r\n var addedAmps = createTypedArray('float32', lenWiggle);\r\n freq = 5;\r\n var iterations = Math.floor(time * freq);\r\n iWiggle = 0;\r\n j = 0;\r\n\r\n while (iWiggle < iterations) {\r\n // var rnd = BMMath.random();\r\n for (j = 0; j < lenWiggle; j += 1) {\r\n addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;\r\n }\r\n\r\n iWiggle += 1;\r\n } // var rnd2 = BMMath.random();\r\n\r\n\r\n var periods = time * freq;\r\n var perc = periods - Math.floor(periods);\r\n var arr = createTypedArray('float32', lenWiggle);\r\n\r\n if (lenWiggle > 1) {\r\n for (j = 0; j < lenWiggle; j += 1) {\r\n arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\r\n // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\r\n }.bind(this);\r\n\r\n if (thisProperty.loopIn) {\r\n loopIn = thisProperty.loopIn.bind(thisProperty);\r\n loop_in = loopIn;\r\n }\r\n\r\n if (thisProperty.loopOut) {\r\n loopOut = thisProperty.loopOut.bind(thisProperty);\r\n loop_out = loopOut;\r\n }\r\n\r\n if (thisProperty.smooth) {\r\n smooth = thisProperty.smooth.bind(thisProperty);\r\n }\r\n\r\n function loopInDuration(type, duration) {\r\n return loopIn(type, duration, true);\r\n }\r\n\r\n function loopOutDuration(type, duration) {\r\n return loopOut(type, duration, true);\r\n }\r\n\r\n if (this.getValueAtTime) {\r\n valueAtTime = this.getValueAtTime.bind(this);\r\n }\r\n\r\n if (this.getVelocityAtTime) {\r\n velocityAtTime = this.getVelocityAtTime.bind(this);\r\n }\r\n\r\n var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\r\n\r\n function lookAt(elem1, elem2) {\r\n var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\r\n var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\r\n var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\r\n return [yaw, pitch, 0];\r\n }\r\n\r\n function easeOut(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function easeIn(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeInBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function ease(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function applyEase(fn, t, tMin, tMax, val1, val2) {\r\n if (val1 === undefined) {\r\n val1 = tMin;\r\n val2 = tMax;\r\n } else {\r\n t = (t - tMin) / (tMax - tMin);\r\n }\r\n\r\n if (t > 1) {\r\n t = 1;\r\n } else if (t < 0) {\r\n t = 0;\r\n }\r\n\r\n var mult = fn(t);\r\n\r\n if ($bm_isInstanceOfArray(val1)) {\r\n var iKey;\r\n var lenKey = val1.length;\r\n var arr = createTypedArray('float32', lenKey);\r\n\r\n for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return (val2 - val1) * mult + val1;\r\n }\r\n\r\n function nearestKey(time) {\r\n var iKey;\r\n var lenKey = data.k.length;\r\n var index;\r\n var keyTime;\r\n\r\n if (!data.k.length || typeof data.k[0] === 'number') {\r\n index = 0;\r\n keyTime = 0;\r\n } else {\r\n index = -1;\r\n time *= elem.comp.globalData.frameRate;\r\n\r\n if (time < data.k[0].t) {\r\n index = 1;\r\n keyTime = data.k[0].t;\r\n } else {\r\n for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\r\n if (time === data.k[iKey].t) {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n break;\r\n } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\r\n if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\r\n index = iKey + 2;\r\n keyTime = data.k[iKey + 1].t;\r\n } else {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (index === -1) {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n }\r\n }\r\n }\r\n\r\n var obKey = {};\r\n obKey.index = index;\r\n obKey.time = keyTime / elem.comp.globalData.frameRate;\r\n return obKey;\r\n }\r\n\r\n function key(ind) {\r\n var obKey;\r\n var iKey;\r\n var lenKey;\r\n\r\n if (!data.k.length || typeof data.k[0] === 'number') {\r\n throw new Error('The property has no keyframe at index ' + ind);\r\n }\r\n\r\n ind -= 1;\r\n obKey = {\r\n time: data.k[ind].t / elem.comp.globalData.frameRate,\r\n value: []\r\n };\r\n var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\r\n lenKey = arr.length;\r\n\r\n for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n obKey[iKey] = arr[iKey];\r\n obKey.value[iKey] = arr[iKey];\r\n }\r\n\r\n return obKey;\r\n }\r\n\r\n function framesToTime(fr, fps) {\r\n if (!fps) {\r\n fps = elem.comp.globalData.frameRate;\r\n }\r\n\r\n return fr / fps;\r\n }\r\n\r\n function timeToFrames(t, fps) {\r\n if (!t && t !== 0) {\r\n t = time;\r\n }\r\n\r\n if (!fps) {\r\n fps = elem.comp.globalData.frameRate;\r\n }\r\n\r\n return t * fps;\r\n }\r\n\r\n function seedRandom(seed) {\r\n BMMath.seedrandom(randSeed + seed);\r\n }\r\n\r\n function sourceRectAtTime() {\r\n return elem.sourceRectAtTime();\r\n }\r\n\r\n function substring(init, end) {\r\n if (typeof value === 'string') {\r\n if (end === undefined) {\r\n return value.substring(init);\r\n }\r\n\r\n return value.substring(init, end);\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function substr(init, end) {\r\n if (typeof value === 'string') {\r\n if (end === undefined) {\r\n return value.substr(init);\r\n }\r\n\r\n return value.substr(init, end);\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function posterizeTime(framesPerSecond) {\r\n time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\r\n value = valueAtTime(time);\r\n }\r\n\r\n var time;\r\n var velocity;\r\n var value;\r\n var text;\r\n var textIndex;\r\n var textTotal;\r\n var selectorValue;\r\n var index = elem.data.ind;\r\n var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n var parent;\r\n var randSeed = Math.floor(Math.random() * 1000000);\r\n var globalData = elem.globalData;\r\n\r\n function executeExpression(_value) {\r\n // globalData.pushExpression();\r\n value = _value;\r\n\r\n if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\r\n return value;\r\n }\r\n\r\n if (this.propType === 'textSelector') {\r\n textIndex = this.textIndex;\r\n textTotal = this.textTotal;\r\n selectorValue = this.selectorValue;\r\n }\r\n\r\n if (!thisLayer) {\r\n text = elem.layerInterface.text;\r\n thisLayer = elem.layerInterface;\r\n thisComp = elem.comp.compInterface;\r\n toWorld = thisLayer.toWorld.bind(thisLayer);\r\n fromWorld = thisLayer.fromWorld.bind(thisLayer);\r\n fromComp = thisLayer.fromComp.bind(thisLayer);\r\n toComp = thisLayer.toComp.bind(thisLayer);\r\n mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\r\n fromCompToSurface = fromComp;\r\n }\r\n\r\n if (!transform) {\r\n transform = elem.layerInterface('ADBE Transform Group');\r\n $bm_transform = transform;\r\n\r\n if (transform) {\r\n anchorPoint = transform.anchorPoint;\r\n /* position = transform.position;\r\n rotation = transform.rotation;\r\n scale = transform.scale; */\r\n }\r\n }\r\n\r\n if (elemType === 4 && !content) {\r\n content = thisLayer('ADBE Root Vectors Group');\r\n }\r\n\r\n if (!effect) {\r\n effect = thisLayer(4);\r\n }\r\n\r\n hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n\r\n if (hasParent && !parent) {\r\n parent = elem.hierarchy[0].layerInterface;\r\n }\r\n\r\n time = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n\r\n if (_needsRandom) {\r\n seedRandom(randSeed + time);\r\n }\r\n\r\n if (needsVelocity) {\r\n velocity = velocityAtTime(time);\r\n }\r\n\r\n expression_function();\r\n this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value\r\n // Changed this to a ternary operation because Rollup failed compiling it correctly\r\n\r\n scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;\r\n return scoped_bm_rt;\r\n } // Bundlers will see these as dead code and unless we reference them\r\n\r\n\r\n executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];\r\n return executeExpression;\r\n }\r\n\r\n ob.initiateExpression = initiateExpression;\r\n ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];\r\n return ob;\r\n }();\r\n\r\n var expressionHelpers = function () {\r\n function searchExpressions(elem, data, prop) {\r\n if (data.x) {\r\n prop.k = true;\r\n prop.x = true;\r\n prop.initiateExpression = ExpressionManager.initiateExpression;\r\n prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\r\n }\r\n }\r\n\r\n function getValueAtTime(frameNum) {\r\n frameNum *= this.elem.globalData.frameRate;\r\n frameNum -= this.offsetTime;\r\n\r\n if (frameNum !== this._cachingAtTime.lastFrame) {\r\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\r\n this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\r\n this._cachingAtTime.lastFrame = frameNum;\r\n }\r\n\r\n return this._cachingAtTime.value;\r\n }\r\n\r\n function getSpeedAtTime(frameNum) {\r\n var delta = -0.01;\r\n var v1 = this.getValueAtTime(frameNum);\r\n var v2 = this.getValueAtTime(frameNum + delta);\r\n var speed = 0;\r\n\r\n if (v1.length) {\r\n var i;\r\n\r\n for (i = 0; i < v1.length; i += 1) {\r\n speed += Math.pow(v2[i] - v1[i], 2);\r\n }\r\n\r\n speed = Math.sqrt(speed) * 100;\r\n } else {\r\n speed = 0;\r\n }\r\n\r\n return speed;\r\n }\r\n\r\n function getVelocityAtTime(frameNum) {\r\n if (this.vel !== undefined) {\r\n return this.vel;\r\n }\r\n\r\n var delta = -0.001; // frameNum += this.elem.data.st;\r\n\r\n var v1 = this.getValueAtTime(frameNum);\r\n var v2 = this.getValueAtTime(frameNum + delta);\r\n var velocity;\r\n\r\n if (v1.length) {\r\n velocity = createTypedArray('float32', v1.length);\r\n var i;\r\n\r\n for (i = 0; i < v1.length; i += 1) {\r\n // removing frameRate\r\n // if needed, don't add it here\r\n // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\r\n velocity[i] = (v2[i] - v1[i]) / delta;\r\n }\r\n } else {\r\n velocity = (v2 - v1) / delta;\r\n }\r\n\r\n return velocity;\r\n }\r\n\r\n function getStaticValueAtTime() {\r\n return this.pv;\r\n }\r\n\r\n function setGroupProperty(propertyGroup) {\r\n this.propertyGroup = propertyGroup;\r\n }\r\n\r\n return {\r\n searchExpressions: searchExpressions,\r\n getSpeedAtTime: getSpeedAtTime,\r\n getVelocityAtTime: getVelocityAtTime,\r\n getValueAtTime: getValueAtTime,\r\n getStaticValueAtTime: getStaticValueAtTime,\r\n setGroupProperty: setGroupProperty\r\n };\r\n }();\r\n\r\n function addPropertyDecorator() {\r\n function loopOut(type, duration, durationFlag) {\r\n if (!this.k || !this.keyframes) {\r\n return this.pv;\r\n }\r\n\r\n type = type ? type.toLowerCase() : '';\r\n var currentFrame = this.comp.renderedFrame;\r\n var keyframes = this.keyframes;\r\n var lastKeyFrame = keyframes[keyframes.length - 1].t;\r\n\r\n if (currentFrame <= lastKeyFrame) {\r\n return this.pv;\r\n }\r\n\r\n var cycleDuration;\r\n var firstKeyFrame;\r\n\r\n if (!durationFlag) {\r\n if (!duration || duration > keyframes.length - 1) {\r\n duration = keyframes.length - 1;\r\n }\r\n\r\n firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\r\n cycleDuration = lastKeyFrame - firstKeyFrame;\r\n } else {\r\n if (!duration) {\r\n cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\r\n } else {\r\n cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\r\n }\r\n\r\n firstKeyFrame = lastKeyFrame - cycleDuration;\r\n }\r\n\r\n var i;\r\n var len;\r\n var ret;\r\n\r\n if (type === 'pingpong') {\r\n var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n\r\n if (iterations % 2 !== 0) {\r\n return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n } else if (type === 'offset') {\r\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n\r\n var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n\r\n if (this.pv.length) {\r\n ret = new Array(initV.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = (endV[i] - initV[i]) * repeats + current[i];\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return (endV - initV) * repeats + current;\r\n } else if (type === 'continue') {\r\n var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\r\n\r\n if (this.pv.length) {\r\n ret = new Array(lastValue.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);\r\n }\r\n\r\n return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n\r\n function loopIn(type, duration, durationFlag) {\r\n if (!this.k) {\r\n return this.pv;\r\n }\r\n\r\n type = type ? type.toLowerCase() : '';\r\n var currentFrame = this.comp.renderedFrame;\r\n var keyframes = this.keyframes;\r\n var firstKeyFrame = keyframes[0].t;\r\n\r\n if (currentFrame >= firstKeyFrame) {\r\n return this.pv;\r\n }\r\n\r\n var cycleDuration;\r\n var lastKeyFrame;\r\n\r\n if (!durationFlag) {\r\n if (!duration || duration > keyframes.length - 1) {\r\n duration = keyframes.length - 1;\r\n }\r\n\r\n lastKeyFrame = keyframes[duration].t;\r\n cycleDuration = lastKeyFrame - firstKeyFrame;\r\n } else {\r\n if (!duration) {\r\n cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\r\n } else {\r\n cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\r\n }\r\n\r\n lastKeyFrame = firstKeyFrame + cycleDuration;\r\n }\r\n\r\n var i;\r\n var len;\r\n var ret;\r\n\r\n if (type === 'pingpong') {\r\n var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\r\n\r\n if (iterations % 2 === 0) {\r\n return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n } else if (type === 'offset') {\r\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);\r\n var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\r\n\r\n if (this.pv.length) {\r\n ret = new Array(initV.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return current - (endV - initV) * repeats;\r\n } else if (type === 'continue') {\r\n var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\r\n\r\n if (this.pv.length) {\r\n ret = new Array(firstValue.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;\r\n }\r\n\r\n return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n\r\n function smooth(width, samples) {\r\n if (!this.k) {\r\n return this.pv;\r\n }\r\n\r\n width = (width || 0.4) * 0.5;\r\n samples = Math.floor(samples || 5);\r\n\r\n if (samples <= 1) {\r\n return this.pv;\r\n }\r\n\r\n var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n var initFrame = currentTime - width;\r\n var endFrame = currentTime + width;\r\n var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\r\n var i = 0;\r\n var j = 0;\r\n var value;\r\n\r\n if (this.pv.length) {\r\n value = createTypedArray('float32', this.pv.length);\r\n } else {\r\n value = 0;\r\n }\r\n\r\n var sampleValue;\r\n\r\n while (i < samples) {\r\n sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\r\n\r\n if (this.pv.length) {\r\n for (j = 0; j < this.pv.length; j += 1) {\r\n value[j] += sampleValue[j];\r\n }\r\n } else {\r\n value += sampleValue;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (this.pv.length) {\r\n for (j = 0; j < this.pv.length; j += 1) {\r\n value[j] /= samples;\r\n }\r\n } else {\r\n value /= samples;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n function getTransformValueAtTime(time) {\r\n if (!this._transformCachingAtTime) {\r\n this._transformCachingAtTime = {\r\n v: new Matrix()\r\n };\r\n } /// /\r\n\r\n\r\n var matrix = this._transformCachingAtTime.v;\r\n matrix.cloneFromProps(this.pre.props);\r\n\r\n if (this.appliedTransformations < 1) {\r\n var anchor = this.a.getValueAtTime(time);\r\n matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);\r\n }\r\n\r\n if (this.appliedTransformations < 2) {\r\n var scale = this.s.getValueAtTime(time);\r\n matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);\r\n }\r\n\r\n if (this.sk && this.appliedTransformations < 3) {\r\n var skew = this.sk.getValueAtTime(time);\r\n var skewAxis = this.sa.getValueAtTime(time);\r\n matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\r\n }\r\n\r\n if (this.r && this.appliedTransformations < 4) {\r\n var rotation = this.r.getValueAtTime(time);\r\n matrix.rotate(-rotation * this.r.mult);\r\n } else if (!this.r && this.appliedTransformations < 4) {\r\n var rotationZ = this.rz.getValueAtTime(time);\r\n var rotationY = this.ry.getValueAtTime(time);\r\n var rotationX = this.rx.getValueAtTime(time);\r\n var orientation = this.or.getValueAtTime(time);\r\n matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);\r\n }\r\n\r\n if (this.data.p && this.data.p.s) {\r\n var positionX = this.px.getValueAtTime(time);\r\n var positionY = this.py.getValueAtTime(time);\r\n\r\n if (this.data.p.z) {\r\n var positionZ = this.pz.getValueAtTime(time);\r\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);\r\n } else {\r\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\r\n }\r\n } else {\r\n var position = this.p.getValueAtTime(time);\r\n matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);\r\n }\r\n\r\n return matrix; /// /\r\n }\r\n\r\n function getTransformStaticValueAtTime() {\r\n return this.v.clone(new Matrix());\r\n }\r\n\r\n var getTransformProperty = TransformPropertyFactory.getTransformProperty;\r\n\r\n TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\r\n var prop = getTransformProperty(elem, data, container);\r\n\r\n if (prop.dynamicProperties.length) {\r\n prop.getValueAtTime = getTransformValueAtTime.bind(prop);\r\n } else {\r\n prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\r\n }\r\n\r\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n return prop;\r\n };\r\n\r\n var propertyGetProp = PropertyFactory.getProp;\r\n\r\n PropertyFactory.getProp = function (elem, data, type, mult, container) {\r\n var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;\r\n // prop.loopOut = loopOut;\r\n // prop.loopIn = loopIn;\r\n\r\n if (prop.kf) {\r\n prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\r\n } else {\r\n prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\r\n }\r\n\r\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n prop.loopOut = loopOut;\r\n prop.loopIn = loopIn;\r\n prop.smooth = smooth;\r\n prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\r\n prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\r\n prop.numKeys = data.a === 1 ? data.k.length : 0;\r\n prop.propertyIndex = data.ix;\r\n var value = 0;\r\n\r\n if (type !== 0) {\r\n value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\r\n }\r\n\r\n prop._cachingAtTime = {\r\n lastFrame: initialDefaultFrame,\r\n lastIndex: 0,\r\n value: value\r\n };\r\n expressionHelpers.searchExpressions(elem, data, prop);\r\n\r\n if (prop.k) {\r\n container.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n };\r\n\r\n function getShapeValueAtTime(frameNum) {\r\n // For now this caching object is created only when needed instead of creating it when the shape is initialized.\r\n if (!this._cachingAtTime) {\r\n this._cachingAtTime = {\r\n shapeValue: shapePool.clone(this.pv),\r\n lastIndex: 0,\r\n lastTime: initialDefaultFrame\r\n };\r\n }\r\n\r\n frameNum *= this.elem.globalData.frameRate;\r\n frameNum -= this.offsetTime;\r\n\r\n if (frameNum !== this._cachingAtTime.lastTime) {\r\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\r\n this._cachingAtTime.lastTime = frameNum;\r\n this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\r\n }\r\n\r\n return this._cachingAtTime.shapeValue;\r\n }\r\n\r\n var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\r\n var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\r\n\r\n function ShapeExpressions() {}\r\n\r\n ShapeExpressions.prototype = {\r\n vertices: function vertices(prop, time) {\r\n if (this.k) {\r\n this.getValue();\r\n }\r\n\r\n var shapePath = this.v;\r\n\r\n if (time !== undefined) {\r\n shapePath = this.getValueAtTime(time, 0);\r\n }\r\n\r\n var i;\r\n var len = shapePath._length;\r\n var vertices = shapePath[prop];\r\n var points = shapePath.v;\r\n var arr = createSizedArray(len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (prop === 'i' || prop === 'o') {\r\n arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\r\n } else {\r\n arr[i] = [vertices[i][0], vertices[i][1]];\r\n }\r\n }\r\n\r\n return arr;\r\n },\r\n points: function points(time) {\r\n return this.vertices('v', time);\r\n },\r\n inTangents: function inTangents(time) {\r\n return this.vertices('i', time);\r\n },\r\n outTangents: function outTangents(time) {\r\n return this.vertices('o', time);\r\n },\r\n isClosed: function isClosed() {\r\n return this.v.c;\r\n },\r\n pointOnPath: function pointOnPath(perc, time) {\r\n var shapePath = this.v;\r\n\r\n if (time !== undefined) {\r\n shapePath = this.getValueAtTime(time, 0);\r\n }\r\n\r\n if (!this._segmentsLength) {\r\n this._segmentsLength = bez.getSegmentsLength(shapePath);\r\n }\r\n\r\n var segmentsLength = this._segmentsLength;\r\n var lengths = segmentsLength.lengths;\r\n var lengthPos = segmentsLength.totalLength * perc;\r\n var i = 0;\r\n var len = lengths.length;\r\n var accumulatedLength = 0;\r\n var pt;\r\n\r\n while (i < len) {\r\n if (accumulatedLength + lengths[i].addedLength > lengthPos) {\r\n var initIndex = i;\r\n var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;\r\n var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\r\n pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\r\n break;\r\n } else {\r\n accumulatedLength += lengths[i].addedLength;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (!pt) {\r\n pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\r\n }\r\n\r\n return pt;\r\n },\r\n vectorOnPath: function vectorOnPath(perc, time, vectorType) {\r\n // perc doesn't use triple equality because it can be a Number object as well as a primitive.\r\n if (perc == 1) {\r\n // eslint-disable-line eqeqeq\r\n perc = this.v.c;\r\n } else if (perc == 0) {\r\n // eslint-disable-line eqeqeq\r\n perc = 0.999;\r\n }\r\n\r\n var pt1 = this.pointOnPath(perc, time);\r\n var pt2 = this.pointOnPath(perc + 0.001, time);\r\n var xLength = pt2[0] - pt1[0];\r\n var yLength = pt2[1] - pt1[1];\r\n var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\r\n\r\n if (magnitude === 0) {\r\n return [0, 0];\r\n }\r\n\r\n var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\r\n return unitVector;\r\n },\r\n tangentOnPath: function tangentOnPath(perc, time) {\r\n return this.vectorOnPath(perc, time, 'tangent');\r\n },\r\n normalOnPath: function normalOnPath(perc, time) {\r\n return this.vectorOnPath(perc, time, 'normal');\r\n },\r\n setGroupProperty: expressionHelpers.setGroupProperty,\r\n getValueAtTime: expressionHelpers.getStaticValueAtTime\r\n };\r\n extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\r\n extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\r\n KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\r\n KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\r\n var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\r\n\r\n ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\r\n var prop = propertyGetShapeProp(elem, data, type, arr, trims);\r\n prop.propertyIndex = data.ix;\r\n prop.lock = false;\r\n\r\n if (type === 3) {\r\n expressionHelpers.searchExpressions(elem, data.pt, prop);\r\n } else if (type === 4) {\r\n expressionHelpers.searchExpressions(elem, data.ks, prop);\r\n }\r\n\r\n if (prop.k) {\r\n elem.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n };\r\n }\r\n\r\n function initialize$1() {\r\n addPropertyDecorator();\r\n }\r\n\r\n function addDecorator() {\r\n function searchExpressions() {\r\n if (this.data.d.x) {\r\n this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\r\n this.addEffect(this.getExpressionValue.bind(this));\r\n return true;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n TextProperty.prototype.getExpressionValue = function (currentValue, text) {\r\n var newValue = this.calculateExpression(text);\r\n\r\n if (currentValue.t !== newValue) {\r\n var newData = {};\r\n this.copyData(newData, currentValue);\r\n newData.t = newValue.toString();\r\n newData.__complete = false;\r\n return newData;\r\n }\r\n\r\n return currentValue;\r\n };\r\n\r\n TextProperty.prototype.searchProperty = function () {\r\n var isKeyframed = this.searchKeyframes();\r\n var hasExpressions = this.searchExpressions();\r\n this.kf = isKeyframed || hasExpressions;\r\n return this.kf;\r\n };\r\n\r\n TextProperty.prototype.searchExpressions = searchExpressions;\r\n }\r\n\r\n function initialize() {\r\n addDecorator();\r\n }\r\n\r\n function SVGComposableEffect() {}\r\n\r\n SVGComposableEffect.prototype = {\r\n createMergeNode: function createMergeNode(resultId, ins) {\r\n var feMerge = createNS('feMerge');\r\n feMerge.setAttribute('result', resultId);\r\n var feMergeNode;\r\n var i;\r\n\r\n for (i = 0; i < ins.length; i += 1) {\r\n feMergeNode = createNS('feMergeNode');\r\n feMergeNode.setAttribute('in', ins[i]);\r\n feMerge.appendChild(feMergeNode);\r\n feMerge.appendChild(feMergeNode);\r\n }\r\n\r\n return feMerge;\r\n }\r\n };\r\n\r\n function SVGTintFilter(filter, filterManager, elem, id, source) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n feColorMatrix.setAttribute('values', '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');\r\n feColorMatrix.setAttribute('result', id + '_tint_1');\r\n filter.appendChild(feColorMatrix);\r\n feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', id + '_tint_2');\r\n filter.appendChild(feColorMatrix);\r\n this.matrixFilter = feColorMatrix;\r\n var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']);\r\n filter.appendChild(feMerge);\r\n }\r\n\r\n extendPrototype([SVGComposableEffect], SVGTintFilter);\r\n\r\n SVGTintFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var colorBlack = this.filterManager.effectElements[0].p.v;\r\n var colorWhite = this.filterManager.effectElements[1].p.v;\r\n var opacity = this.filterManager.effectElements[2].p.v / 100;\r\n this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 ' + opacity + ' 0');\r\n }\r\n };\r\n\r\n function SVGFillFilter(filter, filterManager, elem, id) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', id);\r\n filter.appendChild(feColorMatrix);\r\n this.matrixFilter = feColorMatrix;\r\n }\r\n\r\n SVGFillFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var color = this.filterManager.effectElements[2].p.v;\r\n var opacity = this.filterManager.effectElements[6].p.v;\r\n this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\r\n }\r\n };\r\n\r\n function SVGStrokeEffect(fil, filterManager, elem) {\r\n this.initialized = false;\r\n this.filterManager = filterManager;\r\n this.elem = elem;\r\n this.paths = [];\r\n }\r\n\r\n SVGStrokeEffect.prototype.initialize = function () {\r\n var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n var path;\r\n var groupPath;\r\n var i;\r\n var len;\r\n\r\n if (this.filterManager.effectElements[1].p.v === 1) {\r\n len = this.elem.maskManager.masksProperties.length;\r\n i = 0;\r\n } else {\r\n i = this.filterManager.effectElements[0].p.v - 1;\r\n len = i + 1;\r\n }\r\n\r\n groupPath = createNS('g');\r\n groupPath.setAttribute('fill', 'none');\r\n groupPath.setAttribute('stroke-linecap', 'round');\r\n groupPath.setAttribute('stroke-dashoffset', 1);\r\n\r\n for (i; i < len; i += 1) {\r\n path = createNS('path');\r\n groupPath.appendChild(path);\r\n this.paths.push({\r\n p: path,\r\n m: i\r\n });\r\n }\r\n\r\n if (this.filterManager.effectElements[10].p.v === 3) {\r\n var mask = createNS('mask');\r\n var id = createElementID();\r\n mask.setAttribute('id', id);\r\n mask.setAttribute('mask-type', 'alpha');\r\n mask.appendChild(groupPath);\r\n this.elem.globalData.defs.appendChild(mask);\r\n var g = createNS('g');\r\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\r\n\r\n while (elemChildren[0]) {\r\n g.appendChild(elemChildren[0]);\r\n }\r\n\r\n this.elem.layerElement.appendChild(g);\r\n this.masker = mask;\r\n groupPath.setAttribute('stroke', '#fff');\r\n } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n if (this.filterManager.effectElements[10].p.v === 2) {\r\n elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n\r\n while (elemChildren.length) {\r\n this.elem.layerElement.removeChild(elemChildren[0]);\r\n }\r\n }\r\n\r\n this.elem.layerElement.appendChild(groupPath);\r\n this.elem.layerElement.removeAttribute('mask');\r\n groupPath.setAttribute('stroke', '#fff');\r\n }\r\n\r\n this.initialized = true;\r\n this.pathMasker = groupPath;\r\n };\r\n\r\n SVGStrokeEffect.prototype.renderFrame = function (forceRender) {\r\n if (!this.initialized) {\r\n this.initialize();\r\n }\r\n\r\n var i;\r\n var len = this.paths.length;\r\n var mask;\r\n var path;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.paths[i].m !== -1) {\r\n mask = this.elem.maskManager.viewData[this.paths[i].m];\r\n path = this.paths[i].p;\r\n\r\n if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\r\n path.setAttribute('d', mask.lastPath);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\r\n var dasharrayValue;\r\n\r\n if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\r\n var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n var l = path.getTotalLength();\r\n dasharrayValue = '0 0 0 ' + l * s + ' ';\r\n var lineLength = l * (e - s);\r\n var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n var units = Math.floor(lineLength / segment);\r\n var j;\r\n\r\n for (j = 0; j < units; j += 1) {\r\n dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\r\n }\r\n\r\n dasharrayValue += '0 ' + l * 10 + ' 0 0';\r\n } else {\r\n dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n }\r\n\r\n path.setAttribute('stroke-dasharray', dasharrayValue);\r\n }\r\n }\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[6].p._mdf) {\r\n this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\r\n }\r\n\r\n if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n if (forceRender || this.filterManager.effectElements[3].p._mdf) {\r\n var color = this.filterManager.effectElements[3].p.v;\r\n this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\r\n }\r\n }\r\n };\r\n\r\n function SVGTritoneFilter(filter, filterManager, elem, id) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n feColorMatrix.setAttribute('values', '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');\r\n filter.appendChild(feColorMatrix);\r\n var feComponentTransfer = createNS('feComponentTransfer');\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n feComponentTransfer.setAttribute('result', id);\r\n this.matrixFilter = feComponentTransfer;\r\n var feFuncR = createNS('feFuncR');\r\n feFuncR.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncR);\r\n this.feFuncR = feFuncR;\r\n var feFuncG = createNS('feFuncG');\r\n feFuncG.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncG);\r\n this.feFuncG = feFuncG;\r\n var feFuncB = createNS('feFuncB');\r\n feFuncB.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncB);\r\n this.feFuncB = feFuncB;\r\n filter.appendChild(feComponentTransfer);\r\n }\r\n\r\n SVGTritoneFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var color1 = this.filterManager.effectElements[0].p.v;\r\n var color2 = this.filterManager.effectElements[1].p.v;\r\n var color3 = this.filterManager.effectElements[2].p.v;\r\n var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\r\n var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\r\n var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\r\n this.feFuncR.setAttribute('tableValues', tableR);\r\n this.feFuncG.setAttribute('tableValues', tableG);\r\n this.feFuncB.setAttribute('tableValues', tableB);\r\n }\r\n };\r\n\r\n function SVGProLevelsFilter(filter, filterManager, elem, id) {\r\n this.filterManager = filterManager;\r\n var effectElements = this.filterManager.effectElements;\r\n var feComponentTransfer = createNS('feComponentTransfer'); // Red\r\n\r\n if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\r\n this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\r\n } // Green\r\n\r\n\r\n if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\r\n this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\r\n } // Blue\r\n\r\n\r\n if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\r\n this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\r\n } // Alpha\r\n\r\n\r\n if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\r\n this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\r\n } // RGB\r\n\r\n\r\n if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n filter.appendChild(feComponentTransfer);\r\n }\r\n\r\n if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\r\n feComponentTransfer = createNS('feComponentTransfer');\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n feComponentTransfer.setAttribute('result', id);\r\n filter.appendChild(feComponentTransfer);\r\n this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\r\n this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\r\n this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\r\n }\r\n }\r\n\r\n SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\r\n var feFunc = createNS(type);\r\n feFunc.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFunc);\r\n return feFunc;\r\n };\r\n\r\n SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\r\n var cnt = 0;\r\n var segments = 256;\r\n var perc;\r\n var min = Math.min(inputBlack, inputWhite);\r\n var max = Math.max(inputBlack, inputWhite);\r\n var table = Array.call(null, {\r\n length: segments\r\n });\r\n var colorValue;\r\n var pos = 0;\r\n var outputDelta = outputWhite - outputBlack;\r\n var inputDelta = inputWhite - inputBlack;\r\n\r\n while (cnt <= 256) {\r\n perc = cnt / 256;\r\n\r\n if (perc <= min) {\r\n colorValue = inputDelta < 0 ? outputWhite : outputBlack;\r\n } else if (perc >= max) {\r\n colorValue = inputDelta < 0 ? outputBlack : outputWhite;\r\n } else {\r\n colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);\r\n }\r\n\r\n table[pos] = colorValue;\r\n pos += 1;\r\n cnt += 256 / (segments - 1);\r\n }\r\n\r\n return table.join(' ');\r\n };\r\n\r\n SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var val;\r\n var effectElements = this.filterManager.effectElements;\r\n\r\n if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\r\n val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\r\n this.feFuncRComposed.setAttribute('tableValues', val);\r\n this.feFuncGComposed.setAttribute('tableValues', val);\r\n this.feFuncBComposed.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\r\n val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\r\n this.feFuncR.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\r\n val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\r\n this.feFuncG.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\r\n val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\r\n this.feFuncB.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\r\n val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\r\n this.feFuncA.setAttribute('tableValues', val);\r\n }\r\n }\r\n };\r\n\r\n function SVGDropShadowEffect(filter, filterManager, elem, id, source) {\r\n var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize;\r\n var filterSize = filterManager.data.fs || globalFilterSize;\r\n filter.setAttribute('x', filterSize.x || globalFilterSize.x);\r\n filter.setAttribute('y', filterSize.y || globalFilterSize.y);\r\n filter.setAttribute('width', filterSize.width || globalFilterSize.width);\r\n filter.setAttribute('height', filterSize.height || globalFilterSize.height);\r\n this.filterManager = filterManager;\r\n var feGaussianBlur = createNS('feGaussianBlur');\r\n feGaussianBlur.setAttribute('in', 'SourceAlpha');\r\n feGaussianBlur.setAttribute('result', id + '_drop_shadow_1');\r\n feGaussianBlur.setAttribute('stdDeviation', '0');\r\n this.feGaussianBlur = feGaussianBlur;\r\n filter.appendChild(feGaussianBlur);\r\n var feOffset = createNS('feOffset');\r\n feOffset.setAttribute('dx', '25');\r\n feOffset.setAttribute('dy', '0');\r\n feOffset.setAttribute('in', id + '_drop_shadow_1');\r\n feOffset.setAttribute('result', id + '_drop_shadow_2');\r\n this.feOffset = feOffset;\r\n filter.appendChild(feOffset);\r\n var feFlood = createNS('feFlood');\r\n feFlood.setAttribute('flood-color', '#00ff00');\r\n feFlood.setAttribute('flood-opacity', '1');\r\n feFlood.setAttribute('result', id + '_drop_shadow_3');\r\n this.feFlood = feFlood;\r\n filter.appendChild(feFlood);\r\n var feComposite = createNS('feComposite');\r\n feComposite.setAttribute('in', id + '_drop_shadow_3');\r\n feComposite.setAttribute('in2', id + '_drop_shadow_2');\r\n feComposite.setAttribute('operator', 'in');\r\n feComposite.setAttribute('result', id + '_drop_shadow_4');\r\n filter.appendChild(feComposite);\r\n var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]);\r\n filter.appendChild(feMerge); //\r\n }\r\n\r\n extendPrototype([SVGComposableEffect], SVGDropShadowEffect);\r\n\r\n SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[0].p._mdf) {\r\n var col = this.filterManager.effectElements[0].p.v;\r\n this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[1].p._mdf) {\r\n this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\r\n var distance = this.filterManager.effectElements[3].p.v;\r\n var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\r\n var x = distance * Math.cos(angle);\r\n var y = distance * Math.sin(angle);\r\n this.feOffset.setAttribute('dx', x);\r\n this.feOffset.setAttribute('dy', y);\r\n }\r\n }\r\n };\r\n\r\n var _svgMatteSymbols = [];\r\n\r\n function SVGMatte3Effect(filterElem, filterManager, elem) {\r\n this.initialized = false;\r\n this.filterManager = filterManager;\r\n this.filterElem = filterElem;\r\n this.elem = elem;\r\n elem.matteElement = createNS('g');\r\n elem.matteElement.appendChild(elem.layerElement);\r\n elem.matteElement.appendChild(elem.transformedElement);\r\n elem.baseElement = elem.matteElement;\r\n }\r\n\r\n SVGMatte3Effect.prototype.findSymbol = function (mask) {\r\n var i = 0;\r\n var len = _svgMatteSymbols.length;\r\n\r\n while (i < len) {\r\n if (_svgMatteSymbols[i] === mask) {\r\n return _svgMatteSymbols[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\r\n var parentNode = mask.layerElement.parentNode;\r\n\r\n if (!parentNode) {\r\n return;\r\n }\r\n\r\n var children = parentNode.children;\r\n var i = 0;\r\n var len = children.length;\r\n\r\n while (i < len) {\r\n if (children[i] === mask.layerElement) {\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n var nextChild;\r\n\r\n if (i <= len - 2) {\r\n nextChild = children[i + 1];\r\n }\r\n\r\n var useElem = createNS('use');\r\n useElem.setAttribute('href', '#' + symbolId);\r\n\r\n if (nextChild) {\r\n parentNode.insertBefore(useElem, nextChild);\r\n } else {\r\n parentNode.appendChild(useElem);\r\n }\r\n };\r\n\r\n SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\r\n if (!this.findSymbol(mask)) {\r\n var symbolId = createElementID();\r\n var masker = createNS('mask');\r\n masker.setAttribute('id', mask.layerId);\r\n masker.setAttribute('mask-type', 'alpha');\r\n\r\n _svgMatteSymbols.push(mask);\r\n\r\n var defs = elem.globalData.defs;\r\n defs.appendChild(masker);\r\n var symbol = createNS('symbol');\r\n symbol.setAttribute('id', symbolId);\r\n this.replaceInParent(mask, symbolId);\r\n symbol.appendChild(mask.layerElement);\r\n defs.appendChild(symbol);\r\n var useElem = createNS('use');\r\n useElem.setAttribute('href', '#' + symbolId);\r\n masker.appendChild(useElem);\r\n mask.data.hd = false;\r\n mask.show();\r\n }\r\n\r\n elem.setMatte(mask.layerId);\r\n };\r\n\r\n SVGMatte3Effect.prototype.initialize = function () {\r\n var ind = this.filterManager.effectElements[0].p.v;\r\n var elements = this.elem.comp.elements;\r\n var i = 0;\r\n var len = elements.length;\r\n\r\n while (i < len) {\r\n if (elements[i] && elements[i].data.ind === ind) {\r\n this.setElementAsMask(this.elem, elements[i]);\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n this.initialized = true;\r\n };\r\n\r\n SVGMatte3Effect.prototype.renderFrame = function () {\r\n if (!this.initialized) {\r\n this.initialize();\r\n }\r\n };\r\n\r\n function SVGGaussianBlurEffect(filter, filterManager, elem, id) {\r\n // Outset the filter region by 100% on all sides to accommodate blur expansion.\r\n filter.setAttribute('x', '-100%');\r\n filter.setAttribute('y', '-100%');\r\n filter.setAttribute('width', '300%');\r\n filter.setAttribute('height', '300%');\r\n this.filterManager = filterManager;\r\n var feGaussianBlur = createNS('feGaussianBlur');\r\n feGaussianBlur.setAttribute('result', id);\r\n filter.appendChild(feGaussianBlur);\r\n this.feGaussianBlur = feGaussianBlur;\r\n }\r\n\r\n SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n // Empirical value, matching AE's blur appearance.\r\n var kBlurrinessToSigma = 0.3;\r\n var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:\r\n //\r\n // 1 -> horizontal & vertical\r\n // 2 -> horizontal only\r\n // 3 -> vertical only\r\n //\r\n\r\n var dimensions = this.filterManager.effectElements[1].p.v;\r\n var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:\r\n //\r\n // 0 -> off -> duplicate\r\n // 1 -> on -> wrap\r\n\r\n var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\r\n\r\n this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\r\n }\r\n };\r\n\r\n registerRenderer('canvas', CanvasRenderer);\r\n registerRenderer('html', HybridRenderer);\r\n registerRenderer('svg', SVGRenderer); // Registering shape modifiers\r\n\r\n ShapeModifiers.registerModifier('tm', TrimModifier);\r\n ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\r\n ShapeModifiers.registerModifier('rp', RepeaterModifier);\r\n ShapeModifiers.registerModifier('rd', RoundCornersModifier);\r\n ShapeModifiers.registerModifier('zz', ZigZagModifier);\r\n ShapeModifiers.registerModifier('op', OffsetPathModifier); // Registering expression plugin\r\n\r\n setExpressionsPlugin(Expressions);\r\n setExpressionInterfaces(getInterface);\r\n initialize$1();\r\n initialize(); // Registering svg effects\r\n\r\n registerEffect(20, SVGTintFilter, true);\r\n registerEffect(21, SVGFillFilter, true);\r\n registerEffect(22, SVGStrokeEffect, false);\r\n registerEffect(23, SVGTritoneFilter, true);\r\n registerEffect(24, SVGProLevelsFilter, true);\r\n registerEffect(25, SVGDropShadowEffect, true);\r\n registerEffect(28, SVGMatte3Effect, false);\r\n registerEffect(29, SVGGaussianBlurEffect, true);\r\n\r\n return lottie;\r\n\r\n}));\r\n","/**\n * Copyright 2021 Design Barn Inc.\n */\n\nimport { css } from \"lit\";\n\nexport default css`\n * {\n box-sizing: border-box;\n }\n\n :host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: transparent;\n --lottie-player-toolbar-icon-color: #999;\n --lottie-player-toolbar-icon-hover-color: #222;\n --lottie-player-toolbar-icon-active-color: #555;\n --lottie-player-seeker-track-color: #ccc;\n --lottie-player-seeker-thumb-color: rgba(0, 107, 120, 0.8);\n --lottie-player-seeker-display: block;\n\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .main {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n }\n\n .animation {\n width: 100%;\n height: 100%;\n display: flex;\n }\n .animation.controls {\n height: calc(100% - 35px);\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-items: center;\n background-color: var(--lottie-player-toolbar-background-color);\n margin: 0 5px;\n height: 35px;\n }\n\n .toolbar button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n display: flex;\n background: none;\n border: 0;\n padding: 0;\n outline: none;\n height: 100%;\n }\n\n .toolbar button:hover {\n fill: var(--lottie-player-toolbar-icon-hover-color);\n }\n\n .toolbar button.active {\n fill: var(--lottie-player-toolbar-icon-active-color);\n }\n\n .toolbar button.active:hover {\n fill: var(--lottie-player-toolbar-icon-hover-color);\n }\n\n .toolbar button:focus {\n outline: 1px dotted var(--lottie-player-toolbar-icon-active-color);\n }\n\n .toolbar button svg {\n }\n\n .toolbar button.disabled svg {\n display: none;\n }\n\n .seeker {\n -webkit-appearance: none;\n width: 95%;\n outline: none;\n background-color: var(--lottie-player-toolbar-background-color);\n display: var(--lottie-player-seeker-display);\n }\n\n .seeker::-webkit-slider-runnable-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-appearance: none;\n margin-top: -5px;\n }\n .seeker:focus::-webkit-slider-runnable-track {\n background: #999;\n }\n .seeker::-moz-range-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n }\n .seeker::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n }\n .seeker::-ms-fill-lower {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n }\n .seeker:focus::-ms-fill-lower {\n background: var(--lottie-player-seeker-track-color);\n }\n .seeker:focus::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n }\n\n .error {\n display: flex;\n justify-content: center;\n height: 100%;\n align-items: center;\n }\n`;\n","export const LOTTIE_PLAYER_VERSION = \"2.0.2\"; \nexport const LOTTIE_WEB_VERSION = \"^5.10.0\";\n","// eslint-disable-next-line header/header\nimport { LitElement, html } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { TemplateResult } from \"lit/html.js\";\nimport * as lottie from \"lottie-web/build/player/lottie\";\n\nimport styles from \"./lottie-player.styles\";\nimport { LOTTIE_PLAYER_VERSION, LOTTIE_WEB_VERSION } from \"./versions\";\n\n// import ResizeObserver from \"resize-observer-polyfill\";\n\n// Define valid player states\nexport enum PlayerState {\n Destroyed = \"destroyed\",\n Error = \"error\",\n Frozen = \"frozen\",\n Loading = \"loading\",\n Paused = \"paused\",\n Playing = \"playing\",\n Stopped = \"stopped\",\n}\n\n// Define play modes\nexport enum PlayMode {\n Bounce = \"bounce\",\n Normal = \"normal\",\n}\n\n// Define player events\nexport enum PlayerEvents {\n Complete = \"complete\",\n Destroyed = \"destroyed\",\n Error = \"error\",\n Frame = \"frame\",\n Freeze = \"freeze\",\n Load = \"load\",\n Loop = \"loop\",\n Pause = \"pause\",\n Play = \"play\",\n Ready = \"ready\",\n Rendered = \"rendered\",\n Stop = \"stop\",\n}\n\nexport interface Versions {\n lottiePlayerVersion: string;\n lottieWebVersion: string;\n}\n\n/**\n * Parse a resource into a JSON object or a URL string\n */\nexport function parseSrc(src: string | object): string | object {\n if (typeof src === \"object\") {\n return src;\n }\n\n try {\n return JSON.parse(src);\n } catch (e) {\n // Try construct an absolute URL from the src URL\n const srcUrl: URL = new URL(src, window.location.href);\n\n return srcUrl.toString();\n }\n}\n\nfunction isLottie(json: Record<string, any>): boolean {\n const mandatory: string[] = [\"v\", \"ip\", \"op\", \"layers\", \"fr\", \"w\", \"h\"];\n\n return mandatory.every((field: string) =>\n Object.prototype.hasOwnProperty.call(json, field)\n );\n}\n\nasync function fromURL(url: string): Promise<Record<string, any>> {\n if (typeof url !== \"string\") {\n throw new Error(`The url value must be a string`);\n }\n\n let json;\n\n try {\n // Try construct an absolute URL from the src URL\n const srcUrl: URL = new URL(url);\n\n // Fetch the JSON file from the URL\n const result: any = await fetch(srcUrl.toString());\n\n json = await result.json();\n } catch (err) {\n throw new Error(\n `An error occurred while trying to load the Lottie file from URL`\n );\n }\n\n return json;\n}\n/**\n * LottiePlayer web component class\n *\n * @export\n * @class LottiePlayer\n * @extends {LitElement}\n */\n@customElement(\"lottie-player\")\nexport class LottiePlayer extends LitElement {\n /**\n * Autoplay animation on load.\n */\n @property({ type: Boolean })\n public autoplay: boolean = false;\n\n /**\n * Background color.\n */\n @property({ type: String, reflect: true })\n public background?: string = \"transparent\";\n\n /**\n * Show controls.\n */\n @property({ type: Boolean })\n public controls: boolean = false;\n\n /**\n * Number of times to loop animation.\n */\n @property({ type: Number })\n public count?: number;\n\n /**\n * Player state.\n */\n @property({ type: String })\n public currentState: PlayerState = PlayerState.Loading;\n\n /**\n * Animation description for screen readers.\n */\n @property({ type: String })\n public description: string = \"Lottie animation\";\n\n /**\n * Direction of animation.\n */\n @property({ type: Number })\n public direction: number = 1;\n\n /**\n * Disable checking if the Lottie is valid before loading\n */\n @property({ type: Boolean })\n public disableCheck?: boolean = false;\n\n /**\n * Disable using shadow dom as the root\n */\n @property({ type: Boolean })\n public disableShadowDOM: boolean = false;\n\n /**\n * Whether to play on mouse hover\n */\n @property({ type: Boolean })\n public hover: boolean = false;\n\n /**\n * Intermission\n */\n @property()\n public intermission: number = 1;\n\n /**\n * Whether to loop animation.\n */\n @property({ type: Boolean, reflect: true })\n public loop: boolean = false;\n\n /**\n * Play mode.\n */\n @property()\n public mode: PlayMode = PlayMode.Normal;\n\n /**\n * Aspect ratio to pass to lottie-web.\n */\n @property({ type: String })\n public preserveAspectRatio: string = \"xMidYMid meet\";\n\n /**\n * Renderer to use.\n */\n @property({ type: String })\n public renderer: \"svg\" = \"svg\";\n\n /**\n * Viewbox size for renderer settings\n */\n @property({ type: String })\n public viewBoxSize?: string;\n\n /**\n * seeker\n */\n\n @property()\n public seeker: any;\n\n /**\n * Animation speed.\n */\n @property({ type: Number })\n public speed: number = 1;\n\n /**\n * Bodymovin JSON data or URL to JSON.\n */\n @property({ type: String })\n public src?: string;\n\n /**\n * Enable web workers\n */\n @property({ type: Boolean })\n public webworkers?: boolean;\n\n /**\n * Animation container.\n */\n @query(\".animation\")\n protected container!: HTMLElement;\n\n private _io: IntersectionObserver | undefined = undefined;\n\n // private _ro: ResizeObserver | undefined = undefined;\n private _lottie?: any;\n\n private _prevState?: any;\n\n private _counter: number = 1;\n\n /**\n * Configure and initialize lottie-web player instance.\n */\n public async load(src: string | object) {\n const options: any = {\n container: this.container,\n loop: false,\n autoplay: false,\n renderer: this.renderer,\n rendererSettings: {\n preserveAspectRatio: this.preserveAspectRatio,\n clearCanvas: false,\n progressiveLoad: true,\n hideOnTransparent: true,\n ...(this.viewBoxSize && { viewBoxSize: this.viewBoxSize }),\n },\n };\n\n // Load the resource information\n try {\n const srcParsed = parseSrc(src);\n let jsonData = {};\n let srcAttrib = typeof srcParsed === \"string\" ? \"path\" : \"animationData\";\n\n // Clear previous animation, if any\n if (this._lottie) {\n this._lottie.destroy();\n }\n\n if (this.webworkers) {\n lottie.useWebWorker(true);\n }\n\n // Initialize lottie player and load animation\n this._lottie = lottie.loadAnimation({\n ...options,\n\n [srcAttrib]: srcParsed,\n });\n\n // Attach the event listeners before we check the requested json file for errors\n this._attachEventListeners();\n\n if (!this.disableCheck) {\n // Fetch resource if src is a remote URL\n if (srcAttrib === \"path\") {\n jsonData = await fromURL(srcParsed as string);\n srcAttrib = \"animationData\";\n } else {\n jsonData = srcParsed;\n }\n\n if (!isLottie(jsonData)) {\n this.currentState = PlayerState.Error;\n this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n }\n }\n } catch (err) {\n this.currentState = PlayerState.Error;\n this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n }\n }\n\n /**\n * Returns the lottie-web instance used in the component.\n */\n public getLottie(): any {\n return this._lottie;\n }\n\n /**\n * Returns the lottie-web version and this player's version\n */\n public getVersions(): Versions {\n return {\n lottieWebVersion: LOTTIE_WEB_VERSION,\n lottiePlayerVersion: LOTTIE_PLAYER_VERSION,\n };\n }\n\n /**\n * Start playing animation.\n */\n public play() {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.play();\n this.currentState = PlayerState.Playing;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Play));\n }\n\n /**\n * Pause animation play.\n */\n public pause(): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.pause();\n this.currentState = PlayerState.Paused;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Pause));\n }\n\n /**\n * Stops animation play.\n */\n public stop(): void {\n if (!this._lottie) {\n return;\n }\n\n this._counter = 1;\n this._lottie.stop();\n this.currentState = PlayerState.Stopped;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Stop));\n }\n\n /**\n * Destroy animation and lottie-player element.\n */\n public destroy(): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.destroy();\n this._lottie = null;\n this.currentState = PlayerState.Destroyed;\n this.dispatchEvent(new CustomEvent(PlayerEvents.Destroyed));\n this.remove();\n }\n\n /**\n * Seek to a given frame.\n */\n public seek(value: number | string): void {\n if (!this._lottie) {\n return;\n }\n\n // Extract frame number from either number or percentage value\n const matches = /^(\\d+)(%?)$/.exec(value.toString());\n\n if (!matches) {\n return;\n }\n\n // Calculate and set the frame number\n const frame =\n matches[2] === \"%\"\n ? (this._lottie.totalFrames * Number(matches[1])) / 100\n : Number(matches[1]);\n\n // Set seeker to new frame number\n this.seeker = frame;\n\n // Send lottie player to the new frame\n if (this.currentState === PlayerState.Playing) {\n this._lottie.goToAndPlay(frame, true);\n } else {\n this._lottie.goToAndStop(frame, true);\n this._lottie.pause();\n }\n }\n\n /**\n * Snapshot the current frame as SVG.\n *\n * If 'download' argument is boolean true, then a download is triggered in browser.\n */\n public snapshot(download: boolean = true): string | void {\n if (!this.shadowRoot) return;\n\n // Get SVG element and serialize markup\n const svgElement = this.shadowRoot.querySelector(\".animation svg\") as Node;\n const data = new XMLSerializer().serializeToString(svgElement);\n\n // Trigger file download\n if (download) {\n const element = document.createElement(\"a\");\n\n element.href = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(\n data\n )}`;\n element.download = `download_${this.seeker}.svg`;\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n return data;\n }\n\n /**\n * Sets animation play speed.\n *\n * @param value Playback speed.\n */\n public setSpeed(value = 1): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.setSpeed(value);\n }\n\n /**\n * Animation play direction.\n *\n * @param value Direction values.\n */\n public setDirection(value: number): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.setDirection(value);\n }\n\n /**\n * Sets the looping of the animation.\n *\n * @param value Whether to enable looping. Boolean true enables looping.\n */\n public setLooping(value: boolean): void {\n if (this._lottie) {\n this.loop = value;\n this._lottie.loop = value;\n }\n }\n\n /**\n * Toggle playing state.\n */\n public togglePlay(): void {\n return this.currentState === PlayerState.Playing\n ? this.pause()\n : this.play();\n }\n\n /**\n * Toggles animation looping.\n */\n public toggleLooping(): void {\n this.setLooping(!this.loop);\n }\n\n /**\n * Resize animation.\n */\n public resize() {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.resize();\n }\n\n /**\n * Returns the styles for the component.\n */\n static get styles() {\n return styles;\n }\n\n /**\n * Cleanup on component destroy.\n */\n public disconnectedCallback(): void {\n // Don't clean up if node is still connected to the context (i.e. this is a move).\n if (this.isConnected) return;\n\n // Remove intersection observer for detecting component being out-of-view.\n if (this._io) {\n this._io.disconnect();\n this._io = undefined;\n }\n\n // Remove resize observer for detecting resize/reflow events affecting element.\n // if (this._ro) {\n // this._ro.disconnect();\n // this._ro = undefined;\n // }\n\n // Remove the attached Visibility API's change event listener.\n document.removeEventListener(\"visibilitychange\", () =>\n this._onVisibilityChange()\n );\n\n // Destroy the animation instance and element\n this.destroy();\n }\n\n public render(): TemplateResult | void {\n const className: string = this.controls ? \"main controls\" : \"main\";\n const animationClass: string = this.controls\n ? \"animation controls\"\n : \"animation\";\n\n return html` <div\n id=\"animation-container\"\n class=${className}\n lang=\"en\"\n aria-label=${this.description}\n role=\"img\"\n >\n <div\n id=\"animation\"\n class=${animationClass}\n style=\"background:${this.background};\"\n >\n ${this.currentState === PlayerState.Error\n ? html`<div class=\"error\">⚠️</div>`\n : undefined}\n </div>\n ${this.controls && !this.disableShadowDOM\n ? this.renderControls()\n : undefined}\n </div>`;\n }\n\n protected createRenderRoot(): Element | ShadowRoot {\n if (this.disableShadowDOM) this.style.display = \"block\";\n\n return this.disableShadowDOM ? this : super.createRenderRoot();\n }\n\n /**\n * Initialize everything on component first render.\n */\n protected firstUpdated(): void {\n // Add intersection observer for detecting component being out-of-view.\n if (\"IntersectionObserver\" in window) {\n this._io = new IntersectionObserver(\n (entries: IntersectionObserverEntry[]) => {\n if (entries[0].isIntersecting) {\n if (this.currentState === PlayerState.Frozen) {\n this.play();\n }\n } else if (this.currentState === PlayerState.Playing) {\n this.freeze();\n }\n }\n );\n\n this._io.observe(this.container);\n }\n\n // Add listener for Visibility API's change event.\n if (typeof document.hidden !== \"undefined\") {\n document.addEventListener(\"visibilitychange\", () =>\n this._onVisibilityChange()\n );\n }\n\n // Setup lottie player\n if (this.src) {\n this.load(this.src);\n }\n this.dispatchEvent(new CustomEvent(PlayerEvents.Rendered));\n }\n\n protected renderControls(): TemplateResult {\n const isPlaying: boolean = this.currentState === PlayerState.Playing;\n const isPaused: boolean = this.currentState === PlayerState.Paused;\n const isStopped: boolean = this.currentState === PlayerState.Stopped;\n\n return html`\n <div\n id=\"lottie-controls\"\n aria-label=\"lottie-animation-controls\"\n class=\"toolbar\"\n >\n <button\n id=\"lottie-play-button\"\n @click=${this.togglePlay}\n class=${isPlaying || isPaused ? \"active\" : \"\"}\n style=\"align-items:center;\"\n tabindex=\"0\"\n aria-label=\"play-pause\"\n >\n ${isPlaying\n ? html`<svg\n width=\"24\"\n height=\"24\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path\n d=\"M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z\"\n />\n </svg>`\n : html`<svg\n width=\"24\"\n height=\"24\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M8.016 5.016L18.985 12 8.016 18.984V5.015z\" />\n </svg>`}\n </button>\n <button\n id=\"lottie-stop-button\"\n @click=${this.stop}\n class=${isStopped ? \"active\" : \"\"}\n style=\"align-items:center;\"\n tabindex=\"0\"\n aria-label=\"stop\"\n >\n <svg width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M6 6h12v12H6V6z\" />\n </svg>\n </button>\n <input\n id=\"lottie-seeker-input\"\n class=\"seeker\"\n type=\"range\"\n min=\"0\"\n step=\"1\"\n max=\"100\"\n .value=${this.seeker}\n @input=${this._handleSeekChange}\n @mousedown=${() => {\n this._prevState = this.currentState;\n this.freeze();\n }}\n @mouseup=${() => {\n this._prevState === PlayerState.Playing && this.play();\n }}\n aria-valuemin=\"1\"\n aria-valuemax=\"100\"\n role=\"slider\"\n aria-valuenow=${this.seeker}\n tabindex=\"0\"\n aria-label=\"lottie-seek-input\"\n />\n <button\n id=\"lottie-loop-toggle\"\n @click=${this.toggleLooping}\n class=${this.loop ? \"active\" : \"\"}\n style=\"align-items:center;\"\n tabindex=\"0\"\n aria-label=\"loop-toggle\"\n >\n <svg width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n <path\n d=\"M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z\"\n />\n </svg>\n </button>\n </div>\n `;\n }\n\n /**\n * Handle visibility change events.\n */\n private _onVisibilityChange(): void {\n if (document.hidden === true && this.currentState === PlayerState.Playing) {\n this.freeze();\n } else if (this.currentState === PlayerState.Frozen) {\n this.play();\n }\n }\n\n /**\n * Handles click and drag actions on the progress track.\n */\n private _handleSeekChange(e: any): void {\n if (!this._lottie || isNaN(e.target.value)) {\n return;\n }\n\n const frame: number = (e.target.value / 100) * this._lottie.totalFrames;\n\n this.seek(frame);\n }\n\n private _attachEventListeners(): void {\n this._lottie.addEventListener(\"enterFrame\", () => {\n this.seeker =\n (this._lottie.currentFrame / this._lottie.totalFrames) * 100;\n\n this.dispatchEvent(\n new CustomEvent(PlayerEvents.Frame, {\n detail: {\n frame: this._lottie.currentFrame,\n seeker: this.seeker,\n },\n })\n );\n });\n\n // Handle animation play complete\n this._lottie.addEventListener(\"complete\", () => {\n if (this.currentState !== PlayerState.Playing) {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Complete));\n\n return;\n }\n\n if (!this.loop || (this.count && this._counter >= this.count)) {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Complete));\n\n if (this.mode === PlayMode.Bounce) {\n if (this._lottie.currentFrame === 0) {\n return;\n }\n } else {\n return;\n }\n }\n\n if (this.mode === PlayMode.Bounce) {\n if (this.count) {\n this._counter += 0.5;\n }\n\n setTimeout(() => {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Loop));\n\n if (this.currentState === PlayerState.Playing) {\n this._lottie.setDirection(this._lottie.playDirection * -1);\n this._lottie.play();\n }\n }, this.intermission);\n } else {\n if (this.count) {\n this._counter += 1;\n }\n\n window.setTimeout(() => {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Loop));\n\n if (this.currentState === PlayerState.Playing) {\n if (this.direction === -1) {\n // Prevents flickering\n this.seek(\"99%\");\n this.play();\n } else {\n this._lottie.stop();\n this._lottie.play();\n }\n }\n }, this.intermission);\n }\n });\n\n // Handle lottie-web ready event\n this._lottie.addEventListener(\"DOMLoaded\", () => {\n // Set initial playback speed and direction\n this.setSpeed(this.speed);\n this.setDirection(this.direction);\n\n // Start playing if autoplay is enabled\n if (this.autoplay) {\n if (this.direction === -1) this.seek(\"100%\");\n this.play();\n }\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Ready));\n });\n\n // Handle animation data load complete\n this._lottie.addEventListener(\"data_ready\", () => {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Load));\n });\n\n // Set error state when animation load fail event triggers\n this._lottie.addEventListener(\"data_failed\", () => {\n this.currentState = PlayerState.Error;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n });\n\n // Set handlers to auto play animation on hover if enabled\n this.container.addEventListener(\"mouseenter\", () => {\n if (this.hover && this.currentState !== PlayerState.Playing) {\n this.play();\n }\n });\n this.container.addEventListener(\"mouseleave\", () => {\n if (this.hover && this.currentState === PlayerState.Playing) {\n this.stop();\n }\n });\n }\n\n /**\n * Freeze animation play.\n * This internal state pauses animation and is used to differentiate between\n * user requested pauses and component instigated pauses.\n */\n private freeze(): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.pause();\n this.currentState = PlayerState.Frozen;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Freeze));\n }\n}\n","export*from\"@lit/reactive-element\";export*from\"lit-html\";export{LitElement,UpdatingElement,_$LE}from\"./lit-element.js\";export*from\"@lit/reactive-element/decorators/base.js\";export*from\"@lit/reactive-element/decorators/custom-element.js\";export*from\"@lit/reactive-element/decorators/property.js\";export*from\"@lit/reactive-element/decorators/state.js\";export*from\"@lit/reactive-element/decorators/event-options.js\";export*from\"@lit/reactive-element/decorators/query.js\";export*from\"@lit/reactive-element/decorators/query-all.js\";export*from\"@lit/reactive-element/decorators/query-async.js\";export*from\"@lit/reactive-element/decorators/query-assigned-elements.js\";export*from\"@lit/reactive-element/decorators/query-assigned-nodes.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */console.warn(\"The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information.\");\n//# sourceMappingURL=index.js.map\n","/**\n * Copyright 2022 Design Barn Inc.\n */\n\nimport { css } from \"lit-element\";\n\nimport styles from \"./lottie-player.styles\";\n\nexport default css`\n ${styles}\n\n :host {\n width: 512px;\n height: 512px;\n }\n`;\n","/**\n * Copyright 2022 Design Barn Inc.\n */\n\nimport { customElement, property } from \"lit/decorators.js\";\nimport * as pako from \"pako\";\n\nimport { LottiePlayer, parseSrc, PlayerEvents } from \"./lottie-player\";\nimport styles from \"./tgs-player.styles\";\n\n/**\n * Load a resource from a path URL.\n */\nasync function fetchPath(path: string): Promise<string> {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.open(\"GET\", path, true);\n xhr.responseType = \"arraybuffer\";\n xhr.send();\n xhr.onreadystatechange = function () {\n if (xhr.readyState == 4 && xhr.status == 200) {\n try {\n // Attempt to convert it to JSON as is:\n\n // @ts-ignore\n const data = String.fromCharCode.apply(\n null,\n new Uint8Array(xhr.response as ArrayBuffer)\n );\n\n return resolve(JSON.parse(data));\n } catch (err) {\n // Attempt to ungzip response and convert to JSON:\n\n try {\n const data = pako.inflate(xhr.response, { to: \"string\" });\n\n return resolve(JSON.parse(data));\n } catch (err) {\n return reject(err);\n }\n }\n }\n };\n });\n}\n\n/**\n * TGSPlayer web component class\n *\n * @export\n * @class TGSPlayer\n * @extends {LottiePlayer}\n */\n@customElement(\"tgs-player\")\nexport class TGSPlayer extends LottiePlayer {\n /**\n * Strict format checks for TGS.\n */\n @property({ type: Boolean })\n public strict = true;\n\n /**\n * Configure and initialize lottie-web player instance.\n */\n public async load(src: string | object): Promise<void> {\n let srcParsed: string | object = parseSrc(src);\n const srcAttrib: string =\n typeof srcParsed === \"string\" ? \"path\" : \"animationData\";\n\n // Fetch resource if src is a remote URL\n if (srcAttrib === \"path\") {\n srcParsed = await fetchPath(srcParsed as string);\n }\n\n // Strict checks\n if (this.strict === true) {\n const errors = this.formatCheck(srcParsed);\n\n if (errors.length !== 0) {\n this.dispatchEvent(\n new CustomEvent(PlayerEvents.Error, { detail: errors })\n );\n }\n }\n\n // Remove the \"tgs\" attribute from JSON\n // @ts-ignore\n delete srcParsed.tgs;\n\n return super.load(srcParsed);\n }\n\n /**\n * Returns the styles for the component.\n */\n static get styles() {\n return styles;\n }\n\n protected formatCheck(data: any): string[] {\n const errors: string[] = [];\n\n if (!(\"tgs\" in data) || data.tgs !== 1) {\n errors.push(\"Must be marked as a TGS Lottie variant\");\n }\n\n if ((data.op - data.ip) / data.fr > 3.0) {\n errors.push(\"Longer than 3 seconds\");\n }\n\n if (data.w != 512 || data.h != 512) {\n errors.push(\"Dimensions should be exactly 512pxx512px\");\n }\n\n if (data.ddd != null && data.ddd != 0) {\n errors.push(\"Must not have 3D layers\");\n }\n\n if (\"markers\" in data) {\n errors.push(\"Must not have markers\");\n }\n\n if (data.assets != null) {\n data.assets.forEach((asset: any) => {\n errors.concat(this.checkLayer(asset.layers));\n });\n }\n\n data.layers.forEach((layer: any) => {\n errors.concat(this.checkLayer(layer));\n });\n\n return errors;\n }\n\n private checkLayer(layer: any): string[] {\n const errors: string[] = [];\n\n if (layer.ddd != null && layer.ddd != 0) {\n errors.push(\"Composition should not include any 3D Layers\");\n }\n\n if (layer.sr != null && layer.sr != 1) {\n errors.push(\"Composition should not include any Time Stretching\");\n }\n\n if (layer.tm != null) {\n errors.push(\"Composition should not include any Time Remapping\");\n }\n\n if (layer.ty === 1) {\n errors.push(\"Composition should not include any Solids\");\n }\n\n if (layer.ty === 2) {\n errors.push(\"Composition should not include any Images\");\n }\n\n if (layer.ty === 5) {\n errors.push(\"Composition should not include any Texts\");\n }\n\n if (layer.hasMask === true || layer.masksProperties != null) {\n errors.push(\"Composition should not include any Masks\");\n }\n\n if (layer.tt != null) {\n errors.push(\"Composition should not include any Mattes\");\n }\n\n if (layer.ao === 1) {\n errors.push(\"Composition should not include any Auto-Oriented Layers\");\n }\n\n if (layer.ef != null) {\n errors.push(\"Composition should not include any Layer Effects\");\n }\n\n errors.concat(this.checkItems(layer.shapes, true));\n\n return errors;\n }\n\n private checkItems(items: any, shapes: any): string[] {\n const errors: string[] = [];\n\n if (items != null) {\n items.forEach((item: any) => {\n if (item.ty == \"rp\") {\n errors.push(\"Composition should not include any Repeaters\");\n }\n\n if (item.ty == \"sr\") {\n errors.push(\"Composition should not include any Star Shapes\");\n }\n\n if (item.ty == \"mm\") {\n errors.push(\"Composition should not include any Merge Paths\");\n }\n\n if (item.ty == \"gs\") {\n errors.push(\"Composition should not include any Gradient Strokes\");\n }\n\n if (shapes === true) {\n errors.concat(this.checkItems(item.it, false));\n }\n });\n }\n\n return errors;\n }\n}\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","customElement","tagName","classOrDescriptor","clazz","window","customElements","define","descriptor","kind","elements","finisher","standardProperty","options","element","createProperty","Symbol","placement","originalKey","initializer","this","call","property","protoOrDescriptor","name","proto","constructor","decorateProperty","_ref","info","undefined","ctor","query","selector","cache","get","n","o","renderRoot","querySelector","enumerable","configurable","t","HTMLSlotElement","prototype","assignedElements","Z_FIXED$1","Z_BINARY","Z_TEXT","Z_UNKNOWN$1","zero$1","buf","len","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH$1","MAX_MATCH$1","LENGTH_CODES$1","LITERALS$1","L_CODES$1","D_CODES$1","BL_CODES$1","HEAP_SIZE$1","MAX_BITS$1","Buf_size","MAX_BL_BITS","END_BLOCK","REP_3_6","REPZ_3_10","REPZ_11_138","extra_lbits","Uint8Array","extra_dbits","extra_blbits","bl_order","DIST_CODE_LEN","static_ltree","Array","static_dtree","_dist_code","_length_code","base_length","base_dist","static_l_desc","static_d_desc","static_bl_desc","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","dist","put_short","s","w","pending_buf","pending","send_bits","value","bi_valid","bi_buf","send_code","tree","bi_reverse","code","res","bi_flush","gen_bitlen","h","m","bits","xbits","f","stree","extra","base","overflow","bl_count","heap","heap_max","opt_len","static_len","gen_codes","next_code","tr_static_init","init_block","dyn_ltree","dyn_dtree","bl_tree","last_lit","matches","bi_windup","copy_block","header","set","subarray","smaller","depth","_n2","_m2","pqdownheap","k","v","j","heap_len","compress_block","ltree","dtree","lc","lx","d_buf","l_buf","build_tree","node","scan_tree","curlen","prevlen","nextlen","count","max_count","min_count","send_tree","build_bl_tree","max_blindex","l_desc","d_desc","bl_desc","send_all_trees","lcodes","dcodes","blcodes","rank","detect_data_type","black_mask","static_init_done","_tr_init$1","_tr_stored_block$1","stored_len","last","_tr_align$1","_tr_flush_block$1","opt_lenb","static_lenb","level","strm","data_type","strategy","_tr_tally$1","lit_bufsize","_tr_init_1","_tr_stored_block_1","_tr_flush_block_1","_tr_tally_1","_tr_align_1","trees","_tr_init","_tr_stored_block","_tr_flush_block","_tr_tally","_tr_align","adler32","adler","pos","s1","s2","adler32_1","makeTable","table","crcTable","Uint32Array","crc32","crc","end","crc32_1","messages","constants$2","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_BLOCK","Z_TREES","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_MEM_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_UNKNOWN","Z_DEFLATED","Z_NO_FLUSH$2","Z_FULL_FLUSH$1","Z_FINISH$3","Z_BLOCK$1","Z_OK$3","Z_STREAM_END$3","Z_STREAM_ERROR$2","Z_DATA_ERROR$2","Z_BUF_ERROR$1","Z_DEFAULT_COMPRESSION$1","Z_DEFAULT_STRATEGY$1","Z_DEFLATED$2","MAX_MEM_LEVEL","MAX_WBITS$1","DEF_MEM_LEVEL","LENGTH_CODES","LITERALS","L_CODES","D_CODES","BL_CODES","HEAP_SIZE","MAX_BITS","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","PRESET_DICT","INIT_STATE","EXTRA_STATE","NAME_STATE","COMMENT_STATE","HCRC_STATE","BUSY_STATE","FINISH_STATE","BS_NEED_MORE","BS_BLOCK_DONE","BS_FINISH_STARTED","BS_FINISH_DONE","OS_CODE","err","errorCode","msg","zero","HASH_ZLIB","prev","data","hash_shift","hash_mask","HASH","flush_pending","state","avail_out","output","pending_out","next_out","total_out","flush_block_only","block_start","strstart","put_byte","b","putShortMSB","read_buf","start","size","avail_in","input","next_in","wrap","total_in","longest_match","cur_match","match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","limit","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","p","more","str","_w_size","window_size","hash_size","head","insert","ins_h","deflate_stored","flush","max_block_size","pending_buf_size","max_start","deflate_fast","hash_head","bflush","match_length","max_lazy_match","deflate_slow","max_insert","prev_match","match_available","deflate_rle","deflate_huff","Config","good_length","max_lazy","nice_length","max_chain","func","configuration_table","lm_init","DeflateState","status","gzhead","gzindex","method","last_flush","w_bits","hash_bits","Uint16Array","deflateResetKeep","deflateReset","ret","deflateSetHeader","deflateInit2","windowBits","memLevel","deflateInit","deflate$2","beg","val","old_flush","text","hcrc","comment","time","os","charCodeAt","bstate","deflateEnd","deflateSetDictionary","dictionary","dictLength","tmpDict","avail","next","deflateInit_1","deflateInit2_1","deflateReset_1","deflateResetKeep_1","deflateSetHeader_1","deflate_2$1","deflateEnd_1","deflateSetDictionary_1","deflateInfo","deflate_1$2","deflate","_has","obj","hasOwnProperty","assign","sources","slice","source","shift","TypeError","flattenChunks","chunks","l","result","chunk","common","STR_APPLY_UIA_OK","String","fromCharCode","apply","__","_utf8len","q","string2buf","TextEncoder","encode","c2","m_pos","str_len","buf_len","buf2binstring","buf2string","max","out","TextDecoder","decode","utf16buf","c_len","utf8border","strings","ZStream","zstream","toString$1","toString","Z_NO_FLUSH$1","Z_FINISH$2","Z_OK$2","Z_STREAM_END$2","Z_DEFLATED$1","Deflate$1","chunkSize","opt","raw","gzip","ended","Error","dict","_dict_set","push","flush_mode","_flush_mode","onData","onEnd","BAD$1","TYPE$1","inffast","_in","_out","dmax","wsize","whave","wnext","s_window","hold","lcode","dcode","lmask","dmask","here","op","from","from_source","lencode","distcode","lenbits","distbits","top","dolen","mode","dodist","sane","MAXBITS","ENOUGH_LENS$1","ENOUGH_DISTS$1","CODES$1","LENS$1","DISTS$1","lbase","lext","dbase","dext","inflate_table","type","lens","lens_index","codes","table_index","work","opts","incr","fill","low","mask","here_bits","here_op","here_val","sym","min","root","curr","drop","left","used","huff","base_index","offs","extra_index","inftrees","CODES","LENS","DISTS","Z_FINISH$1","Z_OK$1","Z_STREAM_END$1","Z_NEED_DICT$1","Z_STREAM_ERROR$1","Z_DATA_ERROR$1","Z_MEM_ERROR$1","HEAD","FLAGS","TIME","OS","EXLEN","EXTRA","NAME","COMMENT","HCRC","DICTID","DICT","TYPE","TYPEDO","STORED","COPY_","COPY","TABLE","LENLENS","CODELENS","LEN_","LEN","LENEXT","DIST","DISTEXT","MATCH","LIT","CHECK","LENGTH","DONE","BAD","MEM","SYNC","ENOUGH_LENS","ENOUGH_DISTS","MAX_WBITS","DEF_WBITS","zswap32","InflateState","havedict","flags","check","total","wbits","offset","ncode","nlen","ndist","have","lendyn","distdyn","back","was","inflateResetKeep","Int32Array","inflateReset","inflateReset2","inflateInit2","inflateInit","virgin","lenfix","distfix","fixedtables","updatewindow","src","copy","inflate$2","put","last_bits","last_op","last_val","hbuf","order","inf_leave","done","xflags","extra_len","inflateEnd","inflateGetHeader","inflateSetDictionary","inflateReset_1","inflateReset2_1","inflateResetKeep_1","inflateInit_1","inflateInit2_1","inflate_2$1","inflateEnd_1","inflateGetHeader_1","inflateSetDictionary_1","inflateInfo","inflate_1$2","inflate","GZheader","gzheader","Inflate$1","to","inflate$1","inflator","inflateRaw$1","last_avail_out","next_out_utf8","tail","utf8str","join","Inflate_1$1","inflate_2","inflateRaw_1$1","ungzip$1","constants","inflate_1$1","Inflate","inflateRaw","ungzip","inflate_1","supportsAdoptingStyleSheets","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","constructionToken","styleSheetCache","Map","CSSResult","cssText","safeToken","_$cssResult$","styleSheet","replaceSync","unsafeCSS","css","values","reduce","acc","idx","adoptStyles","styles","adoptedStyleSheets","map","forEach","style","document","createElement","nonce","litNonce","setAttribute","textContent","appendChild","getCompatibleStyle","sheet","rule","cssRules","trustedTypes","emptyStringForBooleanAttribute","emptyScript","polyfillSupport","reactiveElementPolyfillSupport","defaultConverter","toAttribute","Boolean","JSON","stringify","fromAttribute","fromValue","Number","parse","e","notEqual","old","defaultPropertyDeclaration","attribute","converter","reflect","hasChanged","ReactiveElement","HTMLElement","_initialize","_initializers","observedAttributes","finalize","attributes","elementProperties","attr","__attributeNameForProperty","__attributeToPropertyMap","noAccessor","getPropertyDescriptor","oldValue","requestUpdate","finalized","superCtor","getPrototypeOf","props","properties","propKeys","getOwnPropertyNames","getOwnPropertySymbols","elementStyles","finalizeStyles","isArray","Set","flat","Infinity","reverse","unshift","toLowerCase","__updatePromise","Promise","enableUpdating","_$changedProperties","__saveInstanceProperties","addController","controller","__controllers","isConnected","hostConnected","removeController","splice","indexOf","_v","__instanceProperties","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","_requestedUpdate","disconnectedCallback","hostDisconnected","attributeChangedCallback","_old","_$attributeToProperty","__propertyToAttribute","attrValue","__reflectingProperty","removeAttribute","propName","getPropertyOptions","shouldRequestUpdate","has","__reflectingProperties","isUpdatePending","__enqueueUpdate","async","reject","scheduleUpdate","performUpdate","hasUpdated","shouldUpdate","changedProperties","willUpdate","hostUpdate","update","__markUpdated","_$didUpdate","_changedProperties","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","globalThis","reactiveElementVersions","policy","createPolicy","createHTML","marker","Math","random","markerMatch","nodeMarker","createMarker","createComment","isPrimitive","isIterable","iterator","textEndRegex","commentEndRegex","comment2EndRegex","tagEndRegex","singleQuoteAttrEndRegex","doubleQuoteAttrEndRegex","rawTextElement","tag","_$litType$","html","noChange","for","nothing","templateCache","WeakMap","render","container","partOwnerNode","renderBefore","part","_$litPart$","endNode","ChildPart","insertBefore","_$setValue","walker","createTreeWalker","getTemplateHtml","rawTextEndRegex","attrNames","regex","attrName","attrNameEndIndex","lastIndex","exec","test","RegExp","startsWith","htmlResult","Template","nodeIndex","attrNameIndex","partCount","parts","el","currentNode","content","svgElement","firstChild","remove","append","childNodes","nextNode","nodeType","hasAttributes","attrsToRemove","getAttributeNames","endsWith","realName","statics","getAttribute","split","index","PropertyPart","BooleanAttributePart","EventPart","AttributePart","_options","innerHTML","resolveDirective","attributeIndex","parent","currentDirective","__directives","__directive","nextDirectiveConstructor","_$litDirective$","_$AO","_$initialize","_$resolve","TemplateInstance","template","_$template","_$parent","parentNode","_$isConnected","_clone","fragment","creationScope","importNode","partIndex","templatePart","nextSibling","ElementPart","_parts","_update","startNode","_$startNode","_$endNode","__isConnected","_$committedValue","_$clear","_commitText","_commitTemplateResult","_commitNode","_commitIterable","_insert","ref","createTextNode","_$getTemplate","instance","itemPart","itemParts","item","_$notifyConnectionChanged","setConnected","directiveParent","valueIndex","noCommit","change","_commitValue","newListener","oldListener","shouldRemoveListener","capture","once","passive","shouldAddListener","removeEventListener","addEventListener","handleEvent","event","host","litHtmlPolyfillSupport","litHtmlVersions","LitElement","super","renderOptions","__childPart","_$litElement$","litElementHydrateSupport","litElementPolyfillSupport","litElementVersions","factory","navigator","svgNS","locationHref","_useWebWorker","initialDefaultFrame","setWebWorker","flag","getWebWorker","setLocationHref","getLocationHref","createTag","extendPrototype","destination","sourcePrototype","getDescriptor","object","prop","createProxyFunction","ProxyFunction","audioControllerFactory","AudioController","audioFactory","audios","_volume","_isMuted","addAudio","audio","pause","resume","setRate","rateValue","createAudio","assetPath","Howl","isPlaying","play","seek","playing","rate","setVolume","setAudioFactory","_updateVolume","mute","unmute","getVolume","volume","createTypedArray","createRegularArray","arr","Uint8ClampedArray","Float32Array","Int16Array","createSizedArray","_typeof$6","subframeEnabled","expressionsPlugin","expressionsInterfaces","idPrefix$1","isSafari","userAgent","bmPow","pow","bmSqrt","sqrt","bmFloor","floor","bmMax","bmMin","BMMath","propertyNames","abs","absArr","defaultCurveSegments","degToRads","PI","roundCorner","styleDiv","position","display","transformOrigin","webkitTransformOrigin","backfaceVisibility","webkitBackfaceVisibility","transformStyle","webkitTransformStyle","mozTransformStyle","BMEnterFrameEvent","currentTime","totalTime","frameMultiplier","direction","BMCompleteEvent","BMCompleteLoopEvent","totalLoops","currentLoop","BMSegmentStartEvent","firstFrame","totalFrames","BMDestroyEvent","BMRenderFrameErrorEvent","nativeError","BMConfigErrorEvent","createElementID","_count","HSVtoRGB","g","RGBtoHSV","addSaturationToRGB","color","hsv","addBrightnessToRGB","addHueToRGB","rgbToHex","hex","colorMap","setSubframeEnabled","getSubframeEnabled","setExpressionsPlugin","getExpressionsPlugin","setExpressionInterfaces","getExpressionInterfaces","setDefaultCurveSegments","getDefaultCurveSegments","setIdPrefix","createNS","createElementNS","_typeof$5","dataManager","workerFn","workerInstance","_counterId","processes","workerProxy","onmessage","postMessage","path","_workerSelf","setupWorker","fn","Worker","Blob","blob","url","URL","createObjectURL","createWorker","completeLayers","layers","comps","layerData","jLen","kLen","completed","hasMask","maskProps","masksProperties","pt","convertPathsToAbsoluteValues","ty","findCompLayers","refId","completeShapes","shapes","completeText","id","comp","findComp","__used","ks","it","checkVersion","minimum","animVersionString","animVersion","minimumVersion","checkText","iterateLayers","textLayer","documentData","animationData","assets","checkChars","chars","charData","ip","st","sr","a","sk","sa","checkPathProperties","pathData","checkColors","iterateShapes","checkShapes","completeClosingShapes","closed","cl","moduleOb","__complete","completeChars","dataFunctionManager","assetLoader","formatResponse","xhr","contentTypeHeader","getResponseHeader","responseType","response","responseText","load","fullPath","callback","errorCallback","XMLHttpRequest","onreadystatechange","readyState","open","error","send","completeData","payload","animation","process","onComplete","onError","createProcess","loadAnimation","processId","location","origin","pathname","loadData","completeAnimation","anim","ImagePreloader","proxyImage","canvas","width","height","ctx","getContext","fillStyle","fillRect","imageLoaded","loadedAssets","totalImages","loadedFootagesCount","totalFootages","imagesLoadedCb","footageLoaded","getAssetsPath","assetData","assetsPath","originalPath","imagePath","u","testImageLoaded","img","intervalId","setInterval","getBBox","_imageLoaded","clearInterval","bind","createFootageData","ob","footageData","_footageLoaded","ImagePreloaderFactory","images","loadAssets","cb","_createImageData","setAssetsPath","setPath","loadedImages","loadedFootages","destroy","getAsset","createImgData","crossOrigin","createImageData","setAttributeNS","_elementHelper","setCacheType","elementHelper","BaseEvent","triggerEvent","eventName","args","_cbs","callbacks","markerParser","parsePayloadLines","line","lines","keys","keysCount","trim","_markers","markers","_marker","markerData","tm","duration","dr","cm","_","ProjectInterface","registerComposition","compositions","_thisProjectFunction","nm","prepareFrame","xt","currentFrame","compInterface","renderers","registerRenderer","getRenderer","_typeof$4","AnimationItem","isLoaded","currentRawFrame","frameRate","frameMult","playSpeed","playDirection","playCount","isPaused","autoplay","loop","renderer","animationID","timeCompleted","segmentPos","isSubframeEnabled","segments","_idle","_completedLoop","projectInterface","imagePreloader","audioController","configAnimation","onSetupError","onSegmentComplete","drawnFrameEvent","setParams","params","wrapper","animType","RendererClass","rendererSettings","globalData","defs","setProjectInterface","parseInt","autoloadSegments","initialSegment","setupAnimation","lastIndexOf","substr","fileName","trigger","setData","wrapperAttributes","getNamedItem","prerender","includeLayers","newLayers","fonts","fontManager","addChars","addFonts","initExpressions","loadNextSegment","segment","segmentPath","loadSegments","imagesLoaded","checkLoaded","preloadImages","animData","round","fr","searchExtraCompositions","updaFrameModifier","waitForFontsLoaded","triggerConfigError","setTimeout","rendererType","initItems","gotoFrame","resize","_width","_height","updateContainerSize","setSubframe","renderFrame","triggerRenderFrameError","togglePause","stop","setCurrentRawFrameValue","getMarkerData","markerName","goToAndStop","isFrame","numValue","isNaN","frameModifier","goToAndPlay","playSegments","advanceTime","nextValue","_isComplete","checkSegments","adjustSegment","setSpeed","setDirection","setSegment","init","pendingFrame","forceFlag","resetSegments","onEnterFrame","onLoopComplete","onSegmentStart","onDestroy","getPath","getAssetData","hide","show","getDuration","updateDocumentData","getElementByPath","animationManager","registeredAnimations","initTime","playingAnimationsNum","_stopped","_isFrozen","removeElement","ev","animItem","subtractPlayingCount","registerAnimation","elem","addPlayingCount","activate","nowTime","elapsedTime","requestAnimationFrame","first","searchAnimations","standalone","animElements","concat","getElementsByClassName","lenAnims","body","getElementsByTagName","innerText","div","freeze","unfreeze","getRegisteredAnimations","animations","BezierFactory","replace","beziers","bezEasing","BezierEasing","kSampleStepSize","float32ArraySupported","A","aA1","aA2","B","C","calcBezier","aT","getSlope","points","_p","_mSampleValues","_precomputed","x","mX1","mY1","mX2","mY2","_precompute","_getTForX","_calcSampleValues","aX","mSampleValues","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","pooling","double","poolFactory","initialLength","_create","_release","_length","_maxLength","pool","newElement","release","bezierLengthPool","addedLength","percents","lengths","segmentsLengthPool","totalLength","bezFunction","math","pointOnLine2D","x1","y1","x2","y2","x3","y3","det1","getBezierLength","pt1","pt2","pt3","pt4","ptCoord","perc","ptDistance","curveSegments","point","lastPoint","lengthData","BezierData","segmentLength","PointData","partial","partialLength","storedData","buildBezierData","bezierName","bezierData","getDistancePerc","initPos","lengthPos","lPerc","dir","bezierSegmentPoints","getSegmentsLength","shapeData","segmentsLength","pathV","pathO","pathI","getNewSegment","startPerc","endPerc","t0","t1","u0","u1","u0u0u0","t0u0u0_3","t0t0u0_3","t0t0t0","u0u0u1","t0u0u1_3","t0t0u1_3","t0t0t1","u0u1u1","t0u1u1_3","t0t1u1_3","t0t1t1","u1u1u1","t1u1u1_3","t1t1u1_3","t1t1t1","getPointInSegment","percent","pointOnLine3D","z1","z2","z3","diffDist","dist1","dist2","dist3","bez","PropertyFactory","initFrame","mathAbs","interpolateValue","frameNum","caching","newValue","offsetTime","propType","pv","keyData","nextKeyData","keyframeMetadata","fnc","iterationIndex","keyframes","keyframesMetadata","endValue","quat","qx","qy","qz","qw","heading","attitude","bank","nextKeyTime","keyTime","ti","ind","__fnct","getBezierEasing","y","segmentPerc","distanceInLine","lastFrame","_lastKeyframeIndex","_lastAddedLength","_lastPoint","outX","outY","inX","inY","keyValue","sh","quatStart","createQuaternion","quatEnd","omega","cosom","sinom","scale0","scale1","ax","ay","az","aw","bx","by","bz","bw","acos","sin","slerp","atan2","asin","c1","cos","c3","s3","getValueAtCurrentTime","renderedFrame","endTime","_caching","renderResult","setVValue","multipliedValue","mult","_mdf","processEffectsSequence","frameId","effectsSequence","lock","_isFirstFrame","finalValue","kf","addEffect","effectFunction","addDynamicProperty","ValueProperty","vel","getValue","MultiDimensionalProperty","KeyframedValueProperty","KeyframedMultidimensionalProperty","arrLen","getProp","DynamicPropertyContainer","dynamicProperties","_isAnimated","iterateDynamicProperties","initDynamicPropertyContainer","pointPool","ShapePath","setPathData","setLength","doubleArrayLength","setXYAt","setTripleAt","vX","vY","oX","oY","iX","iY","newPath","vertices","outPoints","inPoints","cnt","shapePool","shapePath","clone","shape","cloned","ShapeCollection","addShape","releaseShapes","shapeCollectionPool","newShapeCollection","shapeCollection","ShapePropertyFactory","interpolateShape","previousValue","keyPropS","keyPropE","isHold","vertexValue","interpolateShapeCurrentTime","resetShape","paths","localShapeCollection","shape1","shape2","shapesEqual","ShapeProperty","reset","KeyframedShapeProperty","EllShapeProperty","cPoint","EllShapePropertyFactory","convertEllToPath","p0","p1","s0","_cw","StarShapeProperty","StarShapePropertyFactory","sy","ir","is","convertToPath","convertStarToPath","convertPolygonToPath","or","rad","roundness","perimSegment","numPts","angle","longFlag","longRad","shortRad","longRound","shortRound","longPerimSegment","shortPerimSegment","currentAng","ox","oy","RectShapeProperty","RectShapePropertyFactory","convertRectToPath","v0","v1","Matrix","_cos","_sin","_tan","tan","_rnd","rotate","mCos","mSin","_t","rotateX","rotateY","rotateZ","shear","sx","skew","skewFromAxis","scale","sz","setTransform","translate","tx","tz","transform","a2","b2","d2","e2","f2","g2","h2","i2","j2","k2","l2","m2","n2","o2","p2","_identityCalculated","a1","b1","d1","e1","f1","g1","h1","i1","j1","k1","l1","m1","n1","o1","isIdentity","_identity","equals","matr","cloneFromProps","applyToPoint","z","applyToX","applyToY","applyToZ","getInverseMatrix","determinant","inverseMatrix","inversePoint","applyToPointArray","inversePoints","pts","retPts","applyToTriplePoints","p4","p5","p12","p13","applyToPointStringified","toCSS","cssValue","roundMatrixProperty","to2dCSS","_typeof$3","lottie","setLocation","href","setSubframeRendering","setPrefix","prefix","setQuality","inBrowser","installPlugin","plugin","getFactory","checkReady","readyStateCheckInterval","getQueryVariable","variable","vars","queryString","pair","decodeURIComponent","useWebWorker","setIDPrefix","__getFactory","version","scripts","myScript","exports","bodymovin","ShapeModifiers","modifiers","registerModifier","getModifier","ShapeModifier","TrimModifier","PuckerAndBloatModifier","initModifierProperties","addShapeToModifier","setAsAnimated","processKeys","sValue","eValue","pathsData","calculateShapeEdges","shapeLength","totalModifierLength","segmentOb","shapeSegments","shapeS","shapeE","releasePathsData","processShapes","shapePaths","_s","totalShapeLength","edges","newShapesData","addShapes","lastShape","pop","addPaths","newPaths","addSegment","newShape","addSegmentFromArray","shapeSegment","currentLengthData","segmentCount","amount","processPath","centerPoint","pathLength","clonedPath","TransformPropertyFactory","defaultVector","TransformProperty","pre","appliedTransformations","px","py","pz","rx","ry","rz","_isDirty","applyToMatrix","mat","forceRender","precalculateMatrix","autoOriented","v2","getValueAtTime","autoOrient","_addDynamicProperty","getTransformProperty","RepeaterModifier","RoundCornersModifier","floatEqual","floatZero","lerp","lerpPoint","quadRoots","singleRoot","delta","polynomialCoefficients","p3","singlePoint","PolynomialBezier","linearize","pointEqual","coeffx","coeffy","extrema","intersectData","t2","box","boundingBox","cx","cy","splitData","boxIntersect","intersectsImpl","tolerance","intersections","maxRecursion","d1s","d2s","crossProduct","lineIntersection","start1","end1","start2","end2","v3","v4","polarOffset","pointDistance","hypot","ZigZagModifier","setPoint","outputBezier","amplitude","outAmplitude","inAmplitude","angO","angI","getPerpendicularVector","vector","rot","getProjectingAngle","cur","prevIndex","nextIndex","pVector","zigZagCorner","frequency","pointType","prevPoint","nextPoint","prevDist","nextDist","zigZagSegment","normalAngle","linearOffset","offsetSegment","p1a","p1b","p2b","p2a","joinLines","seg1","seg2","lineJoin","miterLimit","angleOut","tangentAngle","angleIn","center","radius","intersection","getIntersection","intersect","pruneSegmentIntersection","outa","outb","pruneIntersections","offsetSegmentSplit","right","mid","flex","inflectionPoints","OffsetPathModifier","getFontProperties","fontData","fStyle","fWeight","weight","tr","so","eo","pMatrix","rMatrix","sMatrix","tMatrix","matrix","applyTransforms","inv","scaleX","scaleY","elemsData","_currentCopies","_elements","_groups","resetElements","_processed","cloneElements","newElements","changeGroupRender","renderFlag","_render","items","itemsTransform","cont","hasReloaded","copies","ceil","group","ix","reloadShapes","transformData","offsetModulo","roundOffset","pProps","rProps","sProps","iteration","mProps","rd","currentV","currentI","currentO","closerV","distance","newPosPerc","derivative","denom","tcusp","square","filter","p10","p11","p20","p21","bounds","bottom","other","shapeSegmentInverted","pointsType","ml","lj","inputBezier","multiSegments","lastSeg","multiSegment","FontManager","emptyChar","combinedCharacters","surrogateModifiers","zeroWidthJoiner","setUpNode","font","family","fontFamily","fontSize","fontVariant","fontStyle","fontWeight","letterSpacing","offsetWidth","familyArray","enabledFamilies","trimFontOptions","createHelper","def","helper","engine","fontProps","tHelper","fFamily","fClass","tCanvasHelper","OffscreenCanvas","measureText","getComputedTextLength","Font","typekitLoaded","_warned","Date","now","setIsLoadedBinded","setIsLoaded","checkLoadedFontsBinded","checkLoadedFonts","isModifier","firstCharCode","secondCharCode","sum","isZeroWidthJoiner","isCombinedCharacter","_char3","fontPrototype","found","ch","list","fontArr","_pendingFonts","loadedSelector","shouldLoadFont","loaded","monoCase","sansCase","fPath","fOrigin","querySelectorAll","rel","sc","getCharData","_char","console","warn","getFontByName","fName","_char2","fontName","doubleSize","singleSize","loadedCount","removeChild","RenderableElement","initRenderable","isInRange","hidden","isTransparent","renderableComponents","addRenderableComponent","component","removeRenderableComponent","prepareRenderableFrame","num","checkLayerLimits","checkTransparency","finalTransform","mProp","renderConfig","hideOnTransparent","renderRenderable","sourceRectAtTime","getLayerSize","textData","getBlendMode","blendModeEnums","SliderEffect","AngleEffect","ColorEffect","PointEffect","LayerIndexEffect","MaskIndexEffect","CheckboxEffect","NoValueEffect","EffectsManager","effects","ef","effectElements","effectItem","GroupEffect","BaseElement","FrameElement","FootageElement","imageLoader","initBaseData","AudioElement","_isPlaying","_canPlay","_currentTime","_volumeMultiplier","_previousVolume","_placeholder","lv","au","BaseRenderer","TransformElement","MaskElement","maskElement","viewData","solidPath","rect","expansor","feMorph","currentMasks","layerId","maskType","maskRef","getShapeProp","lastPath","filterID","expan","lastOperator","filterId","lastRadius","createLayerSolidPath","invRect","drawPath","maskedElement","eff","checkMasks","LayerExpressionInterface","EffectsExpressionInterface","ShapeExpressionInterface","TextExpressionInterface","CompExpressionInterface","layerInterface","maskManager","registerMaskInterface","effectsInterface","createEffectsInterface","registerEffectsInterface","shapeInterface","shapesData","itemsData","textInterface","setBlendMode","blendModeValue","bm","baseElement","layerElement","effectsManager","getType","prepareProperties","isVisible","_isParent","getBaseElement","FootageInterface","getFootageData","timeRemapped","totalVolume","volumeValue","checkLayers","buildItem","checkPendingElements","createItem","layer","createImage","createComp","createSolid","createNull","createShape","createText","createCamera","createFootage","buildAllItems","pInterface","progressiveLoad","buildElementParenting","parentName","hierarchy","setAsParent","setHierarchy","addPendingElement","pendingElements","pathValue","setupGlobalData","fontsContainer","animationItem","compSize","initTransform","_matMdf","_opMdf","ao","renderTransform","finalMat","globalToLocal","transforms","ptNew","mHelper","getMaskProperty","isFirstFrame","getMaskelement","pathNodes","pathString","pathShapeValue","filtersFactory","filId","skipCoordinates","fil","feColorMatrix","featureSupport","registeredEffects","idPrefix","SVGEffects","filterManager","createFilter","filters","Effect","effect","countsAsEffect","registerEffect","SVGBaseElement","HierarchyElement","RenderableDOMElement","IImageElement","initElement","sourceRect","ProcessedElement","IShapeElement","initRendererElement","createContainerElements","matteElement","transformedElement","_sizeChanged","layerElementParent","td","matteMasks","symbolElement","gg","tt","ln","hd","cp","clipId","cpGroup","renderElement","destroyBaseElement","createRenderableComponents","renderableEffectsManager","getMatte","matteType","useElement","masker","createAlphaToLuminanceFilter","maskGroup","maskGrouper","feCTr","feFunc","alphaRect","setMatte","initHierarchy","checkParenting","createContent","renderInnerContent","innerElem","pr","imagePreserveAspectRatio","addShapeToModifiers","shapeModifiers","isShapeInAnimatedModifiers","isAnimatedWithShape","renderModifiers","searchProcessedElement","processedElements","addProcessedElement","lineCapEnum","lineJoinEnum","SVGShapeData","transformers","caches","lStr","lvl","SVGStyleData","pElem","msElem","DashProperty","dataProps","dashStr","dashArray","dashoffset","SVGStrokeStyleData","styleOb","SVGFillStyleData","SVGNoStyleData","GradientProperty","cLength","_cmdf","_omdf","_collapsable","checkCollapsable","_hasOpacity","SVGGradientFillStyleData","initGradientData","SVGGradientStrokeStyleData","ShapeGroupData","prevViewData","gr","SVGTransformData","comparePoints","stops","setGradientData","setGradientOpacity","pathElement","gradientId","gfill","gf","cst","opacityId","maskId","opFill","of","ms","ost","buildShapeString","_o","_i","shapeString","SVGElementsRenderer","_identityMatrix","_matrixHelper","renderContentTransform","styleData","itemData","renderNoop","renderPath","pathStringTransformed","redraw","iterations","lLen","renderFill","styleElem","renderGradientStroke","renderGradient","renderStroke","hasOpacity","attr1","attr2","cValues","oValues","ang","createRenderFunction","SVGShapeElement","stylesList","animatedContents","LetterProps","sw","fc","TextProperty","_frameId","keysIndex","canResize","minimumFontSize","currentData","ascent","boxWidth","defaultBoxWidth","justifyOffset","lh","lineWidths","ls","ps","fillColorAnim","strokeColorAnim","strokeWidthAnim","yOffset","finalSize","finalText","finalLineHeight","copyData","searchProperty","completeTextData","initSecondaryElement","identityMatrix","buildExpressionInterface","searchShapes","filterUniqueShapes","tempShapes","areAnimated","setShapesAsAnimated","createStyleElement","elementData","addToAnimatedContents","createGroupElement","createTransformElement","transformProperty","createShapeElement","ownTransformers","setElementStyles","currentTransform","modifier","processedPos","ownStyles","ownModifiers","renderShape","animatedContent","setCurrentData","searchKeyframes","getKeyframeValue","_finalValue","currentValue","currentIndex","textKeys","buildFinalText","charCode","charactersArray","shouldCombine","charAt","newLineFlag","letters","anchorGrouping","currentSize","currentPos","currentLine","lineWidth","maxLineWidth","trackingOffset","currentHeight","boxHeight","lastSpaceIndex","currentChar","uncollapsedSpaces","an","add","anIndexes","animatorJustifyOffset","animatorData","letterData","based","animators","indexes","fh","fs","fb","rn","totalChars","newInd","currentInd","newData","dData","recalculate","canResizeFont","_canResize","setMinimumFontSize","_fontValue","TextSelectorProp","TextSelectorPropFactory","_currentTextLength","finalS","finalE","xe","ne","sm","getMult","textProperty","easer","tot","smoothness","threshold","newCharsFlag","divisor","getTextSelectorProp","TextAnimatorDataProperty","animatorProps","defaultData","textAnimatorAnimatables","TextAnimatorProperty","renderType","_hasMaskedPath","_textData","_renderType","_elem","_animatorsData","_pathData","_moreOptions","alignment","renderedLetters","lettersChangedFlag","ITextElement","searchProperties","getMeasures","xPos","yPos","pathInfo","currentLength","currentPoint","pointInd","segmentInd","tanAngle","matrixHelper","renderedLettersCount","tLength","pi","letterValue","yOff","firstLine","offf","xPathPos","yPathPos","elemOpacity","letterSw","letterSc","letterFc","letterO","initPathPos","initSegmentInd","initPointInd","letterM","letterP","defaultPropsArray","animatorFirstCharOffset","justifyOffsetMult","isNewLine","animatorOffset","atan","textAnimator","buildNewText","createPathShape","shapeStr","_fontSize","applyTextPropertiesToMatrix","lineNumber","buildColor","colorData","emptyProp","emptyShapeData","SVGTextLottieElement","textSpans","ISolidElement","NullElement","SVGRendererBase","ICompElement","SVGCompElement","supports3d","SVGRenderer","config","ariaLabel","title","titleElement","titleId","description","descElement","descId","preserveAspectRatio","contentVisibility","viewBoxOnly","viewBoxSize","className","focusable","filterSize","runExpressions","destroyed","CVContextData","saved","cArrPos","cTr","cO","savedOp","ShapeTransformManager","sequences","sequenceList","transform_key_count","CVEffects","CVMaskElement","hasMasks","CVBaseElement","CVShapeData","transformsManager","styledShapes","styledShape","addTransformSequence","trNodes","CVShapeElement","CVTextElement","stroke","currentRender","sWidth","fValue","CVImageElement","CVSolidElement","CanvasRendererBase","clearCanvas","context","dpr","devicePixelRatio","currentGlobalAlpha","contextData","transformMat","CVCompElement","CanvasRenderer","HBaseElement","HSolidElement","HShapeElement","shapesContainer","currentBBox","HTextElement","textPaths","isMasked","HCameraElement","pe","_prevMat","HImageElement","HybridRendererBase","threeDElements","camera","HCompElement","HybridRenderer","singleShape","textContainer","buildTextContents","textArray","textContents","currentTextContent","buildShapeData","shapeItem","tSpan","usesGlyphs","cachedSpansLength","span","childSpan","glyph","glyphElement","_debug","tElement","justify","textBox","bbox","renderedLetter","textSpan","findIndexByInd","appendElementInPos","elementIndex","tp","matteMask","nextElement","setElements","getElements","destroyElements","duplicate","newLength","currentSavedOp","sequence","processSequence","processSequences","getNewKey","canvasContext","beginPath","moveTo","lineTo","bezierCurveTo","save","clip","createElements","blendMode","globalCompositeOperation","hideElement","showElement","forceRealStack","ctxTransform","ctxOpacity","restore","transformHelper","opacity","dashResetter","preTransforms","co","wi","da","addTransformToStyleList","removeTransformFromStyleList","closeStyles","shouldRender","ownTransforms","_shouldRender","renderShapeTransform","parentTransform","groupTransform","drawLayer","nodes","currentStyle","coOp","strokeStyle","grd","lineCap","setLineDash","lineDashOffset","closePath","isMain","renderGradientFill","renderStyledShape","shapeNodes","groupTransformMat","createLinearGradient","createRadialGradient","addColorStop","hasFill","hasStroke","commands","pathArr","commandsCounter","lastFill","lastStroke","lastStrokeW","widthCrop","heightCrop","imgW","imgH","imgRel","canvasRel","par","drawImage","cProps","trProps","globalAlpha","actionFlag","popped","containerStyle","mozTransformOrigin","transformCanvas","isDashed","elementWidth","elementHeight","elementRel","animationRel","offsetHeight","fillType","clearRect","checkBlendMode","tg","transformedElementStyle","matrixValue","webkitTransform","addEffects","backgroundColor","_renderShapeFrame","shapeCont","getTransformedPoint","calculateShapeBoundingBox","vPoint","oPoint","nextIPoint","nextVPoint","checkBounds","getBoundsOfCurve","shapeBoundingBox","xMax","yMax","tempBoundingBox","b2ac","calculateF","calculateBoundingBox","expandStrokeBoundingBox","widthProperty","kfw","currentBoxContains","changed","shapeStyle","shapeTransform","compW","compH","innerElemStyle","textColor","strokeWidth","lineHeight","tParent","tCont","children","tContStyle","tContTranslation","tStyle","tSpanTranslation","svgStyle","translation","textPath","margin","svgTransform","setup","perspectiveStyle","perspectiveElem","perspective","webkitPerspective","mTransf","diffVector","mag","lookDir","lookLengthOnXZ","mRotationX","mRotationY","hasMatrixChanged","matValue","Image","imageElem","newDOMElement","ddd","addTo3dContainer","nextDOMElement","nextLayer","getThreeDContainerByPos","startPos","endPos","createThreeDContainer","threeDContainerData","build3dContainers","lastThreeDContainerData","currentContainer","resizerElem","svg","cWidth","cHeight","floatingContainer","_createBaseContainerElements","_thisLayerFunction","pixelAspect","frameDuration","displayStartTime","numLayers","Expressions","stackCount","registers","pushExpression","popExpression","releaseInstances","registerExpressionProperty","expression","MaskManagerInterface","MaskInterface","_mask","_data","_masksInterfaces","ExpressionPropertyInterface","defaultUnidimensionalValue","defaultMultidimensionalValue","completeProperty","expressionValue","getVelocityAtTime","numKeys","valueProp","valueAtTime","speedAtTime","getSpeedAtTime","velocityAtTime","propertyGroup","defaultGetter","UnidimensionalPropertyInterface","arrValue","MultidimensionalPropertyInterface","TransformExpressionInterface","_thisFunction","rotation","xRotation","yRotation","xPosition","yPosition","zPosition","anchorPoint","_px","_py","_pz","_transformFactory","getMatrix","toWorldMat","toWorldVec","applyPoint","toWorld","fromWorldVec","invertPoint","fromWorld","fromComp","sampleImage","transformInterface","toComp","anchorPointDescriptor","defineProperties","hasParent","anchor_point","active","startTime","inPoint","outPoint","_name","propertyGroupFactory","interfaceFunction","parentPropertyGroup","PropertyInterface","propertyName","effectsData","createGroupInterface","groupInterface","mn","_propertyGroup","createValueInterface","numProperties","np","enabled","en","expressionProperty","setGroupProperty","ShapePathInterface","view","propertyIndex","iterateElements","groupInterfaceFactory","fillInterfaceFactory","strokeInterfaceFactory","trimInterfaceFactory","ellipseInterfaceFactory","starInterfaceFactory","rectInterfaceFactory","roundedInterfaceFactory","repeaterInterfaceFactory","gradientFillInterfaceFactory","interfaces","transformInterfaceFactory","cix","contentsInterfaceFactory","startPoint","endPoint","_dashPropertyGroup","dashOb","addPropertyToDashOb","dash","skewAxis","outerRadius","outerRoundness","innerRoundness","innerRadius","_interfaceFunction","_prevValue","_sourceText","sourceText","stringValue","_typeof$2","dataInterfaceFactory","outlineInterface","currentPropertyName","currentProperty","propertyNameIndex","outlineInterfaceFactory","dataInterface","footage","getInterface","_typeof$1","seedRandom","global","startdenom","significance","ARC4","keylen","me","S","flatten","typ","mixkey","seed","smear","stringseed","tostring","shortseed","entropy","crypto","msCrypto","getRandomValues","browser","plugins","screen","autoseed","arc4","prng","int32","quick","pass","is_math_call","initialize$2","propTypes","SHAPE","_typeof","ExpressionManager","fetch","frames","$bm_isInstanceOfArray","isNumerable","tOfV","$bm_neg","tOfA","lenA","retArr","easeInBez","easeOutBez","easeInOutBez","tOfB","lenB","sub","mul","mod","$bm_sum","$bm_sub","$bm_mul","$bm_div","$bm_mod","clamp","mm","radiansToDegrees","radians_to_degrees","degreesToRadians","degrees_to_radians","helperLengthArray","arr1","arr2","normalize","vec","rgbToHsl","hue2rgb","hslToRgb","linear","tMin","tMax","value1","value2","_tMin","rnd","createPath","inTangents","outTangents","inVertexPoint","outVertexPoint","arrPlaceholder","initiateExpression","noOp","_value","needsVelocity","_needsRandom","elemType","$bm_transform","thisProperty","loopIn","loop_in","loopOut","loop_out","smooth","fromCompToSurface","thisLayer","thisComp","scoped_bm_rt","expression_function","eval","wiggle","freq","amp","iWiggle","lenWiggle","addedAmps","periods","loopInDuration","loopOutDuration","velocity","textIndex","textTotal","selectorValue","lookAt","elem1","elem2","fVec","pitch","easeOut","val1","val2","applyEase","easeIn","ease","iKey","lenKey","nearestKey","obKey","framesToTime","fps","timeToFrames","seedrandom","randSeed","substring","posterizeTime","framesPerSecond","executeExpression","frameExpressionId","__preventDeadCodeRemoval","expressionHelpers","searchExpressions","speed","_cachingAtTime","getStaticValueAtTime","addPropertyDecorator","durationFlag","cycleDuration","firstKeyFrame","lastKeyFrame","initV","endV","current","repeats","lastValue","nextLastValue","firstValue","nextFirstValue","samples","sampleValue","sampleFrequency","getTransformValueAtTime","_transformCachingAtTime","anchor","rotationZ","rotationY","rotationX","orientation","positionX","positionY","positionZ","getTransformStaticValueAtTime","propertyGetProp","ShapePropertyConstructorFunction","getConstructorFunction","KeyframedShapePropertyConstructorFunction","getKeyframedConstructorFunction","ShapeExpressions","isClosed","pointOnPath","_segmentsLength","accumulatedLength","initIndex","endIndex","vectorOnPath","vectorType","xLength","yLength","magnitude","tangentOnPath","normalOnPath","shapeValue","lastTime","propertyGetShapeProp","trims","initialize$1","addDecorator","getExpressionValue","calculateExpression","isKeyframed","hasExpressions","initialize","SVGComposableEffect","SVGTintFilter","matrixFilter","feMerge","createMergeNode","SVGFillFilter","SVGStrokeEffect","initialized","SVGTritoneFilter","feComponentTransfer","feFuncR","feFuncG","feFuncB","SVGProLevelsFilter","createFeFunc","feFuncA","feFuncRComposed","feFuncGComposed","feFuncBComposed","SVGDropShadowEffect","globalFilterSize","feGaussianBlur","feOffset","feFlood","feComposite","resultId","ins","feMergeNode","colorBlack","colorWhite","groupPath","elemChildren","pathMasker","dasharrayValue","getTotalLength","lineLength","units","color1","color2","color3","tableR","tableG","tableB","getTableValue","inputBlack","inputWhite","gamma","outputBlack","outputWhite","colorValue","outputDelta","inputDelta","col","_svgMatteSymbols","SVGMatte3Effect","filterElem","SVGGaussianBlurEffect","findSymbol","replaceInParent","symbolId","nextChild","useElem","setElementAsMask","symbol","sigma","dimensions","sigmaX","sigmaY","edgeMode","module","LOTTIE_PLAYER_VERSION","LOTTIE_WEB_VERSION","PlayerState","PlayMode","PlayerEvents","parseSrc","isLottie","json","every","field","fromURL","srcUrl","LottiePlayer","Loading","Normal","_this","srcParsed","jsonData","srcAttrib","_lottie","webworkers","_attachEventListeners","disableCheck","currentState","dispatchEvent","CustomEvent","getLottie","getVersions","lottieWebVersion","lottiePlayerVersion","Playing","Play","Paused","Pause","_counter","Stopped","Stop","Destroyed","frame","seeker","snapshot","download","XMLSerializer","serializeToString","encodeURIComponent","click","setLooping","togglePlay","toggleLooping","_io","disconnect","_onVisibilityChange","controls","animationClass","background","disableShadowDOM","renderControls","IntersectionObserver","entries","isIntersecting","Frozen","observe","Rendered","isStopped","_handleSeekChange","_prevState","Frame","detail","Complete","Bounce","Loop","intermission","Ready","Load","hover","Freeze","fetchPath","resolve","pako","TGSPlayer","strict","errors","formatCheck","tgs","_superprop_getLoad","asset","checkLayer","checkItems"],"mappings":";;;;;;;;;;;;;;gFAsDO,SAASA,WAAWC,EAAYC,EAAQC,EAAKC,OAC2EC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,KAC9F,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,UACzIH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA;;;;;ICvChE,IAwCaO,IACVC,GACAC,GAC8B,mBAAtBA,EA3CiB,EAACD,EAAiBE,KAC5CC,OAAOC,eAAeC,OAAOL,EAASE,GAO/BA,GARmB,CA4CAF,EAASC,GAjCP,EAC5BD,EACAM,SAEMC,KAACA,EAAIC,SAAEA,GAAYF,QAClB,CACLC,KAAAA,EACAC,SAAAA,EAEAC,SAASP,GACPC,OAAOC,eAAeC,OAAOL,EAASE,MAVd,CAkCAF,EAASC;;;;;ICjDjCS,IAAmB,CACvBC,EACAC,IAMm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