version 5.1.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41ff057..4c360b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+## V 5.1.0
+- FEATURE: support for all text document property updates usign TextLayer.updateDocumentData (check Wiki for more information)
+- FEATURE: text layers with text boxes have two new methods: TextLayer.canResizeFont and TextLayer.setMinimumFontSize (check Wiki for more information)
+- PERFORMANCE: Significant performance improvement on all renderers
+- PERFORMANCE: repeaters significant performance improvement
+- PERFORMANCE: gradients with opacity significant performance improvement
+- REFACTOR: reduced and organized main element classes
+- TEXT: text align fix for font based text layers
+
 ## V 5.0.6
 - FIX: totalFrames and resetFrames
 - FIX: canvas destroy method
diff --git a/History.md b/History.md
index b194abf..128684b 100644
--- a/History.md
+++ b/History.md
@@ -1,3 +1,12 @@
+## V 5.1.0
+- FEATURE: support for all text document property updates usign TextLayer.updateDocumentData (check Wiki for more information)
+- FEATURE: text layers with text boxes have two new methods: TextLayer.canResizeFont and TextLayer.setMinimumFontSize (check Wiki for more information)
+- PERFORMANCE: Significant performance improvement on all renderers
+- PERFORMANCE: repeaters significant performance improvement
+- PERFORMANCE: gradients with opacity significant performance improvement
+- REFACTOR: reduced and organized main element classes
+- TEXT: text align fix for font based text layers
+
 ## V 5.0.6
 - FIX: totalFrames and resetFrames
 - FIX: canvas destroy method
diff --git a/build/extension/bodymovin.zxp b/build/extension/bodymovin.zxp
index d3880be..66bca83 100644
--- a/build/extension/bodymovin.zxp
+++ b/build/extension/bodymovin.zxp
Binary files differ
diff --git a/build/player/lottie.js b/build/player/lottie.js
index aff4209..2aa4298 100644
--- a/build/player/lottie.js
+++ b/build/player/lottie.js
@@ -17,7 +17,6 @@
 
 var initialDefaultFrame = -999999;
 
-//TODO with subframe enabled, code deopt data shows up
 var subframeEnabled = true;
 var expressionsPlugin;
 var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
@@ -41,13 +40,13 @@
     }
 }());
 
-function ProjectInterface(){return {}};
+function ProjectInterface(){return {};}
 
 BMMath.random = Math.random;
 BMMath.abs = function(val){
     var tOfVal = typeof val;
     if(tOfVal === 'object' && val.length){
-        var absArr = _cv(val.length);
+        var absArr = createSizedArray(val.length);
         var i, len = val.length;
         for(i=0;i<len;i+=1){
             absArr[i] = Math.abs(val[i]);
@@ -56,7 +55,7 @@
     }
     return Math.abs(val);
 
-}
+};
 var defaultCurveSegments = 150;
 var degToRads = Math.PI/180;
 var roundCorner = 0.5519;
@@ -96,14 +95,14 @@
 
 function BMCompleteLoopEvent(n,c,t,d){
     this.type = n;
-    this.currentLoop = c;
-    this.totalLoops = t;
+    this.currentLoop = t;
+    this.totalLoops = c;
     this.direction = d < 0 ? -1:1;
 }
 
 function BMSegmentStartEvent(n,f,t){
     this.type = n;
-    this._ch = f;
+    this.firstFrame = f;
     this.totalFrames = t;
 }
 
@@ -124,21 +123,18 @@
 
 function HSVtoRGB(h, s, v) {
     var r, g, b, i, f, p, q, t;
-    if (arguments.length === 1) {
-        s = h.s, v = h.v, h = h.h;
-    }
     i = Math.floor(h * 6);
     f = h * 6 - i;
     p = v * (1 - s);
     q = v * (1 - f * s);
     t = v * (1 - (1 - f) * s);
     switch (i % 6) {
-        case 0: r = v, g = t, b = p; break;
-        case 1: r = q, g = v, b = p; break;
-        case 2: r = p, g = v, b = t; break;
-        case 3: r = p, g = q, b = v; break;
-        case 4: r = t, g = p, b = v; break;
-        case 5: r = v, g = p, b = q; break;
+        case 0: r = v; g = t; b = p; break;
+        case 1: r = q; g = v; b = p; break;
+        case 2: r = p; g = v; b = t; break;
+        case 3: r = p; g = q; b = v; break;
+        case 4: r = t; g = p; b = v; break;
+        case 5: r = v; g = p; b = q; break;
     }
     return [ r,
         g,
@@ -146,9 +142,6 @@
 }
 
 function RGBtoHSV(r, g, b) {
-    if (arguments.length === 1) {
-        g = r.g, b = r.b, r = r.r;
-    }
     var max = Math.max(r, g, b), min = Math.min(r, g, b),
         d = max - min,
         h,
@@ -229,7 +222,7 @@
 }());
 function BaseEvent(){}
 BaseEvent.prototype = {
-	_cy: function (eventName, args) {
+	triggerEvent: function (eventName, args) {
 	    if (this._cbs[eventName]) {
 	        var len = this._cbs[eventName].length;
 	        for (var i = 0; i < len; i++){
@@ -265,8 +258,8 @@
 	        }
 	    }
 	}
-}
-var _cs = (function(){
+};
+var createTypedArray = (function(){
 	function createRegularArray(type, len){
 		var i = 0, arr = [], value;
 		switch(type) {
@@ -283,7 +276,7 @@
 		}
 		return arr;
 	}
-	function _cs(type, len){
+	function createTypedArray(type, len){
 		if(type === 'float32') {
 			return new Float32Array(len);
 		} else if(type === 'int16') {
@@ -293,20 +286,20 @@
 		}
 	}
 	if(typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-		return _cs
+		return createTypedArray;
 	} else {
-		return createRegularArray
+		return createRegularArray;
 	}
-}())
+}());
 
-function _cv(len) {
-	return Array.apply(null,{length:len})
+function createSizedArray(len) {
+	return Array.apply(null,{length:len});
 }
-function _ct(type) {
+function createNS(type) {
 	//return {appendChild:function(){},setAttribute:function(){},style:{}}
 	return document.createElementNS(svgNS, type);
 }
-function _cu(type) {
+function createTag(type) {
 	//return {appendChild:function(){},setAttribute:function(){},style:{}}
 	return document.createElement(type);
 }
@@ -372,10 +365,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(mCos, -mSin,  0, 0
-            , mSin,  mCos, 0, 0
-            , 0,  0,  1, 0
-            , 0, 0, 0, 1);
+        return this._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
     }
 
     function rotateX(angle){
@@ -384,10 +374,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(1, 0, 0, 0
-            , 0, mCos, -mSin, 0
-            , 0, mSin,  mCos, 0
-            , 0, 0, 0, 1);
+        return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin,  mCos, 0, 0, 0, 0, 1);
     }
 
     function rotateY(angle){
@@ -396,10 +383,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(mCos,  0,  mSin, 0
-            , 0, 1, 0, 0
-            , -mSin,  0,  mCos, 0
-            , 0, 0, 0, 1);
+        return this._t(mCos,  0,  mSin, 0, 0, 1, 0, 0, -mSin,  0,  mCos, 0, 0, 0, 0, 1);
     }
 
     function rotateZ(angle){
@@ -408,10 +392,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(mCos, -mSin,  0, 0
-            , mSin,  mCos, 0, 0
-            , 0,  0,  1, 0
-            , 0, 0, 0, 1);
+        return this._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
     }
 
     function shear(sx,sy){
@@ -425,18 +406,9 @@
     function skewFromAxis(ax, angle){
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        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,  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);
     }
 
@@ -478,59 +450,61 @@
 
     function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
 
+        var _p = this.props;
+
         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){
             //NOTE: commenting this condition because TurboFan deoptimizes code when present
             //if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-                this.props[12] = this.props[12] * a2 + this.props[15] * m2;
-                this.props[13] = this.props[13] * f2 + this.props[15] * n2;
-                this.props[14] = this.props[14] * k2 + this.props[15] * o2;
-                this.props[15] = this.props[15] * p2;
+                _p[12] = _p[12] * a2 + _p[15] * m2;
+                _p[13] = _p[13] * f2 + _p[15] * n2;
+                _p[14] = _p[14] * k2 + _p[15] * o2;
+                _p[15] = _p[15] * p2;
             //}
             this._identityCalculated = false;
             return this;
         }
 
-        var a1 = this.props[0];
-        var b1 = this.props[1];
-        var c1 = this.props[2];
-        var d1 = this.props[3];
-        var e1 = this.props[4];
-        var f1 = this.props[5];
-        var g1 = this.props[6];
-        var h1 = this.props[7];
-        var i1 = this.props[8];
-        var j1 = this.props[9];
-        var k1 = this.props[10];
-        var l1 = this.props[11];
-        var m1 = this.props[12];
-        var n1 = this.props[13];
-        var o1 = this.props[14];
-        var p1 = this.props[15];
+        var a1 = _p[0];
+        var b1 = _p[1];
+        var c1 = _p[2];
+        var d1 = _p[3];
+        var e1 = _p[4];
+        var f1 = _p[5];
+        var g1 = _p[6];
+        var h1 = _p[7];
+        var i1 = _p[8];
+        var j1 = _p[9];
+        var k1 = _p[10];
+        var l1 = _p[11];
+        var m1 = _p[12];
+        var n1 = _p[13];
+        var o1 = _p[14];
+        var p1 = _p[15];
 
         /* matrix order (canvas compatible):
          * ace
          * bdf
          * 001
          */
-        this.props[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-        this.props[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2 ;
-        this.props[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2 ;
-        this.props[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2 ;
+        _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+        _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2 ;
+        _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2 ;
+        _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2 ;
 
-        this.props[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2 ;
-        this.props[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2 ;
-        this.props[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2 ;
-        this.props[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2 ;
+        _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2 ;
+        _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2 ;
+        _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2 ;
+        _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2 ;
 
-        this.props[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2 ;
-        this.props[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2 ;
-        this.props[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2 ;
-        this.props[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2 ;
+        _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2 ;
+        _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2 ;
+        _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2 ;
+        _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2 ;
 
-        this.props[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2 ;
-        this.props[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2 ;
-        this.props[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2 ;
-        this.props[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2 ;
+        _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2 ;
+        _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2 ;
+        _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2 ;
+        _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2 ;
 
         this._identityCalculated = false;
         return this;
@@ -538,10 +512,7 @@
 
     function isIdentity() {
         if(!this._identityCalculated){
-            this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0
-                || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0
-                || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0
-                || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);
+            this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);
             this._identityCalculated = true;
         }
         return this._identity;
@@ -613,15 +584,37 @@
         return retPts;
     }
 
-    function _cn(x,y,z,dimensions){
-        if(dimensions && dimensions === 2) {
-            var arr = point_pool.newElement();
-            arr[0] = x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12]; 
-            arr[1] = x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13]; 
-            return arr;    
+    function applyToTriplePoints(pt1, pt2, pt3) {
+        var arr = createTypedArray('float32', 6);
+        if(this.isIdentity()) {
+            arr[0] = pt1[0];
+            arr[1] = pt1[1];
+            arr[2] = pt2[0];
+            arr[3] = pt2[1];
+            arr[4] = pt3[0];
+            arr[5] = pt3[1];
+        } else {
+            var p0 = this.props[0], p1 = this.props[1], p4 = this.props[4], p5 = this.props[5], p12 = this.props[12], p13 = this.props[13];
+            arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+            arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+            arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+            arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+            arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+            arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
         }
-        return [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]];
+        return arr;
     }
+
+    function applyToPointArray(x,y,z){
+        var arr;
+        if(this.isIdentity()) {
+            arr = [x,y,z];
+        } else {
+            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]];
+        }
+        return arr;
+    }
+
     function applyToPointStringified(x, y) {
         if(this.isIdentity()) {
             return x + ',' + y;
@@ -639,7 +632,7 @@
         var cssValue = 'matrix3d(';
         var v = 10000;
         while(i<16){
-            cssValue += _rnd(props[i]*v)/v
+            cssValue += _rnd(props[i]*v)/v;
             cssValue += i === 15 ? ')':',';
             i += 1;
         }
@@ -673,7 +666,8 @@
         this.applyToX = applyToX;
         this.applyToY = applyToY;
         this.applyToZ = applyToZ;
-        this._cn = _cn;
+        this.applyToPointArray = applyToPointArray;
+        this.applyToTriplePoints = applyToTriplePoints;
         this.applyToPointStringified = applyToPointStringified;
         this.toCSS = toCSS;
         this.to2dCSS = to2dCSS;
@@ -687,9 +681,9 @@
         this._identity = true;
         this._identityCalculated = false;
 
-        this.props = _cs('float32', 16);
+        this.props = createTypedArray('float32', 16);
         this.reset();
-    }
+    };
 }());
 
 /*
@@ -737,12 +731,12 @@
 //
     function seedrandom(seed, options, callback) {
         var key = [];
-        options = (options == true) ? { entropy: true } : (options || {});
+        options = (options === true) ? { entropy: true } : (options || {});
 
         // Flatten the seed string or build one from local entropy if needed.
         var shortseed = mixkey(flatten(
             options.entropy ? [seed, tostring(pool)] :
-                (seed == null) ? autoseed() : seed, 3), key);
+                (seed === null) ? autoseed() : seed, 3), key);
 
         // Use the seed to initialize an ARC4 generator.
         var arc4 = new ARC4(key);
@@ -766,8 +760,8 @@
             return (n + x) / d;                 // Form the number within [0, 1).
         };
 
-        prng.int32 = function() { return arc4.g(4) | 0; }
-        prng.quick = function() { return arc4.g(4) / 0x100000000; }
+        prng.int32 = function() { return arc4.g(4) | 0; };
+        prng.quick = function() { return arc4.g(4) / 0x100000000; };
         prng.double = prng;
 
         // Mix the randomness into accumulated entropy.
@@ -780,7 +774,7 @@
                 // Load the arc4 state from the given state if it has an S array.
                 if (state.S) { copy(state, arc4); }
                 // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); }
+                prng.state = function() { return copy(arc4, {}); };
             }
 
             // If called as a method of Math (Math.seedrandom()), mutate
@@ -838,7 +832,7 @@
             // For robust unpredictability, the function call below automatically
             // discards an initial batch of values.  This is called RC4-drop[256].
             // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        })(width);
+        }(width));
     }
 
 //
@@ -850,7 +844,7 @@
         t.j = f.j;
         t.S = f.S.slice();
         return t;
-    };
+    }
 
 //
 // flatten()
@@ -894,7 +888,7 @@
         } catch (e) {
             var browser = global.navigator,
                 plugins = browser && browser.plugins;
-            return [+new Date, global, plugins, global.screen, tostring(pool)];
+            return [+new Date(), global, plugins, global.screen, tostring(pool)];
         }
     }
 
@@ -1108,7 +1102,7 @@
 function extendPrototype(sources,destination){
     var i, len = sources.length, sourcePrototype;
     for (i = 0;i < len;i += 1) {
-        sourcePrototype = sources[i].prototype
+        sourcePrototype = sources[i].prototype;
         for (var attr in sourcePrototype) {
             if (sourcePrototype.hasOwnProperty(attr)) destination.prototype[attr] = sourcePrototype[attr];
         }
@@ -1118,6 +1112,12 @@
 function getDescriptor(object, prop) {
     return Object.getOwnPropertyDescriptor(object, prop);
 }
+
+function createProxyFunction(prototype) {
+	function ProxyFunction(){}
+	ProxyFunction.prototype = prototype;
+	return ProxyFunction;
+}
 function bezFunction(){
 
     var easingFunctions = [];
@@ -1240,7 +1240,7 @@
             var bezierData = new BezierData(curveSegments);
             len = pt3.length;
             for (k = 0; k < curveSegments; k += 1) {
-                point = _cv(len);
+                point = createSizedArray(len);
                 perc = k / (curveSegments - 1);
                 ptDistance = 0;
                 for (i = 0; i < len; i += 1){
@@ -1305,7 +1305,7 @@
 
     }
 
-    var bezier_segment_points = _cs('float32', 8);
+    var bezier_segment_points = createTypedArray('float32', 8);
 
     function getNewSegment(pt1,pt2,pt3,pt4,startPerc,endPerc, bezierData){
 
@@ -1368,9 +1368,9 @@
 var bez = bezFunction();
 function dataFunctionManager(){
 
-    //var tCanvasHelper = _cu('canvas').getContext('2d');
+    //var tCanvasHelper = createTag('canvas').getContext('2d');
 
-    function _db(layers, comps, _cr){
+    function completeLayers(layers, comps, fontManager){
         var layerData;
         var animArray, lastFrame;
         var i, len = layers.length;
@@ -1407,11 +1407,11 @@
             }
             if(layerData.ty===0){
                 layerData.layers = findCompLayers(layerData.refId, comps);
-                _db(layerData.layers,comps, _cr);
+                completeLayers(layerData.layers,comps, fontManager);
             }else if(layerData.ty === 4){
                 completeShapes(layerData.shapes);
             }else if(layerData.ty == 5){
-                completeText(layerData, _cr);
+                completeText(layerData, fontManager);
             }
         }
     }
@@ -1509,7 +1509,7 @@
                         t:0
                     }
                 ]
-            }
+            };
         }
 
         function iterateLayers(layers){
@@ -1534,8 +1534,8 @@
                     }
                 }
             }
-        }
-    }())
+        };
+    }());
 
     var checkChars = (function() {
         var minimumVersion = [4,7,99];
@@ -1558,9 +1558,8 @@
                     }
                 }
             }
-        }
-
-    }())
+        };
+    }());
 
     var checkColors = (function(){
         var minimumVersion = [4,1,9];
@@ -1620,7 +1619,7 @@
                     }
                 }
             }
-        }
+        };
     }());
 
     var checkShapes = (function(){
@@ -1698,7 +1697,7 @@
                     }
                 }
             }
-        }
+        };
     }());
 
     /*function blitPaths(path){
@@ -1756,7 +1755,7 @@
         }
     }
 
-    function blitText(data, _cr){
+    function blitText(data, fontManager){
 
     }
 
@@ -1795,7 +1794,7 @@
         }
     }
 
-    function blitLayers(layers,comps, _cr){
+    function blitLayers(layers,comps, fontManager){
         var layerData;
         var animArray, lastFrame;
         var i, len = layers.length;
@@ -1835,11 +1834,11 @@
             if(layerData.ty===0){
                 layerData.w = Math.round(layerData.w/blitter);
                 layerData.h = Math.round(layerData.h/blitter);
-                blitLayers(layerData.layers,comps, _cr);
+                blitLayers(layerData.layers,comps, fontManager);
             }else if(layerData.ty === 4){
                 blitShapes(layerData.shapes);
             }else if(layerData.ty == 5){
-                blitText(layerData, _cr);
+                blitText(layerData, fontManager);
             }else if(layerData.ty == 1){
                 layerData.sh /= blitter;
                 layerData.sw /= blitter;
@@ -1848,11 +1847,11 @@
         }
     }
 
-    function blitAnimation(animationData,comps, _cr){
-        blitLayers(animationData.layers,comps, _cr);
+    function blitAnimation(animationData,comps, fontManager){
+        blitLayers(animationData.layers,comps, fontManager);
     }*/
 
-    function completeData(animationData, _cr){
+    function completeData(animationData, fontManager){
         if(animationData.__complete){
             return;
         }
@@ -1860,12 +1859,12 @@
         checkText(animationData);
         checkChars(animationData);
         checkShapes(animationData);
-        _db(animationData.layers, animationData.assets, _cr);
+        completeLayers(animationData.layers, animationData.assets, fontManager);
         animationData.__complete = true;
-        //blitAnimation(animationData, animationData.assets, _cr);
+        //blitAnimation(animationData, animationData.assets, fontManager);
     }
 
-    function completeText(data, _cr){
+    function completeText(data, fontManager){
         if(data.t.a.length === 0 && !('m' in data.t.p)){
             data.singleShape = true;
         }
@@ -1885,12 +1884,12 @@
         w: 0,
         size:0,
         shapes:[]
-    }
+    };
 
     function setUpNode(font, family){
-        var parentNode = _cu('span');
+        var parentNode = createTag('span');
         parentNode.style.fontFamily    = family;
-        var node = _cu('span');
+        var node = createTag('span');
         // Characters that vary significantly among different fonts
         node.innerHTML = 'giItT1WQy@!-/#';
         // Visible - so we can measure it - but not on the screen
@@ -1964,10 +1963,10 @@
             setTimeout(function(){this.loaded = true;}.bind(this),0);
 
         }
-    };
+    }
 
     function createHelper(def, fontData){
-        var tHelper = _ct('text');
+        var tHelper = createNS('text');
         tHelper.style.fontSize = '100px';
         tHelper.style.fontFamily = fontData.fFamily;
         tHelper.textContent = '1';
@@ -1978,7 +1977,7 @@
             tHelper.style.fontFamily = fontData.fFamily;
         }
         def.appendChild(tHelper);
-        var tCanvasHelper = _cu('canvas').getContext('2d');
+        var tCanvasHelper = createTag('canvas').getContext('2d');
         tCanvasHelper.font = '100px '+ fontData.fFamily;
         return tCanvasHelper;
     }
@@ -2003,20 +2002,20 @@
             if(!fontArr[i].fPath) {
                 fontArr[i].loaded = true;
             }else if(fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3){
-                var s = _cu('style');
+                var s = createTag('style');
                 s.type = "text/css";
                 s.innerHTML = "@font-face {" + "font-family: "+fontArr[i].fFamily+"; font-style: normal; src: url('"+fontArr[i].fPath+"');}";
                 defs.appendChild(s);
             } else if(fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1){
                 //<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
-                var l = _cu('link');
+                var l = createTag('link');
                 l.type = "text/css";
                 l.rel = "stylesheet";
                 l.href = fontArr[i].fPath;
                 defs.appendChild(l);
             } else if(fontArr[i].fOrigin === 't' || fontArr[i].origin === 2){
                 //<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
-                var sc = _cu('script');
+                var sc = createTag('script');
                 sc.setAttribute('src',fontArr[i].fPath);
                 defs.appendChild(sc);
             }
@@ -2100,7 +2099,7 @@
     return Font;
 
 }());
-var _ai = (function(){
+var PropertyFactory = (function(){
 
     var initFrame = initialDefaultFrame;
 
@@ -2108,16 +2107,16 @@
         var offsetTime = this.offsetTime;
         var newValue;
         if(this.propType === 'multidimensional') {
-            newValue = _cs('float32', previousValue.length);
+            newValue = createTypedArray('float32', previousValue.length);
         }
         var iterationIndex = caching.lastIndex;
         var i = iterationIndex;
-        var len = this._df.length- 1,flag = true;
+        var len = this.keyframes.length- 1,flag = true;
         var keyData, nextKeyData;
 
         while(flag){
-            keyData = this._df[i];
-            nextKeyData = this._df[i+1];
+            keyData = this.keyframes[i];
+            nextKeyData = this.keyframes[i+1];
             if(i == len-1 && frameNum >= nextKeyData.t - offsetTime){
                 if(keyData.h){
                     keyData = nextKeyData;
@@ -2260,7 +2259,7 @@
             this.pv[i] = renderResult[i];
             this.v[i] = this.mult ? this.pv[i] * this.mult : this.pv[i];
             if(this.lastPValue[i] !== this.pv[i]) {
-                this.mdf = true;
+                this._mdf = true;
                 this.lastPValue[i] = this.pv[i];
             }
             i += 1;
@@ -2271,36 +2270,38 @@
         this.pv = renderResult;
         this.v = this.mult ? this.pv*this.mult : this.pv;
         if(this.lastPValue != this.pv){
-            this.mdf = true;
+            this._mdf = true;
             this.lastPValue = this.pv;
         }
     }
 
     function getValueAtCurrentTime(){
-        if(this.elem._x.frameId === this.frameId){
+        if(this.elem.globalData.frameId === this.frameId){
             return;
         }
-        this.mdf = false;
+        this._mdf = false;
         var frameNum = this.comp.renderedFrame - this.offsetTime;
-        var initTime = this._df[0].t - this.offsetTime;
-        var endTime = this._df[this._df.length- 1].t-this.offsetTime;
+        var initTime = this.keyframes[0].t - this.offsetTime;
+        var endTime = this.keyframes[this.keyframes.length- 1].t-this.offsetTime;
         if(!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))){
             this._caching.lastIndex = this._caching.lastFrame < frameNum ? this._caching.lastIndex : 0;
             var renderResult = this.interpolateValue(frameNum, this.pv, this._caching);
             this.calculateValueAtCurrentTime(renderResult);
         }
         this._caching.lastFrame = frameNum;
-        this.frameId = this.elem._x.frameId;
+        this.frameId = this.elem.globalData.frameId;
     }
 
-    function getNoValue(){}
+    function getNoValue(){
+        this._mdf = false;
+    }
 
     function ValueProperty(elem,data, mult){
         this.propType = 'unidimensional';
         this.mult = mult;
         this.v = mult ? data.k * mult : data.k;
         this.pv = data.k;
-        this.mdf = false;
+        this._mdf = false;
         this.comp = elem.comp;
         this.k = false;
         this.kf = false;
@@ -2308,44 +2309,44 @@
         this.getValue = getNoValue;
     }
 
-    function MultiDimensionalProperty(elem,data, mult){
+    function MultiDimensionalProperty(elem, data, mult) {
         this.propType = 'multidimensional';
         this.mult = mult;
         this.data = data;
-        this.mdf = false;
+        this._mdf = false;
         this.comp = elem.comp;
         this.k = false;
         this.kf = false;
         this.frameId = -1;
-        this.v = _cs('float32', data.k.length);
-        this.pv = _cs('float32', data.k.length);
-        this.lastValue = _cs('float32', data.k.length);
-        var arr = _cs('float32', data.k.length);
-        this.vel = _cs('float32', data.k.length);
         var i, len = data.k.length;
-        for(i = 0;i<len;i+=1){
+        this.v = createTypedArray('float32', len);
+        this.pv = createTypedArray('float32', len);
+        this.lastValue = createTypedArray('float32', len);
+        var arr = createTypedArray('float32', len);
+        this.vel = createTypedArray('float32', len);
+        for (i = 0; i < len; i += 1) {
             this.v[i] = mult ? data.k[i] * mult : data.k[i];
             this.pv[i] = data.k[i];
         }
         this.getValue = getNoValue;
     }
 
-    function KeyframedValueProperty(elem, data, mult){
+    function KeyframedValueProperty(elem, data, mult) {
         this.propType = 'unidimensional';
-        this._df = data.k;
+        this.keyframes = data.k;
         this.offsetTime = elem.data.st;
         this.lastValue = initFrame;
         this.lastPValue = initFrame;
         this.frameId = -1;
-        this._caching={lastFrame:initFrame,lastIndex:0,value:0};
+        this._caching = {lastFrame: initFrame, lastIndex: 0, value: 0};
         this.k = true;
         this.kf = true;
         this.data = data;
         this.mult = mult;
         this.elem = elem;
-        this._ch = false;
+        this._isFirstFrame = false;
         this.comp = elem.comp;
-        this.v = mult ? data.k[0].s[0]*mult : data.k[0].s[0];
+        this.v = mult ? data.k[0].s[0] * mult : data.k[0].s[0];
         this.pv = data.k[0].s[0];
         this.getValue = getValueAtCurrentTime;
         this.calculateValueAtCurrentTime = calculateUnidimenstionalValueAtCurrentTime;
@@ -2356,8 +2357,8 @@
         this.propType = 'multidimensional';
         var i, len = data.k.length;
         var s, e,to,ti;
-        for(i=0;i<len-1;i+=1){
-            if(data.k[i].to && data.k[i].s && data.k[i].e){
+        for (i = 0; i < len - 1; i += 1) {
+            if (data.k[i].to && data.k[i].s && data.k[i].e) {
                 s = data.k[i].s;
                 e = data.k[i].e;
                 to = data.k[i].to;
@@ -2374,11 +2375,11 @@
                 }
             }
         }
-        this._df = data.k;
+        this.keyframes = data.k;
         this.offsetTime = elem.data.st;
         this.k = true;
         this.kf = true;
-        this._ch = true;
+        this._isFirstFrame = true;
         this.mult = mult;
         this.elem = elem;
         this.comp = elem.comp;
@@ -2387,14 +2388,14 @@
         this.interpolateValue = interpolateValue;
         this.frameId = -1;
         var arrLen = data.k[0].s.length;
-        this.v = _cs('float32', arrLen);
-        this.pv = _cs('float32', arrLen);
-        this.lastValue = _cs('float32', arrLen);
-        this.lastPValue = _cs('float32', arrLen);
-        this._caching={lastFrame:initFrame,lastIndex:0,value:_cs('float32', arrLen)};
+        this.v = createTypedArray('float32', arrLen);
+        this.pv = createTypedArray('float32', arrLen);
+        this.lastValue = createTypedArray('float32', arrLen);
+        this.lastPValue = createTypedArray('float32', arrLen);
+        this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray('float32', arrLen)};
     }
 
-    function _bo(elem,data,type, mult, arr) {
+    function getProp(elem,data,type, mult, arr) {
         var p;
         if(data.a === 0){
             if(type === 0) {
@@ -2429,18 +2430,18 @@
     }
 
     var ob = {
-        _bo: _bo
+        getProp: getProp
     };
     return ob;
 }());
-var _ag = (function() {
+var TransformPropertyFactory = (function() {
 
     function applyToMatrix(mat) {
-        var i, len = this._co.length;
+        var i, len = this.dynamicProperties.length;
         for(i = 0; i < len; i += 1) {
-            this._co[i].getValue();
-            if (this._co[i].mdf) {
-                this.mdf = true;
+            this.dynamicProperties[i].getValue();
+            if (this.dynamicProperties[i]._mdf) {
+                this._mdf = true;
             }
         }
         if (this.a) {
@@ -2464,22 +2465,22 @@
             mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
         }
     }
-    function processKeys(_ch){
-        if (this.elem._x.frameId === this.frameId) {
+    function processKeys(forceRender){
+        if (this.elem.globalData.frameId === this.frameId) {
             return;
         }
 
-        this.mdf = _ch;
-        var i, len = this._co.length;
+        this._mdf = false;
+        var i, len = this.dynamicProperties.length;
 
         for(i = 0; i < len; i += 1) {
-            this._co[i].getValue();
-            if (this._co[i].mdf) {
-                this.mdf = true;
+            this.dynamicProperties[i].getValue();
+            if (this.dynamicProperties[i]._mdf) {
+                this._mdf = true;
             }
         }
 
-        if (this.mdf) {
+        if (this._mdf || forceRender) {
             this.v.reset();
             if (this.a) {
                 this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
@@ -2495,17 +2496,17 @@
             } else {
                 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]);
             }
-            if (this.autoOriented && this.p._df && this.p._dg) {
+            if (this.autoOriented && this.p.keyframes && this.p.getValueAtTime) {
                 var v1,v2;
-                if (this.p._caching.lastFrame+this.p.offsetTime <= this.p._df[0].t) {
-                    v1 = this.p._dg((this.p._df[0].t + 0.01) / this.elem._x.frameRate,0);
-                    v2 = this.p._dg(this.p._df[0].t / this.elem._x.frameRate, 0);
-                } else if(this.p._caching.lastFrame+this.p.offsetTime >= this.p._df[this.p._df.length - 1].t) {
-                    v1 = this.p._dg((this.p._df[this.p._df.length - 1].t / this.elem._x.frameRate), 0);
-                    v2 = this.p._dg((this.p._df[this.p._df.length - 1].t - 0.01) / this.elem._x.frameRate, 0);
+                if (this.p._caching.lastFrame+this.p.offsetTime <= this.p.keyframes[0].t) {
+                    v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / this.elem.globalData.frameRate,0);
+                    v2 = this.p.getValueAtTime(this.p.keyframes[0].t / this.elem.globalData.frameRate, 0);
+                } else if(this.p._caching.lastFrame+this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+                    v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / this.elem.globalData.frameRate), 0);
+                    v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.01) / this.elem.globalData.frameRate, 0);
                 } else {
                     v1 = this.p.pv;
-                    v2 = this.p._dg((this.p._caching.lastFrame+this.p.offsetTime - 0.01) / this.elem._x.frameRate, this.p.offsetTime);
+                    v2 = this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime - 0.01) / this.elem.globalData.frameRate, this.p.offsetTime);
                 }
                 this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
             }
@@ -2519,7 +2520,7 @@
                 this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2]);
             }
         }
-        this.frameId = this.elem._x.frameId;
+        this.frameId = this.elem.globalData.frameId;
     }
 
     function setInverted(){
@@ -2547,89 +2548,89 @@
 
     function autoOrient(){
         //
-        //var prevP = this._dg();
+        //var prevP = this.getValueAtTime();
     }
 
-    function _bk(elem,data,arr){
+    function TransformProperty(elem,data,arr){
         this.elem = elem;
         this.frameId = -1;
         this.propType = 'transform';
-        this._co = [];
-        this.mdf = false;
+        this.dynamicProperties = [];
+        this._mdf = false;
         this.data = data;
         this.v = new Matrix();
         if(data.p.s){
-            this.px = _ai._bo(elem,data.p.x,0,0,this._co);
-            this.py = _ai._bo(elem,data.p.y,0,0,this._co);
+            this.px = PropertyFactory.getProp(elem,data.p.x,0,0,this.dynamicProperties);
+            this.py = PropertyFactory.getProp(elem,data.p.y,0,0,this.dynamicProperties);
             if(data.p.z){
-                this.pz = _ai._bo(elem,data.p.z,0,0,this._co);
+                this.pz = PropertyFactory.getProp(elem,data.p.z,0,0,this.dynamicProperties);
             }
         }else{
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
         }
         if(data.r) {
-            this.r = _ai._bo(elem, data.r, 0, degToRads, this._co);
+            this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this.dynamicProperties);
         } else if(data.rx) {
-            this.rx = _ai._bo(elem, data.rx, 0, degToRads, this._co);
-            this.ry = _ai._bo(elem, data.ry, 0, degToRads, this._co);
-            this.rz = _ai._bo(elem, data.rz, 0, degToRads, this._co);
+            this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this.dynamicProperties);
+            this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this.dynamicProperties);
+            this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this.dynamicProperties);
             if(data.or.k[0].ti) {
                 var i, len = data.or.k.length;
                 for(i=0;i<len;i+=1) {
                     data.or.k[i].to = data.or.k[i].ti = null;
                 }
             }
-            this.or = _ai._bo(elem, data.or, 1, degToRads, this._co);
+            this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this.dynamicProperties);
             //sh Indicates it needs to be capped between -180 and 180
             this.or.sh = true;
         }
         if(data.sk){
-            this.sk = _ai._bo(elem, data.sk, 0, degToRads, this._co);
-            this.sa = _ai._bo(elem, data.sa, 0, degToRads, this._co);
+            this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this.dynamicProperties);
+            this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this.dynamicProperties);
         }
         if(data.a) {
-            this.a = _ai._bo(elem,data.a,1,0,this._co);
+            this.a = PropertyFactory.getProp(elem,data.a,1,0,this.dynamicProperties);
         }
         if(data.s) {
-            this.s = _ai._bo(elem,data.s,1,0.01,this._co);
+            this.s = PropertyFactory.getProp(elem,data.s,1,0.01,this.dynamicProperties);
         }
-        // Opacity is not part of the transform properties, that's why it won't use this._co. That way transforms won't get updated if opacity changes.
+        // 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.
         if(data.o){
-            this.o = _ai._bo(elem,data.o,0,0.01,arr);
+            this.o = PropertyFactory.getProp(elem,data.o,0,0.01,arr);
         } else {
-            this.o = {mdf:false,v:1};
+            this.o = {_mdf:false,v:1};
         }
-        if(this._co.length){
+        if(this.dynamicProperties.length){
             arr.push(this);
         }else{
             this.getValue(true);
         }
     }
 
-    _bk.prototype.applyToMatrix = applyToMatrix;
-    _bk.prototype.getValue = processKeys;
-    _bk.prototype.setInverted = setInverted;
-    _bk.prototype.autoOrient = autoOrient;
+    TransformProperty.prototype.applyToMatrix = applyToMatrix;
+    TransformProperty.prototype.getValue = processKeys;
+    TransformProperty.prototype.setInverted = setInverted;
+    TransformProperty.prototype.autoOrient = autoOrient;
 
-    function _bj(elem,data,arr){
-        return new _bk(elem,data,arr)
+    function getTransformProperty(elem,data,arr){
+        return new TransformProperty(elem,data,arr);
     }
 
     return {
-        _bj: _bj
+        getTransformProperty: getTransformProperty
     };
 
 }());
-function _av(){
+function ShapePath(){
 	this.c = false;
 	this._length = 0;
 	this._maxLength = 8;
-	this.v = _cv(this._maxLength);
-	this.o = _cv(this._maxLength);
-	this.i = _cv(this._maxLength);
-};
+	this.v = createSizedArray(this._maxLength);
+	this.o = createSizedArray(this._maxLength);
+	this.i = createSizedArray(this._maxLength);
+}
 
-_av.prototype.setPathData = function(closed, len) {
+ShapePath.prototype.setPathData = function(closed, len) {
 	this.c = closed;
 	this.setLength(len);
 	var i = 0;
@@ -2641,21 +2642,21 @@
 	}
 };
 
-_av.prototype.setLength = function(len) {
+ShapePath.prototype.setLength = function(len) {
 	while(this._maxLength < len) {
 		this.doubleArrayLength();
 	}
 	this._length = len;
-}
+};
 
-_av.prototype.doubleArrayLength = function() {
-	this.v = this.v.concat(_cv(this._maxLength))
-	this.i = this.i.concat(_cv(this._maxLength))
-	this.o = this.o.concat(_cv(this._maxLength))
+ShapePath.prototype.doubleArrayLength = function() {
+	this.v = this.v.concat(createSizedArray(this._maxLength));
+	this.i = this.i.concat(createSizedArray(this._maxLength));
+	this.o = this.o.concat(createSizedArray(this._maxLength));
 	this._maxLength *= 2;
 };
 
-_av.prototype._ax = function(x, y, type, pos, replace) {
+ShapePath.prototype.setXYAt = function(x, y, type, pos, replace) {
 	var arr;
 	this._length = Math.max(this._length, pos + 1);
 	if(this._length >= this._maxLength) {
@@ -2679,54 +2680,54 @@
 	arr[pos][1] = y;
 };
 
-_av.prototype._aw = function(vX,vY,oX,oY,iX,iY,pos, replace) {
-	this._ax(vX,vY,'v',pos, replace);
-	this._ax(oX,oY,'o',pos, replace);
-	this._ax(iX,iY,'i',pos, replace);
+ShapePath.prototype.setTripleAt = function(vX,vY,oX,oY,iX,iY,pos, replace) {
+	this.setXYAt(vX,vY,'v',pos, replace);
+	this.setXYAt(oX,oY,'o',pos, replace);
+	this.setXYAt(iX,iY,'i',pos, replace);
 };
 
-_av.prototype.reverse = function() {
-	var newPath = new _av();
+ShapePath.prototype.reverse = function() {
+	var newPath = new ShapePath();
 	newPath.setPathData(this.c, this._length);
 	var vertices = this.v, outPoints = this.o, inPoints = this.i;
 	var init = 0;
 	if (this.c) {
-		newPath._aw(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+		newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
         init = 1;
     }
     var cnt = this._length - 1;
     var len = this._length;
 
     for (i = init; i < len; i += 1) {
-    	newPath._aw(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+    	newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
         cnt -= 1;
     }
     return newPath;
 };
-var _ah = (function(){
+var ShapePropertyFactory = (function(){
 
     var initFrame = -999999;
 
     function interpolateShape(frameNum, previousValue, isCurrentRender, caching) {
         var iterationIndex = caching.lastIndex;
-        var keyPropS,keyPropE,isHold;
-        if(frameNum < this._df[0].t-this.offsetTime){
-            keyPropS = this._df[0].s[0];
+        var keyPropS,keyPropE,isHold, j, k, jLen, kLen, perc, vertexValue, hasModified = false;
+        if(frameNum < this.keyframes[0].t-this.offsetTime){
+            keyPropS = this.keyframes[0].s[0];
             isHold = true;
             iterationIndex = 0;
-        }else if(frameNum >= this._df[this._df.length - 1].t-this.offsetTime){
-            if(this._df[this._df.length - 2].h === 1){
-                keyPropS = this._df[this._df.length - 1].s[0];
+        }else if(frameNum >= this.keyframes[this.keyframes.length - 1].t-this.offsetTime){
+            if(this.keyframes[this.keyframes.length - 2].h === 1){
+                keyPropS = this.keyframes[this.keyframes.length - 1].s[0];
             }else{
-                keyPropS = this._df[this._df.length - 2].e[0];
+                keyPropS = this.keyframes[this.keyframes.length - 2].e[0];
             }
             isHold = true;
         }else{
             var i = iterationIndex;
-            var len = this._df.length- 1,flag = true,keyData,nextKeyData, j, jLen, k, kLen;
+            var len = this.keyframes.length- 1,flag = true,keyData,nextKeyData;
             while(flag){
-                keyData = this._df[i];
-                nextKeyData = this._df[i+1];
+                keyData = this.keyframes[i];
+                nextKeyData = this.keyframes[i+1];
                 if((nextKeyData.t - this.offsetTime) > frameNum){
                     break;
                 }
@@ -2738,8 +2739,6 @@
             }
             isHold = keyData.h === 1;
             iterationIndex = i;
-
-            var perc;
             if(!isHold){
                 if(frameNum >= nextKeyData.t-this.offsetTime){
                     perc = 1;
@@ -2761,14 +2760,7 @@
         }
         jLen = previousValue._length;
         kLen = keyPropS.i[0].length;
-        var hasModified = false;
-        var vertexValue;
         caching.lastIndex = iterationIndex;
-        var j, k;
-        var jLen = previousValue._length;
-        var kLen = keyPropS.i[0].length;
-        var hasModified = false;
-        var vertexValue;
 
         for(j=0;j<jLen;j+=1){
             for(k=0;k<kLen;k+=1){
@@ -2803,26 +2795,26 @@
     }
 
     function interpolateShapeCurrentTime(){
-        if(this.elem._x.frameId === this.frameId){
+        if(this.elem.globalData.frameId === this.frameId){
             return;
         }
-        this.mdf = false;
+        this._mdf = false;
         var frameNum = this.comp.renderedFrame - this.offsetTime;
-        var initTime = this._df[0].t - this.offsetTime;
-        var endTime = this._df[this._df.length - 1].t - this.offsetTime;
+        var initTime = this.keyframes[0].t - this.offsetTime;
+        var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
         var lastFrame = this._caching.lastFrame;
         if(!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))){
             ////
             this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
             var hasModified = this.interpolateShape(frameNum, this.v, true, this._caching);
             ////
-            this.mdf = hasModified;
+            this._mdf = hasModified;
             if(hasModified) {
-                this.paths = this._ak;
+                this.paths = this.localShapeCollection;
             }
         }
         this._caching.lastFrame = frameNum;
-        this.frameId = this.elem._x.frameId;
+        this.frameId = this.elem.globalData.frameId;
     }
 
     function getShapeValue(){
@@ -2830,9 +2822,9 @@
     }
 
     function resetShape(){
-        this.paths = this._ak;
+        this.paths = this.localShapeCollection;
         if(!this.k){
-            this.mdf = false;
+            this._mdf = false;
         }
     }
 
@@ -2840,12 +2832,12 @@
         this.propType = 'shape';
         this.comp = elem.comp;
         this.k = false;
-        this.mdf = false;
+        this._mdf = false;
         var pathData = type === 3 ? data.pt.k : data.ks.k;
         this.v = shape_pool.clone(pathData);
         this.pv = shape_pool.clone(this.v);
-        this._ak = shapeCollection_pool._al();
-        this.paths = this._ak;
+        this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+        this.paths = this.localShapeCollection;
         this.paths.addShape(this.v);
         this.reset = resetShape;
     }
@@ -2857,16 +2849,16 @@
         this.comp = elem.comp;
         this.elem = elem;
         this.offsetTime = elem.data.st;
-        this._df = type === 3 ? data.pt.k : data.ks.k;
+        this.keyframes = type === 3 ? data.pt.k : data.ks.k;
         this.k = true;
         this.kf = true;
-        var i, len = this._df[0].s[0].i.length;
-        var jLen = this._df[0].s[0].i[0].length;
+        var i, len = this.keyframes[0].s[0].i.length;
+        var jLen = this.keyframes[0].s[0].i[0].length;
         this.v = shape_pool.newElement();
-        this.v.setPathData(this._df[0].s[0].c, len);
+        this.v.setPathData(this.keyframes[0].s[0].c, len);
         this.pv = shape_pool.clone(this.v);
-        this._ak = shapeCollection_pool._al();
-        this.paths = this._ak;
+        this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+        this.paths = this.localShapeCollection;
         this.paths.addShape(this.v);
         this.lastFrame = initFrame;
         this.reset = resetShape;
@@ -2912,53 +2904,53 @@
         }
 
         function processKeys(frameNum){
-            var i, len = this._co.length;
-            if(this.elem._x.frameId === this.frameId){
+            var i, len = this.dynamicProperties.length;
+            if(this.elem.globalData.frameId === this.frameId){
                 return;
             }
-            this.mdf = false;
-            this.frameId = this.elem._x.frameId;
+            this._mdf = false;
+            this.frameId = this.elem.globalData.frameId;
 
             for(i=0;i<len;i+=1){
-                this._co[i].getValue(frameNum);
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue(frameNum);
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
-            if(this.mdf){
+            if(this._mdf){
                 this.convertEllToPath();
             }
         }
 
         return function EllShapeProperty(elem,data) {
             /*this.v = {
-                v: _cv(4),
-                i: _cv(4),
-                o: _cv(4),
+                v: createSizedArray(4),
+                i: createSizedArray(4),
+                o: createSizedArray(4),
                 c: true
             };*/
             this.v = shape_pool.newElement();
             this.v.setPathData(true, 4);
-            this._ak = shapeCollection_pool._al();
-            this.paths = this._ak;
-            this._ak.addShape(this.v);
+            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+            this.paths = this.localShapeCollection;
+            this.localShapeCollection.addShape(this.v);
             this.d = data.d;
-            this._co = [];
+            this.dynamicProperties = [];
             this.elem = elem;
             this.comp = elem.comp;
             this.frameId = -1;
-            this.mdf = false;
+            this._mdf = false;
             this.getValue = processKeys;
             this.convertEllToPath = convertEllToPath;
             this.reset = resetShape;
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
-            this.s = _ai._bo(elem,data.s,1,0,this._co);
-            if(this._co.length){
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
+            this.s = PropertyFactory.getProp(elem,data.s,1,0,this.dynamicProperties);
+            if(this.dynamicProperties.length){
                 this.k = true;
             }else{
                 this.convertEllToPath();
             }
-        }
+        };
     }());
 
     var StarShapeProperty = (function() {
@@ -2983,7 +2975,7 @@
                 var oy = x === 0 && y === 0 ? 0 : -x/Math.sqrt(x*x + y*y);
                 x +=  + this.p.v[0];
                 y +=  + this.p.v[1];
-                this.v._aw(x,y,x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir,x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir, i, true);
+                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);
                 /*this.v.v[i] = [x,y];
                 this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
                 this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];*/
@@ -3020,7 +3012,7 @@
                 var oy = x === 0 && y === 0 ? 0 : -x/Math.sqrt(x*x + y*y);
                 x +=  + this.p.v[0];
                 y +=  + this.p.v[1];
-                this.v._aw(x,y,x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir,x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir, i, true);
+                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);
 
                 /*this.v.v[i] = [x,y];
                 this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
@@ -3032,20 +3024,20 @@
         }
 
         function processKeys() {
-            if(this.elem._x.frameId === this.frameId){
+            if(this.elem.globalData.frameId === this.frameId){
                 return;
             }
-            this.mdf = false;
-            this.frameId = this.elem._x.frameId;
-            var i, len = this._co.length;
+            this._mdf = false;
+            this.frameId = this.elem.globalData.frameId;
+            var i, len = this.dynamicProperties.length;
 
             for(i=0;i<len;i+=1){
-                this._co[i].getValue();
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue();
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
-            if(this.mdf){
+            if(this._mdf){
                 this.convertToPath();
             }
         }
@@ -3064,49 +3056,49 @@
             this.data = data;
             this.frameId = -1;
             this.d = data.d;
-            this._co = [];
-            this.mdf = false;
+            this.dynamicProperties = [];
+            this._mdf = false;
             this.getValue = processKeys;
             this.reset = resetShape;
             if(data.sy === 1){
-                this.ir = _ai._bo(elem,data.ir,0,0,this._co);
-                this.is = _ai._bo(elem,data.is,0,0.01,this._co);
+                this.ir = PropertyFactory.getProp(elem,data.ir,0,0,this.dynamicProperties);
+                this.is = PropertyFactory.getProp(elem,data.is,0,0.01,this.dynamicProperties);
                 this.convertToPath = convertStarToPath;
             } else {
                 this.convertToPath = convertPolygonToPath;
             }
-            this.pt = _ai._bo(elem,data.pt,0,0,this._co);
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
-            this.r = _ai._bo(elem,data.r,0,degToRads,this._co);
-            this.or = _ai._bo(elem,data.or,0,0,this._co);
-            this.os = _ai._bo(elem,data.os,0,0.01,this._co);
-            this._ak = shapeCollection_pool._al();
-            this._ak.addShape(this.v);
-            this.paths = this._ak;
-            if(this._co.length){
+            this.pt = PropertyFactory.getProp(elem,data.pt,0,0,this.dynamicProperties);
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
+            this.r = PropertyFactory.getProp(elem,data.r,0,degToRads,this.dynamicProperties);
+            this.or = PropertyFactory.getProp(elem,data.or,0,0,this.dynamicProperties);
+            this.os = PropertyFactory.getProp(elem,data.os,0,0.01,this.dynamicProperties);
+            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+            this.localShapeCollection.addShape(this.v);
+            this.paths = this.localShapeCollection;
+            if(this.dynamicProperties.length){
                 this.k = true;
             }else{
                 this.convertToPath();
             }
-        }
+        };
     }());
 
     var RectShapeProperty = (function() {
         function processKeys(frameNum){
-            if(this.elem._x.frameId === this.frameId){
+            if(this.elem.globalData.frameId === this.frameId){
                 return;
             }
-            this.mdf = false;
-            this.frameId = this.elem._x.frameId;
-            var i, len = this._co.length;
+            this._mdf = false;
+            this.frameId = this.elem.globalData.frameId;
+            var i, len = this.dynamicProperties.length;
 
             for(i=0;i<len;i+=1){
-                this._co[i].getValue(frameNum);
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue(frameNum);
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
-            if(this.mdf){
+            if(this._mdf){
                 this.convertRectToPath();
             }
 
@@ -3119,33 +3111,33 @@
             this.v._length = 0;
 
             if(this.d === 2 || this.d === 1) {
-                this.v._aw(p0+v0, p1-v1+round,p0+v0, p1-v1+round,p0+v0,p1-v1+cPoint,0, true);
-                this.v._aw(p0+v0, p1+v1-round,p0+v0, p1+v1-cPoint,p0+v0, p1+v1-round,1, true);
+                this.v.setTripleAt(p0+v0, p1-v1+round,p0+v0, p1-v1+round,p0+v0,p1-v1+cPoint,0, true);
+                this.v.setTripleAt(p0+v0, p1+v1-round,p0+v0, p1+v1-cPoint,p0+v0, p1+v1-round,1, true);
                 if(round!== 0){
-                    this.v._aw(p0+v0-round, p1+v1,p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,2, true);
-                    this.v._aw(p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,p0-v0+round,p1+v1,3, true);
-                    this.v._aw(p0-v0,p1+v1-round,p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,4, true);
-                    this.v._aw(p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,p0-v0,p1-v1+round,5, true);
-                    this.v._aw(p0-v0+round,p1-v1,p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,6, true);
-                    this.v._aw(p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,p0+v0-round,p1-v1,7, true);
+                    this.v.setTripleAt(p0+v0-round, p1+v1,p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,2, true);
+                    this.v.setTripleAt(p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,p0-v0+round,p1+v1,3, true);
+                    this.v.setTripleAt(p0-v0,p1+v1-round,p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,4, true);
+                    this.v.setTripleAt(p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,p0-v0,p1-v1+round,5, true);
+                    this.v.setTripleAt(p0-v0+round,p1-v1,p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,6, true);
+                    this.v.setTripleAt(p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,p0+v0-round,p1-v1,7, true);
                 } else {
-                    this.v._aw(p0-v0,p1+v1,p0-v0+cPoint,p1+v1,p0-v0,p1+v1,2);
-                    this.v._aw(p0-v0,p1-v1,p0-v0,p1-v1+cPoint,p0-v0,p1-v1,3);
+                    this.v.setTripleAt(p0-v0,p1+v1,p0-v0+cPoint,p1+v1,p0-v0,p1+v1,2);
+                    this.v.setTripleAt(p0-v0,p1-v1,p0-v0,p1-v1+cPoint,p0-v0,p1-v1,3);
                 }
             }else{
-                this.v._aw(p0+v0,p1-v1+round,p0+v0,p1-v1+cPoint,p0+v0,p1-v1+round,0, true);
+                this.v.setTripleAt(p0+v0,p1-v1+round,p0+v0,p1-v1+cPoint,p0+v0,p1-v1+round,0, true);
                 if(round!== 0){
-                    this.v._aw(p0+v0-round,p1-v1,p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,1, true);
-                    this.v._aw(p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,p0-v0+round,p1-v1,2, true);
-                    this.v._aw(p0-v0,p1-v1+round,p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,3, true);
-                    this.v._aw(p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,p0-v0,p1+v1-round,4, true);
-                    this.v._aw(p0-v0+round,p1+v1,p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,5, true);
-                    this.v._aw(p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,p0+v0-round,p1+v1,6, true);
-                    this.v._aw(p0+v0,p1+v1-round,p0+v0,p1+v1-round,p0+v0,p1+v1-cPoint,7, true);
+                    this.v.setTripleAt(p0+v0-round,p1-v1,p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,1, true);
+                    this.v.setTripleAt(p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,p0-v0+round,p1-v1,2, true);
+                    this.v.setTripleAt(p0-v0,p1-v1+round,p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,3, true);
+                    this.v.setTripleAt(p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,p0-v0,p1+v1-round,4, true);
+                    this.v.setTripleAt(p0-v0+round,p1+v1,p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,5, true);
+                    this.v.setTripleAt(p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,p0+v0-round,p1+v1,6, true);
+                    this.v.setTripleAt(p0+v0,p1+v1-round,p0+v0,p1+v1-round,p0+v0,p1+v1-cPoint,7, true);
                 } else {
-                    this.v._aw(p0-v0,p1-v1,p0-v0+cPoint,p1-v1,p0-v0,p1-v1,1, true);
-                    this.v._aw(p0-v0,p1+v1,p0-v0,p1+v1-cPoint,p0-v0,p1+v1,2, true);
-                    this.v._aw(p0+v0,p1+v1,p0+v0-cPoint,p1+v1,p0+v0,p1+v1,3, true);
+                    this.v.setTripleAt(p0-v0,p1-v1,p0-v0+cPoint,p1-v1,p0-v0,p1-v1,1, true);
+                    this.v.setTripleAt(p0-v0,p1+v1,p0-v0,p1+v1-cPoint,p0-v0,p1+v1,2, true);
+                    this.v.setTripleAt(p0+v0,p1+v1,p0+v0-cPoint,p1+v1,p0+v0,p1+v1,3, true);
 
                 }
             }
@@ -3154,30 +3146,30 @@
         return function RectShapeProperty(elem,data) {
             this.v = shape_pool.newElement();
             this.v.c = true;
-            this._ak = shapeCollection_pool._al();
-            this._ak.addShape(this.v);
-            this.paths = this._ak;
+            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+            this.localShapeCollection.addShape(this.v);
+            this.paths = this.localShapeCollection;
             this.elem = elem;
             this.comp = elem.comp;
             this.frameId = -1;
             this.d = data.d;
-            this._co = [];
-            this.mdf = false;
+            this.dynamicProperties = [];
+            this._mdf = false;
             this.getValue = processKeys;
             this.convertRectToPath = convertRectToPath;
             this.reset = resetShape;
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
-            this.s = _ai._bo(elem,data.s,1,0,this._co);
-            this.r = _ai._bo(elem,data.r,0,0,this._co);
-            if(this._co.length){
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
+            this.s = PropertyFactory.getProp(elem,data.s,1,0,this.dynamicProperties);
+            this.r = PropertyFactory.getProp(elem,data.r,0,0,this.dynamicProperties);
+            if(this.dynamicProperties.length){
                 this.k = true;
             }else{
                 this.convertRectToPath();
             }
-        }
+        };
     }());
 
-    function _bp(elem,data,type, arr){
+    function getShapeProp(elem,data,type, arr){
         var prop;
         if(type === 3 || type === 4){
             var dataProp = type === 3 ? data.pt : data.ks;
@@ -3209,12 +3201,12 @@
     }
 
     var ob = {};
-    ob._bp = _bp;
+    ob.getShapeProp = getShapeProp;
     ob.getConstructorFunction = getConstructorFunction;
     ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
     return ob;
 }());
-var _as = (function(){
+var ShapeModifiers = (function(){
     var ob = {};
     var modifiers = {};
     ob.registerModifier = registerModifier;
@@ -3226,112 +3218,92 @@
         }
     }
 
-    function getModifier(nm,elem, data, _co){
-        return new modifiers[nm](elem, data, _co);
+    function getModifier(nm,elem, data, dynamicProperties){
+        return new modifiers[nm](elem, data, dynamicProperties);
     }
 
     return ob;
 }());
 
-function _at(){}
-_at.prototype.initModifierProperties = function(){};
-_at.prototype.addShapeToModifier = function(){};
-_at.prototype.addShape = function(data){
+function ShapeModifier(){}
+ShapeModifier.prototype.initModifierProperties = function(){};
+ShapeModifier.prototype.addShapeToModifier = function(){};
+ShapeModifier.prototype.addShape = function(data){
     if(!this.closed){
-        var shapeData = {shape:data.sh, data: data, _ak:shapeCollection_pool._al()};
+        var shapeData = {shape:data.sh, data: data, localShapeCollection:shapeCollection_pool.newShapeCollection()};
         this.shapes.push(shapeData);
         this.addShapeToModifier(shapeData);
     }
-}
-_at.prototype.init = function(elem,data,_co){
-    this._co = [];
+};
+ShapeModifier.prototype.init = function(elem,data,dynamicProperties){
+    this.dynamicProperties = [];
     this.shapes = [];
     this.elem = elem;
     this.initModifierProperties(elem,data);
     this.frameId = initialDefaultFrame;
-    this.mdf = false;
+    this._mdf = false;
     this.closed = false;
     this.k = false;
-    if(this._co.length){
+    if(this.dynamicProperties.length){
         this.k = true;
-        _co.push(this);
+        dynamicProperties.push(this);
     }else{
         this.getValue(true);
     }
-}
-function _an(){
 };
-extendPrototype([_at], _an);
-_an.prototype.processKeys = function(forceRender) {
-    if (this.elem._x.frameId === this.frameId && !forceRender) {
+ShapeModifier.prototype.processKeys = function(){
+    if(this.elem.globalData.frameId === this.frameId){
         return;
     }
-    this.mdf = forceRender;
-    this.frameId = this.elem._x.frameId;
-    var i, len = this._co.length;
+    this._mdf = false;
+    var i, len = this.dynamicProperties.length;
 
-    for (i = 0; i < len; i +=1) {
-        this._co[i].getValue();
-        if (this._co[i].mdf) {
-            this.mdf = true;
+    for(i=0;i<len;i+=1){
+        this.dynamicProperties[i].getValue();
+        if(this.dynamicProperties[i]._mdf){
+            this._mdf = true;
         }
     }
-    if (this.mdf || forceRender) {
-        var o = (this.o.v % 360) / 360;
-        if (o < 0) {
-            o += 1;
-        }
-        var s = this.s.v + o;
-        var e = this.e.v + o;
-        if (s === e) {
-
-        }
-        if (s > e) {
-            var _s = s;
-            s = e;
-            e = _s;
-        }
-        this.sValue = s;
-        this.eValue = e;
-        this.oValue = o;
-    }
+    this.frameId = this.elem.globalData.frameId;
+};
+function TrimModifier(){
 }
-_an.prototype.initModifierProperties = function(elem, data) {
-    this.s = _ai._bo(elem, data.s, 0, 0.01, this._co);
-    this.e = _ai._bo(elem, data.e, 0, 0.01, this._co);
-    this.o = _ai._bo(elem, data.o, 0, 0, this._co);
+extendPrototype([ShapeModifier], TrimModifier);
+TrimModifier.prototype.initModifierProperties = function(elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this.dynamicProperties);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this.dynamicProperties);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this.dynamicProperties);
     this.sValue = 0;
     this.eValue = 0;
-    this.oValue = 0;
     this.getValue = this.processKeys;
     this.m = data.m;
 };
 
-_an.prototype.addShapeToModifier = function(shapeData){
+TrimModifier.prototype.addShapeToModifier = function(shapeData){
     shapeData.pathsData = [];
 };
 
-_an.prototype.calculateShapeEdges = function(s, e, shapeLength, addedLength, totalModifierLength) {
-    var segments = []
+TrimModifier.prototype.calculateShapeEdges = function(s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
     if (e <= 1) {
         segments.push({
             s: s,
             e: e
-        })
+        });
     } else if (s >= 1) {
         segments.push({
             s: s - 1,
             e: e - 1
-        })
+        });
     } else {
         segments.push({
             s: s,
             e: 1
-        })
+        });
         segments.push({
             s: 0,
             e: e - 1
-        })
+        });
     }
     var shapeSegments = [];
     var i, len = segments.length, segmentOb;
@@ -3358,43 +3330,62 @@
         shapeSegments.push([0, 0]);
     }
     return shapeSegments;
-}
+};
 
-_an.prototype.releasePathsData = function(pathsData) {
+TrimModifier.prototype.releasePathsData = function(pathsData) {
     var i, len = pathsData.length;
     for (i = 0; i < len; i += 1) {
         segments_length_pool.release(pathsData[i]);
     }
     pathsData.length = 0;
     return pathsData;
-}
+};
 
-_an.prototype.processShapes = function(_ch) {
+TrimModifier.prototype.processShapes = function(_isFirstFrame) {
+    var s, e;
+    if (this._mdf || _isFirstFrame) {
+        var o = (this.o.v % 360) / 360;
+        if (o < 0) {
+            o += 1;
+        }
+        s = this.s.v + o;
+        e = this.e.v + o;
+        if (s === e) {
+
+        }
+        if (s > e) {
+            var _s = s;
+            s = e;
+            e = _s;
+        }
+        this.sValue = s;
+        this.eValue = e;
+    } else {
+        s = this.sValue;
+        e = this.eValue;
+    }
     var shapePaths;
-    var i, len = this.shapes.length;
-    var j, jLen;
-    var s = this.sValue;
-    var e = this.eValue;
+    var i, len = this.shapes.length, j, jLen;
     var pathsData, pathData, totalShapeLength, totalModifierLength = 0;
 
     if (e === s) {
         for (i = 0; i < len; i += 1) {
-            this.shapes[i]._ak.releaseShapes();
-            this.shapes[i].shape.mdf = true;
-            this.shapes[i].shape.paths = this.shapes[i]._ak;
+            this.shapes[i].localShapeCollection.releaseShapes();
+            this.shapes[i].shape._mdf = true;
+            this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
         }
     } else if (!((e === 1 && s === 0) || (e===0 && s === 1))){
-        var segments = [], shapeData, _ak;
+        var segments = [], shapeData, localShapeCollection;
         for (i = 0; i < len; i += 1) {
             shapeData = this.shapes[i];
             // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-            if (!shapeData.shape.mdf && !this.mdf && !_ch && this.m !== 2) {
-                shapeData.shape.paths = shapeData._ak;
+            if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+                shapeData.shape.paths = shapeData.localShapeCollection;
             } else {
                 shapePaths = shapeData.shape.paths;
                 jLen = shapePaths._length;
                 totalShapeLength = 0;
-                if (!shapeData.shape.mdf && shapeData.pathsData.length) {
+                if (!shapeData.shape._mdf && shapeData.pathsData.length) {
                     totalShapeLength = shapeData.totalShapeLength;
                 } else {
                     pathsData = this.releasePathsData(shapeData.pathsData);
@@ -3408,22 +3399,21 @@
                 }
 
                 totalModifierLength += totalShapeLength;
-                shapeData.shape.mdf = true;
+                shapeData.shape._mdf = true;
             }
         }
-        var shapeS = s, shapeE = e, addedLength = 0;
-        var j, jLen;
+        var shapeS = s, shapeE = e, addedLength = 0, edges;
         for (i = len - 1; i >= 0; i -= 1) {
             shapeData = this.shapes[i];
-            if (shapeData.shape.mdf) {
-                _ak = shapeData._ak;
-                _ak.releaseShapes();
+            if (shapeData.shape._mdf) {
+                localShapeCollection = shapeData.localShapeCollection;
+                localShapeCollection.releaseShapes();
                 //if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
                 if (this.m === 2 && len > 1) {
-                    var edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+                    edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
                     addedLength += shapeData.totalShapeLength;
                 } else {
-                    edges = [[shapeS, shapeE]]
+                    edges = [[shapeS, shapeE]];
                 }
                 jLen = edges.length;
                 for (j = 0; j < jLen; j += 1) {
@@ -3434,77 +3424,74 @@
                         segments.push({
                             s:shapeData.totalShapeLength * shapeS,
                             e:shapeData.totalShapeLength * shapeE
-                        })
+                        });
                     } else if (shapeS >= 1) {
                         segments.push({
                             s:shapeData.totalShapeLength * (shapeS - 1),
                             e:shapeData.totalShapeLength * (shapeE - 1)
-                        })
+                        });
                     } else {
                         segments.push({
                             s:shapeData.totalShapeLength * shapeS,
                             e:shapeData.totalShapeLength
-                        })
+                        });
                         segments.push({
                             s:0,
                             e:shapeData.totalShapeLength * (shapeE - 1)
-                        })
+                        });
                     }
                     var newShapesData = this.addShapes(shapeData,segments[0]);
                     if (segments[0].s !== segments[0].e) {
                         if (segments.length > 1) {
                             if (shapeData.shape.v.c) {
                                 var lastShape = newShapesData.pop();
-                                this.addPaths(newShapesData, _ak);
+                                this.addPaths(newShapesData, localShapeCollection);
                                 newShapesData = this.addShapes(shapeData, segments[1], lastShape);
                             } else {
-                                this.addPaths(newShapesData, _ak);
+                                this.addPaths(newShapesData, localShapeCollection);
                                 newShapesData = this.addShapes(shapeData, segments[1]);
                             }
                         } 
-                        this.addPaths(newShapesData, _ak);
+                        this.addPaths(newShapesData, localShapeCollection);
                     }
                     
                 }
-                shapeData.shape.paths = _ak;
+                shapeData.shape.paths = localShapeCollection;
             }
         }
-    } else if (this.mdf) {
+    } else if (this._mdf) {
         for (i = 0; i < len; i += 1) {
-            this.shapes[i].shape.mdf = true;
+            this.shapes[i].shape._mdf = true;
         }
     }
-    if (!this._co.length) {
-        this.mdf = false;
-    }
-}
+};
 
-_an.prototype.addPaths = function(newPaths, _ak) {
+TrimModifier.prototype.addPaths = function(newPaths, localShapeCollection) {
     var i, len = newPaths.length;
     for (i = 0; i < len; i += 1) {
-        _ak.addShape(newPaths[i])
+        localShapeCollection.addShape(newPaths[i]);
     }
-}
+};
 
-_an.prototype.addSegment = function(pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-    shapePath._ax(pt2[0], pt2[1], 'o', pos);
-    shapePath._ax(pt3[0], pt3[1], 'i', pos + 1);
+TrimModifier.prototype.addSegment = function(pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
     if(newShape){
-        shapePath._ax(pt1[0], pt1[1], 'v', pos);
+        shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
     }
-    shapePath._ax(pt4[0], pt4[1], 'v', pos + 1);
-}
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+};
 
-_an.prototype.addSegmentFromArray = function(points, shapePath, pos, newShape) {
-    shapePath._ax(points[1], points[5], 'o', pos);
-    shapePath._ax(points[2], points[6], 'i', pos + 1);
+TrimModifier.prototype.addSegmentFromArray = function(points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
     if(newShape){
-        shapePath._ax(points[0], points[4], 'v', pos);
+        shapePath.setXYAt(points[0], points[4], 'v', pos);
     }
-    shapePath._ax(points[3], points[7], 'v', pos + 1);
-}
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+};
 
-_an.prototype.addShapes = function(shapeData, shapeSegment, shapePath) {
+TrimModifier.prototype.addShapes = function(shapeData, shapeSegment, shapePath) {
     var pathsData = shapeData.pathsData;
     var shapePaths = shapeData.shape.paths.shapes;
     var i, len = shapeData.shape.paths._length, j, jLen;
@@ -3572,8 +3559,8 @@
             segmentCount += 1;
         }
         if (shapePath._length) {
-            shapePath._ax(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-            shapePath._ax(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1],'o', shapePath._length - 1);
+            shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+            shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1],'o', shapePath._length - 1);
         }
         if (addedLength > shapeSegment.e) {
             break;
@@ -3586,34 +3573,18 @@
         }
     }
     return shapes;
-
-}
-
-
-_as.registerModifier('tm', _an);
-function _au(){};
-extendPrototype([_at],_au);
-_au.prototype.processKeys = function(forceRender){
-    if(this.elem._x.frameId === this.frameId && !forceRender){
-        return;
-    }
-    this.mdf = forceRender ? true : false;
-    this.frameId = this.elem._x.frameId;
-    var i, len = this._co.length;
-
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-        if(this._co[i].mdf){
-            this.mdf = true;
-        }
-    }
-}
-_au.prototype.initModifierProperties = function(elem,data){
-    this.getValue = this.processKeys;
-    this.rd = _ai._bo(elem,data.r,0,null,this._co);
 };
 
-_au.prototype.processPath = function(path, round){
+
+ShapeModifiers.registerModifier('tm', TrimModifier);
+function RoundCornersModifier(){}
+extendPrototype([ShapeModifier],RoundCornersModifier);
+RoundCornersModifier.prototype.initModifierProperties = function(elem,data){
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem,data.r,0,null,this.dynamicProperties);
+};
+
+RoundCornersModifier.prototype.processPath = function(path, round){
     var cloned_path = shape_pool.newElement();
     cloned_path.c = path.c;
     var i, len = path._length;
@@ -3625,7 +3596,7 @@
         currentI = path.i[i];
         if(currentV[0]===currentO[0] && currentV[1]===currentO[1] && currentV[0]===currentI[0] && currentV[1]===currentI[1]){
             if((i===0 || i === len - 1) && !path.c){
-                cloned_path._aw(currentV[0],currentV[1],currentO[0],currentO[1],currentI[0],currentI[1],index);
+                cloned_path.setTripleAt(currentV[0],currentV[1],currentO[0],currentO[1],currentI[0],currentI[1],index);
                 /*cloned_path.v[index] = currentV;
                 cloned_path.o[index] = currentO;
                 cloned_path.i[index] = currentI;*/
@@ -3642,7 +3613,7 @@
                 vY = iY = currentV[1]-(currentV[1]-closerV[1])*newPosPerc;
                 oX = vX-(vX-currentV[0])*roundCorner;
                 oY = vY-(vY-currentV[1])*roundCorner;
-                cloned_path._aw(vX,vY,oX,oY,iX,iY,index);
+                cloned_path.setTripleAt(vX,vY,oX,oY,iX,iY,index);
                 index += 1;
 
                 if(i === len - 1){
@@ -3656,72 +3627,58 @@
                 vY = oY = currentV[1]+(closerV[1]-currentV[1])*newPosPerc;
                 iX = vX-(vX-currentV[0])*roundCorner;
                 iY = vY-(vY-currentV[1])*roundCorner;
-                cloned_path._aw(vX,vY,oX,oY,iX,iY,index);
+                cloned_path.setTripleAt(vX,vY,oX,oY,iX,iY,index);
                 index += 1;
             }
         } else {
-            cloned_path._aw(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);
+            cloned_path.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);
             index += 1;
         }
     }
     return cloned_path;
-}
+};
 
-_au.prototype.processShapes = function(_ch){
+RoundCornersModifier.prototype.processShapes = function(_isFirstFrame){
     var shapePaths;
     var i, len = this.shapes.length;
     var j, jLen;
     var rd = this.rd.v;
 
     if(rd !== 0){
-        var shapeData, newPaths, _ak;
+        var shapeData, newPaths, localShapeCollection;
         for(i=0;i<len;i+=1){
             shapeData = this.shapes[i];
             newPaths = shapeData.shape.paths;
-            _ak = shapeData._ak;
-            if(!(!shapeData.shape.mdf && !this.mdf && !_ch)){
-                _ak.releaseShapes();
-                shapeData.shape.mdf = true;
+            localShapeCollection = shapeData.localShapeCollection;
+            if(!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)){
+                localShapeCollection.releaseShapes();
+                shapeData.shape._mdf = true;
                 shapePaths = shapeData.shape.paths.shapes;
                 jLen = shapeData.shape.paths._length;
                 for(j=0;j<jLen;j+=1){
-                    _ak.addShape(this.processPath(shapePaths[j],rd));
+                    localShapeCollection.addShape(this.processPath(shapePaths[j],rd));
                 }
             }
-            shapeData.shape.paths = shapeData._ak;
+            shapeData.shape.paths = shapeData.localShapeCollection;
         }
 
     }
-    if(!this._co.length){
-        this.mdf = false;
-    }
-}
-
-
-_as.registerModifier('rd',_au);
-function _aj(){};
-_aj.prototype.processKeys = function(forceRender){
-    if(this.elem._x.frameId === this.frameId && !forceRender){
-        return;
-    }
-    this.mdf = forceRender ? true : false;
-    var i, len = this._co.length;
-
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-        if(this._co[i].mdf){
-            this.mdf = true;
-        }
+    if(!this.dynamicProperties.length){
+        this._mdf = false;
     }
 };
 
-_aj.prototype.initModifierProperties = function(elem,data){
+ShapeModifiers.registerModifier('rd',RoundCornersModifier);
+function RepeaterModifier(){}
+extendPrototype([ShapeModifier], RepeaterModifier);
+
+RepeaterModifier.prototype.initModifierProperties = function(elem,data){
     this.getValue = this.processKeys;
-    this.c = _ai._bo(elem,data.c,0,null,this._co);
-    this.o = _ai._bo(elem,data.o,0,null,this._co);
-    this.tr = _ag._bj(elem,data.tr,this._co);
+    this.c = PropertyFactory.getProp(elem,data.c,0,null,this.dynamicProperties);
+    this.o = PropertyFactory.getProp(elem,data.o,0,null,this.dynamicProperties);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem,data.tr,this.dynamicProperties);
     this.data = data;
-    if(!this._co.length){
+    if(!this.dynamicProperties.length){
         this.getValue(true);
     }
     this.pMatrix = new Matrix();
@@ -3731,7 +3688,7 @@
     this.matrix = new Matrix();
 };
 
-_aj.prototype.applyTransforms = function(pMatrix, rMatrix, sMatrix, transform, perc, inv){
+RepeaterModifier.prototype.applyTransforms = function(pMatrix, rMatrix, sMatrix, transform, perc, inv){
     var dir = inv ? -1 : 1;
     var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
     var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
@@ -3742,78 +3699,71 @@
     sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
     sMatrix.scale(inv ? 1/scaleX : scaleX, inv ? 1/scaleY : scaleY);
     sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-}
+};
 
-_aj.prototype.init = function(elem, arr, pos, elemsData, _co) {
+RepeaterModifier.prototype.init = function(elem, arr, pos, elemsData, dynamicProperties) {
     this.elem = elem;
     this.arr = arr;
     this.pos = pos;
     this.elemsData = elemsData;
     this._currentCopies = 0;
-    this._bq = [];
+    this._elements = [];
     this._groups = [];
-    this._co = [];
+    this.dynamicProperties = [];
     this.frameId = -1;
     this.initModifierProperties(elem,arr[pos]);
     var cont = 0;
     while(pos>0){
         pos -= 1;
-        //this._bq.unshift(arr.splice(pos,1)[0]);
-        this._bq.unshift(arr[pos]);
+        //this._elements.unshift(arr.splice(pos,1)[0]);
+        this._elements.unshift(arr[pos]);
         cont += 1;
     }
-    if(this._co.length){
+    if(this.dynamicProperties.length){
         this.k = true;
-        _co.push(this);
+        dynamicProperties.push(this);
     }else{
         this.getValue(true);
     }
-}
+};
 
-_aj.prototype.resetElements = function(_br){
-    var i, len = _br.length;
+RepeaterModifier.prototype.resetElements = function(elements){
+    var i, len = elements.length;
     for(i = 0; i < len; i += 1) {
-        _br[i]._processed = false;
-        if(_br[i].ty === 'gr'){
-            this.resetElements(_br[i].it);
+        elements[i]._processed = false;
+        if(elements[i].ty === 'gr'){
+            this.resetElements(elements[i].it);
         }
     }
-}
+};
 
-_aj.prototype.cloneElements = function(_br){
-    var i, len = _br.length;
-    var newElements = JSON.parse(JSON.stringify(_br));
+RepeaterModifier.prototype.cloneElements = function(elements){
+    var i, len = elements.length;
+    var newElements = JSON.parse(JSON.stringify(elements));
     this.resetElements(newElements);
     return newElements;
-}
+};
 
-_aj.prototype.changeGroupRender = function(_br, renderFlag) {
-    var i, len = _br.length;
+RepeaterModifier.prototype.changeGroupRender = function(elements, renderFlag) {
+    var i, len = elements.length;
     for(i = 0; i < len ; i += 1) {
-        _br[i]._render = renderFlag;
-        if(_br[i].ty === 'gr') {
-            this.changeGroupRender(_br[i].it, renderFlag);
+        elements[i]._render = renderFlag;
+        if(elements[i].ty === 'gr') {
+            this.changeGroupRender(elements[i].it, renderFlag);
         }
     }
-}
+};
 
-_aj.prototype.processShapes = function(_ch){
-
-    if(this.elem._x.frameId === this.frameId){
-        return;
-    }
-    this.frameId = this.elem._x.frameId;
-    if(!this._co.length && !_ch){
-        this.mdf = false;
-    }
-    if(this.mdf){
+RepeaterModifier.prototype.processShapes = function(_isFirstFrame) {
+    var items, itemsTransform, i, dir, cont;
+    if(this._mdf || _isFirstFrame){
         var copies = Math.ceil(this.c.v);
         if(this._groups.length < copies){
             while(this._groups.length < copies){
                 var group = {
-                    it:this.cloneElements(this._bq),
+                    it:this.cloneElements(this._elements),
                     ty:'gr'
-                }
+                };
                 group.it.push({"a":{"a":0,"ix":1,"k":[0,0]},"nm":"Transform","o":{"a":0,"ix":7,"k":100},"p":{"a":0,"ix":2,"k":[0,0]},"r":{"a":0,"ix":6,"k":0},"s":{"a":0,"ix":3,"k":[100,100]},"sa":{"a":0,"ix":5,"k":0},"sk":{"a":0,"ix":4,"k":0},"ty":"tr"});
                 
                 this.arr.splice(0,0,group);
@@ -3822,7 +3772,8 @@
             }
             this.elem.reloadShapes();
         }
-        var i, cont = 0, renderFlag;
+        cont = 0;
+        var renderFlag;
         for(i = 0; i  <= this._groups.length - 1; i += 1){
             renderFlag = cont < copies;
             this._groups[i]._render = renderFlag;
@@ -3831,7 +3782,6 @@
         }
         
         this._currentCopies = copies;
-        this.elem._ch = true;
         ////
 
         var offset = this.o.v;
@@ -3869,9 +3819,15 @@
             }
         }
         i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-        var dir = this.data.m === 1 ? 1 : -1;
+        dir = this.data.m === 1 ? 1 : -1;
         cont = this._currentCopies;
+        var j, jLen;
         while(cont){
+            items = this.elemsData[i].it;
+            itemsTransform = items[items.length - 1].transform.mProps.v.props;
+            jLen = itemsTransform.length;
+            items[items.length - 1].transform.mProps._mdf = true;
+            items[items.length - 1].transform.op._mdf = true;
             if(iteration !== 0){
                 if((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)){
                     this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
@@ -3879,18 +3835,13 @@
                 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]);
                 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]);
                 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]);
-                var items = this.elemsData[i].it;
-                var itemsTransform = items[items.length - 1].transform.mProps.v.props;
-                var j, jLen = itemsTransform.length;
+                
                 for(j=0;j<jLen;j+=1) {
                     itemsTransform[j] = this.matrix.props[j];
                 }
                 this.matrix.reset();
             } else {
                 this.matrix.reset();
-                var items = this.elemsData[i].it;
-                var itemsTransform = items[items.length - 1].transform.mProps.v.props;
-                var j, jLen = itemsTransform.length;
                 for(j=0;j<jLen;j+=1) {
                     itemsTransform[j] = this.matrix.props[j];
                 }
@@ -3899,72 +3850,84 @@
             cont -= 1;
             i += dir;
         }
+    } else {
+        cont = this._currentCopies;
+        i = 0;
+        dir = 1;
+        while(cont){
+            items = this.elemsData[i].it;
+            itemsTransform = items[items.length - 1].transform.mProps.v.props;
+            items[items.length - 1].transform.mProps._mdf = false;
+            items[items.length - 1].transform.op._mdf = false;
+            cont -= 1;
+            i += dir;
+        }
     }
-}
-
-_aj.prototype.addShape = function(){}
-
-_as.registerModifier('rp',_aj);
-function _am(){
-	this._length = 0;
-	this._maxLength = 4;
-	this.shapes = _cv(this._maxLength);
 };
 
-_am.prototype.addShape = function(shapeData){
+RepeaterModifier.prototype.addShape = function(){};
+
+ShapeModifiers.registerModifier('rp',RepeaterModifier);
+function ShapeCollection(){
+	this._length = 0;
+	this._maxLength = 4;
+	this.shapes = createSizedArray(this._maxLength);
+}
+
+ShapeCollection.prototype.addShape = function(shapeData){
 	if(this._length === this._maxLength){
-		this.shapes = this.shapes.concat(_cv(this._maxLength));
+		this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
 		this._maxLength *= 2;
 	}
 	this.shapes[this._length] = shapeData;
 	this._length += 1;
 };
 
-_am.prototype.releaseShapes = function(){
+ShapeCollection.prototype.releaseShapes = function(){
 	var i;
 	for(i = 0; i < this._length; i += 1) {
 		shape_pool.release(this.shapes[i]);
 	}
 	this._length = 0;
 };
-function DashProperty(elem, data, renderer, _co) {
+function DashProperty(elem, data, renderer, dynamicProperties) {
     this.elem = elem;
     this.frameId = -1;
-    this.dataProps = _cv(data.length);
+    this.dataProps = createSizedArray(data.length);
     this.renderer = renderer;
-    this.mdf = false;
+    this._mdf = false;
     this.k = false;
     this.dashStr = '';
-    this.dashArray = _cs('float32',  data.length - 1);
-    this.dashoffset = _cs('float32',  1);
+    this.dashArray = createTypedArray('float32',  data.length - 1);
+    this.dashoffset = createTypedArray('float32',  1);
     var i, len = data.length, prop;
     for(i=0;i<len;i+=1){
-        prop = _ai._bo(elem,data[i].v,0, 0, _co);
+        prop = PropertyFactory.getProp(elem,data[i].v,0, 0, dynamicProperties);
         this.k = prop.k ? true : this.k;
         this.dataProps[i] = {n:data[i].n,p:prop};
     }
     if(this.k){
-        _co.push(this);
+        dynamicProperties.push(this);
     }else{
         this.getValue(true);
     }
 }
 
 DashProperty.prototype.getValue = function(forceRender) {
-    if(this.elem._x.frameId === this.frameId && !forceRender){
+    if(this.elem.globalData.frameId === this.frameId && !forceRender){
         return;
     }
     var i = 0, len = this.dataProps.length;
-    this.mdf = false;
-    this.frameId = this.elem._x.frameId;
+    this._mdf = false;
+    this.frameId = this.elem.globalData.frameId;
     while(i<len){
-        if(this.dataProps[i].p.mdf){
-            this.mdf = !forceRender;
+        if(this.dataProps[i].p._mdf){
+            this._mdf = !forceRender;
             break;
         }
         i+=1;
     }
-    if(this.mdf || forceRender){
+    if(this._mdf || forceRender){
         if(this.renderer === 'svg') {
             this.dashStr = '';
         }
@@ -3980,16 +3943,16 @@
             }
         }
     }
-}
+};
 function GradientProperty(elem,data,arr){
-    this.prop = _ai._bo(elem,data.k,1,null,[]);
+    this.prop = PropertyFactory.getProp(elem,data.k,1,null,[]);
     this.data = data;
     this.k = this.prop.k;
-    this.c = _cs('uint8c', data.p*4);
+    this.c = createTypedArray('uint8c', data.p*4);
     var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p*4) : data.k.k.length - data.p*4;
-    this.o = _cs('float32', cLength);
-    this.cmdf = false;
-    this.omdf = false;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
     this._collapsable = this.checkCollapsable();
     this._hasOpacity = cLength;
     if(this.prop.k){
@@ -4008,7 +3971,7 @@
         i += 1;
     }
     return true;
-}
+};
 
 GradientProperty.prototype.checkCollapsable = function() {
     if (this.o.length/2 !== this.c.length/4) {
@@ -4026,13 +3989,13 @@
         return false;
     }
     return true;
-}
+};
 
 GradientProperty.prototype.getValue = function(forceRender){
     this.prop.getValue();
-    this.cmdf = false;
-    this.omdf = false;
-    if(this.prop.mdf || forceRender){
+    this._cmdf = false;
+    this._omdf = false;
+    if(this.prop._mdf || forceRender){
         var i, len = this.data.p*4;
         var mult, val;
         for(i=0;i<len;i+=1){
@@ -4040,7 +4003,7 @@
             val = Math.round(this.prop.v[i]*mult);
             if(this.c[i] !== val){
                 this.c[i] = val;
-                this.cmdf = !forceRender;
+                this._cmdf = !forceRender;
             }
         }
         if(this.o.length){
@@ -4050,12 +4013,12 @@
                 val = i%2 === 0 ?  Math.round(this.prop.v[i]*100):this.prop.v[i];
                 if(this.o[i-this.data.p*4] !== val){
                     this.o[i-this.data.p*4] = val;
-                    this.omdf = !forceRender;
+                    this._omdf = !forceRender;
                 }
             }
         }
     }
-}
+};
 var ImagePreloader = (function(){
 
     function imageLoaded(){
@@ -4084,7 +4047,7 @@
     }
 
     function loadImage(path){
-        var img = _cu('img');
+        var img = createTag('img');
         img.addEventListener('load', imageLoaded.bind(this), false);
         img.addEventListener('error', imageLoaded.bind(this), false);
         img.src = path;
@@ -4124,12 +4087,12 @@
         this.totalImages = 0;
         this.loadedAssets = 0;
         this.imagesLoadedCb = null;
-    }
+    };
 }());
 var featureSupport = (function(){
 	var ob = {
 		maskType: true
-	}
+	};
 	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)) {
 	   ob.maskType = false;
 	}
@@ -4141,7 +4104,7 @@
 	ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
 
 	function createFilter(filId){
-        	var fil = _ct('filter');
+        	var fil = createNS('filter');
         	fil.setAttribute('id',filId);
                 fil.setAttribute('filterUnits','objectBoundingBox');
                 fil.setAttribute('x','0%');
@@ -4152,7 +4115,7 @@
 	}
 
 	function createAlphaToLuminanceFilter(){
-                var feColorMatrix = _ct('feColorMatrix');
+                var feColorMatrix = createNS('feColorMatrix');
                 feColorMatrix.setAttribute('type','matrix');
                 feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
                 feColorMatrix.setAttribute('values','0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
@@ -4160,37 +4123,37 @@
 	}
 
 	return ob;
-}())
-function _bl(textData, renderType, elem){
-    this.mdf = false;
-    this._ch = true;
+}());
+function TextAnimatorProperty(textData, renderType, elem){
+    this._mdf = false;
+    this._isFirstFrame = true;
 	this._hasMaskedPath = false;
 	this._frameId = -1;
-	this.__co = [];
+	this._dynamicProperties = [];
 	this._textData = textData;
 	this._renderType = renderType;
 	this._elem = elem;
-	this._animatorsData = _cv(this._textData.a.length);
-	this._pathData = {}
+	this._animatorsData = createSizedArray(this._textData.a.length);
+	this._pathData = {};
 	this._moreOptions = {
 		alignment: {}
 	};
-	this._bt = [];
+	this.renderedLetters = [];
     this.lettersChangedFlag = false;
 
 }
 
-_bl.prototype.searchProperties = function(_co){
+TextAnimatorProperty.prototype.searchProperties = function(dynamicProperties){
     var i, len = this._textData.a.length, animatorProps;
-    var _bo = _ai._bo;
+    var getProp = PropertyFactory.getProp;
     for(i=0;i<len;i+=1){
         animatorProps = this._textData.a[i];
-        this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this.__co);
+        this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this._dynamicProperties);
     }
     if(this._textData.p && 'm' in this._textData.p){
         this._pathData = {
-            f: _bo(this._elem,this._textData.p.f,0,0,this.__co),
-            l: _bo(this._elem,this._textData.p.l,0,0,this.__co),
+            f: getProp(this._elem,this._textData.p.f,0,0,this._dynamicProperties),
+            l: getProp(this._elem,this._textData.p.l,0,0,this._dynamicProperties),
             r: this._textData.p.r,
             m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
         };
@@ -4198,43 +4161,43 @@
     } else {
         this._hasMaskedPath = false;
     }
-    this._moreOptions.alignment = _bo(this._elem,this._textData.m.a,1,0,this.__co);
-    if(this.__co.length) {
-    	_co.push(this);
+    this._moreOptions.alignment = getProp(this._elem,this._textData.m.a,1,0,this._dynamicProperties);
+    if(this._dynamicProperties.length) {
+    	dynamicProperties.push(this);
     }
-}
+};
 
-_bl.prototype.getMeasures = function(documentData, lettersChangedFlag){
+TextAnimatorProperty.prototype.getMeasures = function(documentData, lettersChangedFlag){
     this.lettersChangedFlag = lettersChangedFlag;
-    if(!this.mdf && !this._ch && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m.mdf)) {
+    if(!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
         return;
     }
-    this._ch = false;
+    this._isFirstFrame = false;
     var alignment = this._moreOptions.alignment.v;
     var animators = this._animatorsData;
     var textData = this._textData;
     var matrixHelper = this.mHelper;
     var renderType = this._renderType;
-    var _bs = this._bt.length;
+    var renderedLettersCount = this.renderedLetters.length;
     var data = this.data;
     var xPos,yPos;
     var i, len;
-    var letters = documentData.l;
+    var letters = documentData.l, pathInfo, currentLength, currentPoint, segmentLength, flag, pointInd, segmentInd, prevPoint, points, segments, partialLength, totalLength, perc, tanAngle, mask;
     if(this._hasMaskedPath) {
-        var mask = this._pathData.m;
-        if(!this._pathData.n || this._pathData.mdf){
+        mask = this._pathData.m;
+        if(!this._pathData.n || this._pathData._mdf){
             var paths = mask.v;
             if(this._pathData.r){
                 paths = paths.reverse();
             }
             // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-            var pathInfo = {
+            pathInfo = {
                 tLength: 0,
                 segments: []
             };
             len = paths._length - 1;
             var pathData;
-            var totalLength = 0;
+            totalLength = 0;
             for (i = 0; i < len; i += 1) {
                 pathData = {
                     s: paths.v[i],
@@ -4262,11 +4225,14 @@
             }
             this._pathData.pi = pathInfo;
         }
-        var pathInfo = this._pathData.pi;
+        pathInfo = this._pathData.pi;
 
-        var currentLength = this._pathData.f.v, segmentInd = 0, pointInd = 1, currentPoint, prevPoint, points;
-        var segmentLength = 0, flag = true;
-        var segments = pathInfo.segments;
+        currentLength = this._pathData.f.v;
+        segmentInd = 0;
+        pointInd = 1;
+        segmentLength = 0;
+        flag = true;
+        segments = pathInfo.segments;
         if (currentLength < 0 && mask.v.c) {
             if (pathInfo.tLength < Math.abs(currentLength)) {
                 currentLength = -Math.abs(currentLength) % pathInfo.tLength;
@@ -4288,28 +4254,20 @@
         points = segments[segmentInd].bezierData.points;
         prevPoint = points[pointInd - 1];
         currentPoint = points[pointInd];
-        var partialLength = currentPoint.partialLength;
-        var perc, tanAngle;
+        partialLength = currentPoint.partialLength;
     }
 
 
     len = letters.length;
     xPos = 0;
     yPos = 0;
-    var yOff = documentData.s*1.2*.714;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
     var firstLine = true;
     var animatorProps, animatorSelector;
     var j, jLen;
     var letterValue;
 
     jLen = animators.length;
-    //Todo Confirm this is not necessary here. Text Animator Selectors should not be called without a text index. And it is later correctly called.
-    /*if (lettersChangedFlag) {
-        for (j = 0; j < jLen; j += 1) {
-            animatorSelector = animators[j].s;
-            //animatorSelector.getValue(true);
-        }
-    }*/
     var lastLetter;
 
     var mult, ind = -1, offf, xPathPos, yPathPos;
@@ -4538,7 +4496,7 @@
                 if (documentData.strokeColorAnim && animatorProps.sc.propType) {
                     for(k=0;k<3;k+=1){
                         if(mult.length) {
-                            sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult[0]
+                            sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult[0];
                         } else {
                             sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult;
                         }
@@ -4625,7 +4583,7 @@
                 currentLength -= alignment[0]*letters[i].an/200;
                 if(letters[i+1] && ind !== letters[i+1].ind){
                     currentLength += letters[i].an / 2;
-                    currentLength += documentData.tr/1000*documentData.s;
+                    currentLength += documentData.tr/1000*documentData.finalSize;
                 }
             }else{
 
@@ -4646,7 +4604,7 @@
                 matrixHelper.translate(0,-documentData.ls);
                 matrixHelper.translate(offf,0,0);
                 matrixHelper.translate(alignment[0]*letters[i].an/200,alignment[1]*yOff/100,0);
-                xPos += letters[i].l + documentData.tr/1000*documentData.s;
+                xPos += letters[i].l + documentData.tr/1000*documentData.finalSize;
             }
             if(renderType === 'html'){
                 letterM = matrixHelper.toCSS();
@@ -4658,57 +4616,57 @@
             letterO = elemOpacity;
         }
 
-        if(_bs <= i) {
+        if(renderedLettersCount <= i) {
             letterValue = new LetterProps(letterO,letterSw,letterSc,letterFc,letterM,letterP);
-            this._bt.push(letterValue);
-            _bs += 1;
+            this.renderedLetters.push(letterValue);
+            renderedLettersCount += 1;
             this.lettersChangedFlag = true;
         } else {
-            letterValue = this._bt[i];
+            letterValue = this.renderedLetters[i];
             this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
         }
     }
-}
+};
 
-_bl.prototype.getValue = function(){
-	if(this._elem._x.frameId === this._frameId){
+TextAnimatorProperty.prototype.getValue = function(){
+	if(this._elem.globalData.frameId === this._frameId){
         return;
     }
-    this._frameId = this._elem._x.frameId;
-	var i, len = this.__co.length;
-    this.mdf = false;
+    this._frameId = this._elem.globalData.frameId;
+	var i, len = this._dynamicProperties.length;
+    this._mdf = false;
 	for(i = 0; i < len; i += 1) {
-		this.__co[i].getValue();
-        this.mdf = this.__co[i].mdf || this.mdf;
+		this._dynamicProperties[i].getValue();
+        this._mdf = this._dynamicProperties[i]._mdf || this._mdf;
 	}
-}
+};
 
-_bl.prototype.mHelper = new Matrix();
-_bl.prototype.defaultPropsArray = [];
-function TextAnimatorDataProperty(elem, animatorProps, _co) {
+TextAnimatorProperty.prototype.mHelper = new Matrix();
+TextAnimatorProperty.prototype.defaultPropsArray = [];
+function TextAnimatorDataProperty(elem, animatorProps, dynamicProperties) {
 	var defaultData = {propType:false};
-	var _bo = _ai._bo;
-	var _bn = animatorProps.a;
+	var getProp = PropertyFactory.getProp;
+	var textAnimator_animatables = animatorProps.a;
 	this.a = {
-		r: _bn.r ? _bo(elem, _bn.r, 0, degToRads, _co) : defaultData,
-		rx: _bn.rx ? _bo(elem, _bn.rx, 0, degToRads, _co) : defaultData,
-		ry: _bn.ry ? _bo(elem, _bn.ry, 0, degToRads, _co) : defaultData,
-		sk: _bn.sk ? _bo(elem, _bn.sk, 0, degToRads, _co) : defaultData,
-		sa: _bn.sa ? _bo(elem, _bn.sa, 0, degToRads, _co) : defaultData,
-		s: _bn.s ? _bo(elem, _bn.s, 1, 0.01, _co) : defaultData,
-		a: _bn.a ? _bo(elem, _bn.a, 1, 0, _co) : defaultData,
-		o: _bn.o ? _bo(elem, _bn.o, 0, 0.01, _co) : defaultData,
-		p: _bn.p ? _bo(elem,_bn.p, 1, 0, _co) : defaultData,
-		sw: _bn.sw ? _bo(elem, _bn.sw, 0, 0, _co) : defaultData,
-		sc: _bn.sc ? _bo(elem, _bn.sc, 1, 0, _co) : defaultData,
-		fc: _bn.fc ? _bo(elem, _bn.fc, 1, 0, _co) : defaultData,
-		fh: _bn.fh ? _bo(elem, _bn.fh, 0, 0, _co) : defaultData,
-		fs: _bn.fs ? _bo(elem, _bn.fs, 0, 0.01, _co) : defaultData,
-		fb: _bn.fb ? _bo(elem, _bn.fb, 0, 0.01, _co) : defaultData,
-		t: _bn.t ? _bo(elem, _bn.t, 0, 0, _co) : defaultData
-	}
+		r: textAnimator_animatables.r ? getProp(elem, textAnimator_animatables.r, 0, degToRads, dynamicProperties) : defaultData,
+		rx: textAnimator_animatables.rx ? getProp(elem, textAnimator_animatables.rx, 0, degToRads, dynamicProperties) : defaultData,
+		ry: textAnimator_animatables.ry ? getProp(elem, textAnimator_animatables.ry, 0, degToRads, dynamicProperties) : defaultData,
+		sk: textAnimator_animatables.sk ? getProp(elem, textAnimator_animatables.sk, 0, degToRads, dynamicProperties) : defaultData,
+		sa: textAnimator_animatables.sa ? getProp(elem, textAnimator_animatables.sa, 0, degToRads, dynamicProperties) : defaultData,
+		s: textAnimator_animatables.s ? getProp(elem, textAnimator_animatables.s, 1, 0.01, dynamicProperties) : defaultData,
+		a: textAnimator_animatables.a ? getProp(elem, textAnimator_animatables.a, 1, 0, dynamicProperties) : defaultData,
+		o: textAnimator_animatables.o ? getProp(elem, textAnimator_animatables.o, 0, 0.01, dynamicProperties) : defaultData,
+		p: textAnimator_animatables.p ? getProp(elem,textAnimator_animatables.p, 1, 0, dynamicProperties) : defaultData,
+		sw: textAnimator_animatables.sw ? getProp(elem, textAnimator_animatables.sw, 0, 0, dynamicProperties) : defaultData,
+		sc: textAnimator_animatables.sc ? getProp(elem, textAnimator_animatables.sc, 1, 0, dynamicProperties) : defaultData,
+		fc: textAnimator_animatables.fc ? getProp(elem, textAnimator_animatables.fc, 1, 0, dynamicProperties) : defaultData,
+		fh: textAnimator_animatables.fh ? getProp(elem, textAnimator_animatables.fh, 0, 0, dynamicProperties) : defaultData,
+		fs: textAnimator_animatables.fs ? getProp(elem, textAnimator_animatables.fs, 0, 0.01, dynamicProperties) : defaultData,
+		fb: textAnimator_animatables.fb ? getProp(elem, textAnimator_animatables.fb, 0, 0.01, dynamicProperties) : defaultData,
+		t: textAnimator_animatables.t ? getProp(elem, textAnimator_animatables.t, 0, 0, dynamicProperties) : defaultData
+	};
 
-	this.s = TextSelectorProp.getTextSelectorProp(elem,animatorProps.s, _co);
+	this.s = TextSelectorProp.getTextSelectorProp(elem,animatorProps.s, dynamicProperties);
     this.s.t = animatorProps.s.t;
 }
 function LetterProps(o, sw, sc, fc, m, p){
@@ -4718,7 +4676,7 @@
     this.fc = fc;
     this.m = m;
     this.p = p;
-    this.mdf = {
+    this._mdf = {
     	o: true,
     	sw: !!sw,
     	sc: !!sc,
@@ -4729,56 +4687,58 @@
 }
 
 LetterProps.prototype.update = function(o, sw, sc, fc, m, p) {
-	this.mdf.o = false;
-	this.mdf.sw = false;
-	this.mdf.sc = false;
-	this.mdf.fc = false;
-	this.mdf.m = false;
-	this.mdf.p = false;
+	this._mdf.o = false;
+	this._mdf.sw = false;
+	this._mdf.sc = false;
+	this._mdf.fc = false;
+	this._mdf.m = false;
+	this._mdf.p = false;
 	var updated = false;
 
 	if(this.o !== o) {
 		this.o = o;
-		this.mdf.o = true;
+		this._mdf.o = true;
 		updated = true;
 	}
 	if(this.sw !== sw) {
 		this.sw = sw;
-		this.mdf.sw = true;
+		this._mdf.sw = true;
 		updated = true;
 	}
 	if(this.sc !== sc) {
 		this.sc = sc;
-		this.mdf.sc = true;
+		this._mdf.sc = true;
 		updated = true;
 	}
 	if(this.fc !== fc) {
 		this.fc = fc;
-		this.mdf.fc = true;
+		this._mdf.fc = true;
 		updated = true;
 	}
 	if(this.m !== m) {
 		this.m = m;
-		this.mdf.m = true;
+		this._mdf.m = true;
 		updated = true;
 	}
 	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])) {
 		this.p = p;
-		this.mdf.p = true;
+		this._mdf.p = true;
 		updated = true;
 	}
 	return updated;
-}
-function _ar(elem, data, _co){
+};
+function TextProperty(elem, data, dynamicProperties){
 	this._frameId = initialDefaultFrame;
 	this.pv = '';
 	this.v = '';
 	this.kf = false;
-	this._ch = true;
-	this.mdf = true;
+	this._isFirstFrame = true;
+	this._mdf = true;
 	this.data = data;
 	this.elem = elem;
 	this.keysIndex = -1;
+    this.canResize = false;
+    this.minimumFontSize = 1;
 	this.currentData = {
 		ascent: 0,
         boxWidth: [0,0],
@@ -4804,17 +4764,20 @@
         strokeColorAnim: false,
         strokeWidthAnim: false,
         yOffset: 0,
-        __complete: false
+        __complete: false,
+        finalSize:0,
+        finalText:'',
+        finalLineHeight: 0
 
-	}
+	};
 	if(this.searchProperty()) {
-		_co.push(this);
+		dynamicProperties.push(this);
 	} else {
 		this.getValue(true);
 	}
 }
 
-_ar.prototype.setCurrentData = function(data){
+TextProperty.prototype.setCurrentData = function(data){
 		var currentData = this.currentData;
         currentData.ascent = data.ascent;
         currentData.boxWidth = data.boxWidth ? data.boxWidth : currentData.boxWidth;
@@ -4840,18 +4803,21 @@
         currentData.strokeColorAnim = data.strokeColorAnim || currentData.strokeColorAnim;
         currentData.strokeWidthAnim = data.strokeWidthAnim || currentData.strokeWidthAnim;
         currentData.yOffset = data.yOffset;
+        currentData.finalSize = data.finalSize;
+        currentData.finalLineHeight = data.finalLineHeight;
+        currentData.finalText = data.finalText;
         currentData.__complete = false;
-}
+};
 
-_ar.prototype.searchProperty = function() {
+TextProperty.prototype.searchProperty = function() {
 	this.kf = this.data.d.k.length > 1;
 	return this.kf;
-}
+};
 
-_ar.prototype.getValue = function() {
-	this.mdf = false;
-	var frameId = this.elem._x.frameId;
-	if((frameId === this._frameId || !this.kf) && !this._ch) {
+TextProperty.prototype.getValue = function(_forceRender) {
+	this._mdf = false;
+	var frameId = this.elem.globalData.frameId;
+	if((frameId === this._frameId || !this.kf) && !this._isFirstFrame && !_forceRender) {
 		return;
 	}
 	var textKeys = this.data.d.k, textDocumentData;
@@ -4868,16 +4834,17 @@
             this.completeTextData(textDocumentData);
         }
         this.setCurrentData(textDocumentData);
-        this.mdf = this._ch ? false : true;
+        //TODO check this
+        this._mdf = !this._isFirstFrame;
         this.pv = this.v = this.currentData.t;
         this.keysIndex = i;
     }
 	this._frameId = frameId;
-}
+};
 
-_ar.prototype.completeTextData = function(documentData) {
+TextProperty.prototype.completeTextData = function(documentData) {
     documentData.__complete = true;
-    var _cr = this.elem._x._cr;
+    var fontManager = this.elem.globalData.fontManager;
     var data = this.data;
     var letters = [];
     var i, len;
@@ -4887,7 +4854,7 @@
     var lineWidth = 0;
     var maxLineWidth = 0;
     var j, jLen;
-    var fontData = _cr.getFontByName(documentData.f);
+    var fontData = fontManager.getFontByName(documentData.f);
     var charData, cLength = 0;
     var styles = fontData.fStyle.split(' ');
 
@@ -4912,6 +4879,7 @@
             case 'regular':
             case 'normal':
             fWeight = '400';
+            break;
             case 'light':
             case 'thin':
             fWeight = '200';
@@ -4921,40 +4889,64 @@
     documentData.fWeight = fWeight;
     documentData.fStyle = fStyle;
     len = documentData.t.length;
-    var trackingOffset = documentData.tr/1000*documentData.s;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = documentData.t;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr/1000*documentData.finalSize;
     if(documentData.sz){
+        var flag = true;
         var boxWidth = documentData.sz[0];
-        var lastSpaceIndex = -1;
-        for(i=0;i<len;i+=1){
-            newLineFlag = false;
-            if(documentData.t.charAt(i) === ' '){
-                lastSpaceIndex = i;
-            }else if(documentData.t.charCodeAt(i) === 13){
-                lineWidth = 0;
-                newLineFlag = true;
-            }
-            if(_cr.chars){
-                charData = _cr.getCharData(documentData.t.charAt(i), fontData.fStyle, fontData.fFamily);
-                cLength = newLineFlag ? 0 : charData.w*documentData.s/100;
-            }else{
-                //tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-                cLength = _cr.measureText(documentData.t.charAt(i), documentData.f, documentData.s);
-            }
-            if(lineWidth + cLength > boxWidth && documentData.t.charAt(i) !== ' '){
-                if(lastSpaceIndex === -1){
-                    len += 1;
-                } else {
-                    i = lastSpaceIndex;
+        var boxHeight = documentData.sz[1];
+        var currentHeight, finalText;
+        while(flag) {
+            finalText = documentData.t;
+            currentHeight = 0;
+            lineWidth = 0;
+            len = documentData.t.length;
+            trackingOffset = documentData.tr/1000*documentData.finalSize;
+            var lastSpaceIndex = -1;
+            for(i=0;i<len;i+=1){
+                newLineFlag = false;
+                if(finalText.charAt(i) === ' '){
+                    lastSpaceIndex = i;
+                }else if(finalText.charCodeAt(i) === 13){
+                    lineWidth = 0;
+                    newLineFlag = true;
+                    currentHeight += documentData.finalLineHeight || documentData.finalSize*1.2;
                 }
-                documentData.t = documentData.t.substr(0,i) + "\r" + documentData.t.substr(i === lastSpaceIndex ? i + 1 : i);
-                lastSpaceIndex = -1;
-                lineWidth = 0;
-            }else {
-                lineWidth += cLength;
-                lineWidth += trackingOffset;
+                if(fontManager.chars){
+                    charData = fontManager.getCharData(finalText.charAt(i), fontData.fStyle, fontData.fFamily);
+                    cLength = newLineFlag ? 0 : charData.w*documentData.finalSize/100;
+                }else{
+                    //tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+                    cLength = fontManager.measureText(finalText.charAt(i), documentData.f, documentData.finalSize);
+                }
+                if(lineWidth + cLength > boxWidth && finalText.charAt(i) !== ' '){
+                    if(lastSpaceIndex === -1){
+                        len += 1;
+                    } else {
+                        i = lastSpaceIndex;
+                    }
+                    currentHeight += documentData.finalLineHeight || documentData.finalSize*1.2;
+                    finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+                    lastSpaceIndex = -1;
+                    lineWidth = 0;
+                }else {
+                    lineWidth += cLength;
+                    lineWidth += trackingOffset;
+                }
+            }
+            currentHeight += fontData.ascent*documentData.finalSize/100;
+            if(this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+                documentData.finalSize -= 1;
+                documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+            } else {
+                documentData.finalText = finalText;
+                len = documentData.finalText.length;
+                flag = false;
             }
         }
-        len = documentData.t.length;
+        
     }
     lineWidth = - trackingOffset;
     cLength = 0;
@@ -4962,7 +4954,7 @@
     var currentChar;
     for (i = 0;i < len ;i += 1) {
         newLineFlag = false;
-        currentChar = documentData.t.charAt(i);
+        currentChar = documentData.finalText.charAt(i);
         if(currentChar === ' '){
             val = '\u00A0';
         }else if(currentChar.charCodeAt(0) === 13){
@@ -4974,15 +4966,15 @@
             newLineFlag = true;
             currentLine += 1;
         }else{
-            val = documentData.t.charAt(i);
+            val = documentData.finalText.charAt(i);
         }
-        if(_cr.chars){
-            charData = _cr.getCharData(currentChar, fontData.fStyle, _cr.getFontByName(documentData.f).fFamily);
-            cLength = newLineFlag ? 0 : charData.w*documentData.s/100;
+        if(fontManager.chars){
+            charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+            cLength = newLineFlag ? 0 : charData.w*documentData.finalSize/100;
         }else{
-            //var charWidth = _cr.measureText(val, documentData.f, documentData.s);
-            //tCanvasHelper.font = documentData.s + 'px '+ _cr.getFontByName(documentData.f).fFamily;
-            cLength = _cr.measureText(val, documentData.f, documentData.s);
+            //var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+            //tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+            cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
         }
 
         //
@@ -4995,8 +4987,8 @@
         letters.push({l:cLength,an:cLength,add:currentSize,n:newLineFlag, anIndexes:[], val: val, line: currentLine});
         if(anchorGrouping == 2){
             currentSize += cLength;
-            if(val == '' || val == '\u00A0' || i == len - 1){
-                if(val == '' || val == '\u00A0'){
+            if(val === '' || val === '\u00A0' || i === len - 1){
+                if(val === '' || val === '\u00A0'){
                     currentSize -= cLength;
                 }
                 while(currentPos<=i){
@@ -5010,8 +5002,8 @@
             }
         }else if(anchorGrouping == 3){
             currentSize += cLength;
-            if(val == '' || i == len - 1){
-                if(val == ''){
+            if(val === '' || i === len - 1){
+                if(val === ''){
                     currentSize -= cLength;
                 }
                 while(currentPos<=i){
@@ -5069,7 +5061,7 @@
         for(i=0;i<len;i+=1){
             letterData = letters[i];
             letterData.anIndexes[j] = ind;
-            if((based == 1 && letterData.val != '') || (based == 2 && letterData.val != '' && letterData.val != '\u00A0') || (based == 3 && (letterData.n || letterData.val == '\u00A0' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))){
+            if((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== '\u00A0') || (based == 3 && (letterData.n || letterData.val == '\u00A0' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))){
                 if(animatorData.s.rn === 1){
                     indexes.push(ind);
                 }
@@ -5089,33 +5081,48 @@
             }
         }
     }
-    documentData.yOffset = documentData.lh || documentData.s*1.2;
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize*1.2;
     documentData.ls = documentData.ls || 0;
-    documentData.ascent = fontData.ascent*documentData.s/100;
-}
+    documentData.ascent = fontData.ascent*documentData.finalSize/100;
+};
 
-_ar.prototype.updateDocumentData = function(newData, index) {
+TextProperty.prototype.updateDocumentData = function(newData, index) {
 	index = index === undefined ? this.keysIndex : index;
     var dData = this.data.d.k[index].s;
+    for(var s in newData) {
+        dData[s] = newData[s];
+    }
+    this.recalculate(index);
+};
+
+TextProperty.prototype.recalculate = function(index) {
+    var dData = this.data.d.k[index].s;
     dData.__complete = false;
-    dData.t = newData.t;
     this.keysIndex = -1;
-    this._ch = true;
-    this.getValue();
+    this.getValue(true);
 }
 
+TextProperty.prototype.canResizeFont = function(_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+};
+
+TextProperty.prototype.setMinimumFontSize = function(_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+};
 var TextSelectorProp = (function(){
     var max = Math.max;
     var min = Math.min;
     var floor = Math.floor;
     function updateRange(newCharsFlag){
-        this.mdf = newCharsFlag || false;
-        if(this._co.length){
-            var i, len = this._co.length;
+        this._mdf = newCharsFlag || false;
+        if(this.dynamicProperties.length){
+            var i, len = this.dynamicProperties.length;
             for(i=0;i<len;i+=1){
-                this._co[i].getValue();
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue();
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
         }
@@ -5163,7 +5170,7 @@
                 mult = 0;
             }else{
                 mult = max(0,min(0.5/(e-s) + (ind-s)/(e-s),1));
-                if(mult<.5){
+                if(mult<0.5){
                     mult *= 2;
                 }else{
                     mult = 1 - 2*(mult-0.5);
@@ -5209,27 +5216,27 @@
     }
 
     function TextSelectorProp(elem,data, arr){
-        this.mdf = false;
+        this._mdf = false;
         this.k = false;
         this.data = data;
-        this._co = [];
+        this.dynamicProperties = [];
         this.getValue = updateRange;
         this.getMult = getMult;
         this.elem = elem;
         this.comp = elem.comp;
         this.finalS = 0;
         this.finalE = 0;
-        this.s = _ai._bo(elem,data.s || {k:0},0,0,this._co);
+        this.s = PropertyFactory.getProp(elem,data.s || {k:0},0,0,this.dynamicProperties);
         if('e' in data){
-            this.e = _ai._bo(elem,data.e,0,0,this._co);
+            this.e = PropertyFactory.getProp(elem,data.e,0,0,this.dynamicProperties);
         }else{
             this.e = {v:100};
         }
-        this.o = _ai._bo(elem,data.o || {k:0},0,0,this._co);
-        this.xe = _ai._bo(elem,data.xe || {k:0},0,0,this._co);
-        this.ne = _ai._bo(elem,data.ne || {k:0},0,0,this._co);
-        this.a = _ai._bo(elem,data.a,0,0.01,this._co);
-        if(this._co.length){
+        this.o = PropertyFactory.getProp(elem,data.o || {k:0},0,0,this.dynamicProperties);
+        this.xe = PropertyFactory.getProp(elem,data.xe || {k:0},0,0,this.dynamicProperties);
+        this.ne = PropertyFactory.getProp(elem,data.ne || {k:0},0,0,this.dynamicProperties);
+        this.a = PropertyFactory.getProp(elem,data.a,0,0.01,this.dynamicProperties);
+        if(this.dynamicProperties.length){
             arr.push(this);
         }else{
             this.getValue();
@@ -5238,11 +5245,11 @@
 
     function getTextSelectorProp(elem, data,arr) {
         return new TextSelectorProp(elem, data, arr);
-    };
+    }
 
     return {
         getTextSelectorProp: getTextSelectorProp
-    }
+    };
 }());
 
     
@@ -5251,12 +5258,12 @@
 
 		var _length = 0;
 		var _maxLength = initialLength;
-		var pool = _cv(_maxLength);
+		var pool = createSizedArray(_maxLength);
 
 		var ob = {
 			newElement: newElement,
 			release: release
-		}
+		};
 
 		function newElement(){
 			var element;
@@ -5282,36 +5289,35 @@
 		}
 
 		function clone() {
-			console.log(arguments)
 			var clonedElement = newElement();
 			return _clone(clonedElement);
 		}
 
 		return ob;
-	}
+	};
 }());
 
 var pooling = (function(){
 
 	function double(arr){
-		return arr.concat(_cv(arr.length));
+		return arr.concat(createSizedArray(arr.length));
 	}
 
 	return {
 		double: double
-	}
+	};
 }());
 var point_pool = (function(){
 
 	function create() {
-		return _cs('float32', 2);
+		return createTypedArray('float32', 2);
 	}
 	return pool_factory(8, create);
 }());
 var shape_pool = (function(){
 
 	function create() {
-		return new _av();
+		return new ShapePath();
 	}
 
 	function release(shapePath) {
@@ -5336,9 +5342,9 @@
 		var pt;
 		
 		for(i = 0; i < len; i += 1) {
-			cloned._aw(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);
+			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);
 		}
-		return cloned
+		return cloned;
 	}
 
 	var factory = pool_factory(4, create, release);
@@ -5348,21 +5354,21 @@
 }());
 var shapeCollection_pool = (function(){
 	var ob = {
-		_al: _al,
+		newShapeCollection: newShapeCollection,
 		release: release
-	}
+	};
 
 	var _length = 0;
 	var _maxLength = 4;
-	var pool = _cv(_maxLength);
+	var pool = createSizedArray(_maxLength);
 
-	function _al(){
+	function newShapeCollection(){
 		var shapeCollection;
 		if(_length){
 			_length -= 1;
 			shapeCollection = pool[_length];
 		} else {
-			shapeCollection = new _am();
+			shapeCollection = new ShapeCollection();
 		}
 		return shapeCollection;
 	}
@@ -5408,30 +5414,30 @@
 	function create() {
 		return {
             addedLength: 0,
-            percents: _cs('float32', defaultCurveSegments),
-            lengths: _cs('float32', defaultCurveSegments),
+            percents: createTypedArray('float32', defaultCurveSegments),
+            lengths: createTypedArray('float32', defaultCurveSegments),
         };
 	}
 	return pool_factory(8, create);
 }());
-function _l(){}
-_l.prototype.checkLayers = function(num){
+function BaseRenderer(){}
+BaseRenderer.prototype.checkLayers = function(num){
     var i, len = this.layers.length, data;
-    this._db = true;
+    this.completeLayers = true;
     for (i = len - 1; i >= 0; i--) {
-        if (!this._br[i]) {
+        if (!this.elements[i]) {
             data = this.layers[i];
             if(data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st))
             {
                 this.buildItem(i);
             }
         }
-        this._db = this._br[i] ? this._db:false;
+        this.completeLayers = this.elements[i] ? this.completeLayers:false;
     }
     this.checkPendingElements();
 };
 
-_l.prototype.createItem = function(layer){
+BaseRenderer.prototype.createItem = function(layer){
     switch(layer.ty){
         case 2:
             return this.createImage(layer);
@@ -5447,17 +5453,15 @@
             return this.createText(layer);
         case 13:
             return this.createCamera(layer);
-        case 99:
-            return null;
     }
-    return this.createBase(layer);
+    return this.createNull(layer);
 };
 
-_l.prototype.createCamera = function(){
+BaseRenderer.prototype.createCamera = function(){
     throw new Error('You\'re using a 3d camera. Try the html renderer.');
-}
+};
 
-_l.prototype.buildAllItems = function(){
+BaseRenderer.prototype.buildAllItems = function(){
     var i, len = this.layers.length;
     for(i=0;i<len;i+=1){
         this.buildItem(i);
@@ -5465,8 +5469,8 @@
     this.checkPendingElements();
 };
 
-_l.prototype.includeLayers = function(newLayers){
-    this._db = false;
+BaseRenderer.prototype.includeLayers = function(newLayers){
+    this.completeLayers = false;
     var i, len = newLayers.length;
     var j, jLen = this.layers.length;
     for(i=0;i<len;i+=1){
@@ -5481,51 +5485,63 @@
     }
 };
 
-_l.prototype.setProjectInterface = function(pInterface){
-    this._x.projectInterface = pInterface;
+BaseRenderer.prototype.setProjectInterface = function(pInterface){
+    this.globalData.projectInterface = pInterface;
 };
 
-_l.prototype.initItems = function(){
-    if(!this._x.progressiveLoad){
+BaseRenderer.prototype.initItems = function(){
+    if(!this.globalData.progressiveLoad){
         this.buildAllItems();
     }
 };
-_l.prototype.buildElementParenting = function(element, parentName, _dd) {
-    var _br = this._br;
+BaseRenderer.prototype.buildElementParenting = function(element, parentName, hierarchy) {
+    var elements = this.elements;
     var layers = this.layers;
     var i=0, len = layers.length;
     while (i < len) {
         if (layers[i].ind == parentName) {
-            if (!_br[i] || _br[i] === true) {
+            if (!elements[i] || elements[i] === true) {
                 this.buildItem(i);
                 this.addPendingElement(element);
-            } else if(layers[i].parent !== undefined) {
-                _dd.push(_br[i]);
-                _br[i]._isParent = true;
-                this.buildElementParenting(element, layers[i].parent, _dd);
             } else {
-                _dd.push(_br[i]);
-                _br[i]._isParent = true;
-                element.setHierarchy(_dd);
+                hierarchy.push(elements[i]);
+                elements[i].setAsParent();
+                if(layers[i].parent !== undefined) {
+                    this.buildElementParenting(element, layers[i].parent, hierarchy);
+                } else {
+                    element.setHierarchy(hierarchy);
+                }
             }
         }
         i += 1;
     }
 };
 
-_l.prototype.addPendingElement = function(element){
-    this._dc.push(element);
+BaseRenderer.prototype.addPendingElement = function(element){
+    this.pendingElements.push(element);
 };
-function _ao(_cq, config){
-    this._cq = _cq;
+
+BaseRenderer.prototype.searchExtraCompositions = function(assets){
+    var i, len = assets.length;
+    for(i=0;i<len;i+=1){
+        if(assets[i].xt){
+            var comp = this.createComp(assets[i]);
+            comp.initExpressions();
+            this.globalData.projectInterface.registerComposition(comp);
+        }
+    }
+};
+
+function SVGRenderer(animationItem, config){
+    this.animationItem = animationItem;
     this.layers = null;
     this.renderedFrame = -1;
-    this._cf = _ct('svg');
-    var maskElement = _ct('g');
-    this._cf.appendChild(maskElement);
-    this._bx = maskElement;
-    var defs = _ct( 'defs');
-    this._cf.appendChild(defs);
+    this.svgElement = createNS('svg');
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    var defs = createNS( 'defs');
+    this.svgElement.appendChild(defs);
     this.renderConfig = {
         preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
         progressiveLoad: (config && config.progressiveLoad) || false,
@@ -5534,88 +5550,84 @@
         viewBoxSize: (config && config.viewBoxSize) || false,
         className: (config && config.className) || ''
     };
-    this._x = {
-        mdf: false,
+    this.globalData = {
+        _mdf: false,
         frameNum: -1,
         defs: defs,
         frameId: 0,
-        _de: {w:0,h:0},
+        compSize: {w:0,h:0},
         renderConfig: this.renderConfig,
-        _cr: new FontManager()
+        fontManager: new FontManager()
     };
-    this._br = [];
-    this._dc = [];
+    this.elements = [];
+    this.pendingElements = [];
     this.destroyed = false;
 
 }
 
-extendPrototype([_l],_ao);
+extendPrototype([BaseRenderer],SVGRenderer);
 
-_ao.prototype.createBase = function (data) {
-    return new _d(data,this._x,this);
+SVGRenderer.prototype.createNull = function (data) {
+    return new NullElement(data,this.globalData,this);
 };
 
-_ao.prototype.createNull = function (data) {
-    return new _i(data,this._x,this);
+SVGRenderer.prototype.createShape = function (data) {
+    return new SVGShapeElement(data,this.globalData,this);
 };
 
-_ao.prototype.createShape = function (data) {
-    return new SVGShapeElement(data,this._x,this);
-};
-
-_ao.prototype.createText = function (data) {
-    return new _cw(data,this._x,this);
+SVGRenderer.prototype.createText = function (data) {
+    return new SVGTextElement(data,this.globalData,this);
 
 };
 
-_ao.prototype.createImage = function (data) {
-    return new _h(data,this._x,this);
+SVGRenderer.prototype.createImage = function (data) {
+    return new IImageElement(data,this.globalData,this);
 };
 
-_ao.prototype.createComp = function (data) {
-    return new SVGCompElement(data,this._x,this);
+SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data,this.globalData,this);
 
 };
 
-_ao.prototype.createSolid = function (data) {
-    return new _j(data,this._x,this);
+SVGRenderer.prototype.createSolid = function (data) {
+    return new ISolidElement(data,this.globalData,this);
 };
 
-_ao.prototype.configAnimation = function(animData){
-    this._cf.setAttribute('xmlns','http://www.w3.org/2000/svg');
+SVGRenderer.prototype.configAnimation = function(animData){
+    this.svgElement.setAttribute('xmlns','http://www.w3.org/2000/svg');
     if(this.renderConfig.viewBoxSize) {
-        this._cf.setAttribute('viewBox',this.renderConfig.viewBoxSize);
+        this.svgElement.setAttribute('viewBox',this.renderConfig.viewBoxSize);
     } else {
-        this._cf.setAttribute('viewBox','0 0 '+animData.w+' '+animData.h);
+        this.svgElement.setAttribute('viewBox','0 0 '+animData.w+' '+animData.h);
     }
 
     if(!this.renderConfig.viewBoxOnly) {
-        this._cf.setAttribute('width',animData.w);
-        this._cf.setAttribute('height',animData.h);
-        this._cf.style.width = '100%';
-        this._cf.style.height = '100%';
+        this.svgElement.setAttribute('width',animData.w);
+        this.svgElement.setAttribute('height',animData.h);
+        this.svgElement.style.width = '100%';
+        this.svgElement.style.height = '100%';
     }
     if(this.renderConfig.className) {
-        this._cf.setAttribute('class', this.renderConfig.className);
+        this.svgElement.setAttribute('class', this.renderConfig.className);
     }
-    this._cf.setAttribute('preserveAspectRatio',this.renderConfig.preserveAspectRatio);
-    //this._bx.style.transform = 'translate3d(0,0,0)';
-    //this._bx.style.transformOrigin = this._bx.style.mozTransformOrigin = this._bx.style.webkitTransformOrigin = this._bx.style['-webkit-transform'] = "0px 0px 0px";
-    this._cq.wrapper.appendChild(this._cf);
+    this.svgElement.setAttribute('preserveAspectRatio',this.renderConfig.preserveAspectRatio);
+    //this.layerElement.style.transform = 'translate3d(0,0,0)';
+    //this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+    this.animationItem.wrapper.appendChild(this.svgElement);
     //Mask animation
-    var defs = this._x.defs;
+    var defs = this.globalData.defs;
 
-    this._x.getAssetData = this._cq.getAssetData.bind(this._cq);
-    this._x.getAssetsPath = this._cq.getAssetsPath.bind(this._cq);
-    this._x.progressiveLoad = this.renderConfig.progressiveLoad;
-    this._x.nm = animData.nm;
-    this._x._de.w = animData.w;
-    this._x._de.h = animData.h;
-    this._x.frameRate = animData.fr;
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize.w = animData.w;
+    this.globalData.compSize.h = animData.h;
+    this.globalData.frameRate = animData.fr;
     this.data = animData;
 
-    var maskElement = _ct( 'clipPath');
-    var rect = _ct('rect');
+    var maskElement = createNS( 'clipPath');
+    var rect = createNS('rect');
     rect.setAttribute('width',animData.w);
     rect.setAttribute('height',animData.h);
     rect.setAttribute('x',0);
@@ -5623,69 +5635,69 @@
     var maskId = 'animationMask_'+randomString(10);
     maskElement.setAttribute('id', maskId);
     maskElement.appendChild(rect);
-    this._bx.setAttribute("clip-path", "url(" + locationHref + "#"+maskId+")");
+    this.layerElement.setAttribute("clip-path", "url(" + locationHref + "#"+maskId+")");
 
     defs.appendChild(maskElement);
     this.layers = animData.layers;
-    this._x._cr.addChars(animData.chars);
-    this._x._cr.addFonts(animData.fonts,defs);
-    this._br = _cv(animData.layers.length);
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts,defs);
+    this.elements = createSizedArray(animData.layers.length);
 };
 
 
-_ao.prototype.destroy = function () {
-    this._cq.wrapper.innerHTML = '';
-    this._bx = null;
-    this._x.defs = null;
+SVGRenderer.prototype.destroy = function () {
+    this.animationItem.wrapper.innerHTML = '';
+    this.layerElement = null;
+    this.globalData.defs = null;
     var i, len = this.layers ? this.layers.length : 0;
     for (i = 0; i < len; i++) {
-        if(this._br[i]){
-            this._br[i].destroy();
+        if(this.elements[i]){
+            this.elements[i].destroy();
         }
     }
-    this._br.length = 0;
+    this.elements.length = 0;
     this.destroyed = true;
-    this._cq = null;
+    this.animationItem = null;
 };
 
-_ao.prototype.updateContainerSize = function () {
+SVGRenderer.prototype.updateContainerSize = function () {
 };
 
-_ao.prototype.buildItem  = function(pos){
-    var _br = this._br;
-    if(_br[pos] || this.layers[pos].ty == 99){
+SVGRenderer.prototype.buildItem  = function(pos){
+    var elements = this.elements;
+    if(elements[pos] || this.layers[pos].ty == 99){
         return;
     }
-    _br[pos] = true;
+    elements[pos] = true;
     var element = this.createItem(this.layers[pos]);
 
-    _br[pos] = element;
+    elements[pos] = element;
     if(expressionsPlugin){
         if(this.layers[pos].ty === 0){
-            this._x.projectInterface.registerComposition(element);
+            this.globalData.projectInterface.registerComposition(element);
         }
         element.initExpressions();
     }
     this.appendElementInPos(element,pos);
     if(this.layers[pos].tt){
-        if(!this._br[pos - 1] || this._br[pos - 1] === true){
+        if(!this.elements[pos - 1] || this.elements[pos - 1] === true){
             this.buildItem(pos - 1);
             this.addPendingElement(element);
         } else {
-            element.setMatte(_br[pos - 1].layerId);
+            element.setMatte(elements[pos - 1].layerId);
         }
     }
 };
 
-_ao.prototype.checkPendingElements  = function(){
-    while(this._dc.length){
-        var element = this._dc.pop();
+SVGRenderer.prototype.checkPendingElements  = function(){
+    while(this.pendingElements.length){
+        var element = this.pendingElements.pop();
         element.checkParenting();
         if(element.data.tt){
-            var i = 0, len = this._br.length;
+            var i = 0, len = this.elements.length;
             while(i<len){
-                if(this._br[i] === element){
-                    element.setMatte(this._br[i - 1].layerId);
+                if(this.elements[i] === element){
+                    element.setMatte(this.elements[i - 1].layerId);
                     break;
                 }
                 i += 1;
@@ -5694,7 +5706,7 @@
     }
 };
 
-_ao.prototype._ba = function(num){
+SVGRenderer.prototype.renderFrame = function(num){
     if(this.renderedFrame === num || this.destroyed){
         return;
     }
@@ -5704,82 +5716,69 @@
         this.renderedFrame = num;
     }
     //clearPoints();
-    /*console.log('-------');
-    console.log('FRAME ',num);*/
-    this._x.frameNum = num;
-    this._x.frameId += 1;
-    this._x.projectInterface.currentFrame = num;
+    // console.log('-------');
+    // console.log('FRAME ',num);
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
     var i, len = this.layers.length;
-    if(!this._db){
+    if(!this.completeLayers){
         this.checkLayers(num);
     }
     for (i = len - 1; i >= 0; i--) {
-        if(this._db || this._br[i]){
-            this._br[i]._az(num - this.layers[i].st);
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].prepareFrame(num - this.layers[i].st);
         }
     }
-    for (i = 0; i < len; i += 1) {
-        if(this._db || this._br[i]){
-            this._br[i]._ba();
+    if(this.globalData._mdf) {
+        for (i = 0; i < len; i += 1) {
+            if(this.completeLayers || this.elements[i]){
+                this.elements[i].renderFrame();
+            }
         }
     }
 };
 
-_ao.prototype.appendElementInPos = function(element, pos){
-    var newElement = element.get_e();
+SVGRenderer.prototype.appendElementInPos = function(element, pos){
+    var newElement = element.getBaseElement();
     if(!newElement){
         return;
     }
     var i = 0;
     var nextElement;
     while(i<pos){
-        if(this._br[i] && this._br[i]!== true && this._br[i].get_e()){
-            nextElement = this._br[i].get_e();
+        if(this.elements[i] && this.elements[i]!== true && this.elements[i].getBaseElement()){
+            nextElement = this.elements[i].getBaseElement();
         }
         i += 1;
     }
     if(nextElement){
-        this._bx.insertBefore(newElement, nextElement);
+        this.layerElement.insertBefore(newElement, nextElement);
     } else {
-        this._bx.appendChild(newElement);
+        this.layerElement.appendChild(newElement);
     }
 };
 
-_ao.prototype.hide = function(){
-    this._bx.style.display = 'none';
+SVGRenderer.prototype.hide = function(){
+    this.layerElement.style.display = 'none';
 };
 
-_ao.prototype.show = function(){
-    this._bx.style.display = 'block';
+SVGRenderer.prototype.show = function(){
+    this.layerElement.style.display = 'block';
 };
 
-_ao.prototype.searchExtraCompositions = function(assets){
-    var i, len = assets.length;
-    var floatingContainer = _ct('g');
-    for(i=0;i<len;i+=1){
-        if(assets[i].xt){
-            var comp = this.createComp(assets[i],floatingContainer,this._x.comp,null);
-            comp.initExpressions();
-            //comp.compInterface = CompExpressionInterface(comp);
-            //Expressions.addLayersInterface(comp._br, this._x.projectInterface);
-            this._x.projectInterface.registerComposition(comp);
-        }
-    }
-};
-
-function _ay(data,element,_x) {
-    //TODO: check if dynamic properties array can be used from element
-    this._co = [];
+function MaskElement(data,element,globalData, dynamicProperties) {
     this.data = data;
     this.element = element;
-    this._x = _x;
+    this.globalData = globalData;
     this.storedData = [];
     this.masksProperties = this.data.masksProperties || [];
     this.maskElement = null;
-    this._ch = true;
-    var defs = this._x.defs;
+    this._isFirstFrame = true;
+    var defs = this.globalData.defs;
     var i, len = this.masksProperties ? this.masksProperties.length : 0;
-    this.viewData = _cv(len);
+    this.viewData = createSizedArray(len);
     this.solidPath = '';
 
 
@@ -5797,8 +5796,8 @@
             maskRef = 'mask';
         }
 
-        if((properties[i].mode == 's' || properties[i].mode == 'i') && count == 0){
-            rect = _ct( 'rect');
+        if((properties[i].mode == 's' || properties[i].mode == 'i') && count === 0){
+            rect = createNS( 'rect');
             rect.setAttribute('fill', '#ffffff');
             rect.setAttribute('width', this.element.comp.data.w);
             rect.setAttribute('height', this.element.comp.data.h);
@@ -5807,12 +5806,12 @@
             rect = null;
         }
 
-        path = _ct( 'path');
+        path = createNS( 'path');
         if(properties[i].mode == 'n') {
             // TODO move this to a factory or to a constructor
             this.viewData[i] = {
-                op: _ai._bo(this.element,properties[i].o,0,0.01,this._co),
-                prop: _ah._bp(this.element,properties[i],3,this._co,null),
+                op: PropertyFactory.getProp(this.element,properties[i].o,0,0.01,dynamicProperties),
+                prop: ShapePropertyFactory.getShapeProp(this.element,properties[i],3,dynamicProperties,null),
                 elem: path
             };
             defs.appendChild(path);
@@ -5822,15 +5821,16 @@
 
         path.setAttribute('fill', properties[i].mode === 's' ? '#000000':'#ffffff');
         path.setAttribute('clip-rule','nonzero');
+        var filterID;
 
         if (properties[i].x.k !== 0) {
             maskType = 'mask';
             maskRef = 'mask';
-            x = _ai._bo(this.element,properties[i].x,0,null,this._co);
-            var filterID = 'fi_'+randomString(10);
-            expansor = _ct('filter');
+            x = PropertyFactory.getProp(this.element,properties[i].x,0,null,dynamicProperties);
+            filterID = 'fi_'+randomString(10);
+            expansor = createNS('filter');
             expansor.setAttribute('id',filterID);
-            feMorph = _ct('feMorphology');
+            feMorph = createNS('feMorphology');
             feMorph.setAttribute('operator','dilate');
             feMorph.setAttribute('in','SourceGraphic');
             feMorph.setAttribute('radius','0');
@@ -5854,11 +5854,11 @@
         };
         if(properties[i].mode == 'i'){
             jLen = currentMasks.length;
-            var g = _ct('g');
+            var g = createNS('g');
             for(j=0;j<jLen;j+=1){
                 g.appendChild(currentMasks[j]);
             }
-            var mask = _ct('mask');
+            var mask = createNS('mask');
             mask.setAttribute('mask-type','alpha');
             mask.setAttribute('id',layerId+'_'+count);
             mask.appendChild(path);
@@ -5877,19 +5877,16 @@
         this.viewData[i] = {
             elem: path,
             lastPath: '',
-            op: _ai._bo(this.element,properties[i].o,0,0.01,this._co),
-            prop:_ah._bp(this.element,properties[i],3,this._co,null)
+            op: PropertyFactory.getProp(this.element,properties[i].o,0,0.01,dynamicProperties),
+            prop:ShapePropertyFactory.getShapeProp(this.element,properties[i],3,dynamicProperties,null),
+            invRect: rect
         };
-        if(rect){
-            //TODO: move the invRect property to the object definition in order to prevent a new hidden class creation.
-            this.viewData[i].invRect = rect;
-        }
         if(!this.viewData[i].prop.k){
             this.drawPath(properties[i],this.viewData[i].prop.v,this.viewData[i]);
         }
     }
 
-    this.maskElement = _ct( maskType);
+    this.maskElement = createNS( maskType);
 
     len = currentMasks.length;
     for(i=0;i<len;i+=1){
@@ -5898,39 +5895,31 @@
 
     if(count > 0){
         this.maskElement.setAttribute('id', layerId);
-        this.element._ca.setAttribute(maskRef, "url(" + locationHref + "#" + layerId + ")");
+        this.element.maskedElement.setAttribute(maskRef, "url(" + locationHref + "#" + layerId + ")");
         defs.appendChild(this.maskElement);
     }
 
-};
+}
 
-_ay.prototype.getMaskProperty = function(pos){
+MaskElement.prototype.getMaskProperty = function(pos){
     return this.viewData[pos].prop;
 };
 
-_ay.prototype._az = function(){
-    var i, len = this._co.length;
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-
-    }
-};
-
-_ay.prototype._ba = function (finalMat) {
+MaskElement.prototype.renderFrame = function (finalMat) {
     var i, len = this.masksProperties.length;
     for (i = 0; i < len; i++) {
-        if(this.viewData[i].prop.mdf || this._ch){
+        if(this.viewData[i].prop._mdf || this._isFirstFrame){
             this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]);
         }
-        if(this.viewData[i].op.mdf || this._ch){
+        if(this.viewData[i].op._mdf || this._isFirstFrame){
             this.viewData[i].elem.setAttribute('fill-opacity',this.viewData[i].op.v);
         }
         if(this.masksProperties[i].mode !== 'n'){
-            if(this.viewData[i].invRect && (this.element.finalTransform.mProp.mdf || this._ch)){
+            if(this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || this._isFirstFrame)){
                 this.viewData[i].invRect.setAttribute('x', -finalMat.props[12]);
                 this.viewData[i].invRect.setAttribute('y', -finalMat.props[13]);
             }
-            if(this.storedData[i].x && (this.storedData[i].x.mdf || this._ch)){
+            if(this.storedData[i].x && (this.storedData[i].x._mdf || this._isFirstFrame)){
                 var feMorph = this.storedData[i].expan;
                 if(this.storedData[i].x.v < 0){
                     if(this.storedData[i].lastOperator !== 'erode'){
@@ -5949,23 +5938,23 @@
             }
         }
     }
-    this._ch = false;
+    this._isFirstFrame = false;
 };
 
-_ay.prototype.getMaskelement = function () {
+MaskElement.prototype.getMaskelement = function () {
     return this.maskElement;
 };
 
-_ay.prototype.createLayerSolidPath = function(){
+MaskElement.prototype.createLayerSolidPath = function(){
     var path = 'M0,0 ';
-    path += ' h' + this._x._de.w ;
-    path += ' v' + this._x._de.h ;
-    path += ' h-' + this._x._de.w ;
-    path += ' v-' + this._x._de.h + ' ';
+    path += ' h' + this.globalData.compSize.w ;
+    path += ' v' + this.globalData.compSize.h ;
+    path += ' h-' + this.globalData.compSize.w ;
+    path += ' v-' + this.globalData.compSize.h + ' ';
     return path;
 };
 
-_ay.prototype.drawPath = function(pathData,pathNodes,viewData){
+MaskElement.prototype.drawPath = function(pathData,pathNodes,viewData){
     var pathString = " M"+pathNodes.v[0][0]+','+pathNodes.v[0][1];
     var i, len;
     len = pathNodes._length;
@@ -5992,41 +5981,62 @@
     }
 };
 
-_ay.prototype.destroy = function(){
+MaskElement.prototype.destroy = function(){
     this.element = null;
-    this._x = null;
+    this.globalData = null;
     this.maskElement = null;
     this.data = null;
     this.masksProperties = null;
 };
-function _ad(){}
+/**
+ * @file 
+ * Handles AE's layer parenting property.
+ *
+ */
 
-_ad.prototype.initHierarchy = function() {
-    this._dd = [];
-    this._isParent = false;
-    this.checkParenting();
-}
+function HierarchyElement(){}
 
-_ad.prototype.resetHierarchy = function() {
-    this._dd.length = 0;
-};
-
-_ad.prototype.getHierarchy = function() {
-    return this._dd;
-};
-
-_ad.prototype.setHierarchy = function(_dd){
-    this._dd = _dd;
-};
-
-_ad.prototype.checkParenting = function(){
-    if (this.data.parent !== undefined){
-        this.comp.buildElementParenting(this, this.data.parent, []);
-    }
-};
-
-_ad.prototype.prepareHierarchy = function(){
-    
+HierarchyElement.prototype = {
+	/**
+     * @function 
+     * Initializes hierarchy properties
+     *
+     */
+	initHierarchy: function() {
+		//element's parent list
+	    this.hierarchy = [];
+	    //if element is parent of another layer _isParent will be true
+	    this._isParent = false;
+	    this.checkParenting();
+	},
+	/**
+     * @function 
+     * Sets layer's hierarchy.
+     * @param {array} hierarch
+     * layer's parent list
+     *
+     */ 
+	setHierarchy: function(hierarchy){
+	    this.hierarchy = hierarchy;
+	},
+	/**
+     * @function 
+     * Sets layer as parent.
+     *
+     */ 
+	setAsParent: function() {
+	    this._isParent = true;
+	},
+	/**
+     * @function 
+     * Searches layer's parenting chain
+     *
+     */ 
+	checkParenting: function(){
+	    if (this.data.parent !== undefined){
+	        this.comp.buildElementParenting(this, this.data.parent, []);
+	    }
+	}
 };
 /**
  * @file 
@@ -6035,259 +6045,251 @@
  *
  */
 
-function _ac(){}
+function FrameElement(){}
 
-/**
- * @function 
- * Initializes frame related properties.
- *
- */
-
-_ac.prototype.initFrame = function(){
-	//set to true when inpoint is rendered
-	this._ch = false;
-	//list of animated properties
-	this._co = [];
-}
-
-
-/**
- * @function 
- * Calculates all dynamic values
- *
- * @param {number} num
- * current frame number in Layer's time
- * 
- */
-_ac.prototype.prepareProperties = function(num, isVisible) {
-    var i, len = this._co.length;
-    for (i = 0;i < len; i += 1) {
-        //TODO change .type to .propType
-        if (isVisible || (this._isParent && this._co[i].propType === 'transform')) {
-            this._co[i].getValue(this._ch);
-            if (this._co[i].mdf) {
-                this._x.mdf = true;
-            }
-        }
-    }
-}
-function _af(){}
-
-_af.prototype.initTransform = function() {
-    this.finalTransform = {
-        mProp: this.data.ks ? _ag._bj(this, this.data.ks, this._co) : {o:0},
-        matMdf: false,
-        opMdf: false,
-        mat: new Matrix()
-    };
-    if (this.data.ao) {
-        this.finalTransform.mProp.autoOriented = true;
-    }
-
-    //TODO: check TYPE 11: Guided _br
-    if (this.data.ty !== 11) {
-        //this.createElements();
-    }
-}
-
-_af.prototype.renderTransform = function() {
-
-	this.finalTransform.opMdf = this.finalTransform.mProp.o.mdf || this._ch;
-    this.finalTransform.matMdf = this.finalTransform.mProp.mdf || this._ch;
-
-    if (this._dd) {
-        var mat;
-        var finalMat = this.finalTransform.mat;
-        var i = 0, len = this._dd.length;
-        //Checking if any of the transformation matrices in the _dd chain has changed.
-        if (!this.finalTransform.matMdf) {
-            while (i < len) {
-                if (this._dd[i].finalTransform.mProp.mdf) {
-                    this.finalTransform.matMdf = true;
-                    break;
+FrameElement.prototype = {
+    /**
+     * @function 
+     * Initializes frame related properties.
+     *
+     */
+    initFrame: function(){
+        //set to true when inpoint is rendered
+        this._isFirstFrame = false;
+        //list of animated properties
+        this.dynamicProperties = [];
+        // If layer has been modified in current tick this will be true
+        this._mdf = false;
+    },
+    /**
+     * @function 
+     * Calculates all dynamic values
+     *
+     * @param {number} num
+     * current frame number in Layer's time
+     * @param {boolean} isVisible
+     * if layers is currently in range
+     * 
+     */
+    prepareProperties: function(num, isVisible) {
+        var i, len = this.dynamicProperties.length;
+        for (i = 0;i < len; i += 1) {
+            if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
+                this.dynamicProperties[i].getValue();
+                if (this.dynamicProperties[i]._mdf) {
+                    this.globalData._mdf = true;
+                    this._mdf = true;
                 }
-                i += 1;
-            }
-        }
-        
-        if (this.finalTransform.matMdf) {
-            mat = this.finalTransform.mProp.v.props;
-            finalMat.cloneFromProps(mat);
-            for (i = 0; i < len; i += 1) {
-                mat = this._dd[i].finalTransform.mProp.v.props;
-                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]);
             }
         }
     }
-}
-
-_af.prototype.globalToLocal = function(pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-        if (comp.finalTransform) {
-            if (comp.data.hasMask) {
-                transforms.splice(0, 0, comp.finalTransform);
-            }
-            comp = comp.comp;
-        } else {
-            flag = false;
-        }
-    }
-    var i, len = transforms.length,ptNew;
-    for (i = 0; i < len; i += 1) {
-        ptNew = transforms[i].mat._cn(0, 0, 0);
-        //ptNew = transforms[i].mat._cn(pt[0],pt[1],pt[2]);
-        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
 };
+function TransformElement(){}
 
-_af.prototype.mHelper = new Matrix();
-function _ae(){
-
-}
-
-_ae.prototype.initRenderable = function() {
-	//layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-	this.isInRange = false;
-	//layer's display state
-	this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-}
-
-_ae.prototype.prepareRenderableFrame = function(num) {
-	this.checkLayerLimits(num);
-	this.prepareMasks(num);
-    if(this.finalTransform.mProp.o.v <= 0) {
-        if(!this.isTransparent && this._x.renderConfig.hideOnTransparent){
-            this.isTransparent = true;
-            this.hide();
+TransformElement.prototype = {
+    initTransform: function() {
+        this.finalTransform = {
+            mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this.dynamicProperties) : {o:0},
+            _matMdf: false,
+            _opMdf: false,
+            mat: new Matrix()
+        };
+        if (this.data.ao) {
+            this.finalTransform.mProp.autoOriented = true;
         }
-    } else if(this.isTransparent) {
-        this.isTransparent = false;
-        this.show();
-    }
+
+        //TODO: check TYPE 11: Guided elements
+        if (this.data.ty !== 11) {
+            //this.createElements();
+        }
+    },
+    renderTransform: function() {
+
+        this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+        this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+        if (this.hierarchy) {
+            var mat;
+            var finalMat = this.finalTransform.mat;
+            var i = 0, len = this.hierarchy.length;
+            //Checking if any of the transformation matrices in the hierarchy chain has changed.
+            if (!this.finalTransform._matMdf) {
+                while (i < len) {
+                    if (this.hierarchy[i].finalTransform.mProp._mdf) {
+                        this.finalTransform._matMdf = true;
+                        break;
+                    }
+                    i += 1;
+                }
+            }
+            
+            if (this.finalTransform._matMdf) {
+                mat = this.finalTransform.mProp.v.props;
+                finalMat.cloneFromProps(mat);
+                for (i = 0; i < len; i += 1) {
+                    mat = this.hierarchy[i].finalTransform.mProp.v.props;
+                    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]);
+                }
+            }
+        }
+    },
+    globalToLocal: function(pt) {
+        var transforms = [];
+        transforms.push(this.finalTransform);
+        var flag = true;
+        var comp = this.comp;
+        while (flag) {
+            if (comp.finalTransform) {
+                if (comp.data.hasMask) {
+                    transforms.splice(0, 0, comp.finalTransform);
+                }
+                comp = comp.comp;
+            } else {
+                flag = false;
+            }
+        }
+        var i, len = transforms.length,ptNew;
+        for (i = 0; i < len; i += 1) {
+            ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
+            //ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+            pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+        }
+        return pt;
+    },
+    mHelper: new Matrix()
+};
+function RenderableElement(){
+
 }
 
-/**
- * @function 
- * Initializes frame related properties.
- *
- * @param {number} num
- * current frame number in Layer's time
- * 
- */
-
-_ae.prototype.checkLayerLimits = function(num) {
-	if(this.data.ip - this.data.st <= num && this.data.op - this.data.st > num)
-    {
-        if(this.isInRange !== true){
-            this._x.mdf = true;
-            this.isInRange = true;
+RenderableElement.prototype = {
+    initRenderable: function() {
+        //layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+        this.isInRange = false;
+        //layer's display state
+        this.hidden = false;
+        // If layer's transparency equals 0, it can be hidden
+        this.isTransparent = false;
+    },
+    prepareRenderableFrame: function(num) {
+        this.checkLayerLimits(num);
+    },
+    checkTransparency: function(){
+        if(this.finalTransform.mProp.o.v <= 0) {
+            if(!this.isTransparent && this.globalData.renderConfig.hideOnTransparent){
+                this.isTransparent = true;
+                this.hide();
+            }
+        } else if(this.isTransparent) {
+            this.isTransparent = false;
             this.show();
         }
-    } else {
-        if(this.isInRange !== false){
-            this._x.mdf = true;
-            this.isInRange = false;
+    },
+    /**
+     * @function 
+     * Initializes frame related properties.
+     *
+     * @param {number} num
+     * current frame number in Layer's time
+     * 
+     */
+    checkLayerLimits: function(num) {
+        if(this.data.ip - this.data.st <= num && this.data.op - this.data.st > num)
+        {
+            if(this.isInRange !== true){
+                this.globalData._mdf = true;
+                this._mdf = true;
+                this.isInRange = true;
+                this.show();
+            }
+        } else {
+            if(this.isInRange !== false){
+                this.globalData._mdf = true;
+                this.isInRange = false;
+                this.hide();
+            }
+        }
+    },
+    renderRenderable: function() {
+        this.maskManager.renderFrame(this.finalTransform.mat);
+        this.renderableEffectsManager.renderFrame(this._isFirstFrame);
+    },
+    sourceRectAtTime: function(){
+        return {
+            top:0,
+            left:0,
+            width:100,
+            height:100
+        };
+    },
+    getLayerSize: function(){
+        if(this.data.ty === 5){
+            return {w:this.data.textData.width,h:this.data.textData.height};
+        }else{
+            return {w:this.data.width,h:this.data.height};
+        }
+    }
+};
+function RenderableDOMElement() {}
+
+(function(){
+    var _prototype = {
+        initElement: function(data,globalData,comp) {
+            this.initFrame();
+            this.initBaseData(data, globalData, comp);
+            this.initTransform(data, globalData, comp);
+            this.initHierarchy();
+            this.initRenderable();
+            this.initRendererElement();
+            this.createContainerElements();
+            this.addMasks();
+            this.createContent();
             this.hide();
+        },
+        hide: function(){
+            if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+                this.layerElement.style.display = 'none';
+                this.hidden = true;
+            }
+        },
+        show: function(){
+            if (this.isInRange && !this.isTransparent){
+                if (!this.data.hd) {
+                    this.layerElement.style.display = 'block';
+                }
+                this.hidden = false;
+                this._isFirstFrame = true;
+                this.maskManager._isFirstFrame = true;
+            }
+        },
+        renderFrame: function() {
+            //If it is exported as hidden (data.hd === true) no need to render
+            //If it is not visible no need to render
+            if (this.data.hd || this.hidden) {
+                return;
+            }
+            this.renderTransform();
+            this.renderRenderable();
+            this.renderElement();
+            this.renderInnerContent();
+            if (this._isFirstFrame) {
+                this._isFirstFrame = false;
+            }
+        },
+        renderInnerContent: function() {},
+        prepareFrame: function(num) {
+            this._mdf = false;
+            this.prepareRenderableFrame(num);
+            this.prepareProperties(num, this.isInRange);
+            this.checkTransparency();
+        },
+        destroy: function(){
+            this.innerElem =  null;
+            this.destroyBaseElement();
         }
-    }
-}
-
-_ae.prototype.prepareMasks = function() {
-	if(this.isInRange) {
-        this.maskManager._az();
-	}
-}
-
-_ae.prototype.renderRenderable = function() {
-    this.maskManager._ba(this.finalTransform.mat);
-    this.effectsManager._ba(this._ch);
-}
-
-_ae.prototype.sourceRectAtTime = function(){
-    return {
-        top:0,
-        left:0,
-        width:100,
-        height:100
-    }
-};
-
-_ae.prototype.getLayerSize = function(){
-    if(this.data.ty === 5){
-        return {w:this.data.textData.width,h:this.data.textData.height};
-    }else{
-        return {w:this.data.width,h:this.data.height};
-    }
-};
-function _ci() {
-
-}
-extendPrototype([_ae], _ci);
-
-_ci.prototype._cz = function(data,_x,comp) {
-    this.initFrame();
-    this.initBaseData(data, _x, comp);
-    this.initTransform(data, _x, comp);
-    this.initHierarchy();
-    this.initRenderable();
-    this.initRendererElement();
-    this.createContainerElements();
-    this.addMasks();
-    this.createContent();
-    this.hide();
-}
-
-_ci.prototype.hide = function(){
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        this._bx.style.display = 'none';
-        this.hidden = true;
-    }
-};
-
-_ci.prototype.show = function(){
-    if (this.isInRange && !this.isTransparent){
-        if (!this.data.hd) {
-            this._bx.style.display = 'block';
-        }
-        this.hidden = false;
-        this._ch = true;
-        this.maskManager._ch = true;
-    }
-};
-
-_ci.prototype._ba = function() {
-    //If it is exported as hidden (data.hd === true) no need to render
-    //If it is not visible no need to render
-    if (this.data.hd || this.hidden) {
-        return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.renderElement();
-    this.renderInnerContent();
-    if (this._ch) {
-        this._ch = false;
-    }
-};
-
-_ci.prototype.renderInnerContent = function() {};
-
-_ci.prototype.destroy = function(){
-    this._cc =  null;
-    this.destroy_e();
-};
-
-_ci.prototype._az = function(num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-};
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+}());
 function ProcessedElement(element, position) {
 	this.elem = element;
 	this.pos = position;
@@ -6297,16 +6299,16 @@
 	this.type = data.ty;
 	this.d = '';
 	this.lvl = level;
-	this.mdf = false;
+	this._mdf = false;
 	this.closed = false;
-	this.pElem = _ct('path');
+	this.pElem = createNS('path');
 	this.msElem = null;
 }
 
 SVGStyleData.prototype.reset = function() {
 	this.d = '';
-	this.mdf = false;
-}
+	this._mdf = false;
+};
 function SVGShapeData(transformers, level, shape) {
     this.caches = [];
     this.styles = [];
@@ -6319,43 +6321,43 @@
 	this.transform = {
 		mProps: mProps,
 		op: op
-	}
-	this._br = []
+	};
+	this.elements = [];
 }
-function SVGStrokeStyleData(elem, data, _co, styleOb){
-	this.o = _ai._bo(elem,data.o,0,0.01,_co);
-	this.w = _ai._bo(elem,data.w,0,null,_co);
-	this.d = new DashProperty(elem,data.d||{},'svg',_co);
-	this.c = _ai._bo(elem,data.c,1,255,_co);
+function SVGStrokeStyleData(elem, data, dynamicProperties, styleOb){
+	this.o = PropertyFactory.getProp(elem,data.o,0,0.01,dynamicProperties);
+	this.w = PropertyFactory.getProp(elem,data.w,0,null,dynamicProperties);
+	this.d = new DashProperty(elem,data.d||{},'svg',dynamicProperties);
+	this.c = PropertyFactory.getProp(elem,data.c,1,255,dynamicProperties);
 	this.style = styleOb;
 }
-function SVGFillStyleData(elem, data, _co, styleOb){
-	this.o = _ai._bo(elem,data.o,0,0.01,_co);
-	this.c = _ai._bo(elem,data.c,1,255,_co);
+function SVGFillStyleData(elem, data, dynamicProperties, styleOb){
+	this.o = PropertyFactory.getProp(elem,data.o,0,0.01,dynamicProperties);
+	this.c = PropertyFactory.getProp(elem,data.c,1,255,dynamicProperties);
 	this.style = styleOb;
 }
-function _ck(elem, data, _co, styleOb){
-    this.initGradientData(elem, data, _co, styleOb);
+function SVGGradientFillStyleData(elem, data, dynamicProperties, styleOb){
+    this.initGradientData(elem, data, dynamicProperties, styleOb);
 }
 
-_ck.prototype.initGradientData = function(elem, data, _co, styleOb){
-    this.o = _ai._bo(elem,data.o,0,0.01,_co);
-    this.s = _ai._bo(elem,data.s,1,null,_co);
-    this.e = _ai._bo(elem,data.e,1,null,_co);
-    this.h = _ai._bo(elem,data.h||{k:0},0,0.01,_co);
-    this.a = _ai._bo(elem,data.a||{k:0},0,degToRads,_co);
-    this.g = new GradientProperty(elem,data.g,_co);
+SVGGradientFillStyleData.prototype.initGradientData = function(elem, data, dynamicProperties, styleOb){
+    this.o = PropertyFactory.getProp(elem,data.o,0,0.01,dynamicProperties);
+    this.s = PropertyFactory.getProp(elem,data.s,1,null,dynamicProperties);
+    this.e = PropertyFactory.getProp(elem,data.e,1,null,dynamicProperties);
+    this.h = PropertyFactory.getProp(elem,data.h||{k:0},0,0.01,dynamicProperties);
+    this.a = PropertyFactory.getProp(elem,data.a||{k:0},0,degToRads,dynamicProperties);
+    this.g = new GradientProperty(elem,data.g,dynamicProperties);
     this.style = styleOb;
     this.stops = [];
     this.setGradientData(styleOb.pElem, data);
     this.setGradientOpacity(data, styleOb);
 
-}
+};
 
-_ck.prototype.setGradientData = function(pathElement,data){
+SVGGradientFillStyleData.prototype.setGradientData = function(pathElement,data){
 
     var gradientId = 'gr_'+randomString(10);
-    var gfill = _ct(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
     gfill.setAttribute('id',gradientId);
     gfill.setAttribute('spreadMethod','pad');
     gfill.setAttribute('gradientUnits','userSpaceOnUse');
@@ -6363,7 +6365,7 @@
     var stop, j, jLen;
     jLen = data.g.p*4;
     for(j=0;j<jLen;j+=4){
-        stop = _ct('stop');
+        stop = createNS('stop');
         gfill.appendChild(stop);
         stops.push(stop);
     }
@@ -6371,25 +6373,25 @@
     
     this.gf = gfill;
     this.cst = stops;
-}
+};
 
-_ck.prototype.setGradientOpacity = function(data, styleOb){
+SVGGradientFillStyleData.prototype.setGradientOpacity = function(data, styleOb){
     if(this.g._hasOpacity && !this.g._collapsable){
         var stop, j, jLen;
-        var mask = _ct("mask");
-        var maskElement = _ct( 'path');
+        var mask = createNS("mask");
+        var maskElement = createNS( 'path');
         mask.appendChild(maskElement);
         var opacityId = 'op_'+randomString(10);
         var maskId = 'mk_'+randomString(10);
         mask.setAttribute('id',maskId);
-        var opFill = _ct(data.t === 1 ? 'linearGradient' : 'radialGradient');
+        var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
         opFill.setAttribute('id',opacityId);
         opFill.setAttribute('spreadMethod','pad');
         opFill.setAttribute('gradientUnits','userSpaceOnUse');
         jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
         var stops = this.stops;
         for(j=data.g.p*4;j<jLen;j+=2){
-            stop = _ct('stop');
+            stop = createNS('stop');
             stop.setAttribute('stop-color','rgb(255,255,255)');
             opFill.appendChild(stop);
             stops.push(stop);
@@ -6402,23 +6404,23 @@
         styleOb.msElem = maskElement;
     }
 };
-function _cj(elem, data, _co, styleOb){
-	this.w = _ai._bo(elem,data.w,0,null,_co);
-	this.d = new DashProperty(elem,data.d||{},'svg',_co);
-    this.initGradientData(elem, data, _co, styleOb);
+function SVGGradientStrokeStyleData(elem, data, dynamicProperties, styleOb){
+	this.w = PropertyFactory.getProp(elem,data.w,0,null,dynamicProperties);
+	this.d = new DashProperty(elem,data.d||{},'svg',dynamicProperties);
+    this.initGradientData(elem, data, dynamicProperties, styleOb);
 }
 
-_cj.prototype.initGradientData = _ck.prototype.initGradientData;
-_cj.prototype.setGradientData = _ck.prototype.setGradientData;
-_cj.prototype.setGradientOpacity = _ck.prototype.setGradientOpacity;
+SVGGradientStrokeStyleData.prototype.initGradientData = SVGGradientFillStyleData.prototype.initGradientData;
+SVGGradientStrokeStyleData.prototype.setGradientData = SVGGradientFillStyleData.prototype.setGradientData;
+SVGGradientStrokeStyleData.prototype.setGradientOpacity = SVGGradientFillStyleData.prototype.setGradientOpacity;
 function ShapeGroupData() {
 	this.it = [];
     this.prevViewData = [];
-    this.gr = _ct('g');
+    this.gr = createNS('g');
 }
-function _e(){
-};
-_e.prototype.checkMasks = function(){
+function BaseElement(){
+}
+BaseElement.prototype.checkMasks = function(){
     if(!this.data.hasMask){
         return false;
     }
@@ -6430,9 +6432,9 @@
         i += 1;
     }
     return false;
-}
+};
 
-_e.prototype.initExpressions = function(){
+BaseElement.prototype.initExpressions = function(){
     this.layerInterface = LayerExpressionInterface(this);
     if(this.data.hasMask){
         this.layerInterface.registerMaskInterface(this.maskManager);
@@ -6449,9 +6451,9 @@
         this.layerInterface.textInterface = TextExpressionInterface(this);
         this.layerInterface.text = this.layerInterface.textInterface;
     }
-}
+};
 
-_e.prototype.blendModeEnums = {
+BaseElement.prototype.blendModeEnums = {
     1:'multiply',
     2:'screen',
     3:'overlay',
@@ -6467,21 +6469,21 @@
     13:'saturation',
     14:'color',
     15:'luminosity'
-}
+};
 
-_e.prototype.getBlendMode = function(){
+BaseElement.prototype.getBlendMode = function(){
     return this.blendModeEnums[this.data.bm] || '';
-}
+};
 
-_e.prototype.setBlendMode = function(){
+BaseElement.prototype.setBlendMode = function(){
     var blendModeValue = this.getBlendMode();
-    var elem = this._by || this._bx;
+    var elem = this.baseElement || this.layerElement;
 
     elem.style['mix-blend-mode'] = blendModeValue;
-}
+};
 
-_e.prototype.initBaseData = function(data, _x, comp){
-    this._x = _x;
+BaseElement.prototype.initBaseData = function(data, globalData, comp){
+    this.globalData = globalData;
     this.comp = comp;
     this.data = data;
     this.layerId = 'ly_'+randomString(10);
@@ -6491,209 +6493,206 @@
         this.data.sr = 1;
     }
     // effects manager
-    this.effects = new EffectsManager(this.data,this,this._co);
+    this.effectsManager = new EffectsManager(this.data,this,this.dynamicProperties);
     
 };
 
-_e.prototype.getType = function(){
+BaseElement.prototype.getType = function(){
     return this.type;
 };
 
-function _i(data,_x,comp){
+function NullElement(data,globalData,comp){
     this.initFrame();
-	this.initBaseData(data, _x, comp);
+	this.initBaseData(data, globalData, comp);
     this.initFrame();
-    this.initTransform(data, _x, comp);
+    this.initTransform(data, globalData, comp);
     this.initHierarchy();
 }
 
-_i.prototype._az = function(num) {
+NullElement.prototype.prepareFrame = function(num) {
     this.prepareProperties(num, true);
 };
 
-_i.prototype._ba = function() {
+NullElement.prototype.renderFrame = function() {
 };
 
-_i.prototype.get_e = function() {
+NullElement.prototype.getBaseElement = function() {
 	return null;
 };
 
-_i.prototype.destroy = function() {
+NullElement.prototype.destroy = function() {
 };
 
-_i.prototype.sourceRectAtTime = function() {
+NullElement.prototype.sourceRectAtTime = function() {
 };
 
-_i.prototype.hide = function() {
+NullElement.prototype.hide = function() {
 };
 
-extendPrototype([_e,_af,_ad,_ac], _i);
+extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement], NullElement);
 
-function _d(){
-};
-
-_d.prototype.initRendererElement = function() {
-    this._bx = _ct('g');
+function SVGBaseElement(){
 }
 
-_d.prototype.createContainerElements = function(){
-    this.matteElement = _ct('g');
-    this._bz = this._bx;
-    this._ca = this._bx;
-    this._sizeChanged = false;
-    var _bw = null;
-    //If this layer acts as a mask for the following layer
-    if (this.data.td) {
-        if (this.data.td == 3 || this.data.td == 1) {
-            var masker = _ct('mask');
-            masker.setAttribute('id', this.layerId);
-            masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha');
-            masker.appendChild(this._bx);
-            _bw = masker;
-            this._x.defs.appendChild(masker);
-            // This is only for IE and Edge when mask if of type alpha
-            if (!featureSupport.maskType && this.data.td == 1) {
-                masker.setAttribute('mask-type', 'luminance');
-                var filId = randomString(10);
-                var fil = filtersFactory.createFilter(filId);
-                this._x.defs.appendChild(fil);
-                fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-                var gg = _ct('g');
-                gg.appendChild(this._bx);
-                _bw = gg;
-                masker.appendChild(gg);
-                gg.setAttribute('filter','url(' + locationHref + '#' + filId + ')');
-            }
-        } else if(this.data.td == 2) {
-            var maskGroup = _ct('mask');
-            maskGroup.setAttribute('id', this.layerId);
-            maskGroup.setAttribute('mask-type','alpha');
-            var maskGrouper = _ct('g');
-            maskGroup.appendChild(maskGrouper);
-            var filId = randomString(10);
-            var fil = filtersFactory.createFilter(filId);
-            ////
+SVGBaseElement.prototype = {
+    initRendererElement: function() {
+        this.layerElement = createNS('g');
+    },
+    createContainerElements: function(){
+        this.matteElement = createNS('g');
+        this.transformedElement = this.layerElement;
+        this.maskedElement = this.layerElement;
+        this._sizeChanged = false;
+        var layerElementParent = null;
+        //If this layer acts as a mask for the following layer
+        var filId, fil, gg;
+        if (this.data.td) {
+            if (this.data.td == 3 || this.data.td == 1) {
+                var masker = createNS('mask');
+                masker.setAttribute('id', this.layerId);
+                masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha');
+                masker.appendChild(this.layerElement);
+                layerElementParent = masker;
+                this.globalData.defs.appendChild(masker);
+                // This is only for IE and Edge when mask if of type alpha
+                if (!featureSupport.maskType && this.data.td == 1) {
+                    masker.setAttribute('mask-type', 'luminance');
+                    filId = randomString(10);
+                    fil = filtersFactory.createFilter(filId);
+                    this.globalData.defs.appendChild(fil);
+                    fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+                    gg = createNS('g');
+                    gg.appendChild(this.layerElement);
+                    layerElementParent = gg;
+                    masker.appendChild(gg);
+                    gg.setAttribute('filter','url(' + locationHref + '#' + filId + ')');
+                }
+            } else if(this.data.td == 2) {
+                var maskGroup = createNS('mask');
+                maskGroup.setAttribute('id', this.layerId);
+                maskGroup.setAttribute('mask-type','alpha');
+                var maskGrouper = createNS('g');
+                maskGroup.appendChild(maskGrouper);
+                filId = randomString(10);
+                fil = filtersFactory.createFilter(filId);
+                ////
 
-            var feColorMatrix = _ct('feColorMatrix');
-            feColorMatrix.setAttribute('type', 'matrix');
-            feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-            feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-            fil.appendChild(feColorMatrix);
+                var feColorMatrix = createNS('feColorMatrix');
+                feColorMatrix.setAttribute('type', 'matrix');
+                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                fil.appendChild(feColorMatrix);
 
-            ////
-            /*var feCTr = _ct('feComponentTransfer');
-            feCTr.setAttribute('in','SourceGraphic');
-            fil.appendChild(feCTr);
-            var feFunc = _ct('feFuncA');
-            feFunc.setAttribute('type','table');
-            feFunc.setAttribute('tableValues','1.0 0.0');
-            feCTr.appendChild(feFunc);*/
-            this._x.defs.appendChild(fil);
-            var alphaRect = _ct('rect');
-            alphaRect.setAttribute('width',  this.comp.data.w);
-            alphaRect.setAttribute('height', this.comp.data.h);
-            alphaRect.setAttribute('x','0');
-            alphaRect.setAttribute('y','0');
-            alphaRect.setAttribute('fill','#ffffff');
-            alphaRect.setAttribute('opacity','0');
-            maskGrouper.setAttribute('filter', 'url(' + locationHref + '#'+filId+')');
-            maskGrouper.appendChild(alphaRect);
-            maskGrouper.appendChild(this._bx);
-            _bw = maskGrouper;
-            if (!featureSupport.maskType) {
-                maskGroup.setAttribute('mask-type', 'luminance');
-                fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-                var gg = _ct('g');
+                ////
+                /*var feCTr = createNS('feComponentTransfer');
+                feCTr.setAttribute('in','SourceGraphic');
+                fil.appendChild(feCTr);
+                var feFunc = createNS('feFuncA');
+                feFunc.setAttribute('type','table');
+                feFunc.setAttribute('tableValues','1.0 0.0');
+                feCTr.appendChild(feFunc);*/
+                this.globalData.defs.appendChild(fil);
+                var alphaRect = createNS('rect');
+                alphaRect.setAttribute('width',  this.comp.data.w);
+                alphaRect.setAttribute('height', this.comp.data.h);
+                alphaRect.setAttribute('x','0');
+                alphaRect.setAttribute('y','0');
+                alphaRect.setAttribute('fill','#ffffff');
+                alphaRect.setAttribute('opacity','0');
+                maskGrouper.setAttribute('filter', 'url(' + locationHref + '#'+filId+')');
                 maskGrouper.appendChild(alphaRect);
-                gg.appendChild(this._bx);
-                _bw = gg;
-                maskGrouper.appendChild(gg);
+                maskGrouper.appendChild(this.layerElement);
+                layerElementParent = maskGrouper;
+                if (!featureSupport.maskType) {
+                    maskGroup.setAttribute('mask-type', 'luminance');
+                    fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+                    gg = createNS('g');
+                    maskGrouper.appendChild(alphaRect);
+                    gg.appendChild(this.layerElement);
+                    layerElementParent = gg;
+                    maskGrouper.appendChild(gg);
+                }
+                this.globalData.defs.appendChild(maskGroup);
             }
-            this._x.defs.appendChild(maskGroup);
-        }
-    } else if (this.data.tt) {
-        this.matteElement.appendChild(this._bx);
-        _bw = this.matteElement;
-        this._by = this.matteElement;
-    } else {
-        this._by = this._bx;
-    }
-    if ((this.data.ln || this.data.cl) && (this.data.ty === 4 || this.data.ty === 0)) {
-        if (this.data.ln) {
-            this._bx.setAttribute('id', this.data.ln);
-        }
-        if (this.data.cl) {
-            this._bx.setAttribute('class', this.data.cl);
-        }
-    }
-    //Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-        var cp = _ct( 'clipPath');
-        var pt = _ct('path');
-        pt.setAttribute('d','M0,0 L' + this.data.w + ',0' + ' L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-        var clipId = 'cp_'+randomString(8);
-        cp.setAttribute('id',clipId);
-        cp.appendChild(pt);
-        this._x.defs.appendChild(cp);
-
-        if (this.checkMasks()) {
-            var cpGroup = _ct('g');
-            cpGroup.setAttribute('clip-path','url(' + locationHref + '#'+clipId + ')');
-            cpGroup.appendChild(this._bx);
-            this._bz = cpGroup;
-            if (_bw) {
-                _bw.appendChild(this._bz);
-            } else {
-                this._by = this._bz;
-            }
+        } else if (this.data.tt) {
+            this.matteElement.appendChild(this.layerElement);
+            layerElementParent = this.matteElement;
+            this.baseElement = this.matteElement;
         } else {
-            this._bx.setAttribute('clip-path','url(' + locationHref + '#'+clipId+')');
+            this.baseElement = this.layerElement;
         }
-        
-    }
-    if (this.data.bm !== 0) {
-        this.setBlendMode();
-    }
-    this.effectsManager = new _bi(this);
+        if ((this.data.ln || this.data.cl) && (this.data.ty === 4 || this.data.ty === 0)) {
+            if (this.data.ln) {
+                this.layerElement.setAttribute('id', this.data.ln);
+            }
+            if (this.data.cl) {
+                this.layerElement.setAttribute('class', this.data.cl);
+            }
+        }
+        //Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+        if (this.data.ty === 0 && !this.data.hd) {
+            var cp = createNS( 'clipPath');
+            var pt = createNS('path');
+            pt.setAttribute('d','M0,0 L' + this.data.w + ',0' + ' L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+            var clipId = 'cp_'+randomString(8);
+            cp.setAttribute('id',clipId);
+            cp.appendChild(pt);
+            this.globalData.defs.appendChild(cp);
 
-};
+            if (this.checkMasks()) {
+                var cpGroup = createNS('g');
+                cpGroup.setAttribute('clip-path','url(' + locationHref + '#'+clipId + ')');
+                cpGroup.appendChild(this.layerElement);
+                this.transformedElement = cpGroup;
+                if (layerElementParent) {
+                    layerElementParent.appendChild(this.transformedElement);
+                } else {
+                    this.baseElement = this.transformedElement;
+                }
+            } else {
+                this.layerElement.setAttribute('clip-path','url(' + locationHref + '#'+clipId+')');
+            }
+            
+        }
+        if (this.data.bm !== 0) {
+            this.setBlendMode();
+        }
+        this.renderableEffectsManager = new SVGEffects(this);
 
-_d.prototype.renderElement = function() {
-    if (this.finalTransform.matMdf) {
-        this._bz.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform.opMdf) {
-        this._bz.setAttribute('opacity', this.finalTransform.mProp.o.v);
+    },
+    renderElement: function() {
+        if (this.finalTransform._matMdf) {
+            this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+        }
+        if (this.finalTransform._opMdf) {
+            this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+        }
+    },
+    destroyBaseElement: function() {
+        this.layerElement = null;
+        this.matteElement = null;
+        this.maskManager.destroy();
+    },
+    getBaseElement: function() {
+        if (this.data.hd) {
+            return null;
+        }
+        return this.baseElement;
+    },
+    addMasks: function() {
+        this.maskManager = new MaskElement(this.data, this, this.globalData, this.dynamicProperties);
+    },
+    setMatte: function(id) {
+        if (!this.matteElement) {
+            return;
+        }
+        this.matteElement.setAttribute("mask", "url(" + locationHref + "#" + id + ")");
     }
 };
-
-_d.prototype.destroy_e = function() {
-    this._bx = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-};
-
-_d.prototype.get_e = function() {
-    if (this.data.hd) {
-        return null;
-    }
-    return this._by;
-};
-_d.prototype.addMasks = function() {
-    this.maskManager = new _ay(this.data, this, this._x);
-};
-
-_d.prototype.setMatte = function(id) {
-    if (!this.matteElement) {
-        return;
-    }
-    this.matteElement.setAttribute("mask", "url(" + locationHref + "#" + id + ")");
-};
-
-function _f(){
+function IShapeElement(){
 }
 
-_f.prototype = {
+IShapeElement.prototype = {
     addShapeToModifiers: function(data) {
         var i, len = this.shapeModifiers.length;
         for(i=0;i<len;i+=1){
@@ -6711,7 +6710,7 @@
 
         len = this.shapeModifiers.length;
         for(i=len-1;i>=0;i-=1){
-            this.shapeModifiers[i].processShapes(this._ch);
+            this.shapeModifiers[i].processShapes(this._isFirstFrame);
         }
     },
     lcEnum: {
@@ -6747,7 +6746,7 @@
             this.processedElements.push(new ProcessedElement(elem, pos));
         }
     },
-    _az: function(num) {
+    prepareFrame: function(num) {
         this.prepareRenderableFrame(num);
         this.prepareProperties(num, this.isInRange);
     },
@@ -6768,36 +6767,37 @@
         }
         return shapeString;
     }
-}
-function _k(){
+};
+function ITextElement(){
 }
 
-_k.prototype._cz = function(data,_x,comp){
+ITextElement.prototype.initElement = function(data,globalData,comp){
     this.lettersChangedFlag = true;
     this.initFrame();
-    this.initBaseData(data, _x, comp);
-    this.textAnimator = new _bl(data.t, this.renderType, this);
-    this.textProperty = new _ar(this, data.t, this._co);
-    this.initTransform(data, _x, comp);
+    this.initBaseData(data, globalData, comp);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.initTransform(data, globalData, comp);
     this.initHierarchy();
     this.initRenderable();
     this.initRendererElement();
     this.createContainerElements();
     this.addMasks();
     this.createContent();
-    this.textAnimator.searchProperties(this._co);
+    this.textAnimator.searchProperties(this.dynamicProperties);
 };
 
-_k.prototype._az = function(num) {
+ITextElement.prototype.prepareFrame = function(num) {
+    this._mdf = false;
     this.prepareRenderableFrame(num);
     this.prepareProperties(num, this.isInRange);
-    if(this.textProperty.mdf || this.textProperty._ch) {
+    if(this.textProperty._mdf || this.textProperty._isFirstFrame) {
         this.buildNewText();
-        this.textProperty._ch = false;
+        this.textProperty._isFirstFrame = false;
     }
-}
+};
 
-_k.prototype.createPathShape = function(matrixHelper, shapes) {
+ITextElement.prototype.createPathShape = function(matrixHelper, shapes) {
     var j,jLen = shapes.length;
     var k, kLen, pathNodes;
     var shapeStr = '';
@@ -6808,11 +6808,25 @@
     return shapeStr;
 };
 
-_k.prototype.updateDocumentData = function(newData, index) {
+ITextElement.prototype.updateDocumentData = function(newData, index) {
     this.textProperty.updateDocumentData(newData, index);
-}
+    this.buildNewText();
+    this.renderInnerContent();
+};
 
-_k.prototype.applyTextPropertiesToMatrix = function(documentData, matrixHelper, lineNumber, xPos, yPos) {
+ITextElement.prototype.canResizeFont = function(_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+    this.buildNewText();
+    this.renderInnerContent();
+};
+
+ITextElement.prototype.setMinimumFontSize = function(_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+    this.buildNewText();
+    this.renderInnerContent();
+};
+
+ITextElement.prototype.applyTextPropertiesToMatrix = function(documentData, matrixHelper, lineNumber, xPos, yPos) {
     if(documentData.ps){
         matrixHelper.translate(documentData.ps[0],documentData.ps[1] + documentData.ascent,0);
     }
@@ -6826,51 +6840,52 @@
             break;
     }
     matrixHelper.translate(xPos, yPos, 0);
-}
+};
 
-_k.prototype.buildColor = function(colorData) {
+ITextElement.prototype.buildColor = function(colorData) {
     return 'rgb(' + Math.round(colorData[0]*255) + ',' + Math.round(colorData[1]*255) + ',' + Math.round(colorData[2]*255) + ')';
-}
+};
 
-_k.prototype.buildShapeString = _f.prototype.buildShapeString;
+ITextElement.prototype.buildShapeString = IShapeElement.prototype.buildShapeString;
 
-_k.prototype.emptyProp = new LetterProps();
+ITextElement.prototype.emptyProp = new LetterProps();
 
-_k.prototype.destroy = function(){
+ITextElement.prototype.destroy = function(){
     
 };
-function _g(){}
+function ICompElement(){}
 
-extendPrototype([_e, _af, _ad, _ac, _ci], _g);
+extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
 
-_g.prototype._cz = function(data,_x,comp) {
+ICompElement.prototype.initElement = function(data,globalData,comp) {
     this.initFrame();
-    this.initBaseData(data, _x, comp);
-    this.initTransform(data, _x, comp);
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
     this.initRenderable();
     this.initHierarchy();
     this.initRendererElement();
     this.createContainerElements();
     this.addMasks();
-    if(this.data.xt || !_x.progressiveLoad){
+    if(this.data.xt || !globalData.progressiveLoad){
         this.buildAllItems();
     }
     this.hide();
 };
 
-/*_g.prototype.hide = function(){
+/*ICompElement.prototype.hide = function(){
     if(!this.hidden){
         this.hideElement();
-        var i,len = this._br.length;
+        var i,len = this.elements.length;
         for( i = 0; i < len; i+=1 ){
-            if(this._br[i]){
-                this._br[i].hide();
+            if(this.elements[i]){
+                this.elements[i].hide();
             }
         }
     }
 };*/
 
-_g.prototype._az = function(num){
+ICompElement.prototype.prepareFrame = function(num){
+    this._mdf = false;
     this.prepareRenderableFrame(num);
     this.prepareProperties(num, this.isInRange);
     if(!this.isInRange && !this.data.xt){
@@ -6886,146 +6901,147 @@
     } else {
         this.renderedFrame = num/this.data.sr;
     }
-    var i,len = this._br.length;
-    if(!this._db){
+    var i,len = this.elements.length;
+    if(!this.completeLayers){
         this.checkLayers(this.renderedFrame);
     }
     for( i = 0; i < len; i+=1 ){
-        if(this._db || this._br[i]){
-            this._br[i]._az(this.renderedFrame - this.layers[i].st);
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+            if(this.elements[i]._mdf) {
+                this._mdf = true;
+            }
         }
     }
 };
 
-_g.prototype.renderInnerContent = function() {
+ICompElement.prototype.renderInnerContent = function() {
     var i,len = this.layers.length;
     for( i = 0; i < len; i += 1 ){
-        if(this._db || this._br[i]){
-            this._br[i]._ba();
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].renderFrame();
         }
     }
 };
 
-_g.prototype.setElements = function(elems){
-    this._br = elems;
+ICompElement.prototype.setElements = function(elems){
+    this.elements = elems;
 };
 
-_g.prototype.getElements = function(){
-    return this._br;
+ICompElement.prototype.getElements = function(){
+    return this.elements;
 };
 
-_g.prototype.destroyElements = function(){
+ICompElement.prototype.destroyElements = function(){
     var i,len = this.layers.length;
     for( i = 0; i < len; i+=1 ){
-        if(this._br[i]){
-            this._br[i].destroy();
+        if(this.elements[i]){
+            this.elements[i].destroy();
         }
     }
 };
 
-_g.prototype.destroy = function(){
+ICompElement.prototype.destroy = function(){
     this.destroyElements();
-    this.destroy_e();
+    this.destroyBaseElement();
 };
 
-function _h(data,_x,comp){
-    this.assetData = _x.getAssetData(data.refId);
-    this._cz(data,_x,comp);
+function IImageElement(data,globalData,comp){
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data,globalData,comp);
 }
 
-extendPrototype([_e,_af,_d,_ad,_ac,_ci], _h);
+extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], IImageElement);
 
-_h.prototype.createContent = function(){
+IImageElement.prototype.createContent = function(){
 
-    var assetPath = this._x.getAssetsPath(this.assetData);
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
 
-    this._cc = _ct('image');
-    this._cc.setAttribute('width',this.assetData.w+"px");
-    this._cc.setAttribute('height',this.assetData.h+"px");
-    this._cc.setAttribute('preserveAspectRatio','xMidYMid slice');
-    this._cc.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width',this.assetData.w+"px");
+    this.innerElem.setAttribute('height',this.assetData.h+"px");
+    this.innerElem.setAttribute('preserveAspectRatio','xMidYMid slice');
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
     
-    //TODO check if this is needed. Doesn't look like it is
-    //this._ca = this._cc;
-    this._bx.appendChild(this._cc);
+    this.layerElement.appendChild(this.innerElem);
 };
 
-function _j(data,_x,comp){
-    this._cz(data,_x,comp);
+function ISolidElement(data,globalData,comp){
+    this.initElement(data,globalData,comp);
 }
-extendPrototype([_h], _j);
+extendPrototype([IImageElement], ISolidElement);
 
-_j.prototype.createContent = function(){
+ISolidElement.prototype.createContent = function(){
 
-    var rect = _ct('rect');
+    var rect = createNS('rect');
     ////rect.style.width = this.data.sw;
     ////rect.style.height = this.data.sh;
     ////rect.style.fill = this.data.sc;
     rect.setAttribute('width',this.data.sw);
     rect.setAttribute('height',this.data.sh);
     rect.setAttribute('fill',this.data.sc);
-    this._bx.appendChild(rect);
+    this.layerElement.appendChild(rect);
 };
-function SVGCompElement(data,_x,comp){
+function SVGCompElement(data,globalData,comp){
     this.layers = data.layers;
     this.supports3d = true;
-    this._db = false;
-    this._dc = [];
-    this._br = this.layers ? _cv(this.layers.length) : [];
-    //this._bx = _ct('g');
-    this._cz(data,_x,comp);
-    this.tm = data.tm ? _ai._bo(this,data.tm,0,_x.frameRate,this._co) : {_placeholder:true};
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    //this.layerElement = createNS('g');
+    this.initElement(data,globalData,comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate,this.dynamicProperties) : {_placeholder:true};
 }
 
-extendPrototype([_ao, _g, _d], SVGCompElement);
-function _cw(data,_x,comp){
+extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
+function SVGTextElement(data,globalData,comp){
     this.textSpans = [];
     this.renderType = 'svg';
-    this._cz(data,_x,comp);
+    this.initElement(data,globalData,comp);
 }
 
-extendPrototype([_e,_af,_d,_ad,_ac,_ci,_k], _cw);
+extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement], SVGTextElement);
 
-_cw.prototype.createContent = function(){
+SVGTextElement.prototype.createContent = function(){
 
     if(this.data.ln){
-        this._bx.setAttribute('id',this.data.ln);
+        this.layerElement.setAttribute('id',this.data.ln);
     }
     if(this.data.cl){
-        this._bx.setAttribute('class',this.data.cl);
+        this.layerElement.setAttribute('class',this.data.cl);
     }
-    if (this.data.singleShape && !this._x._cr.chars) {
-        this.textContainer = _ct('text');
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+        this.textContainer = createNS('text');
     }
 };
 
-_cw.prototype.buildNewText = function(){
+SVGTextElement.prototype.buildNewText = function(){
     var i, len;
 
     var documentData = this.textProperty.currentData;
-    this._bt = _cv(documentData ? documentData.l.length : 0);
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
     if(documentData.fc) {
-        this._bx.setAttribute('fill', this.buildColor(documentData.fc));
+        this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
     }else{
-        this._bx.setAttribute('fill', 'rgba(0,0,0,0)');
+        this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
     }
     if(documentData.sc){
-        this._bx.setAttribute('stroke', this.buildColor(documentData.sc));
-        this._bx.setAttribute('stroke-width', documentData.sw);
+        this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+        this.layerElement.setAttribute('stroke-width', documentData.sw);
     }
-    this._bx.setAttribute('font-size', documentData.s);
-    var fontData = this._x._cr.getFontByName(documentData.f);
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
     if(fontData.fClass){
-        this._bx.setAttribute('class',fontData.fClass);
+        this.layerElement.setAttribute('class',fontData.fClass);
     } else {
-        this._bx.setAttribute('font-family', fontData.fFamily);
+        this.layerElement.setAttribute('font-family', fontData.fFamily);
         var fWeight = documentData.fWeight, fStyle = documentData.fStyle;
-        this._bx.setAttribute('font-style', fStyle);
-        this._bx.setAttribute('font-weight', fWeight);
+        this.layerElement.setAttribute('font-style', fStyle);
+        this.layerElement.setAttribute('font-weight', fWeight);
     }
 
     var letters = documentData.l || [];
-    var usesGlyphs = this._x._cr.chars;
+    var usesGlyphs = this.globalData.fontManager.chars;
     len = letters.length;
     if(!len){
         return;
@@ -7034,10 +7050,10 @@
     var matrixHelper = this.mHelper;
     var shapes, shapeStr = '', singleShape = this.data.singleShape;
     var xPos = 0, yPos = 0, firstLine = true;
-    var trackingOffset = documentData.tr/1000*documentData.s;
-    if(singleShape && !usesGlyphs) {
+    var trackingOffset = documentData.tr/1000*documentData.finalSize;
+    if(singleShape && !usesGlyphs && !documentData.sz) {
         var tElement = this.textContainer;
-        var justify = '';
+        var justify = 'start';
         switch(documentData.j) {
             case 1:
                 justify = 'end';
@@ -7045,59 +7061,56 @@
             case 2:
                 justify = 'middle';
                 break;
-            case 2:
-                justify = 'start';
-                break;
         }
         tElement.setAttribute('text-anchor',justify);
         tElement.setAttribute('letter-spacing',trackingOffset);
-        var textContent = documentData.t.split(String.fromCharCode(13));
+        var textContent = documentData.finalText.split(String.fromCharCode(13));
         len = textContent.length;
-        var yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+        yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
         for ( i = 0; i < len; i += 1) {
-            tSpan = this.textSpans[i] || _ct('tspan');
+            tSpan = this.textSpans[i] || createNS('tspan');
             tSpan.textContent = textContent[i];
             tSpan.setAttribute('x', 0);
             tSpan.setAttribute('y', yPos);
             tSpan.style.display = 'inherit';
             tElement.appendChild(tSpan);
             this.textSpans[i] = tSpan;
-            yPos += documentData.lh;
+            yPos += documentData.finalLineHeight;
         }
         
-        this._bx.appendChild(tElement);
+        this.layerElement.appendChild(tElement);
     } else {
         var cachedSpansLength = this.textSpans.length;
         var shapeData, charData;
         for (i = 0; i < len; i += 1) {
             if(!usesGlyphs || !singleShape || i === 0){
-                tSpan = cachedSpansLength > i ? this.textSpans[i] : _ct(usesGlyphs?'path':'text');
+                tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs?'path':'text');
                 if (cachedSpansLength <= i) {
                     tSpan.setAttribute('stroke-linecap', 'butt');
                     tSpan.setAttribute('stroke-linejoin','round');
                     tSpan.setAttribute('stroke-miterlimit','4');
                     this.textSpans[i] = tSpan;
-                    this._bx.appendChild(tSpan);
+                    this.layerElement.appendChild(tSpan);
                 }
                 tSpan.style.display = 'inherit';
             }
             
             matrixHelper.reset();
-            if(usesGlyphs) {
-                matrixHelper.scale(documentData.s / 100, documentData.s / 100);
-                if (singleShape) {
-                    if(letters[i].n) {
-                        xPos = -trackingOffset;
-                        yPos += documentData.yOffset;
-                        yPos += firstLine ? 1 : 0;
-                        firstLine = false;
-                    }
-                    this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-                    xPos += letters[i].l || 0;
-                    //xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-                    xPos += trackingOffset;
+            matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+            if (singleShape) {
+                if(letters[i].n) {
+                    xPos = -trackingOffset;
+                    yPos += documentData.yOffset;
+                    yPos += firstLine ? 1 : 0;
+                    firstLine = false;
                 }
-                charData = this._x._cr.getCharData(documentData.t.charAt(i), fontData.fStyle, this._x._cr.getFontByName(documentData.f).fFamily);
+                this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+                xPos += letters[i].l || 0;
+                //xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+                xPos += trackingOffset;
+            }
+            if(usesGlyphs) {
+                charData = this.globalData.fontManager.getCharData(documentData.finalText.charAt(i), fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
                 shapeData = charData && charData.data || {};
                 shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
                 if(!singleShape){
@@ -7106,6 +7119,9 @@
                     shapeStr += this.createPathShape(matrixHelper,shapes);
                 }
             } else {
+                if(singleShape) {
+                    tSpan.setAttribute("transform", "translate(" + matrixHelper.props[12] + "," + matrixHelper.props[13] + ")");
+                }
                 tSpan.textContent = letters[i].val;
                 tSpan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space","preserve");
             }
@@ -7121,64 +7137,64 @@
     }
     
     this._sizeChanged = true;
-}
+};
 
-_cw.prototype.sourceRectAtTime = function(time){
-    this._az(this.comp.renderedFrame - this.data.st);
+SVGTextElement.prototype.sourceRectAtTime = function(time){
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
     this.renderInnerContent();
     if(this._sizeChanged){
         this._sizeChanged = false;
-        var textBox = this._bx.getBBox();
+        var textBox = this.layerElement.getBBox();
         this.bbox = {
             top: textBox.y,
             left: textBox.x,
             width: textBox.width,
             height: textBox.height
-        }
+        };
     }
     return this.bbox;
-}
+};
 
-_cw.prototype.renderInnerContent = function(){
+SVGTextElement.prototype.renderInnerContent = function(){
 
     if(!this.data.singleShape){
         this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
         if(this.lettersChangedFlag || this.textAnimator.lettersChangedFlag){
             this._sizeChanged = true;
             var  i,len;
-            var _bt = this.textAnimator._bt;
+            var renderedLetters = this.textAnimator.renderedLetters;
 
             var letters = this.textProperty.currentData.l;
 
             len = letters.length;
-            var _bu, textSpan;
+            var renderedLetter, textSpan;
             for(i=0;i<len;i+=1){
                 if(letters[i].n){
                     continue;
                 }
-                _bu = _bt[i];
+                renderedLetter = renderedLetters[i];
                 textSpan = this.textSpans[i];
-                if(_bu.mdf.m) {
-                    textSpan.setAttribute('transform',_bu.m);
+                if(renderedLetter._mdf.m) {
+                    textSpan.setAttribute('transform',renderedLetter.m);
                 }
-                if(_bu.mdf.o) {
-                    textSpan.setAttribute('opacity',_bu.o);
+                if(renderedLetter._mdf.o) {
+                    textSpan.setAttribute('opacity',renderedLetter.o);
                 }
-                if(_bu.mdf.sw){
-                    textSpan.setAttribute('stroke-width',_bu.sw);
+                if(renderedLetter._mdf.sw){
+                    textSpan.setAttribute('stroke-width',renderedLetter.sw);
                 }
-                if(_bu.mdf.sc){
-                    textSpan.setAttribute('stroke',_bu.sc);
+                if(renderedLetter._mdf.sc){
+                    textSpan.setAttribute('stroke',renderedLetter.sc);
                 }
-                if(_bu.mdf.fc){
-                    textSpan.setAttribute('fill',_bu.fc);
+                if(renderedLetter._mdf.fc){
+                    textSpan.setAttribute('fill',renderedLetter.fc);
                 }
             }
         }
     }
-}
-function SVGShapeElement(data,_x,comp){
-    //List of drawable _br
+};
+function SVGShapeElement(data,globalData,comp){
+    //List of drawable elements
     this.shapes = [];
     // Full shape data
     this.shapesData = data.shapes;
@@ -7190,42 +7206,42 @@
     this.itemsData = [];
     //List of items in previous shape tree
     this.processedElements = [];
-    this._cz(data,_x,comp);
+    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.
-    // List of _br that have been created
+    // List of elements that have been created
     this.prevViewData = [];
 }
 
-extendPrototype([_e,_af,_d,_f,_ad,_ac,_ci], SVGShapeElement);
+extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement], SVGShapeElement);
 
 SVGShapeElement.prototype.initSecondaryElement = function() {
-}
+};
 
 SVGShapeElement.prototype.identityMatrix = new Matrix();
 
 SVGShapeElement.prototype.buildExpressionInterface = function(){};
 
 SVGShapeElement.prototype.createContent = function(){
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co, 0, [], true);
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties, 0, [], true);
 };
 
-SVGShapeElement.prototype.createStyleElement = function(data, level, _co){
+SVGShapeElement.prototype.createStyleElement = function(data, level, dynamicProperties){
     //TODO: prevent drawing of hidden styles
     var elementData;
     var styleOb = new SVGStyleData(data, level);
 
     var pathElement = styleOb.pElem;
     if(data.ty === 'st') {
-        elementData = new SVGStrokeStyleData(this, data, _co, styleOb);
+        elementData = new SVGStrokeStyleData(this, data, dynamicProperties, styleOb);
     } else if(data.ty === 'fl') {
-        elementData = new SVGFillStyleData(this, data, _co, styleOb);
+        elementData = new SVGFillStyleData(this, data, dynamicProperties, styleOb);
     } else if(data.ty === 'gf' || data.ty === 'gs') {
-        var gradientConstructor = data.ty === 'gf' ? _ck : _cj;
-        elementData = new gradientConstructor(this, data, _co, styleOb);
-        this._x.defs.appendChild(elementData.gf);
+        var gradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+        elementData = new gradientConstructor(this, data, dynamicProperties, styleOb);
+        this.globalData.defs.appendChild(elementData.gf);
         if (elementData.maskId) {
-            this._x.defs.appendChild(elementData.ms);
-            this._x.defs.appendChild(elementData.of);
+            this.globalData.defs.appendChild(elementData.ms);
+            this.globalData.defs.appendChild(elementData.of);
             pathElement.setAttribute('mask','url(#' + elementData.maskId + ')');
         }
     }
@@ -7251,7 +7267,7 @@
     }
     this.stylesList.push(styleOb);
     return elementData;
-}
+};
 
 SVGShapeElement.prototype.createGroupElement = function(data) {
     var elementData = new ShapeGroupData();
@@ -7259,13 +7275,13 @@
         elementData.gr.setAttribute('id',data.ln);
     }
     return elementData;
-}
+};
 
-SVGShapeElement.prototype._cp = function(data, _co) {
-    return new SVGTransformData(_ag._bj(this,data,_co), _ai._bo(this,data.o,0,0.01,_co))
-}
+SVGShapeElement.prototype.createTransformElement = function(data, dynamicProperties) {
+    return new SVGTransformData(TransformPropertyFactory.getTransformProperty(this,data,dynamicProperties), PropertyFactory.getProp(this,data.o,0,0.01,dynamicProperties));
+};
 
-SVGShapeElement.prototype.createShapeElement = function(data, ownTransformers, level, _co) {
+SVGShapeElement.prototype.createShapeElement = function(data, ownTransformers, level, dynamicProperties) {
     var ty = 4;
     if(data.ty === 'rc'){
         ty = 5;
@@ -7274,12 +7290,12 @@
     }else if(data.ty === 'sr'){
         ty = 7;
     }
-    var shapeProperty = _ah._bp(this,data,ty,_co);
-    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty)
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this,data,ty,dynamicProperties);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
     this.shapes.push(elementData.sh);
     this.addShapeToModifiers(elementData);
     return elementData;
-}
+};
 
 SVGShapeElement.prototype.setElementStyles = function(elementData){
     var arr = elementData.styles;
@@ -7289,23 +7305,23 @@
             arr.push(this.stylesList[j]);
         }
     }
-}
+};
 
 SVGShapeElement.prototype.reloadShapes = function(){
-    this._ch = true;
+    this._isFirstFrame = true;
     var i, len = this.itemsData.length;
     for( i = 0; i < len; i += 1) {
         this.prevViewData[i] = this.itemsData[i];
     }
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co, 0, [], true);
-    var i, len = this._co.length;
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties, 0, [], true);
+    len = this.dynamicProperties.length;
     for(i = 0; i < len; i += 1) {
-        this._co[i].getValue();
+        this.dynamicProperties[i].getValue();
     }
     this.renderModifiers();
-}
+};
 
-SVGShapeElement.prototype.searchShapes = function(arr,itemsData,prevViewData,container,_co, level, transformers, render){
+SVGShapeElement.prototype.searchShapes = function(arr,itemsData,prevViewData,container,dynamicProperties, level, transformers, render){
     var ownTransformers = [].concat(transformers);
     var i, len = arr.length - 1;
     var j, jLen;
@@ -7319,7 +7335,7 @@
         }
         if(arr[i].ty == 'fl' || arr[i].ty == 'st' || arr[i].ty == 'gf' || arr[i].ty == 'gs'){
             if(!processedPos){
-                itemsData[i] = this.createStyleElement(arr[i], level, _co);
+                itemsData[i] = this.createStyleElement(arr[i], level, dynamicProperties);
             } else {
                 itemsData[i].style.closed = false;
             }
@@ -7336,26 +7352,26 @@
                     itemsData[i].prevViewData[j] = itemsData[i].it[j];
                 }
             }
-            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,itemsData[i].gr,_co, level + 1, ownTransformers, render);
+            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,itemsData[i].gr,dynamicProperties, level + 1, ownTransformers, render);
             if(arr[i]._render){
                 container.appendChild(itemsData[i].gr);
             }
         }else if(arr[i].ty == 'tr'){
             if(!processedPos){
-                itemsData[i] = this._cp(arr[i], _co);
+                itemsData[i] = this.createTransformElement(arr[i], dynamicProperties);
             }
             currentTransform = itemsData[i].transform;
             ownTransformers.push(currentTransform);
         }else if(arr[i].ty == 'sh' || arr[i].ty == 'rc' || arr[i].ty == 'el' || arr[i].ty == 'sr'){
             if(!processedPos){
-                itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level, _co);
+                itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level, dynamicProperties);
             }
             this.setElementStyles(itemsData[i]);
 
         }else if(arr[i].ty == 'tm' || arr[i].ty == 'rd' || arr[i].ty == 'ms'){
             if(!processedPos){
-                modifier = _as.getModifier(arr[i].ty);
-                modifier.init(this,arr[i],_co);
+                modifier = ShapeModifiers.getModifier(arr[i].ty);
+                modifier.init(this,arr[i],dynamicProperties);
                 itemsData[i] = modifier;
                 this.shapeModifiers.push(modifier);
             } else {
@@ -7365,9 +7381,9 @@
             ownModifiers.push(modifier);
         }else if(arr[i].ty == 'rp'){
             if(!processedPos){
-                modifier = _as.getModifier(arr[i].ty);
+                modifier = ShapeModifiers.getModifier(arr[i].ty);
                 itemsData[i] = modifier;
-                modifier.init(this,arr,i,itemsData,_co);
+                modifier.init(this,arr,i,itemsData,dynamicProperties);
                 this.shapeModifiers.push(modifier);
                 render = false;
             }else{
@@ -7394,10 +7410,10 @@
     for(i=0;i<len;i+=1){
         this.stylesList[i].reset();
     }
-    this.renderShape(this.shapesData,this.itemsData, null);
+    this.renderShape(this.shapesData, this.itemsData, this.layerElement);
 
     for (i = 0; i < len; i += 1) {
-        if (this.stylesList[i].mdf || this._ch) {
+        if (this.stylesList[i]._mdf || this._isFirstFrame) {
             if(this.stylesList[i].msElem){
                 this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
                 //Adding M0 0 fixes same mask bug on all browsers
@@ -7410,16 +7426,15 @@
 
 
 SVGShapeElement.prototype.renderShape = function(items, data, container) {
-    //TODO: find out why a container could be missing
     var i, len = items.length - 1;
     var ty;
     for(i=0;i<=len;i+=1){
         ty = items[i].ty;
         if(ty == 'tr'){
-            if(this._ch || data[i].transform.op.mdf && container){
+            if(this._isFirstFrame || data[i].transform.op._mdf){
                 container.setAttribute('opacity',data[i].transform.op.v);
             }
-            if(this._ch || data[i].transform.mProps.mdf && container){
+            if(this._isFirstFrame || data[i].transform.mProps._mdf){
                 container.setAttribute('transform',data[i].transform.mProps.v.to2dCSS());
             }
         }else if(items[i]._render && (ty == 'sh' || ty == 'el' || ty == 'rc' || ty == 'sr')){
@@ -7447,13 +7462,13 @@
     var lvl = itemData.lvl;
     var paths, mat, props, iterations, k;
     for(l=0;l<lLen;l+=1){
-        redraw = itemData.sh.mdf || this._ch;
+        redraw = itemData.sh._mdf || this._isFirstFrame;
         if(itemData.styles[l].lvl < lvl){
             mat = this.mHelper.reset();
             iterations = lvl - itemData.styles[l].lvl;
             k = itemData.transformers.length-1;
             while(iterations > 0) {
-                redraw = itemData.transformers[k].mProps.mdf || redraw;
+                redraw = itemData.transformers[k].mProps._mdf || redraw;
                 props = itemData.transformers[k].mProps.v.props;
                 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]);
                 iterations --;
@@ -7477,17 +7492,17 @@
             pathStringTransformed = itemData.caches[l];
         }
         itemData.styles[l].d += pathStringTransformed;
-        itemData.styles[l].mdf = redraw || itemData.styles[l].mdf;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
     }
 };
 
 SVGShapeElement.prototype.renderFill = function(styleData,itemData){
     var styleElem = itemData.style;
 
-    if(itemData.c.mdf || this._ch){
+    if(itemData.c._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('fill','rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')');
     }
-    if(itemData.o.mdf || this._ch){
+    if(itemData.o._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('fill-opacity',itemData.o.v);
     }
 };
@@ -7497,11 +7512,11 @@
     var hasOpacity = itemData.g._hasOpacity;
     var pt1 = itemData.s.v, pt2 = itemData.e.v;
 
-    if (itemData.o.mdf || this._ch) {
+    if (itemData.o._mdf || this._isFirstFrame) {
         var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
         itemData.style.pElem.setAttribute(attr, itemData.o.v);
     }
-    if (itemData.s.mdf || this._ch) {
+    if (itemData.s._mdf || this._isFirstFrame) {
         var attr1 = styleData.t === 1 ? 'x1' : 'cx';
         var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
         gfill.setAttribute(attr1, pt1[0]);
@@ -7512,7 +7527,7 @@
         }
     }
     var stops, i, len, stop;
-    if (itemData.g.cmdf || this._ch) {
+    if (itemData.g._cmdf || this._isFirstFrame) {
         stops = itemData.cst;
         var cValues = itemData.g.c;
         len = stops.length;
@@ -7522,7 +7537,7 @@
             stop.setAttribute('stop-color','rgb('+ cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ','+cValues[i * 4 + 3] + ')');
         }
     }
-    if (hasOpacity && (itemData.g.omdf || this._ch)) {
+    if (hasOpacity && (itemData.g._omdf || this._isFirstFrame)) {
         var oValues = itemData.g.o;
         if(itemData.g._collapsable) {
             stops = itemData.cst;
@@ -7539,7 +7554,7 @@
         }
     }
     if (styleData.t === 1) {
-        if (itemData.e.mdf  || this._ch) {
+        if (itemData.e._mdf  || this._isFirstFrame) {
             gfill.setAttribute('x2', pt2[0]);
             gfill.setAttribute('y2', pt2[1]);
             if (hasOpacity && !itemData.g._collapsable) {
@@ -7549,14 +7564,14 @@
         }
     } else {
         var rad;
-        if (itemData.s.mdf || itemData.e.mdf || this._ch) {
+        if (itemData.s._mdf || itemData.e._mdf || this._isFirstFrame) {
             rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
             gfill.setAttribute('r', rad);
             if(hasOpacity && !itemData.g._collapsable){
                 itemData.of.setAttribute('r', rad);
             }
         }
-        if (itemData.e.mdf || itemData.h.mdf || itemData.a.mdf || this._ch) {
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || this._isFirstFrame) {
             if (!rad) {
                 rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
             }
@@ -7580,17 +7595,17 @@
 SVGShapeElement.prototype.renderStroke = function(styleData, itemData) {
     var styleElem = itemData.style;
     var d = itemData.d;
-    if (d && (d.mdf || this._ch)) {
+    if (d && (d._mdf || this._isFirstFrame)) {
         styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
         styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
     }
-    if(itemData.c && (itemData.c.mdf || this._ch)){
+    if(itemData.c && (itemData.c._mdf || this._isFirstFrame)){
         styleElem.pElem.setAttribute('stroke','rgb(' + bm_floor(itemData.c.v[0]) + ',' + bm_floor(itemData.c.v[1]) + ',' + bm_floor(itemData.c.v[2]) + ')');
     }
-    if(itemData.o.mdf || this._ch){
+    if(itemData.o._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
     }
-    if(itemData.w.mdf || this._ch){
+    if(itemData.w._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
         if(styleElem.msElem){
             styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
@@ -7599,121 +7614,121 @@
 };
 
 SVGShapeElement.prototype.destroy = function(){
-    this.destroy_e();
+    this.destroyBaseElement();
     this.shapeData = null;
     this.itemsData = null;
 };
 
-function _bb(filter, _cl){
-    this._cl = _cl;
-    var feColorMatrix = _ct('feColorMatrix');
+function SVGTintFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','linearRGB');
     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');
     feColorMatrix.setAttribute('result','f1');
     filter.appendChild(feColorMatrix);
-    feColorMatrix = _ct('feColorMatrix');
+    feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
     feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
     feColorMatrix.setAttribute('result','f2');
     filter.appendChild(feColorMatrix);
     this.matrixFilter = feColorMatrix;
-    if(_cl._cm[2].p.v !== 100 || _cl._cm[2].p.k){
-        var feMerge = _ct('feMerge');
+    if(filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k){
+        var feMerge = createNS('feMerge');
         filter.appendChild(feMerge);
         var feMergeNode;
-        feMergeNode = _ct('feMergeNode');
+        feMergeNode = createNS('feMergeNode');
         feMergeNode.setAttribute('in','SourceGraphic');
         feMerge.appendChild(feMergeNode);
-        feMergeNode = _ct('feMergeNode');
+        feMergeNode = createNS('feMergeNode');
         feMergeNode.setAttribute('in','f2');
         feMerge.appendChild(feMergeNode);
     }
 }
 
-_bb.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        var colorBlack = this._cl._cm[0].p.v;
-        var colorWhite = this._cl._cm[1].p.v;
-        var opacity = this._cl._cm[2].p.v/100;
+SVGTintFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        var colorBlack = this.filterManager.effectElements[0].p.v;
+        var colorWhite = this.filterManager.effectElements[1].p.v;
+        var opacity = this.filterManager.effectElements[2].p.v/100;
         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');
     }
 };
-function _bc(filter, _cl){
-    this._cl = _cl;
-    var feColorMatrix = _ct('feColorMatrix');
+function SVGFillFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
     feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
     filter.appendChild(feColorMatrix);
     this.matrixFilter = feColorMatrix;
 }
-_bc.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        var color = this._cl._cm[2].p.v;
-        var opacity = this._cl._cm[6].p.v;
+SVGFillFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        var color = this.filterManager.effectElements[2].p.v;
+        var opacity = this.filterManager.effectElements[6].p.v;
         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');
     }
 };
-function _bd(elem, _cl){
+function SVGStrokeEffect(elem, filterManager){
     this.initialized = false;
-    this._cl = _cl;
+    this.filterManager = filterManager;
     this.elem = elem;
     this.paths = [];
 }
 
-_bd.prototype.initialize = function(){
+SVGStrokeEffect.prototype.initialize = function(){
 
-    var elemChildren = this.elem._bx.children || this.elem._bx.childNodes;
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
     var path,groupPath, i, len;
-    if(this._cl._cm[1].p.v === 1){
+    if(this.filterManager.effectElements[1].p.v === 1){
         len = this.elem.maskManager.masksProperties.length;
         i = 0;
     } else {
-        i = this._cl._cm[0].p.v - 1;
+        i = this.filterManager.effectElements[0].p.v - 1;
         len = i + 1;
     }
-    groupPath = _ct('g'); 
+    groupPath = createNS('g'); 
     groupPath.setAttribute('fill','none');
     groupPath.setAttribute('stroke-linecap','round');
     groupPath.setAttribute('stroke-dashoffset',1);
     for(i;i<len;i+=1){
-        path = _ct('path');
+        path = createNS('path');
         groupPath.appendChild(path);
         this.paths.push({p:path,m:i});
     }
-    if(this._cl._cm[10].p.v === 3){
-        var mask = _ct('mask');
+    if(this.filterManager.effectElements[10].p.v === 3){
+        var mask = createNS('mask');
         var id = 'stms_' + randomString(10);
         mask.setAttribute('id',id);
         mask.setAttribute('mask-type','alpha');
         mask.appendChild(groupPath);
-        this.elem._x.defs.appendChild(mask);
-        var g = _ct('g');
+        this.elem.globalData.defs.appendChild(mask);
+        var g = createNS('g');
         g.setAttribute('mask','url(' + locationHref + '#'+id+')');
         if(elemChildren[0]){
             g.appendChild(elemChildren[0]);
         }
-        this.elem._bx.appendChild(g);
+        this.elem.layerElement.appendChild(g);
         this.masker = mask;
         groupPath.setAttribute('stroke','#fff');
-    } else if(this._cl._cm[10].p.v === 1 || this._cl._cm[10].p.v === 2){
-        if(this._cl._cm[10].p.v === 2){
-            var elemChildren = this.elem._bx.children || this.elem._bx.childNodes;
+    } else if(this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2){
+        if(this.filterManager.effectElements[10].p.v === 2){
+            elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
             while(elemChildren.length){
-                this.elem._bx.removeChild(elemChildren[0]);
+                this.elem.layerElement.removeChild(elemChildren[0]);
             }
         }
-        this.elem._bx.appendChild(groupPath);
-        this.elem._bx.removeAttribute('mask');
+        this.elem.layerElement.appendChild(groupPath);
+        this.elem.layerElement.removeAttribute('mask');
         groupPath.setAttribute('stroke','#fff');
     }
     this.initialized = true;
     this.pathMasker = groupPath;
-}
+};
 
-_bd.prototype._ba = function(forceRender){
+SVGStrokeEffect.prototype.renderFrame = function(forceRender){
     if(!this.initialized){
         this.initialize();
     }
@@ -7722,111 +7737,111 @@
     for(i=0;i<len;i+=1){
         mask = this.elem.maskManager.viewData[this.paths[i].m];
         path = this.paths[i].p;
-        if(forceRender || this._cl.mdf || mask.prop.mdf){
+        if(forceRender || this.filterManager._mdf || mask.prop._mdf){
             path.setAttribute('d',mask.lastPath);
         }
-        if(forceRender || this._cl._cm[9].p.mdf || this._cl._cm[4].p.mdf || this._cl._cm[7].p.mdf || this._cl._cm[8].p.mdf || mask.prop.mdf){
+        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){
             var dasharrayValue;
-            if(this._cl._cm[7].p.v !== 0 || this._cl._cm[8].p.v !== 100){
-                var s = Math.min(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100;
-                var e = Math.max(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100;
+            if(this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100){
+                var s = Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100;
+                var e = Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100;
                 var l = path.getTotalLength();
                 dasharrayValue = '0 0 0 ' + l*s + ' ';
                 var lineLength = l*(e-s);
-                var segment = 1+this._cl._cm[4].p.v*2*this._cl._cm[9].p.v/100;
+                var segment = 1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100;
                 var units = Math.floor(lineLength/segment);
                 var j;
                 for(j=0;j<units;j+=1){
-                    dasharrayValue += '1 ' + this._cl._cm[4].p.v*2*this._cl._cm[9].p.v/100 + ' ';
+                    dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100 + ' ';
                 }
                 dasharrayValue += '0 ' + l*10 + ' 0 0';
             } else {
-                dasharrayValue = '1 ' + this._cl._cm[4].p.v*2*this._cl._cm[9].p.v/100;
+                dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100;
             }
             path.setAttribute('stroke-dasharray',dasharrayValue);
         }
     }
-    if(forceRender || this._cl._cm[4].p.mdf){
-        this.pathMasker.setAttribute('stroke-width',this._cl._cm[4].p.v*2);
+    if(forceRender || this.filterManager.effectElements[4].p._mdf){
+        this.pathMasker.setAttribute('stroke-width',this.filterManager.effectElements[4].p.v*2);
     }
     
-    if(forceRender || this._cl._cm[6].p.mdf){
-        this.pathMasker.setAttribute('opacity',this._cl._cm[6].p.v);
+    if(forceRender || this.filterManager.effectElements[6].p._mdf){
+        this.pathMasker.setAttribute('opacity',this.filterManager.effectElements[6].p.v);
     }
-    if(this._cl._cm[10].p.v === 1 || this._cl._cm[10].p.v === 2){
-        if(forceRender || this._cl._cm[3].p.mdf){
-            var color = this._cl._cm[3].p.v;
+    if(this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2){
+        if(forceRender || this.filterManager.effectElements[3].p._mdf){
+            var color = this.filterManager.effectElements[3].p.v;
             this.pathMasker.setAttribute('stroke','rgb('+bm_floor(color[0]*255)+','+bm_floor(color[1]*255)+','+bm_floor(color[2]*255)+')');
         }
     }
 };
-function _be(filter, _cl){
-    this._cl = _cl;
-    var feColorMatrix = _ct('feColorMatrix');
+function SVGTritoneFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','linearRGB');
     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');
     feColorMatrix.setAttribute('result','f1');
     filter.appendChild(feColorMatrix);
-    var feComponentTransfer = _ct('feComponentTransfer');
+    var feComponentTransfer = createNS('feComponentTransfer');
     feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
     filter.appendChild(feComponentTransfer);
     this.matrixFilter = feComponentTransfer;
-    var feFuncR = _ct('feFuncR');
+    var feFuncR = createNS('feFuncR');
     feFuncR.setAttribute('type','table');
     feComponentTransfer.appendChild(feFuncR);
     this.feFuncR = feFuncR;
-    var feFuncG = _ct('feFuncG');
+    var feFuncG = createNS('feFuncG');
     feFuncG.setAttribute('type','table');
     feComponentTransfer.appendChild(feFuncG);
     this.feFuncG = feFuncG;
-    var feFuncB = _ct('feFuncB');
+    var feFuncB = createNS('feFuncB');
     feFuncB.setAttribute('type','table');
     feComponentTransfer.appendChild(feFuncB);
     this.feFuncB = feFuncB;
 }
 
-_be.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        var color1 = this._cl._cm[0].p.v;
-        var color2 = this._cl._cm[1].p.v;
-        var color3 = this._cl._cm[2].p.v;
-        var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0]
-        var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1]
-        var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2]
+SVGTritoneFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        var color1 = this.filterManager.effectElements[0].p.v;
+        var color2 = this.filterManager.effectElements[1].p.v;
+        var color3 = this.filterManager.effectElements[2].p.v;
+        var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+        var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+        var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
         this.feFuncR.setAttribute('tableValues', tableR);
         this.feFuncG.setAttribute('tableValues', tableG);
         this.feFuncB.setAttribute('tableValues', tableB);
-        //var opacity = this._cl._cm[2].p.v/100;
+        //var opacity = this.filterManager.effectElements[2].p.v/100;
         //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');
     }
 };
-function _bf(filter, _cl){
-    this._cl = _cl;
-    var _cm = this._cl._cm;
-    var feComponentTransfer = _ct('feComponentTransfer');
+function SVGProLevelsFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
     var feFuncR, feFuncG, feFuncB;
     
-    if(_cm[10].p.k || _cm[10].p.v !== 0 || _cm[11].p.k || _cm[11].p.v !== 1 || _cm[12].p.k || _cm[12].p.v !== 1 || _cm[13].p.k || _cm[13].p.v !== 0 || _cm[14].p.k || _cm[14].p.v !== 1){
+    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){
         this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
     }
-    if(_cm[17].p.k || _cm[17].p.v !== 0 || _cm[18].p.k || _cm[18].p.v !== 1 || _cm[19].p.k || _cm[19].p.v !== 1 || _cm[20].p.k || _cm[20].p.v !== 0 || _cm[21].p.k || _cm[21].p.v !== 1){
+    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){
         this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
     }
-    if(_cm[24].p.k || _cm[24].p.v !== 0 || _cm[25].p.k || _cm[25].p.v !== 1 || _cm[26].p.k || _cm[26].p.v !== 1 || _cm[27].p.k || _cm[27].p.v !== 0 || _cm[28].p.k || _cm[28].p.v !== 1){
+    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){
         this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
     }
-    if(_cm[31].p.k || _cm[31].p.v !== 0 || _cm[32].p.k || _cm[32].p.v !== 1 || _cm[33].p.k || _cm[33].p.v !== 1 || _cm[34].p.k || _cm[34].p.v !== 0 || _cm[35].p.k || _cm[35].p.v !== 1){
+    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){
         this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
     }
     
     if(this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA){
         feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
         filter.appendChild(feComponentTransfer);
-        feComponentTransfer = _ct('feComponentTransfer');
+        feComponentTransfer = createNS('feComponentTransfer');
     }
 
-    if(_cm[3].p.k || _cm[3].p.v !== 0 || _cm[4].p.k || _cm[4].p.v !== 1 || _cm[5].p.k || _cm[5].p.v !== 1 || _cm[6].p.k || _cm[6].p.v !== 0 || _cm[7].p.k || _cm[7].p.v !== 1){
+    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){
 
         feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
         filter.appendChild(feComponentTransfer);
@@ -7836,14 +7851,14 @@
     }
 }
 
-_bf.prototype.createFeFunc = function(type, feComponentTransfer) {
-    var feFunc = _ct(type);
+SVGProLevelsFilter.prototype.createFeFunc = function(type, feComponentTransfer) {
+    var feFunc = createNS(type);
     feFunc.setAttribute('type','table');
     feComponentTransfer.appendChild(feFunc);
     return feFunc;
 };
 
-_bf.prototype.getTableValue = function(inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+SVGProLevelsFilter.prototype.getTableValue = function(inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
     var cnt = 0;
     var segments = 256;
     var perc;
@@ -7869,76 +7884,69 @@
     return table.join(' ');
 };
 
-_bf.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
+SVGProLevelsFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
         var val, cnt, perc, bezier;
-        var _cm = this._cl._cm;
-        if(this.feFuncRComposed && (forceRender || _cm[3].p.mdf || _cm[4].p.mdf || _cm[5].p.mdf || _cm[6].p.mdf || _cm[7].p.mdf)){
-            val = this.getTableValue(_cm[3].p.v,_cm[4].p.v,_cm[5].p.v,_cm[6].p.v,_cm[7].p.v);
+        var effectElements = this.filterManager.effectElements;
+        if(this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)){
+            val = this.getTableValue(effectElements[3].p.v,effectElements[4].p.v,effectElements[5].p.v,effectElements[6].p.v,effectElements[7].p.v);
             this.feFuncRComposed.setAttribute('tableValues',val);
             this.feFuncGComposed.setAttribute('tableValues',val);
             this.feFuncBComposed.setAttribute('tableValues',val);
         }
 
 
-        if(this.feFuncR && (forceRender || _cm[10].p.mdf || _cm[11].p.mdf || _cm[12].p.mdf || _cm[13].p.mdf || _cm[14].p.mdf)){
-            val = this.getTableValue(_cm[10].p.v,_cm[11].p.v,_cm[12].p.v,_cm[13].p.v,_cm[14].p.v);
+        if(this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)){
+            val = this.getTableValue(effectElements[10].p.v,effectElements[11].p.v,effectElements[12].p.v,effectElements[13].p.v,effectElements[14].p.v);
             this.feFuncR.setAttribute('tableValues',val);
         }
 
-        if(this.feFuncG && (forceRender || _cm[17].p.mdf || _cm[18].p.mdf || _cm[19].p.mdf || _cm[20].p.mdf || _cm[21].p.mdf)){
-            val = this.getTableValue(_cm[17].p.v,_cm[18].p.v,_cm[19].p.v,_cm[20].p.v,_cm[21].p.v);
+        if(this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)){
+            val = this.getTableValue(effectElements[17].p.v,effectElements[18].p.v,effectElements[19].p.v,effectElements[20].p.v,effectElements[21].p.v);
             this.feFuncG.setAttribute('tableValues',val);
         }
 
-        if(this.feFuncB && (forceRender || _cm[24].p.mdf || _cm[25].p.mdf || _cm[26].p.mdf || _cm[27].p.mdf || _cm[28].p.mdf)){
-            val = this.getTableValue(_cm[24].p.v,_cm[25].p.v,_cm[26].p.v,_cm[27].p.v,_cm[28].p.v);
+        if(this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)){
+            val = this.getTableValue(effectElements[24].p.v,effectElements[25].p.v,effectElements[26].p.v,effectElements[27].p.v,effectElements[28].p.v);
             this.feFuncB.setAttribute('tableValues',val);
         }
 
-        if(this.feFuncA && (forceRender || _cm[31].p.mdf || _cm[32].p.mdf || _cm[33].p.mdf || _cm[34].p.mdf || _cm[35].p.mdf)){
-            val = this.getTableValue(_cm[31].p.v,_cm[32].p.v,_cm[33].p.v,_cm[34].p.v,_cm[35].p.v);
+        if(this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)){
+            val = this.getTableValue(effectElements[31].p.v,effectElements[32].p.v,effectElements[33].p.v,effectElements[34].p.v,effectElements[35].p.v);
             this.feFuncA.setAttribute('tableValues',val);
         }
         
     }
 };
-function _bg(filter, _cl){
-    /*<feGaussianBlur in="SourceAlpha" stdDeviation="3"/> <!-- stdDeviation is how much to blur -->
-  <feOffset dx="2" dy="2" result="offsetblur"/> <!-- how much to offset -->
-  <feMerge> 
-    <feMergeNode/> <!-- this contains the offset blurred image -->
-    <feMergeNode in="SourceGraphic"/> <!-- this contains the element that the filter is applied to -->
-  </feMerge>*/
-  /*<feFlood flood-color="#3D4574" flood-opacity="0.5" result="offsetColor"/>*/
+function SVGDropShadowEffect(filter, filterManager){
     filter.setAttribute('x','-100%');
     filter.setAttribute('y','-100%');
     filter.setAttribute('width','400%');
     filter.setAttribute('height','400%');
-    this._cl = _cl;
+    this.filterManager = filterManager;
 
-    var feGaussianBlur = _ct('feGaussianBlur');
+    var feGaussianBlur = createNS('feGaussianBlur');
     feGaussianBlur.setAttribute('in','SourceAlpha');
     feGaussianBlur.setAttribute('result','drop_shadow_1');
     feGaussianBlur.setAttribute('stdDeviation','0');
     this.feGaussianBlur = feGaussianBlur;
     filter.appendChild(feGaussianBlur);
 
-    var feOffset = _ct('feOffset');
+    var feOffset = createNS('feOffset');
     feOffset.setAttribute('dx','25');
     feOffset.setAttribute('dy','0');
     feOffset.setAttribute('in','drop_shadow_1');
     feOffset.setAttribute('result','drop_shadow_2');
     this.feOffset = feOffset;
     filter.appendChild(feOffset);
-    var feFlood = _ct('feFlood');
+    var feFlood = createNS('feFlood');
     feFlood.setAttribute('flood-color','#00ff00');
     feFlood.setAttribute('flood-opacity','1');
     feFlood.setAttribute('result','drop_shadow_3');
     this.feFlood = feFlood;
     filter.appendChild(feFlood);
 
-    var feComposite = _ct('feComposite');
+    var feComposite = createNS('feComposite');
     feComposite.setAttribute('in','drop_shadow_3');
     feComposite.setAttribute('in2','drop_shadow_2');
     feComposite.setAttribute('operator','in');
@@ -7946,12 +7954,12 @@
     filter.appendChild(feComposite);
 
 
-    var feMerge = _ct('feMerge');
+    var feMerge = createNS('feMerge');
     filter.appendChild(feMerge);
     var feMergeNode;
-    feMergeNode = _ct('feMergeNode');
+    feMergeNode = createNS('feMergeNode');
     feMerge.appendChild(feMergeNode);
-    feMergeNode = _ct('feMergeNode');
+    feMergeNode = createNS('feMergeNode');
     feMergeNode.setAttribute('in','SourceGraphic');
     this.feMergeNode = feMergeNode;
     this.feMerge = feMerge;
@@ -7959,31 +7967,31 @@
     feMerge.appendChild(feMergeNode);
 }
 
-_bg.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        if(forceRender || this._cl._cm[4].p.mdf){
-            this.feGaussianBlur.setAttribute('stdDeviation', this._cl._cm[4].p.v / 4);
+SVGDropShadowEffect.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        if(forceRender || this.filterManager.effectElements[4].p._mdf){
+            this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
         }
-        if(forceRender || this._cl._cm[0].p.mdf){
-            var col = this._cl._cm[0].p.v;
+        if(forceRender || this.filterManager.effectElements[0].p._mdf){
+            var col = this.filterManager.effectElements[0].p.v;
             this.feFlood.setAttribute('flood-color',rgbToHex(Math.round(col[0]*255),Math.round(col[1]*255),Math.round(col[2]*255)));
         }
-        if(forceRender || this._cl._cm[1].p.mdf){
-            this.feFlood.setAttribute('flood-opacity',this._cl._cm[1].p.v/255);
+        if(forceRender || this.filterManager.effectElements[1].p._mdf){
+            this.feFlood.setAttribute('flood-opacity',this.filterManager.effectElements[1].p.v/255);
         }
-        if(forceRender || this._cl._cm[2].p.mdf || this._cl._cm[3].p.mdf){
-            var distance = this._cl._cm[3].p.v
-            var angle = (this._cl._cm[2].p.v - 90) * degToRads
-            var x = distance * Math.cos(angle)
-            var y = distance * Math.sin(angle)
+        if(forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf){
+            var distance = this.filterManager.effectElements[3].p.v;
+            var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+            var x = distance * Math.cos(angle);
+            var y = distance * Math.sin(angle);
             this.feOffset.setAttribute('dx', x);
             this.feOffset.setAttribute('dy', y);
         }
-        /*if(forceRender || this._cl._cm[5].p.mdf){
-            if(this._cl._cm[5].p.v === 1 && this.originalNodeAdded) {
+        /*if(forceRender || this.filterManager.effectElements[5].p._mdf){
+            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
                 this.feMerge.removeChild(this.feMergeNode);
                 this.originalNodeAdded = false;
-            } else if(this._cl._cm[5].p.v === 0 && !this.originalNodeAdded) {
+            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
                 this.feMerge.appendChild(this.feMergeNode);
                 this.originalNodeAdded = true;
             }
@@ -7993,18 +8001,18 @@
 var _svgMatteSymbols = [];
 var _svgMatteMaskCounter = 0;
 
-function _bh(filterElem, _cl, elem){
+function SVGMatte3Effect(filterElem, filterManager, elem){
     this.initialized = false;
-    this._cl = _cl;
+    this.filterManager = filterManager;
     this.filterElem = filterElem;
     this.elem = elem;
-    elem.matteElement = _ct('g');
-    elem.matteElement.appendChild(elem._bx);
-    elem.matteElement.appendChild(elem._bz);
-    elem._by = elem.matteElement;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
 }
 
-_bh.prototype.findSymbol = function(mask) {
+SVGMatte3Effect.prototype.findSymbol = function(mask) {
     var i = 0, len = _svgMatteSymbols.length;
     while(i < len) {
         if(_svgMatteSymbols[i] === mask) {
@@ -8013,17 +8021,17 @@
         i += 1;
     }
     return null;
-}
+};
 
-_bh.prototype.replaceInParent = function(mask, symbolId) {
-    var parentNode = mask._bx.parentNode;
+SVGMatte3Effect.prototype.replaceInParent = function(mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
     if(!parentNode) {
         return;
     }
     var children = parentNode.children;
     var i = 0, len = children.length;
     while (i < len) {
-        if (children[i] === mask._bx) {
+        if (children[i] === mask.layerElement) {
             break;
         }
         i += 1;
@@ -8032,102 +8040,99 @@
     if (i <= len - 2) {
         nextChild = children[i + 1];
     }
-    var useElem = _ct('use');
+    var useElem = createNS('use');
     useElem.setAttribute('href', '#' + symbolId);
     if(nextChild) {
         parentNode.insertBefore(useElem, nextChild);
     } else {
         parentNode.appendChild(useElem);
     }
-}
+};
 
-_bh.prototype.setElementAsMask = function(elem, mask) {
+SVGMatte3Effect.prototype.setElementAsMask = function(elem, mask) {
     if(!this.findSymbol(mask)) {
         var symbolId = 'matte_' + randomString(5) + '_' + _svgMatteMaskCounter++;
-        var masker = _ct('mask');
+        var masker = createNS('mask');
         masker.setAttribute('id', mask.layerId);
         masker.setAttribute('mask-type', 'alpha');
         _svgMatteSymbols.push(mask);
-        var defs = elem._x.defs;
+        var defs = elem.globalData.defs;
         defs.appendChild(masker);
-        var symbol = _ct('symbol');
+        var symbol = createNS('symbol');
         symbol.setAttribute('id', symbolId);
         this.replaceInParent(mask, symbolId);
-        symbol.appendChild(mask._bx);
+        symbol.appendChild(mask.layerElement);
         defs.appendChild(symbol);
-        useElem = _ct('use');
+        useElem = createNS('use');
         useElem.setAttribute('href', '#' + symbolId);
         masker.appendChild(useElem);
         mask.data.hd = false;
         mask.show();
     }
     elem.setMatte(mask.layerId);
-}
+};
 
-_bh.prototype.initialize = function() {
-    var ind = this._cl._cm[0].p.v;
-    var i = 0, len = this.elem.comp._br.length;
+SVGMatte3Effect.prototype.initialize = function() {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var i = 0, len = this.elem.comp.elements.length;
     while (i < len) {
-    	if (this.elem.comp._br[i].data.ind === ind) {
-    		this.setElementAsMask(this.elem, this.elem.comp._br[i]);
+    	if (this.elem.comp.elements[i].data.ind === ind) {
+    		this.setElementAsMask(this.elem, this.elem.comp.elements[i]);
     	}
     	i += 1;
     }
     this.initialized = true;
-}
+};
 
-_bh.prototype._ba = function() {
+SVGMatte3Effect.prototype.renderFrame = function() {
 	if(!this.initialized) {
 		this.initialize();
 	}
-}
-function _bi(elem){
+};
+function SVGEffects(elem){
     var i, len = elem.data.ef ? elem.data.ef.length : 0;
     var filId = randomString(10);
     var fil = filtersFactory.createFilter(filId);
     var count = 0;
     this.filters = [];
-    var _cl;
+    var filterManager;
     for(i=0;i<len;i+=1){
+        filterManager = null;
         if(elem.data.ef[i].ty === 20){
             count += 1;
-            _cl = new _bb(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 21){
             count += 1;
-            _cl = new _bc(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 22){
-            _cl = new _bd(elem, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 23){
             count += 1;
-            _cl = new _be(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 24){
             count += 1;
-            _cl = new _bf(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 25){
             count += 1;
-            _cl = new _bg(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 28){
             //count += 1;
-            _cl = new _bh(fil, elem.effects._cm[i], elem);
-            this.filters.push(_cl);
+            filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+        }
+        if(filterManager) {
+            this.filters.push(filterManager);
         }
     }
     if(count){
-        elem._x.defs.appendChild(fil);
-        elem._bx.setAttribute('filter','url(' + locationHref + '#'+filId+')');
+        elem.globalData.defs.appendChild(fil);
+        elem.layerElement.setAttribute('filter','url(' + locationHref + '#'+filId+')');
     }
 }
 
-_bi.prototype._ba = function(_ch){
+SVGEffects.prototype.renderFrame = function(_isFirstFrame){
     var i, len = this.filters.length;
     for(i=0;i<len;i+=1){
-        this.filters[i]._ba(_ch);
+        this.filters[i].renderFrame(_isFirstFrame);
     }
 };
 var animationManager = (function(){
@@ -8166,7 +8171,7 @@
             }
             i+=1;
         }
-        var animItem = new _a();
+        var animItem = new AnimationItem();
         setupAnimation(animItem, element);
         animItem.setData(element, animationData);
         return animItem;
@@ -8193,7 +8198,7 @@
     }
 
     function loadAnimation(params){
-        var animItem = new _a();
+        var animItem = new AnimationItem();
         setupAnimation(animItem, null);
         animItem.setParams(params);
         return animItem;
@@ -8220,14 +8225,6 @@
             registeredAnimations[i].animation.play(animation);
         }
     }
-
-    function moveFrame (value, animation) {
-        initTime = Date.now();
-        var i;
-        for(i=0;i<len;i+=1){
-            registeredAnimations[i].animation.moveFrame(value,animation);
-        }
-    }
     function resume(nowTime) {
         var elapsedTime = nowTime - initTime;
         var i;
@@ -8298,7 +8295,7 @@
             }
             var body = document.getElementsByTagName('body')[0];
             body.innerHTML = '';
-            var div = _cu('div');
+            var div = createTag('div');
             div.style.width = '100%';
             div.style.height = '100%';
             div.setAttribute('data-bm-type',renderer);
@@ -8337,7 +8334,6 @@
     moduleOb.setSpeed = setSpeed;
     moduleOb.setDirection = setDirection;
     moduleOb.play = play;
-    moduleOb.moveFrame = moveFrame;
     moduleOb.pause = pause;
     moduleOb.stop = stop;
     moduleOb.togglePause = togglePause;
@@ -8349,7 +8345,7 @@
     return moduleOb;
 }());
 
-var _a = function () {
+var AnimationItem = function () {
     this._cbs = [];
     this.name = '';
     this.path = '';
@@ -8361,7 +8357,7 @@
     this.frameMult = 0;
     this.playSpeed = 1;
     this.playDirection = 1;
-    this._dc = 0;
+    this.pendingElements = 0;
     this.playCount = 0;
     this.animationData = {};
     this.layers = [];
@@ -8376,14 +8372,13 @@
     this.segmentPos = 0;
     this.subframeEnabled = subframeEnabled;
     this.segments = [];
-    this.pendingSegment = false;
     this._idle = true;
     this.projectInterface = ProjectInterface();
 };
 
-extendPrototype([BaseEvent], _a);
+extendPrototype([BaseEvent], AnimationItem);
 
-_a.prototype.setParams = function(params) {
+AnimationItem.prototype.setParams = function(params) {
     var self = this;
     if(params.context){
         this.context = params.context;
@@ -8394,15 +8389,13 @@
     var animType = params.animType ? params.animType : params.renderer ? params.renderer : 'svg';
     switch(animType){
         case 'canvas':
-            this.renderer = new _aq(this, params.rendererSettings);
+            this.renderer = new CanvasRenderer(this, params.rendererSettings);
             break;
         case 'svg':
-            this.renderer = new _ao(this, params.rendererSettings);
+            this.renderer = new SVGRenderer(this, params.rendererSettings);
             break;
-        case 'hybrid':
-        case 'html':
         default:
-            this.renderer = new _ap(this, params.rendererSettings);
+            this.renderer = new HybridRenderer(this, params.rendererSettings);
             break;
     }
     this.renderer.setProjectInterface(this.projectInterface);
@@ -8456,7 +8449,7 @@
     }
 };
 
-_a.prototype.setData = function (wrapper, animationData) {
+AnimationItem.prototype.setData = function (wrapper, animationData) {
     var params = {
         wrapper: wrapper,
         animationData: animationData ? (typeof animationData  === "object") ? animationData : JSON.parse(animationData) : null
@@ -8487,7 +8480,7 @@
     this.setParams(params);
 };
 
-_a.prototype.includeLayers = function(data) {
+AnimationItem.prototype.includeLayers = function(data) {
     if(data.op > this.animationData.op){
         this.animationData.op = data.op;
         this.totalFrames = Math.floor(data.op - this.animationData.ip);
@@ -8508,8 +8501,8 @@
         }
     }
     if(data.chars || data.fonts){
-        this.renderer._x._cr.addChars(data.chars);
-        this.renderer._x._cr.addFonts(data.fonts, this.renderer._x.defs);
+        this.renderer.globalData.fontManager.addChars(data.chars);
+        this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
     if(data.assets){
         len = data.assets.length;
@@ -8520,16 +8513,16 @@
     //this.totalFrames = 50;
     //this.animationData.tf = 50;
     this.animationData.__complete = false;
-    dataManager.completeData(this.animationData,this.renderer._x._cr);
+    dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
     this.renderer.includeLayers(data.layers);
     if(expressionsPlugin){
         expressionsPlugin.initExpressions(this);
     }
-    this.renderer._ba(null);
+    this.renderer.renderFrame(-1);
     this.loadNextSegment();
 };
 
-_a.prototype.loadNextSegment = function() {
+AnimationItem.prototype.loadNextSegment = function() {
     var segments = this.animationData.segments;
     if(!segments || segments.length === 0 || !this.autoloadSegments){
         this.trigger('data_ready');
@@ -8559,7 +8552,7 @@
     };
 };
 
-_a.prototype.loadSegments = function() {
+AnimationItem.prototype.loadSegments = function() {
     var segments = this.animationData.segments;
     if(!segments) {
         this.timeCompleted = this.animationData.tf;
@@ -8567,7 +8560,7 @@
     this.loadNextSegment();
 };
 
-_a.prototype.configAnimation = function (animData) {
+AnimationItem.prototype.configAnimation = function (animData) {
     var _this = this;
     if(this.renderer && this.renderer.destroyed){
         return;
@@ -8591,7 +8584,7 @@
     this.layers = this.animationData.layers;
     this.assets = this.animationData.assets;
     this.frameRate = this.animationData.fr;
-    this._ch = Math.round(this.animationData.ip);
+    this.firstFrame = Math.round(this.animationData.ip);
     this.frameMult = this.animationData.fr / 1000;
     this.trigger('config_ready');
     this.imagePreloader = new ImagePreloader();
@@ -8604,18 +8597,18 @@
     });
     this.loadSegments();
     this.updaFrameModifier();
-    if(this.renderer._x._cr){
+    if(this.renderer.globalData.fontManager){
         this.waitForFontsLoaded();
     }else{
-        dataManager.completeData(this.animationData,this.renderer._x._cr);
+        dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
         this.checkLoaded();
     }
 };
 
-_a.prototype.waitForFontsLoaded = (function(){
+AnimationItem.prototype.waitForFontsLoaded = (function(){
     function checkFontsLoaded(){
-        if(this.renderer._x._cr.loaded){
-            dataManager.completeData(this.animationData,this.renderer._x._cr);
+        if(this.renderer.globalData.fontManager.loaded){
+            dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
             //this.renderer.buildItems(this.animationData.layers);
             this.checkLoaded();
         }else{
@@ -8628,17 +8621,17 @@
     };
 }());
 
-_a.prototype.addPendingElement = function () {
-    this._dc += 1;
+AnimationItem.prototype.addPendingElement = function () {
+    this.pendingElements += 1;
 };
 
-_a.prototype.elementLoaded = function () {
-    this._dc--;
+AnimationItem.prototype.elementLoaded = function () {
+    this.pendingElements--;
     this.checkLoaded();
 };
 
-_a.prototype.checkLoaded = function () {
-    if (this._dc === 0) {
+AnimationItem.prototype.checkLoaded = function () {
+    if (this.pendingElements === 0) {
         if(expressionsPlugin){
             expressionsPlugin.initExpressions(this);
         }
@@ -8654,33 +8647,35 @@
     }
 };
 
-_a.prototype.resize = function () {
+AnimationItem.prototype.resize = function () {
     this.renderer.updateContainerSize();
 };
 
-_a.prototype.setSubframe = function(flag){
+AnimationItem.prototype.setSubframe = function(flag){
     this.subframeEnabled = flag ? true : false;
 };
 
-_a.prototype.gotoFrame = function () {
+AnimationItem.prototype.gotoFrame = function () {
     this.currentFrame = this.subframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame;
 
     if(this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted){
         this.currentFrame = this.timeCompleted;
     }
+    //console.log(this.currentFrame)
     this.trigger('enterFrame');
-    this._ba();
+    // console.log('gotoFrame: ', this.currentFrame )
+    this.renderFrame();
 };
 
-_a.prototype._ba = function () {
+AnimationItem.prototype.renderFrame = function () {
     if(this.isLoaded === false){
         return;
     }
-    //console.log('this.currentFrame:',this.currentFrame + this._ch);
-    this.renderer._ba(this.currentFrame + this._ch);
+    //console.log('this.currentFrame:',this.currentFrame + this.firstFrame);
+    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
 };
 
-_a.prototype.play = function (name) {
+AnimationItem.prototype.play = function (name) {
     if(name && this.name != name){
         return;
     }
@@ -8693,20 +8688,18 @@
     }
 };
 
-_a.prototype.pause = function (name) {
+AnimationItem.prototype.pause = function (name) {
     if(name && this.name != name){
         return;
     }
     if(this.isPaused === false){
         this.isPaused = true;
-        if(!this.pendingSegment){
-            this._idle = true;
-            this.trigger('_idle');
-        }
+        this._idle = true;
+        this.trigger('_idle');
     }
 };
 
-_a.prototype.togglePause = function (name) {
+AnimationItem.prototype.togglePause = function (name) {
     if(name && this.name != name){
         return;
     }
@@ -8717,17 +8710,16 @@
     }
 };
 
-_a.prototype.stop = function (name) {
+AnimationItem.prototype.stop = function (name) {
     if(name && this.name != name){
         return;
     }
     this.pause();
-    this.currentFrame = this.currentRawFrame = 0;
     this.playCount = 0;
-    this.gotoFrame();
+    this.setCurrentRawFrameValue(0);
 };
 
-_a.prototype.goToAndStop = function (value, isFrame, name) {
+AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
     if(name && this.name != name){
         return;
     }
@@ -8739,38 +8731,48 @@
     this.pause();
 };
 
-_a.prototype.goToAndPlay = function (value, isFrame, name) {
+AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
     this.goToAndStop(value, isFrame, name);
     this.play();
 };
 
-_a.prototype.advanceTime = function (value) {
-    if(this.pendingSegment){
-        this.pendingSegment = false;
-        this.adjustSegment(this.segments.shift());
-        if(this.isPaused){
-            this.play();
-        }
-        return;
-    }
+AnimationItem.prototype.advanceTime = function (value) {
     if (this.isPaused === true || this.isLoaded === false) {
         return;
     }
-    this.setCurrentRawFrameValue(this.currentRawFrame + value * this.frameModifier);
-};
-
-_a.prototype.updateAnimation = function (perc) {
-    this.setCurrentRawFrameValue(this.totalFrames * perc);
-};
-
-_a.prototype.moveFrame = function (value, name) {
-    if(name && this.name != name){
-        return;
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false;
+    if (nextValue >= this.totalFrames) {
+        if(!this.checkSegments(nextValue % this.totalFrames)) {
+            if (this.loop && !(++this.playCount === this.loop)) {
+                this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+                this.trigger('loopComplete');
+            } else {
+                _isComplete = true;
+                nextValue = this.totalFrames;
+            }
+        }
+    } else if(nextValue < 0) {
+        if(!this.checkSegments(nextValue % this.totalFrames)) {
+            if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+                this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
+                this.trigger('loopComplete');
+            } else {
+                _isComplete = true;
+                nextValue = 0;
+            }
+        }
+    } else {
+        this.setCurrentRawFrameValue(nextValue);
     }
-    this.setCurrentRawFrameValue(this.currentRawFrame+value);
+    if (_isComplete) {
+        this.setCurrentRawFrameValue(nextValue);
+        this.pause();
+        this.trigger('complete');
+    }
 };
 
-_a.prototype.adjustSegment = function(arr){
+AnimationItem.prototype.adjustSegment = function(arr, offset){
     this.playCount = 0;
     if(arr[1] < arr[0]){
         if(this.frameModifier > 0){
@@ -8781,8 +8783,8 @@
             }
         }
         this.totalFrames = arr[0] - arr[1];
-        this._ch = arr[1];
-        this.setCurrentRawFrameValue(this.totalFrames - 0.001);
+        this.firstFrame = arr[1];
+        this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
     } else if(arr[1] > arr[0]){
         if(this.frameModifier < 0){
             if(this.playSpeed < 0){
@@ -8792,29 +8794,29 @@
             }
         }
         this.totalFrames = arr[1] - arr[0];
-        this._ch = arr[0];
-        this.setCurrentRawFrameValue(0.001);
+        this.firstFrame = arr[0];
+        this.setCurrentRawFrameValue(0.001 + offset);
     }
     this.trigger('segmentStart');
 };
-_a.prototype.setSegment = function (init,end) {
+AnimationItem.prototype.setSegment = function (init,end) {
     var pendingFrame = -1;
     if(this.isPaused) {
-        if (this.currentRawFrame + this._ch < init) {
+        if (this.currentRawFrame + this.firstFrame < init) {
             pendingFrame = init;
-        } else if (this.currentRawFrame + this._ch > end) {
+        } else if (this.currentRawFrame + this.firstFrame > end) {
             pendingFrame = end - init;
         }
     }
 
-    this._ch = init;
+    this.firstFrame = init;
     this.totalFrames = end - init;
     if(pendingFrame !== -1) {
         this.goToAndStop(pendingFrame,true);
     }
 };
 
-_a.prototype.playSegments = function (arr,forceFlag) {
+AnimationItem.prototype.playSegments = function (arr,forceFlag) {
     if(typeof arr[0] === 'object'){
         var i, len = arr.length;
         for(i=0;i<len;i+=1){
@@ -8824,35 +8826,38 @@
         this.segments.push(arr);
     }
     if(forceFlag){
-        this.adjustSegment(this.segments.shift());
+        this.checkSegments(0);
     }
     if(this.isPaused){
         this.play();
     }
 };
 
-_a.prototype.resetSegments = function (forceFlag) {
+AnimationItem.prototype.resetSegments = function (forceFlag) {
     this.segments.length = 0;
     this.segments.push([this.animationData.ip,this.animationData.op]);
     //this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op - this.animationData.ip+this.animationData.ip*this.frameRate)]);
     if(forceFlag){
-        this.adjustSegment(this.segments.shift());
+        this.checkSegments(0);
     }
 };
-_a.prototype.checkSegments = function(){
-    if(this.segments.length){
-        this.pendingSegment = true;
+AnimationItem.prototype.checkSegments = function(offset){
+    if(this.segments.length) {
+        //console.log(this.currentRawFrame % lastFrame)
+        this.adjustSegment(this.segments.shift(), offset);
+        return true;
     }
+    return false;
 };
 
-_a.prototype.remove = function (name) {
+AnimationItem.prototype.remove = function (name) {
     if(name && this.name != name){
         return;
     }
     this.renderer.destroy();
 };
 
-_a.prototype.destroy = function (name) {
+AnimationItem.prototype.destroy = function (name) {
     if((name && this.name != name) || (this.renderer && this.renderer.destroyed)){
         return;
     }
@@ -8863,66 +8868,30 @@
     this.renderer = null;
 };
 
-_a.prototype.setCurrentRawFrameValue = function(value){
+AnimationItem.prototype.setCurrentRawFrameValue = function(value){
     this.currentRawFrame = value;
-    //console.log(this.totalFrames);
-    var _completeFlag = false;
-    if (this.currentRawFrame >= this.totalFrames) {
-        this.checkSegments();
-        if(this.loop === false){
-            this.currentRawFrame = this.totalFrames;
-            _completeFlag = true;
-        }else{
-            this.trigger('loopComplete');
-            this.playCount += 1;
-            if((this.loop !== true && this.playCount == this.loop) || this.pendingSegment){
-                this.currentRawFrame = this.totalFrames;
-                _completeFlag = true;
-            } else {
-                this.currentRawFrame = this.currentRawFrame % this.totalFrames;
-            }
-        }
-    } else if (this.currentRawFrame < 0) {
-        this.checkSegments();
-        this.playCount -= 1;
-        if(this.playCount < 0){
-            this.playCount = 0;
-        }
-        if(this.loop === false  || this.pendingSegment){
-            this.currentRawFrame = 0;
-            _completeFlag = true;
-        }else{
-            this.trigger('loopComplete');
-            this.currentRawFrame = (this.totalFrames + this.currentRawFrame) % this.totalFrames;
-        }
-    }
-
     this.gotoFrame();
-    if(_completeFlag) {
-        this.pause();
-        this.trigger('complete');
-    }
 };
 
-_a.prototype.setSpeed = function (val) {
+AnimationItem.prototype.setSpeed = function (val) {
     this.playSpeed = val;
     this.updaFrameModifier();
 };
 
-_a.prototype.setDirection = function (val) {
+AnimationItem.prototype.setDirection = function (val) {
     this.playDirection = val < 0 ? -1 : 1;
     this.updaFrameModifier();
 };
 
-_a.prototype.updaFrameModifier = function () {
+AnimationItem.prototype.updaFrameModifier = function () {
     this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
 };
 
-_a.prototype.getPath = function () {
+AnimationItem.prototype.getPath = function () {
     return this.path;
 };
 
-_a.prototype.getAssetsPath = function (assetData) {
+AnimationItem.prototype.getAssetsPath = function (assetData) {
     var path = '';
     if(this.assetsPath){
         var imagePath = assetData.p;
@@ -8938,7 +8907,7 @@
     return path;
 };
 
-_a.prototype.getAssetData = function (id) {
+AnimationItem.prototype.getAssetData = function (id) {
     var i = 0, len = this.assets.length;
     while (i < len) {
         if(id == this.assets[i].id){
@@ -8948,38 +8917,38 @@
     }
 };
 
-_a.prototype.hide = function () {
+AnimationItem.prototype.hide = function () {
     this.renderer.hide();
 };
 
-_a.prototype.show = function () {
+AnimationItem.prototype.show = function () {
     this.renderer.show();
 };
 
-_a.prototype.getAssets = function () {
+AnimationItem.prototype.getAssets = function () {
     return this.assets;
 };
 
-_a.prototype.trigger = function(name){
+AnimationItem.prototype.trigger = function(name){
     if(this._cbs && this._cbs[name]){
         switch(name){
             case 'enterFrame':
-                this._cy(name,new BMEnterFrameEvent(name,this.currentFrame,this.totalFrames,this.frameMult));
+                this.triggerEvent(name,new BMEnterFrameEvent(name,this.currentFrame,this.totalFrames,this.frameMult));
                 break;
             case 'loopComplete':
-                this._cy(name,new BMCompleteLoopEvent(name,this.loop,this.playCount,this.frameMult));
+                this.triggerEvent(name,new BMCompleteLoopEvent(name,this.loop,this.playCount,this.frameMult));
                 break;
             case 'complete':
-                this._cy(name,new BMCompleteEvent(name,this.frameMult));
+                this.triggerEvent(name,new BMCompleteEvent(name,this.frameMult));
                 break;
             case 'segmentStart':
-                this._cy(name,new BMSegmentStartEvent(name,this._ch,this.totalFrames));
+                this.triggerEvent(name,new BMSegmentStartEvent(name,this.firstFrame,this.totalFrames));
                 break;
             case 'destroy':
-                this._cy(name,new BMDestroyEvent(name,this));
+                this.triggerEvent(name,new BMDestroyEvent(name,this));
                 break;
             default:
-                this._cy(name);
+                this.triggerEvent(name);
         }
     }
     if(name === 'enterFrame' && this.onEnterFrame){
@@ -8992,14 +8961,14 @@
         this.onComplete.call(this,new BMCompleteEvent(name,this.frameMult));
     }
     if(name === 'segmentStart' && this.onSegmentStart){
-        this.onSegmentStart.call(this,new BMSegmentStartEvent(name,this._ch,this.totalFrames));
+        this.onSegmentStart.call(this,new BMSegmentStartEvent(name,this.firstFrame,this.totalFrames));
     }
     if(name === 'destroy' && this.onDestroy){
         this.onDestroy.call(this,new BMDestroyEvent(name,this));
     }
 };
-function _aq(_cq, config){
-    this._cq = _cq;
+function CanvasRenderer(animationItem, config){
+    this.animationItem = animationItem;
     this.renderConfig = {
         clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
         context: (config && config.context) || null,
@@ -9008,58 +8977,52 @@
         className: (config && config.className) || ''
     };
     this.renderConfig.dpr = (config && config.dpr) || 1;
-    if (this._cq.wrapper) {
+    if (this.animationItem.wrapper) {
         this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
     }
-    //TODO remove this when fixed
-    // this.renderConfig.dpr = 1;
     this.renderedFrame = -1;
-    this._x = {
+    this.globalData = {
         frameNum: -1,
-        mdf: false,
+        _mdf: false,
         renderConfig: this.renderConfig
     };
     var i, len = 15;
-    this.contextData = new _n();
-    this._br = [];
-    this._dc = [];
+    this.contextData = new CVContextData();
+    this.elements = [];
+    this.pendingElements = [];
     this.transformMat = new Matrix();
-    this._db = false;
+    this.completeLayers = false;
 }
-extendPrototype([_l],_aq);
+extendPrototype([BaseRenderer],CanvasRenderer);
 
-_aq.prototype.createBase = function (data) {
-    return new _c(data, this._x, this);
+CanvasRenderer.prototype.createShape = function (data) {
+    return new CVShapeElement(data, this.globalData, this);
 };
 
-_aq.prototype.createShape = function (data) {
-    return new _r(data, this._x, this);
+CanvasRenderer.prototype.createText = function (data) {
+    return new CVTextElement(data, this.globalData, this);
 };
 
-_aq.prototype.createText = function (data) {
-    return new _t(data, this._x, this);
+CanvasRenderer.prototype.createImage = function (data) {
+    return new CVImageElement(data, this.globalData, this);
 };
 
-_aq.prototype.createImage = function (data) {
-    return new _p(data, this._x, this);
+CanvasRenderer.prototype.createComp = function (data) {
+    return new CVCompElement(data, this.globalData, this);
 };
 
-_aq.prototype.createComp = function (data) {
-    return new _m(data, this._x, this);
+CanvasRenderer.prototype.createSolid = function (data) {
+    return new CVSolidElement(data, this.globalData, this);
 };
 
-_aq.prototype.createSolid = function (data) {
-    return new _s(data, this._x, this);
-};
+CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
 
-_aq.prototype.createNull = _ao.prototype.createNull;
-
-_aq.prototype.ctxTransform = function(props){
+CanvasRenderer.prototype.ctxTransform = function(props){
     if(props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0){
         return;
     }
     if(!this.renderConfig.clearCanvas){
-        this._da.transform(props[0],props[1],props[4],props[5],props[12],props[13]);
+        this.canvasContext.transform(props[0],props[1],props[4],props[5],props[12],props[13]);
         return;
     }
     this.transformMat.cloneFromProps(props);
@@ -9068,36 +9031,36 @@
     //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]);
     this.contextData.cTr.cloneFromProps(this.transformMat.props);
     var trProps = this.contextData.cTr.props;
-    this._da.setTransform(trProps[0],trProps[1],trProps[4],trProps[5],trProps[12],trProps[13]);
+    this.canvasContext.setTransform(trProps[0],trProps[1],trProps[4],trProps[5],trProps[12],trProps[13]);
 };
 
-_aq.prototype.ctxOpacity = function(op){
+CanvasRenderer.prototype.ctxOpacity = function(op){
     /*if(op === 1){
         return;
     }*/
     if(!this.renderConfig.clearCanvas){
-        this._da.globalAlpha *= op < 0 ? 0 : op;
+        this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
         return;
     }
     this.contextData.cO *= op < 0 ? 0 : op;
-    this._da.globalAlpha = this.contextData.cO;
+    this.canvasContext.globalAlpha = this.contextData.cO;
 };
 
-_aq.prototype.reset = function(){
+CanvasRenderer.prototype.reset = function(){
     if(!this.renderConfig.clearCanvas){
-        this._da.restore();
+        this.canvasContext.restore();
         return;
     }
     this.contextData.reset();
 };
 
-_aq.prototype.save = function(actionFlag){
+CanvasRenderer.prototype.save = function(actionFlag){
     if(!this.renderConfig.clearCanvas){
-        this._da.save();
+        this.canvasContext.save();
         return;
     }
     if(actionFlag){
-        this._da.save();
+        this.canvasContext.save();
     }
     var props = this.contextData.cTr.props;
     if(this.contextData._length <= this.contextData.cArrPos) {
@@ -9111,14 +9074,14 @@
     this.contextData.cArrPos += 1;
 };
 
-_aq.prototype.restore = function(actionFlag){
+CanvasRenderer.prototype.restore = function(actionFlag){
     if(!this.renderConfig.clearCanvas){
-        this._da.restore();
+        this.canvasContext.restore();
         return;
     }
     if(actionFlag){
-        this._da.restore();
-        this._x.blendMode = 'source-over';
+        this.canvasContext.restore();
+        this.globalData.blendMode = 'source-over';
     }
     this.contextData.cArrPos -= 1;
     var popped = this.contextData.saved[this.contextData.cArrPos];
@@ -9126,70 +9089,75 @@
     for(i=0;i<16;i+=1){
         arr[i] = popped[i];
     }
-    this._da.setTransform(popped[0],popped[1],popped[4],popped[5],popped[12],popped[13]);
+    this.canvasContext.setTransform(popped[0],popped[1],popped[4],popped[5],popped[12],popped[13]);
     popped = this.contextData.savedOp[this.contextData.cArrPos];
     this.contextData.cO = popped;
-    this._da.globalAlpha = popped;
+    this.canvasContext.globalAlpha = popped;
 };
 
-_aq.prototype.configAnimation = function(animData){
-    if(this._cq.wrapper){
-        this._cq.container = _cu('canvas');
-        this._cq.container.style.width = '100%';
-        this._cq.container.style.height = '100%';
-        //this._cq.container.style.transform = 'translate3d(0,0,0)';
-        //this._cq.container.style.webkitTransform = 'translate3d(0,0,0)';
-        this._cq.container.style.transformOrigin = this._cq.container.style.mozTransformOrigin = this._cq.container.style.webkitTransformOrigin = this._cq.container.style['-webkit-transform'] = "0px 0px 0px";
-        this._cq.wrapper.appendChild(this._cq.container);
-        this._da = this._cq.container.getContext('2d');
+CanvasRenderer.prototype.configAnimation = function(animData){
+    if(this.animationItem.wrapper){
+        this.animationItem.container = createTag('canvas');
+        this.animationItem.container.style.width = '100%';
+        this.animationItem.container.style.height = '100%';
+        //this.animationItem.container.style.transform = 'translate3d(0,0,0)';
+        //this.animationItem.container.style.webkitTransform = 'translate3d(0,0,0)';
+        this.animationItem.container.style.transformOrigin = this.animationItem.container.style.mozTransformOrigin = this.animationItem.container.style.webkitTransformOrigin = this.animationItem.container.style['-webkit-transform'] = "0px 0px 0px";
+        this.animationItem.wrapper.appendChild(this.animationItem.container);
+        this.canvasContext = this.animationItem.container.getContext('2d');
         if(this.renderConfig.className) {
-            this._cq.container.setAttribute('class', this.renderConfig.className);
+            this.animationItem.container.setAttribute('class', this.renderConfig.className);
         }
     }else{
-        this._da = this.renderConfig.context;
+        this.canvasContext = this.renderConfig.context;
     }
     this.data = animData;
-    this._x._da = this._da;
-    this._x.renderer = this;
-    this._x.isDashed = false;
-    this._x.totalFrames = Math.floor(animData.tf);
-    this._x.compWidth = animData.w;
-    this._x.compHeight = animData.h;
-    this._x.frameRate = animData.fr;
-    this._x.frameId = 0;
-    this._x._de = {
+    this.globalData.canvasContext = this.canvasContext;
+    this.globalData.renderer = this;
+    this.globalData.isDashed = false;
+    this.globalData.totalFrames = Math.floor(animData.tf);
+    this.globalData.compWidth = animData.w;
+    this.globalData.compHeight = animData.h;
+    this.globalData.frameRate = animData.fr;
+    this.globalData.frameId = 0;
+    this.globalData.compSize = {
         w: animData.w,
         h: animData.h
     };
-    this._x.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
     this.layers = animData.layers;
-    this._cx = {};
-    this._cx.w = animData.w;
-    this._cx.h = animData.h;
-    this._x._cr = new FontManager();
-    this._x._cr.addChars(animData.chars);
-    this._x._cr.addFonts(animData.fonts,document.body);
-    this._x.getAssetData = this._cq.getAssetData.bind(this._cq);
-    this._x.getAssetsPath = this._cq.getAssetsPath.bind(this._cq);
-    this._x.elementLoaded = this._cq.elementLoaded.bind(this._cq);
-    this._x.addPendingElement = this._cq.addPendingElement.bind(this._cq);
-    this._x._cx = this._cx;
-    this._br = _cv(animData.layers.length);
+    this.transformCanvas = {
+        w: animData.w,
+        h:animData.h,
+        sx:0,
+        sy:0,
+        tx:0,
+        ty:0
+    };
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts,document.body);
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.elementLoaded = this.animationItem.elementLoaded.bind(this.animationItem);
+    this.globalData.addPendingElement = this.animationItem.addPendingElement.bind(this.animationItem);
+    this.globalData.transformCanvas = this.transformCanvas;
+    this.elements = createSizedArray(animData.layers.length);
 
     this.updateContainerSize();
 };
 
-_aq.prototype.updateContainerSize = function () {
+CanvasRenderer.prototype.updateContainerSize = function () {
     this.reset();
     var elementWidth,elementHeight;
-    if(this._cq.wrapper && this._cq.container){
-        elementWidth = this._cq.wrapper.offsetWidth;
-        elementHeight = this._cq.wrapper.offsetHeight;
-        this._cq.container.setAttribute('width',elementWidth * this.renderConfig.dpr );
-        this._cq.container.setAttribute('height',elementHeight * this.renderConfig.dpr);
+    if(this.animationItem.wrapper && this.animationItem.container){
+        elementWidth = this.animationItem.wrapper.offsetWidth;
+        elementHeight = this.animationItem.wrapper.offsetHeight;
+        this.animationItem.container.setAttribute('width',elementWidth * this.renderConfig.dpr );
+        this.animationItem.container.setAttribute('height',elementHeight * this.renderConfig.dpr);
     }else{
-        elementWidth = this._da.canvas.width * this.renderConfig.dpr;
-        elementHeight = this._da.canvas.height * this.renderConfig.dpr;
+        elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
+        elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
     }
     var elementRel,animationRel;
     if(this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1){
@@ -9199,170 +9167,153 @@
         var xPos = pos.substr(0,4);
         var yPos = pos.substr(4);
         elementRel = elementWidth/elementHeight;
-        animationRel = this._cx.w/this._cx.h;
+        animationRel = this.transformCanvas.w/this.transformCanvas.h;
         if(animationRel>elementRel && fillType === 'meet' || animationRel<elementRel && fillType === 'slice'){
-            this._cx.sx = elementWidth/(this._cx.w/this.renderConfig.dpr);
-            this._cx.sy = elementWidth/(this._cx.w/this.renderConfig.dpr);
+            this.transformCanvas.sx = elementWidth/(this.transformCanvas.w/this.renderConfig.dpr);
+            this.transformCanvas.sy = elementWidth/(this.transformCanvas.w/this.renderConfig.dpr);
         }else{
-            this._cx.sx = elementHeight/(this._cx.h / this.renderConfig.dpr);
-            this._cx.sy = elementHeight/(this._cx.h / this.renderConfig.dpr);
+            this.transformCanvas.sx = elementHeight/(this.transformCanvas.h / this.renderConfig.dpr);
+            this.transformCanvas.sy = elementHeight/(this.transformCanvas.h / this.renderConfig.dpr);
         }
 
         if(xPos === 'xMid' && ((animationRel<elementRel && fillType==='meet') || (animationRel>elementRel && fillType === 'slice'))){
-            this._cx.tx = (elementWidth-this._cx.w*(elementHeight/this._cx.h))/2*this.renderConfig.dpr;
+            this.transformCanvas.tx = (elementWidth-this.transformCanvas.w*(elementHeight/this.transformCanvas.h))/2*this.renderConfig.dpr;
         } else if(xPos === 'xMax' && ((animationRel<elementRel && fillType==='meet') || (animationRel>elementRel && fillType === 'slice'))){
-            this._cx.tx = (elementWidth-this._cx.w*(elementHeight/this._cx.h))*this.renderConfig.dpr;
+            this.transformCanvas.tx = (elementWidth-this.transformCanvas.w*(elementHeight/this.transformCanvas.h))*this.renderConfig.dpr;
         } else {
-            this._cx.tx = 0;
+            this.transformCanvas.tx = 0;
         }
         if(yPos === 'YMid' && ((animationRel>elementRel && fillType==='meet') || (animationRel<elementRel && fillType === 'slice'))){
-            this._cx.ty = ((elementHeight-this._cx.h*(elementWidth/this._cx.w))/2)*this.renderConfig.dpr;
+            this.transformCanvas.ty = ((elementHeight-this.transformCanvas.h*(elementWidth/this.transformCanvas.w))/2)*this.renderConfig.dpr;
         } else if(yPos === 'YMax' && ((animationRel>elementRel && fillType==='meet') || (animationRel<elementRel && fillType === 'slice'))){
-            this._cx.ty = ((elementHeight-this._cx.h*(elementWidth/this._cx.w)))*this.renderConfig.dpr;
+            this.transformCanvas.ty = ((elementHeight-this.transformCanvas.h*(elementWidth/this.transformCanvas.w)))*this.renderConfig.dpr;
         } else {
-            this._cx.ty = 0;
+            this.transformCanvas.ty = 0;
         }
 
     }else if(this.renderConfig.preserveAspectRatio == 'none'){
-        this._cx.sx = elementWidth/(this._cx.w/this.renderConfig.dpr);
-        this._cx.sy = elementHeight/(this._cx.h/this.renderConfig.dpr);
-        this._cx.tx = 0;
-        this._cx.ty = 0;
+        this.transformCanvas.sx = elementWidth/(this.transformCanvas.w/this.renderConfig.dpr);
+        this.transformCanvas.sy = elementHeight/(this.transformCanvas.h/this.renderConfig.dpr);
+        this.transformCanvas.tx = 0;
+        this.transformCanvas.ty = 0;
     }else{
-        this._cx.sx = this.renderConfig.dpr;
-        this._cx.sy = this.renderConfig.dpr;
-        this._cx.tx = 0;
-        this._cx.ty = 0;
+        this.transformCanvas.sx = this.renderConfig.dpr;
+        this.transformCanvas.sy = this.renderConfig.dpr;
+        this.transformCanvas.tx = 0;
+        this.transformCanvas.ty = 0;
     }
-    this._cx.props = [this._cx.sx,0,0,0,0,this._cx.sy,0,0,0,0,1,0,this._cx.tx,this._cx.ty,0,1];
-    /*var i, len = this._br.length;
+    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];
+    /*var i, len = this.elements.length;
     for(i=0;i<len;i+=1){
-        if(this._br[i] && this._br[i].data.ty === 0){
-            this._br[i].resize(this._x._cx);
+        if(this.elements[i] && this.elements[i].data.ty === 0){
+            this.elements[i].resize(this.globalData.transformCanvas);
         }
     }*/
-    this.ctxTransform(this._cx.props);
+    this.ctxTransform(this.transformCanvas.props);
+    this.canvasContext.beginPath();
+    this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h);
+    this.canvasContext.closePath();
+    this.canvasContext.clip();
 };
 
-_aq.prototype.destroy = function () {
+CanvasRenderer.prototype.destroy = function () {
     if(this.renderConfig.clearCanvas) {
-        this._cq.wrapper.innerHTML = '';
+        this.animationItem.wrapper.innerHTML = '';
     }
     var i, len = this.layers ? this.layers.length : 0;
     for (i = len - 1; i >= 0; i-=1) {
-        if(this._br[i]) {
-            this._br[i].destroy();
+        if(this.elements[i]) {
+            this.elements[i].destroy();
         }
     }
-    this._br.length = 0;
-    this._x._da = null;
-    this._cq.container = null;
+    this.elements.length = 0;
+    this.globalData.canvasContext = null;
+    this.animationItem.container = null;
     this.destroyed = true;
 };
 
-_aq.prototype._ba = function(num){
-    if((this.renderedFrame == num && this.renderConfig.clearCanvas === true) || this.destroyed || num === null){
+CanvasRenderer.prototype.renderFrame = function(num){
+    if((this.renderedFrame == num && this.renderConfig.clearCanvas === true) || this.destroyed || num === -1){
         return;
     }
     this.renderedFrame = num;
-    this._x.frameNum = num - this._cq._ch;
-    this._x.frameId += 1;
-    this._x.projectInterface.currentFrame = num;
-    if(this.renderConfig.clearCanvas === true){
-        //this.reset();
-        //this._da.save();
-        //this._da.canvas.width = this._da.canvas.width;
-        this._da.clearRect(this._cx.tx, this._cx.ty, this._cx.w*this._cx.sx, this._cx.h*this._cx.sy);
-    }else{
-        this.save();
-    }
-    this._da.beginPath();
-    this._da.rect(0,0,this._cx.w,this._cx.h);
-    this._da.closePath();
-    this._da.clip();
+    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
+    this.globalData.frameId += 1;
+    this.globalData._mdf = false;
+    this.globalData.projectInterface.currentFrame = num;
 
      // console.log('--------');
      // console.log('NEW: ',num);
     var i, len = this.layers.length;
-    if(!this._db){
+    if(!this.completeLayers){
         this.checkLayers(num);
     }
 
     for (i = 0; i < len; i++) {
-        if(this._db || this._br[i]){
-            this._br[i]._az(num - this.layers[i].st);
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].prepareFrame(num - this.layers[i].st);
         }
     }
-    for (i = len - 1; i >= 0; i-=1) {
-        if(this._db || this._br[i]){
-            this._br[i]._ba();
+    if(this.globalData._mdf) {
+        if(this.renderConfig.clearCanvas === true){
+            this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
+        }else{
+            this.save();
+        }
+        for (i = len - 1; i >= 0; i-=1) {
+            if(this.completeLayers || this.elements[i]){
+                this.elements[i].renderFrame();
+            }
+        }
+        if(this.renderConfig.clearCanvas !== true){
+            this.restore();
         }
     }
-    if(this.renderConfig.clearCanvas !== true){
-        this.restore();
-    } else {
-        //this._da.restore();
-    }
-    // console.log(this.contextData.cTr.props)
 };
 
-_aq.prototype.buildItem = function(pos){
-    var _br = this._br;
-    if(_br[pos] || this.layers[pos].ty == 99){
+CanvasRenderer.prototype.buildItem = function(pos){
+    var elements = this.elements;
+    if(elements[pos] || this.layers[pos].ty == 99){
         return;
     }
-    var element = this.createItem(this.layers[pos], this,this._x);
-    _br[pos] = element;
+    var element = this.createItem(this.layers[pos], this,this.globalData);
+    elements[pos] = element;
     element.initExpressions();
     /*if(this.layers[pos].ty === 0){
-        element.resize(this._x._cx);
+        element.resize(this.globalData.transformCanvas);
     }*/
 };
 
-_aq.prototype.checkPendingElements  = function(){
-    while(this._dc.length){
-        var element = this._dc.pop();
+CanvasRenderer.prototype.checkPendingElements  = function(){
+    while(this.pendingElements.length){
+        var element = this.pendingElements.pop();
         element.checkParenting();
     }
 };
 
-_aq.prototype.hide = function(){
-    this._cq.container.style.display = 'none';
+CanvasRenderer.prototype.hide = function(){
+    this.animationItem.container.style.display = 'none';
 };
 
-_aq.prototype.show = function(){
-    this._cq.container.style.display = 'block';
+CanvasRenderer.prototype.show = function(){
+    this.animationItem.container.style.display = 'block';
 };
 
-_aq.prototype.searchExtraCompositions = function(assets){
-    var i, len = assets.length;
-    var floatingContainer = _ct('g');
-    for(i=0;i<len;i+=1){
-        if(assets[i].xt){
-            var comp = this.createComp(assets[i],this._x.comp,this._x);
-            comp.initExpressions();
-            //comp.compInterface = CompExpressionInterface(comp);
-            //Expressions.addLayersInterface(comp._br, this._x.projectInterface);
-            this._x.projectInterface.registerComposition(comp);
-        }
-    }
-};
-
-function _ap(_cq, config){
-    this._cq = _cq;
+function HybridRenderer(animationItem, config){
+    this.animationItem = animationItem;
     this.layers = null;
     this.renderedFrame = -1;
     this.renderConfig = {
         className: (config && config.className) || '',
         hideOnTransparent: (config && config.hideOnTransparent === false) ? false : true
     };
-    this._x = {
-        mdf: false,
+    this.globalData = {
+        _mdf: false,
         frameNum: -1,
         renderConfig: this.renderConfig
     };
-    this._dc = [];
-    this._br = [];
+    this.pendingElements = [];
+    this.elements = [];
     this.threeDElements = [];
     this.destroyed = false;
     this.camera = null;
@@ -9370,40 +9321,41 @@
 
 }
 
-extendPrototype([_l],_ap);
+extendPrototype([BaseRenderer],HybridRenderer);
 
-_ap.prototype.buildItem = _ao.prototype.buildItem;
+HybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;
 
-_ap.prototype.checkPendingElements  = function(){
-    while(this._dc.length){
-        var element = this._dc.pop();
+HybridRenderer.prototype.checkPendingElements  = function(){
+    while(this.pendingElements.length){
+        var element = this.pendingElements.pop();
         element.checkParenting();
     }
 };
 
-_ap.prototype.appendElementInPos = function(element, pos){
-    var newDOMElement = element.get_e();
+HybridRenderer.prototype.appendElementInPos = function(element, pos){
+    var newDOMElement = element.getBaseElement();
     if(!newDOMElement){
         return;
     }
     var layer = this.layers[pos];
     if(!layer.ddd || !this.supports3d){
         var i = 0;
-        var nextDOMElement, nextLayer;
+        var nextDOMElement, nextLayer, tmpDOMElement;
         while(i<pos){
-            if(this._br[i] && this._br[i]!== true && this._br[i].get_e){
-                nextLayer = this._br[i];
-                nextDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.get_e();
+            if(this.elements[i] && this.elements[i]!== true && this.elements[i].getBaseElement){
+                nextLayer = this.elements[i];
+                tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
+                nextDOMElement = tmpDOMElement || nextDOMElement;
             }
             i += 1;
         }
         if(nextDOMElement){
             if(!layer.ddd || !this.supports3d){
-                this._bx.insertBefore(newDOMElement, nextDOMElement);
+                this.layerElement.insertBefore(newDOMElement, nextDOMElement);
             }
         } else {
             if(!layer.ddd || !this.supports3d){
-                this._bx.appendChild(newDOMElement);
+                this.layerElement.appendChild(newDOMElement);
             }
         }
     } else {
@@ -9411,55 +9363,50 @@
     }
 };
 
-
-_ap.prototype.createBase = function (data) {
-    return new _d(data, this._x, this);
-};
-
-_ap.prototype.createShape = function (data) {
+HybridRenderer.prototype.createShape = function (data) {
     if(!this.supports3d){
-        return new SVGShapeElement(data, this._x, this);
+        return new SVGShapeElement(data, this.globalData, this);
     }
-    return new _z(data, this._x, this);
+    return new HShapeElement(data, this.globalData, this);
 };
 
-_ap.prototype.createText = function (data) {
+HybridRenderer.prototype.createText = function (data) {
     if(!this.supports3d){
-        return new _cw(data, this._x, this);
+        return new SVGTextElement(data, this.globalData, this);
     }
-    return new _ab(data, this._x, this);
+    return new HTextElement(data, this.globalData, this);
 };
 
-_ap.prototype.createCamera = function (data) {
-    this.camera = new _v(data, this._x, this);
+HybridRenderer.prototype.createCamera = function (data) {
+    this.camera = new HCameraElement(data, this.globalData, this);
     return this.camera;
 };
 
-_ap.prototype.createImage = function (data) {
+HybridRenderer.prototype.createImage = function (data) {
     if(!this.supports3d){
-        return new _h(data, this._x, this);
+        return new IImageElement(data, this.globalData, this);
     }
-    return new _y(data, this._x, this);
+    return new HImageElement(data, this.globalData, this);
 };
 
-_ap.prototype.createComp = function (data) {
+HybridRenderer.prototype.createComp = function (data) {
     if(!this.supports3d){
-        return new _g(data, this._x, this);
+        return new ICompElement(data, this.globalData, this);
     }
-    return new _w(data, this._x, this);
+    return new HCompElement(data, this.globalData, this);
 
 };
 
-_ap.prototype.createSolid = function (data) {
+HybridRenderer.prototype.createSolid = function (data) {
     if(!this.supports3d){
-        return new _j(data, this._x, this);
+        return new ISolidElement(data, this.globalData, this);
     }
-    return new _aa(data, this._x, this);
+    return new HSolidElement(data, this.globalData, this);
 };
 
-_ap.prototype.createNull = _ao.prototype.createNull;
+HybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
 
-_ap.prototype.getThreeDContainerByPos = function(pos){
+HybridRenderer.prototype.getThreeDContainerByPos = function(pos){
     var i = 0, len = this.threeDElements.length;
     while(i<len) {
         if(this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
@@ -9467,15 +9414,15 @@
         }
         i += 1;
     }
-}
+};
 
-_ap.prototype.createThreeDContainer = function(pos){
-    var perspectiveElem = _cu('div');
+HybridRenderer.prototype.createThreeDContainer = function(pos){
+    var perspectiveElem = createTag('div');
     styleDiv(perspectiveElem);
-    perspectiveElem.style.width = this._x._de.w+'px';
-    perspectiveElem.style.height = this._x._de.h+'px';
+    perspectiveElem.style.width = this.globalData.compSize.w+'px';
+    perspectiveElem.style.height = this.globalData.compSize.h+'px';
     perspectiveElem.style.transformOrigin = perspectiveElem.style.mozTransformOrigin = perspectiveElem.style.webkitTransformOrigin = "50% 50%";
-    var container = _cu('div');
+    var container = createTag('div');
     styleDiv(container);
     container.style.transform = container.style.webkitTransform = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
     perspectiveElem.appendChild(container);
@@ -9490,7 +9437,7 @@
     return threeDContainerData;
 };
 
-_ap.prototype.build3dContainers = function(){
+HybridRenderer.prototype.build3dContainers = function(){
     var i, len = this.layers.length;
     var lastThreeDContainerData;
     for(i=0;i<len;i+=1){
@@ -9505,15 +9452,15 @@
     }
 };
 
-_ap.prototype.addTo3dContainer = function(elem,pos){
+HybridRenderer.prototype.addTo3dContainer = function(elem,pos){
     var i = 0, len = this.threeDElements.length;
     while(i<len){
         if(pos <= this.threeDElements[i].endPos){
             var j = this.threeDElements[i].startPos;
             var nextElement;
             while(j<pos){
-                if(this._br[j] && this._br[j].get_e){
-                    nextElement = this._br[j].get_e();
+                if(this.elements[j] && this.elements[j].getBaseElement){
+                    nextElement = this.elements[j].getBaseElement();
                 }
                 j += 1;
             }
@@ -9528,9 +9475,9 @@
     }
 };
 
-_ap.prototype.configAnimation = function(animData){
-    var resizerElem = _cu('div');
-    var wrapper = this._cq.wrapper;
+HybridRenderer.prototype.configAnimation = function(animData){
+    var resizerElem = createTag('div');
+    var wrapper = this.animationItem.wrapper;
     resizerElem.style.width = animData.w+'px';
     resizerElem.style.height = animData.h+'px';
     this.resizerElem = resizerElem;
@@ -9542,84 +9489,84 @@
     wrapper.appendChild(resizerElem);
 
     resizerElem.style.overflow = 'hidden';
-    var svg = _ct('svg');
+    var svg = createNS('svg');
     svg.setAttribute('width','1');
     svg.setAttribute('height','1');
     styleDiv(svg);
     this.resizerElem.appendChild(svg);
-    var defs = _ct('defs');
+    var defs = createNS('defs');
     svg.appendChild(defs);
-    this._x.defs = defs;
+    this.globalData.defs = defs;
     this.data = animData;
     //Mask animation
-    this._x.getAssetData = this._cq.getAssetData.bind(this._cq);
-    this._x.getAssetsPath = this._cq.getAssetsPath.bind(this._cq);
-    this._x.elementLoaded = this._cq.elementLoaded.bind(this._cq);
-    this._x.frameId = 0;
-    this._x._de = {
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.elementLoaded = this.animationItem.elementLoaded.bind(this.animationItem);
+    this.globalData.frameId = 0;
+    this.globalData.compSize = {
         w: animData.w,
         h: animData.h
     };
-    this._x.frameRate = animData.fr;
+    this.globalData.frameRate = animData.fr;
     this.layers = animData.layers;
-    this._x._cr = new FontManager();
-    this._x._cr.addChars(animData.chars);
-    this._x._cr.addFonts(animData.fonts,svg);
-    this._bx = this.resizerElem;
+    this.globalData.fontManager = new FontManager();
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts,svg);
+    this.layerElement = this.resizerElem;
     this.build3dContainers();
     this.updateContainerSize();
 };
 
-_ap.prototype.destroy = function () {
-    this._cq.wrapper.innerHTML = '';
-    this._cq.container = null;
-    this._x.defs = null;
+HybridRenderer.prototype.destroy = function () {
+    this.animationItem.wrapper.innerHTML = '';
+    this.animationItem.container = null;
+    this.globalData.defs = null;
     var i, len = this.layers ? this.layers.length : 0;
     for (i = 0; i < len; i++) {
-        this._br[i].destroy();
+        this.elements[i].destroy();
     }
-    this._br.length = 0;
+    this.elements.length = 0;
     this.destroyed = true;
-    this._cq = null;
+    this.animationItem = null;
 };
 
-_ap.prototype.updateContainerSize = function () {
-    var elementWidth = this._cq.wrapper.offsetWidth;
-    var elementHeight = this._cq.wrapper.offsetHeight;
+HybridRenderer.prototype.updateContainerSize = function () {
+    var elementWidth = this.animationItem.wrapper.offsetWidth;
+    var elementHeight = this.animationItem.wrapper.offsetHeight;
     var elementRel = elementWidth/elementHeight;
-    var animationRel = this._x._de.w/this._x._de.h;
+    var animationRel = this.globalData.compSize.w/this.globalData.compSize.h;
     var sx,sy,tx,ty;
     if(animationRel>elementRel){
-        sx = elementWidth/(this._x._de.w);
-        sy = elementWidth/(this._x._de.w);
+        sx = elementWidth/(this.globalData.compSize.w);
+        sy = elementWidth/(this.globalData.compSize.w);
         tx = 0;
-        ty = ((elementHeight-this._x._de.h*(elementWidth/this._x._de.w))/2);
+        ty = ((elementHeight-this.globalData.compSize.h*(elementWidth/this.globalData.compSize.w))/2);
     }else{
-        sx = elementHeight/(this._x._de.h);
-        sy = elementHeight/(this._x._de.h);
-        tx = (elementWidth-this._x._de.w*(elementHeight/this._x._de.h))/2;
+        sx = elementHeight/(this.globalData.compSize.h);
+        sy = elementHeight/(this.globalData.compSize.h);
+        tx = (elementWidth-this.globalData.compSize.w*(elementHeight/this.globalData.compSize.h))/2;
         ty = 0;
     }
     this.resizerElem.style.transform = this.resizerElem.style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,'+sy+',0,0,0,0,1,0,'+tx+','+ty+',0,1)';
 };
 
-_ap.prototype._ba = _ao.prototype._ba;
+HybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
 
-_ap.prototype.hide = function(){
+HybridRenderer.prototype.hide = function(){
     this.resizerElem.style.display = 'none';
 };
 
-_ap.prototype.show = function(){
+HybridRenderer.prototype.show = function(){
     this.resizerElem.style.display = 'block';
 };
 
-_ap.prototype.initItems = function(){
+HybridRenderer.prototype.initItems = function(){
     this.buildAllItems();
     if(this.camera){
         this.camera.setup();
     } else {
-        var cWidth = this._x._de.w;
-        var cHeight = this._x._de.h;
+        var cWidth = this.globalData.compSize.w;
+        var cHeight = this.globalData.compSize.h;
         var i, len = this.threeDElements.length;
         for(i=0;i<len;i+=1){
             this.threeDElements[i].perspectiveElem.style.perspective = this.threeDElements[i].perspectiveElem.style.webkitPerspective = Math.sqrt(Math.pow(cWidth,2) + Math.pow(cHeight,2)) + 'px';
@@ -9627,139 +9574,128 @@
     }
 };
 
-_ap.prototype.searchExtraCompositions = function(assets){
+HybridRenderer.prototype.searchExtraCompositions = function(assets){
     var i, len = assets.length;
-    var floatingContainer = _cu('div');
+    var floatingContainer = createTag('div');
     for(i=0;i<len;i+=1){
         if(assets[i].xt){
-            var comp = this.createComp(assets[i],floatingContainer,this._x.comp,null);
+            var comp = this.createComp(assets[i],floatingContainer,this.globalData.comp,null);
             comp.initExpressions();
-            this._x.projectInterface.registerComposition(comp);
+            this.globalData.projectInterface.registerComposition(comp);
         }
     }
 };
 
-function _n() {
+function CVContextData() {
 	this.saved = [];
     this.cArrPos = 0;
     this.cTr = new Matrix();
     this.cO = 1;
     var i, len = 15;
-    this.savedOp = _cs('float32', len);
+    this.savedOp = createTypedArray('float32', len);
     for(i=0;i<len;i+=1){
-        this.saved[i] = _cs('float32', 16);
+        this.saved[i] = createTypedArray('float32', 16);
     }
     this._length = len;
 }
 
-_n.prototype.duplicate = function() {
+CVContextData.prototype.duplicate = function() {
 	var newLength = this._length * 2;
 	var currentSavedOp = this.savedOp;
-    this.savedOp = _cs('float32', newLength);
+    this.savedOp = createTypedArray('float32', newLength);
     this.savedOp.set(currentSavedOp);
     var i = 0;
     for(i = this._length; i < newLength; i += 1) {
-        this.saved[i] = _cs('float32', 16);
+        this.saved[i] = createTypedArray('float32', 16);
     }
     this._length = newLength;
-}
+};
 
-_n.prototype.reset = function() {
+CVContextData.prototype.reset = function() {
 	this.cArrPos = 0;
 	this.cTr.reset();
     this.cO = 1;
-}
-function _c(data, comp, _x){
+};
+function CVBaseElement(){
 }
 
-_c.prototype.createElements = function(){
-    this.checkParenting();
+CVBaseElement.prototype = {
+    createElements: function(){},
+    initRendererElement: function(){},
+    createContainerElements: function(){
+        this.canvasContext = this.globalData.canvasContext;
+        this.renderableEffectsManager = new CVEffects(this);
+    },
+    createContent: function(){},
+    setBlendMode: function(){
+        var globalData = this.globalData;
+        if(globalData.blendMode !== this.data.bm) {
+            globalData.blendMode = this.data.bm;
+            var blendModeValue = this.getBlendMode();
+            globalData.canvasContext.globalCompositeOperation = blendModeValue;
+        }
+    },
+    addMasks: function(){
+        this.maskManager = new CVMaskElement(this.data, this, this.dynamicProperties);
+    },
+    hideElement: function(){
+        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+            this.hidden = true;
+        }
+    },
+    showElement: function(){
+        if (this.isInRange && !this.isTransparent){
+            this.hidden = false;
+            this._isFirstFrame = true;
+            this.maskManager._isFirstFrame = true;
+        }
+    },
+    renderFrame: function() {
+        if (this.hidden) {
+            return;
+        }
+        this.renderTransform();
+        this.renderRenderable();
+        this.setBlendMode();
+        this.globalData.renderer.save();
+        this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
+        this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
+        this.renderInnerContent();
+        this.globalData.renderer.restore();
+        if(this.maskManager.hasMasks) {
+            this.globalData.renderer.restore(true);
+        }
+        if (this._isFirstFrame) {
+            this._isFirstFrame = false;
+        }
+    },
+    destroy: function(){
+        this.canvasContext = null;
+        this.data = null;
+        this.globalData = null;
+        this.maskManager.destroy();
+    },
+    mHelper: new Matrix()
 };
+CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
+CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
 
-_c.prototype.initRendererElement = function(){
-
-};
-_c.prototype.createContainerElements = function(){
-    this._da = this._x._da;
-    this.effectsManager = new _o(this);
-};
-_c.prototype.createContent = function(){};
-
-_c.prototype.setBlendMode = function(){
-    var _x = this._x;
-    if(_x.blendMode !== this.data.bm) {
-        _x.blendMode = this.data.bm;
-        var blendModeValue = this.getBlendMode();
-        _x._da.globalCompositeOperation = blendModeValue;
-    }
-};
-
-_c.prototype.addMasks = function(){
-    this.maskManager = new _q(this.data, this, this._x);
-};
-
-_c.prototype.hideElement = function(){
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        this.hidden = true;
-    }
-};
-
-_c.prototype.showElement = function(){
-    if (this.isInRange && !this.isTransparent){
-        this.hidden = false;
-        this._ch = true;
-        this.maskManager._ch = true;
-    }
-};
-
-_c.prototype._ba = function() {
-    if (this.hidden) {
-        return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.setBlendMode();
-    this._x.renderer.save();
-    this._x.renderer.ctxTransform(this.finalTransform.mat.props);
-    this._x.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
-    this.renderInnerContent();
-    this._x.renderer.restore();
-    if(this.maskManager.hasMasks) {
-        this._x.renderer.restore(true);
-    }
-    if (this._ch) {
-        this._ch = false;
-    }
-};
-
-_c.prototype.hide = _c.prototype.hideElement;
-_c.prototype.show = _c.prototype.showElement;
-
-_c.prototype.destroy = function(){
-    this._da = null;
-    this.data = null;
-    this._x = null;
-    this.maskManager.destroy();
-};
-
-_c.prototype.mHelper = new Matrix();
-
-function _p(data, _x, comp){
+function CVImageElement(data, globalData, comp){
     this.failed = false;
     this.img = new Image();
-    this.assetData = _x.getAssetData(data.refId);
-    this._cz(data,_x,comp);
-    this._x.addPendingElement();
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data,globalData,comp);
+    this.globalData.addPendingElement();
 }
-extendPrototype([_e, _af, _c, _ad, _ac, _ae], _p);
+extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
 
-_p.prototype._cz = SVGShapeElement.prototype._cz;
-_p.prototype._az = _h.prototype._az;
+CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
 
-_p.prototype.imageLoaded = function() {
-    this._x.elementLoaded();
+CVImageElement.prototype.imageLoaded = function() {
+    this.globalData.elementLoaded();
     if(this.assetData.w !== this.img.width || this.assetData.h !== this.img.height){
-        var canvas = _cu('canvas');
+        var canvas = createTag('canvas');
         canvas.width = this.assetData.w;
         canvas.height = this.assetData.h;
         var ctx = canvas.getContext('2d');
@@ -9779,131 +9715,117 @@
         ctx.drawImage(this.img,(imgW-widthCrop)/2,(imgH-heightCrop)/2,widthCrop,heightCrop,0,0,this.assetData.w,this.assetData.h);
         this.img = canvas;
     }
-}
+};
 
-_p.prototype.imageFailed = function() {
+CVImageElement.prototype.imageFailed = function() {
     this.failed = true;
-    this._x.elementLoaded();
-}
+    this.globalData.elementLoaded();
+};
 
-_p.prototype.createContent = function(){
+CVImageElement.prototype.createContent = function(){
     var img = this.img;
     img.addEventListener('load', this.imageLoaded.bind(this), false);
     img.addEventListener('error', this.imageFailed.bind(this), false);
-    var assetPath = this._x.getAssetsPath(this.assetData);
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
     img.src = assetPath;
 
 };
 
-_p.prototype.renderInnerContent = function(parentMatrix){
+CVImageElement.prototype.renderInnerContent = function(parentMatrix){
     if (this.failed) {
         return;
     }
-    this._da.drawImage(this.img, 0, 0);
+    this.canvasContext.drawImage(this.img, 0, 0);
 };
 
-_p.prototype.destroy = function(){
+CVImageElement.prototype.destroy = function(){
     this.img = null;
-    this.destroy_e();
 };
-function _m(data, _x, comp) {
-    this._db = false;
+function CVCompElement(data, globalData, comp) {
+    this.completeLayers = false;
     this.layers = data.layers;
-    this._dc = [];
-    this._br = _cv(this.layers.length);
-    this._cz(data, _x, comp);
-    this.tm = data.tm ? _ai._bo(this,data.tm,0,_x.frameRate,this._co) : {_placeholder:true};
+    this.pendingElements = [];
+    this.elements = createSizedArray(this.layers.length);
+    this.initElement(data, globalData, comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate,this.dynamicProperties) : {_placeholder:true};
 }
 
-extendPrototype([_aq, _g, _c], _m);
+extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
 
-_m.prototype.renderInnerContent = function() {
+CVCompElement.prototype.renderInnerContent = function() {
     var i,len = this.layers.length;
     for( i = len - 1; i >= 0; i -= 1 ){
-        if(this._db || this._br[i]){
-            this._br[i]._ba();
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].renderFrame();
         }
     }
 };
 
-_m.prototype.destroy = function(){
+CVCompElement.prototype.destroy = function(){
     var i,len = this.layers.length;
     for( i = len - 1; i >= 0; i -= 1 ){
-        this._br[i].destroy();
+        if(this.elements[i]) {
+            this.elements[i].destroy();
+        }
     }
     this.layers = null;
-    this._br = null;
+    this.elements = null;
 };
 
-function _q(data,element){
+function CVMaskElement(data,element, dynamicProperties){
     this.data = data;
     this.element = element;
-    this._co = [];
     this.masksProperties = this.data.masksProperties || [];
-    this.viewData = _cv(this.masksProperties.length);
+    this.viewData = createSizedArray(this.masksProperties.length);
     var i, len = this.masksProperties.length, hasMasks = false;
     for (i = 0; i < len; i++) {
         if(this.masksProperties[i].mode !== 'n'){
             hasMasks = true;
         }
-        this.viewData[i] = _ah._bp(this.element,this.masksProperties[i],3,this._co,null);
+        this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3,dynamicProperties,null);
     }
     this.hasMasks = hasMasks;
 }
 
-_q.prototype._az = function(num){
-    var i, len = this._co.length;
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue(num);
-        if(this._co[i].mdf){
-            this.element._x.mdf = true;
-        }
-    }
-};
-
-_q.prototype._ba = function (transform) {
+CVMaskElement.prototype.renderFrame = function (transform) {
     if(!this.hasMasks){
         return;
     }
-    var ctx = this.element._da;
+    var ctx = this.element.canvasContext;
     var i, len = this.masksProperties.length;
-    var pt,pt2,pt3,data;
+    var pt,pts,data;
     ctx.beginPath();
     for (i = 0; i < len; i++) {
         if(this.masksProperties[i].mode !== 'n'){
             if (this.masksProperties[i].inv) {
                 ctx.moveTo(0, 0);
-                ctx.lineTo(this.element._x.compWidth, 0);
-                ctx.lineTo(this.element._x.compWidth, this.element._x.compHeight);
-                ctx.lineTo(0, this.element._x.compHeight);
+                ctx.lineTo(this.element.globalData.compWidth, 0);
+                ctx.lineTo(this.element.globalData.compWidth, this.element.globalData.compHeight);
+                ctx.lineTo(0, this.element.globalData.compHeight);
                 ctx.lineTo(0, 0);
             }
             data = this.viewData[i].v;
-            pt = transform ? transform._cn(data.v[0][0],data.v[0][1],0):data.v[0];
+            pt = transform.applyToPointArray(data.v[0][0],data.v[0][1],0);
             ctx.moveTo(pt[0], pt[1]);
             var j, jLen = data._length;
             for (j = 1; j < jLen; j++) {
-                pt = transform ? transform._cn(data.o[j - 1][0],data.o[j - 1][1],0) : data.o[j - 1];
-                pt2 = transform ? transform._cn(data.i[j][0],data.i[j][1],0) : data.i[j];
-                pt3 = transform ? transform._cn(data.v[j][0],data.v[j][1],0) : data.v[j];
-                ctx.bezierCurveTo(pt[0], pt[1], pt2[0], pt2[1], pt3[0], pt3[1]);
+                pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
+                ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
             }
-            pt = transform ? transform._cn(data.o[j - 1][0],data.o[j - 1][1],0) : data.o[j - 1];
-            pt2 = transform ? transform._cn(data.i[0][0],data.i[0][1],0) : data.i[0];
-            pt3 = transform ? transform._cn(data.v[0][0],data.v[0][1],0) : data.v[0];
-            ctx.bezierCurveTo(pt[0], pt[1], pt2[0], pt2[1], pt3[0], pt3[1]);
+            pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
+            ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
         }
     }
-    this.element._x.renderer.save(true);
+    this.element.globalData.renderer.save(true);
     ctx.clip();
 };
 
-_q.prototype.getMaskProperty = _ay.prototype.getMaskProperty;
+CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
 
-_q.prototype.destroy = function(){
+CVMaskElement.prototype.destroy = function(){
     this.element = null;
 };
-function _r(data, _x, comp) {
+function CVShapeElement(data, globalData, comp) {
     this.shapes = [];
     this.shapesData = data.shapes;
     this.stylesList = [];
@@ -9911,47 +9833,47 @@
     this.prevViewData = [];
     this.shapeModifiers = [];
     this.processedElements = [];
-    this._cz(data, _x, comp);
+    this.initElement(data, globalData, comp);
 }
 
-extendPrototype([_e,_af,_c,_f,_ad,_ac,_ae], _r);
+extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement], CVShapeElement);
 
-_r.prototype._cz = _ci.prototype._cz;
+CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
 
-_r.prototype.transformHelper = {opacity:1,mat:new Matrix(),matMdf:false,opMdf:false};
+CVShapeElement.prototype.transformHelper = {opacity:1,mat:new Matrix(),_matMdf:false,_opMdf:false};
 
-_r.prototype.dashResetter = [];
+CVShapeElement.prototype.dashResetter = [];
 
-_r.prototype.createContent = function(){
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._co, true);
+CVShapeElement.prototype.createContent = function(){
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.dynamicProperties, true);
 };
 
-_r.prototype.createStyleElement = function(data, _co){
+CVShapeElement.prototype.createStyleElement = function(data, dynamicProperties){
     var styleElem = {
         data: data,
         type: data.ty,
-        _br: []
+        elements: []
     };
     var elementData = {};
     if(data.ty == 'fl' || data.ty == 'st'){
-        elementData.c = _ai._bo(this,data.c,1,255,_co);
+        elementData.c = PropertyFactory.getProp(this,data.c,1,255,dynamicProperties);
         if(!elementData.c.k){
             styleElem.co = 'rgb('+bm_floor(elementData.c.v[0])+','+bm_floor(elementData.c.v[1])+','+bm_floor(elementData.c.v[2])+')';
         }
     }
-    elementData.o = _ai._bo(this,data.o,0,0.01,_co);
+    elementData.o = PropertyFactory.getProp(this,data.o,0,0.01,dynamicProperties);
     if(data.ty == 'st') {
         styleElem.lc = this.lcEnum[data.lc] || 'round';
         styleElem.lj = this.ljEnum[data.lj] || 'round';
         if(data.lj == 1) {
             styleElem.ml = data.ml;
         }
-        elementData.w = _ai._bo(this,data.w,0,null,_co);
+        elementData.w = PropertyFactory.getProp(this,data.w,0,null,dynamicProperties);
         if(!elementData.w.k){
             styleElem.wi = elementData.w.v;
         }
         if(data.d){
-            var d = new DashProperty(this,data.d,'canvas',_co);
+            var d = new DashProperty(this,data.d,'canvas',dynamicProperties);
             elementData.d = d;
             if(!elementData.d.k){
                 styleElem.da = elementData.d.dashArray;
@@ -9966,33 +9888,33 @@
     this.stylesList.push(styleElem);
     elementData.style = styleElem;
     return elementData;
-}
+};
 
-_r.prototype.createGroupElement = function(data) {
+CVShapeElement.prototype.createGroupElement = function(data) {
     var elementData = {
         it: [],
         prevViewData: []
     };
     return elementData;
-}
+};
 
-_r.prototype._cp = function(data, _co) {
+CVShapeElement.prototype.createTransformElement = function(data, dynamicProperties) {
     var elementData = {
         transform : {
             mat: new Matrix(),
             opacity: 1,
-            matMdf:false,
-            opMdf:false,
-            op: _ai._bo(this,data.o,0,0.01,_co),
-            //mProps: _ai._bo(this,data,2,null,_co)
-            mProps: _ag._bj(this,data,_co)
+            _matMdf:false,
+            _opMdf:false,
+            op: PropertyFactory.getProp(this,data.o,0,0.01,dynamicProperties),
+            //mProps: PropertyFactory.getProp(this,data,2,null,dynamicProperties)
+            mProps: TransformPropertyFactory.getTransformProperty(this,data,dynamicProperties)
         },
-        _br: []
+        elements: []
     };
     return elementData;
-}
+};
 
-_r.prototype.createShapeElement = function(data, _co) {
+CVShapeElement.prototype.createShapeElement = function(data, dynamicProperties) {
     var elementData = {
         nodes:[],
         trNodes:[],
@@ -10006,14 +9928,14 @@
     }else if(data.ty == 'sr'){
         ty = 7;
     }
-    elementData.sh = _ah._bp(this,data,ty,_co);
+    elementData.sh = ShapePropertyFactory.getShapeProp(this,data,ty,dynamicProperties);
     this.shapes.push(elementData.sh);
     this.addShapeToModifiers(elementData);
     var j, jLen = this.stylesList.length;
     var hasStrokes = false, hasFills = false;
     for(j=0;j<jLen;j+=1){
         if(!this.stylesList[j].closed){
-            this.stylesList[j]._br.push(elementData);
+            this.stylesList[j].elements.push(elementData);
             if(this.stylesList[j].type === 'st'){
                 hasStrokes = true;
             }else{
@@ -10024,26 +9946,26 @@
     elementData.st = hasStrokes;
     elementData.fl = hasFills;
     return elementData;
-}
+};
 
-_r.prototype.reloadShapes = function(){
-    this._ch = true;
+CVShapeElement.prototype.reloadShapes = function(){
+    this._isFirstFrame = true;
     var i, len = this.itemsData.length;
     for(i=0;i<len;i+=1){
         this.prevViewData[i] = this.itemsData[i];
     }
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._co, true);
-    var i, len = this._co.length;
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.dynamicProperties, true);
+    len = this.dynamicProperties.length;
     for(i=0;i<len;i+=1){
-        this._co[i].getValue();
+        this.dynamicProperties[i].getValue();
     }
     this.renderModifiers();
-}
+};
 
-_r.prototype.searchShapes = function(arr,itemsData, prevViewData,_co, render){
+CVShapeElement.prototype.searchShapes = function(arr,itemsData, prevViewData,dynamicProperties, render){
     var i, len = arr.length - 1;
     var j, jLen;
-    var ownArrays = [], ownModifiers = [], processedPos;
+    var ownArrays = [], ownModifiers = [], processedPos, modifier;
     for(i=len;i>=0;i-=1){
         processedPos = this.searchProcessedElement(arr[i]);
         if(!processedPos){
@@ -10053,7 +9975,7 @@
         }
         if(arr[i].ty == 'fl' || arr[i].ty == 'st'){
             if(!processedPos){
-                itemsData[i] = this.createStyleElement(arr[i], _co);
+                itemsData[i] = this.createStyleElement(arr[i], dynamicProperties);
             } else {
                 itemsData[i].style.closed = false;
             }
@@ -10068,20 +9990,20 @@
                     itemsData[i].prevViewData[j] = itemsData[i].it[j];
                 }
             }
-            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,_co, render);
+            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,dynamicProperties, render);
         }else if(arr[i].ty == 'tr'){
             if(!processedPos){
-                itemsData[i] = this._cp(arr[i], _co);
+                itemsData[i] = this.createTransformElement(arr[i], dynamicProperties);
             }
         }else if(arr[i].ty == 'sh' || arr[i].ty == 'rc' || arr[i].ty == 'el' || arr[i].ty == 'sr'){
             if(!processedPos){
-                itemsData[i] = this.createShapeElement(arr[i], _co);
+                itemsData[i] = this.createShapeElement(arr[i], dynamicProperties);
             }
             
         }else if(arr[i].ty == 'tm' || arr[i].ty == 'rd'){
             if(!processedPos){
-                var modifier = _as.getModifier(arr[i].ty);
-                modifier.init(this,arr[i],_co);
+                modifier = ShapeModifiers.getModifier(arr[i].ty);
+                modifier.init(this,arr[i],dynamicProperties);
                 itemsData[i] = modifier;
                 this.shapeModifiers.push(modifier);
             } else {
@@ -10091,9 +10013,9 @@
             ownModifiers.push(modifier);
         } else if(arr[i].ty == 'rp'){
             if(!processedPos){
-                modifier = _as.getModifier(arr[i].ty);
+                modifier = ShapeModifiers.getModifier(arr[i].ty);
                 itemsData[i] = modifier;
-                modifier.init(this,arr,i,itemsData,_co);
+                modifier.init(this,arr,i,itemsData,dynamicProperties);
                 this.shapeModifiers.push(modifier);
                 render = false;
             }else{
@@ -10114,52 +10036,100 @@
     }
 };
 
-_r.prototype.renderInnerContent = function() {
+CVShapeElement.prototype.renderInnerContent = function() {
 
     this.transformHelper.mat.reset();
-    this.transformHelper.opacity = this.finalTransform.mProp.o.v;
-    this.transformHelper.matMdf = false;
-    this.transformHelper.opMdf = this.finalTransform.opMdf;
+    this.transformHelper.opacity = 1;
+    this.transformHelper._matMdf = false;
+    this.transformHelper._opMdf = false;
     this.renderModifiers();
-    this.renderShape(this.transformHelper,null,null,true);
-}
+    this.renderShape(this.transformHelper,this.shapesData,this.itemsData,true);
+};
 
-_r.prototype.renderShape = function(parentTransform,items,data,isMain){
-    var i, len;
-    if(!items){
-        items = this.shapesData;
-        len = this.stylesList.length;
-        for(i=0;i<len;i+=1){
-            this.stylesList[i].d = '';
-            this.stylesList[i].mdf = false;
+CVShapeElement.prototype.renderShapeTransform = function(parentTransform, groupTransform) {
+    var props, groupMatrix;
+    if(parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+        groupTransform.opacity = parentTransform.opacity;
+        groupTransform.opacity *= groupTransform.op.v;
+        groupTransform._opMdf = true;
+    }
+    if(parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
+        groupMatrix = groupTransform.mat;
+        groupMatrix.cloneFromProps(groupTransform.mProps.v.props);
+        groupTransform._matMdf = true;
+        props = parentTransform.mat.props;
+        groupMatrix.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]);
+    }
+};
+
+CVShapeElement.prototype.drawLayer = function() {
+    var i, len = this.stylesList.length;
+    var j, jLen, k, kLen,elems,nodes, renderer = this.globalData.renderer, ctx = this.globalData.canvasContext, type, currentStyle;
+    for(i=0;i<len;i+=1){
+        currentStyle = this.stylesList[i];
+        type = currentStyle.type;
+        if((type === 'st' && currentStyle.wi === 0) || !currentStyle.data._render || currentStyle.coOp === 0){
+            continue;
         }
+        renderer.save();
+        elems = currentStyle.elements;
+        if(type === 'st'){
+            ctx.strokeStyle = currentStyle.co;
+            ctx.lineWidth = currentStyle.wi;
+            ctx.lineCap = currentStyle.lc;
+            ctx.lineJoin = currentStyle.lj;
+            ctx.miterLimit = currentStyle.ml || 0;
+        }else{
+            ctx.fillStyle = currentStyle.co;
+        }
+        renderer.ctxOpacity(currentStyle.coOp);
+        if(type !== 'st'){
+            ctx.beginPath();
+        }
+        jLen = elems.length;
+        for(j=0;j<jLen;j+=1){
+            if(type === 'st'){
+                ctx.beginPath();
+                if(currentStyle.da){
+                    ctx.setLineDash(currentStyle.da);
+                    ctx.lineDashOffset = currentStyle.do;
+                    this.globalData.isDashed = true;
+                }else if(this.globalData.isDashed){
+                    ctx.setLineDash(this.dashResetter);
+                    this.globalData.isDashed = false;
+                }
+            }
+            nodes = elems[j].trNodes;
+            kLen = nodes.length;
+
+            for(k=0;k<kLen;k+=1){
+                if(nodes[k].t == 'm'){
+                    ctx.moveTo(nodes[k].p[0],nodes[k].p[1]);
+                }else if(nodes[k].t == 'c'){
+                    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]);
+                }else{
+                    ctx.closePath();
+                }
+            }
+            if(type === 'st'){
+                ctx.stroke();
+            }
+        }
+        if(type !== 'st'){
+            ctx.fill(currentStyle.r);
+        }
+        renderer.restore();
     }
-    if(!data){
-        data = this.itemsData;
-    }
-    ///
-    ///
-    len = items.length - 1;
-    var groupTransform,groupMatrix;
+};
+
+CVShapeElement.prototype.renderShape = function(parentTransform,items,data,isMain){
+    var i, len = items.length - 1;
+    var groupTransform;
     groupTransform = parentTransform;
     for(i=len;i>=0;i-=1){
         if(items[i].ty == 'tr'){
             groupTransform = data[i].transform;
-            var mtArr = data[i].transform.mProps.v.props;
-            groupTransform.matMdf = groupTransform.mProps.mdf;
-            groupTransform.opMdf = groupTransform.op.mdf;
-            groupMatrix = groupTransform.mat;
-            groupMatrix.cloneFromProps(mtArr);
-            if(parentTransform){
-                var props = parentTransform.mat.props;
-                groupTransform.opacity = parentTransform.opacity;
-                groupTransform.opacity *= data[i].transform.op.v;
-                groupTransform.matMdf = parentTransform.matMdf ? true : groupTransform.matMdf;
-                groupTransform.opMdf = parentTransform.opMdf ? true : groupTransform.opMdf;
-                groupMatrix.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]);
-            }else{
-                groupTransform.opacity = groupTransform.op.o;
-            }
+            this.renderShapeTransform(parentTransform, groupTransform);
         }else if(items[i].ty == 'sh' || items[i].ty == 'el' || items[i].ty == 'rc' || items[i].ty == 'sr'){
             this.renderPath(items[i],data[i],groupTransform);
         }else if(items[i].ty == 'fl'){
@@ -10172,75 +10142,14 @@
             //
         }
     }
-    if(!isMain){
-        return;
+    if(isMain){
+        this.drawLayer();
     }
-    len = this.stylesList.length;
-    var j, jLen, k, kLen,elems,nodes, renderer = this._x.renderer, ctx = this._x._da, type;
-    //renderer.save();
-    //renderer.ctxTransform(this.finalTransform.mat.props);
-    for(i=0;i<len;i+=1){
-        type = this.stylesList[i].type;
-        if((type === 'st' && this.stylesList[i].wi === 0) || !this.stylesList[i].data._render){
-            continue;
-        }
-        renderer.save();
-        elems = this.stylesList[i]._br;
-        if(type === 'st'){
-            ctx.strokeStyle = this.stylesList[i].co;
-            ctx.lineWidth = this.stylesList[i].wi;
-            ctx.lineCap = this.stylesList[i].lc;
-            ctx.lineJoin = this.stylesList[i].lj;
-            ctx.miterLimit = this.stylesList[i].ml || 0;
-        }else{
-            ctx.fillStyle = this.stylesList[i].co;
-        }
-        renderer.ctxOpacity(this.stylesList[i].coOp);
-        if(type !== 'st'){
-            ctx.beginPath();
-        }
-        jLen = elems.length;
-        for(j=0;j<jLen;j+=1){
-            if(type === 'st'){
-                ctx.beginPath();
-                if(this.stylesList[i].da){
-                    ctx.setLineDash(this.stylesList[i].da);
-                    ctx.lineDashOffset = this.stylesList[i].do;
-                    this._x.isDashed = true;
-                }else if(this._x.isDashed){
-                    ctx.setLineDash(this.dashResetter);
-                    this._x.isDashed = false;
-                }
-            }
-            nodes = elems[j].trNodes;
-            kLen = nodes.length;
-
-            for(k=0;k<kLen;k+=1){
-                if(nodes[k].t == 'm'){
-                    ctx.moveTo(nodes[k].p[0],nodes[k].p[1]);
-                }else if(nodes[k].t == 'c'){
-                    ctx.bezierCurveTo(nodes[k].p1[0],nodes[k].p1[1],nodes[k].p2[0],nodes[k].p2[1],nodes[k].p3[0],nodes[k].p3[1]);
-                }else{
-                    ctx.closePath();
-                }
-            }
-            if(type === 'st'){
-                ctx.stroke();
-            }
-        }
-        if(type !== 'st'){
-            ctx.fill(this.stylesList[i].r);
-        }
-        renderer.restore();
-    }
-    //renderer.restore();
-    if(this._ch){
-        this._ch = false;
-    }
+    
 };
-_r.prototype.renderPath = function(pathData,itemData,groupTransform){
+CVShapeElement.prototype.renderPath = function(pathData,itemData,groupTransform){
     var len, i, j,jLen;
-    var redraw = groupTransform.matMdf || itemData.sh.mdf || this._ch;
+    var redraw = groupTransform._matMdf || itemData.sh._mdf || this._isFirstFrame;
     if(redraw) {
         var paths = itemData.sh.paths, groupTransformMat = groupTransform.mat;
         jLen = pathData._render === false ? 0 : paths._length;
@@ -10254,28 +10163,24 @@
                     if (i == 1) {
                         pathStringTransformed.push({
                             t: 'm',
-                            p: groupTransformMat._cn(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+                            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
                         });
                     }
                     pathStringTransformed.push({
                         t: 'c',
-                        p1: groupTransformMat._cn(pathNodes.o[i - 1][0], pathNodes.o[i - 1][1], 0),
-                        p2: groupTransformMat._cn(pathNodes.i[i][0], pathNodes.i[i][1], 0),
-                        p3: groupTransformMat._cn(pathNodes.v[i][0], pathNodes.v[i][1], 0)
+                        pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
                     });
                 }
                 if (len == 1) {
                     pathStringTransformed.push({
                         t: 'm',
-                        p: groupTransformMat._cn(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+                        p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
                     });
                 }
                 if (pathNodes.c && len) {
                     pathStringTransformed.push({
                         t: 'c',
-                        p1: groupTransformMat._cn(pathNodes.o[i - 1][0], pathNodes.o[i - 1][1], 0),
-                        p2: groupTransformMat._cn(pathNodes.i[0][0], pathNodes.i[0][1], 0),
-                        p3: groupTransformMat._cn(pathNodes.v[0][0], pathNodes.v[0][1], 0)
+                        pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
                     });
                     pathStringTransformed.push({
                         t: 'z'
@@ -10298,61 +10203,60 @@
 
 
 
-_r.prototype.renderFill = function(styleData,itemData, groupTransform){
+CVShapeElement.prototype.renderFill = function(styleData,itemData, groupTransform){
     var styleElem = itemData.style;
 
-    if(itemData.c.mdf || this._ch){
+    if(itemData.c._mdf || this._isFirstFrame){
         styleElem.co = 'rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')';
     }
-    if(itemData.o.mdf || groupTransform.opMdf || this._ch){
+    if(itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame){
         styleElem.coOp = itemData.o.v*groupTransform.opacity;
     }
 };
 
-_r.prototype.renderStroke = function(styleData,itemData, groupTransform){
+CVShapeElement.prototype.renderStroke = function(styleData,itemData, groupTransform){
     var styleElem = itemData.style;
-    //TODO fix dashes
     var d = itemData.d;
-    if(d && (d.mdf  || this._ch)){
+    if(d && (d._mdf  || this._isFirstFrame)){
         styleElem.da = d.dashArray;
         styleElem.do = d.dashoffset[0];
     }
-    if(itemData.c.mdf || this._ch){
+    if(itemData.c._mdf || this._isFirstFrame){
         styleElem.co = 'rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')';
     }
-    if(itemData.o.mdf || groupTransform.opMdf || this._ch){
+    if(itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame){
         styleElem.coOp = itemData.o.v*groupTransform.opacity;
     }
-    if(itemData.w.mdf || this._ch){
+    if(itemData.w._mdf || this._isFirstFrame){
         styleElem.wi = itemData.w.v;
     }
 };
 
 
-_r.prototype.destroy = function(){
+CVShapeElement.prototype.destroy = function(){
     this.shapesData = null;
-    this._x = null;
-    this._da = null;
+    this.globalData = null;
+    this.canvasContext = null;
     this.stylesList.length = 0;
     this.itemsData.length = 0;
 };
 
 
-function _s(data, _x, comp) {
-    this._cz(data,_x,comp);
+function CVSolidElement(data, globalData, comp) {
+    this.initElement(data,globalData,comp);
 }
-extendPrototype([_e, _af, _c, _ad, _ac, _ae], _s);
+extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
 
-_s.prototype._cz = SVGShapeElement.prototype._cz;
-_s.prototype._az = _h.prototype._az;
+CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
+CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
 
-_s.prototype.renderInnerContent = function() {
-    var ctx = this._da;
+CVSolidElement.prototype.renderInnerContent = function() {
+    var ctx = this.canvasContext;
     ctx.fillStyle = this.data.sc;
     ctx.fillRect(0, 0, this.data.sw, this.data.sh);
     //
 };
-function _t(data, _x, comp){
+function CVTextElement(data, globalData, comp){
     this.textSpans = [];
     this.yOffset = 0;
     this.fillColorAnim = false;
@@ -10368,16 +10272,16 @@
         stroke: 'rgba(0,0,0,0)',
         sWidth: 0,
         fValue: ''
-    }
-    this._cz(data,_x,comp);
+    };
+    this.initElement(data,globalData,comp);
 }
-extendPrototype([_e,_af,_c,_ad,_ac,_ae,_k], _t);
+extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement], CVTextElement);
 
-_t.prototype.tHelper = _cu('canvas').getContext('2d');
+CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
 
-_t.prototype.buildNewText = function(){
+CVTextElement.prototype.buildNewText = function(){
     var documentData = this.textProperty.currentData;
-    this._bt = _cv(documentData.l ? documentData.l.length : 0);
+    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
 
     var hasFill = false;
     if(documentData.fc) {
@@ -10393,20 +10297,20 @@
         this.values.stroke = this.buildColor(documentData.sc);
         this.values.sWidth = documentData.sw;
     }
-    var fontData = this._x._cr.getFontByName(documentData.f);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
     var i, len;
     var letters = documentData.l;
     var matrixHelper = this.mHelper;
     this.stroke = hasStroke;
-    this.values.fValue = documentData.s + 'px '+ this._x._cr.getFontByName(documentData.f).fFamily;
-    len = documentData.t.length;
+    this.values.fValue = documentData.finalSize + 'px '+ this.globalData.fontManager.getFontByName(documentData.f).fFamily;
+    len = documentData.finalText.length;
     //this.tHelper.font = this.values.fValue;
     var charData, shapeData, k, kLen, shapes, j, jLen, pathNodes, commands, pathArr, singleShape = this.data.singleShape;
-    var trackingOffset = documentData.tr/1000*documentData.s;
+    var trackingOffset = documentData.tr/1000*documentData.finalSize;
     var xPos = 0, yPos = 0, firstLine = true;
     var cnt = 0;
     for (i = 0; i < len; i += 1) {
-        charData = this._x._cr.getCharData(documentData.t.charAt(i), fontData.fStyle, this._x._cr.getFontByName(documentData.f).fFamily);
+        charData = this.globalData.fontManager.getCharData(documentData.finalText.charAt(i), fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
         shapeData = charData && charData.data || {};
         matrixHelper.reset();
         if(singleShape && letters[i].n) {
@@ -10418,11 +10322,11 @@
 
         shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
         jLen = shapes.length;
-        matrixHelper.scale(documentData.s/100,documentData.s/100);
+        matrixHelper.scale(documentData.finalSize/100,documentData.finalSize/100);
         if(singleShape){
             this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
         }
-        commands = _cv(jLen)
+        commands = createSizedArray(jLen);
         for(j=0;j<jLen;j+=1){
             kLen = shapes[j].ks.k.i.length;
             pathNodes = shapes[j].ks.k;
@@ -10447,10 +10351,10 @@
         }
         cnt +=1;
     }
-}
+};
 
-_t.prototype.renderInnerContent = function(){
-    var ctx = this._da;
+CVTextElement.prototype.renderInnerContent = function(){
+    var ctx = this.canvasContext;
     var finalMat = this.finalTransform.mat.props;
     ctx.font = this.values.fValue;
     ctx.lineCap = 'butt';
@@ -10462,28 +10366,28 @@
     }
 
     var  i,len, j, jLen, k, kLen;
-    var _bt = this.textAnimator._bt;
+    var renderedLetters = this.textAnimator.renderedLetters;
 
     var letters = this.textProperty.currentData.l;
 
     len = letters.length;
-    var _bu;
+    var renderedLetter;
     var lastFill = null, lastStroke = null, lastStrokeW = null, commands, pathArr;
     for(i=0;i<len;i+=1){
         if(letters[i].n){
             continue;
         }
-        _bu = _bt[i];
-        if(_bu){
-            this._x.renderer.save();
-            this._x.renderer.ctxTransform(_bu.p);
-            this._x.renderer.ctxOpacity(_bu.o);
+        renderedLetter = renderedLetters[i];
+        if(renderedLetter){
+            this.globalData.renderer.save();
+            this.globalData.renderer.ctxTransform(renderedLetter.p);
+            this.globalData.renderer.ctxOpacity(renderedLetter.o);
         }
         if(this.fill){
-            if(_bu && _bu.fc){
-                if(lastFill !== _bu.fc){
-                    lastFill = _bu.fc;
-                    ctx.fillStyle = _bu.fc;
+            if(renderedLetter && renderedLetter.fc){
+                if(lastFill !== renderedLetter.fc){
+                    lastFill = renderedLetter.fc;
+                    ctx.fillStyle = renderedLetter.fc;
                 }
             }else if(lastFill !== this.values.fill){
                 lastFill = this.values.fill;
@@ -10491,33 +10395,33 @@
             }
             commands = this.textSpans[i].elem;
             jLen = commands.length;
-            this._x._da.beginPath();
+            this.globalData.canvasContext.beginPath();
             for(j=0;j<jLen;j+=1) {
                 pathArr = commands[j];
                 kLen = pathArr.length;
-                this._x._da.moveTo(pathArr[0], pathArr[1]);
+                this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
                 for (k = 2; k < kLen; k += 6) {
-                    this._x._da.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+                    this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
                 }
             }
-            this._x._da.closePath();
-            this._x._da.fill();
+            this.globalData.canvasContext.closePath();
+            this.globalData.canvasContext.fill();
             ///ctx.fillText(this.textSpans[i].val,0,0);
         }
         if(this.stroke){
-            if(_bu && _bu.sw){
-                if(lastStrokeW !== _bu.sw){
-                    lastStrokeW = _bu.sw;
-                    ctx.lineWidth = _bu.sw;
+            if(renderedLetter && renderedLetter.sw){
+                if(lastStrokeW !== renderedLetter.sw){
+                    lastStrokeW = renderedLetter.sw;
+                    ctx.lineWidth = renderedLetter.sw;
                 }
             }else if(lastStrokeW !== this.values.sWidth){
                 lastStrokeW = this.values.sWidth;
                 ctx.lineWidth = this.values.sWidth;
             }
-            if(_bu && _bu.sc){
-                if(lastStroke !== _bu.sc){
-                    lastStroke = _bu.sc;
-                    ctx.strokeStyle = _bu.sc;
+            if(renderedLetter && renderedLetter.sc){
+                if(lastStroke !== renderedLetter.sc){
+                    lastStroke = renderedLetter.sc;
+                    ctx.strokeStyle = renderedLetter.sc;
                 }
             }else if(lastStroke !== this.values.stroke){
                 lastStroke = this.values.stroke;
@@ -10525,166 +10429,147 @@
             }
             commands = this.textSpans[i].elem;
             jLen = commands.length;
-            this._x._da.beginPath();
+            this.globalData.canvasContext.beginPath();
             for(j=0;j<jLen;j+=1) {
                 pathArr = commands[j];
                 kLen = pathArr.length;
-                this._x._da.moveTo(pathArr[0], pathArr[1]);
+                this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
                 for (k = 2; k < kLen; k += 6) {
-                    this._x._da.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
+                    this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
                 }
             }
-            this._x._da.closePath();
-            this._x._da.stroke();
+            this.globalData.canvasContext.closePath();
+            this.globalData.canvasContext.stroke();
             ///ctx.strokeText(letters[i].val,0,0);
         }
-        if(_bu) {
-            this._x.renderer.restore();
+        if(renderedLetter) {
+            this.globalData.renderer.restore();
         }
     }
     /*if(this.data.hasMask){
-     this._x.renderer.restore(true);
+     this.globalData.renderer.restore(true);
      }*/
 };
-function _o() {
+function CVEffects() {
 
 }
-_o.prototype._ba = function(){}
-function _b(data,_x,comp){
+CVEffects.prototype.renderFrame = function(){};
+function HBaseElement(data,globalData,comp){}
+HBaseElement.prototype = {
+    checkBlendMode: function(){},
+    initRendererElement: function(){
+        this.baseElement = createTag('div');
+        if(this.data.hasMask) {
+            this.svgElement = createNS('svg');
+            this.layerElement = createNS('g');
+            this.maskedElement = this.layerElement;
+            this.svgElement.appendChild(this.layerElement);
+            this.baseElement.appendChild(this.svgElement);
+        } else {
+            this.layerElement = this.baseElement;
+        }
+        styleDiv(this.baseElement);
+    },
+    createContainerElements: function(){
+        this.renderableEffectsManager = new CVEffects(this);
+        this.transformedElement = this.baseElement;
+        this.maskedElement = this.layerElement;
+        if (this.data.ln) {
+            this.layerElement.setAttribute('id',this.data.ln);
+        }
+        if (this.data.bm !== 0) {
+            this.setBlendMode();
+        }
+    },
+    renderElement: function() {
+        if(this.finalTransform._matMdf){
+            this.transformedElement.style.transform = this.transformedElement.style.webkitTransform = this.finalTransform.mat.toCSS();
+        }
+        if(this.finalTransform._opMdf){
+            this.transformedElement.style.opacity = this.finalTransform.mProp.o.v;
+        }
+    },
+    renderFrame: function() {
+        //If it is exported as hidden (data.hd === true) no need to render
+        //If it is not visible no need to render
+        if (this.data.hd || this.hidden) {
+            return;
+        }
+        this.renderTransform();
+        this.renderRenderable();
+        this.renderElement();
+        this.renderInnerContent();
+        if (this._isFirstFrame) {
+            this._isFirstFrame = false;
+        }
+    },
+    destroy: function(){
+        this.layerElement = null;
+        this.transformedElement = null;
+        if(this.matteElement) {
+            this.matteElement = null;
+        }
+        if(this.maskManager) {
+            this.maskManager.destroy();
+            this.maskManager = null;
+        }
+    },
+    addMasks: function(){
+        this.maskManager = new MaskElement(this.data, this, this.globalData, this.dynamicProperties);
+    },
+    setMatte: function(){}
 };
-
-_b.prototype.checkBlendMode = function(){
-};
-
-_b.prototype.get_e = _d.prototype.get_e;
-
-_b.prototype.initRendererElement = function(){
-    this._by = _cu('div');
-    if(this.data.hasMask) {
-        this._cf = _ct('svg');
-        this._bx = _ct('g');
-        this._ca = this._bx;
-        this._cf.appendChild(this._bx);
-        this._by.appendChild(this._cf);
-    } else {
-        this._bx = this._by;
-    }
-    styleDiv(this._by);
+HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
+HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
+HBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;
+function HSolidElement(data,globalData,comp){
+    this.initElement(data,globalData,comp);
 }
+extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], HSolidElement);
 
-_b.prototype.createContainerElements = function(){
-    this.effectsManager = new _o(this);
-    this._bz = this._by;
-    this._ca = this._bx;
-    if (this.data.ln) {
-        this._bx.setAttribute('id',this.data.ln);
-    }
-    if (this.data.bm !== 0) {
-        this.setBlendMode();
-    }
-    this.checkParenting();
-};
-
-_b.prototype.renderElement = function() {
-    if(this.finalTransform.matMdf){
-        this._bz.style.transform = this._bz.style.webkitTransform = this.finalTransform.mat.toCSS();
-    }
-    if(this.finalTransform.opMdf){
-        this._bz.style.opacity = this.finalTransform.mProp.o.v;
-    }
-};
-
-_b.prototype._ba = function() {
-    //If it is exported as hidden (data.hd === true) no need to render
-    //If it is not visible no need to render
-    if (this.data.hd || this.hidden) {
-        return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.renderElement();
-    this.renderInnerContent();
-    if (this._ch) {
-        this._ch = false;
-    }
-};
-
-_b.prototype.destroy = function(){
-    this._bx = null;
-    this._bz = null;
-    if(this.matteElement) {
-        this.matteElement = null;
-    }
-    if(this.maskManager) {
-        this.maskManager.destroy();
-        this.maskManager = null;
-    }
-};
-
-_b.prototype.getDomElement = function(){
-    return this._bx;
-};
-_b.prototype.addMasks = function(){
-    this.maskManager = new _ay(this.data, this, this._x);
-};
-
-_b.prototype.setMatte = function(){
-
-}
-
-_b.prototype.buildElementParenting = _ap.prototype.buildElementParenting;
-function _aa(data,_x,comp){
-    this._cz(data,_x,comp);
-}
-extendPrototype([_e,_af,_b,_ad,_ac,_ci], _aa);
-
-_aa.prototype.createContent = function(){
+HSolidElement.prototype.createContent = function(){
     var rect;
     if(this.data.hasMask){
-        rect = _ct('rect');
+        rect = createNS('rect');
         rect.setAttribute('width',this.data.sw);
         rect.setAttribute('height',this.data.sh);
         rect.setAttribute('fill',this.data.sc);
-        this._cf.setAttribute('width',this.data.sw);
-        this._cf.setAttribute('height',this.data.sh);
+        this.svgElement.setAttribute('width',this.data.sw);
+        this.svgElement.setAttribute('height',this.data.sh);
     } else {
-        rect = _cu('div');
+        rect = createTag('div');
         rect.style.width = this.data.sw + 'px';
         rect.style.height = this.data.sh + 'px';
         rect.style.backgroundColor = this.data.sc;
     }
-    this._bx.appendChild(rect);
+    this.layerElement.appendChild(rect);
 };
 
-function _w(data,_x,comp){
+function HCompElement(data,globalData,comp){
     this.layers = data.layers;
     this.supports3d = !data.hasMask;
-    this._db = false;
-    this._dc = [];
-    this._br = this.layers ? _cv(this.layers.length) : [];
-    this.tm = data.tm ? _ai._bo(this,data.tm,0,_x.frameRate,this._co) : {_placeholder:true};
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate,this.dynamicProperties) : {_placeholder:true};
     
-    this._cz(data,_x,comp);
+    this.initElement(data,globalData,comp);
 }
 
-extendPrototype([_ap, _g, _b], _w);
+extendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);
+HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
 
-_w.prototype.createContainerElements = function(){
+HCompElement.prototype.createContainerElements = function(){
+    this._createBaseContainerElements();
     //divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
     if(this.data.hasMask){
-        this._bz = this._bx;
-        this._cf.setAttribute('width',this.data.w);
-        this._cf.setAttribute('height',this.data.h);
-    }else{
-        this._bz = this._bx;
-
+        this.svgElement.setAttribute('width',this.data.w);
+        this.svgElement.setAttribute('height',this.data.h);
     }
-    //this.appendNodeToParent(this._bx);
-    this.effectsManager = new _o(this);
-    this.checkParenting();
+    this.transformedElement = this.layerElement;
 };
-function _z(data,_x,comp){
-    //List of drawable _br
+function HShapeElement(data,globalData,comp){
+    //List of drawable elements
     this.shapes = [];
     // Full shape data
     this.shapesData = data.shapes;
@@ -10696,124 +10581,123 @@
     this.itemsData = [];
     //List of items in previous shape tree
     this.processedElements = [];
-    this.shapesContainer = _ct('g');
-    this._cz(data,_x,comp);
+    this.shapesContainer = createNS('g');
+    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.
-    // List of _br that have been created
+    // List of elements that have been created
     this.prevViewData = [];
-    this._cg = {
+    this.currentBBox = {
         x:999999,
         y: -999999,
         h: 0,
         w: 0
     };
 }
-extendPrototype([_e,_af,_aa,SVGShapeElement,_b,_ad,_ac,_ae], _z);
-_z.prototype._renderShapeFrame = _z.prototype.renderInnerContent;
+extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement], HShapeElement);
+HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
 
-_z.prototype.createContent = function(){
+HShapeElement.prototype.createContent = function(){
     var cont;
     if (this.data.hasMask) {
-        this._bx.appendChild(this.shapesContainer);
-        cont = this._cf;
+        this.layerElement.appendChild(this.shapesContainer);
+        cont = this.svgElement;
     } else {
-        cont = _ct('svg');
-        var size = this.comp.data ? this.comp.data : this._x._de;
+        cont = createNS('svg');
+        var size = this.comp.data ? this.comp.data : this.globalData.compSize;
         cont.setAttribute('width',size.w);
         cont.setAttribute('height',size.h);
         cont.appendChild(this.shapesContainer);
-        this._bx.appendChild(cont);
+        this.layerElement.appendChild(cont);
     }
 
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,this._co,0, [], true);
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,this.dynamicProperties,0, [], true);
     this.shapeCont = cont;
 };
 
-_z.prototype.renderInnerContent = function() {
+HShapeElement.prototype.renderInnerContent = function() {
     this._renderShapeFrame();
 
-    //TODO: this also needs to be recalculated every time a property changes. Check how canvas renderer uses _x.mdf. Also would be great to calculate size from shapes and not from DOM.
-    if(!this.hidden && this._ch) {
+    if(!this.hidden && (this._isFirstFrame || this._mdf)) {
         var boundingBox = this.shapeCont.getBBox();
         var changed = false;
-        if(this._cg.w !== boundingBox.width){
-            this._cg.w = boundingBox.width;
+        if(this.currentBBox.w !== boundingBox.width){
+            this.currentBBox.w = boundingBox.width;
             this.shapeCont.setAttribute('width',boundingBox.width);
             changed = true;
         }
-        if(this._cg.h !== boundingBox.height){
-            this._cg.h = boundingBox.height;
+        if(this.currentBBox.h !== boundingBox.height){
+            this.currentBBox.h = boundingBox.height;
             this.shapeCont.setAttribute('height',boundingBox.height);
             changed = true;
         }
-        if(changed  || this._cg.x !== boundingBox.x  || this._cg.y !== boundingBox.y){
-            this._cg.w = boundingBox.width;
-            this._cg.h = boundingBox.height;
-            this._cg.x = boundingBox.x;
-            this._cg.y = boundingBox.y;
+        if(changed  || this.currentBBox.x !== boundingBox.x  || this.currentBBox.y !== boundingBox.y){
+            this.currentBBox.w = boundingBox.width;
+            this.currentBBox.h = boundingBox.height;
+            this.currentBBox.x = boundingBox.x;
+            this.currentBBox.y = boundingBox.y;
 
-            this.shapeCont.setAttribute('viewBox',this._cg.x+' '+this._cg.y+' '+this._cg.w+' '+this._cg.h);
-            this.shapeCont.style.transform = this.shapeCont.style.webkitTransform = 'translate(' + this._cg.x + 'px,' + this._cg.y + 'px)';
+            this.shapeCont.setAttribute('viewBox',this.currentBBox.x+' '+this.currentBBox.y+' '+this.currentBBox.w+' '+this.currentBBox.h);
+            this.shapeCont.style.transform = this.shapeCont.style.webkitTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
         }
     }
 
 };
-function _ab(data,_x,comp){
+function HTextElement(data,globalData,comp){
     this.textSpans = [];
     this.textPaths = [];
-    this._cg = {
+    this.currentBBox = {
         x:999999,
         y: -999999,
         h: 0,
         w: 0
-    }
+    };
     this.renderType = 'svg';
     this.isMasked = false;
-    this._cz(data,_x,comp);
+    this.initElement(data,globalData,comp);
 
 }
-extendPrototype([_e,_af,_b,_ad,_ac,_ci,_k], _ab);
+extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement], HTextElement);
 
-_ab.prototype.createContent = function(){
+HTextElement.prototype.createContent = function(){
     this.isMasked = this.checkMasks();
     if(this.isMasked){
         this.renderType = 'svg';
         this.compW = this.comp.data.w;
         this.compH = this.comp.data.h;
-        this._cf.setAttribute('width',this.compW);
-        this._cf.setAttribute('height',this.compH);
-        var g = _ct('g');
-        this._ca.appendChild(g);
-        this._cc = g;
+        this.svgElement.setAttribute('width',this.compW);
+        this.svgElement.setAttribute('height',this.compH);
+        var g = createNS('g');
+        this.maskedElement.appendChild(g);
+        this.innerElem = g;
     } else {
         this.renderType = 'html';
-        this._cc = this._bx;
+        this.innerElem = this.layerElement;
     }
 
     this.checkParenting();
 
 };
 
-_ab.prototype.buildNewText = function(){
+HTextElement.prototype.buildNewText = function(){
     var documentData = this.textProperty.currentData;
-    this._bt = _cv(this.textProperty.currentData.l ? this.textProperty.currentData.l.length : 0);
-    var _cb = this._cc.style;
-    _cb.color = _cb.fill = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
+    this.renderedLetters = createSizedArray(this.textProperty.currentData.l ? this.textProperty.currentData.l.length : 0);
+    var innerElemStyle = this.innerElem.style;
+    innerElemStyle.color = innerElemStyle.fill = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
     if(documentData.sc){
-        _cb.stroke = this.buildColor(documentData.sc);
-        _cb.strokeWidth = documentData.sw+'px';
+        innerElemStyle.stroke = this.buildColor(documentData.sc);
+        innerElemStyle.strokeWidth = documentData.sw+'px';
     }
-    var fontData = this._x._cr.getFontByName(documentData.f);
-    if(!this._x._cr.chars){
-        _cb.fontSize = documentData.s+'px';
-        _cb.lineHeight = documentData.s+'px';
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
+    if(!this.globalData.fontManager.chars){
+        innerElemStyle.fontSize = documentData.finalSize+'px';
+        innerElemStyle.lineHeight = documentData.finalSize+'px';
         if(fontData.fClass){
-            this._cc.className = fontData.fClass;
+            this.innerElem.className = fontData.fClass;
         } else {
-            _cb.fontFamily = fontData.fFamily;
+            innerElemStyle.fontFamily = fontData.fFamily;
             var fWeight = documentData.fWeight, fStyle = documentData.fStyle;
-            _cb.fontStyle = fStyle;
-            _cb.fontWeight = fWeight;
+            innerElemStyle.fontStyle = fStyle;
+            innerElemStyle.fontWeight = fWeight;
         }
     }
     var i, len;
@@ -10825,9 +10709,9 @@
     var shapes, shapeStr = '';
     var cnt = 0;
     for (i = 0;i < len ;i += 1) {
-        if(this._x._cr.chars){
+        if(this.globalData.fontManager.chars){
             if(!this.textPaths[cnt]){
-                tSpan = _ct('path');
+                tSpan = createNS('path');
                 tSpan.setAttribute('stroke-linecap', 'butt');
                 tSpan.setAttribute('stroke-linejoin','round');
                 tSpan.setAttribute('stroke-miterlimit','4');
@@ -10840,8 +10724,8 @@
                     tCont = tParent.children[0];
                 } else {
 
-                    tParent = _cu('div');
-                    tCont = _ct('svg');
+                    tParent = createTag('div');
+                    tCont = createNS('svg');
                     tCont.appendChild(tSpan);
                     styleDiv(tParent);
                 }
@@ -10852,19 +10736,19 @@
                     tParent = this.textSpans[cnt];
                     tSpan = this.textPaths[cnt];
                 } else {
-                    tParent = _cu('span');
+                    tParent = createTag('span');
                     styleDiv(tParent);
-                    tSpan = _cu('span');
+                    tSpan = createTag('span');
                     styleDiv(tSpan);
                     tParent.appendChild(tSpan);
                 }
             } else {
-                tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : _ct('text');
+                tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
             }
         }
         //tSpan.setAttribute('visibility', 'hidden');
-        if(this._x._cr.chars){
-            var charData = this._x._cr.getCharData(documentData.t.charAt(i), fontData.fStyle, this._x._cr.getFontByName(documentData.f).fFamily);
+        if(this.globalData.fontManager.chars){
+            var charData = this.globalData.fontManager.getCharData(documentData.finalText.charAt(i), fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
             var shapeData;
             if(charData){
                 shapeData = charData.data;
@@ -10874,14 +10758,16 @@
             matrixHelper.reset();
             if(shapeData && shapeData.shapes){
                 shapes = shapeData.shapes[0].it;
-                matrixHelper.scale(documentData.s/100,documentData.s/100);
+                matrixHelper.scale(documentData.finalSize/100,documentData.finalSize/100);
                 shapeStr = this.createPathShape(matrixHelper,shapes);
                 tSpan.setAttribute('d',shapeStr);
             }
             if(!this.isMasked){
-                this._cc.appendChild(tParent);
+                this.innerElem.appendChild(tParent);
                 if(shapeData && shapeData.shapes){
 
+                    //document.body.appendChild is needed to get exact measure of shape
+                    document.body.appendChild(tCont);
                     var boundingBox = tCont.getBBox();
                     tCont.setAttribute('width',boundingBox.width + 2);
                     tCont.setAttribute('height',boundingBox.height + 2);
@@ -10896,17 +10782,17 @@
                     tCont.setAttribute('height',1);
                 }
             }else{
-                this._cc.appendChild(tSpan);
+                this.innerElem.appendChild(tSpan);
             }
         }else{
             tSpan.textContent = letters[i].val;
             tSpan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space","preserve");
             if(!this.isMasked){
-                this._cc.appendChild(tParent);
+                this.innerElem.appendChild(tParent);
                 //
-                tSpan.style.transform = tSpan.style.webkitTransform = 'translate3d(0,'+ -documentData.s/1.2+'px,0)';
+                tSpan.style.transform = tSpan.style.webkitTransform = 'translate3d(0,'+ -documentData.finalSize/1.2+'px,0)';
             } else {
-                this._cc.appendChild(tSpan);
+                this.innerElem.appendChild(tSpan);
             }
         }
         //
@@ -10923,18 +10809,18 @@
         this.textSpans[cnt].style.display = 'none';
         cnt += 1;
     }
-}
+};
 
-_ab.prototype.renderInnerContent = function() {
+HTextElement.prototype.renderInnerContent = function() {
 
     if(this.data.singleShape){
-        if(!this._ch && !this.lettersChangedFlag){
+        if(!this._isFirstFrame && !this.lettersChangedFlag){
             return;
         } else {
             // Todo Benchmark if using this is better than getBBox
-             if(this.isMasked && this.finalTransform.matMdf){
-                 this._cf.setAttribute('viewBox',-this.finalTransform.mProp.p.v[0]+' '+ -this.finalTransform.mProp.p.v[1]+' '+this.compW+' '+this.compH);
-                this._cf.style.transform = this._cf.style.webkitTransform = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
+             if(this.isMasked && this.finalTransform._matMdf){
+                 this.svgElement.setAttribute('viewBox',-this.finalTransform.mProp.p.v[0]+' '+ -this.finalTransform.mProp.p.v[1]+' '+this.compW+' '+this.compH);
+                this.svgElement.style.transform = this.svgElement.style.webkitTransform = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
              }
         }
     }
@@ -10944,12 +10830,12 @@
         return;
     }
     var  i,len, count = 0;
-    var _bt = this.textAnimator._bt;
+    var renderedLetters = this.textAnimator.renderedLetters;
 
     var letters = this.textProperty.currentData.l;
 
     len = letters.length;
-    var _bu, textSpan, textPath;
+    var renderedLetter, textSpan, textPath;
     for(i=0;i<len;i+=1){
         if(letters[i].n){
             count += 1;
@@ -10957,97 +10843,93 @@
         }
         textSpan = this.textSpans[i];
         textPath = this.textPaths[i];
-        _bu = _bt[count];
+        renderedLetter = renderedLetters[count];
         count += 1;
         if(!this.isMasked){
-            textSpan.style.transform = textSpan.style.webkitTransform = _bu.m;
+            textSpan.style.transform = textSpan.style.webkitTransform = renderedLetter.m;
         }else{
-            textSpan.setAttribute('transform',_bu.m);
+            textSpan.setAttribute('transform',renderedLetter.m);
         }
-        ////textSpan.setAttribute('opacity',_bu.o);
-        textSpan.style.opacity = _bu.o;
-        if(_bu.sw){
-            textPath.setAttribute('stroke-width',_bu.sw);
+        ////textSpan.setAttribute('opacity',renderedLetter.o);
+        textSpan.style.opacity = renderedLetter.o;
+        if(renderedLetter.sw){
+            textPath.setAttribute('stroke-width',renderedLetter.sw);
         }
-        if(_bu.sc){
-            textPath.setAttribute('stroke',_bu.sc);
+        if(renderedLetter.sc){
+            textPath.setAttribute('stroke',renderedLetter.sc);
         }
-        if(_bu.fc){
-            textPath.setAttribute('fill',_bu.fc);
-            textPath.style.color = _bu.fc;
+        if(renderedLetter.fc){
+            textPath.setAttribute('fill',renderedLetter.fc);
+            textPath.style.color = renderedLetter.fc;
         }
     }
 
-    //TODO: this also needs to be recalculated every time a property changes. Check how canvas renderer uses _x.mdf. Also would be great to calculate size from shapes and not from DOM.
-    if(this.isVisible && (this._ch)){
-        if(this._cc.getBBox){
-            var boundingBox = this._cc.getBBox();
+    if(this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)){
+        var boundingBox = this.innerElem.getBBox();
 
-            if(this._cg.w !== boundingBox.width){
-                this._cg.w = boundingBox.width;
-                this._cf.setAttribute('width',boundingBox.width);
-            }
-            if(this._cg.h !== boundingBox.height){
-                this._cg.h = boundingBox.height;
-                this._cf.setAttribute('height',boundingBox.height);
-            }
+        if(this.currentBBox.w !== boundingBox.width){
+            this.currentBBox.w = boundingBox.width;
+            this.svgElement.setAttribute('width',boundingBox.width);
+        }
+        if(this.currentBBox.h !== boundingBox.height){
+            this.currentBBox.h = boundingBox.height;
+            this.svgElement.setAttribute('height',boundingBox.height);
+        }
 
-            var margin = 1;
-            if(this._cg.w !== (boundingBox.width + margin*2) || this._cg.h !== (boundingBox.height + margin*2)  || this._cg.x !== (boundingBox.x - margin)  || this._cg.y !== (boundingBox.y - margin)){
-                this._cg.w = boundingBox.width + margin*2;
-                this._cg.h = boundingBox.height + margin*2;
-                this._cg.x = boundingBox.x - margin;
-                this._cg.y = boundingBox.y - margin;
+        var margin = 1;
+        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)){
+            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;
 
-                this._cf.setAttribute('viewBox',this._cg.x+' '+this._cg.y+' '+this._cg.w+' '+this._cg.h);
-                this._cf.style.transform = this._cf.style.webkitTransform = 'translate(' + this._cg.x + 'px,' + this._cg.y + 'px)';
-            }
+            this.svgElement.setAttribute('viewBox',this.currentBBox.x+' '+this.currentBBox.y+' '+this.currentBBox.w+' '+this.currentBBox.h);
+            this.svgElement.style.transform = this.svgElement.style.webkitTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
         }
     }
-}
-function _y(data,_x,comp){
-    this.assetData = _x.getAssetData(data.refId);
-    this._cz(data,_x,comp);
+};
+function HImageElement(data,globalData,comp){
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data,globalData,comp);
 }
 
-extendPrototype([_e,_af,_b,_aa,_ad,_ac,_ae], _y);
+extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement], HImageElement);
 
 
-_y.prototype.createContent = function(){
-    var assetPath = this._x.getAssetsPath(this.assetData);
+HImageElement.prototype.createContent = function(){
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
     var img = new Image();
 
     if(this.data.hasMask){
-        this.imageElem = _ct('image');
+        this.imageElem = createNS('image');
         this.imageElem.setAttribute('width',this.assetData.w+"px");
         this.imageElem.setAttribute('height',this.assetData.h+"px");
         this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
-        this._bx.appendChild(this.imageElem);
-        this._by.setAttribute('width',this.assetData.w);
-        this._by.setAttribute('height',this.assetData.h);
+        this.layerElement.appendChild(this.imageElem);
+        this.baseElement.setAttribute('width',this.assetData.w);
+        this.baseElement.setAttribute('height',this.assetData.h);
     } else {
-        this._bx.appendChild(img);
+        this.layerElement.appendChild(img);
     }
     img.src = assetPath;
     if(this.data.ln){
-        this._cc.setAttribute('id',this.data.ln);
+        this.innerElem.setAttribute('id',this.data.ln);
     }
-    this.checkParenting();
 };
-function _v(data,_x,comp){
+function HCameraElement(data,globalData,comp){
     this.initFrame();
-    this.initBaseData(data,_x,comp);
-    var _bo = _ai._bo;
-    this.pe = _bo(this,data.pe,0,0,this._co);
+    this.initBaseData(data,globalData,comp);
+    var getProp = PropertyFactory.getProp;
+    this.pe = getProp(this,data.pe,0,0,this.dynamicProperties);
     if(data.ks.p.s){
-        this.px = _bo(this,data.ks.p.x,1,0,this._co);
-        this.py = _bo(this,data.ks.p.y,1,0,this._co);
-        this.pz = _bo(this,data.ks.p.z,1,0,this._co);
+        this.px = getProp(this,data.ks.p.x,1,0,this.dynamicProperties);
+        this.py = getProp(this,data.ks.p.y,1,0,this.dynamicProperties);
+        this.pz = getProp(this,data.ks.p.z,1,0,this.dynamicProperties);
     }else{
-        this.p = _bo(this,data.ks.p,1,0,this._co);
+        this.p = getProp(this,data.ks.p,1,0,this.dynamicProperties);
     }
     if(data.ks.a){
-        this.a = _bo(this,data.ks.a,1,0,this._co);
+        this.a = getProp(this,data.ks.a,1,0,this.dynamicProperties);
     }
     if(data.ks.or.k.length && data.ks.or.k[0].to){
         var i,len = data.ks.or.k.length;
@@ -11056,18 +10938,18 @@
             data.ks.or.k[i].ti = null;
         }
     }
-    this.or = _bo(this,data.ks.or,1,degToRads,this._co);
+    this.or = getProp(this,data.ks.or,1,degToRads,this.dynamicProperties);
     this.or.sh = true;
-    this.rx = _bo(this,data.ks.rx,0,degToRads,this._co);
-    this.ry = _bo(this,data.ks.ry,0,degToRads,this._co);
-    this.rz = _bo(this,data.ks.rz,0,degToRads,this._co);
+    this.rx = getProp(this,data.ks.rx,0,degToRads,this.dynamicProperties);
+    this.ry = getProp(this,data.ks.ry,0,degToRads,this.dynamicProperties);
+    this.rz = getProp(this,data.ks.rz,0,degToRads,this.dynamicProperties);
     this.mat = new Matrix();
     this._prevMat = new Matrix();
-    this._ch = true;
+    this._isFirstFrame = true;
 }
-extendPrototype([_e, _ac], _v);
+extendPrototype([BaseElement, FrameElement], HCameraElement);
 
-_v.prototype.setup = function() {
+HCameraElement.prototype.setup = function() {
     var i, len = this.comp.threeDElements.length, comp;
     for(i=0;i<len;i+=1){
         //[perspectiveElem,container]
@@ -11078,22 +10960,22 @@
     }
 };
 
-_v.prototype.createElements = function(){
+HCameraElement.prototype.createElements = function(){
 };
 
-_v.prototype.hide = function(){
+HCameraElement.prototype.hide = function(){
 };
 
-_v.prototype._ba = function(){
-    var mdf = this._ch;
+HCameraElement.prototype.renderFrame = function(){
+    var _mdf = this._isFirstFrame;
     var i, len;
-    if(this._dd){
-        len = this._dd.length;
+    if(this.hierarchy){
+        len = this.hierarchy.length;
         for(i=0;i<len;i+=1){
-            mdf = this._dd[i].finalTransform.mProp.mdf ? true : mdf;
+            _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
         }
     }
-    if(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)) {
+    if(_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)) {
         this.mat.reset();
 
         if(this.p){
@@ -11114,13 +10996,13 @@
         }
         this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
         this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
-        this.mat.translate(this._x._de.w/2,this._x._de.h/2,0);
+        this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0);
         this.mat.translate(0,0,this.pe.v);
-        if(this._dd){
+        if(this.hierarchy){
             var mat;
-            len = this._dd.length;
+            len = this.hierarchy.length;
             for(i=0;i<len;i+=1){
-                mat = this._dd[i].finalTransform.mProp.iv.props;
+                mat = this.hierarchy[i].finalTransform.mProp.iv.props;
                 this.mat.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]);
             }
         }
@@ -11133,24 +11015,21 @@
             }
             this.mat.clone(this._prevMat);
         }
-    } else {
-
-        //console.log('NO ENTRO')
     }
-    this._ch = false;
+    this._isFirstFrame = false;
 };
 
-_v.prototype._az = function(num) {
+HCameraElement.prototype.prepareFrame = function(num) {
     this.prepareProperties(num, true);
 };
 
-_v.prototype.destroy = function(){
+HCameraElement.prototype.destroy = function(){
 };
-_v.prototype.initExpressions = function(){};
-_v.prototype.get_e = function(){return null};
-function _bv() {
+HCameraElement.prototype.initExpressions = function(){};
+HCameraElement.prototype.getBaseElement = function(){return null;};
+function HEffects() {
 }
-_bv.prototype._ba = function(){}
+HEffects.prototype.renderFrame = function(){};
 var Expressions = (function(){
     var ob = {};
     ob.initExpressions = initExpressions;
@@ -11158,7 +11037,7 @@
 
     function initExpressions(animation){
         animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
-        animation.renderer._x.projectInterface.registerComposition(animation.renderer);
+        animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
     }
    return ob;
 }());
@@ -11166,7 +11045,7 @@
 expressionsPlugin = Expressions;
 
 var ExpressionManager = (function(){
-    "use strict";
+    'use strict';
     var ob = {};
     var Math = BMMath;
     var window = null;
@@ -11180,7 +11059,7 @@
         } else if(value.i) {
             return shape_pool.clone(value);
         } else {
-            var arr = _cs('float32', value.length);
+            var arr = createTypedArray('float32', value.length);
             var i, len = value.length;
             for (i = 0; i < len; i += 1) {
                 arr[i] = value[i] * mult;
@@ -11199,9 +11078,7 @@
         }
         var i, len = shape1._length;
         for(i = 0; i < len; i += 1) {
-            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]){
+            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]){
                 return false;
             }
         }
@@ -11248,7 +11125,7 @@
                 if((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)){
                     retArr[i] = a[i] + b[i];
                 }else{
-                    retArr[i] = b[i] == undefined ? a[i] : a[i] || b[i];
+                    retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
                 }
                 i += 1;
             }
@@ -11285,7 +11162,7 @@
                 if((typeof a[i] === 'number' || a[i] instanceof Number) && typeof (typeof b[i] === 'number' || b[i] instanceof Number)){
                     retArr[i] = a[i] - b[i];
                 }else{
-                    retArr[i] = b[i] == undefined ? a[i] : a[i] || b[i];
+                    retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
                 }
                 i += 1;
             }
@@ -11305,7 +11182,7 @@
         var i, len;
         if(isTypeOfArray(a) && (tOfB === 'number' || tOfB === 'boolean' || tOfB === 'string' || b instanceof Number )){
             len = a.length;
-            arr = _cs('float32', len);
+            arr = createTypedArray('float32', len);
             for(i=0;i<len;i+=1){
                 arr[i] = a[i] * b;
             }
@@ -11313,7 +11190,7 @@
         }
         if((tOfA === 'number' || tOfA === 'boolean' || tOfA === 'string' || a instanceof Number ) && isTypeOfArray(b)){
             len = b.length;
-            arr = _cs('float32', len);
+            arr = createTypedArray('float32', len);
             for(i=0;i<len;i+=1){
                 arr[i] = a * b[i];
             }
@@ -11332,7 +11209,7 @@
         var i, len;
         if(isTypeOfArray(a) && (tOfB === 'number' || tOfB === 'boolean' || tOfB === 'string' || b instanceof Number  )){
             len = a.length;
-            arr = _cs('float32', len);
+            arr = createTypedArray('float32', len);
             for(i=0;i<len;i+=1){
                 arr[i] = a[i] / b;
             }
@@ -11340,7 +11217,7 @@
         }
         if((tOfA === 'number' || tOfA === 'boolean' || tOfA === 'string' || a instanceof Number ) && isTypeOfArray(b)){
             len = b.length;
-            arr = _cs('float32', len);
+            arr = createTypedArray('float32', len);
             for(i=0;i<len;i+=1){
                 arr[i] = a / b[i];
             }
@@ -11419,6 +11296,16 @@
 
         return [h, s, l,val[3]];
     }
+
+    function hue2rgb(p, q, t){
+        if(t < 0) t += 1;
+        if(t > 1) t -= 1;
+        if(t < 1/6) return p + (q - p) * 6 * t;
+        if(t < 1/2) return q;
+        if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
+        return p;
+    }
+
     function hslToRgb(val){
         var h = val[0];
         var s = val[1];
@@ -11426,17 +11313,9 @@
 
         var r, g, b;
 
-        if(s == 0){
+        if(s === 0){
             r = g = b = l; // achromatic
         }else{
-            function hue2rgb(p, q, t){
-                if(t < 0) t += 1;
-                if(t > 1) t -= 1;
-                if(t < 1/6) return p + (q - p) * 6 * t;
-                if(t < 1/2) return q;
-                if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
-                return p;
-            }
 
             var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
             var p = 2 * l - q;
@@ -11462,7 +11341,7 @@
             return value1 + (value2-value1)*perc;
         }
         var i, len = value1.length;
-        var arr = _cs('float32', len);
+        var arr = createTypedArray('float32', len);
         for(i=0;i<len;i+=1){
             arr[i] = value1[i] + (value2[i]-value1[i])*perc;
         }
@@ -11481,12 +11360,12 @@
         if(max.length){
             var i, len = max.length;
             if(!min){
-                min = _cs('float32', len);
+                min = createTypedArray('float32', len);
             }
-            var arr = _cs('float32', len);
+            var arr = createTypedArray('float32', len);
             var rnd = BMMath.random();
             for(i=0;i<len;i+=1){
-                arr[i] = min[i] + rnd*(max[i]-min[i])
+                arr[i] = min[i] + rnd*(max[i]-min[i]);
             }
             return arr;
         }
@@ -11501,12 +11380,12 @@
         inTangents = inTangents && inTangents.length ? inTangents : points;
         outTangents = outTangents && outTangents.length ? outTangents : points;
         var path = shape_pool.newElement();
-        var len = points.length;
+        var i, len = points.length;
         path.setPathData(closed, len);
         for(i = 0; i < len; i += 1) {
-            path._aw(points[i][0],points[i][1],outTangents[i][0] + points[i][0],outTangents[i][1] + points[i][1],inTangents[i][0] + points[i][0],inTangents[i][1] + points[i][1],i,true)
+            path.setTripleAt(points[i][0],points[i][1],outTangents[i][0] + points[i][0],outTangents[i][1] + points[i][1],inTangents[i][0] + points[i][0],inTangents[i][1] + points[i][1],i,true);
         }
-        return path
+        return path;
     }
 
     function initiateExpression(elem,data,property){
@@ -11515,11 +11394,10 @@
         var _needsRandom = val.indexOf('random') !== -1;
         var elemType = elem.data.ty;
         var transform,content,effect;
-        var thisComp = elem.comp;
         var thisProperty = property;
-        elem.comp.frameDuration = 1/elem.comp._x.frameRate;
-        var inPoint = elem.data.ip/elem.comp._x.frameRate;
-        var outPoint = elem.data.op/elem.comp._x.frameRate;
+        elem.comp.frameDuration = 1/elem.comp.globalData.frameRate;
+        var inPoint = elem.data.ip/elem.comp.globalData.frameRate;
+        var outPoint = elem.data.op/elem.comp.globalData.frameRate;
         var width = elem.data.sw ? elem.data.sw : 0;
         var height = elem.data.sh ? elem.data.sh : 0;
         var loopIn, loop_in, loopOut, loop_out;
@@ -11531,7 +11409,7 @@
 
         var wiggle = function wiggle(freq,amp){
             var i,j, len = this.pv.length ? this.pv.length : 1;
-            var addedAmps = _cs('float32', len);
+            var addedAmps = createTypedArray('float32', len);
             freq = 5;
             var iterations = Math.floor(time*freq);
             i = 0;
@@ -11547,7 +11425,7 @@
             //var rnd2 = BMMath.random();
             var periods = time*freq;
             var perc = periods - Math.floor(periods);
-            var arr = _cs('float32', len);
+            var arr = createTypedArray('float32', len);
             if(len>1){
                 for(j=0;j<len;j+=1){
                     arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*BMMath.random())*perc;
@@ -11570,30 +11448,30 @@
             loop_out = loopOut;
         }
 
-        var loopInDuration = function loopInDuration(type,duration){
+        function loopInDuration(type,duration){
             return loopIn(type,duration,true);
-        }.bind(this);
+        }
 
-        var loopOutDuration = function loopOutDuration(type,duration){
+        function loopOutDuration(type,duration){
             return loopOut(type,duration,true);
-        }.bind(this);
+        }
 
-        if(this._dg) {
-            valueAtTime = this._dg.bind(this);
+        if(this.getValueAtTime) {
+            valueAtTime = this.getValueAtTime.bind(this);
         }
 
         if(this.getVelocityAtTime) {
             velocityAtTime = this.getVelocityAtTime.bind(this);
         }
 
-        var comp = elem.comp._x.projectInterface.bind(elem.comp._x.projectInterface);
+        var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
 
         function lookAt(elem1,elem2){
             var fVec = [elem2[0]-elem1[0],elem2[1]-elem1[1],elem2[2]-elem1[2]];
             var pitch = Math.atan2(fVec[0],Math.sqrt(fVec[1]*fVec[1]+fVec[2]*fVec[2]))/degToRads;
             var yaw = -Math.atan2(fVec[1],fVec[2])/degToRads;
             return [yaw,pitch,0];
-        };
+        }
 
         function easeOut(t, tMin, tMax, val1, val2){
             if(val1 === undefined){
@@ -11603,7 +11481,7 @@
                 t = (t - tMin) / (tMax - tMin);
             }
             return -(val2-val1) * t*(t-2) + val1;
-        };
+        }
 
         function easeIn(t, tMin, tMax, val1, val2){
             if(val1 === undefined){
@@ -11613,7 +11491,7 @@
                 t = (t - tMin) / (tMax - tMin);
             }
             return (val2-val1)*t*t + val1;
-        };
+        }
 
         function nearestKey(time){
             var i, len = data.k.length,index,keyTime;
@@ -11622,7 +11500,7 @@
                 keyTime = 0;
             } else {
                 index = -1;
-                time *= elem.comp._x.frameRate;
+                time *= elem.comp.globalData.frameRate;
                 if (time < data.k[0].t) {
                     index = 1;
                     keyTime = data.k[0].t;
@@ -11652,9 +11530,9 @@
             }
             var ob = {};
             ob.index = index;
-            ob.time = keyTime/elem.comp._x.frameRate;
+            ob.time = keyTime/elem.comp.globalData.frameRate;
             return ob;
-        };
+        }
 
         function key(ind){
             var ob, i, len;
@@ -11663,7 +11541,7 @@
             }
             ind -= 1;
             ob = {
-                time: data.k[ind].t/elem.comp._x.frameRate
+                time: data.k[ind].t/elem.comp.globalData.frameRate
             };
             var arr;
             if(ind === data.k.length - 1 && !data.k[ind].h){
@@ -11676,28 +11554,28 @@
                 ob[i] = arr[i];
             }
             return ob;
-        };
+        }
 
         function framesToTime(frames, fps) { 
             if (!fps) {
-                fps = elem.comp._x.frameRate;
+                fps = elem.comp.globalData.frameRate;
             }
             return frames / fps;
-        };
+        }
 
         function timeToFrames(t, fps) {
             if (!t && t !== 0) {
                 t = time;
             }
             if (!fps) {
-                fps = elem.comp._x.frameRate;
+                fps = elem.comp.globalData.frameRate;
             }
             return t * fps;
-        };
+        }
 
         function seedRandom(seed){
             BMMath.seedrandom(randSeed + seed);
-        };
+        }
 
         function sourceRectAtTime() {
             return elem.sourceRectAtTime();
@@ -11705,14 +11583,14 @@
 
         var time, velocity, value, textIndex, textTotal, selectorValue;
         var index = elem.data.ind;
-        var hasParent = !!(elem._dd && elem._dd.length);
+        var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
         var parent;
         var randSeed = Math.floor(Math.random()*1000000);
         function executeExpression() {
             if (_needsRandom) {
                 seedRandom(randSeed);
             }
-            if (this.frameExpressionId === elem._x.frameId && this.propType !== 'textSelector') {
+            if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
                 return;
             }
             if(this.lock){
@@ -11744,16 +11622,16 @@
             if (!effect) {
                 effect = thisLayer(4);
             }
-            hasParent = !!(elem._dd && elem._dd.length);
+            hasParent = !!(elem.hierarchy && elem.hierarchy.length);
             if (hasParent && !parent) {
-                parent = elem._dd[0].layerInterface;
+                parent = elem.hierarchy[0].layerInterface;
             }
             this.lock = true;
             if (this.getPreValue) {
                 this.getPreValue();
             }
             value = this.pv;
-            time = this.comp.renderedFrame/this.comp._x.frameRate;
+            time = this.comp.renderedFrame/this.comp.globalData.frameRate;
             if (needsVelocity) {
                 velocity = velocityAtTime(time);
             }
@@ -11764,7 +11642,7 @@
                 this.v = scoped_bm_rt;
             }
 
-            this.frameExpressionId = elem._x.frameId;
+            this.frameExpressionId = elem.globalData.frameId;
             var i,len;
             if(this.mult){
                 if(this.propType === 'unidimensional'){
@@ -11787,27 +11665,27 @@
             if (this.propType === 'unidimensional') {
                 if(this.lastValue !== this.v){
                     this.lastValue = this.v;
-                    this.mdf = true;
+                    this._mdf = true;
                 }
             } else if (this.propType === 'shape') {
-                if (!shapesEqual(this.v, this._ak.shapes[0])) {
-                    this.mdf = true;
-                    this._ak.releaseShapes();
-                    this._ak.addShape(shape_pool.clone(this.v));
+                if (!shapesEqual(this.v, this.localShapeCollection.shapes[0])) {
+                    this._mdf = true;
+                    this.localShapeCollection.releaseShapes();
+                    this.localShapeCollection.addShape(shape_pool.clone(this.v));
                 }
             } else {
                 len = this.v.length;
                 for (i = 0; i < len; i += 1) {
                     if (this.v[i] !== this.lastValue[i]) {
                         this.lastValue[i] = this.v[i];
-                        this.mdf = true;
+                        this._mdf = true;
                     }
                 }
             }
             this.lock = false;
         }
         return executeExpression;
-    };
+    }
 
     ob.initiateExpression = initiateExpression;
     return ob;
@@ -11819,28 +11697,28 @@
     }
 
     function loopOut(type,duration,durationFlag){
-        if(!this.k || !this._df){
+        if(!this.k || !this.keyframes){
             return this.pv;
         }
         type = type ? type.toLowerCase() : '';
         var currentFrame = this.comp.renderedFrame;
-        var _df = this._df;
-        var lastKeyFrame = _df[_df.length - 1].t;
+        var keyframes = this.keyframes;
+        var lastKeyFrame = keyframes[keyframes.length - 1].t;
         if(currentFrame<=lastKeyFrame){
             return this.pv;
         }else{
             var cycleDuration, firstKeyFrame;
             if(!durationFlag){
-                if(!duration || duration > _df.length - 1){
-                    duration = _df.length - 1;
+                if(!duration || duration > keyframes.length - 1){
+                    duration = keyframes.length - 1;
                 }
-                firstKeyFrame = _df[_df.length - 1 - duration].t;
+                firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
                 cycleDuration = lastKeyFrame - firstKeyFrame;
             } else {
                 if(!duration){
                     cycleDuration = Math.max(0,lastKeyFrame - this.elem.data.ip);
                 } else {
-                    cycleDuration = Math.abs(lastKeyFrame - elem.comp._x.frameRate*duration);
+                    cycleDuration = Math.abs(lastKeyFrame - elem.comp.globalData.frameRate*duration);
                 }
                 firstKeyFrame = lastKeyFrame - cycleDuration;
             }
@@ -11848,12 +11726,12 @@
             if(type === 'pingpong') {
                 var iterations = Math.floor((currentFrame - firstKeyFrame)/cycleDuration);
                 if(iterations % 2 !== 0){
-                    return this._dg(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame)) / this.comp._x.frameRate, 0);
+                    return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
                 }
             } else if(type === 'offset'){
-                var initV = this._dg(firstKeyFrame / this.comp._x.frameRate, 0);
-                var endV = this._dg(lastKeyFrame / this.comp._x.frameRate, 0);
-                var current = this._dg(((currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame) / this.comp._x.frameRate, 0);
+                var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+                var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+                var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame) / this.comp.globalData.frameRate, 0);
                 var repeats = Math.floor((currentFrame - firstKeyFrame)/cycleDuration);
                 if(this.pv.length){
                     ret = new Array(initV.length);
@@ -11865,19 +11743,19 @@
                 }
                 return (endV-initV)*repeats + current;
             } else if(type === 'continue'){
-                var lastValue = this._dg(lastKeyFrame / this.comp._x.frameRate, 0);
-                var nextLastValue = this._dg((lastKeyFrame - 0.001) / this.comp._x.frameRate, 0);
+                var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+                var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
                 if(this.pv.length){
                     ret = new Array(lastValue.length);
                     len = ret.length;
                     for(i=0;i<len;i+=1){
-                        ret[i] = lastValue[i] + (lastValue[i]-nextLastValue[i])*((currentFrame - lastKeyFrame)/ this.comp._x.frameRate)/0.0005;
+                        ret[i] = lastValue[i] + (lastValue[i]-nextLastValue[i])*((currentFrame - lastKeyFrame)/ this.comp.globalData.frameRate)/0.0005;
                     }
                     return ret;
                 }
                 return lastValue + (lastValue-nextLastValue)*(((currentFrame - lastKeyFrame))/0.001);
             }
-            return this._dg((((currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame)) / this.comp._x.frameRate, 0);
+            return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
         }
     }
 
@@ -11887,23 +11765,23 @@
         }
         type = type ? type.toLowerCase() : '';
         var currentFrame = this.comp.renderedFrame;
-        var _df = this._df;
-        var firstKeyFrame = _df[0].t;
+        var keyframes = this.keyframes;
+        var firstKeyFrame = keyframes[0].t;
         if(currentFrame>=firstKeyFrame){
             return this.pv;
         }else{
             var cycleDuration, lastKeyFrame;
             if(!durationFlag){
-                if(!duration || duration > _df.length - 1){
-                    duration = _df.length - 1;
+                if(!duration || duration > keyframes.length - 1){
+                    duration = keyframes.length - 1;
                 }
-                lastKeyFrame = _df[duration].t;
+                lastKeyFrame = keyframes[duration].t;
                 cycleDuration = lastKeyFrame - firstKeyFrame;
             } else {
                 if(!duration){
                     cycleDuration = Math.max(0,this.elem.data.op - firstKeyFrame);
                 } else {
-                    cycleDuration = Math.abs(elem.comp._x.frameRate*duration);
+                    cycleDuration = Math.abs(elem.comp.globalData.frameRate*duration);
                 }
                 lastKeyFrame = firstKeyFrame + cycleDuration;
             }
@@ -11911,12 +11789,12 @@
             if(type === 'pingpong') {
                 var iterations = Math.floor((firstKeyFrame - currentFrame)/cycleDuration);
                 if(iterations % 2 === 0){
-                    return this._dg((((firstKeyFrame - currentFrame)%cycleDuration +  firstKeyFrame)) / this.comp._x.frameRate, 0);
+                    return this.getValueAtTime((((firstKeyFrame - currentFrame)%cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
                 }
             } else if(type === 'offset'){
-                var initV = this._dg(firstKeyFrame / this.comp._x.frameRate, 0);
-                var endV = this._dg(lastKeyFrame / this.comp._x.frameRate, 0);
-                var current = this._dg((cycleDuration - (firstKeyFrame - currentFrame)%cycleDuration +  firstKeyFrame) / this.comp._x.frameRate, 0);
+                var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+                var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
+                var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame)%cycleDuration +  firstKeyFrame) / this.comp.globalData.frameRate, 0);
                 var repeats = Math.floor((firstKeyFrame - currentFrame)/cycleDuration)+1;
                 if(this.pv.length){
                     ret = new Array(initV.length);
@@ -11928,8 +11806,8 @@
                 }
                 return current-(endV-initV)*repeats;
             } else if(type === 'continue'){
-                var firstValue = this._dg(firstKeyFrame / this.comp._x.frameRate, 0);
-                var nextFirstValue = this._dg((firstKeyFrame + 0.001) / this.comp._x.frameRate, 0);
+                var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
+                var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
                 if(this.pv.length){
                     ret = new Array(firstValue.length);
                     len = ret.length;
@@ -11940,17 +11818,13 @@
                 }
                 return firstValue + (firstValue-nextFirstValue)*(firstKeyFrame - currentFrame)/0.001;
             }
-            return this._dg(((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration +  firstKeyFrame)) / this.comp._x.frameRate, 0);
+            return this.getValueAtTime(((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
         }
     }
 
-    function _dg(frameNum) {
-        //TODO this shouldn't be necessary anymore
-        if(!this._cachingAtTime) {
-            this._cachingAtTime = {lastValue:initialDefaultFrame,lastIndex:0};
-        }
+    function getValueAtTime(frameNum) {
         if(frameNum !== this._cachingAtTime.lastFrame) {
-            frameNum *= this.elem._x.frameRate;
+            frameNum *= this.elem.globalData.frameRate;
             frameNum -= this.offsetTime;
             this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
             this._cachingAtTime.value = this.interpolateValue(frameNum, this.pv, this._cachingAtTime);
@@ -11966,25 +11840,25 @@
         }
         var delta = -0.01;
         //frameNum += this.elem.data.st;
-        var v1 = this._dg(frameNum);
-        var v2 = this._dg(frameNum + delta);
+        var v1 = this.getValueAtTime(frameNum);
+        var v2 = this.getValueAtTime(frameNum + delta);
         var velocity;
         if(v1.length){
-            velocity = _cs('float32', v1.length);
+            velocity = createTypedArray('float32', v1.length);
             var i;
             for(i=0;i<v1.length;i+=1){
                 //removing frameRate
                 //if needed, don't add it here
-                //velocity[i] = this.elem._x.frameRate*((v2[i] - v1[i])/delta);
+                //velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
                 velocity[i] = (v2[i] - v1[i])/delta;
             }
         } else {
             velocity = (v2 - v1)/delta;
         }
         return velocity;
-    };
+    }
 
-    function _ce(propertyGroup){
+    function setGroupProperty(propertyGroup){
         this.propertyGroup = propertyGroup;
     }
 
@@ -12022,7 +11896,7 @@
             this.pv = 1;
             this.comp = elem.comp;
             this.elem = elem;
-            this.mult = .01;
+            this.mult = 0.01;
             this.propType = 'textSelector';
             this.textTotal = data.totalChars;
             this.selectorValue = 100;
@@ -12031,89 +11905,97 @@
             this.getMult = getValueProxy;
             this.getVelocityAtTime = getVelocityAtTime;
             if(this.kf){
-                this._dg = _dg.bind(this);
+                this.getValueAtTime = getValueAtTime.bind(this);
             } else {
-                this._dg = getStaticValueAtTime.bind(this);
+                this.getValueAtTime = getStaticValueAtTime.bind(this);
             }
-            this._ce = _ce;
-        }
+            this.setGroupProperty = setGroupProperty;
+        };
     }());
 
-    var _bj = _ag._bj;
-    _ag._bj = function(elem, data, arr) {
-        var prop = _bj(elem, data, arr);
-        if(prop._co.length) {
-            prop._dg = getTransformValueAtTime.bind(prop);
+    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
+    TransformPropertyFactory.getTransformProperty = function(elem, data, arr) {
+        var prop = getTransformProperty(elem, data, arr);
+        if(prop.dynamicProperties.length) {
+            prop.getValueAtTime = getTransformValueAtTime.bind(prop);
         } else {
-            prop._dg = getTransformStaticValueAtTime.bind(prop);
+            prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
         }
-        prop._ce = _ce;
+        prop.setGroupProperty = setGroupProperty;
         return prop;
-    }
+    };
 
-    var propertyGetProp = _ai._bo;
-    _ai._bo = function(elem,data,type, mult, arr){
+    var propertyGetProp = PropertyFactory.getProp;
+    PropertyFactory.getProp = function(elem,data,type, mult, arr){
         var prop = propertyGetProp(elem,data,type, mult, arr);
         //prop.getVelocityAtTime = getVelocityAtTime;
         //prop.loopOut = loopOut;
         //prop.loopIn = loopIn;
         if(prop.kf){
-            prop._dg = _dg.bind(prop);
+            prop.getValueAtTime = getValueAtTime.bind(prop);
         } else {
-            prop._dg = getStaticValueAtTime.bind(prop);
+            prop.getValueAtTime = getStaticValueAtTime.bind(prop);
         }
-        prop._ce = _ce;
+        prop.setGroupProperty = setGroupProperty;
         prop.loopOut = loopOut;
         prop.loopIn = loopIn;
         prop.getVelocityAtTime = getVelocityAtTime;
         prop.numKeys = data.a === 1 ? data.k.length : 0;
         var isAdded = prop.k;
         prop.propertyIndex = data.ix;
-        prop._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:type === 0 ? 0 : _cs('float32', 3)}
+        var value = 0;
+        if(type !== 0) {
+            value = createTypedArray('float32', data.a === 1 ?  data.k[0].s.length : data.k.length);
+        }
+        prop._cachingAtTime = {
+            lastFrame: initialDefaultFrame,
+            lastIndex: 0,
+            value: value
+        };
         searchExpressions(elem,data,prop);
         if(!isAdded && prop.x){
             arr.push(prop);
         }
 
         return prop;
-    }
+    };
 
     function getShapeValueAtTime(frameNum) {
-        //TODO test this
+        //For now this caching object is created only when needed instead of creating it when the shape is initialized.
         if (!this._cachingAtTime) {
             this._cachingAtTime = {
                 shapeValue: shape_pool.clone(this.pv),
                 lastIndex: 0,
                 lastTime: initialDefaultFrame
-            }
+            };
         }
         if(frameNum !== this._cachingAtTime.lastTime) {
             this._cachingAtTime.lastTime = frameNum;
-            frameNum *= this.elem._x.frameRate;
+            frameNum *= this.elem.globalData.frameRate;
             this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, false, this._cachingAtTime);
         }
         return this._cachingAtTime.shapeValue;
     }
 
-    var ShapePropertyConstructorFunction = _ah.getConstructorFunction();
-    var KeyframedShapePropertyConstructorFunction = _ah.getKeyframedConstructorFunction();
+    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
+    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
 
     function ShapeExpressions(){}
     ShapeExpressions.prototype = {
         vertices: function(prop, time){
             var shapePath = this.v;
             if(time !== undefined) {
-                shapePath = this._dg(time, 0);
+                shapePath = this.getValueAtTime(time, 0);
             }
             var i, len = shapePath._length;
             var vertices = shapePath[prop];
             var points = shapePath.v;
-            var arr = _cv(len);
+            var arr = createSizedArray(len);
             for(i = 0; i < len; i += 1) {
                 if(prop === 'i' || prop === 'o') {
-                    arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]]
+                    arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
                 } else {
-                    arr[i] = [vertices[i][0], vertices[i][1]]
+                    arr[i] = [vertices[i][0], vertices[i][1]];
                 }
                 
             }
@@ -12134,7 +12016,7 @@
         pointOnPath: function(perc, time){
             var shapePath = this.v;
             if(time !== undefined) {
-                shapePath = this._dg(time, 0);
+                shapePath = this.getValueAtTime(time, 0);
             }
             if(!this._segmentsLength) {
                 this._segmentsLength = bez.getSegmentsLength(shapePath);
@@ -12145,13 +12027,13 @@
             var lengthPos = segmentsLength.totalLength * perc;
             var i = 0, len = lengths.length;
             var j = 0, jLen;
-            var accumulatedLength = 0;
+            var accumulatedLength = 0, pt;
             while(i < len) {
                 if(accumulatedLength + lengths[i].addedLength > lengthPos) {
                     var initIndex = i;
                     var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
                     var segmentPerc = (lengthPos - accumulatedLength)/lengths[i].addedLength;
-                    var pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i])
+                    pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
                     break;
                 } else {
                     accumulatedLength += lengths[i].addedLength;
@@ -12159,7 +12041,7 @@
                 i += 1;
             }
             if(!pt){
-                pt = shapePath.c ? [shapePath.v[0][0],shapePath.v[0][1]]:[shapePath.v[shapePath._length-1][0],shapePath.v[shapePath._length-1][1]]
+                pt = shapePath.c ? [shapePath.v[0][0],shapePath.v[0][1]]:[shapePath.v[shapePath._length-1][0],shapePath.v[shapePath._length-1][1]];
             }
             return pt;
         },
@@ -12180,16 +12062,16 @@
         normalOnPath: function(perc, time){
             return this.vectorOnPath(perc, time, 'normal');
         },
-        _ce: _ce,
-        _dg: getStaticValueAtTime
-    }
+        setGroupProperty: setGroupProperty,
+        getValueAtTime: getStaticValueAtTime
+    };
     extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
     extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
-    KeyframedShapePropertyConstructorFunction.prototype._dg = getShapeValueAtTime;
+    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
     KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
 
-    var propertyGetShapeProp = _ah._bp;
-    _ah._bp = function(elem,data,type, arr, trims){
+    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
+    ShapePropertyFactory.getShapeProp = function(elem,data,type, arr, trims){
         var prop = propertyGetShapeProp(elem,data,type, arr, trims);
         var isAdded = prop.k;
         prop.propertyIndex = data.ix;
@@ -12203,7 +12085,7 @@
             arr.push(prop);
         }
         return prop;
-    }
+    };
 
     var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
     TextSelectorProp.getTextSelectorProp = function(elem, data,arr){
@@ -12212,7 +12094,7 @@
         } else {
             return propertyGetTextProp(elem,data,arr);
         }
-    }
+    };
 }());
 (function addDecorator() {
 
@@ -12229,20 +12111,20 @@
         return false;
     }
 
-    _ar.prototype.searchProperty = function(){
+    TextProperty.prototype.searchProperty = function(){
         this.kf = this.searchExpressions() || this.data.d.k.length > 1;
         return this.kf;
-    }
+    };
 
-    _ar.prototype.getExpressionValue = function(num){
+    TextProperty.prototype.getExpressionValue = function(num){
         this.calculateExpression();
-        if(this.mdf) {
+        if(this._mdf) {
             this.currentData.t = this.v.toString();
             this.completeTextData(this.currentData);
         }
-    }
+    };
 
-    _ar.prototype.searchExpressions = searchExpressions;
+    TextProperty.prototype.searchExpressions = searchExpressions;
     
 }());
 var ShapeExpressionInterface = (function(){
@@ -12315,12 +12197,13 @@
                 case 'Contents':
                 case 2:
                     return interfaceFunction.content;
-                case 'ADBE Vector Transform Group':
-                case 3:
+                //Not necessary for now. Keeping them here in case a new case appears
+                //case 'ADBE Vector Transform Group':
+                //case 3:
                 default:
                     return interfaceFunction.transform;
             }
-        }
+        };
         interfaceFunction.propertyGroup = function(val){
             if(val === 1){
                 return interfaceFunction;
@@ -12366,10 +12249,10 @@
             },
             '_name': { value: shape.nm },
             'mn': { value: shape.mn }
-        })
+        });
 
-        view.c._ce(propertyGroup);
-        view.o._ce(propertyGroup);
+        view.c.setGroupProperty(propertyGroup);
+        view.o.setGroupProperty(propertyGroup);
         return interfaceFunction;
     }
 
@@ -12380,26 +12263,26 @@
             } else{
                 return propertyGroup(val-1);
             }
-        };
+        }
         function _dashPropertyGroup(val){
             if(val === 1){
                 return dashOb;
             } else{
                 return _propertyGroup(val-1);
             }
-        };
+        }
         function addPropertyToDashOb(i) {
             Object.defineProperty(dashOb, shape.d[i].nm, {
                 get: function(){
-                    return ExpressionValue(view.d.dataProps[i].p)
+                    return ExpressionValue(view.d.dataProps[i].p);
                 }
             });
         }
         var i, len = shape.d ? shape.d.length : 0;
-        var dashOb = {}
+        var dashOb = {};
         for (i = 0; i < len; i += 1) {
             addPropertyToDashOb(i);
-            view.d.dataProps[i].p._ce(_dashPropertyGroup);
+            view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
         }
 
         function interfaceFunction(val){
@@ -12436,9 +12319,9 @@
             'mn': { value: shape.mn }
         });
 
-        view.c._ce(_propertyGroup);
-        view.o._ce(_propertyGroup);
-        view.w._ce(_propertyGroup);
+        view.c.setGroupProperty(_propertyGroup);
+        view.o.setGroupProperty(_propertyGroup);
+        view.w.setGroupProperty(_propertyGroup);
         return interfaceFunction;
     }
 
@@ -12452,9 +12335,9 @@
         }
         interfaceFunction.propertyIndex = shape.ix;
 
-        view.s._ce(_propertyGroup);
-        view.e._ce(_propertyGroup);
-        view.o._ce(_propertyGroup);
+        view.s.setGroupProperty(_propertyGroup);
+        view.e.setGroupProperty(_propertyGroup);
+        view.o.setGroupProperty(_propertyGroup);
 
         function interfaceFunction(val){
             if(val === shape.e.ix || val === 'End' || val === 'end'){
@@ -12499,16 +12382,16 @@
                 return propertyGroup(--val);
             }
         }
-        view.transform.mProps.o._ce(_propertyGroup);
-        view.transform.mProps.p._ce(_propertyGroup);
-        view.transform.mProps.a._ce(_propertyGroup);
-        view.transform.mProps.s._ce(_propertyGroup);
-        view.transform.mProps.r._ce(_propertyGroup);
+        view.transform.mProps.o.setGroupProperty(_propertyGroup);
+        view.transform.mProps.p.setGroupProperty(_propertyGroup);
+        view.transform.mProps.a.setGroupProperty(_propertyGroup);
+        view.transform.mProps.s.setGroupProperty(_propertyGroup);
+        view.transform.mProps.r.setGroupProperty(_propertyGroup);
         if(view.transform.mProps.sk){
-            view.transform.mProps.sk._ce(_propertyGroup);
-            view.transform.mProps.sa._ce(_propertyGroup);
+            view.transform.mProps.sk.setGroupProperty(_propertyGroup);
+            view.transform.mProps.sa.setGroupProperty(_propertyGroup);
         }
-        view.transform.op._ce(_propertyGroup);
+        view.transform.op.setGroupProperty(_propertyGroup);
 
         function interfaceFunction(value){
             if(shape.a.ix === value || value === 'Anchor Point'){
@@ -12587,8 +12470,8 @@
         }
         interfaceFunction.propertyIndex = shape.ix;
         var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
-        prop.s._ce(_propertyGroup);
-        prop.p._ce(_propertyGroup);
+        prop.s.setGroupProperty(_propertyGroup);
+        prop.p.setGroupProperty(_propertyGroup);
         function interfaceFunction(value){
             if(shape.p.ix === value){
                 return interfaceFunction.position;
@@ -12624,14 +12507,14 @@
         }
         var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
         interfaceFunction.propertyIndex = shape.ix;
-        prop.or._ce(_propertyGroup);
-        prop.os._ce(_propertyGroup);
-        prop.pt._ce(_propertyGroup);
-        prop.p._ce(_propertyGroup);
-        prop.r._ce(_propertyGroup);
+        prop.or.setGroupProperty(_propertyGroup);
+        prop.os.setGroupProperty(_propertyGroup);
+        prop.pt.setGroupProperty(_propertyGroup);
+        prop.p.setGroupProperty(_propertyGroup);
+        prop.r.setGroupProperty(_propertyGroup);
         if(shape.ir){
-            prop.ir._ce(_propertyGroup);
-            prop.is._ce(_propertyGroup);
+            prop.ir.setGroupProperty(_propertyGroup);
+            prop.is.setGroupProperty(_propertyGroup);
         }
 
         function interfaceFunction(value){
@@ -12716,9 +12599,9 @@
         }
         var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
         interfaceFunction.propertyIndex = shape.ix;
-        prop.p._ce(_propertyGroup);
-        prop.s._ce(_propertyGroup);
-        prop.r._ce(_propertyGroup);
+        prop.p.setGroupProperty(_propertyGroup);
+        prop.s.setGroupProperty(_propertyGroup);
+        prop.r.setGroupProperty(_propertyGroup);
 
         function interfaceFunction(value){
             if(shape.p.ix === value){
@@ -12764,7 +12647,7 @@
         }
         var prop = view;
         interfaceFunction.propertyIndex = shape.ix;
-        prop.rd._ce(_propertyGroup);
+        prop.rd.setGroupProperty(_propertyGroup);
 
         function interfaceFunction(value){
             if(shape.r.ix === value || 'Round Corners 1' === value){
@@ -12794,8 +12677,8 @@
         }
         var prop = view;
         interfaceFunction.propertyIndex = shape.ix;
-        prop.c._ce(_propertyGroup);
-        prop.o._ce(_propertyGroup);
+        prop.c.setGroupProperty(_propertyGroup);
+        prop.o.setGroupProperty(_propertyGroup);
 
         function interfaceFunction(value){
             if(shape.c.ix === value || 'Copies' === value){
@@ -12831,7 +12714,7 @@
                 return propertyGroup(--val);
             }
         }
-        prop._ce(_propertyGroup);
+        prop.setGroupProperty(_propertyGroup);
 
         function interfaceFunction(val){
             if(val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2){
@@ -12880,15 +12763,15 @@
         _interfaceFunction.propertyGroup = propertyGroup;
         interfaces = iterateElements(shapes, view, _interfaceFunction);
         return _interfaceFunction;
-    }
-}())
+    };
+}());
 
 var TextExpressionInterface = (function(){
 	return function(elem){
         var _prevValue, _sourceText;
-        function _cd(){
+        function _thisLayerFunction(){
         }
-        Object.defineProperty(_cd, "sourceText", {
+        Object.defineProperty(_thisLayerFunction, "sourceText", {
             get: function(){
                 var stringValue = elem.textProperty.currentData.t;
                 if(elem.textProperty.currentData.t !== _prevValue) {
@@ -12900,9 +12783,9 @@
                 return _sourceText;
             }
         });
-        return _cd;
-    }
-}())
+        return _thisLayerFunction;
+    };
+}());
 var LayerExpressionInterface = (function (){
     function toWorld(arr, time){
         var toWorldMat = new Matrix();
@@ -12910,20 +12793,20 @@
         var transformMat;
         if(time) {
             //Todo implement value at time on transform properties
-            //transformMat = this._elem.finalTransform.mProp._dg(time);
+            //transformMat = this._elem.finalTransform.mProp.getValueAtTime(time);
             transformMat = this._elem.finalTransform.mProp;
         } else {
             transformMat = this._elem.finalTransform.mProp;
         }
         transformMat.applyToMatrix(toWorldMat);
-        if(this._elem._dd && this._elem._dd.length){
-            var i, len = this._elem._dd.length;
+        if(this._elem.hierarchy && this._elem.hierarchy.length){
+            var i, len = this._elem.hierarchy.length;
             for(i=0;i<len;i+=1){
-                this._elem._dd[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+                this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
             }
-            return toWorldMat._cn(arr[0],arr[1],arr[2]||0);
+            return toWorldMat.applyToPointArray(arr[0],arr[1],arr[2]||0);
         }
-        return toWorldMat._cn(arr[0],arr[1],arr[2]||0);
+        return toWorldMat.applyToPointArray(arr[0],arr[1],arr[2]||0);
     }
     function fromWorld(arr, time){
         var toWorldMat = new Matrix();
@@ -12931,16 +12814,16 @@
         var transformMat;
         if(time) {
             //Todo implement value at time on transform properties
-            //transformMat = this._elem.finalTransform.mProp._dg(time);
+            //transformMat = this._elem.finalTransform.mProp.getValueAtTime(time);
             transformMat = this._elem.finalTransform.mProp;
         } else {
             transformMat = this._elem.finalTransform.mProp;
         }
         transformMat.applyToMatrix(toWorldMat);
-        if(this._elem._dd && this._elem._dd.length){
-            var i, len = this._elem._dd.length;
+        if(this._elem.hierarchy && this._elem.hierarchy.length){
+            var i, len = this._elem.hierarchy.length;
             for(i=0;i<len;i+=1){
-                this._elem._dd[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+                this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
             }
             return toWorldMat.inversePoint(arr);
         }
@@ -12950,10 +12833,10 @@
         var toWorldMat = new Matrix();
         toWorldMat.reset();
         this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
-        if(this._elem._dd && this._elem._dd.length){
-            var i, len = this._elem._dd.length;
+        if(this._elem.hierarchy && this._elem.hierarchy.length){
+            var i, len = this._elem.hierarchy.length;
             for(i=0;i<len;i+=1){
-                this._elem._dd[i].finalTransform.mProp.applyToMatrix(toWorldMat);
+                this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
             }
             return toWorldMat.inversePoint(arr);
         }
@@ -12966,18 +12849,18 @@
         var transformInterface;
 
         function _registerMaskInterface(maskManager){
-            _cd.mask = new MaskManagerInterface(maskManager, elem);
+            _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
         }
         function _registerEffectsInterface(effects){
-            _cd.effect = effects;
+            _thisLayerFunction.effect = effects;
         }
 
-        function _cd(name){
+        function _thisLayerFunction(name){
             switch(name){
                 case "ADBE Root Vectors Group":
                 case "Contents":
                 case 2:
-                    return _cd.shapeInterface;
+                    return _thisLayerFunction.shapeInterface;
                 case 1:
                 case 6:
                 case "Transform":
@@ -12986,26 +12869,26 @@
                     return transformInterface;
                 case 4:
                 case "ADBE Effect Parade":
-                    return _cd.effect;
+                    return _thisLayerFunction.effect;
             }
         }
-        _cd.toWorld = toWorld;
-        _cd.fromWorld = fromWorld;
-        _cd.toComp = toWorld;
-        _cd.fromComp = fromComp;
-        _cd.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
-        _cd._elem = elem;
+        _thisLayerFunction.toWorld = toWorld;
+        _thisLayerFunction.fromWorld = fromWorld;
+        _thisLayerFunction.toComp = toWorld;
+        _thisLayerFunction.fromComp = fromComp;
+        _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
+        _thisLayerFunction._elem = elem;
         transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
         var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
-        Object.defineProperties(_cd,{
+        Object.defineProperties(_thisLayerFunction,{
             hasParent: {
                 get: function(){
-                    return elem._dd.length;
+                    return elem.hierarchy.length;
                 }
             },
             parent: {
                 get: function(){
-                    return elem._dd[0].layerInterface;
+                    return elem.hierarchy[0].layerInterface;
                 }
             },
             rotation: getDescriptor(transformInterface, 'rotation'),
@@ -13026,39 +12909,39 @@
             }
         });
 
-        _cd.startTime = elem.data.st;
-        _cd.index = elem.data.ind;
-        _cd.source = elem.data.refId;
-        _cd.height = elem.data.ty === 0 ? elem.data.h : 100;
-        _cd.width = elem.data.ty === 0 ? elem.data.w : 100;
+        _thisLayerFunction.startTime = elem.data.st;
+        _thisLayerFunction.index = elem.data.ind;
+        _thisLayerFunction.source = elem.data.refId;
+        _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
+        _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
 
-        _cd.registerMaskInterface = _registerMaskInterface;
-        _cd.registerEffectsInterface = _registerEffectsInterface;
-        return _cd;
-    }
+        _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
+        _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
+        return _thisLayerFunction;
+    };
 }());
 
 var CompExpressionInterface = (function (){
     return function(comp){
-        function _cd(name){
+        function _thisLayerFunction(name){
             var i=0, len = comp.layers.length;
             while(i<len){
                 if(comp.layers[i].nm === name || comp.layers[i].ind === name){
-                    return comp._br[i].layerInterface;
+                    return comp.elements[i].layerInterface;
                 }
                 i += 1;
             }
-            return {active:false}
+            return {active:false};
         }
-        Object.defineProperty(_cd, "_name", { value:comp.data.nm });
-        _cd.layer = _cd;
-        _cd.pixelAspect = 1;
-        _cd.height = comp._x._de.h;
-        _cd.width = comp._x._de.w;
-        _cd.pixelAspect = 1;
-        _cd.frameDuration = 1/comp._x.frameRate;
-        return _cd;
-    }
+        Object.defineProperty(_thisLayerFunction, "_name", { value:comp.data.nm });
+        _thisLayerFunction.layer = _thisLayerFunction;
+        _thisLayerFunction.pixelAspect = 1;
+        _thisLayerFunction.height = comp.globalData.compSize.h;
+        _thisLayerFunction.width = comp.globalData.compSize.w;
+        _thisLayerFunction.pixelAspect = 1;
+        _thisLayerFunction.frameDuration = 1/comp.globalData.frameRate;
+        return _thisLayerFunction;
+    };
 }());
 var TransformExpressionInterface = (function (){
     return function(transform){
@@ -13114,7 +12997,7 @@
                     return ExpressionValue(transform.p);
                 } else {
                     return [transform.px.v, transform.py.v, transform.pz ? transform.pz.v : 0];
-                };
+                }
             }
         });
 
@@ -13167,7 +13050,7 @@
         });
 
         return _thisFunction;
-    }
+    };
 }());
 var ProjectInterface = (function (){
 
@@ -13180,8 +13063,8 @@
             var i = 0, len = this.compositions.length;
             while(i<len){
                 if(this.compositions[i].data && this.compositions[i].data.nm === name){
-                    if(this.compositions[i]._az) {
-                        this.compositions[i]._az(this.compositions[i].data.xt ? this.currentFrame : this.compositions[i].renderedFrame);
+                    if(this.compositions[i].prepareFrame) {
+                        this.compositions[i].prepareFrame(this.compositions[i].data.xt ? this.currentFrame : this.compositions[i].renderedFrame);
                     }
                     return this.compositions[i].compInterface;
                 }
@@ -13197,7 +13080,7 @@
 
 
         return _thisProjectFunction;
-    }
+    };
 }());
 var EffectsExpressionInterface = (function (){
     var ob = {
@@ -13205,35 +13088,35 @@
     };
 
     function createEffectsInterface(elem, propertyGroup){
-        if(elem.effects){
+        if(elem.effectsManager){
 
-            var _cm = [];
+            var effectElements = [];
             var effectsData = elem.data.ef;
-            var i, len = elem.effects._cm.length;
+            var i, len = elem.effectsManager.effectElements.length;
             for(i=0;i<len;i+=1){
-                _cm.push(createGroupInterface(effectsData[i],elem.effects._cm[i],propertyGroup,elem));
+                effectElements.push(createGroupInterface(effectsData[i],elem.effectsManager.effectElements[i],propertyGroup,elem));
             }
 
             return function(name){
                 var effects = elem.data.ef, i = 0, len = effects.length;
                 while(i<len) {
                     if(name === effects[i].nm || name === effects[i].mn || name === effects[i].ix){
-                        return _cm[i];
+                        return effectElements[i];
                     }
                     i += 1;
                 }
-            }
+            };
         }
     }
 
-    function createGroupInterface(data,_br, propertyGroup, elem){
-        var _cm = [];
+    function createGroupInterface(data,elements, propertyGroup, elem){
+        var effectElements = [];
         var i, len = data.ef.length;
         for(i=0;i<len;i+=1){
             if(data.ef[i].ty === 5){
-                _cm.push(createGroupInterface(data.ef[i],_br._cm[i],_br._cm[i].propertyGroup, elem));
+                effectElements.push(createGroupInterface(data.ef[i],elements.effectElements[i],elements.effectElements[i].propertyGroup, elem));
             } else {
-                _cm.push(createValueInterface(_br._cm[i],data.ef[i].ty, elem, _propertyGroup));
+                effectElements.push(createValueInterface(elements.effectElements[i],data.ef[i].ty, elem, _propertyGroup));
             }
         }
 
@@ -13250,22 +13133,22 @@
             while(i<len) {
                 if(name === effects[i].nm || name === effects[i].mn || name === effects[i].ix){
                     if(effects[i].ty === 5){
-                        return _cm[i];
+                        return effectElements[i];
                     } else {
-                        return _cm[i]();
+                        return effectElements[i]();
                     }
                 }
                 i += 1;
             }
-            return _cm[0]();
-        }
+            return effectElements[0]();
+        };
 
         groupInterface.propertyGroup = _propertyGroup;
 
         if(data.mn === 'ADBE Color Control'){
             Object.defineProperty(groupInterface, 'color', {
                 get: function(){
-                    return _cm[0]();
+                    return effectElements[0]();
                 }
             });
         }
@@ -13275,7 +13158,7 @@
             }
         });
         groupInterface.active = data.en !== 0;
-        return groupInterface
+        return groupInterface;
     }
 
     function createValueInterface(element, type, elem, propertyGroup){
@@ -13286,8 +13169,8 @@
             return ExpressionValue(element.p);
         }
 
-        if(element.p._ce) {
-            element.p._ce(propertyGroup);
+        if(element.p.setGroupProperty) {
+            element.p.setGroupProperty(propertyGroup);
         }
 
         return interfaceFunction;
@@ -13314,7 +13197,7 @@
 	var MaskManager = function(maskManager, elem){
 		var _maskManager = maskManager;
 		var _elem = elem;
-		var _masksInterfaces = _cv(maskManager.viewData.length);
+		var _masksInterfaces = createSizedArray(maskManager.viewData.length);
 		var i, len = maskManager.viewData.length;
 		for(i = 0; i < len; i += 1) {
 			_masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
@@ -13328,12 +13211,11 @@
 		        }
 		        i += 1;
 		    }
-		}
-		return maskFunction
-	}
-	return MaskManager
-}())
-
+		};
+		return maskFunction;
+	};
+	return MaskManager;
+}());
 
 var ExpressionValue = (function() {
 	return function(elementProp, mult, type) {
@@ -13342,142 +13224,138 @@
 		if (elementProp.k) {
             elementProp.getValue();
         }
-        var i, len, arrValue;
+        var i, len, arrValue, val;
         if (type) {
         	if(type === 'color') {
         		len = 4;
-                expressionValue = _cs('float32', len);
-                arrValue = _cs('float32', len);
+                expressionValue = createTypedArray('float32', len);
+                arrValue = createTypedArray('float32', len);
 		        for (i = 0; i < len; i += 1) {
 		            expressionValue[i] = arrValue[i] = (mult && i < 3) ? elementProp.v[i] * mult : 1;
 		        }
 	        	expressionValue.value = arrValue;
         	}
         } else if (typeof elementProp.v === 'number' || elementProp.v instanceof Number){
-            expressionValue = mult ? new Number(elementProp.v * mult) : new Number(elementProp.v);
-            expressionValue.value = mult ? elementProp.v * mult : elementProp.v;
+            val = mult ? elementProp.v * mult : elementProp.v;
+            expressionValue = new Number(val);
+            expressionValue.value = val;
         } else {
         	len = elementProp.v.length;
-            expressionValue = _cs('float32', len);
-            arrValue = _cs('float32', len);
+            expressionValue = createTypedArray('float32', len);
+            arrValue = createTypedArray('float32', len);
 	        for (i = 0; i < len; i += 1) {
 	            expressionValue[i] = arrValue[i] = mult ? elementProp.v[i] * mult : elementProp.v[i];
 	        }
 	        expressionValue.value = arrValue;
         }
         
-        expressionValue.numKeys = elementProp._df ? elementProp._df.length : 0;
+        expressionValue.numKeys = elementProp.keyframes ? elementProp.keyframes.length : 0;
         expressionValue.key = function(pos) {
             if (!expressionValue.numKeys) {
                 return 0;
             } else {
-                return elementProp._df[pos-1].t;
+                return elementProp.keyframes[pos-1].t;
             }
         };
-        expressionValue.valueAtTime = elementProp._dg;
+        expressionValue.valueAtTime = elementProp.getValueAtTime;
         expressionValue.propertyGroup = elementProp.propertyGroup;
         return expressionValue;
-	}
-}())
-function SliderEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,0,0,_co);
+	};
+}());
+function SliderEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,0,0,dynamicProperties);
 }
-function AngleEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,0,0,_co);
+function AngleEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,0,0,dynamicProperties);
 }
-function ColorEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,1,0,_co);
+function ColorEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,1,0,dynamicProperties);
 }
-function PointEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,1,0,_co);
+function PointEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,1,0,dynamicProperties);
 }
-function LayerIndexEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,0,0,_co);
+function LayerIndexEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,0,0,dynamicProperties);
 }
-function MaskIndexEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,0,0,_co);
+function MaskIndexEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,0,0,dynamicProperties);
 }
-function CheckboxEffect(data,elem, _co){
-    this.p = _ai._bo(elem,data.v,0,0,_co);
+function CheckboxEffect(data,elem, dynamicProperties){
+    this.p = PropertyFactory.getProp(elem,data.v,0,0,dynamicProperties);
 }
 function NoValueEffect(){
     this.p = {};
 }
-function EffectsManager(data,element,_co){
+function EffectsManager(data,element,dynamicProperties){
     var effects = data.ef || [];
-    this._cm = [];
+    this.effectElements = [];
     var i,len = effects.length;
     var effectItem;
     for(i=0;i<len;i++) {
-        effectItem = new GroupEffect(effects[i],element,_co);
-        this._cm.push(effectItem);
+        effectItem = new GroupEffect(effects[i],element,dynamicProperties);
+        this.effectElements.push(effectItem);
     }
 }
 
-function GroupEffect(data,element,_co){
-    this._co = [];
-    this.init(data,element,this._co);
-    if(this._co.length){
-        _co.push(this);
+function GroupEffect(data,element,dynamicProperties){
+    this.dynamicProperties = [];
+    this.init(data,element,this.dynamicProperties);
+    if(this.dynamicProperties.length){
+        dynamicProperties.push(this);
     }
 }
 
 GroupEffect.prototype.getValue = function(){
-    this.mdf = false;
-    var i, len = this._co.length;
+    this._mdf = false;
+    var i, len = this.dynamicProperties.length;
     for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-        this.mdf = this._co[i].mdf ? true : this.mdf;
+        this.dynamicProperties[i].getValue();
+        this._mdf = this.dynamicProperties[i]._mdf || this._mdf;
     }
 };
 
-GroupEffect.prototype.init = function(data,element,_co){
+GroupEffect.prototype.init = function(data,element,dynamicProperties){
     this.data = data;
-    this.mdf = false;
-    this._cm = [];
+    this._mdf = false;
+    this.effectElements = [];
     var i, len = this.data.ef.length;
     var eff, effects = this.data.ef;
     for(i=0;i<len;i+=1){
+        eff = null;
         switch(effects[i].ty){
             case 0:
-                eff = new SliderEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new SliderEffect(effects[i],element,dynamicProperties);
                 break;
             case 1:
-                eff = new AngleEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new AngleEffect(effects[i],element,dynamicProperties);
                 break;
             case 2:
-                eff = new ColorEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new ColorEffect(effects[i],element,dynamicProperties);
                 break;
             case 3:
-                eff = new PointEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new PointEffect(effects[i],element,dynamicProperties);
                 break;
             case 4:
             case 7:
-                eff = new CheckboxEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new CheckboxEffect(effects[i],element,dynamicProperties);
                 break;
             case 10:
-                eff = new LayerIndexEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new LayerIndexEffect(effects[i],element,dynamicProperties);
                 break;
             case 11:
-                eff = new MaskIndexEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new MaskIndexEffect(effects[i],element,dynamicProperties);
                 break;
             case 5:
-                eff = new EffectsManager(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new EffectsManager(effects[i],element,dynamicProperties);
                 break;
-            case 6:
+            //case 6:
             default:
-                eff = new NoValueEffect(effects[i],element,_co);
-                this._cm.push(eff);
+                eff = new NoValueEffect(effects[i],element,dynamicProperties);
                 break;
         }
+        if(eff) {
+            this.effectElements.push(eff);
+        }
     }
 };
     var lottiejs = {};
@@ -13509,10 +13387,6 @@
         animationManager.stop(animation);
     }
 
-    function moveFrame(value) {
-        animationManager.moveFrame(value);
-    }
-
     function searchAnimations() {
         if (standalone === true) {
             animationManager.searchAnimations(animationData, standalone, renderer);
@@ -13588,9 +13462,9 @@
     function getFactory(name) {
         switch (name) {
             case "propertyFactory":
-                return _ai;
-            case "shape_ai":
-                return _ah;
+                return PropertyFactory;
+            case "shapePropertyFactory":
+                return ShapePropertyFactory;
             case "matrix":
                 return Matrix;
         }
@@ -13602,7 +13476,6 @@
     lottiejs.setSpeed = setSpeed;
     lottiejs.setDirection = setDirection;
     lottiejs.stop = stop;
-    lottiejs.moveFrame = moveFrame;
     lottiejs.searchAnimations = searchAnimations;
     lottiejs.registerAnimation = registerAnimation;
     lottiejs.loadAnimation = loadAnimation;
@@ -13615,7 +13488,7 @@
     lottiejs.inBrowser = inBrowser;
     lottiejs.installPlugin = installPlugin;
     lottiejs.__getFactory = getFactory;
-    lottiejs.version = '5.0.6';
+    lottiejs.version = '5.1.0';
 
     function checkReady() {
         if (document.readyState === "complete") {
diff --git a/build/player/lottie.min.js b/build/player/lottie.min.js
index 54f4e71..071f976 100644
--- a/build/player/lottie.min.js
+++ b/build/player/lottie.min.js
@@ -1,8 +1,8 @@
-!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(t):(t.lottie=e(t),t.bodymovin=t.lottie)}(window||{},function(window){"use strict";function ProjectInterface(){return{}}function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin=t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="visible",t.style.transformStyle=t.style.webkitTransformStyle=t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,s){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=s<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,s){this.type=t,this.currentLoop=e,this.totalLoops=r,this.direction=s<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this._ch=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var r,s="";for(r=t;r>0;--r)s+=e[Math.round(Math.random()*(e.length-1))];return s}function HSVtoRGB(t,e,r){var s,i,a,n,o,h,l,p;switch(1===arguments.length&&(e=t.s,r=t.v,t=t.h),n=Math.floor(6*t),o=6*t-n,h=r*(1-e),l=r*(1-o*e),p=r*(1-(1-o)*e),n%6){case 0:s=r,i=p,a=h;break;case 1:s=l,i=r,a=h;break;case 2:s=h,i=r,a=p;break;case 3:s=h,i=l,a=r;break;case 4:s=p,i=h,a=r;break;case 5:s=r,i=h,a=l}return[s,i,a]}function RGBtoHSV(t,e,r){1===arguments.length&&(e=t.g,r=t.b,t=t.r);var s,i=Math.max(t,e,r),a=Math.min(t,e,r),n=i-a,o=0===i?0:n/i,h=i/255;switch(i){case a:s=0;break;case t:s=e-r+n*(e<r?6:0),s/=6*n;break;case e:s=r-t+2*n,s/=6*n;break;case r:s=t-e+4*n,s/=6*n}return[s,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}function BaseEvent(){}function _cv(t){return Array.apply(null,{length:t})}function _ct(t){return document.createElementNS(svgNS,t)}function _cu(t){return document.createElement(t)}function extendPrototype(t,e){var r,s,i=t.length;for(r=0;r<i;r+=1){s=t[r].prototype;for(var a in s)s.hasOwnProperty(a)&&(e.prototype[a]=s[a])}}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function bezFunction(){function t(t,e,r,s,i,a){var n=t*s+e*i+r*a-i*s-a*t-r*e;return n>-1e-4&&n<1e-4}function e(e,r,s,i,a,n,o,h,l){if(0===s&&0===n&&0===l)return t(e,r,i,a,o,h);var p,m=Math.sqrt(Math.pow(i-e,2)+Math.pow(a-r,2)+Math.pow(n-s,2)),f=Math.sqrt(Math.pow(o-e,2)+Math.pow(h-r,2)+Math.pow(l-s,2)),c=Math.sqrt(Math.pow(o-i,2)+Math.pow(h-a,2)+Math.pow(l-n,2));return p=m>f?m>c?m-f-c:c-f-m:c>f?c-f-m:f-m-c,p>-1e-4&&p<1e-4}function r(t){var e,r=segments_length_pool.newElement(),s=t.c,i=t.v,a=t.o,n=t.i,o=t._length,l=r.lengths,p=0;for(e=0;e<o-1;e+=1)l[e]=h(i[e],i[e+1],a[e],n[e+1]),p+=l[e].addedLength;return s&&(l[e]=h(i[e],i[0],a[e],n[0]),p+=l[e].addedLength),r.totalLength=p,r}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var r=e.percents,s=e.lengths,i=r.length,a=bm_floor((i-1)*t),n=t*e.addedLength,o=0;if(a===i-1||0===a||n===s[a])return r[a];for(var h=s[a]>n?-1:1,l=!0;l;)if(s[a]<=n&&s[a+1]>n?(o=(n-s[a])/(s[a+1]-s[a]),l=!1):a+=h,a<0||a>=i-1){if(a===i-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}function n(t,e,r,s,i,n){var o=a(i,n),h=1-o,l=Math.round(1e3*(h*h*h*t[0]+(o*h*h+h*o*h+h*h*o)*r[0]+(o*o*h+h*o*o+o*h*o)*s[0]+o*o*o*e[0]))/1e3,p=Math.round(1e3*(h*h*h*t[1]+(o*h*h+h*o*h+h*h*o)*r[1]+(o*o*h+h*o*o+o*h*o)*s[1]+o*o*o*e[1]))/1e3;return[l,p]}function o(t,e,r,s,i,n,o){i=i<0?0:i>1?1:i;var h=a(i,o);n=n>1?1:n;var l,m=a(n,o),f=t.length,c=1-h,d=1-m,u=c*c*c,y=h*c*c*3,g=h*h*c*3,v=h*h*h,b=c*c*d,E=h*c*d+c*h*d+c*c*m,P=h*h*d+c*h*m+h*c*m,x=h*h*m,S=c*d*d,C=h*d*d+c*m*d+c*d*m,A=h*m*d+c*m*m+h*d*m,k=h*m*m,M=d*d*d,T=m*d*d+d*m*d+d*d*m,D=m*m*d+d*m*m+m*d*m,w=m*m*m;for(l=0;l<f;l+=1)p[4*l]=Math.round(1e3*(u*t[l]+y*r[l]+g*s[l]+v*e[l]))/1e3,p[4*l+1]=Math.round(1e3*(b*t[l]+E*r[l]+P*s[l]+x*e[l]))/1e3,p[4*l+2]=Math.round(1e3*(S*t[l]+C*r[l]+A*s[l]+k*e[l]))/1e3,p[4*l+3]=Math.round(1e3*(M*t[l]+T*r[l]+D*s[l]+w*e[l]))/1e3;return p}var h=(Math,function(){return function(t,e,r,s){var i,a,n,o,h,l,p=defaultCurveSegments,m=0,f=[],c=[],d=bezier_length_pool.newElement();for(n=r.length,i=0;i<p;i+=1){for(h=i/(p-1),l=0,a=0;a<n;a+=1)o=bm_pow(1-h,3)*t[a]+3*bm_pow(1-h,2)*h*r[a]+3*(1-h)*bm_pow(h,2)*s[a]+bm_pow(h,3)*e[a],f[a]=o,null!==c[a]&&(l+=bm_pow(f[a]-c[a],2)),c[a]=f[a];l&&(l=bm_sqrt(l),m+=l),d.percents[i]=h,d.lengths[i]=m}return d.addedLength=m,d}}()),l=function(){var e={};return function(r){var a=r.s,n=r.e,o=r.to,h=r.ti,l=(a[0]+"_"+a[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]+"_"+h[0]+"_"+h[1]).replace(/\./g,"p");if(e[l])return void(r.bezierData=e[l]);var p,m,f,c,d,u,y,g=defaultCurveSegments,v=0,b=null;2===a.length&&(a[0]!=n[0]||a[1]!=n[1])&&t(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&t(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(g=2);var E=new s(g);for(f=o.length,p=0;p<g;p+=1){for(y=_cv(f),d=p/(g-1),u=0,m=0;m<f;m+=1)c=bm_pow(1-d,3)*a[m]+3*bm_pow(1-d,2)*d*(a[m]+o[m])+3*(1-d)*bm_pow(d,2)*(n[m]+h[m])+bm_pow(d,3)*n[m],y[m]=c,null!==b&&(u+=bm_pow(y[m]-b[m],2));u=bm_sqrt(u),v+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=v,r.bezierData=E,e[l]=E}}(),p=_cs("float32",8);return{getSegmentsLength:r,getNewSegment:o,getPointInSegment:n,buildBezierData:l,pointOnLine2D:t,pointOnLine3D:e}}function dataFunctionManager(){function t(i,a,o){var h,l,p,m,f,c,d,u,y=i.length;for(m=0;m<y;m+=1)if(h=i[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(i[m-1].td=h.tt),l=[],p=-1,h.hasMask){var g=h.masksProperties;for(c=g.length,f=0;f<c;f+=1)if(g[f].pt.k.i)s(g[f].pt.k);else for(u=g[f].pt.k.length,d=0;d<u;d+=1)g[f].pt.k[d].s&&s(g[f].pt.k[d].s[0]),g[f].pt.k[d].e&&s(g[f].pt.k[d].e[0])}0===h.ty?(h.layers=e(h.refId,a),t(h.layers,a,o)):4===h.ty?r(h.shapes):5==h.ty&&n(h,o)}}function e(t,e){for(var r=0,s=e.length;r<s;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}}function r(t){var e,i,a,n=t.length,o=!1;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)s(t[e].ks.k);else for(a=t[e].ks.k.length,i=0;i<a;i+=1)t[e].ks.k[i].s&&s(t[e].ks.k[i].s[0]),t[e].ks.k[i].e&&s(t[e].ks.k[i].e[0]);o=!0}else"gr"==t[e].ty&&r(t[e].it)}function s(t){var e,r=t.i.length;for(e=0;e<r;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function i(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&void 0))}function a(e,r){e.__complete||(l(e),o(e),h(e),p(e),t(e.layers,e.assets,r),e.__complete=!0)}function n(t,e){0!==t.t.a.length||"m"in t.t.p||(t.singleShape=!0)}var o=function(){function t(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function e(e){var r,s=e.length;for(r=0;r<s;r+=1)5===e[r].ty&&t(e[r])}var r=[4,4,14];return function(t){if(i(r,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;s<a;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),h=function(){var t=[4,7,99];return function(e){if(e.chars&&!i(t,e.v)){var r,a,n,o,h,l=e.chars.length;for(r=0;r<l;r+=1)if(e.chars[r].data&&e.chars[r].data.shapes)for(h=e.chars[r].data.shapes[0].it,n=h.length,a=0;a<n;a+=1)o=h[a].ks.k,o.__converted||(s(h[a].ks.k),o.__converted=!0)}}}(),l=function(){function t(e){var r,s,i,a=e.length;for(r=0;r<a;r+=1)if("gr"===e[r].ty)t(e[r].it);else if("fl"===e[r].ty||"st"===e[r].ty)if(e[r].c.k&&e[r].c.k[0].i)for(i=e[r].c.k.length,s=0;s<i;s+=1)e[r].c.k[s].s&&(e[r].c.k[s].s[0]/=255,e[r].c.k[s].s[1]/=255,e[r].c.k[s].s[2]/=255,e[r].c.k[s].s[3]/=255),e[r].c.k[s].e&&(e[r].c.k[s].e[0]/=255,e[r].c.k[s].e[1]/=255,e[r].c.k[s].e[2]/=255,e[r].c.k[s].e[3]/=255);else e[r].c.k[0]/=255,e[r].c.k[1]/=255,e[r].c.k[2]/=255,e[r].c.k[3]/=255}function e(e){var r,s=e.length;for(r=0;r<s;r+=1)4===e[r].ty&&t(e[r].shapes)}var r=[4,1,9];return function(t){if(i(r,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;s<a;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),p=function(){function t(e){var r,s,i,a=e.length,n=!1;for(r=a-1;r>=0;r-=1)if("sh"==e[r].ty){if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(i=e[r].ks.k.length,s=0;s<i;s+=1)e[r].ks.k[s].s&&(e[r].ks.k[s].s[0].c=e[r].closed),e[r].ks.k[s].e&&(e[r].ks.k[s].e[0].c=e[r].closed);n=!0}else"gr"==e[r].ty&&t(e[r].it)}function e(e){var r,s,i,a,n,o,h=e.length;for(s=0;s<h;s+=1){if(r=e[s],r.hasMask){var l=r.masksProperties;for(a=l.length,i=0;i<a;i+=1)if(l[i].pt.k.i)l[i].pt.k.c=l[i].cl;else for(o=l[i].pt.k.length,n=0;n<o;n+=1)l[i].pt.k[n].s&&(l[i].pt.k[n].s[0].c=l[i].cl),l[i].pt.k[n].e&&(l[i].pt.k[n].e[0].c=l[i].cl)}4===r.ty&&t(r.shapes)}}var r=[4,4,18];return function(t){if(i(r,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;s<a;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),m={};return m.completeData=a,m}function _av(){this.c=!1,this._length=0,this._maxLength=8,this.v=_cv(this._maxLength),this.o=_cv(this._maxLength),this.i=_cv(this._maxLength)}function _at(){}function _an(){}function _au(){}function _aj(){}function _am(){this._length=0,this._maxLength=4,this.shapes=_cv(this._maxLength)}function DashProperty(t,e,r,s){this.elem=t,this.frameId=-1,this.dataProps=_cv(e.length),this.renderer=r,this.mdf=!1,this.k=!1,this.dashStr="",this.dashArray=_cs("float32",e.length-1),this.dashoffset=_cs("float32",1);var i,a,n=e.length;for(i=0;i<n;i+=1)a=_ai._bo(t,e[i].v,0,0,s),this.k=!!a.k||this.k,this.dataProps[i]={n:e[i].n,p:a};this.k?s.push(this):this.getValue(!0)}function GradientProperty(t,e,r){this.prop=_ai._bo(t,e.k,1,null,[]),this.data=e,this.k=this.prop.k,this.c=_cs("uint8c",4*e.p);var s=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=_cs("float32",s),this.cmdf=!1,this.omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=s,this.prop.k&&r.push(this),this.getValue(!0)}function _bl(t,e,r){this.mdf=!1,this._ch=!0,this._hasMaskedPath=!1,this._frameId=-1,this.__co=[],this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=_cv(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this._bt=[],this.lettersChangedFlag=!1}function TextAnimatorDataProperty(t,e,r){var s={propType:!1},i=_ai._bo,a=e.a;this.a={r:a.r?i(t,a.r,0,degToRads,r):s,rx:a.rx?i(t,a.rx,0,degToRads,r):s,ry:a.ry?i(t,a.ry,0,degToRads,r):s,sk:a.sk?i(t,a.sk,0,degToRads,r):s,sa:a.sa?i(t,a.sa,0,degToRads,r):s,s:a.s?i(t,a.s,1,.01,r):s,a:a.a?i(t,a.a,1,0,r):s,o:a.o?i(t,a.o,0,.01,r):s,p:a.p?i(t,a.p,1,0,r):s,sw:a.sw?i(t,a.sw,0,0,r):s,sc:a.sc?i(t,a.sc,1,0,r):s,fc:a.fc?i(t,a.fc,1,0,r):s,fh:a.fh?i(t,a.fh,0,0,r):s,fs:a.fs?i(t,a.fs,0,.01,r):s,fb:a.fb?i(t,a.fb,0,.01,r):s,t:a.t?i(t,a.t,0,0,r):s},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function LetterProps(t,e,r,s,i,a){this.o=t,this.sw=e,this.sc=r,this.fc=s,this.m=i,this.p=a,this.mdf={o:!0,sw:!!e,sc:!!r,fc:!!s,m:!0,p:!0}}function _ar(t,e,r){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._ch=!0,this.mdf=!0,this.data=e,this.elem=t,this.keysIndex=-1,this.currentData={ascent:0,boxWidth:[0,0],f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:[0,0],fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,__complete:!1},this.searchProperty()?r.push(this):this.getValue(!0)}function _l(){}function _ao(t,e){this._cq=t,this.layers=null,this.renderedFrame=-1,this._cf=_ct("svg");var r=_ct("g");this._cf.appendChild(r),this._bx=r;var s=_ct("defs");this._cf.appendChild(s),this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!e||e.hideOnTransparent!==!1,viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||""},this._x={mdf:!1,frameNum:-1,defs:s,frameId:0,_de:{w:0,h:0},renderConfig:this.renderConfig,_cr:new FontManager},this._br=[],this._dc=[],this.destroyed=!1}function _ay(t,e,r){this._co=[],this.data=t,this.element=e,this._x=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null,this._ch=!0;var s,i=this._x.defs,a=this.masksProperties?this.masksProperties.length:0;this.viewData=_cv(a),this.solidPath="";var n,o,h,l,p,m,f,c=this.masksProperties,d=0,u=[],y=randomString(10),g="clipPath",v="clip-path";for(s=0;s<a;s++)if(("a"!==c[s].mode&&"n"!==c[s].mode||c[s].inv||100!==c[s].o.k)&&(g="mask",v="mask"),"s"!=c[s].mode&&"i"!=c[s].mode||0!=d?l=null:(l=_ct("rect"),l.setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w),l.setAttribute("height",this.element.comp.data.h),u.push(l)),n=_ct("path"),"n"!=c[s].mode){if(d+=1,n.setAttribute("fill","s"===c[s].mode?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),0!==c[s].x.k){g="mask",v="mask",f=_ai._bo(this.element,c[s].x,0,null,this._co);var b="fi_"+randomString(10);p=_ct("filter"),p.setAttribute("id",b),m=_ct("feMorphology"),m.setAttribute("operator","dilate"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),p.appendChild(m),i.appendChild(p),n.setAttribute("stroke","s"===c[s].mode?"#000000":"#ffffff")}else m=null,f=null;if(this.storedData[s]={elem:n,x:f,expan:m,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"==c[s].mode){h=u.length;var E=_ct("g");for(o=0;o<h;o+=1)E.appendChild(u[o]);var P=_ct("mask");P.setAttribute("mask-type","alpha"),P.setAttribute("id",y+"_"+d),P.appendChild(n),i.appendChild(P),E.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(E)}else u.push(n);c[s].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[s]={elem:n,lastPath:"",op:_ai._bo(this.element,c[s].o,0,.01,this._co),prop:_ah._bp(this.element,c[s],3,this._co,null)},l&&(this.viewData[s].invRect=l),this.viewData[s].prop.k||this.drawPath(c[s],this.viewData[s].prop.v,this.viewData[s])}else this.viewData[s]={op:_ai._bo(this.element,c[s].o,0,.01,this._co),prop:_ah._bp(this.element,c[s],3,this._co,null),elem:n},i.appendChild(n);for(this.maskElement=_ct(g),a=u.length,s=0;s<a;s+=1)this.maskElement.appendChild(u[s]);d>0&&(this.maskElement.setAttribute("id",y),this.element._ca.setAttribute(v,"url("+locationHref+"#"+y+")"),i.appendChild(this.maskElement))}function _ad(){}function _ac(){}function _af(){}function _ae(){}function _ci(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this.mdf=!1,this.closed=!1,this.pElem=_ct("path"),this.msElem=null}function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e}function SVGTransformData(t,e){this.transform={mProps:t,op:e},this._br=[]}function SVGStrokeStyleData(t,e,r,s){this.o=_ai._bo(t,e.o,0,.01,r),this.w=_ai._bo(t,e.w,0,null,r),this.d=new DashProperty(t,e.d||{},"svg",r),this.c=_ai._bo(t,e.c,1,255,r),this.style=s}function SVGFillStyleData(t,e,r,s){this.o=_ai._bo(t,e.o,0,.01,r),this.c=_ai._bo(t,e.c,1,255,r),this.style=s}function _ck(t,e,r,s){this.initGradientData(t,e,r,s)}function _cj(t,e,r,s){this.w=_ai._bo(t,e.w,0,null,r),this.d=new DashProperty(t,e.d||{},"svg",r),this.initGradientData(t,e,r,s)}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=_ct("g")}function _e(){}function _i(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function _d(){}function _f(){}function _k(){}function _g(){}function _h(t,e,r){this.assetData=e.getAssetData(t.refId),this._cz(t,e,r)}function _j(t,e,r){this._cz(t,e,r)}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this._db=!1,this._dc=[],this._br=this.layers?_cv(this.layers.length):[],this._cz(t,e,r),this.tm=t.tm?_ai._bo(this,t.tm,0,e.frameRate,this._co):{_placeholder:!0}}function _cw(t,e,r){this.textSpans=[],this.renderType="svg",this._cz(t,e,r)}function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this._cz(t,e,r),this.prevViewData=[]}function _bb(t,e){this._cl=e;var r=_ct("feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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.setAttribute("result","f1"),t.appendChild(r),r=_ct("feColorMatrix"),r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e._cm[2].p.v||e._cm[2].p.k){var s=_ct("feMerge");t.appendChild(s);var i;i=_ct("feMergeNode"),i.setAttribute("in","SourceGraphic"),s.appendChild(i),i=_ct("feMergeNode"),i.setAttribute("in","f2"),s.appendChild(i)}}function _bc(t,e){this._cl=e;var r=_ct("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function _bd(t,e){this.initialized=!1,this._cl=e,this.elem=t,this.paths=[]}function _be(t,e){this._cl=e;var r=_ct("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.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.setAttribute("result","f1"),t.appendChild(r);var s=_ct("feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.matrixFilter=s;var i=_ct("feFuncR");i.setAttribute("type","table"),s.appendChild(i),this.feFuncR=i;var a=_ct("feFuncG");a.setAttribute("type","table"),s.appendChild(a),this.feFuncG=a;var n=_ct("feFuncB");n.setAttribute("type","table"),s.appendChild(n),this.feFuncB=n}function _bf(t,e){this._cl=e;var r=this._cl._cm,s=_ct("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),s=_ct("feComponentTransfer")),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function _bg(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","400%"),t.setAttribute("height","400%"),this._cl=e;var r=_ct("feGaussianBlur");r.setAttribute("in","SourceAlpha"),r.setAttribute("result","drop_shadow_1"),r.setAttribute("stdDeviation","0"),this.feGaussianBlur=r,t.appendChild(r);var s=_ct("feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var i=_ct("feFlood");i.setAttribute("flood-color","#00ff00"),i.setAttribute("flood-opacity","1"),i.setAttribute("result","drop_shadow_3"),this.feFlood=i,t.appendChild(i);var a=_ct("feComposite");a.setAttribute("in","drop_shadow_3"),a.setAttribute("in2","drop_shadow_2"),a.setAttribute("operator","in"),a.setAttribute("result","drop_shadow_4"),t.appendChild(a);var n=_ct("feMerge");t.appendChild(n);var o;o=_ct("feMergeNode"),n.appendChild(o),o=_ct("feMergeNode"),o.setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=n,this.originalNodeAdded=!1,n.appendChild(o)}function _bh(t,e,r){this.initialized=!1,this._cl=e,this.filterElem=t,this.elem=r,r.matteElement=_ct("g"),r.matteElement.appendChild(r._bx),r.matteElement.appendChild(r._bz),r._by=r.matteElement}function _bi(t){var e,r=t.data.ef?t.data.ef.length:0,s=randomString(10),i=filtersFactory.createFilter(s),a=0;this.filters=[];var n;for(e=0;e<r;e+=1)20===t.data.ef[e].ty?(a+=1,n=new _bb(i,t.effects._cm[e]),this.filters.push(n)):21===t.data.ef[e].ty?(a+=1,n=new _bc(i,t.effects._cm[e]),this.filters.push(n)):22===t.data.ef[e].ty?(n=new _bd(t,t.effects._cm[e]),this.filters.push(n)):23===t.data.ef[e].ty?(a+=1,n=new _be(i,t.effects._cm[e]),this.filters.push(n)):24===t.data.ef[e].ty?(a+=1,n=new _bf(i,t.effects._cm[e]),this.filters.push(n)):25===t.data.ef[e].ty?(a+=1,n=new _bg(i,t.effects._cm[e]),this.filters.push(n)):28===t.data.ef[e].ty&&(n=new _bh(i,t.effects._cm[e],t),this.filters.push(n));a&&(t._x.defs.appendChild(i),t._bx.setAttribute("filter","url("+locationHref+"#"+s+")"))}function _aq(t,e){this._cq=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",className:e&&e.className||""},this.renderConfig.dpr=e&&e.dpr||1,this._cq.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this._x={frameNum:-1,mdf:!1,renderConfig:this.renderConfig};this.contextData=new _n,this._br=[],this._dc=[],this.transformMat=new Matrix,this._db=!1}function _ap(t,e){this._cq=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",hideOnTransparent:!e||e.hideOnTransparent!==!1},this._x={mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this._dc=[],this._br=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0}function _n(){this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;var t,e=15;for(this.savedOp=_cs("float32",e),t=0;t<e;t+=1)this.saved[t]=_cs("float32",16);this._length=e}function _c(t,e,r){}function _p(t,e,r){this.failed=!1,this.img=new Image,this.assetData=e.getAssetData(t.refId),this._cz(t,e,r),this._x.addPendingElement()}function _m(t,e,r){this._db=!1,this.layers=t.layers,this._dc=[],this._br=_cv(this.layers.length),this._cz(t,e,r),this.tm=t.tm?_ai._bo(this,t.tm,0,e.frameRate,this._co):{_placeholder:!0}}function _q(t,e){this.data=t,this.element=e,this._co=[],this.masksProperties=this.data.masksProperties||[],this.viewData=_cv(this.masksProperties.length);var r,s=this.masksProperties.length,i=!1;for(r=0;r<s;r++)"n"!==this.masksProperties[r].mode&&(i=!0),this.viewData[r]=_ah._bp(this.element,this.masksProperties[r],3,this._co,null);this.hasMasks=i}function _r(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this._cz(t,e,r)}function _s(t,e,r){this._cz(t,e,r)}function _t(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this._cz(t,e,r)}function _o(){}function _b(t,e,r){}function _aa(t,e,r){this._cz(t,e,r)}function _w(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this._db=!1,this._dc=[],this._br=this.layers?_cv(this.layers.length):[],this.tm=t.tm?_ai._bo(this,t.tm,0,e.frameRate,this._co):{_placeholder:!0},this._cz(t,e,r)}function _z(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.shapesContainer=_ct("g"),this._cz(t,e,r),this.prevViewData=[],this._cg={x:999999,y:-999999,h:0,w:0}}function _ab(t,e,r){this.textSpans=[],this.textPaths=[],this._cg={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this._cz(t,e,r)}function _y(t,e,r){this.assetData=e.getAssetData(t.refId),this._cz(t,e,r)}function _v(t,e,r){this.initFrame(),this.initBaseData(t,e,r);var s=_ai._bo;if(this.pe=s(this,t.pe,0,0,this._co),t.ks.p.s?(this.px=s(this,t.ks.p.x,1,0,this._co),this.py=s(this,t.ks.p.y,1,0,this._co),this.pz=s(this,t.ks.p.z,1,0,this._co)):this.p=s(this,t.ks.p,1,0,this._co),t.ks.a&&(this.a=s(this,t.ks.a,1,0,this._co)),t.ks.or.k.length&&t.ks.or.k[0].to){var i,a=t.ks.or.k.length;for(i=0;i<a;i+=1)t.ks.or.k[i].to=null,t.ks.or.k[i].ti=null}this.or=s(this,t.ks.or,1,degToRads,this._co),this.or.sh=!0,this.rx=s(this,t.ks.rx,0,degToRads,this._co),this.ry=s(this,t.ks.ry,0,degToRads,this._co),this.rz=s(this,t.ks.rz,0,degToRads,this._co),this.mat=new Matrix,this._prevMat=new Matrix,this._ch=!0}function _bv(){}function SliderEffect(t,e,r){this.p=_ai._bo(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=_ai._bo(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=_ai._bo(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=_ai._bo(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=_ai._bo(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=_ai._bo(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=_ai._bo(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e,r){var s=t.ef||[];this._cm=[];var i,a,n=s.length;for(i=0;i<n;i++)a=new GroupEffect(s[i],e,r),this._cm.push(a)}function GroupEffect(t,e,r){this._co=[],this.init(t,e,this._co),this._co.length&&r.push(this)}function setLocationHref(t){locationHref=t}function play(t){animationManager.play(t)}function pause(t){animationManager.pause(t)}function togglePause(t){animationManager.togglePause(t)}function setSpeed(t,e){animationManager.setSpeed(t,e)}function setDirection(t,e){animationManager.setDirection(t,e)}function stop(t){animationManager.stop(t)}function moveFrame(t){animationManager.moveFrame(t)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function registerAnimation(t){return animationManager.registerAnimation(t)}function resize(){animationManager.resize()}function goToAndStop(t,e,r){animationManager.goToAndStop(t,e,r)}function setSubframeRendering(t){subframeEnabled=t}function loadAnimation(t){return standalone===!0&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function destroy(t){return animationManager.destroy(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(!(defaultCurveSegments>=50))}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return _ai;case"shape_ai":return _ah;case"matrix":return Matrix}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r++){var s=e[r].split("=");if(decodeURIComponent(s[0])==t)return decodeURIComponent(s[1])}}var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,blitter=10,BMMath={};!function(){var t,e=Object.getOwnPropertyNames(Math),r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){var e=typeof t;if("object"===e&&t.length){var r,s=_cv(t.length),i=t.length;for(r=0;r<i;r+=1)s[r]=Math.abs(t[r]);return s}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;roundValues(!1);var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1==e.length?"0"+e:e;return function(t,e,s){return t<0&&(t=0),e<0&&(e=0),s<0&&(s=0),"#"+r[t]+r[e]+r[s]}}();BaseEvent.prototype={_cy:function(t,e){if(this._cbs[t])for(var r=this._cbs[t].length,s=0;s<r;s++)this._cbs[t][s](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,s=this._cbs[t].length;r<s;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,s-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var _cs=function(){function t(t,e){var r,s=0,i=[];
-switch(t){case"int16":case"uint8c":r=1;break;default:r=1.1}for(s=0;s<e;s+=1)i.push(r);return i}function e(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):void 0}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?e:t}(),Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=k(t),r=M(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=k(t),r=M(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function s(t){if(0===t)return this;var e=k(t),r=M(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function i(t){if(0===t)return this;var e=k(t),r=M(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function a(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(T(t),T(e))}function o(t,e){var r=k(e),s=M(e);return this._t(r,s,0,0,-s,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,T(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-s,0,0,s,r,0,0,0,0,1,0,0,0,0,1)}function h(t,e,r){return r=isNaN(r)?1:r,1==t&&1==e&&1==r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function l(t,e,r,s,i,a,n,o,h,l,p,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=s,this.props[4]=i,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function p(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function m(t,e,r,s,i,a,n,o,h,l,p,m,f,c,d,u){if(1===t&&0===e&&0===r&&0===s&&0===i&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return this.props[12]=this.props[12]*t+this.props[15]*f,this.props[13]=this.props[13]*a+this.props[15]*c,this.props[14]=this.props[14]*p+this.props[15]*d,this.props[15]=this.props[15]*u,this._identityCalculated=!1,this;var y=this.props[0],g=this.props[1],v=this.props[2],b=this.props[3],E=this.props[4],P=this.props[5],x=this.props[6],S=this.props[7],C=this.props[8],A=this.props[9],k=this.props[10],M=this.props[11],T=this.props[12],D=this.props[13],w=this.props[14],F=this.props[15];return this.props[0]=y*t+g*i+v*h+b*f,this.props[1]=y*e+g*a+v*l+b*c,this.props[2]=y*r+g*n+v*p+b*d,this.props[3]=y*s+g*o+v*m+b*u,this.props[4]=E*t+P*i+x*h+S*f,this.props[5]=E*e+P*a+x*l+S*c,this.props[6]=E*r+P*n+x*p+S*d,this.props[7]=E*s+P*o+x*m+S*u,this.props[8]=C*t+A*i+k*h+M*f,this.props[9]=C*e+A*a+k*l+M*c,this.props[10]=C*r+A*n+k*p+M*d,this.props[11]=C*s+A*o+k*m+M*u,this.props[12]=T*t+D*i+w*h+F*f,this.props[13]=T*e+D*a+w*l+F*c,this.props[14]=T*r+D*n+w*p+F*d,this.props[15]=T*s+D*o+w*m+F*u,this._identityCalculated=!1,this}function f(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function c(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function d(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e]}function u(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function y(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function g(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function v(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function b(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function E(t){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],r=this.props[5]/e,s=-this.props[1]/e,i=-this.props[4]/e,a=this.props[0]/e,n=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e;return[t[0]*r+t[1]*i+n,t[0]*s+t[1]*a+o,0]}function P(t){var e,r=t.length,s=[];for(e=0;e<r;e+=1)s[e]=E(t[e]);return s}function x(t,e,r,s){if(s&&2===s){var i=point_pool.newElement();return i[0]=t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],i[1]=t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],i}return[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function S(t,e){return this.isIdentity()?t+","+e:t*this.props[0]+e*this.props[4]+this.props[12]+","+(t*this.props[1]+e*this.props[5]+this.props[13])}function C(){for(var t=0,e=this.props,r="matrix3d(",s=1e4;t<16;)r+=D(e[t]*s)/s,r+=15===t?")":",",t+=1;return r}function A(){var t=1e4,e=this.props;return"matrix("+D(e[0]*t)/t+","+D(e[1]*t)/t+","+D(e[4]*t)/t+","+D(e[5]*t)/t+","+D(e[12]*t)/t+","+D(e[13]*t)/t+")"}var k=Math.cos,M=Math.sin,T=Math.tan,D=Math.round;return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=s,this.rotateZ=i,this.skew=n,this.skewFromAxis=o,this.shear=a,this.scale=h,this.setTransform=l,this.translate=p,this.transform=m,this.applyToPoint=y,this.applyToX=g,this.applyToY=v,this.applyToZ=b,this._cn=x,this.applyToPointStringified=S,this.toCSS=C,this.to2dCSS=A,this.clone=d,this.cloneFromProps=u,this.equals=c,this.inversePoints=P,this.inversePoint=E,this._t=this.transform,this.isIdentity=f,this._identity=!0,this._identityCalculated=!1,this.props=_cs("float32",16),this.reset()}}();!function(t,e){function r(r,l,p){var c=[];l=1==l?{entropy:!0}:l||{};var v=n(a(l.entropy?[r,h(t)]:null==r?o():r,3),c),b=new s(c),E=function(){for(var t=b.g(f),e=u,r=0;t<y;)t=(t+r)*m,e*=m,r=b.g(1);for(;t>=g;)t/=2,e/=2,r>>>=1;return(t+r)/e};return E.int32=function(){return 0|b.g(4)},E.quick=function(){return b.g(4)/4294967296},E["double"]=E,n(h(b.S),t),(l.pass||p||function(t,r,s,a){return a&&(a.S&&i(a,b),t.state=function(){return i(b,{})}),s?(e[d]=t,r):t})(E,v,"global"in l?l.global:this==e,l.state)}function s(t){var e,r=t.length,s=this,i=0,a=s.i=s.j=0,n=s.S=[];for(r||(t=[r++]);i<m;)n[i]=i++;for(i=0;i<m;i++)n[i]=n[a=v&a+t[i%r]+(e=n[i])],n[a]=e;(s.g=function(t){for(var e,r=0,i=s.i,a=s.j,n=s.S;t--;)e=n[i=v&i+1],r=r*m+n[v&(n[i]=n[a=v&a+e])+(n[a]=e)];return s.i=i,s.j=a,r})(m)}function i(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function a(t,e){var r,s=[],i=typeof t;if(e&&"object"==i)for(r in t)try{s.push(a(t[r],e-1))}catch(n){}return s.length?s:"string"==i?t:t+"\0"}function n(t,e){for(var r,s=t+"",i=0;i<s.length;)e[v&i]=v&(r^=19*e[v&i])+s.charCodeAt(i++);return h(e)}function o(){try{if(l)return h(l.randomBytes(m));var e=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(e),h(e)}catch(r){var s=p.navigator,i=s&&s.plugins;return[+new Date,p,i,p.screen,h(t)]}}function h(t){return String.fromCharCode.apply(0,t)}var l,p=this,m=256,f=6,c=52,d="random",u=e.pow(m,f),y=e.pow(2,c),g=2*y,v=m-1;e["seed"+d]=r,n(e.random(),t)}([],BMMath);var BezierFactory=function(){function t(t,e,r,s,i){var a=i||("bez_"+t+"_"+e+"_"+r+"_"+s).replace(/\./g,"p");if(p[a])return p[a];var n=new h([t,e,r,s]);return p[a]=n,n}function e(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function s(t){return 3*t}function i(t,i,a){return((e(i,a)*t+r(i,a))*t+s(i))*t}function a(t,i,a){return 3*e(i,a)*t*t+2*r(i,a)*t+s(i)}function n(t,e,r,s,a){var n,o,h=0;do o=e+(r-e)/2,n=i(o,s,a)-t,n>0?r=o:e=o;while(Math.abs(n)>c&&++h<d);return o}function o(t,e,r,s){for(var n=0;n<m;++n){var o=a(e,r,s);if(0===o)return e;var h=i(e,r,s)-t;e-=h/o}return e}function h(t){this._p=t,this._mSampleValues=g?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var l={};l.getBezierEasing=t;var p={},m=4,f=.001,c=1e-7,d=10,u=11,y=1/(u-1),g="function"==typeof Float32Array;return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],s=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===r&&s===a?t:0===t?0:1===t?1:i(this._getTForX(t),r,a)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],s=this._p[3];this._precomputed=!0,t===e&&r===s||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<u;++r)this._mSampleValues[r]=i(r*y,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],s=this._mSampleValues,i=0,h=1,l=u-1;h!==l&&s[h]<=t;++h)i+=y;--h;var p=(t-s[h])/(s[h+1]-s[h]),m=i+p*y,c=a(m,e,r);return c>=f?o(t,m,e,r):0===c?m:n(t,i,i+y,e,r)}},l}();!function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r<e.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[e[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[r]+"CancelAnimationFrame"]||window[e[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,r){var s=(new Date).getTime(),i=Math.max(0,16-(s-t)),a=setTimeout(function(){e(s+i)},i);return t=s+i,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var r=_cu("span");r.style.fontFamily=e;var s=_cu("span");s.innerHTML="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(s),document.body.appendChild(r);var i=s.offsetWidth;return s.style.fontFamily=t+", "+e,{node:s,w:i,parent:r}}function e(){var t,r,s,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)if(this.fonts[t].loaded)a-=1;else if("t"===this.fonts[t].fOrigin||2===this.fonts[t].origin){if(window.Typekit&&window.Typekit.load&&0===this.typekitLoaded){this.typekitLoaded=1;try{window.Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(n){}}2===this.typekitLoaded&&(this.fonts[t].loaded=!0)}else"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(r=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,r.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(r=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,r.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<h?setTimeout(e.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function r(t,e){var r=_ct("text");r.style.fontSize="100px",r.style.fontFamily=e.fFamily,r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.className=e.fClass):r.style.fontFamily=e.fFamily,t.appendChild(r);var s=_cu("canvas").getContext("2d");return s.font="100px "+e.fFamily,s}function s(s,i){if(!s)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=s.list);var a,n=s.list,o=n.length;for(a=0;a<o;a+=1){if(n[a].loaded=!1,n[a].monoCase=t(n[a].fFamily,"monospace"),n[a].sansCase=t(n[a].fFamily,"sans-serif"),n[a].fPath){if("p"===n[a].fOrigin||3===n[a].origin){var h=_cu("style");h.type="text/css",h.innerHTML="@font-face {font-family: "+n[a].fFamily+"; font-style: normal; src: url('"+n[a].fPath+"');}",i.appendChild(h)}else if("g"===n[a].fOrigin||1===n[a].origin){var l=_cu("link");l.type="text/css",l.rel="stylesheet",l.href=n[a].fPath,i.appendChild(l)}else if("t"===n[a].fOrigin||2===n[a].origin){var p=_cu("script");p.setAttribute("src",n[a].fPath),i.appendChild(p)}}else n[a].loaded=!0;n[a].helper=r(i,n[a]),this.fonts.push(n[a])}e.bind(this)()}function i(t){if(t){this.chars||(this.chars=[]);var e,r,s,i=t.length,a=this.chars.length;for(e=0;e<i;e+=1){for(r=0,s=!1;r<a;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(s=!0),r+=1;s||(this.chars.push(t[e]),a+=1)}}}function a(t,e,r){for(var s=0,i=this.chars.length;s<i;){if(this.chars[s].ch===t&&this.chars[s].style===e&&this.chars[s].fFamily===r)return this.chars[s];s+=1}return console&&console.warn&&console.warn("Missing character from exported characters list: ",t,e,r),l}function n(t,e,r){var s=this.getFontByName(e),i=s.helper;return i.measureText(t).width*r/100}function o(t){for(var e=0,r=this.fonts.length;e<r;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var h=5e3,l={w:0,size:0,shapes:[]},p=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return p.prototype.addChars=i,p.prototype.addFonts=s,p.prototype.getCharData=a,p.prototype.getFontByName=o,p.prototype.measureText=n,p}(),_ai=function(){function t(t,e,r){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=_cs("float32",e.length));for(var a,n,o=r.lastIndex,h=o,l=this._df.length-1,p=!0;p;){if(a=this._df[h],n=this._df[h+1],h==l-1&&t>=n.t-i){a.h&&(a=n),o=0;break}if(n.t-i>t){o=h;break}h<l-1?h+=1:(o=0,p=!1)}var m,f,c,d,u,y;if(a.to){a.bezierData||bez.buildBezierData(a);var g=a.bezierData;if(t>=n.t-i||t<a.t-i){var v=t>=n.t-i?g.points.length-1:0;for(f=g.points[v].point.length,m=0;m<f;m+=1)s[m]=g.points[v].point[m];r._lastBezierData=null}else{a.__fnct?y=a.__fnct:(y=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,a.__fnct=y),c=y((t-(a.t-i))/(n.t-i-(a.t-i)));var b,E=g.segmentLength*c,P=r.lastFrame<t&&r._lastBezierData===g?r._lastAddedLength:0;for(u=r.lastFrame<t&&r._lastBezierData===g?r._lastPoint:0,p=!0,d=g.points.length;p;){if(P+=g.points[u].partialLength,0===E||0===c||u==g.points.length-1){for(f=g.points[u].point.length,m=0;m<f;m+=1)s[m]=g.points[u].point[m];break}if(E>=P&&E<P+g.points[u+1].partialLength){for(b=(E-P)/g.points[u+1].partialLength,f=g.points[u].point.length,m=0;m<f;m+=1)s[m]=g.points[u].point[m]+(g.points[u+1].point[m]-g.points[u].point[m])*b;break}u<d-1?u+=1:p=!1}r._lastPoint=u,r._lastAddedLength=P-g.points[u].partialLength,r._lastBezierData=g}}else{var x,S,C,A,k;for(l=a.s.length,h=0;h<l;h+=1){if(1!==a.h&&(t>=n.t-i?c=1:t<a.t-i?c=0:(a.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[h]?y=a.__fnct[h]:(x=a.o.x[h]||a.o.x[0],S=a.o.y[h]||a.o.y[0],C=a.i.x[h]||a.i.x[0],A=a.i.y[h]||a.i.y[0],y=BezierFactory.getBezierEasing(x,S,C,A).get,a.__fnct[h]=y)):a.__fnct?y=a.__fnct:(x=a.o.x,S=a.o.y,C=a.i.x,A=a.i.y,y=BezierFactory.getBezierEasing(x,S,C,A).get,a.__fnct=y),c=y((t-(a.t-i))/(n.t-i-(a.t-i))))),this.sh&&1!==a.h){var M=a.s[h],T=a.e[h];M-T<-180?M+=360:M-T>180&&(M-=360),k=M+(T-M)*c}else k=1===a.h?a.s[h]:a.s[h]+(a.e[h]-a.s[h])*c;1===l?s=k:s[h]=k}}return r.lastIndex=o,s}function e(t){for(var e=0;e<this.v.length;)this.pv[e]=t[e],this.v[e]=this.mult?this.pv[e]*this.mult:this.pv[e],this.lastPValue[e]!==this.pv[e]&&(this.mdf=!0,this.lastPValue[e]=this.pv[e]),e+=1}function r(t){this.pv=t,this.v=this.mult?this.pv*this.mult:this.pv,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)}function s(){if(this.elem._x.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this._df[0].t-this.offsetTime,r=this._df[this._df.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==p&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame<e&&t<e))){this._caching.lastIndex=this._caching.lastFrame<t?this._caching.lastIndex:0;var s=this.interpolateValue(t,this.pv,this._caching);this.calculateValueAtCurrentTime(s)}this._caching.lastFrame=t,this.frameId=this.elem._x.frameId}}function i(){}function a(t,e,r){this.propType="unidimensional",this.mult=r,this.v=r?e.k*r:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.getValue=i}function n(t,e,r){this.propType="multidimensional",this.mult=r,this.data=e,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1,this.v=_cs("float32",e.k.length),this.pv=_cs("float32",e.k.length),this.lastValue=_cs("float32",e.k.length);_cs("float32",e.k.length);this.vel=_cs("float32",e.k.length);var s,a=e.k.length;for(s=0;s<a;s+=1)this.v[s]=r?e.k[s]*r:e.k[s],this.pv[s]=e.k[s];this.getValue=i}function o(e,i,a){this.propType="unidimensional",this._df=i.k,this.offsetTime=e.data.st,this.lastValue=p,this.lastPValue=p,this.frameId=-1,this._caching={lastFrame:p,lastIndex:0,value:0},this.k=!0,this.kf=!0,this.data=i,this.mult=a,this.elem=e,this._ch=!1,this.comp=e.comp,this.v=a?i.k[0].s[0]*a:i.k[0].s[0],this.pv=i.k[0].s[0],this.getValue=s,this.calculateValueAtCurrentTime=r,this.interpolateValue=t}function h(r,i,a){this.propType="multidimensional";var n,o,h,l,m,f=i.k.length;for(n=0;n<f-1;n+=1)i.k[n].to&&i.k[n].s&&i.k[n].e&&(o=i.k[n].s,h=i.k[n].e,l=i.k[n].to,m=i.k[n].ti,(2===o.length&&(o[0]!==h[0]||o[1]!==h[1])&&bez.pointOnLine2D(o[0],o[1],h[0],h[1],o[0]+l[0],o[1]+l[1])&&bez.pointOnLine2D(o[0],o[1],h[0],h[1],h[0]+m[0],h[1]+m[1])||3===o.length&&(o[0]!==h[0]||o[1]!==h[1]||o[2]!==h[2])&&bez.pointOnLine3D(o[0],o[1],o[2],h[0],h[1],h[2],o[0]+l[0],o[1]+l[1],o[2]+l[2])&&bez.pointOnLine3D(o[0],o[1],o[2],h[0],h[1],h[2],h[0]+m[0],h[1]+m[1],h[2]+m[2]))&&(i.k[n].to=null,i.k[n].ti=null),o[0]===h[0]&&o[1]===h[1]&&0===l[0]&&0===l[1]&&0===m[0]&&0===m[1]&&(2===o.length||o[2]===h[2]&&0===l[2]&&0===m[2])&&(i.k[n].to=null,i.k[n].ti=null));this._df=i.k,this.offsetTime=r.data.st,this.k=!0,this.kf=!0,this._ch=!0,this.mult=a,this.elem=r,this.comp=r.comp,this.getValue=s,this.calculateValueAtCurrentTime=e,this.interpolateValue=t,this.frameId=-1;var c=i.k[0].s.length;this.v=_cs("float32",c),this.pv=_cs("float32",c),this.lastValue=_cs("float32",c),this.lastPValue=_cs("float32",c),this._caching={lastFrame:p,lastIndex:0,value:_cs("float32",c)}}function l(t,e,r,s,i){var l;if(0===e.a)l=0===r?new a(t,e,s):new n(t,e,s);else if(1===e.a)l=0===r?new o(t,e,s):new h(t,e,s);else if(e.k.length)if("number"==typeof e.k[0])l=new n(t,e,s);else switch(r){case 0:l=new o(t,e,s);break;case 1:l=new h(t,e,s)}else l=new a(t,e,s);return l.k&&i.push(l),l}var p=initialDefaultFrame,m={_bo:l};return m}(),_ag=function(){function t(t){var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function e(t){if(this.elem._x.frameId!==this.frameId){this.mdf=t;var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0);if(this.mdf){if(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented&&this.p._df&&this.p._dg){var s,i;this.p._caching.lastFrame+this.p.offsetTime<=this.p._df[0].t?(s=this.p._dg((this.p._df[0].t+.01)/this.elem._x.frameRate,0),i=this.p._dg(this.p._df[0].t/this.elem._x.frameRate,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p._df[this.p._df.length-1].t?(s=this.p._dg(this.p._df[this.p._df.length-1].t/this.elem._x.frameRate,0),i=this.p._dg((this.p._df[this.p._df.length-1].t-.01)/this.elem._x.frameRate,0)):(s=this.p.pv,i=this.p._dg((this.p._caching.lastFrame+this.p.offsetTime-.01)/this.elem._x.frameRate,this.p.offsetTime)),this.v.rotate(-Math.atan2(s[1]-i[1],s[0]-i[0]))}this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem._x.frameId}}function r(){this.inverted=!0,this.iv=new Matrix,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}function s(){}function i(t,e,r){if(this.elem=t,this.frameId=-1,this.propType="transform",this._co=[],this.mdf=!1,this.data=e,this.v=new Matrix,e.p.s?(this.px=_ai._bo(t,e.p.x,0,0,this._co),this.py=_ai._bo(t,e.p.y,0,0,this._co),e.p.z&&(this.pz=_ai._bo(t,e.p.z,0,0,this._co))):this.p=_ai._bo(t,e.p,1,0,this._co),e.r)this.r=_ai._bo(t,e.r,0,degToRads,this._co);else if(e.rx){if(this.rx=_ai._bo(t,e.rx,0,degToRads,this._co),this.ry=_ai._bo(t,e.ry,0,degToRads,this._co),this.rz=_ai._bo(t,e.rz,0,degToRads,this._co),e.or.k[0].ti){var s,i=e.or.k.length;for(s=0;s<i;s+=1)e.or.k[s].to=e.or.k[s].ti=null}this.or=_ai._bo(t,e.or,1,degToRads,this._co),this.or.sh=!0}e.sk&&(this.sk=_ai._bo(t,e.sk,0,degToRads,this._co),this.sa=_ai._bo(t,e.sa,0,degToRads,this._co)),e.a&&(this.a=_ai._bo(t,e.a,1,0,this._co)),e.s&&(this.s=_ai._bo(t,e.s,1,.01,this._co)),e.o?this.o=_ai._bo(t,e.o,0,.01,r):this.o={mdf:!1,v:1},this._co.length?r.push(this):this.getValue(!0)}function a(t,e,r){return new i(t,e,r)}return i.prototype.applyToMatrix=t,i.prototype.getValue=e,i.prototype.setInverted=r,i.prototype.autoOrient=s,{_bj:a}}();_av.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=point_pool.newElement(),this.o[r]=point_pool.newElement(),this.i[r]=point_pool.newElement(),r+=1},_av.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},_av.prototype.doubleArrayLength=function(){this.v=this.v.concat(_cv(this._maxLength)),this.i=this.i.concat(_cv(this._maxLength)),this.o=this.o.concat(_cv(this._maxLength)),this._maxLength*=2},_av.prototype._ax=function(t,e,r,s,i){var a;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o}(!a[s]||a[s]&&!i)&&(a[s]=point_pool.newElement()),a[s][0]=t,a[s][1]=e},_av.prototype._aw=function(t,e,r,s,i,a,n,o){this._ax(t,e,"v",n,o),this._ax(r,s,"o",n,o),this._ax(i,a,"i",n,o)},_av.prototype.reverse=function(){var t=new _av;t.setPathData(this.c,this._length);var e=this.v,r=this.o,s=this.i,a=0;this.c&&(t._aw(e[0][0],e[0][1],s[0][0],s[0][1],r[0][0],r[0][1],0,!1),a=1);var n=this._length-1,o=this._length;for(i=a;i<o;i+=1)t._aw(e[n][0],e[n][1],s[n][0],s[n][1],r[n][0],r[n][1],i,!1),n-=1;return t};var _ah=function(){function t(t,e,r,s){var i,a,n,o=s.lastIndex;if(t<this._df[0].t-this.offsetTime)i=this._df[0].s[0],n=!0,o=0;else if(t>=this._df[this._df.length-1].t-this.offsetTime)i=1===this._df[this._df.length-2].h?this._df[this._df.length-1].s[0]:this._df[this._df.length-2].e[0],n=!0;else{for(var h,l,p,m,f,c,d=o,u=this._df.length-1,y=!0;y&&(h=this._df[d],l=this._df[d+1],!(l.t-this.offsetTime>t));)d<u-1?d+=1:y=!1;n=1===h.h,o=d;var g;if(!n){if(t>=l.t-this.offsetTime)g=1;else if(t<h.t-this.offsetTime)g=0;else{var v;h.__fnct?v=h.__fnct:(v=BezierFactory.getBezierEasing(h.o.x,h.o.y,h.i.x,h.i.y).get,h.__fnct=v),g=v((t-(h.t-this.offsetTime))/(l.t-this.offsetTime-(h.t-this.offsetTime)))}a=h.e[0]}i=h.s[0]}m=e._length,c=i.i[0].length;var b,E=!1;s.lastIndex=o;var p,f,b,m=e._length,c=i.i[0].length,E=!1;for(p=0;p<m;p+=1)for(f=0;f<c;f+=1)b=n?i.i[p][f]:i.i[p][f]+(a.i[p][f]-i.i[p][f])*g,e.i[p][f]!==b&&(e.i[p][f]=b,r&&(this.pv.i[p][f]=b),E=!0),b=n?i.o[p][f]:i.o[p][f]+(a.o[p][f]-i.o[p][f])*g,e.o[p][f]!==b&&(e.o[p][f]=b,r&&(this.pv.o[p][f]=b),E=!0),b=n?i.v[p][f]:i.v[p][f]+(a.v[p][f]-i.v[p][f])*g,e.v[p][f]!==b&&(e.v[p][f]=b,r&&(this.pv.v[p][f]=b),E=!0);return E}function e(){if(this.elem._x.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this._df[0].t-this.offsetTime,r=this._df[this._df.length-1].t-this.offsetTime,s=this._caching.lastFrame;if(s===l||!(s<e&&t<e||s>r&&t>r)){this._caching.lastIndex=s<t?this._caching.lastIndex:0;var i=this.interpolateShape(t,this.v,!0,this._caching);this.mdf=i,i&&(this.paths=this._ak)}this._caching.lastFrame=t,this.frameId=this.elem._x.frameId}}function r(){return this.v}function s(){this.paths=this._ak,this.k||(this.mdf=!1)}function i(t,e,r){this.propType="shape",this.comp=t.comp,this.k=!1,this.mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shape_pool.clone(i),this.pv=shape_pool.clone(this.v),this._ak=shapeCollection_pool._al(),this.paths=this._ak,this.paths.addShape(this.v),this.reset=s}function a(t,e,r){this.propType="shape",this.comp=t.comp,this.elem=t,this.offsetTime=t.data.st,this._df=3===r?e.pt.k:e.ks.k,this.k=!0,this.kf=!0;var i=this._df[0].s[0].i.length;this._df[0].s[0].i[0].length;this.v=shape_pool.newElement(),this.v.setPathData(this._df[0].s[0].c,i),this.pv=shape_pool.clone(this.v),this._ak=shapeCollection_pool._al(),this.paths=this._ak,this.paths.addShape(this.v),this.lastFrame=l,this.reset=s,this._caching={lastFrame:l,lastIndex:0}}function n(t,e,r,s){var n;if(3===r||4===r){var o=3===r?e.pt:e.ks,h=o.k;n=1===o.a||h.length?new a(t,e,r):new i(t,e,r)}else 5===r?n=new f(t,e):6===r?n=new p(t,e):7===r&&(n=new m(t,e));return n.k&&s.push(n),n}function o(){return i}function h(){return a}var l=-999999;i.prototype.interpolateShape=t,i.prototype.getValue=r,a.prototype.getValue=e,a.prototype.interpolateShape=t;var p=function(){function t(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=3!==this.d,n=this.v;3!==this.d&&(n.v[0][0]=t,n.v[0][1]=e-i,n.v[1][0]=a?t+s:t-s,n.v[1][1]=e,n.v[2][0]=t,n.v[2][1]=e+i,n.v[3][0]=a?t-s:t+s,n.v[3][1]=e,n.i[0][0]=a?t-s*r:t+s*r,n.i[0][1]=e-i,n.i[1][0]=a?t+s:t-s,n.i[1][1]=e-i*r,n.i[2][0]=a?t+s*r:t-s*r,n.i[2][1]=e+i,n.i[3][0]=a?t-s:t+s,n.i[3][1]=e+i*r,n.o[0][0]=a?t+s*r:t-s*r,n.o[0][1]=e-i,n.o[1][0]=a?t+s:t-s,n.o[1][1]=e+i*r,n.o[2][0]=a?t-s*r:t+s*r,n.o[2][1]=e+i,n.o[3][0]=a?t-s:t+s,n.o[3][1]=e-i*r)}function e(t){var e,r=this._co.length;if(this.elem._x.frameId!==this.frameId){for(this.mdf=!1,this.frameId=this.elem._x.frameId,e=0;e<r;e+=1)this._co[e].getValue(t),this._co[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}}var r=roundCorner;return function(r,i){this.v=shape_pool.newElement(),this.v.setPathData(!0,4),this._ak=shapeCollection_pool._al(),this.paths=this._ak,this._ak.addShape(this.v),this.d=i.d,this._co=[],this.elem=r,this.comp=r.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=s,this.p=_ai._bo(r,i.p,1,0,this._co),this.s=_ai._bo(r,i.s,1,0,this._co),this._co.length?this.k=!0:this.convertEllToPath()}}(),m=function(){function t(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,s=this.or.v,i=this.os.v,a=2*Math.PI*s/(4*e),n=-Math.PI/2,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=s*Math.cos(n),l=s*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v._aw(h,l,h-p*a*i*o,l-m*a*i*o,h+p*a*i*o,l+m*a*i*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}function e(){var t,e,r,s,i=2*Math.floor(this.pt.v),a=2*Math.PI/i,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*i),f=2*Math.PI*h/(2*i),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<i;t+=1){e=n?o:h,r=n?l:p,s=n?m:f;var u=e*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v._aw(u,y,u-g*s*r*d,y-v*s*r*d,u+g*s*r*d,y+v*s*r*d,t,!0),n=!n,c+=a*d}}function r(){if(this.elem._x.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem._x.frameId;var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue(),this._co[t].mdf&&(this.mdf=!0);this.mdf&&this.convertToPath()}}return function(i,a){this.v=shape_pool.newElement(),this.v.setPathData(!0,0),this.elem=i,this.comp=i.comp,this.data=a,this.frameId=-1,this.d=a.d,this._co=[],this.mdf=!1,this.getValue=r,this.reset=s,1===a.sy?(this.ir=_ai._bo(i,a.ir,0,0,this._co),this.is=_ai._bo(i,a.is,0,.01,this._co),this.convertToPath=e):this.convertToPath=t,this.pt=_ai._bo(i,a.pt,0,0,this._co),this.p=_ai._bo(i,a.p,1,0,this._co),this.r=_ai._bo(i,a.r,0,degToRads,this._co),this.or=_ai._bo(i,a.or,0,0,this._co),this.os=_ai._bo(i,a.os,0,.01,this._co),this._ak=shapeCollection_pool._al(),this._ak.addShape(this.v),this.paths=this._ak,this._co.length?this.k=!0:this.convertToPath()}}(),f=function(){function t(t){if(this.elem._x.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem._x.frameId;var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(t),this._co[e].mdf&&(this.mdf=!0);this.mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,s=this.s.v[1]/2,i=bm_min(r,s,this.r.v),a=i*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v._aw(t+r,e-s+i,t+r,e-s+i,t+r,e-s+a,0,!0),this.v._aw(t+r,e+s-i,t+r,e+s-a,t+r,e+s-i,1,!0),0!==i?(this.v._aw(t+r-i,e+s,t+r-i,e+s,t+r-a,e+s,2,!0),this.v._aw(t-r+i,e+s,t-r+a,e+s,t-r+i,e+s,3,!0),this.v._aw(t-r,e+s-i,t-r,e+s-i,t-r,e+s-a,4,!0),this.v._aw(t-r,e-s+i,t-r,e-s+a,t-r,e-s+i,5,!0),this.v._aw(t-r+i,e-s,t-r+i,e-s,t-r+a,e-s,6,!0),this.v._aw(t+r-i,e-s,t+r-a,e-s,t+r-i,e-s,7,!0)):(this.v._aw(t-r,e+s,t-r+a,e+s,t-r,e+s,2),this.v._aw(t-r,e-s,t-r,e-s+a,t-r,e-s,3))):(this.v._aw(t+r,e-s+i,t+r,e-s+a,t+r,e-s+i,0,!0),0!==i?(this.v._aw(t+r-i,e-s,t+r-i,e-s,t+r-a,e-s,1,!0),this.v._aw(t-r+i,e-s,t-r+a,e-s,t-r+i,e-s,2,!0),this.v._aw(t-r,e-s+i,t-r,e-s+i,t-r,e-s+a,3,!0),this.v._aw(t-r,e+s-i,t-r,e+s-a,t-r,e+s-i,4,!0),this.v._aw(t-r+i,e+s,t-r+i,e+s,t-r+a,e+s,5,!0),
-this.v._aw(t+r-i,e+s,t+r-a,e+s,t+r-i,e+s,6,!0),this.v._aw(t+r,e+s-i,t+r,e+s-i,t+r,e+s-a,7,!0)):(this.v._aw(t-r,e-s,t-r+a,e-s,t-r,e-s,1,!0),this.v._aw(t-r,e+s,t-r,e+s-a,t-r,e+s,2,!0),this.v._aw(t+r,e+s,t+r-a,e+s,t+r,e+s,3,!0)))}return function(r,i){this.v=shape_pool.newElement(),this.v.c=!0,this._ak=shapeCollection_pool._al(),this._ak.addShape(this.v),this.paths=this._ak,this.elem=r,this.comp=r.comp,this.frameId=-1,this.d=i.d,this._co=[],this.mdf=!1,this.getValue=t,this.convertRectToPath=e,this.reset=s,this.p=_ai._bo(r,i.p,1,0,this._co),this.s=_ai._bo(r,i.s,1,0,this._co),this.r=_ai._bo(r,i.r,0,0,this._co),this._co.length?this.k=!0:this.convertRectToPath()}}(),c={};return c._bp=n,c.getConstructorFunction=o,c.getKeyframedConstructorFunction=h,c}(),_as=function(){function t(t,e){s[t]||(s[t]=e)}function e(t,e,r,i){return new s[t](e,r,i)}var r={},s={};return r.registerModifier=t,r.getModifier=e,r}();_at.prototype.initModifierProperties=function(){},_at.prototype.addShapeToModifier=function(){},_at.prototype.addShape=function(t){if(!this.closed){var e={shape:t.sh,data:t,_ak:shapeCollection_pool._al()};this.shapes.push(e),this.addShapeToModifier(e)}},_at.prototype.init=function(t,e,r){this._co=[],this.shapes=[],this.elem=t,this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.mdf=!1,this.closed=!1,this.k=!1,this._co.length?(this.k=!0,r.push(this)):this.getValue(!0)},extendPrototype([_at],_an),_an.prototype.processKeys=function(t){if(this.elem._x.frameId!==this.frameId||t){this.mdf=t,this.frameId=this.elem._x.frameId;var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0);if(this.mdf||t){var s=this.o.v%360/360;s<0&&(s+=1);var i=this.s.v+s,a=this.e.v+s;if(i>a){var n=i;i=a,a=n}this.sValue=i,this.eValue=a,this.oValue=s}}},_an.prototype.initModifierProperties=function(t,e){this.s=_ai._bo(t,e.s,0,.01,this._co),this.e=_ai._bo(t,e.e,0,.01,this._co),this.o=_ai._bo(t,e.o,0,0,this._co),this.sValue=0,this.eValue=0,this.oValue=0,this.getValue=this.processKeys,this.m=e.m},_an.prototype.addShapeToModifier=function(t){t.pathsData=[]},_an.prototype.calculateShapeEdges=function(t,e,r,s,i){var a=[];e<=1?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1)if(o=a[n],o.e*i<s||o.s*i>s+r);else{var p,m;p=o.s*i<=s?0:(o.s*i-s)/r,m=o.e*i>=s+r?1:(o.e*i-s)/r,h.push([p,m])}return h.length||h.push([0,0]),h},_an.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segments_length_pool.release(t[e]);return t.length=0,t},_an.prototype.processShapes=function(t){var e,r,s,i,a,n,o,h=this.shapes.length,l=this.sValue,p=this.eValue,m=0;if(p===l)for(r=0;r<h;r+=1)this.shapes[r]._ak.releaseShapes(),this.shapes[r].shape.mdf=!0,this.shapes[r].shape.paths=this.shapes[r]._ak;else if(1===p&&0===l||0===p&&1===l){if(this.mdf)for(r=0;r<h;r+=1)this.shapes[r].shape.mdf=!0}else{var f,c,d=[];for(r=0;r<h;r+=1)if(f=this.shapes[r],f.shape.mdf||this.mdf||t||2===this.m){if(e=f.shape.paths,i=e._length,o=0,!f.shape.mdf&&f.pathsData.length)o=f.totalShapeLength;else{for(a=this.releasePathsData(f.pathsData),s=0;s<i;s+=1)n=bez.getSegmentsLength(e.shapes[s]),a.push(n),o+=n.totalLength;f.totalShapeLength=o,f.pathsData=a}m+=o,f.shape.mdf=!0}else f.shape.paths=f._ak;var s,i,u=l,y=p,g=0;for(r=h-1;r>=0;r-=1)if(f=this.shapes[r],f.shape.mdf){if(c=f._ak,c.releaseShapes(),2===this.m&&h>1){var v=this.calculateShapeEdges(l,p,f.totalShapeLength,g,m);g+=f.totalShapeLength}else v=[[u,y]];for(i=v.length,s=0;s<i;s+=1){u=v[s][0],y=v[s][1],d.length=0,y<=1?d.push({s:f.totalShapeLength*u,e:f.totalShapeLength*y}):u>=1?d.push({s:f.totalShapeLength*(u-1),e:f.totalShapeLength*(y-1)}):(d.push({s:f.totalShapeLength*u,e:f.totalShapeLength}),d.push({s:0,e:f.totalShapeLength*(y-1)}));var b=this.addShapes(f,d[0]);if(d[0].s!==d[0].e){if(d.length>1)if(f.shape.v.c){var E=b.pop();this.addPaths(b,c),b=this.addShapes(f,d[1],E)}else this.addPaths(b,c),b=this.addShapes(f,d[1]);this.addPaths(b,c)}}f.shape.paths=c}}this._co.length||(this.mdf=!1)},_an.prototype.addPaths=function(t,e){var r,s=t.length;for(r=0;r<s;r+=1)e.addShape(t[r])},_an.prototype.addSegment=function(t,e,r,s,i,a,n){i._ax(e[0],e[1],"o",a),i._ax(r[0],r[1],"i",a+1),n&&i._ax(t[0],t[1],"v",a),i._ax(s[0],s[1],"v",a+1)},_an.prototype.addSegmentFromArray=function(t,e,r,s){e._ax(t[1],t[5],"o",r),e._ax(t[2],t[6],"i",r+1),s&&e._ax(t[0],t[4],"v",r),e._ax(t[3],t[7],"v",r+1)},_an.prototype.addShapes=function(t,e,r){var s,i,a,n,o,h,l,p,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(r?(o=r._length,p=r._length):(r=shape_pool.newElement(),o=0,p=0),u.push(r),s=0;s<c;s+=1){for(h=m[s].lengths,r.c=f[s].c,a=f[s].c?h.length:h.length+1,i=1;i<a;i+=1)if(n=h[i-1],d+n.addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[s].v[i-1],f[s].o[i-1],f[s].i[i],f[s].v[i],r,o,y),y=!1):(l=bez.getNewSegment(f[s].v[i-1],f[s].v[i],f[s].o[i-1],f[s].i[i],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[i-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[s].c){if(n=h[i-1],d<=e.e){var g=h[i-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[s].v[i-1],f[s].o[i-1],f[s].i[0],f[s].v[0],r,o,y),y=!1):(l=bez.getNewSegment(f[s].v[i-1],f[s].v[0],f[s].o[i-1],f[s].i[0],(e.s-d)/g,(e.e-d)/g,h[i-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r._ax(r.v[p][0],r.v[p][1],"i",p),r._ax(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;s<c-1&&(r=shape_pool.newElement(),y=!0,u.push(r),o=0)}return u},_as.registerModifier("tm",_an),extendPrototype([_at],_au),_au.prototype.processKeys=function(t){if(this.elem._x.frameId!==this.frameId||t){this.mdf=!!t,this.frameId=this.elem._x.frameId;var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0)}},_au.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=_ai._bo(t,e.r,0,null,this._co)},_au.prototype.processPath=function(t,e){var r=shape_pool.newElement();r.c=t.c;var s,i,a,n,o,h,l,p,m,f,c,d,u,y=t._length,g=0;for(s=0;s<y;s+=1)i=t.v[s],n=t.o[s],a=t.i[s],i[0]===n[0]&&i[1]===n[1]&&i[0]===a[0]&&i[1]===a[1]?0!==s&&s!==y-1||t.c?(o=0===s?t.v[y-1]:t.v[s-1],h=Math.sqrt(Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)),l=h?Math.min(h/2,e)/h:0,p=d=i[0]+(o[0]-i[0])*l,m=u=i[1]-(i[1]-o[1])*l,f=p-(p-i[0])*roundCorner,c=m-(m-i[1])*roundCorner,r._aw(p,m,f,c,d,u,g),g+=1,o=s===y-1?t.v[0]:t.v[s+1],h=Math.sqrt(Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)),l=h?Math.min(h/2,e)/h:0,p=f=i[0]+(o[0]-i[0])*l,m=c=i[1]+(o[1]-i[1])*l,d=p-(p-i[0])*roundCorner,u=m-(m-i[1])*roundCorner,r._aw(p,m,f,c,d,u,g),g+=1):(r._aw(i[0],i[1],n[0],n[1],a[0],a[1],g),g+=1):(r._aw(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],g),g+=1);return r},_au.prototype.processShapes=function(t){var e,r,s,i,a=this.shapes.length,n=this.rd.v;if(0!==n){var o,h,l;for(r=0;r<a;r+=1){if(o=this.shapes[r],h=o.shape.paths,l=o._ak,o.shape.mdf||this.mdf||t)for(l.releaseShapes(),o.shape.mdf=!0,e=o.shape.paths.shapes,i=o.shape.paths._length,s=0;s<i;s+=1)l.addShape(this.processPath(e[s],n));o.shape.paths=o._ak}}this._co.length||(this.mdf=!1)},_as.registerModifier("rd",_au),_aj.prototype.processKeys=function(t){if(this.elem._x.frameId!==this.frameId||t){this.mdf=!!t;var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0)}},_aj.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=_ai._bo(t,e.c,0,null,this._co),this.o=_ai._bo(t,e.o,0,null,this._co),this.tr=_ag._bj(t,e.tr,this._co),this.data=e,this._co.length||this.getValue(!0),this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},_aj.prototype.applyTransforms=function(t,e,r,s,i,a){var n=a?-1:1,o=s.s.v[0]+(1-s.s.v[0])*(1-i),h=s.s.v[1]+(1-s.s.v[1])*(1-i);t.translate(s.p.v[0]*n*i,s.p.v[1]*n*i,s.p.v[2]),e.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),e.rotate(-s.r.v*n*i),e.translate(s.a.v[0],s.a.v[1],s.a.v[2]),r.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(s.a.v[0],s.a.v[1],s.a.v[2])},_aj.prototype.init=function(t,e,r,s,i){this.elem=t,this.arr=e,this.pos=r,this.elemsData=s,this._currentCopies=0,this._bq=[],this._groups=[],this._co=[],this.frameId=-1,this.initModifierProperties(t,e[r]);for(var a=0;r>0;)r-=1,this._bq.unshift(e[r]),a+=1;this._co.length?(this.k=!0,i.push(this)):this.getValue(!0)},_aj.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},_aj.prototype.cloneElements=function(t){var e=(t.length,JSON.parse(JSON.stringify(t)));return this.resetElements(e),e},_aj.prototype.changeGroupRender=function(t,e){var r,s=t.length;for(r=0;r<s;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},_aj.prototype.processShapes=function(t){if(this.elem._x.frameId!==this.frameId&&(this.frameId=this.elem._x.frameId,this._co.length||t||(this.mdf=!1),this.mdf)){var e=Math.ceil(this.c.v);if(this._groups.length<e){for(;this._groups.length<e;){var r={it:this.cloneElements(this._bq),ty:"gr"};r.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:0,ix:6,k:0},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,r),this._groups.splice(0,0,r),this._currentCopies+=1}this.elem.reloadShapes()}var s,i,a=0;for(s=0;s<=this._groups.length-1;s+=1)i=a<e,this._groups[s]._render=i,this.changeGroupRender(this._groups[s].it,i),a+=1;this._currentCopies=e,this.elem._ch=!0;var n=this.o.v,o=n%1,h=n>0?Math.floor(n):Math.ceil(n),l=(this.tr.v.props,this.pMatrix.props),p=this.rMatrix.props,m=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var f=0;if(n>0){for(;f<h;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),f+=1;o&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,o,!1),f+=o)}else if(n<0){for(;f>h;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),f-=1;o&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-o,!0),f-=o)}s=1===this.data.m?0:this._currentCopies-1;var c=1===this.data.m?1:-1;for(a=this._currentCopies;a;){if(0!==f){(0!==s&&1===c||s!==this._currentCopies-1&&c===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),this.matrix.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15]);var d,u=this.elemsData[s].it,y=u[u.length-1].transform.mProps.v.props,g=y.length;for(d=0;d<g;d+=1)y[d]=this.matrix.props[d];this.matrix.reset()}else{this.matrix.reset();var d,u=this.elemsData[s].it,y=u[u.length-1].transform.mProps.v.props,g=y.length;for(d=0;d<g;d+=1)y[d]=this.matrix.props[d]}f+=1,a-=1,s+=c}}},_aj.prototype.addShape=function(){},_as.registerModifier("rp",_aj),_am.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(_cv(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},_am.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shape_pool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if(this.elem._x.frameId!==this.frameId||t){var e=0,r=this.dataProps.length;for(this.mdf=!1,this.frameId=this.elem._x.frameId;e<r;){if(this.dataProps[e].p.mdf){this.mdf=!t;break}e+=1}if(this.mdf||t)for("svg"===this.renderer&&(this.dashStr=""),e=0;e<r;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},GradientProperty.prototype.comparePoints=function(t,e){for(var r,s=0,i=this.o.length/2;s<i;){if(r=Math.abs(t[4*s]-t[4*e+2*s]),r>.01)return!1;s+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this.cmdf=!1,this.omdf=!1,this.prop.mdf||t){var e,r,s,i=4*this.data.p;for(e=0;e<i;e+=1)r=e%4===0?100:255,s=Math.round(this.prop.v[e]*r),this.c[e]!==s&&(this.c[e]=s,this.cmdf=!t);if(this.o.length)for(i=this.prop.v.length,e=4*this.data.p;e<i;e+=1)r=e%2===0?100:1,s=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==s&&(this.o[e-4*this.data.p]=s,this.omdf=!t)}};var ImagePreloader=function(){function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(t){var e="";if(this.assetsPath){var r=t.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e}function r(e){var r=_cu("img");r.addEventListener("load",t.bind(this),!1),r.addEventListener("error",t.bind(this),!1),r.src=e}function s(t,s){this.imagesLoadedCb=s,this.totalAssets=t.length;var i;for(i=0;i<this.totalAssets;i+=1)t[i].layers||(r.bind(this)(e.bind(this)(t[i])),this.totalImages+=1)}function i(t){this.path=t||""}function a(t){this.assetsPath=t||""}function n(){this.imagesLoadedCb=null}return function(){this.loadAssets=s,this.setAssetsPath=a,this.setPath=i,this.destroy=n,this.assetsPath="",this.path="",this.totalAssets=0,this.totalImages=0,this.loadedAssets=0,this.imagesLoadedCb=null}}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),filtersFactory=function(){function t(t){var e=_ct("filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e}function e(){var t=_ct("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t}var r={};return r.createFilter=t,r.createAlphaToLuminanceFilter=e,r}();_bl.prototype.searchProperties=function(t){var e,r,s=this._textData.a.length,i=_ai._bo;for(e=0;e<s;e+=1)r=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,r,this.__co);this._textData.p&&"m"in this._textData.p?(this._pathData={f:i(this._elem,this._textData.p.f,0,0,this.__co),l:i(this._elem,this._textData.p.l,0,0,this.__co),r:this._textData.p.r,m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this.__co),this.__co.length&&t.push(this)},_bl.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this.mdf||this._ch||e||this._hasMaskedPath&&this._pathData.m.mdf){this._ch=!1;var r,s,i,a,n=this._moreOptions.alignment.v,o=this._animatorsData,h=this._textData,l=this.mHelper,p=this._renderType,m=this._bt.length,f=(this.data,t.l);if(this._hasMaskedPath){var c=this._pathData.m;if(!this._pathData.n||this._pathData.mdf){var d=c.v;this._pathData.r&&(d=d.reverse());var u={tLength:0,segments:[]};a=d._length-1;var y,g=0;for(i=0;i<a;i+=1)y={s:d.v[i],e:d.v[i+1],to:[d.o[i][0]-d.v[i][0],d.o[i][1]-d.v[i][1]],ti:[d.i[i+1][0]-d.v[i+1][0],d.i[i+1][1]-d.v[i+1][1]]},bez.buildBezierData(y),u.tLength+=y.bezierData.segmentLength,u.segments.push(y),g+=y.bezierData.segmentLength;i=a,c.v.c&&(y={s:d.v[i],e:d.v[0],to:[d.o[i][0]-d.v[i][0],d.o[i][1]-d.v[i][1]],ti:[d.i[0][0]-d.v[0][0],d.i[0][1]-d.v[0][1]]},bez.buildBezierData(y),u.tLength+=y.bezierData.segmentLength,u.segments.push(y),g+=y.bezierData.segmentLength),this._pathData.pi=u}var v,b,E,u=this._pathData.pi,P=this._pathData.f.v,x=0,S=1,C=0,A=!0,k=u.segments;if(P<0&&c.v.c)for(u.tLength<Math.abs(P)&&(P=-Math.abs(P)%u.tLength),x=k.length-1,E=k[x].bezierData.points,S=E.length-1;P<0;)P+=E[S].partialLength,S-=1,S<0&&(x-=1,E=k[x].bezierData.points,S=E.length-1);E=k[x].bezierData.points,b=E[S-1],v=E[S];var M,T,D=v.partialLength}a=f.length,r=0,s=0;var w,F,_,I,V,R=1.2*t.s*.714,B=!0;I=o.length;var L,G,N,z,O,H,j,W,q,Y,X,K,J,Z=-1,U=P,Q=x,$=S,tt=-1,et=0,rt="",st=this.defaultPropsArray;for(i=0;i<a;i+=1){if(l.reset(),O=1,f[i].n)r=0,s+=t.yOffset,s+=B?1:0,P=U,B=!1,et=0,this._hasMaskedPath&&(x=Q,S=$,E=k[x].bezierData.points,b=E[S-1],v=E[S],D=v.partialLength,C=0),J=Y=K=rt="",st=this.defaultPropsArray;else{if(this._hasMaskedPath){if(tt!==f[i].line){switch(t.j){case 1:P+=g-t.lineWidths[f[i].line];break;case 2:P+=(g-t.lineWidths[f[i].line])/2}tt=f[i].line}Z!==f[i].ind&&(f[Z]&&(P+=f[Z].extra),P+=f[i].an/2,Z=f[i].ind),P+=n[0]*f[i].an/200;var it=0;for(_=0;_<I;_+=1)w=o[_].a,w.p.propType&&(F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),it+=L.length?w.p.v[0]*L[0]:w.p.v[0]*L),w.a.propType&&(F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),it+=L.length?w.a.v[0]*L[0]:w.a.v[0]*L);for(A=!0;A;)C+D>=P+it||!E?(M=(P+it-C)/v.partialLength,N=b.point[0]+(v.point[0]-b.point[0])*M,z=b.point[1]+(v.point[1]-b.point[1])*M,l.translate(-n[0]*f[i].an/200,-(n[1]*R/100)),A=!1):E&&(C+=v.partialLength,S+=1,S>=E.length&&(S=0,x+=1,k[x]?E=k[x].bezierData.points:c.v.c?(S=0,x=0,E=k[x].bezierData.points):(C-=v.partialLength,E=null)),E&&(b=v,v=E[S],D=v.partialLength));G=f[i].an/2-f[i].add,l.translate(-G,0,0)}else G=f[i].an/2-f[i].add,l.translate(-G,0,0),l.translate(-n[0]*f[i].an/200,-n[1]*R/100,0);for(et+=f[i].l/2,_=0;_<I;_+=1)w=o[_].a,w.t.propType&&(F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),this._hasMaskedPath?P+=L.length?w.t*L[0]:w.t*L:r+=L.length?w.t.v*L[0]:w.t.v*L);for(et+=f[i].l/2,t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(H=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),_=0;_<I;_+=1)w=o[_].a,w.a.propType&&(F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),L.length?l.translate(-w.a.v[0]*L[0],-w.a.v[1]*L[1],w.a.v[2]*L[2]):l.translate(-w.a.v[0]*L,-w.a.v[1]*L,w.a.v[2]*L));for(_=0;_<I;_+=1)w=o[_].a,w.s.propType&&(F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),L.length?l.scale(1+(w.s.v[0]-1)*L[0],1+(w.s.v[1]-1)*L[1],1):l.scale(1+(w.s.v[0]-1)*L,1+(w.s.v[1]-1)*L,1));for(_=0;_<I;_+=1){if(w=o[_].a,F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),w.sk.propType&&(L.length?l.skewFromAxis(-w.sk.v*L[0],w.sa.v*L[1]):l.skewFromAxis(-w.sk.v*L,w.sa.v*L)),w.r.propType&&(L.length?l.rotateZ(-w.r.v*L[2]):l.rotateZ(-w.r.v*L)),w.ry.propType&&(L.length?l.rotateY(w.ry.v*L[1]):l.rotateY(w.ry.v*L)),w.rx.propType&&(L.length?l.rotateX(w.rx.v*L[0]):l.rotateX(w.rx.v*L)),w.o.propType&&(O+=L.length?(w.o.v*L[0]-O)*L[0]:(w.o.v*L-O)*L),t.strokeWidthAnim&&w.sw.propType&&(j+=L.length?w.sw.v*L[0]:w.sw.v*L),t.strokeColorAnim&&w.sc.propType)for(q=0;q<3;q+=1)L.length?H[q]=H[q]+(w.sc.v[q]-H[q])*L[0]:H[q]=H[q]+(w.sc.v[q]-H[q])*L;if(t.fillColorAnim&&t.fc){if(w.fc.propType)for(q=0;q<3;q+=1)L.length?W[q]=W[q]+(w.fc.v[q]-W[q])*L[0]:W[q]=W[q]+(w.fc.v[q]-W[q])*L;w.fh.propType&&(W=L.length?addHueToRGB(W,w.fh.v*L[0]):addHueToRGB(W,w.fh.v*L)),w.fs.propType&&(W=L.length?addSaturationToRGB(W,w.fs.v*L[0]):addSaturationToRGB(W,w.fs.v*L)),w.fb.propType&&(W=L.length?addBrightnessToRGB(W,w.fb.v*L[0]):addBrightnessToRGB(W,w.fb.v*L))}}for(_=0;_<I;_+=1)w=o[_].a,w.p.propType&&(F=o[_].s,L=F.getMult(f[i].anIndexes[_],h.a[_].s.totalChars),this._hasMaskedPath?L.length?l.translate(0,w.p.v[1]*L[0],-w.p.v[2]*L[1]):l.translate(0,w.p.v[1]*L,-w.p.v[2]*L):L.length?l.translate(w.p.v[0]*L[0],w.p.v[1]*L[1],-w.p.v[2]*L[2]):l.translate(w.p.v[0]*L,w.p.v[1]*L,-w.p.v[2]*L));if(t.strokeWidthAnim&&(Y=j<0?0:j),t.strokeColorAnim&&(X="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),t.fillColorAnim&&t.fc&&(K="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(l.translate(0,-t.ls),l.translate(0,n[1]*R/100+s,0),h.p.p){T=(v.point[1]-b.point[1])/(v.point[0]-b.point[0]);var at=180*Math.atan(T)/Math.PI;v.point[0]<b.point[0]&&(at+=180),l.rotate(-at*Math.PI/180)}l.translate(N,z,0),P-=n[0]*f[i].an/200,f[i+1]&&Z!==f[i+1].ind&&(P+=f[i].an/2,P+=t.tr/1e3*t.s)}else{switch(l.translate(r,s,0),t.ps&&l.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:l.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[f[i].line]),0,0);break;case 2:l.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[f[i].line])/2,0,0)}l.translate(0,-t.ls),l.translate(G,0,0),l.translate(n[0]*f[i].an/200,n[1]*R/100,0),r+=f[i].l+t.tr/1e3*t.s}"html"===p?rt=l.toCSS():"svg"===p?rt=l.to2dCSS():st=[l.props[0],l.props[1],l.props[2],l.props[3],l.props[4],l.props[5],l.props[6],l.props[7],l.props[8],l.props[9],l.props[10],l.props[11],l.props[12],l.props[13],l.props[14],l.props[15]],J=O}m<=i?(V=new LetterProps(J,Y,X,K,rt,st),this._bt.push(V),m+=1,this.lettersChangedFlag=!0):(V=this._bt[i],this.lettersChangedFlag=V.update(J,Y,X,K,rt,st)||this.lettersChangedFlag)}}},_bl.prototype.getValue=function(){if(this._elem._x.frameId!==this._frameId){this._frameId=this._elem._x.frameId;var t,e=this.__co.length;for(this.mdf=!1,t=0;t<e;t+=1)this.__co[t].getValue(),this.mdf=this.__co[t].mdf||this.mdf}},_bl.prototype.mHelper=new Matrix,_bl.prototype.defaultPropsArray=[],LetterProps.prototype.update=function(t,e,r,s,i,a){this.mdf.o=!1,this.mdf.sw=!1,this.mdf.sc=!1,this.mdf.fc=!1,this.mdf.m=!1,this.mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this.mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this.mdf.sw=!0,n=!0),this.sc!==r&&(this.sc=r,this.mdf.sc=!0,n=!0),this.fc!==s&&(this.fc=s,this.mdf.fc=!0,n=!0),this.m!==i&&(this.m=i,this.mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this.mdf.p=!0,n=!0),n},_ar.prototype.setCurrentData=function(t){var e=this.currentData;e.ascent=t.ascent,e.boxWidth=t.boxWidth?t.boxWidth:e.boxWidth,e.f=t.f,e.fStyle=t.fStyle,e.fWeight=t.fWeight,e.fc=t.fc,e.j=t.j,e.justifyOffset=t.justifyOffset,e.l=t.l,e.lh=t.lh,e.lineWidths=t.lineWidths,e.ls=t.ls,e.of=t.of,e.s=t.s,e.sc=t.sc,e.sw=t.sw,e.sz=t.sz,e.ps=t.ps,e.t=t.t,e.tr=t.tr,e.fillColorAnim=t.fillColorAnim||e.fillColorAnim,e.strokeColorAnim=t.strokeColorAnim||e.strokeColorAnim,e.strokeWidthAnim=t.strokeWidthAnim||e.strokeWidthAnim,e.yOffset=t.yOffset,e.__complete=!1},_ar.prototype.searchProperty=function(){return this.kf=this.data.d.k.length>1,this.kf},_ar.prototype.getValue=function(){this.mdf=!1;var t=this.elem._x.frameId;if(t!==this._frameId&&this.kf||this._ch){for(var e,r=this.data.d.k,s=0,i=r.length;s<=i-1&&(e=r[s].s,!(s===i-1||r[s+1].t>t));)s+=1;this.keysIndex!==s&&(e.__complete||this.completeTextData(e),this.setCurrentData(e),this.mdf=!this._ch,this.pv=this.v=this.currentData.t,this.keysIndex=s),this._frameId=t}},_ar.prototype.completeTextData=function(t){t.__complete=!0;var e,r,s,i,a,n,o,h=this.elem._x._cr,l=this.data,p=[],m=0,f=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),E=0,P=b.fStyle.split(" "),x="normal",S="normal";r=P.length;var C;for(e=0;e<r;e+=1)switch(C=P[e].toLowerCase()){case"italic":S="italic";break;case"bold":x="700";break;case"black":x="900";break;case"medium":x="500";break;case"regular":case"normal":x="400";case"light":case"thin":x="200"}t.fWeight=x,t.fStyle=S,r=t.t.length;var A=t.tr/1e3*t.s;if(t.sz){var k=t.sz[0],M=-1;for(e=0;e<r;e+=1)s=!1," "===t.t.charAt(e)?M=e:13===t.t.charCodeAt(e)&&(g=0,s=!0),h.chars?(o=h.getCharData(t.t.charAt(e),b.fStyle,b.fFamily),E=s?0:o.w*t.s/100):E=h.measureText(t.t.charAt(e),t.f,t.s),g+E>k&&" "!==t.t.charAt(e)?(M===-1?r+=1:e=M,t.t=t.t.substr(0,e)+"\r"+t.t.substr(e===M?e+1:e),M=-1,g=0):(g+=E,g+=A);r=t.t.length}g=-A,E=0;var T,D=0;for(e=0;e<r;e+=1)if(s=!1,T=t.t.charAt(e)," "===T?i="\xa0":13===T.charCodeAt(0)?(D=0,y.push(g),v=g>v?g:v,g=-2*A,i="",s=!0,u+=1):i=t.t.charAt(e),h.chars?(o=h.getCharData(T,b.fStyle,h.getFontByName(t.f).fFamily),E=s?0:o.w*t.s/100):E=h.measureText(i,t.f,t.s)," "===T?D+=E+A:(g+=E+A+D,D=0),p.push({l:E,an:E,add:c,n:s,anIndexes:[],val:i,line:u}),2==f){if(c+=E,""==i||"\xa0"==i||e==r-1){for(""!=i&&"\xa0"!=i||(c-=E);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=E,d+=1;m+=1,c=0}}else if(3==f){if(c+=E,""==i||e==r-1){for(""==i&&(c-=E);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=E,d+=1;c=0,m+=1}}else p[m].ind=m,p[m].extra=0,m+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,F,_=l.a;n=_.length;var I,V,R=[];for(a=0;a<n;a+=1){for(w=_[a],w.a.sc&&(t.strokeColorAnim=!0),w.a.sw&&(t.strokeWidthAnim=!0),(w.a.fc||w.a.fh||w.a.fs||w.a.fb)&&(t.fillColorAnim=!0),V=0,I=w.s.b,e=0;e<r;e+=1)F=p[e],F.anIndexes[a]=V,(1==I&&""!=F.val||2==I&&""!=F.val&&"\xa0"!=F.val||3==I&&(F.n||"\xa0"==F.val||e==r-1)||4==I&&(F.n||e==r-1))&&(1===w.s.rn&&R.push(V),V+=1);l.a[a].s.totalChars=V;var B,L=-1;if(1===w.s.rn)for(e=0;e<r;e+=1)F=p[e],L!=F.anIndexes[a]&&(L=F.anIndexes[a],B=R.splice(Math.floor(Math.random()*R.length),1)[0]),F.anIndexes[a]=B}t.yOffset=t.lh||1.2*t.s,t.ls=t.ls||0,t.ascent=b.ascent*t.s/100},_ar.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var r=this.data.d.k[e].s;r.__complete=!1,r.t=t.t,this.keysIndex=-1,this._ch=!0,this.getValue()};var TextSelectorProp=function(){function t(t){if(this.mdf=t||!1,this._co.length){var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0)}var s=this.elem.textProperty.currentData?this.elem.textProperty.currentData.l.length:0;t&&2===this.data.r&&(this.e.v=s);var i=2===this.data.r?1:100/s,a=this.o.v/i,n=this.s.v/i+a,o=this.e.v/i+a;if(n>o){var h=n;n=o,o=h}this.finalS=n,this.finalE=o}function e(t){var e=BezierFactory.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,r=0,s=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=o===s?t>=o?1:0:i(0,a(.5/(o-s)+(t-s)/(o-s),1)),r=e(r);else if(3==h)r=o===s?t>=o?0:1:1-i(0,a(.5/(o-s)+(t-s)/(o-s),1)),r=e(r);else if(4==h)o===s?r=0:(r=i(0,a(.5/(o-s)+(t-s)/(o-s),1)),r<.5?r*=2:r=1-2*(r-.5)),r=e(r);else if(5==h){if(o===s)r=0;else{var l=o-s;t=a(i(0,t+.5-s),o-s);var p=-l/2+t,m=l/2;r=Math.sqrt(1-p*p/(m*m))}r=e(r)}else 6==h?(o===s?r=0:(t=a(i(0,t+.5-s),o-s),r=(1+Math.cos(Math.PI+2*Math.PI*t/(o-s)))/2),r=e(r)):(t>=n(s)&&(r=t-s<0?1-(s-t):i(0,a(o-t,1))),r=e(r));return r*this.a.v}function r(r,s,i){this.mdf=!1,this.k=!1,this.data=s,this._co=[],this.getValue=t,this.getMult=e,this.elem=r,this.comp=r.comp,this.finalS=0,this.finalE=0,this.s=_ai._bo(r,s.s||{k:0},0,0,this._co),"e"in s?this.e=_ai._bo(r,s.e,0,0,this._co):this.e={v:100},this.o=_ai._bo(r,s.o||{k:0},0,0,this._co),this.xe=_ai._bo(r,s.xe||{k:0},0,0,this._co),this.ne=_ai._bo(r,s.ne||{k:0},0,0,this._co),this.a=_ai._bo(r,s.a,0,.01,this._co),this._co.length?i.push(this):this.getValue()}function s(t,e,s){return new r(t,e,s)}var i=Math.max,a=Math.min,n=Math.floor;return{getTextSelectorProp:s}}(),pool_factory=function(){return function(t,e,r,s){function i(){var t;return n?(n-=1,t=h[n]):t=e(),t}function a(t){n===o&&(h=pooling["double"](h),o=2*o),r&&r(t),h[n]=t,n+=1}var n=0,o=t,h=_cv(o),l={newElement:i,release:a};return l}}(),pooling=function(){function t(t){return t.concat(_cv(t.length))}return{"double":t}}(),point_pool=function(){function t(){return _cs("float32",2)}return pool_factory(8,t)}(),shape_pool=function(){function t(){return new _av}function e(t){var e,r=t._length;for(e=0;e<r;e+=1)point_pool.release(t.v[e]),point_pool.release(t.i[e]),point_pool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}function r(t){var e,r=s.newElement(),i=void 0===t._length?t.v.length:t._length;r.setLength(i),r.c=t.c;for(e=0;e<i;e+=1)r._aw(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r}var s=pool_factory(4,t,e);return s.clone=r,s}(),shapeCollection_pool=function(){function t(){var t;return s?(s-=1,t=a[s]):t=new _am,t}function e(t){var e,r=t._length;for(e=0;e<r;e+=1)shape_pool.release(t.shapes[e]);t._length=0,s===i&&(a=pooling["double"](a),i=2*i),a[s]=t,s+=1}var r={_al:t,release:e},s=0,i=4,a=_cv(i);return r}(),segments_length_pool=function(){function t(){return{lengths:[],totalLength:0}}function e(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezier_length_pool.release(t.lengths[e]);t.lengths.length=0}return pool_factory(8,t,e)}(),bezier_length_pool=function(){function t(){return{addedLength:0,percents:_cs("float32",defaultCurveSegments),lengths:_cs("float32",defaultCurveSegments)}}return pool_factory(8,t)}();_l.prototype.checkLayers=function(t){var e,r,s=this.layers.length;for(this._db=!0,e=s-1;e>=0;e--)this._br[e]||(r=this.layers[e],r.ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e)),this._db=!!this._br[e]&&this._db;this.checkPendingElements()},_l.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t);case 99:return null}return this.createBase(t)},_l.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},_l.prototype.buildAllItems=function(){
-var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},_l.prototype.includeLayers=function(t){this._db=!1;var e,r,s=t.length,i=this.layers.length;for(e=0;e<s;e+=1)for(r=0;r<i;){if(this.layers[r].id==t[e].id){this.layers[r]=t[e];break}r+=1}},_l.prototype.setProjectInterface=function(t){this._x.projectInterface=t},_l.prototype.initItems=function(){this._x.progressiveLoad||this.buildAllItems()},_l.prototype.buildElementParenting=function(t,e,r){for(var s=this._br,i=this.layers,a=0,n=i.length;a<n;)i[a].ind==e&&(s[a]&&s[a]!==!0?void 0!==i[a].parent?(r.push(s[a]),s[a]._isParent=!0,this.buildElementParenting(t,i[a].parent,r)):(r.push(s[a]),s[a]._isParent=!0,t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},_l.prototype.addPendingElement=function(t){this._dc.push(t)},extendPrototype([_l],_ao),_ao.prototype.createBase=function(t){return new _d(t,this._x,this)},_ao.prototype.createNull=function(t){return new _i(t,this._x,this)},_ao.prototype.createShape=function(t){return new SVGShapeElement(t,this._x,this)},_ao.prototype.createText=function(t){return new _cw(t,this._x,this)},_ao.prototype.createImage=function(t){return new _h(t,this._x,this)},_ao.prototype.createComp=function(t){return new SVGCompElement(t,this._x,this)},_ao.prototype.createSolid=function(t){return new _j(t,this._x,this)},_ao.prototype.configAnimation=function(t){this._cf.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this._cf.setAttribute("viewBox",this.renderConfig.viewBoxSize):this._cf.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this._cf.setAttribute("width",t.w),this._cf.setAttribute("height",t.h),this._cf.style.width="100%",this._cf.style.height="100%"),this.renderConfig.className&&this._cf.setAttribute("class",this.renderConfig.className),this._cf.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this._cq.wrapper.appendChild(this._cf);var e=this._x.defs;this._x.getAssetData=this._cq.getAssetData.bind(this._cq),this._x.getAssetsPath=this._cq.getAssetsPath.bind(this._cq),this._x.progressiveLoad=this.renderConfig.progressiveLoad,this._x.nm=t.nm,this._x._de.w=t.w,this._x._de.h=t.h,this._x.frameRate=t.fr,this.data=t;var r=_ct("clipPath"),s=_ct("rect");s.setAttribute("width",t.w),s.setAttribute("height",t.h),s.setAttribute("x",0),s.setAttribute("y",0);var i="animationMask_"+randomString(10);r.setAttribute("id",i),r.appendChild(s),this._bx.setAttribute("clip-path","url("+locationHref+"#"+i+")"),e.appendChild(r),this.layers=t.layers,this._x._cr.addChars(t.chars),this._x._cr.addFonts(t.fonts,e),this._br=_cv(t.layers.length)},_ao.prototype.destroy=function(){this._cq.wrapper.innerHTML="",this._bx=null,this._x.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this._br[t]&&this._br[t].destroy();this._br.length=0,this.destroyed=!0,this._cq=null},_ao.prototype.updateContainerSize=function(){},_ao.prototype.buildItem=function(t){var e=this._br;if(!e[t]&&99!=this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this._x.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this._br[t-1]&&this._br[t-1]!==!0?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},_ao.prototype.checkPendingElements=function(){for(;this._dc.length;){var t=this._dc.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this._br.length;e<r;){if(this._br[e]===t){t.setMatte(this._br[e-1].layerId);break}e+=1}}},_ao.prototype._ba=function(t){if(this.renderedFrame!==t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this._x.frameNum=t,this._x.frameId+=1,this._x.projectInterface.currentFrame=t;var e,r=this.layers.length;for(this._db||this.checkLayers(t),e=r-1;e>=0;e--)(this._db||this._br[e])&&this._br[e]._az(t-this.layers[e].st);for(e=0;e<r;e+=1)(this._db||this._br[e])&&this._br[e]._ba()}},_ao.prototype.appendElementInPos=function(t,e){var r=t.get_e();if(r){for(var s,i=0;i<e;)this._br[i]&&this._br[i]!==!0&&this._br[i].get_e()&&(s=this._br[i].get_e()),i+=1;s?this._bx.insertBefore(r,s):this._bx.appendChild(r)}},_ao.prototype.hide=function(){this._bx.style.display="none"},_ao.prototype.show=function(){this._bx.style.display="block"},_ao.prototype.searchExtraCompositions=function(t){var e,r=t.length,s=_ct("g");for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e],s,this._x.comp,null);i.initExpressions(),this._x.projectInterface.registerComposition(i)}},_ay.prototype.getMaskProperty=function(t){return this.viewData[t].prop},_ay.prototype._az=function(){var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue()},_ay.prototype._ba=function(t){var e,r=this.masksProperties.length;for(e=0;e<r;e++)if((this.viewData[e].prop.mdf||this._ch)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op.mdf||this._ch)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp.mdf||this._ch)&&(this.viewData[e].invRect.setAttribute("x",-t.props[12]),this.viewData[e].invRect.setAttribute("y",-t.props[13])),this.storedData[e].x&&(this.storedData[e].x.mdf||this._ch))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}this._ch=!1},_ay.prototype.getMaskelement=function(){return this.maskElement},_ay.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this._x._de.w,t+=" v"+this._x._de.h,t+=" h-"+this._x._de.w,t+=" v-"+this._x._de.h+" "},_ay.prototype.drawPath=function(t,e,r){var s,i,a=" M"+e.v[0][0]+","+e.v[0][1];for(i=e._length,s=1;s<i;s+=1)a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[s][0]+","+e.i[s][1]+" "+e.v[s][0]+","+e.v[s][1];if(e.c&&i>1&&(a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},_ay.prototype.destroy=function(){this.element=null,this._x=null,this.maskElement=null,this.data=null,this.masksProperties=null},_ad.prototype.initHierarchy=function(){this._dd=[],this._isParent=!1,this.checkParenting()},_ad.prototype.resetHierarchy=function(){this._dd.length=0},_ad.prototype.getHierarchy=function(){return this._dd},_ad.prototype.setHierarchy=function(t){this._dd=t},_ad.prototype.checkParenting=function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])},_ad.prototype.prepareHierarchy=function(){},_ac.prototype.initFrame=function(){this._ch=!1,this._co=[]},_ac.prototype.prepareProperties=function(t,e){var r,s=this._co.length;for(r=0;r<s;r+=1)(e||this._isParent&&"transform"===this._co[r].propType)&&(this._co[r].getValue(this._ch),this._co[r].mdf&&(this._x.mdf=!0))},_af.prototype.initTransform=function(){this.finalTransform={mProp:this.data.ks?_ag._bj(this,this.data.ks,this._co):{o:0},matMdf:!1,opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),11!==this.data.ty},_af.prototype.renderTransform=function(){if(this.finalTransform.opMdf=this.finalTransform.mProp.o.mdf||this._ch,this.finalTransform.matMdf=this.finalTransform.mProp.mdf||this._ch,this._dd){var t,e=this.finalTransform.mat,r=0,s=this._dd.length;if(!this.finalTransform.matMdf)for(;r<s;){if(this._dd[r].finalTransform.mProp.mdf){this.finalTransform.matMdf=!0;break}r+=1}if(this.finalTransform.matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<s;r+=1)t=this._dd[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},_af.prototype.globalToLocal=function(t){var e=[];e.push(this.finalTransform);for(var r=!0,s=this.comp;r;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):r=!1;var i,a,n=e.length;for(i=0;i<n;i+=1)a=e[i].mat._cn(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},_af.prototype.mHelper=new Matrix,_ae.prototype.initRenderable=function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1},_ae.prototype.prepareRenderableFrame=function(t){this.checkLayerLimits(t),this.prepareMasks(t),this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this._x.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},_ae.prototype.checkLayerLimits=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this._x.mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this._x.mdf=!0,this.isInRange=!1,this.hide())},_ae.prototype.prepareMasks=function(){this.isInRange&&this.maskManager._az()},_ae.prototype.renderRenderable=function(){this.maskManager._ba(this.finalTransform.mat),this.effectsManager._ba(this._ch)},_ae.prototype.sourceRectAtTime=function(){return{top:0,left:0,width:100,height:100}},_ae.prototype.getLayerSize=function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}},extendPrototype([_ae],_ci),_ci.prototype._cz=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.hide()},_ci.prototype.hide=function(){this.hidden||this.isInRange&&!this.isTransparent||(this._bx.style.display="none",this.hidden=!0)},_ci.prototype.show=function(){this.isInRange&&!this.isTransparent&&(this.data.hd||(this._bx.style.display="block"),this.hidden=!1,this._ch=!0,this.maskManager._ch=!0)},_ci.prototype._ba=function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._ch&&(this._ch=!1))},_ci.prototype.renderInnerContent=function(){},_ci.prototype.destroy=function(){this._cc=null,this.destroy_e()},_ci.prototype._az=function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},SVGStyleData.prototype.reset=function(){this.d="",this.mdf=!1},_ck.prototype.initGradientData=function(t,e,r,s){this.o=_ai._bo(t,e.o,0,.01,r),this.s=_ai._bo(t,e.s,1,null,r),this.e=_ai._bo(t,e.e,1,null,r),this.h=_ai._bo(t,e.h||{k:0},0,.01,r),this.a=_ai._bo(t,e.a||{k:0},0,degToRads,r),this.g=new GradientProperty(t,e.g,r),this.style=s,this.stops=[],this.setGradientData(s.pElem,e),this.setGradientOpacity(e,s)},_ck.prototype.setGradientData=function(t,e){var r="gr_"+randomString(10),s=_ct(1===e.t?"linearGradient":"radialGradient");s.setAttribute("id",r),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse");var i,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)i=_ct("stop"),s.appendChild(i),o.push(i);t.setAttribute("gf"===e.ty?"fill":"stroke","url(#"+r+")"),this.gf=s,this.cst=o},_ck.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,s,i,a=_ct("mask"),n=_ct("path");a.appendChild(n);var o="op_"+randomString(10),h="mk_"+randomString(10);a.setAttribute("id",h);var l=_ct(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),i=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(s=4*t.g.p;s<i;s+=2)r=_ct("stop"),r.setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(r),p.push(r);n.setAttribute("gf"===t.ty?"fill":"stroke","url(#"+o+")"),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},_cj.prototype.initGradientData=_ck.prototype.initGradientData,_cj.prototype.setGradientData=_ck.prototype.setGradientData,_cj.prototype.setGradientOpacity=_ck.prototype.setGradientOpacity,_e.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},_e.prototype.initExpressions=function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},_e.prototype.blendModeEnums={1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},_e.prototype.getBlendMode=function(){return this.blendModeEnums[this.data.bm]||""},_e.prototype.setBlendMode=function(){var t=this.getBlendMode(),e=this._by||this._bx;e.style["mix-blend-mode"]=t},_e.prototype.initBaseData=function(t,e,r){this._x=e,this.comp=r,this.data=t,this.layerId="ly_"+randomString(10),this.data.sr||(this.data.sr=1),this.effects=new EffectsManager(this.data,this,this._co)},_e.prototype.getType=function(){return this.type},_i.prototype._az=function(t){this.prepareProperties(t,!0)},_i.prototype._ba=function(){},_i.prototype.get_e=function(){return null},_i.prototype.destroy=function(){},_i.prototype.sourceRectAtTime=function(){},_i.prototype.hide=function(){},extendPrototype([_e,_af,_ad,_ac],_i),_d.prototype.initRendererElement=function(){this._bx=_ct("g")},_d.prototype.createContainerElements=function(){this.matteElement=_ct("g"),this._bz=this._bx,this._ca=this._bx,this._sizeChanged=!1;var t=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var e=_ct("mask");if(e.setAttribute("id",this.layerId),e.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),e.appendChild(this._bx),t=e,this._x.defs.appendChild(e),!featureSupport.maskType&&1==this.data.td){e.setAttribute("mask-type","luminance");var r=randomString(10),s=filtersFactory.createFilter(r);this._x.defs.appendChild(s),s.appendChild(filtersFactory.createAlphaToLuminanceFilter());var i=_ct("g");i.appendChild(this._bx),t=i,e.appendChild(i),i.setAttribute("filter","url("+locationHref+"#"+r+")")}}else if(2==this.data.td){var a=_ct("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=_ct("g");a.appendChild(n);var r=randomString(10),s=filtersFactory.createFilter(r),o=_ct("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1"),s.appendChild(o),this._x.defs.appendChild(s);var h=_ct("rect");if(h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+r+")"),n.appendChild(h),n.appendChild(this._bx),t=n,!featureSupport.maskType){a.setAttribute("mask-type","luminance"),s.appendChild(filtersFactory.createAlphaToLuminanceFilter());var i=_ct("g");n.appendChild(h),i.appendChild(this._bx),t=i,n.appendChild(i)}this._x.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this._bx),t=this.matteElement,this._by=this.matteElement):this._by=this._bx;if(!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.data.ln&&this._bx.setAttribute("id",this.data.ln),this.data.cl&&this._bx.setAttribute("class",this.data.cl)),0===this.data.ty&&!this.data.hd){var l=_ct("clipPath"),p=_ct("path");p.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m="cp_"+randomString(8);if(l.setAttribute("id",m),l.appendChild(p),this._x.defs.appendChild(l),this.checkMasks()){var f=_ct("g");f.setAttribute("clip-path","url("+locationHref+"#"+m+")"),f.appendChild(this._bx),this._bz=f,t?t.appendChild(this._bz):this._by=this._bz}else this._bx.setAttribute("clip-path","url("+locationHref+"#"+m+")")}0!==this.data.bm&&this.setBlendMode(),this.effectsManager=new _bi(this)},_d.prototype.renderElement=function(){this.finalTransform.matMdf&&this._bz.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform.opMdf&&this._bz.setAttribute("opacity",this.finalTransform.mProp.o.v)},_d.prototype.destroy_e=function(){this._bx=null,this.matteElement=null,this.maskManager.destroy()},_d.prototype.get_e=function(){return this.data.hd?null:this._by},_d.prototype.addMasks=function(){this.maskManager=new _ay(this.data,this,this._x)},_d.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")},_f.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].reset();for(e=this.shapeModifiers.length,t=e-1;t>=0;t-=1)this.shapeModifiers[t].processShapes(this._ch)}},lcEnum:{1:"butt",2:"round",3:"square"},ljEnum:{1:"miter",2:"round",3:"butt"},searchProcessedElement:function(t){for(var e=0,r=this.processedElements.length;e<r;){if(this.processedElements[e].elem===t)return this.processedElements[e].pos;e+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements.length;r;)if(r-=1,this.processedElements[r].elem===t){this.processedElements[r].pos=e;break}0===r&&this.processedElements.push(new ProcessedElement(t,e))},_az:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},buildShapeString:function(t,e,r,s){var i,a="";for(i=1;i<e;i+=1)1===i&&(a+=" M"+s.applyToPointStringified(t.v[0][0],t.v[0][1])),a+=" C"+s.applyToPointStringified(t.o[i-1][0],t.o[i-1][1])+" "+s.applyToPointStringified(t.i[i][0],t.i[i][1])+" "+s.applyToPointStringified(t.v[i][0],t.v[i][1]);return 1===e&&(a+=" M"+s.applyToPointStringified(t.v[0][0],t.v[0][1])),r&&e&&(a+=" C"+s.applyToPointStringified(t.o[i-1][0],t.o[i-1][1])+" "+s.applyToPointStringified(t.i[0][0],t.i[0][1])+" "+s.applyToPointStringified(t.v[0][0],t.v[0][1]),a+="z"),a}},_k.prototype._cz=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textAnimator=new _bl(t.t,this.renderType,this),this.textProperty=new _ar(this,t.t,this._co),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.textAnimator.searchProperties(this._co)},_k.prototype._az=function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty.mdf||this.textProperty._ch)&&(this.buildNewText(),this.textProperty._ch=!1)},_k.prototype.createPathShape=function(t,e){var r,s,i=e.length,a="";for(r=0;r<i;r+=1)s=e[r].ks.k,a+=this.buildShapeString(s,s.i.length,!0,t);return a},_k.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},_k.prototype.applyTextPropertiesToMatrix=function(t,e,r,s,i){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(s,i,0)},_k.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},_k.prototype.buildShapeString=_f.prototype.buildShapeString,_k.prototype.emptyProp=new LetterProps,_k.prototype.destroy=function(){},extendPrototype([_e,_af,_ad,_ac,_ci],_g),_g.prototype._cz=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},_g.prototype._az=function(t){if(this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,s=this._br.length;for(this._db||this.checkLayers(this.renderedFrame),r=0;r<s;r+=1)(this._db||this._br[r])&&this._br[r]._az(this.renderedFrame-this.layers[r].st)}},_g.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this._db||this._br[t])&&this._br[t]._ba()},_g.prototype.setElements=function(t){this._br=t},_g.prototype.getElements=function(){return this._br},_g.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this._br[t]&&this._br[t].destroy()},_g.prototype.destroy=function(){this.destroyElements(),this.destroy_e()},extendPrototype([_e,_af,_d,_ad,_ac,_ci],_h),_h.prototype.createContent=function(){var t=this._x.getAssetsPath(this.assetData);this._cc=_ct("image"),this._cc.setAttribute("width",this.assetData.w+"px"),this._cc.setAttribute("height",this.assetData.h+"px"),this._cc.setAttribute("preserveAspectRatio","xMidYMid slice"),this._cc.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this._bx.appendChild(this._cc)},extendPrototype([_h],_j),_j.prototype.createContent=function(){var t=_ct("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this._bx.appendChild(t)},extendPrototype([_ao,_g,_d],SVGCompElement),extendPrototype([_e,_af,_d,_ad,_ac,_ci,_k],_cw),_cw.prototype.createContent=function(){this.data.ln&&this._bx.setAttribute("id",this.data.ln),this.data.cl&&this._bx.setAttribute("class",this.data.cl),this.data.singleShape&&!this._x._cr.chars&&(this.textContainer=_ct("text"))},_cw.prototype.buildNewText=function(){var t,e,r=this.textProperty.currentData;this._bt=_cv(r?r.l.length:0),r.fc?this._bx.setAttribute("fill",this.buildColor(r.fc)):this._bx.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this._bx.setAttribute("stroke",this.buildColor(r.sc)),this._bx.setAttribute("stroke-width",r.sw)),this._bx.setAttribute("font-size",r.s);var s=this._x._cr.getFontByName(r.f);if(s.fClass)this._bx.setAttribute("class",s.fClass);else{this._bx.setAttribute("font-family",s.fFamily);var i=r.fWeight,a=r.fStyle;this._bx.setAttribute("font-style",a),this._bx.setAttribute("font-weight",i)}var n=r.l||[],o=this._x._cr.chars;if(e=n.length){var h,l,p=this.mHelper,m="",f=this.data.singleShape,c=0,d=0,u=!0,y=r.tr/1e3*r.s;if(f&&!o){var g=this.textContainer,v="";switch(r.j){case 1:v="end";break;case 2:v="middle";break;case 2:v="start"}g.setAttribute("text-anchor",v),g.setAttribute("letter-spacing",y);var b=r.t.split(String.fromCharCode(13));e=b.length;var d=r.ps?r.ps[1]+r.ascent:0;for(t=0;t<e;t+=1)h=this.textSpans[t]||_ct("tspan"),h.textContent=b[t],h.setAttribute("x",0),h.setAttribute("y",d),h.style.display="inherit",g.appendChild(h),this.textSpans[t]=h,d+=r.lh;this._bx.appendChild(g)}else{var E,P,x=this.textSpans.length;for(t=0;t<e;t+=1)o&&f&&0!==t||(h=x>t?this.textSpans[t]:_ct(o?"path":"text"),x<=t&&(h.setAttribute("stroke-linecap","butt"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=h,this._bx.appendChild(h)),h.style.display="inherit"),p.reset(),o?(p.scale(r.s/100,r.s/100),f&&(n[t].n&&(c=-y,d+=r.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(r,p,n[t].line,c,d),c+=n[t].l||0,c+=y),P=this._x._cr.getCharData(r.t.charAt(t),s.fStyle,this._x._cr.getFontByName(r.f).fFamily),E=P&&P.data||{},l=E.shapes?E.shapes[0].it:[],f?m+=this.createPathShape(p,l):h.setAttribute("d",this.createPathShape(p,l))):(h.textContent=n[t].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));f&&h.setAttribute("d",m)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0}},_cw.prototype.sourceRectAtTime=function(t){if(this._az(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this._bx.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},_cw.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,r=this.textAnimator._bt,s=this.textProperty.currentData.l;e=s.length;var i,a;for(t=0;t<e;t+=1)s[t].n||(i=r[t],a=this.textSpans[t],i.mdf.m&&a.setAttribute("transform",i.m),i.mdf.o&&a.setAttribute("opacity",i.o),i.mdf.sw&&a.setAttribute("stroke-width",i.sw),i.mdf.sc&&a.setAttribute("stroke",i.sc),i.mdf.fc&&a.setAttribute("fill",i.fc))}},extendPrototype([_e,_af,_d,_f,_ad,_ac,_ci],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co,0,[],!0)},SVGShapeElement.prototype.createStyleElement=function(t,e,r){var s,i=new SVGStyleData(t,e),a=i.pElem;if("st"===t.ty)s=new SVGStrokeStyleData(this,t,r,i);else if("fl"===t.ty)s=new SVGFillStyleData(this,t,r,i);else if("gf"===t.ty||"gs"===t.ty){var n="gf"===t.ty?_ck:_cj;s=new n(this,t,r,i),this._x.defs.appendChild(s.gf),s.maskId&&(this._x.defs.appendChild(s.ms),this._x.defs.appendChild(s.of),a.setAttribute("mask","url(#"+s.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),a.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),this.stylesList.push(i),s},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),e},SVGShapeElement.prototype._cp=function(t,e){return new SVGTransformData(_ag._bj(this,t,e),_ai._bo(this,t.o,0,.01,e))},SVGShapeElement.prototype.createShapeElement=function(t,e,r,s){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var a=_ah._bp(this,t,i,s),n=new SVGShapeData(e,r,a);return this.shapes.push(n.sh),this.addShapeToModifiers(n),n},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,s=this.stylesList.length;for(e=0;e<s;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){this._ch=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co,0,[],!0);var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,s,i,a,n,o){var h,l,p,m,f,c,d=[].concat(n),u=t.length-1,y=[],g=[];for(h=u;h>=0;h-=1){if(c=this.searchProcessedElement(t[h]),
-c?e[h]=r[c-1]:t[h]._render=o,"fl"==t[h].ty||"st"==t[h].ty||"gf"==t[h].ty||"gs"==t[h].ty)c?e[h].style.closed=!1:e[h]=this.createStyleElement(t[h],a,i),t[h]._render&&s.appendChild(e[h].style.pElem),y.push(e[h].style);else if("gr"==t[h].ty){if(c)for(p=e[h].it.length,l=0;l<p;l+=1)e[h].prevViewData[l]=e[h].it[l];else e[h]=this.createGroupElement(t[h]);this.searchShapes(t[h].it,e[h].it,e[h].prevViewData,e[h].gr,i,a+1,d,o),t[h]._render&&s.appendChild(e[h].gr)}else"tr"==t[h].ty?(c||(e[h]=this._cp(t[h],i)),m=e[h].transform,d.push(m)):"sh"==t[h].ty||"rc"==t[h].ty||"el"==t[h].ty||"sr"==t[h].ty?(c||(e[h]=this.createShapeElement(t[h],d,a,i)),this.setElementStyles(e[h])):"tm"==t[h].ty||"rd"==t[h].ty||"ms"==t[h].ty?(c?(f=e[h],f.closed=!1):(f=_as.getModifier(t[h].ty),f.init(this,t[h],i),e[h]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"==t[h].ty&&(c?(f=e[h],f.closed=!0):(f=_as.getModifier(t[h].ty),e[h]=f,f.init(this,t,h,e,i),this.shapeModifiers.push(f),o=!1),g.push(f));this.addProcessedElement(t[h],h+1)}for(u=y.length,h=0;h<u;h+=1)y[h].closed=!0;for(u=g.length,h=0;h<u;h+=1)g[h].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(this.shapesData,this.itemsData,null),t=0;t<e;t+=1)(this.stylesList[t].mdf||this._ch)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(t,e,r){var s,i,a=t.length-1;for(s=0;s<=a;s+=1)i=t[s].ty,"tr"==i?((this._ch||e[s].transform.op.mdf&&r)&&r.setAttribute("opacity",e[s].transform.op.v),(this._ch||e[s].transform.mProps.mdf&&r)&&r.setAttribute("transform",e[s].transform.mProps.v.to2dCSS())):!t[s]._render||"sh"!=i&&"el"!=i&&"rc"!=i&&"sr"!=i?"fl"==i?this.renderFill(t[s],e[s]):"gf"==i?this.renderGradient(t[s],e[s]):"gs"==i?(this.renderGradient(t[s],e[s]),this.renderStroke(t[s],e[s])):"st"==i?this.renderStroke(t[s],e[s]):"gr"==i&&this.renderShape(t[s].it,e[s].it,e[s].gr):this.renderPath(e[s])},SVGShapeElement.prototype.renderPath=function(t){var e,r,s,i,a,n,o,h,l,p,m,f=t.styles.length,c=t.lvl;for(n=0;n<f;n+=1){if(i=t.sh.mdf||this._ch,t.styles[n].lvl<c)for(h=this.mHelper.reset(),p=c-t.styles[n].lvl,m=t.transformers.length-1;p>0;)i=t.transformers[m].mProps.mdf||i,l=t.transformers[m].mProps.v.props,h.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15]),p--,m--;else h=this.identityMatrix;if(o=t.sh.paths,r=o._length,i){for(s="",e=0;e<r;e+=1)a=o.shapes[e],a&&a._length&&(s+=this.buildShapeString(a,a._length,a.c,h));t.caches[n]=s}else s=t.caches[n];t.styles[n].d+=s,t.styles[n].mdf=i||t.styles[n].mdf}},SVGShapeElement.prototype.renderFill=function(t,e){var r=e.style;(e.c.mdf||this._ch)&&r.pElem.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||this._ch)&&r.pElem.setAttribute("fill-opacity",e.o.v)},SVGShapeElement.prototype.renderGradient=function(t,e){var r=e.gf,s=e.g._hasOpacity,i=e.s.v,a=e.e.v;if(e.o.mdf||this._ch){var n="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(n,e.o.v)}if(e.s.mdf||this._ch){var o=1===t.t?"x1":"cx",h="x1"===o?"y1":"cy";r.setAttribute(o,i[0]),r.setAttribute(h,i[1]),s&&!e.g._collapsable&&(e.of.setAttribute(o,i[0]),e.of.setAttribute(h,i[1]))}var l,p,m,f;if(e.g.cmdf||this._ch){l=e.cst;var c=e.g.c;for(m=l.length,p=0;p<m;p+=1)f=l[p],f.setAttribute("offset",c[4*p]+"%"),f.setAttribute("stop-color","rgb("+c[4*p+1]+","+c[4*p+2]+","+c[4*p+3]+")")}if(s&&(e.g.omdf||this._ch)){var d=e.g.o;for(l=e.g._collapsable?e.cst:e.ost,m=l.length,p=0;p<m;p+=1)f=l[p],e.g._collapsable||f.setAttribute("offset",d[2*p]+"%"),f.setAttribute("stop-opacity",d[2*p+1])}if(1===t.t)(e.e.mdf||this._ch)&&(r.setAttribute("x2",a[0]),r.setAttribute("y2",a[1]),s&&!e.g._collapsable&&(e.of.setAttribute("x2",a[0]),e.of.setAttribute("y2",a[1])));else{var u;if((e.s.mdf||e.e.mdf||this._ch)&&(u=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)),r.setAttribute("r",u),s&&!e.g._collapsable&&e.of.setAttribute("r",u)),e.e.mdf||e.h.mdf||e.a.mdf||this._ch){u||(u=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)));var y=Math.atan2(a[1]-i[1],a[0]-i[0]),g=e.h.v>=1?.99:e.h.v<=-1?-.99:e.h.v,v=u*g,b=Math.cos(y+e.a.v)*v+i[0],E=Math.sin(y+e.a.v)*v+i[1];r.setAttribute("fx",b),r.setAttribute("fy",E),s&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",E))}}},SVGShapeElement.prototype.renderStroke=function(t,e){var r=e.style,s=e.d;s&&(s.mdf||this._ch)&&(r.pElem.setAttribute("stroke-dasharray",s.dashStr),r.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c.mdf||this._ch)&&r.pElem.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||this._ch)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w.mdf||this._ch)&&(r.pElem.setAttribute("stroke-width",e.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))},SVGShapeElement.prototype.destroy=function(){this.destroy_e(),this.shapeData=null,this.itemsData=null},_bb.prototype._ba=function(t){if(t||this._cl.mdf){var e=this._cl._cm[0].p.v,r=this._cl._cm[1].p.v,s=this._cl._cm[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},_bc.prototype._ba=function(t){if(t||this._cl.mdf){var e=this._cl._cm[2].p.v,r=this._cl._cm[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},_bd.prototype.initialize=function(){var t,e,r,s,i=this.elem._bx.children||this.elem._bx.childNodes;for(1===this._cl._cm[1].p.v?(s=this.elem.maskManager.masksProperties.length,r=0):(r=this._cl._cm[0].p.v-1,s=r+1),e=_ct("g"),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1),r;r<s;r+=1)t=_ct("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this._cl._cm[10].p.v){var a=_ct("mask"),n="stms_"+randomString(10);a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem._x.defs.appendChild(a);var o=_ct("g");o.setAttribute("mask","url("+locationHref+"#"+n+")"),i[0]&&o.appendChild(i[0]),this.elem._bx.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this._cl._cm[10].p.v||2===this._cl._cm[10].p.v){if(2===this._cl._cm[10].p.v)for(var i=this.elem._bx.children||this.elem._bx.childNodes;i.length;)this.elem._bx.removeChild(i[0]);this.elem._bx.appendChild(e),this.elem._bx.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},_bd.prototype._ba=function(t){this.initialized||this.initialize();var e,r,s,i=this.paths.length;for(e=0;e<i;e+=1)if(r=this.elem.maskManager.viewData[this.paths[e].m],s=this.paths[e].p,(t||this._cl.mdf||r.prop.mdf)&&s.setAttribute("d",r.lastPath),t||this._cl._cm[9].p.mdf||this._cl._cm[4].p.mdf||this._cl._cm[7].p.mdf||this._cl._cm[8].p.mdf||r.prop.mdf){var a;if(0!==this._cl._cm[7].p.v||100!==this._cl._cm[8].p.v){var n=Math.min(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100,o=Math.max(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100,h=s.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),m=1+2*this._cl._cm[4].p.v*this._cl._cm[9].p.v/100,f=Math.floor(p/m);for(l=0;l<f;l+=1)a+="1 "+2*this._cl._cm[4].p.v*this._cl._cm[9].p.v/100+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this._cl._cm[4].p.v*this._cl._cm[9].p.v/100;s.setAttribute("stroke-dasharray",a)}if((t||this._cl._cm[4].p.mdf)&&this.pathMasker.setAttribute("stroke-width",2*this._cl._cm[4].p.v),(t||this._cl._cm[6].p.mdf)&&this.pathMasker.setAttribute("opacity",this._cl._cm[6].p.v),(1===this._cl._cm[10].p.v||2===this._cl._cm[10].p.v)&&(t||this._cl._cm[3].p.mdf)){var c=this._cl._cm[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bm_floor(255*c[0])+","+bm_floor(255*c[1])+","+bm_floor(255*c[2])+")")}},_be.prototype._ba=function(t){if(t||this._cl.mdf){var e=this._cl._cm[0].p.v,r=this._cl._cm[1].p.v,s=this._cl._cm[2].p.v,i=s[0]+" "+r[0]+" "+e[0],a=s[1]+" "+r[1]+" "+e[1],n=s[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",i),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},_bf.prototype.createFeFunc=function(t,e){var r=_ct(t);return r.setAttribute("type","table"),e.appendChild(r),r},_bf.prototype.getTableValue=function(t,e,r,s,i){for(var a,n,o=0,h=256,l=Math.min(t,e),p=Math.max(t,e),m=Array.call(null,{length:h}),f=0,c=i-s,d=e-t;o<=256;)a=o/256,n=a<=l?d<0?i:s:a>=p?d<0?s:i:s+c*Math.pow((a-t)/d,1/r),m[f++]=n,o+=256/(h-1);return m.join(" ")},_bf.prototype._ba=function(t){if(t||this._cl.mdf){var e,r=this._cl._cm;this.feFuncRComposed&&(t||r[3].p.mdf||r[4].p.mdf||r[5].p.mdf||r[6].p.mdf||r[7].p.mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p.mdf||r[11].p.mdf||r[12].p.mdf||r[13].p.mdf||r[14].p.mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p.mdf||r[18].p.mdf||r[19].p.mdf||r[20].p.mdf||r[21].p.mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p.mdf||r[25].p.mdf||r[26].p.mdf||r[27].p.mdf||r[28].p.mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p.mdf||r[32].p.mdf||r[33].p.mdf||r[34].p.mdf||r[35].p.mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},_bg.prototype._ba=function(t){if(t||this._cl.mdf){if((t||this._cl._cm[4].p.mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this._cl._cm[4].p.v/4),t||this._cl._cm[0].p.mdf){var e=this._cl._cm[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this._cl._cm[1].p.mdf)&&this.feFlood.setAttribute("flood-opacity",this._cl._cm[1].p.v/255),t||this._cl._cm[2].p.mdf||this._cl._cm[3].p.mdf){var r=this._cl._cm[3].p.v,s=(this._cl._cm[2].p.v-90)*degToRads,i=r*Math.cos(s),a=r*Math.sin(s);this.feOffset.setAttribute("dx",i),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[],_svgMatteMaskCounter=0;_bh.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},_bh.prototype.replaceInParent=function(t,e){var r=t._bx.parentNode;if(r){for(var s=r.children,i=0,a=s.length;i<a&&s[i]!==t._bx;)i+=1;var n;i<=a-2&&(n=s[i+1]);var o=_ct("use");o.setAttribute("href","#"+e),n?r.insertBefore(o,n):r.appendChild(o)}},_bh.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r="matte_"+randomString(5)+"_"+_svgMatteMaskCounter++,s=_ct("mask");s.setAttribute("id",e.layerId),s.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var i=t._x.defs;i.appendChild(s);var a=_ct("symbol");a.setAttribute("id",r),this.replaceInParent(e,r),a.appendChild(e._bx),i.appendChild(a),useElem=_ct("use"),useElem.setAttribute("href","#"+r),s.appendChild(useElem),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},_bh.prototype.initialize=function(){for(var t=this._cl._cm[0].p.v,e=0,r=this.elem.comp._br.length;e<r;)this.elem.comp._br[e].data.ind===t&&this.setElementAsMask(this.elem,this.elem.comp._br[e]),e+=1;this.initialized=!0},_bh.prototype._ba=function(){this.initialized||this.initialize()},_bi.prototype._ba=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e]._ba(t)};var animationManager=function(){function t(t){for(var e=0,r=t.target;e<S;)P[e].animation===r&&(P.splice(e,1),e-=1,S-=1,r.isPaused||s()),e+=1}function e(t,e){if(!t)return null;for(var r=0;r<S;){if(P[r].elem==t&&null!==P[r].elem)return P[r].animation;r+=1}var s=new _a;return i(s,t),s.setData(t,e),s}function r(){A+=1,b()}function s(){A-=1,0===A&&(C=!0)}function i(e,i){e.addEventListener("destroy",t),e.addEventListener("_active",r),e.addEventListener("_idle",s),P.push({elem:i,animation:e}),S+=1}function a(t){var e=new _a;return i(e,null),e.setParams(t),e}function n(t,e){var r;for(r=0;r<S;r+=1)P[r].animation.setSpeed(t,e)}function o(t,e){var r;for(r=0;r<S;r+=1)P[r].animation.setDirection(t,e)}function h(t){var e;for(e=0;e<S;e+=1)P[e].animation.play(t)}function l(t,e){x=Date.now();var r;for(r=0;r<S;r+=1)P[r].animation.moveFrame(t,e)}function p(t){var e,r=t-x;for(e=0;e<S;e+=1)P[e].animation.advanceTime(r);x=t,C?k=!0:window.requestAnimationFrame(p)}function m(t){x=t,window.requestAnimationFrame(p)}function f(t){var e;for(e=0;e<S;e+=1)P[e].animation.pause(t)}function c(t,e,r){var s;for(s=0;s<S;s+=1)P[s].animation.goToAndStop(t,e,r)}function d(t){var e;for(e=0;e<S;e+=1)P[e].animation.stop(t)}function u(t){var e;for(e=0;e<S;e+=1)P[e].animation.togglePause(t)}function y(t){var e;for(e=S-1;e>=0;e-=1)P[e].animation.destroy(t)}function g(t,r,s){var i,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=a.length;for(i=0;i<n;i+=1)s&&a[i].setAttribute("data-bm-type",s),e(a[i],t);if(r&&0===n){s||(s="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=_cu("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",s),o.appendChild(h),e(h,t)}}function v(){var t;for(t=0;t<S;t+=1)P[t].animation.resize()}function b(){C&&(C=!1,k&&(window.requestAnimationFrame(m),k=!1))}var E={},P=[],x=0,S=0,C=!0,A=0,k=!0;return E.registerAnimation=e,E.loadAnimation=a,E.setSpeed=n,E.setDirection=o,E.play=h,E.moveFrame=l,E.pause=f,E.stop=d,E.togglePause=u,E.searchAnimations=g,E.resize=v,E.goToAndStop=c,E.destroy=y,E}(),_a=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this._dc=0,this.playCount=0,this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.subframeEnabled=subframeEnabled,this.segments=[],this.pendingSegment=!1,this._idle=!0,this.projectInterface=ProjectInterface()};extendPrototype([BaseEvent],_a),_a.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var r=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(r){case"canvas":this.renderer=new _aq(this,t.rendererSettings);break;case"svg":this.renderer=new _ao(this,t.rendererSettings);break;case"hybrid":case"html":default:this.renderer=new _ap(this,t.rendererSettings)}if(this.renderer.setProjectInterface(this.projectInterface),this.animType=r,""===t.loop||null===t.loop||(t.loop===!1?this.loop=!1:t.loop===!0?this.loop=!0:this.loop=parseInt(t.loop)),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var s=new XMLHttpRequest;t.path.lastIndexOf("\\")!=-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.assetsPath=t.assetsPath,this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),s.open("GET",t.path,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)e.configAnimation(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);e.configAnimation(t)}catch(r){}}}},_a.prototype.setData=function(t,e){var r={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},s=t.attributes;r.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",r.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:"canvas";var i=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";""===i||("false"===i?r.loop=!1:"true"===i?r.loop=!0:r.loop=parseInt(i));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:!s.getNamedItem("bm-autoplay")||s.getNamedItem("bm-autoplay").value;r.autoplay="false"!==a,r.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"";var n=s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"";"false"===n&&(r.prerender=!1),this.setParams(r)},_a.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip),this.animationData.tf=this.totalFrames);var e,r,s=this.animationData.layers,i=s.length,a=t.layers,n=a.length;for(r=0;r<n;r+=1)for(e=0;e<i;){if(s[e].id==a[r].id){s[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer._x._cr.addChars(t.chars),this.renderer._x._cr.addFonts(t.fonts,this.renderer._x.defs)),t.assets)for(i=t.assets.length,e=0;e<i;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeData(this.animationData,this.renderer._x._cr),this.renderer.includeLayers(t.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer._ba(null),this.loadNextSegment()},_a.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=new XMLHttpRequest,s=this,i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,r.open("GET",i,!0),r.send(),r.onreadystatechange=function(){if(4==r.readyState)if(200==r.status)s.includeLayers(JSON.parse(r.responseText));else try{var t=JSON.parse(r.responseText);s.includeLayers(t)}catch(e){}}},_a.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},_a.prototype.configAnimation=function(t){var e=this;this.renderer&&this.renderer.destroyed||(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.renderer.searchExtraCompositions(t.assets),this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this._ch=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.imagePreloader=new ImagePreloader,this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(t.assets,function(t){t||e.trigger("loaded_images")}),this.loadSegments(),this.updaFrameModifier(),this.renderer._x._cr?this.waitForFontsLoaded():(dataManager.completeData(this.animationData,this.renderer._x._cr),this.checkLoaded()))},_a.prototype.waitForFontsLoaded=function(){function t(){this.renderer._x._cr.loaded?(dataManager.completeData(this.animationData,this.renderer._x._cr),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),_a.prototype.addPendingElement=function(){this._dc+=1},_a.prototype.elementLoaded=function(){this._dc--,this.checkLoaded()},_a.prototype.checkLoaded=function(){0===this._dc&&(expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},_a.prototype.resize=function(){this.renderer.updateContainerSize()},_a.prototype.setSubframe=function(t){this.subframeEnabled=!!t},_a.prototype.gotoFrame=function(){this.currentFrame=this.subframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this._ba()},_a.prototype._ba=function(){this.isLoaded!==!1&&this.renderer._ba(this.currentFrame+this._ch)},_a.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},_a.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0,this.pendingSegment||(this._idle=!0,this.trigger("_idle")))},_a.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?this.play():this.pause())},_a.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},_a.prototype.goToAndStop=function(t,e,r){r&&this.name!=r||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},_a.prototype.goToAndPlay=function(t,e,r){this.goToAndStop(t,e,r),this.play()},_a.prototype.advanceTime=function(t){return this.pendingSegment?(this.pendingSegment=!1,this.adjustSegment(this.segments.shift()),void(this.isPaused&&this.play())):void(this.isPaused!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier))},_a.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},_a.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},_a.prototype.adjustSegment=function(t){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this._ch=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this._ch=t[0],this.setCurrentRawFrameValue(.001)),this.trigger("segmentStart")},_a.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this._ch<t?r=t:this.currentRawFrame+this._ch>e&&(r=e-t)),this._ch=t,this.totalFrames=e-t,r!==-1&&this.goToAndStop(r,!0)},_a.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var r,s=t.length;for(r=0;r<s;r+=1)this.segments.push(t[r])}else this.segments.push(t);e&&this.adjustSegment(this.segments.shift()),this.isPaused&&this.play()},_a.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.adjustSegment(this.segments.shift())},_a.prototype.checkSegments=function(){this.segments.length&&(this.pendingSegment=!0)},_a.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},_a.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||(this.renderer.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},_a.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;this.currentRawFrame>=this.totalFrames?(this.checkSegments(),this.loop===!1?(this.currentRawFrame=this.totalFrames,e=!0):(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop||this.pendingSegment?(this.currentRawFrame=this.totalFrames,e=!0):this.currentRawFrame=this.currentRawFrame%this.totalFrames)):this.currentRawFrame<0&&(this.checkSegments(),this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1||this.pendingSegment?(this.currentRawFrame=0,e=!0):(this.trigger("loopComplete"),this.currentRawFrame=(this.totalFrames+this.currentRawFrame)%this.totalFrames)),this.gotoFrame(),e&&(this.pause(),this.trigger("complete"))},_a.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},_a.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},_a.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},_a.prototype.getPath=function(){return this.path},_a.prototype.getAssetsPath=function(t){var e="";if(this.assetsPath){var r=t.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},_a.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t==this.assets[e].id)return this.assets[e];e+=1}},_a.prototype.hide=function(){this.renderer.hide()},_a.prototype.show=function(){this.renderer.show()},_a.prototype.getAssets=function(){return this.assets},_a.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this._cy(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this._cy(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this._cy(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this._cy(t,new BMSegmentStartEvent(t,this._ch,this.totalFrames));break;case"destroy":this._cy(t,new BMDestroyEvent(t,this));break;default:this._cy(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this._ch,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},extendPrototype([_l],_aq),_aq.prototype.createBase=function(t){return new _c(t,this._x,this)},_aq.prototype.createShape=function(t){return new _r(t,this._x,this)},_aq.prototype.createText=function(t){return new _t(t,this._x,this)},_aq.prototype.createImage=function(t){return new _p(t,this._x,this)},_aq.prototype.createComp=function(t){return new _m(t,this._x,this)},_aq.prototype.createSolid=function(t){return new _s(t,this._x,this)},_aq.prototype.createNull=_ao.prototype.createNull,_aq.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13]){if(!this.renderConfig.clearCanvas)return void this._da.transform(t[0],t[1],t[4],t[5],t[12],t[13]);this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this._da.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}},_aq.prototype.ctxOpacity=function(t){return this.renderConfig.clearCanvas?(this.contextData.cO*=t<0?0:t,void(this._da.globalAlpha=this.contextData.cO)):void(this._da.globalAlpha*=t<0?0:t)},_aq.prototype.reset=function(){return this.renderConfig.clearCanvas?void this.contextData.reset():void this._da.restore()},_aq.prototype.save=function(t){if(!this.renderConfig.clearCanvas)return void this._da.save();t&&this._da.save();var e=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var r,s=this.contextData.saved[this.contextData.cArrPos];for(r=0;r<16;r+=1)s[r]=e[r];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1},_aq.prototype.restore=function(t){if(!this.renderConfig.clearCanvas)return void this._da.restore();t&&(this._da.restore(),this._x.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],s=this.contextData.cTr.props;for(e=0;e<16;e+=1)s[e]=r[e];this._da.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this._da.globalAlpha=r},_aq.prototype.configAnimation=function(t){
-this._cq.wrapper?(this._cq.container=_cu("canvas"),this._cq.container.style.width="100%",this._cq.container.style.height="100%",this._cq.container.style.transformOrigin=this._cq.container.style.mozTransformOrigin=this._cq.container.style.webkitTransformOrigin=this._cq.container.style["-webkit-transform"]="0px 0px 0px",this._cq.wrapper.appendChild(this._cq.container),this._da=this._cq.container.getContext("2d"),this.renderConfig.className&&this._cq.container.setAttribute("class",this.renderConfig.className)):this._da=this.renderConfig.context,this.data=t,this._x._da=this._da,this._x.renderer=this,this._x.isDashed=!1,this._x.totalFrames=Math.floor(t.tf),this._x.compWidth=t.w,this._x.compHeight=t.h,this._x.frameRate=t.fr,this._x.frameId=0,this._x._de={w:t.w,h:t.h},this._x.progressiveLoad=this.renderConfig.progressiveLoad,this.layers=t.layers,this._cx={},this._cx.w=t.w,this._cx.h=t.h,this._x._cr=new FontManager,this._x._cr.addChars(t.chars),this._x._cr.addFonts(t.fonts,document.body),this._x.getAssetData=this._cq.getAssetData.bind(this._cq),this._x.getAssetsPath=this._cq.getAssetsPath.bind(this._cq),this._x.elementLoaded=this._cq.elementLoaded.bind(this._cq),this._x.addPendingElement=this._cq.addPendingElement.bind(this._cq),this._x._cx=this._cx,this._br=_cv(t.layers.length),this.updateContainerSize()},_aq.prototype.updateContainerSize=function(){this.reset();var t,e;this._cq.wrapper&&this._cq.container?(t=this._cq.wrapper.offsetWidth,e=this._cq.wrapper.offsetHeight,this._cq.container.setAttribute("width",t*this.renderConfig.dpr),this._cq.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this._da.canvas.width*this.renderConfig.dpr,e=this._da.canvas.height*this.renderConfig.dpr);var r,s;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var i=this.renderConfig.preserveAspectRatio.split(" "),a=i[1]||"meet",n=i[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,s=this._cx.w/this._cx.h,s>r&&"meet"===a||s<r&&"slice"===a?(this._cx.sx=t/(this._cx.w/this.renderConfig.dpr),this._cx.sy=t/(this._cx.w/this.renderConfig.dpr)):(this._cx.sx=e/(this._cx.h/this.renderConfig.dpr),this._cx.sy=e/(this._cx.h/this.renderConfig.dpr)),"xMid"===o&&(s<r&&"meet"===a||s>r&&"slice"===a)?this._cx.tx=(t-this._cx.w*(e/this._cx.h))/2*this.renderConfig.dpr:"xMax"===o&&(s<r&&"meet"===a||s>r&&"slice"===a)?this._cx.tx=(t-this._cx.w*(e/this._cx.h))*this.renderConfig.dpr:this._cx.tx=0,"YMid"===h&&(s>r&&"meet"===a||s<r&&"slice"===a)?this._cx.ty=(e-this._cx.h*(t/this._cx.w))/2*this.renderConfig.dpr:"YMax"===h&&(s>r&&"meet"===a||s<r&&"slice"===a)?this._cx.ty=(e-this._cx.h*(t/this._cx.w))*this.renderConfig.dpr:this._cx.ty=0}else"none"==this.renderConfig.preserveAspectRatio?(this._cx.sx=t/(this._cx.w/this.renderConfig.dpr),this._cx.sy=e/(this._cx.h/this.renderConfig.dpr),this._cx.tx=0,this._cx.ty=0):(this._cx.sx=this.renderConfig.dpr,this._cx.sy=this.renderConfig.dpr,this._cx.tx=0,this._cx.ty=0);this._cx.props=[this._cx.sx,0,0,0,0,this._cx.sy,0,0,0,0,1,0,this._cx.tx,this._cx.ty,0,1],this.ctxTransform(this._cx.props)},_aq.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this._cq.wrapper.innerHTML="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this._br[t]&&this._br[t].destroy();this._br.length=0,this._x._da=null,this._cq.container=null,this.destroyed=!0},_aq.prototype._ba=function(t){if(!(this.renderedFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed||null===t)){this.renderedFrame=t,this._x.frameNum=t-this._cq._ch,this._x.frameId+=1,this._x.projectInterface.currentFrame=t,this.renderConfig.clearCanvas===!0?this._da.clearRect(this._cx.tx,this._cx.ty,this._cx.w*this._cx.sx,this._cx.h*this._cx.sy):this.save(),this._da.beginPath(),this._da.rect(0,0,this._cx.w,this._cx.h),this._da.closePath(),this._da.clip();var e,r=this.layers.length;for(this._db||this.checkLayers(t),e=0;e<r;e++)(this._db||this._br[e])&&this._br[e]._az(t-this.layers[e].st);for(e=r-1;e>=0;e-=1)(this._db||this._br[e])&&this._br[e]._ba();this.renderConfig.clearCanvas!==!0&&this.restore()}},_aq.prototype.buildItem=function(t){var e=this._br;if(!e[t]&&99!=this.layers[t].ty){var r=this.createItem(this.layers[t],this,this._x);e[t]=r,r.initExpressions()}},_aq.prototype.checkPendingElements=function(){for(;this._dc.length;){var t=this._dc.pop();t.checkParenting()}},_aq.prototype.hide=function(){this._cq.container.style.display="none"},_aq.prototype.show=function(){this._cq.container.style.display="block"},_aq.prototype.searchExtraCompositions=function(t){var e,r=t.length;_ct("g");for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e],this._x.comp,this._x);s.initExpressions(),this._x.projectInterface.registerComposition(s)}},extendPrototype([_l],_ap),_ap.prototype.buildItem=_ao.prototype.buildItem,_ap.prototype.checkPendingElements=function(){for(;this._dc.length;){var t=this._dc.pop();t.checkParenting()}},_ap.prototype.appendElementInPos=function(t,e){var r=t.get_e();if(r){var s=this.layers[e];if(s.ddd&&this.supports3d)this.addTo3dContainer(r,e);else{for(var i,a,n=0;n<e;)this._br[n]&&this._br[n]!==!0&&this._br[n].get_e&&(a=this._br[n],i=this.layers[n].ddd?this.getThreeDContainerByPos(n):a.get_e()),n+=1;i?s.ddd&&this.supports3d||this._bx.insertBefore(r,i):s.ddd&&this.supports3d||this._bx.appendChild(r)}}},_ap.prototype.createBase=function(t){return new _d(t,this._x,this)},_ap.prototype.createShape=function(t){return this.supports3d?new _z(t,this._x,this):new SVGShapeElement(t,this._x,this)},_ap.prototype.createText=function(t){return this.supports3d?new _ab(t,this._x,this):new _cw(t,this._x,this)},_ap.prototype.createCamera=function(t){return this.camera=new _v(t,this._x,this),this.camera},_ap.prototype.createImage=function(t){return this.supports3d?new _y(t,this._x,this):new _h(t,this._x,this)},_ap.prototype.createComp=function(t){return this.supports3d?new _w(t,this._x,this):new _g(t,this._x,this)},_ap.prototype.createSolid=function(t){return this.supports3d?new _aa(t,this._x,this):new _j(t,this._x,this)},_ap.prototype.createNull=_ao.prototype.createNull,_ap.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}},_ap.prototype.createThreeDContainer=function(t){var e=_cu("div");styleDiv(e),e.style.width=this._x._de.w+"px",e.style.height=this._x._de.h+"px",e.style.transformOrigin=e.style.mozTransformOrigin=e.style.webkitTransformOrigin="50% 50%";var r=_cu("div");styleDiv(r),r.style.transform=r.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",e.appendChild(r),this.resizerElem.appendChild(e);var s={container:r,perspectiveElem:e,startPos:t,endPos:t};return this.threeDElements.push(s),s},_ap.prototype.build3dContainers=function(){var t,e,r=this.layers.length;for(t=0;t<r;t+=1)this.layers[t].ddd?(e||(e=this.createThreeDContainer(t)),e.endPos=Math.max(e.endPos,t)):e=null},_ap.prototype.addTo3dContainer=function(t,e){for(var r=0,s=this.threeDElements.length;r<s;){if(e<=this.threeDElements[r].endPos){for(var i,a=this.threeDElements[r].startPos;a<e;)this._br[a]&&this._br[a].get_e&&(i=this._br[a].get_e()),a+=1;i?this.threeDElements[r].container.insertBefore(t,i):this.threeDElements[r].container.appendChild(t);break}r+=1}},_ap.prototype.configAnimation=function(t){var e=_cu("div"),r=this._cq.wrapper;e.style.width=t.w+"px",e.style.height=t.h+"px",this.resizerElem=e,styleDiv(e),e.style.transformStyle=e.style.webkitTransformStyle=e.style.mozTransformStyle="flat",this.renderConfig.className&&r.setAttribute("class",this.renderConfig.className),r.appendChild(e),e.style.overflow="hidden";var s=_ct("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var i=_ct("defs");s.appendChild(i),this._x.defs=i,this.data=t,this._x.getAssetData=this._cq.getAssetData.bind(this._cq),this._x.getAssetsPath=this._cq.getAssetsPath.bind(this._cq),this._x.elementLoaded=this._cq.elementLoaded.bind(this._cq),this._x.frameId=0,this._x._de={w:t.w,h:t.h},this._x.frameRate=t.fr,this.layers=t.layers,this._x._cr=new FontManager,this._x._cr.addChars(t.chars),this._x._cr.addFonts(t.fonts,s),this._bx=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},_ap.prototype.destroy=function(){this._cq.wrapper.innerHTML="",this._cq.container=null,this._x.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this._br[t].destroy();this._br.length=0,this.destroyed=!0,this._cq=null},_ap.prototype.updateContainerSize=function(){var t,e,r,s,i=this._cq.wrapper.offsetWidth,a=this._cq.wrapper.offsetHeight,n=i/a,o=this._x._de.w/this._x._de.h;o>n?(t=i/this._x._de.w,e=i/this._x._de.w,r=0,s=(a-this._x._de.h*(i/this._x._de.w))/2):(t=a/this._x._de.h,e=a/this._x._de.h,r=(i-this._x._de.w*(a/this._x._de.h))/2,s=0),this.resizerElem.style.transform=this.resizerElem.style.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+s+",0,1)"},_ap.prototype._ba=_ao.prototype._ba,_ap.prototype.hide=function(){this.resizerElem.style.display="none"},_ap.prototype.show=function(){this.resizerElem.style.display="block"},_ap.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this._x._de.w,r=this._x._de.h,s=this.threeDElements.length;for(t=0;t<s;t+=1)this.threeDElements[t].perspectiveElem.style.perspective=this.threeDElements[t].perspectiveElem.style.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px"}},_ap.prototype.searchExtraCompositions=function(t){var e,r=t.length,s=_cu("div");for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e],s,this._x.comp,null);i.initExpressions(),this._x.projectInterface.registerComposition(i)}},_n.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=_cs("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=_cs("float32",16);this._length=t},_n.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},_c.prototype.createElements=function(){this.checkParenting()},_c.prototype.initRendererElement=function(){},_c.prototype.createContainerElements=function(){this._da=this._x._da,this.effectsManager=new _o(this)},_c.prototype.createContent=function(){},_c.prototype.setBlendMode=function(){var t=this._x;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=this.getBlendMode();t._da.globalCompositeOperation=e}},_c.prototype.addMasks=function(){this.maskManager=new _q(this.data,this,this._x)},_c.prototype.hideElement=function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},_c.prototype.showElement=function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._ch=!0,this.maskManager._ch=!0)},_c.prototype._ba=function(){this.hidden||(this.renderTransform(),this.renderRenderable(),this.setBlendMode(),this._x.renderer.save(),this._x.renderer.ctxTransform(this.finalTransform.mat.props),this._x.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this._x.renderer.restore(),this.maskManager.hasMasks&&this._x.renderer.restore(!0),this._ch&&(this._ch=!1))},_c.prototype.hide=_c.prototype.hideElement,_c.prototype.show=_c.prototype.showElement,_c.prototype.destroy=function(){this._da=null,this.data=null,this._x=null,this.maskManager.destroy()},_c.prototype.mHelper=new Matrix,extendPrototype([_e,_af,_c,_ad,_ac,_ae],_p),_p.prototype._cz=SVGShapeElement.prototype._cz,_p.prototype._az=_h.prototype._az,_p.prototype.imageLoaded=function(){if(this._x.elementLoaded(),this.assetData.w!==this.img.width||this.assetData.h!==this.img.height){var t=_cu("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,s=t.getContext("2d"),i=this.img.width,a=this.img.height,n=i/a,o=this.assetData.w/this.assetData.h;n>o?(r=a,e=r*o):(e=i,r=e/o),s.drawImage(this.img,(i-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},_p.prototype.imageFailed=function(){this.failed=!0,this._x.elementLoaded()},_p.prototype.createContent=function(){var t=this.img;t.addEventListener("load",this.imageLoaded.bind(this),!1),t.addEventListener("error",this.imageFailed.bind(this),!1);var e=this._x.getAssetsPath(this.assetData);t.src=e},_p.prototype.renderInnerContent=function(t){this.failed||this._da.drawImage(this.img,0,0)},_p.prototype.destroy=function(){this.img=null,this.destroy_e()},extendPrototype([_aq,_g,_c],_m),_m.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)(this._db||this._br[t])&&this._br[t]._ba()},_m.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this._br[t].destroy();this.layers=null,this._br=null},_q.prototype._az=function(t){var e,r=this._co.length;for(e=0;e<r;e+=1)this._co[e].getValue(t),this._co[e].mdf&&(this.element._x.mdf=!0)},_q.prototype._ba=function(t){if(this.hasMasks){var e,r,s,i,a,n=this.element._da,o=this.masksProperties.length;for(n.beginPath(),e=0;e<o;e++)if("n"!==this.masksProperties[e].mode){this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.element._x.compWidth,0),n.lineTo(this.element._x.compWidth,this.element._x.compHeight),n.lineTo(0,this.element._x.compHeight),n.lineTo(0,0)),a=this.viewData[e].v,r=t?t._cn(a.v[0][0],a.v[0][1],0):a.v[0],n.moveTo(r[0],r[1]);var h,l=a._length;for(h=1;h<l;h++)r=t?t._cn(a.o[h-1][0],a.o[h-1][1],0):a.o[h-1],s=t?t._cn(a.i[h][0],a.i[h][1],0):a.i[h],i=t?t._cn(a.v[h][0],a.v[h][1],0):a.v[h],n.bezierCurveTo(r[0],r[1],s[0],s[1],i[0],i[1]);r=t?t._cn(a.o[h-1][0],a.o[h-1][1],0):a.o[h-1],s=t?t._cn(a.i[0][0],a.i[0][1],0):a.i[0],i=t?t._cn(a.v[0][0],a.v[0][1],0):a.v[0],n.bezierCurveTo(r[0],r[1],s[0],s[1],i[0],i[1])}this.element._x.renderer.save(!0),n.clip()}},_q.prototype.getMaskProperty=_ay.prototype.getMaskProperty,_q.prototype.destroy=function(){this.element=null},extendPrototype([_e,_af,_c,_f,_ad,_ac,_ae],_r),_r.prototype._cz=_ci.prototype._cz,_r.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},_r.prototype.dashResetter=[],_r.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._co,!0)},_r.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,_br:[]},s={};if("fl"!=t.ty&&"st"!=t.ty||(s.c=_ai._bo(this,t.c,1,255,e),s.c.k||(r.co="rgb("+bm_floor(s.c.v[0])+","+bm_floor(s.c.v[1])+","+bm_floor(s.c.v[2])+")")),s.o=_ai._bo(this,t.o,0,.01,e),"st"==t.ty){if(r.lc=this.lcEnum[t.lc]||"round",r.lj=this.ljEnum[t.lj]||"round",1==t.lj&&(r.ml=t.ml),s.w=_ai._bo(this,t.w,0,null,e),s.w.k||(r.wi=s.w.v),t.d){var i=new DashProperty(this,t.d,"canvas",e);s.d=i,s.d.k||(r.da=s.d.dashArray,r["do"]=s.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),s.style=r,s},_r.prototype.createGroupElement=function(t){var e={it:[],prevViewData:[]};return e},_r.prototype._cp=function(t,e){var r={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:_ai._bo(this,t.o,0,.01,e),mProps:_ag._bj(this,t,e)},_br:[]};return r},_r.prototype.createShapeElement=function(t,e){var r={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]},s=4;"rc"==t.ty?s=5:"el"==t.ty?s=6:"sr"==t.ty&&(s=7),r.sh=_ah._bp(this,t,s,e),this.shapes.push(r.sh),this.addShapeToModifiers(r);var i,a=this.stylesList.length,n=!1,o=!1;for(i=0;i<a;i+=1)this.stylesList[i].closed||(this.stylesList[i]._br.push(r),"st"===this.stylesList[i].type?n=!0:o=!0);return r.st=n,r.fl=o,r},_r.prototype.reloadShapes=function(){this._ch=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._co,!0);var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue();this.renderModifiers()},_r.prototype.searchShapes=function(t,e,r,s,i){var a,n,o,h,l=t.length-1,p=[],m=[];for(a=l;a>=0;a-=1){if(h=this.searchProcessedElement(t[a]),h?e[a]=r[h-1]:t[a]._render=i,"fl"==t[a].ty||"st"==t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],s),p.push(e[a].style);else if("gr"==t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,s,i)}else if("tr"==t[a].ty)h||(e[a]=this._cp(t[a],s));else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty||"sr"==t[a].ty)h||(e[a]=this.createShapeElement(t[a],s));else if("tm"==t[a].ty||"rd"==t[a].ty){if(h)f=e[a],f.closed=!1;else{var f=_as.getModifier(t[a].ty);f.init(this,t[a],s),e[a]=f,this.shapeModifiers.push(f)}m.push(f)}else"rp"==t[a].ty&&(h?(f=e[a],f.closed=!0):(f=_as.getModifier(t[a].ty),e[a]=f,f.init(this,t,a,e,s),this.shapeModifiers.push(f),i=!1),m.push(f));this.addProcessedElement(t[a],a+1)}for(l=p.length,a=0;a<l;a+=1)p[a].closed=!0;for(l=m.length,a=0;a<l;a+=1)m[a].closed=!0},_r.prototype.renderInnerContent=function(){this.transformHelper.mat.reset(),this.transformHelper.opacity=this.finalTransform.mProp.o.v,this.transformHelper.matMdf=!1,this.transformHelper.opMdf=this.finalTransform.opMdf,this.renderModifiers(),this.renderShape(this.transformHelper,null,null,!0)},_r.prototype.renderShape=function(t,e,r,s){var i,a;if(!e)for(e=this.shapesData,a=this.stylesList.length,i=0;i<a;i+=1)this.stylesList[i].d="",this.stylesList[i].mdf=!1;r||(r=this.itemsData),a=e.length-1;var n,o;for(n=t,i=a;i>=0;i-=1)if("tr"==e[i].ty){n=r[i].transform;var h=r[i].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.cloneFromProps(h),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=r[i].transform.op.v,n.matMdf=!!t.matMdf||n.matMdf,n.opMdf=!!t.opMdf||n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])}else n.opacity=n.op.o}else"sh"==e[i].ty||"el"==e[i].ty||"rc"==e[i].ty||"sr"==e[i].ty?this.renderPath(e[i],r[i],n):"fl"==e[i].ty?this.renderFill(e[i],r[i],n):"st"==e[i].ty?this.renderStroke(e[i],r[i],n):"gr"==e[i].ty?this.renderShape(n,e[i].it,r[i].it):"tm"==e[i].ty;if(s){a=this.stylesList.length;var p,m,f,c,d,u,y,g=this._x.renderer,v=this._x._da;for(i=0;i<a;i+=1)if(y=this.stylesList[i].type,("st"!==y||0!==this.stylesList[i].wi)&&this.stylesList[i].data._render){for(g.save(),d=this.stylesList[i]._br,"st"===y?(v.strokeStyle=this.stylesList[i].co,v.lineWidth=this.stylesList[i].wi,v.lineCap=this.stylesList[i].lc,v.lineJoin=this.stylesList[i].lj,v.miterLimit=this.stylesList[i].ml||0):v.fillStyle=this.stylesList[i].co,g.ctxOpacity(this.stylesList[i].coOp),"st"!==y&&v.beginPath(),m=d.length,p=0;p<m;p+=1){for("st"===y&&(v.beginPath(),this.stylesList[i].da?(v.setLineDash(this.stylesList[i].da),v.lineDashOffset=this.stylesList[i]["do"],this._x.isDashed=!0):this._x.isDashed&&(v.setLineDash(this.dashResetter),this._x.isDashed=!1)),u=d[p].trNodes,c=u.length,f=0;f<c;f+=1)"m"==u[f].t?v.moveTo(u[f].p[0],u[f].p[1]):"c"==u[f].t?v.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]):v.closePath();"st"===y&&v.stroke()}"st"!==y&&v.fill(this.stylesList[i].r),g.restore()}this._ch&&(this._ch=!1)}},_r.prototype.renderPath=function(t,e,r){var s,i,a,n,o=r.matMdf||e.sh.mdf||this._ch;if(o){var h=e.sh.paths,l=r.mat;n=t._render===!1?0:h._length;var p=e.trNodes;for(p.length=0,a=0;a<n;a+=1){var m=h.shapes[a];if(m&&m.v){for(s=m._length,i=1;i<s;i+=1)1==i&&p.push({t:"m",p:l._cn(m.v[0][0],m.v[0][1],0)}),p.push({t:"c",p1:l._cn(m.o[i-1][0],m.o[i-1][1],0),p2:l._cn(m.i[i][0],m.i[i][1],0),p3:l._cn(m.v[i][0],m.v[i][1],0)});1==s&&p.push({t:"m",p:l._cn(m.v[0][0],m.v[0][1],0)}),m.c&&s&&(p.push({t:"c",p1:l._cn(m.o[i-1][0],m.o[i-1][1],0),p2:l._cn(m.i[0][0],m.i[0][1],0),p3:l._cn(m.v[0][0],m.v[0][1],0)}),p.push({t:"z"})),e.lStr=p}}if(e.st)for(i=0;i<16;i+=1)e.tr[i]=r.mat.props[i];e.trNodes=p}},_r.prototype.renderFill=function(t,e,r){var s=e.style;(e.c.mdf||this._ch)&&(s.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||r.opMdf||this._ch)&&(s.coOp=e.o.v*r.opacity)},_r.prototype.renderStroke=function(t,e,r){var s=e.style,i=e.d;i&&(i.mdf||this._ch)&&(s.da=i.dashArray,s["do"]=i.dashoffset[0]),(e.c.mdf||this._ch)&&(s.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||r.opMdf||this._ch)&&(s.coOp=e.o.v*r.opacity),(e.w.mdf||this._ch)&&(s.wi=e.w.v)},_r.prototype.destroy=function(){this.shapesData=null,this._x=null,this._da=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([_e,_af,_c,_ad,_ac,_ae],_s),_s.prototype._cz=SVGShapeElement.prototype._cz,_s.prototype._az=_h.prototype._az,_s.prototype.renderInnerContent=function(){var t=this._da;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([_e,_af,_c,_ad,_ac,_ae,_k],_t),_t.prototype.tHelper=_cu("canvas").getContext("2d"),_t.prototype.buildNewText=function(){var t=this.textProperty.currentData;this._bt=_cv(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var s,i,a=this._x._cr.getFontByName(t.f),n=t.l,o=this.mHelper;this.stroke=r,this.values.fValue=t.s+"px "+this._x._cr.getFontByName(t.f).fFamily,i=t.t.length;var h,l,p,m,f,c,d,u,y,g,v=this.data.singleShape,b=t.tr/1e3*t.s,E=0,P=0,x=!0,S=0;for(s=0;s<i;s+=1){for(h=this._x._cr.getCharData(t.t.charAt(s),a.fStyle,this._x._cr.getFontByName(t.f).fFamily),l=h&&h.data||{},o.reset(),v&&n[s].n&&(E=-b,P+=t.yOffset,P+=x?1:0,x=!1),f=l.shapes?l.shapes[0].it:[],d=f.length,o.scale(t.s/100,t.s/100),v&&this.applyTextPropertiesToMatrix(t,o,n[s].line,E,P),y=_cv(d),c=0;c<d;c+=1){for(m=f[c].ks.k.i.length,u=f[c].ks.k,g=[],p=1;p<m;p+=1)1==p&&g.push(o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[p][0],u.i[p][1],0),o.applyToY(u.i[p][0],u.i[p][1],0),o.applyToX(u.v[p][0],u.v[p][1],0),o.applyToY(u.v[p][0],u.v[p][1],0));g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[0][0],u.i[0][1],0),o.applyToY(u.i[0][0],u.i[0][1],0),o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),y[c]=g}v&&(E+=n[s].l,E+=b),this.textSpans[S]?this.textSpans[S].elem=y:this.textSpans[S]={elem:y},S+=1}},_t.prototype.renderInnerContent=function(){var t=this._da;this.finalTransform.mat.props;t.font=this.values.fValue,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var e,r,s,i,a,n,o=this.textAnimator._bt,h=this.textProperty.currentData.l;r=h.length;var l,p,m,f=null,c=null,d=null;for(e=0;e<r;e+=1)if(!h[e].n){if(l=o[e],l&&(this._x.renderer.save(),this._x.renderer.ctxTransform(l.p),this._x.renderer.ctxOpacity(l.o)),this.fill){for(l&&l.fc?f!==l.fc&&(f=l.fc,t.fillStyle=l.fc):f!==this.values.fill&&(f=this.values.fill,t.fillStyle=this.values.fill),p=this.textSpans[e].elem,i=p.length,this._x._da.beginPath(),s=0;s<i;s+=1)for(m=p[s],n=m.length,this._x._da.moveTo(m[0],m[1]),a=2;a<n;a+=6)this._x._da.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this._x._da.closePath(),this._x._da.fill()}if(this.stroke){for(l&&l.sw?d!==l.sw&&(d=l.sw,t.lineWidth=l.sw):d!==this.values.sWidth&&(d=this.values.sWidth,t.lineWidth=this.values.sWidth),l&&l.sc?c!==l.sc&&(c=l.sc,t.strokeStyle=l.sc):c!==this.values.stroke&&(c=this.values.stroke,t.strokeStyle=this.values.stroke),p=this.textSpans[e].elem,i=p.length,this._x._da.beginPath(),s=0;s<i;s+=1)for(m=p[s],n=m.length,this._x._da.moveTo(m[0],m[1]),a=2;a<n;a+=6)this._x._da.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this._x._da.closePath(),this._x._da.stroke()}l&&this._x.renderer.restore()}},_o.prototype._ba=function(){},_b.prototype.checkBlendMode=function(){},_b.prototype.get_e=_d.prototype.get_e,_b.prototype.initRendererElement=function(){this._by=_cu("div"),this.data.hasMask?(this._cf=_ct("svg"),this._bx=_ct("g"),this._ca=this._bx,this._cf.appendChild(this._bx),this._by.appendChild(this._cf)):this._bx=this._by,styleDiv(this._by)},_b.prototype.createContainerElements=function(){this.effectsManager=new _o(this),this._bz=this._by,this._ca=this._bx,this.data.ln&&this._bx.setAttribute("id",this.data.ln),0!==this.data.bm&&this.setBlendMode(),this.checkParenting()},_b.prototype.renderElement=function(){this.finalTransform.matMdf&&(this._bz.style.transform=this._bz.style.webkitTransform=this.finalTransform.mat.toCSS()),this.finalTransform.opMdf&&(this._bz.style.opacity=this.finalTransform.mProp.o.v)},_b.prototype._ba=function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._ch&&(this._ch=!1))},_b.prototype.destroy=function(){this._bx=null,this._bz=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},_b.prototype.getDomElement=function(){return this._bx},_b.prototype.addMasks=function(){this.maskManager=new _ay(this.data,this,this._x)},_b.prototype.setMatte=function(){},_b.prototype.buildElementParenting=_ap.prototype.buildElementParenting,extendPrototype([_e,_af,_b,_ad,_ac,_ci],_aa),_aa.prototype.createContent=function(){var t;this.data.hasMask?(t=_ct("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this._cf.setAttribute("width",this.data.sw),this._cf.setAttribute("height",this.data.sh)):(t=_cu("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this._bx.appendChild(t)},extendPrototype([_ap,_g,_b],_w),_w.prototype.createContainerElements=function(){this.data.hasMask?(this._bz=this._bx,this._cf.setAttribute("width",this.data.w),this._cf.setAttribute("height",this.data.h)):this._bz=this._bx,this.effectsManager=new _o(this),this.checkParenting()},extendPrototype([_e,_af,_aa,SVGShapeElement,_b,_ad,_ac,_ae],_z),_z.prototype._renderShapeFrame=_z.prototype.renderInnerContent,_z.prototype.createContent=function(){var t;if(this.data.hasMask)this._bx.appendChild(this.shapesContainer),
-t=this._cf;else{t=_ct("svg");var e=this.comp.data?this.comp.data:this._x._de;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this._bx.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,this._co,0,[],!0),this.shapeCont=t},_z.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&this._ch){var t=this.shapeCont.getBBox(),e=!1;this._cg.w!==t.width&&(this._cg.w=t.width,this.shapeCont.setAttribute("width",t.width),e=!0),this._cg.h!==t.height&&(this._cg.h=t.height,this.shapeCont.setAttribute("height",t.height),e=!0),(e||this._cg.x!==t.x||this._cg.y!==t.y)&&(this._cg.w=t.width,this._cg.h=t.height,this._cg.x=t.x,this._cg.y=t.y,this.shapeCont.setAttribute("viewBox",this._cg.x+" "+this._cg.y+" "+this._cg.w+" "+this._cg.h),this.shapeCont.style.transform=this.shapeCont.style.webkitTransform="translate("+this._cg.x+"px,"+this._cg.y+"px)")}},extendPrototype([_e,_af,_b,_ad,_ac,_ci,_k],_ab),_ab.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this._cf.setAttribute("width",this.compW),this._cf.setAttribute("height",this.compH);var t=_ct("g");this._ca.appendChild(t),this._cc=t}else this.renderType="html",this._cc=this._bx;this.checkParenting()},_ab.prototype.buildNewText=function(){var t=this.textProperty.currentData;this._bt=_cv(this.textProperty.currentData.l?this.textProperty.currentData.l.length:0);var e=this._cc.style;e.color=e.fill=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)",t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var r=this._x._cr.getFontByName(t.f);if(!this._x._cr.chars)if(e.fontSize=t.s+"px",e.lineHeight=t.s+"px",r.fClass)this._cc.className=r.fClass;else{e.fontFamily=r.fFamily;var s=t.fWeight,i=t.fStyle;e.fontStyle=i,e.fontWeight=s}var a,n,o=t.l;n=o.length;var h,l,p,m,f=this.mHelper,c="",d=0;for(a=0;a<n;a+=1){if(this._x._cr.chars?(this.textPaths[d]?h=this.textPaths[d]:(h=_ct("path"),h.setAttribute("stroke-linecap","butt"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[d]?(l=this.textSpans[d],p=l.children[0]):(l=_cu("div"),p=_ct("svg"),p.appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[d]?this.textPaths[d]:_ct("text"):this.textSpans[d]?(l=this.textSpans[d],h=this.textPaths[d]):(l=_cu("span"),styleDiv(l),h=_cu("span"),styleDiv(h),l.appendChild(h)),this._x._cr.chars){var u,y=this._x._cr.getCharData(t.t.charAt(a),r.fStyle,this._x._cr.getFontByName(t.f).fFamily);if(u=y?y.data:null,f.reset(),u&&u.shapes&&(m=u.shapes[0].it,f.scale(t.s/100,t.s/100),c=this.createPathShape(f,m),h.setAttribute("d",c)),this.isMasked)this._cc.appendChild(h);else if(this._cc.appendChild(l),u&&u.shapes){var g=p.getBBox();p.setAttribute("width",g.width+2),p.setAttribute("height",g.height+2),p.setAttribute("viewBox",g.x-1+" "+(g.y-1)+" "+(g.width+2)+" "+(g.height+2)),p.style.transform=p.style.webkitTransform="translate("+(g.x-1)+"px,"+(g.y-1)+"px)",o[a].yOffset=g.y-1,l.appendChild(p)}else p.setAttribute("width",1),p.setAttribute("height",1)}else h.textContent=o[a].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked?this._cc.appendChild(h):(this._cc.appendChild(l),h.style.transform=h.style.webkitTransform="translate3d(0,"+-t.s/1.2+"px,0)");this.isMasked?this.textSpans[d]=h:this.textSpans[d]=l,this.textSpans[d].style.display="block",this.textPaths[d]=h,d+=1}for(;d<this.textSpans.length;)this.textSpans[d].style.display="none",d+=1},_ab.prototype.renderInnerContent=function(){if(this.data.singleShape){if(!this._ch&&!this.lettersChangedFlag)return;this.isMasked&&this.finalTransform.matMdf&&(this._cf.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this._cf.style.transform=this._cf.style.webkitTransform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)")}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var t,e,r=0,s=this.textAnimator._bt,i=this.textProperty.currentData.l;e=i.length;var a,n,o;for(t=0;t<e;t+=1)i[t].n?r+=1:(n=this.textSpans[t],o=this.textPaths[t],a=s[r],r+=1,this.isMasked?n.setAttribute("transform",a.m):n.style.transform=n.style.webkitTransform=a.m,n.style.opacity=a.o,a.sw&&o.setAttribute("stroke-width",a.sw),a.sc&&o.setAttribute("stroke",a.sc),a.fc&&(o.setAttribute("fill",a.fc),o.style.color=a.fc));if(this.isVisible&&this._ch&&this._cc.getBBox){var h=this._cc.getBBox();this._cg.w!==h.width&&(this._cg.w=h.width,this._cf.setAttribute("width",h.width)),this._cg.h!==h.height&&(this._cg.h=h.height,this._cf.setAttribute("height",h.height));var l=1;this._cg.w===h.width+2*l&&this._cg.h===h.height+2*l&&this._cg.x===h.x-l&&this._cg.y===h.y-l||(this._cg.w=h.width+2*l,this._cg.h=h.height+2*l,this._cg.x=h.x-l,this._cg.y=h.y-l,this._cf.setAttribute("viewBox",this._cg.x+" "+this._cg.y+" "+this._cg.w+" "+this._cg.h),this._cf.style.transform=this._cf.style.webkitTransform="translate("+this._cg.x+"px,"+this._cg.y+"px)")}}},extendPrototype([_e,_af,_b,_aa,_ad,_ac,_ae],_y),_y.prototype.createContent=function(){var t=this._x.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=_ct("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this._bx.appendChild(this.imageElem),this._by.setAttribute("width",this.assetData.w),this._by.setAttribute("height",this.assetData.h)):this._bx.appendChild(e),e.src=t,this.data.ln&&this._cc.setAttribute("id",this.data.ln),this.checkParenting()},extendPrototype([_e,_ac],_v),_v.prototype.setup=function(){var t,e,r=this.comp.threeDElements.length;for(t=0;t<r;t+=1)e=this.comp.threeDElements[t],e.perspectiveElem.style.perspective=e.perspectiveElem.style.webkitPerspective=this.pe.v+"px",e.container.style.transformOrigin=e.container.style.mozTransformOrigin=e.container.style.webkitTransformOrigin="0px 0px 0px",e.perspectiveElem.style.transform=e.perspectiveElem.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"},_v.prototype.createElements=function(){},_v.prototype.hide=function(){},_v.prototype._ba=function(){var t,e,r=this._ch;if(this._dd)for(e=this._dd.length,t=0;t<e;t+=1)r=!!this._dd[t].finalTransform.mProp.mdf||r;if(r||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){if(this.mat.reset(),this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]],i=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),a=[s[0]/i,s[1]/i,s[2]/i],n=Math.sqrt(a[2]*a[2]+a[0]*a[0]),o=Math.atan2(a[1],n),h=Math.atan2(a[0],-a[2]);this.mat.rotateY(h).rotateX(-o)}if(this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this._x._de.w/2,this._x._de.h/2,0),this.mat.translate(0,0,this.pe.v),this._dd){var l;for(e=this._dd.length,t=0;t<e;t+=1)l=this._dd[t].finalTransform.mProp.iv.props,this.mat.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],-l[12],-l[13],l[14],l[15])}if(!this._prevMat.equals(this.mat)){e=this.comp.threeDElements.length;var p;for(t=0;t<e;t+=1)p=this.comp.threeDElements[t],p.container.style.transform=p.container.style.webkitTransform=this.mat.toCSS();this.mat.clone(this._prevMat)}}this._ch=!1},_v.prototype._az=function(t){this.prepareProperties(t,!0)},_v.prototype.destroy=function(){},_v.prototype.initExpressions=function(){},_v.prototype.get_e=function(){return null},_bv.prototype._ba=function(){};var Expressions=function(){function t(t){t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer._x.projectInterface.registerComposition(t.renderer)}var e={};return e.initExpressions=t,e}();expressionsPlugin=Expressions;var ExpressionManager=function(){function duplicatePropertyValue(t,e){if(e=e||1,"number"==typeof t||t instanceof Number)return t*e;if(t.i)return shape_pool.clone(t);var r,s=_cs("float32",t.length),i=t.length;for(r=0;r<i;r+=1)s[r]=t[r]*e;return s}function isTypeOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function shapesEqual(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,s=t._length;for(r=0;r<s;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if(isTypeOfArray(t)){var r,s=t.length,i=[];for(r=0;r<s;r+=1)i[r]=-t[r];return i}}function sum(t,e){var r=typeof t,s=typeof e;if("string"===r||"string"===s)return t+e;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t+e;if(isTypeOfArray(t)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t[0]=t[0]+e,t;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&isTypeOfArray(e))return e[0]=t+e[0],e;if(isTypeOfArray(t)&&isTypeOfArray(e)){for(var i=0,a=t.length,n=e.length,o=[];i<a||i<n;)("number"==typeof t[i]||t[i]instanceof Number)&&("number"==typeof e[i]||e[i]instanceof Number)?o[i]=t[i]+e[i]:o[i]=void 0==e[i]?t[i]:t[i]||e[i],i+=1;return o}return 0}function sub(t,e){var r=typeof t,s=typeof e;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return"string"===r&&(t=parseInt(t)),"string"===s&&(e=parseInt(e)),t-e;if(isTypeOfArray(t)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t[0]=t[0]-e,t;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&isTypeOfArray(e))return e[0]=t-e[0],e;if(isTypeOfArray(t)&&isTypeOfArray(e)){for(var i=0,a=t.length,n=e.length,o=[];i<a||i<n;)"number"==typeof t[i]||t[i]instanceof Number?o[i]=t[i]-e[i]:o[i]=void 0==e[i]?t[i]:t[i]||e[i],i+=1;return o}return 0}function mul(t,e){var r,s=typeof t,i=typeof e;if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&("number"===i||"boolean"===i||"string"===i||e instanceof Number))return t*e;var a,n;if(isTypeOfArray(t)&&("number"===i||"boolean"===i||"string"===i||e instanceof Number)){for(n=t.length,r=_cs("float32",n),a=0;a<n;a+=1)r[a]=t[a]*e;return r}if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&isTypeOfArray(e)){for(n=e.length,r=_cs("float32",n),a=0;a<n;a+=1)r[a]=t*e[a];return r}return 0}function div(t,e){var r,s=typeof t,i=typeof e;if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&("number"===i||"boolean"===i||"string"===i||e instanceof Number))return t/e;var a,n;if(isTypeOfArray(t)&&("number"===i||"boolean"===i||"string"===i||e instanceof Number)){for(n=t.length,r=_cs("float32",n),a=0;a<n;a+=1)r[a]=t[a]/e;return r}if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&isTypeOfArray(e)){for(n=e.length,r=_cs("float32",n),a=0;a<n;a+=1)r[a]=t/e[a];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t)),"string"==typeof e&&(e=parseInt(e)),t%e}function clamp(t,e,r){if(e>r){var s=r;r=e,e=s}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}function degreesToRadians(t){return t*degToRads}function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,s=Math.min(t.length,e.length),i=0;for(r=0;r<s;r+=1)i+=Math.pow(e[r]-t[r],2);return Math.sqrt(i)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,s=t[0],i=t[1],a=t[2],n=Math.max(s,i,a),o=Math.min(s,i,a),h=(n+o)/2;if(n==o)e=r=0;else{var l=n-o;switch(r=h>.5?l/(2-n-o):l/(n+o),n){case s:e=(i-a)/l+(i<a?6:0);break;case i:e=(a-s)/l+2;break;case a:e=(s-i)/l+4}e/=6}return[e,r,h,t[3]]}function hslToRgb(t){function e(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var r,s,i,a=t[0],n=t[1],o=t[2];if(0==n)r=s=i=o;else{var h=o<.5?o*(1+n):o+n-o*n,l=2*o-h;r=e(l,h,a+1/3),s=e(l,h,a),i=e(l,h,a-1/3)}return[r,s,i,t[3]]}function linear(t,e,r,s,i){if(void 0===s||void 0===i)return linear(t,0,1,e,r);if(t<=e)return s;if(t>=r)return i;var a=r===e?0:(t-e)/(r-e);if(!s.length)return s+(i-s)*a;var n,o=s.length,h=_cs("float32",o);for(n=0;n<o;n+=1)h[n]=s[n]+(i[n]-s[n])*a;return h}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,s=e.length;t||(t=_cs("float32",s));var i=_cs("float32",s),a=BMMath.random();for(r=0;r<s;r+=1)i[r]=t[r]+a*(e[r]-t[r]);return i}void 0===t&&(t=0);var n=BMMath.random();return t+n*(e-t)}function createPath(t,e,r,s){e=e&&e.length?e:t,r=r&&r.length?r:t;var a=shape_pool.newElement(),n=t.length;for(a.setPathData(s,n),i=0;i<n;i+=1)a._aw(t[i][0],t[i][1],r[i][0]+t[i][0],r[i][1]+t[i][1],e[i][0]+t[i][0],e[i][1]+t[i][1],i,!0);return a}function initiateExpression(elem,data,property){function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],s=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads,i=-Math.atan2(r[1],r[2])/degToRads;return[i,s,0]}function easeOut(t,e,r,s,i){return void 0===s?(s=e,i=r):t=(t-e)/(r-e),-(i-s)*t*(t-2)+s}function easeIn(t,e,r,s,i){return void 0===s?(s=e,i=r):t=(t-e)/(r-e),(i-s)*t*t+s}function nearestKey(t){var e,r,s,i=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,t*=elem.comp._x.frameRate,t<data.k[0].t)r=1,s=data.k[0].t;else{for(e=0;e<i-1;e+=1){if(t===data.k[e].t){r=e+1,s=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,s=data.k[e+1].t):(r=e+1,s=data.k[e].t);break}}r===-1&&(r=e+1,s=data.k[e].t)}else r=0,s=0;var a={};return a.index=r,a.time=s/elem.comp._x.frameRate,a}function key(t){var e,r,s;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp._x.frameRate};var i;for(i=t!==data.k.length-1||data.k[t].h?data.k[t].s:data.k[t-1].e,s=i.length,r=0;r<s;r+=1)e[r]=i[r];return e}function framesToTime(t,e){return e||(e=elem.comp._x.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp._x.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function executeExpression(){if(_needsRandom&&seedRandom(randSeed),this.frameExpressionId!==elem._x.frameId||"textSelector"===this.propType){if(this.lock)return this.v=duplicatePropertyValue(this.pv,this.mult),!0;"textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),anchorPoint=transform.anchorPoint),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!(!elem._dd||!elem._dd.length),hasParent&&!parent&&(parent=elem._dd[0].layerInterface),this.lock=!0,this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp._x.frameRate,needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),"shape"===scoped_bm_rt.propType?this.v=shape_pool.clone(scoped_bm_rt.v):this.v=scoped_bm_rt,this.frameExpressionId=elem._x.frameId;var t,e;if(this.mult)if("unidimensional"===this.propType)this.v*=this.mult;else if(1===this.v.length)this.v=this.v[0]*this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;t<e;t+=1)this.v[t]*=this.mult;if(1===this.v.length&&(this.v=this.v[0]),"unidimensional"===this.propType)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else if("shape"===this.propType)shapesEqual(this.v,this._ak.shapes[0])||(this.mdf=!0,this._ak.releaseShapes(),this._ak.addShape(shape_pool.clone(this.v)));else for(e=this.v.length,t=0;t<e;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0);this.lock=!1}}var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,content,effect,thisComp=elem.comp,thisProperty=property;elem.comp.frameDuration=1/elem.comp._x.frameRate;var inPoint=elem.data.ip/elem.comp._x.frameRate,outPoint=elem.data.op/elem.comp._x.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,loopIn,loop_in,loopOut,loop_out,toWorld,fromWorld,fromComp,fromCompToSurface,anchorPoint,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,wiggle=function(t,e){var r,s,i=this.pv.length?this.pv.length:1,a=_cs("float32",i);t=5;var n=Math.floor(time*t);for(r=0,s=0;r<n;){for(s=0;s<i;s+=1)a[s]+=-e+2*e*BMMath.random();r+=1}var o=time*t,h=o-Math.floor(o),l=_cs("float32",i);if(i>1){for(s=0;s<i;s+=1)l[s]=this.pv[s]+a[s]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut);var loopInDuration=function(t,e){return loopIn(t,e,!0)}.bind(this),loopOutDuration=function(t,e){return loopOut(t,e,!0)}.bind(this);this._dg&&(valueAtTime=this._dg.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp._x.projectInterface.bind(elem.comp._x.projectInterface),time,velocity,value,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!(!elem._dd||!elem._dd.length),parent,randSeed=Math.floor(1e6*Math.random());return executeExpression}var ob={},Math=BMMath,window=null,document=null,add=sum,radians_to_degrees=radiansToDegrees,degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];return ob.initiateExpression=initiateExpression,ob}();!function(){function t(){return this.pv}function e(t,e,r){if(!this.k||!this._df)return this.pv;t=t?t.toLowerCase():"";var s=this.comp.renderedFrame,i=this._df,a=i[i.length-1].t;if(s<=a)return this.pv;var n,o;r?(n=e?Math.abs(a-elem.comp._x.frameRate*e):Math.max(0,a-this.elem.data.ip),o=a-n):((!e||e>i.length-1)&&(e=i.length-1),o=i[i.length-1-e].t,n=a-o);var h,l,p;if("pingpong"===t){var m=Math.floor((s-o)/n);if(m%2!==0)return this._dg((n-(s-o)%n+o)/this.comp._x.frameRate,0)}else{if("offset"===t){var f=this._dg(o/this.comp._x.frameRate,0),c=this._dg(a/this.comp._x.frameRate,0),d=this._dg(((s-o)%n+o)/this.comp._x.frameRate,0),u=Math.floor((s-o)/n);if(this.pv.length){for(p=new Array(f.length),l=p.length,h=0;h<l;h+=1)p[h]=(c[h]-f[h])*u+d[h];return p}return(c-f)*u+d}if("continue"===t){var y=this._dg(a/this.comp._x.frameRate,0),g=this._dg((a-.001)/this.comp._x.frameRate,0);if(this.pv.length){for(p=new Array(y.length),l=p.length,h=0;h<l;h+=1)p[h]=y[h]+(y[h]-g[h])*((s-a)/this.comp._x.frameRate)/5e-4;return p}return y+(y-g)*((s-a)/.001)}}return this._dg(((s-o)%n+o)/this.comp._x.frameRate,0)}function r(t,e,r){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var s=this.comp.renderedFrame,i=this._df,a=i[0].t;if(s>=a)return this.pv;var n,o;r?(n=e?Math.abs(elem.comp._x.frameRate*e):Math.max(0,this.elem.data.op-a),o=a+n):((!e||e>i.length-1)&&(e=i.length-1),o=i[e].t,n=o-a);var h,l,p;if("pingpong"===t){var m=Math.floor((a-s)/n);if(m%2===0)return this._dg(((a-s)%n+a)/this.comp._x.frameRate,0)}else{if("offset"===t){var f=this._dg(a/this.comp._x.frameRate,0),c=this._dg(o/this.comp._x.frameRate,0),d=this._dg((n-(a-s)%n+a)/this.comp._x.frameRate,0),u=Math.floor((a-s)/n)+1;if(this.pv.length){for(p=new Array(f.length),l=p.length,h=0;h<l;h+=1)p[h]=d[h]-(c[h]-f[h])*u;return p}return d-(c-f)*u}if("continue"===t){var y=this._dg(a/this.comp._x.frameRate,0),g=this._dg((a+.001)/this.comp._x.frameRate,0);if(this.pv.length){for(p=new Array(y.length),l=p.length,h=0;h<l;h+=1)p[h]=y[h]+(y[h]-g[h])*(a-s)/.001;return p}return y+(y-g)*(a-s)/.001}}return this._dg((n-(a-s)%n+a)/this.comp._x.frameRate,0)}function s(t){return this._cachingAtTime||(this._cachingAtTime={lastValue:initialDefaultFrame,lastIndex:0}),t!==this._cachingAtTime.lastFrame&&(t*=this.elem._x.frameRate,t-=this.offsetTime,this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this.pv,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value}function i(t){if(void 0!==this.vel)return this.vel;var e,r=-.01,s=this._dg(t),i=this._dg(t+r);if(s.length){e=_cs("float32",s.length);var a;for(a=0;a<s.length;a+=1)e[a]=(i[a]-s[a])/r}else e=(i-s)/r;return e}function a(t){this.propertyGroup=t}function n(t,e,r){e.x&&(r.k=!0,r.x=!0,r.getValue&&(r.getPreValue=r.getValue),r.initiateExpression=ExpressionManager.initiateExpression,r.getValue=r.initiateExpression(t,e,r))}function o(t){}function h(t){}function l(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shape_pool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastTime=t,t*=this.elem._x.frameRate,this.interpolateShape(t,this._cachingAtTime.shapeValue,!1,this._cachingAtTime)),this._cachingAtTime.shapeValue}function p(){}var m=function(){function e(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(r,o){this.pv=1,this.comp=r.comp,this.elem=r,this.mult=.01,this.propType="textSelector",this.textTotal=o.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],n.bind(this)(r,o,this),this.getMult=e,this.getVelocityAtTime=i,this.kf?this._dg=s.bind(this):this._dg=t.bind(this),this._ce=a}}(),f=_ag._bj;_ag._bj=function(t,e,r){var s=f(t,e,r);return s._co.length?s._dg=o.bind(s):s._dg=h.bind(s),s._ce=a,s};var c=_ai._bo;_ai._bo=function(o,h,l,p,m){var f=c(o,h,l,p,m);f.kf?f._dg=s.bind(f):f._dg=t.bind(f),f._ce=a,f.loopOut=e,f.loopIn=r,f.getVelocityAtTime=i,f.numKeys=1===h.a?h.k.length:0;var d=f.k;return f.propertyIndex=h.ix,f._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:0===l?0:_cs("float32",3)},n(o,h,f),!d&&f.x&&m.push(f),f};var d=_ah.getConstructorFunction(),u=_ah.getKeyframedConstructorFunction();p.prototype={vertices:function(t,e){var r=this.v;void 0!==e&&(r=this._dg(e,0));var s,i=r._length,a=r[t],n=r.v,o=_cv(i);for(s=0;s<i;s+=1)"i"===t||"o"===t?o[s]=[a[s][0]-n[s][0],a[s][1]-n[s][1]]:o[s]=[a[s][0],a[s][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var r=this.v;void 0!==e&&(r=this._dg(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var s=this._segmentsLength,i=s.lengths,a=s.totalLength*t,n=0,o=i.length,h=0;n<o;){if(h+i[n].addedLength>a){var l=n,p=r.c&&n===o-1?0:n+1,m=(a-h)/i[n].addedLength,f=bez.getPointInSegment(r.v[l],r.v[p],r.o[l],r.i[p],m,i[n]);break}h+=i[n].addedLength,n+=1}return f||(f=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),f},vectorOnPath:function(t,e,r){t=1==t?this.v.c?0:.999:t;var s=this.pointOnPath(t,e),i=this.pointOnPath(t+.001,e),a=i[0]-s[0],n=i[1]-s[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2)),h="tangent"===r?[a/o,n/o]:[-n/o,a/o];return h},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},_ce:a,_dg:t},extendPrototype([p],d),extendPrototype([p],u),u.prototype._dg=l,u.prototype.initiateExpression=ExpressionManager.initiateExpression;var y=_ah._bp;_ah._bp=function(t,e,r,s,i){var a=y(t,e,r,s,i),o=a.k;return a.propertyIndex=e.ix,a.lock=!1,3===r?n(t,e.pt,a):4===r&&n(t,e.ks,a),!o&&a.x&&s.push(a),a};var g=TextSelectorProp.getTextSelectorProp;TextSelectorProp.getTextSelectorProp=function(t,e,r){return 1===e.t?new m(t,e,r):g(t,e,r)}}(),function(){function t(){return!!this.data.d.x&&(this.comp=this.elem.comp,this.getValue&&(this.getPreValue=this.getValue),this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.getValue=this.getExpressionValue,!0)}_ar.prototype.searchProperty=function(){return this.kf=this.searchExpressions()||this.data.d.k.length>1,this.kf},_ar.prototype.getExpressionValue=function(t){this.calculateExpression(),this.mdf&&(this.currentData.t=this.v.toString(),this.completeTextData(this.currentData))},_ar.prototype.searchExpressions=t}();var ShapeExpressionInterface=function(){function t(t,e,n){var c,d=[],u=t?t.length:0;for(c=0;c<u;c+=1)"gr"==t[c].ty?d.push(r(t[c],e[c],n)):"fl"==t[c].ty?d.push(s(t[c],e[c],n)):"st"==t[c].ty?d.push(i(t[c],e[c],n)):"tm"==t[c].ty?d.push(a(t[c],e[c],n)):"tr"==t[c].ty||("el"==t[c].ty?d.push(o(t[c],e[c],n)):"sr"==t[c].ty?d.push(h(t[c],e[c],n)):"sh"==t[c].ty?d.push(f(t[c],e[c],n)):"rc"==t[c].ty?d.push(l(t[c],e[c],n)):"rd"==t[c].ty?d.push(p(t[c],e[c],n)):"rp"==t[c].ty&&d.push(m(t[c],e[c],n)));return d}function e(e,r,s){var i,a=function(t){for(var e=0,r=i.length;e<r;){if(i[e]._name===t||i[e].mn===t||i[e].propertyIndex===t||i[e].ix===t||i[e].ind===t)return i[e];e+=1}if("number"==typeof t)return i[t-1]};return a.propertyGroup=function(t){return 1===t?a:s(t-1)},i=t(e.it,r.it,a.propertyGroup),a.numProperties=i.length,a.propertyIndex=e.cix,a}function r(t,r,s){var i=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return i.content;case"ADBE Vector Transform Group":case 3:default:return i.transform}};i.propertyGroup=function(t){return 1===t?i:s(t-1)};var a=e(t,r,i.propertyGroup),o=n(t.it[t.it.length-1],r.it[r.it.length-1],i.propertyGroup);return i.content=a,i.transform=o,Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.numProperties=t.np,i.propertyIndex=t.ix,i.nm=t.nm,i.mn=t.mn,i}function s(t,e,r){function s(t){return"Color"===t||"color"===t?s.color:"Opacity"===t||"opacity"===t?s.opacity:void 0}return Object.defineProperties(s,{color:{get:function(){return ExpressionValue(e.c,1/e.c.mult,"color")}},opacity:{get:function(){return ExpressionValue(e.o,100)}},_name:{value:t.nm},mn:{value:t.mn}}),e.c._ce(r),e.o._ce(r),s}function i(t,e,r){function s(t){return 1===t?ob:r(t-1)}function i(t){return 1===t?l:s(t-1)}function a(r){Object.defineProperty(l,t.d[r].nm,{get:function(){return ExpressionValue(e.d.dataProps[r].p)}})}function n(t){return"Color"===t||"color"===t?n.color:"Opacity"===t||"opacity"===t?n.opacity:"Stroke Width"===t||"stroke width"===t?n.strokeWidth:void 0}var o,h=t.d?t.d.length:0,l={};for(o=0;o<h;o+=1)a(o),e.d.dataProps[o].p._ce(i);return Object.defineProperties(n,{color:{get:function(){return ExpressionValue(e.c,1/e.c.mult,"color")}},opacity:{get:function(){return ExpressionValue(e.o,100)}},strokeWidth:{get:function(){return ExpressionValue(e.w)}},dash:{get:function(){return l}},_name:{value:t.nm},mn:{value:t.mn}}),e.c._ce(s),e.o._ce(s),e.w._ce(s),n}function a(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:void 0}return i.propertyIndex=t.ix,e.s._ce(s),e.e._ce(s),e.o._ce(s),i.propertyIndex=t.ix,Object.defineProperties(i,{start:{get:function(){return ExpressionValue(e.s,1/e.s.mult)}},end:{get:function(){return ExpressionValue(e.e,1/e.e.mult)}},offset:{get:function(){return ExpressionValue(e.o)}},_name:{value:t.nm}}),i.mn=t.mn,i}function n(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:void 0}return e.transform.mProps.o._ce(s),e.transform.mProps.p._ce(s),e.transform.mProps.a._ce(s),e.transform.mProps.s._ce(s),e.transform.mProps.r._ce(s),e.transform.mProps.sk&&(e.transform.mProps.sk._ce(s),e.transform.mProps.sa._ce(s)),e.transform.op._ce(s),Object.defineProperties(i,{opacity:{get:function(){return ExpressionValue(e.transform.mProps.o,1/e.transform.mProps.o.mult)}},position:{get:function(){return ExpressionValue(e.transform.mProps.p)}},anchorPoint:{get:function(){return ExpressionValue(e.transform.mProps.a)}},scale:{get:function(){return ExpressionValue(e.transform.mProps.s,1/e.transform.mProps.s.mult)}},rotation:{get:function(){return ExpressionValue(e.transform.mProps.r,1/e.transform.mProps.r.mult)}},skew:{get:function(){return ExpressionValue(e.transform.mProps.sk)}},skewAxis:{get:function(){return ExpressionValue(e.transform.mProps.sa)}},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i}function o(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:void 0}i.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;
-return a.s._ce(s),a.p._ce(s),Object.defineProperties(i,{size:{get:function(){return ExpressionValue(a.s)}},position:{get:function(){return ExpressionValue(a.p)}},_name:{value:t.nm}}),i.mn=t.mn,i}function h(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:void 0:i.innerRadius}var a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.or._ce(s),a.os._ce(s),a.pt._ce(s),a.p._ce(s),a.r._ce(s),t.ir&&(a.ir._ce(s),a.is._ce(s)),Object.defineProperties(i,{position:{get:function(){return ExpressionValue(a.p)}},rotation:{get:function(){return ExpressionValue(a.r,1/a.r.mult)}},points:{get:function(){return ExpressionValue(a.pt)}},outerRadius:{get:function(){return ExpressionValue(a.or)}},outerRoundness:{get:function(){return ExpressionValue(a.os)}},innerRadius:{get:function(){return a.ir?ExpressionValue(a.ir):0}},innerRoundness:{get:function(){return a.is?ExpressionValue(a.is,1/a.is.mult):0}},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:void 0}var a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.p._ce(s),a.s._ce(s),a.r._ce(s),Object.defineProperties(i,{position:{get:function(){return ExpressionValue(a.p)}},roundness:{get:function(){return ExpressionValue(a.r)}},size:{get:function(){return ExpressionValue(a.s)}},_name:{value:t.nm}}),i.mn=t.mn,i}function p(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){if(t.r.ix===e||"Round Corners 1"===e)return i.radius}var a=e;return i.propertyIndex=t.ix,a.rd._ce(s),Object.defineProperties(i,{radius:{get:function(){return ExpressionValue(a.rd)}},_name:{value:t.nm}}),i.mn=t.mn,i}function m(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:void 0}var a=e;return i.propertyIndex=t.ix,a.c._ce(s),a.o._ce(s),Object.defineProperties(i,{copies:{get:function(){return ExpressionValue(a.c)}},offset:{get:function(){return ExpressionValue(a.o)}},_name:{value:t.nm}}),i.mn=t.mn,i}function f(t,e,r){function s(t){return 1==t?i:r(--t)}function i(t){if("Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t)return i.path}var a=e.sh;return a._ce(s),Object.defineProperties(i,{path:{get:function(){return a.k&&a.getValue(),a}},shape:{get:function(){return a.k&&a.getValue(),a}},_name:{value:t.nm},ix:{value:t.ix},mn:{value:t.mn}}),i}return function(e,r,s){function i(t){if("number"==typeof t)return a[t-1];for(var e=0,r=a.length;e<r;){if(a[e]._name===t)return a[e];e+=1}}var a;return i.propertyGroup=s,a=t(e,r,i),i}}(),TextExpressionInterface=function(){return function(t){function e(){}var r,s;return Object.defineProperty(e,"sourceText",{get:function(){var e=t.textProperty.currentData.t;return t.textProperty.currentData.t!==r&&(t.textProperty.currentData.t=r,s=new String(e),s.value=e?e:new String(e)),s}}),e}}(),LayerExpressionInterface=function(){function t(t,e){var r=new Matrix;r.reset();var s;if(s=e?this._elem.finalTransform.mProp:this._elem.finalTransform.mProp,s.applyToMatrix(r),this._elem._dd&&this._elem._dd.length){var i,a=this._elem._dd.length;for(i=0;i<a;i+=1)this._elem._dd[i].finalTransform.mProp.applyToMatrix(r);return r._cn(t[0],t[1],t[2]||0)}return r._cn(t[0],t[1],t[2]||0)}function e(t,e){var r=new Matrix;r.reset();var s;if(s=e?this._elem.finalTransform.mProp:this._elem.finalTransform.mProp,s.applyToMatrix(r),this._elem._dd&&this._elem._dd.length){var i,a=this._elem._dd.length;for(i=0;i<a;i+=1)this._elem._dd[i].finalTransform.mProp.applyToMatrix(r);return r.inversePoint(t)}return r.inversePoint(t)}function r(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem._dd&&this._elem._dd.length){var r,s=this._elem._dd.length;for(r=0;r<s;r+=1)this._elem._dd[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}return function(s){function i(t){n.mask=new MaskManagerInterface(t,s)}function a(t){n.effect=t}function n(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return n.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return o;case 4:case"ADBE Effect Parade":return n.effect}}var o;n.toWorld=t,n.fromWorld=e,n.toComp=t,n.fromComp=r,n.sourceRectAtTime=s.sourceRectAtTime.bind(s),n._elem=s,o=TransformExpressionInterface(s.finalTransform.mProp);var h=getDescriptor(o,"anchorPoint");return Object.defineProperties(n,{hasParent:{get:function(){return s._dd.length}},parent:{get:function(){return s._dd[0].layerInterface}},rotation:getDescriptor(o,"rotation"),scale:getDescriptor(o,"scale"),position:getDescriptor(o,"position"),opacity:getDescriptor(o,"opacity"),anchorPoint:h,anchor_point:h,transform:{get:function(){return o}},active:{get:function(){return s.isInRange}}}),n.startTime=s.data.st,n.index=s.data.ind,n.source=s.data.refId,n.height=0===s.data.ty?s.data.h:100,n.width=0===s.data.ty?s.data.w:100,n.registerMaskInterface=i,n.registerEffectsInterface=a,n}}(),CompExpressionInterface=function(){return function(t){function e(e){for(var r=0,s=t.layers.length;r<s;){if(t.layers[r].nm===e||t.layers[r].ind===e)return t._br[r].layerInterface;r+=1}return{active:!1}}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t._x._de.h,e.width=t._x._de.w,e.pixelAspect=1,e.frameDuration=1/t._x.frameRate,e}}(),TransformExpressionInterface=function(){return function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity}}return Object.defineProperty(e,"rotation",{get:function(){return t.r?ExpressionValue(t.r,1/degToRads):ExpressionValue(t.rz,1/degToRads)}}),Object.defineProperty(e,"scale",{get:function(){return ExpressionValue(t.s,100)}}),Object.defineProperty(e,"position",{get:function(){return t.p?ExpressionValue(t.p):[t.px.v,t.py.v,t.pz?t.pz.v:0]}}),Object.defineProperty(e,"xPosition",{get:function(){return ExpressionValue(t.px)}}),Object.defineProperty(e,"yPosition",{get:function(){return ExpressionValue(t.py)}}),Object.defineProperty(e,"zPosition",{get:function(){return ExpressionValue(t.pz)}}),Object.defineProperty(e,"anchorPoint",{get:function(){return ExpressionValue(t.a)}}),Object.defineProperty(e,"opacity",{get:function(){return ExpressionValue(t.o,100)}}),Object.defineProperty(e,"skew",{get:function(){return ExpressionValue(t.sk)}}),Object.defineProperty(e,"skewAxis",{get:function(){return ExpressionValue(t.sa)}}),Object.defineProperty(e,"orientation",{get:function(){return ExpressionValue(t.or)}}),e}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,r=this.compositions.length;e<r;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e]._az&&this.compositions[e]._az(this.compositions[e].data.xt?this.currentFrame:this.compositions[e].renderedFrame),this.compositions[e].compInterface;e+=1}}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),EffectsExpressionInterface=function(){function t(t,r){if(t.effects){var s,i=[],a=t.data.ef,n=t.effects._cm.length;for(s=0;s<n;s+=1)i.push(e(a[s],t.effects._cm[s],r,t));return function(e){for(var r=t.data.ef,s=0,a=r.length;s<a;){if(e===r[s].nm||e===r[s].mn||e===r[s].ix)return i[s];s+=1}}}}function e(t,s,i,a){function n(t){return 1===t?p:i(t-1)}var o,h=[],l=t.ef.length;for(o=0;o<l;o+=1)5===t.ef[o].ty?h.push(e(t.ef[o],s._cm[o],s._cm[o].propertyGroup,a)):h.push(r(s._cm[o],t.ef[o].ty,a,n));var p=function(e){for(var r=t.ef,s=0,i=r.length;s<i;){if(e===r[s].nm||e===r[s].mn||e===r[s].ix)return 5===r[s].ty?h[s]:h[s]();s+=1}return h[0]()};return p.propertyGroup=n,"ADBE Color Control"===t.mn&&Object.defineProperty(p,"color",{get:function(){return h[0]()}}),Object.defineProperty(p,"numProperties",{get:function(){return t.np}}),p.active=0!==t.en,p}function r(t,e,r,s){function i(){return 10===e?r.comp.compInterface(t.p.v):ExpressionValue(t.p)}return t.p._ce&&t.p._ce(s),i}var s={createEffectsInterface:t};return s}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}});var e=function(e,r){var s,i=_cv(e.viewData.length),a=e.viewData.length;for(s=0;s<a;s+=1)i[s]=new t(e.viewData[s],e.masksProperties[s]);var n=function(t){for(s=0;s<a;){if(e.masksProperties[s].nm===t)return i[s];s+=1}};return n};return e}(),ExpressionValue=function(){return function(t,e,r){var s;t.k&&t.getValue();var i,a,n;if(r){if("color"===r){for(a=4,s=_cs("float32",a),n=_cs("float32",a),i=0;i<a;i+=1)s[i]=n[i]=e&&i<3?t.v[i]*e:1;s.value=n}}else if("number"==typeof t.v||t.v instanceof Number)s=e?new Number(t.v*e):new Number(t.v),s.value=e?t.v*e:t.v;else{for(a=t.v.length,s=_cs("float32",a),n=_cs("float32",a),i=0;i<a;i+=1)s[i]=n[i]=e?t.v[i]*e:t.v[i];s.value=n}return s.numKeys=t._df?t._df.length:0,s.key=function(e){return s.numKeys?t._df[e-1].t:0},s.valueAtTime=t._dg,s.propertyGroup=t.propertyGroup,s}}();GroupEffect.prototype.getValue=function(){this.mdf=!1;var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue(),this.mdf=!!this._co[t].mdf||this.mdf},GroupEffect.prototype.init=function(t,e,r){this.data=t,this.mdf=!1,this._cm=[];var s,i,a=this.data.ef.length,n=this.data.ef;for(s=0;s<a;s+=1)switch(n[s].ty){case 0:i=new SliderEffect(n[s],e,r),this._cm.push(i);break;case 1:i=new AngleEffect(n[s],e,r),this._cm.push(i);break;case 2:i=new ColorEffect(n[s],e,r),this._cm.push(i);break;case 3:i=new PointEffect(n[s],e,r),this._cm.push(i);break;case 4:case 7:i=new CheckboxEffect(n[s],e,r),this._cm.push(i);break;case 10:i=new LayerIndexEffect(n[s],e,r),this._cm.push(i);break;case 11:i=new MaskIndexEffect(n[s],e,r),this._cm.push(i);break;case 5:i=new EffectsManager(n[s],e,r),this._cm.push(i);break;case 6:default:i=new NoValueEffect(n[s],e,r),this._cm.push(i)}};var lottiejs={};lottiejs.play=play,lottiejs.pause=pause,lottiejs.setLocationHref=setLocationHref,lottiejs.togglePause=togglePause,lottiejs.setSpeed=setSpeed,lottiejs.setDirection=setDirection,lottiejs.stop=stop,lottiejs.moveFrame=moveFrame,lottiejs.searchAnimations=searchAnimations,lottiejs.registerAnimation=registerAnimation,lottiejs.loadAnimation=loadAnimation,lottiejs.setSubframeRendering=setSubframeRendering,lottiejs.resize=resize,lottiejs.goToAndStop=goToAndStop,lottiejs.destroy=destroy,lottiejs.setQuality=setQuality,lottiejs.inBrowser=inBrowser,lottiejs.installPlugin=installPlugin,lottiejs.__getFactory=getFactory,lottiejs.version="5.0.6";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""},queryString=myScript.src.replace(/^[^\?]+\??/,"");renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);return lottiejs});
\ No newline at end of file
+!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(t):(t.lottie=e(t),t.bodymovin=t.lottie)}(window||{},function(window){"use strict";function ProjectInterface(){return{}}function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin=t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="visible",t.style.transformStyle=t.style.webkitTransformStyle=t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,i,r){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=r<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,i,r){this.type=t,this.currentLoop=i,this.totalLoops=e,this.direction=r<0?-1:1}function BMSegmentStartEvent(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function BMDestroyEvent(t,e){this.type=t,this.target=e}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var i,r="";for(i=t;i>0;--i)r+=e[Math.round(Math.random()*(e.length-1))];return r}function HSVtoRGB(t,e,i){var r,s,a,n,o,h,l,p;switch(n=Math.floor(6*t),o=6*t-n,h=i*(1-e),l=i*(1-o*e),p=i*(1-(1-o)*e),n%6){case 0:r=i,s=p,a=h;break;case 1:r=l,s=i,a=h;break;case 2:r=h,s=i,a=p;break;case 3:r=h,s=l,a=i;break;case 4:r=p,s=h,a=i;break;case 5:r=i,s=h,a=l}return[r,s,a]}function RGBtoHSV(t,e,i){var r,s=Math.max(t,e,i),a=Math.min(t,e,i),n=s-a,o=0===s?0:n/s,h=s/255;switch(s){case a:r=0;break;case t:r=e-i+n*(e<i?6:0),r/=6*n;break;case e:r=i-t+2*n,r/=6*n;break;case i:r=t-e+4*n,r/=6*n}return[r,o,h]}function addSaturationToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[1]+=e,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}function BaseEvent(){}function createSizedArray(t){return Array.apply(null,{length:t})}function createNS(t){return document.createElementNS(svgNS,t)}function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var i,r,s=t.length;for(i=0;i<s;i+=1){r=t[i].prototype;for(var a in r)r.hasOwnProperty(a)&&(e.prototype[a]=r[a])}}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}function bezFunction(){function t(t,e,i,r,s,a){var n=t*r+e*s+i*a-s*r-a*t-i*e;return n>-1e-4&&n<1e-4}function e(e,i,r,s,a,n,o,h,l){if(0===r&&0===n&&0===l)return t(e,i,s,a,o,h);var p,m=Math.sqrt(Math.pow(s-e,2)+Math.pow(a-i,2)+Math.pow(n-r,2)),f=Math.sqrt(Math.pow(o-e,2)+Math.pow(h-i,2)+Math.pow(l-r,2)),c=Math.sqrt(Math.pow(o-s,2)+Math.pow(h-a,2)+Math.pow(l-n,2));return p=m>f?m>c?m-f-c:c-f-m:c>f?c-f-m:f-m-c,p>-1e-4&&p<1e-4}function i(t){var e,i=segments_length_pool.newElement(),r=t.c,s=t.v,a=t.o,n=t.i,o=t._length,l=i.lengths,p=0;for(e=0;e<o-1;e+=1)l[e]=h(s[e],s[e+1],a[e],n[e+1]),p+=l[e].addedLength;return r&&(l[e]=h(s[e],s[0],a[e],n[0]),p+=l[e].addedLength),i.totalLength=p,i}function r(t){this.segmentLength=0,this.points=new Array(t)}function s(t,e){this.partialLength=t,this.point=e}function a(t,e){var i=e.percents,r=e.lengths,s=i.length,a=bm_floor((s-1)*t),n=t*e.addedLength,o=0;if(a===s-1||0===a||n===r[a])return i[a];for(var h=r[a]>n?-1:1,l=!0;l;)if(r[a]<=n&&r[a+1]>n?(o=(n-r[a])/(r[a+1]-r[a]),l=!1):a+=h,a<0||a>=s-1){if(a===s-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}function n(t,e,i,r,s,n){var o=a(s,n),h=1-o,l=Math.round(1e3*(h*h*h*t[0]+(o*h*h+h*o*h+h*h*o)*i[0]+(o*o*h+h*o*o+o*h*o)*r[0]+o*o*o*e[0]))/1e3,p=Math.round(1e3*(h*h*h*t[1]+(o*h*h+h*o*h+h*h*o)*i[1]+(o*o*h+h*o*o+o*h*o)*r[1]+o*o*o*e[1]))/1e3;return[l,p]}function o(t,e,i,r,s,n,o){s=s<0?0:s>1?1:s;var h=a(s,o);n=n>1?1:n;var l,m=a(n,o),f=t.length,c=1-h,d=1-m,u=c*c*c,y=h*c*c*3,g=h*h*c*3,v=h*h*h,b=c*c*d,E=h*c*d+c*h*d+c*c*m,P=h*h*d+c*h*m+h*c*m,x=h*h*m,S=c*d*d,_=h*d*d+c*m*d+c*d*m,C=h*m*d+c*m*m+h*d*m,A=h*m*m,k=d*d*d,M=m*d*d+d*m*d+d*d*m,T=m*m*d+d*m*m+m*d*m,D=m*m*m;for(l=0;l<f;l+=1)p[4*l]=Math.round(1e3*(u*t[l]+y*i[l]+g*r[l]+v*e[l]))/1e3,p[4*l+1]=Math.round(1e3*(b*t[l]+E*i[l]+P*r[l]+x*e[l]))/1e3,p[4*l+2]=Math.round(1e3*(S*t[l]+_*i[l]+C*r[l]+A*e[l]))/1e3,p[4*l+3]=Math.round(1e3*(k*t[l]+M*i[l]+T*r[l]+D*e[l]))/1e3;return p}var h=(Math,function(){return function(t,e,i,r){var s,a,n,o,h,l,p=defaultCurveSegments,m=0,f=[],c=[],d=bezier_length_pool.newElement();for(n=i.length,s=0;s<p;s+=1){for(h=s/(p-1),l=0,a=0;a<n;a+=1)o=bm_pow(1-h,3)*t[a]+3*bm_pow(1-h,2)*h*i[a]+3*(1-h)*bm_pow(h,2)*r[a]+bm_pow(h,3)*e[a],f[a]=o,null!==c[a]&&(l+=bm_pow(f[a]-c[a],2)),c[a]=f[a];l&&(l=bm_sqrt(l),m+=l),d.percents[s]=h,d.lengths[s]=m}return d.addedLength=m,d}}()),l=function(){var e={};return function(i){var a=i.s,n=i.e,o=i.to,h=i.ti,l=(a[0]+"_"+a[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]+"_"+h[0]+"_"+h[1]).replace(/\./g,"p");if(e[l])return void(i.bezierData=e[l]);var p,m,f,c,d,u,y,g=defaultCurveSegments,v=0,b=null;2===a.length&&(a[0]!=n[0]||a[1]!=n[1])&&t(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&t(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(g=2);var E=new r(g);for(f=o.length,p=0;p<g;p+=1){for(y=createSizedArray(f),d=p/(g-1),u=0,m=0;m<f;m+=1)c=bm_pow(1-d,3)*a[m]+3*bm_pow(1-d,2)*d*(a[m]+o[m])+3*(1-d)*bm_pow(d,2)*(n[m]+h[m])+bm_pow(d,3)*n[m],y[m]=c,null!==b&&(u+=bm_pow(y[m]-b[m],2));u=bm_sqrt(u),v+=u,E.points[p]=new s(u,y),b=y}E.segmentLength=v,i.bezierData=E,e[l]=E}}(),p=createTypedArray("float32",8);return{getSegmentsLength:i,getNewSegment:o,getPointInSegment:n,buildBezierData:l,pointOnLine2D:t,pointOnLine3D:e}}function dataFunctionManager(){function t(s,a,o){var h,l,p,m,f,c,d,u,y=s.length;for(m=0;m<y;m+=1)if(h=s[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(s[m-1].td=h.tt),l=[],p=-1,h.hasMask){var g=h.masksProperties;for(c=g.length,f=0;f<c;f+=1)if(g[f].pt.k.i)r(g[f].pt.k);else for(u=g[f].pt.k.length,d=0;d<u;d+=1)g[f].pt.k[d].s&&r(g[f].pt.k[d].s[0]),g[f].pt.k[d].e&&r(g[f].pt.k[d].e[0])}0===h.ty?(h.layers=e(h.refId,a),t(h.layers,a,o)):4===h.ty?i(h.shapes):5==h.ty&&n(h,o)}}function e(t,e){for(var i=0,r=e.length;i<r;){if(e[i].id===t)return e[i].layers.__used?JSON.parse(JSON.stringify(e[i].layers)):(e[i].layers.__used=!0,e[i].layers);i+=1}}function i(t){var e,s,a,n=t.length,o=!1;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)r(t[e].ks.k);else for(a=t[e].ks.k.length,s=0;s<a;s+=1)t[e].ks.k[s].s&&r(t[e].ks.k[s].s[0]),t[e].ks.k[s].e&&r(t[e].ks.k[s].e[0]);o=!0}else"gr"==t[e].ty&&i(t[e].it)}function r(t){var e,i=t.i.length;for(e=0;e<i;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function s(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&void 0))}function a(e,i){e.__complete||(l(e),o(e),h(e),p(e),t(e.layers,e.assets,i),e.__complete=!0)}function n(t,e){0!==t.t.a.length||"m"in t.t.p||(t.singleShape=!0)}var o=function(){function t(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function e(e){var i,r=e.length;for(i=0;i<r;i+=1)5===e[i].ty&&t(e[i])}var i=[4,4,14];return function(t){if(s(i,t.v)&&(e(t.layers),t.assets)){var r,a=t.assets.length;for(r=0;r<a;r+=1)t.assets[r].layers&&e(t.assets[r].layers)}}}(),h=function(){var t=[4,7,99];return function(e){if(e.chars&&!s(t,e.v)){var i,a,n,o,h,l=e.chars.length;for(i=0;i<l;i+=1)if(e.chars[i].data&&e.chars[i].data.shapes)for(h=e.chars[i].data.shapes[0].it,n=h.length,a=0;a<n;a+=1)o=h[a].ks.k,o.__converted||(r(h[a].ks.k),o.__converted=!0)}}}(),l=function(){function t(e){var i,r,s,a=e.length;for(i=0;i<a;i+=1)if("gr"===e[i].ty)t(e[i].it);else if("fl"===e[i].ty||"st"===e[i].ty)if(e[i].c.k&&e[i].c.k[0].i)for(s=e[i].c.k.length,r=0;r<s;r+=1)e[i].c.k[r].s&&(e[i].c.k[r].s[0]/=255,e[i].c.k[r].s[1]/=255,e[i].c.k[r].s[2]/=255,e[i].c.k[r].s[3]/=255),e[i].c.k[r].e&&(e[i].c.k[r].e[0]/=255,e[i].c.k[r].e[1]/=255,e[i].c.k[r].e[2]/=255,e[i].c.k[r].e[3]/=255);else e[i].c.k[0]/=255,e[i].c.k[1]/=255,e[i].c.k[2]/=255,e[i].c.k[3]/=255}function e(e){var i,r=e.length;for(i=0;i<r;i+=1)4===e[i].ty&&t(e[i].shapes)}var i=[4,1,9];return function(t){if(s(i,t.v)&&(e(t.layers),t.assets)){var r,a=t.assets.length;for(r=0;r<a;r+=1)t.assets[r].layers&&e(t.assets[r].layers)}}}(),p=function(){function t(e){var i,r,s,a=e.length,n=!1;for(i=a-1;i>=0;i-=1)if("sh"==e[i].ty){if(e[i].ks.k.i)e[i].ks.k.c=e[i].closed;else for(s=e[i].ks.k.length,r=0;r<s;r+=1)e[i].ks.k[r].s&&(e[i].ks.k[r].s[0].c=e[i].closed),e[i].ks.k[r].e&&(e[i].ks.k[r].e[0].c=e[i].closed);n=!0}else"gr"==e[i].ty&&t(e[i].it)}function e(e){var i,r,s,a,n,o,h=e.length;for(r=0;r<h;r+=1){if(i=e[r],i.hasMask){var l=i.masksProperties;for(a=l.length,s=0;s<a;s+=1)if(l[s].pt.k.i)l[s].pt.k.c=l[s].cl;else for(o=l[s].pt.k.length,n=0;n<o;n+=1)l[s].pt.k[n].s&&(l[s].pt.k[n].s[0].c=l[s].cl),l[s].pt.k[n].e&&(l[s].pt.k[n].e[0].c=l[s].cl)}4===i.ty&&t(i.shapes)}}var i=[4,4,18];return function(t){if(s(i,t.v)&&(e(t.layers),t.assets)){var r,a=t.assets.length;for(r=0;r<a;r+=1)t.assets[r].layers&&e(t.assets[r].layers)}}}(),m={};return m.completeData=a,m}function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}function DashProperty(t,e,i,r){this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=i,this._mdf=!1,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length-1),this.dashoffset=createTypedArray("float32",1);var s,a,n=e.length;for(s=0;s<n;s+=1)a=PropertyFactory.getProp(t,e[s].v,0,0,r),this.k=!!a.k||this.k,this.dataProps[s]={n:e[s].n,p:a};this.k?r.push(this):this.getValue(!0)}function GradientProperty(t,e,i){this.prop=PropertyFactory.getProp(t,e.k,1,null,[]),this.data=e,this.k=this.prop.k,this.c=createTypedArray("uint8c",4*e.p);var r=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.prop.k&&i.push(this),this.getValue(!0)}function TextAnimatorProperty(t,e,i){this._mdf=!1,this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._dynamicProperties=[],this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1}function TextAnimatorDataProperty(t,e,i){var r={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,i):r,rx:a.rx?s(t,a.rx,0,degToRads,i):r,ry:a.ry?s(t,a.ry,0,degToRads,i):r,sk:a.sk?s(t,a.sk,0,degToRads,i):r,sa:a.sa?s(t,a.sa,0,degToRads,i):r,s:a.s?s(t,a.s,1,.01,i):r,a:a.a?s(t,a.a,1,0,i):r,o:a.o?s(t,a.o,0,.01,i):r,p:a.p?s(t,a.p,1,0,i):r,sw:a.sw?s(t,a.sw,0,0,i):r,sc:a.sc?s(t,a.sc,1,0,i):r,fc:a.fc?s(t,a.fc,1,0,i):r,fh:a.fh?s(t,a.fh,0,0,i):r,fs:a.fs?s(t,a.fs,0,.01,i):r,fb:a.fb?s(t,a.fb,0,.01,i):r,t:a.t?s(t,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function LetterProps(t,e,i,r,s,a){this.o=t,this.sw=e,this.sc=i,this.fc=r,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!r,m:!0,p:!0}}function TextProperty(t,e,i){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!0,this.data=e,this.elem=t,this.keysIndex=-1,this.canResize=!1,this.minimumFontSize=1,this.currentData={ascent:0,boxWidth:[0,0],f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:[0,0],fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,__complete:!1,finalSize:0,finalText:"",finalLineHeight:0},this.searchProperty()?i.push(this):this.getValue(!0)}function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i=createNS("g");this.svgElement.appendChild(i),this.layerElement=i;var r=createNS("defs");this.svgElement.appendChild(r),this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!e||e.hideOnTransparent!==!1,viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||""},this.globalData={_mdf:!1,frameNum:-1,defs:r,frameId:0,compSize:{w:0,h:0},renderConfig:this.renderConfig,fontManager:new FontManager},this.elements=[],this.pendingElements=[],this.destroyed=!1}function MaskElement(t,e,i,r){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null,this._isFirstFrame=!0;var s,a=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(n),this.solidPath="";var o,h,l,p,m,f,c,d=this.masksProperties,u=0,y=[],g=randomString(10),v="clipPath",b="clip-path";for(s=0;s<n;s++)if(("a"!==d[s].mode&&"n"!==d[s].mode||d[s].inv||100!==d[s].o.k)&&(v="mask",b="mask"),"s"!=d[s].mode&&"i"!=d[s].mode||0!==u?p=null:(p=createNS("rect"),p.setAttribute("fill","#ffffff"),p.setAttribute("width",this.element.comp.data.w),p.setAttribute("height",this.element.comp.data.h),y.push(p)),o=createNS("path"),"n"!=d[s].mode){u+=1,o.setAttribute("fill","s"===d[s].mode?"#000000":"#ffffff"),o.setAttribute("clip-rule","nonzero");var E;if(0!==d[s].x.k?(v="mask",b="mask",c=PropertyFactory.getProp(this.element,d[s].x,0,null,r),E="fi_"+randomString(10),m=createNS("filter"),m.setAttribute("id",E),f=createNS("feMorphology"),f.setAttribute("operator","dilate"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),m.appendChild(f),a.appendChild(m),o.setAttribute("stroke","s"===d[s].mode?"#000000":"#ffffff")):(f=null,c=null),this.storedData[s]={elem:o,x:c,expan:f,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},"i"==d[s].mode){l=y.length;var P=createNS("g");for(h=0;h<l;h+=1)P.appendChild(y[h]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",g+"_"+u),x.appendChild(o),a.appendChild(x),P.setAttribute("mask","url("+locationHref+"#"+g+"_"+u+")"),y.length=0,y.push(P)}else y.push(o);d[s].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[s]={elem:o,lastPath:"",op:PropertyFactory.getProp(this.element,d[s].o,0,.01,r),prop:ShapePropertyFactory.getShapeProp(this.element,d[s],3,r,null),invRect:p},this.viewData[s].prop.k||this.drawPath(d[s],this.viewData[s].prop.v,this.viewData[s])}else this.viewData[s]={op:PropertyFactory.getProp(this.element,d[s].o,0,.01,r),prop:ShapePropertyFactory.getShapeProp(this.element,d[s],3,r,null),elem:o},a.appendChild(o);for(this.maskElement=createNS(v),n=y.length,s=0;s<n;s+=1)this.maskElement.appendChild(y[s]);u>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(b,"url("+locationHref+"#"+g+")"),a.appendChild(this.maskElement))}function HierarchyElement(){}function FrameElement(){}function TransformElement(){}function RenderableElement(){}function RenderableDOMElement(){}function ProcessedElement(t,e){this.elem=t,this.pos=e}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!1,this.pElem=createNS("path"),this.msElem=null}function SVGShapeData(t,e,i){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=i,this.lvl=e}function SVGTransformData(t,e){this.transform={mProps:t,op:e},this.elements=[]}function SVGStrokeStyleData(t,e,i,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,i),this.w=PropertyFactory.getProp(t,e.w,0,null,i),this.d=new DashProperty(t,e.d||{},"svg",i),this.c=PropertyFactory.getProp(t,e.c,1,255,i),this.style=r}function SVGFillStyleData(t,e,i,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,i),this.c=PropertyFactory.getProp(t,e.c,1,255,i),this.style=r}function SVGGradientFillStyleData(t,e,i,r){this.initGradientData(t,e,i,r)}function SVGGradientStrokeStyleData(t,e,i,r){this.w=PropertyFactory.getProp(t,e.w,0,null,i),this.d=new DashProperty(t,e.d||{},"svg",i),this.initGradientData(t,e,i,r)}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function BaseElement(){}function NullElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initFrame(),this.initTransform(t,e,i),this.initHierarchy()}function SVGBaseElement(){}function IShapeElement(){}function ITextElement(){}function ICompElement(){}function IImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i)}function ISolidElement(t,e,i){this.initElement(t,e,i)}function SVGCompElement(t,e,i){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this.dynamicProperties):{_placeholder:!0}}function SVGTextElement(t,e,i){this.textSpans=[],this.renderType="svg",this.initElement(t,e,i)}function SVGShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.initElement(t,e,i),this.prevViewData=[]}function SVGTintFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");if(i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i),i=createNS("feColorMatrix"),i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result","f2"),t.appendChild(i),this.matrixFilter=i,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var r=createNS("feMerge");t.appendChild(r);var s;s=createNS("feMergeNode"),s.setAttribute("in","SourceGraphic"),r.appendChild(s),s=createNS("feMergeNode"),s.setAttribute("in","f2"),r.appendChild(s)}}function SVGFillFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(i),this.matrixFilter=i}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),i.setAttribute("result","f1"),t.appendChild(i);var r=createNS("feComponentTransfer");r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),this.matrixFilter=r;var s=createNS("feFuncR");s.setAttribute("type","table"),r.appendChild(s),this.feFuncR=s;var a=createNS("feFuncG");a.setAttribute("type","table"),r.appendChild(a),this.feFuncG=a;var n=createNS("feFuncB");n.setAttribute("type","table"),r.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var i=this.filterManager.effectElements,r=createNS("feComponentTransfer");(i[10].p.k||0!==i[10].p.v||i[11].p.k||1!==i[11].p.v||i[12].p.k||1!==i[12].p.v||i[13].p.k||0!==i[13].p.v||i[14].p.k||1!==i[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",r)),(i[17].p.k||0!==i[17].p.v||i[18].p.k||1!==i[18].p.v||i[19].p.k||1!==i[19].p.v||i[20].p.k||0!==i[20].p.v||i[21].p.k||1!==i[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",r)),(i[24].p.k||0!==i[24].p.v||i[25].p.k||1!==i[25].p.v||i[26].p.k||1!==i[26].p.v||i[27].p.k||0!==i[27].p.v||i[28].p.k||1!==i[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",r)),(i[31].p.k||0!==i[31].p.v||i[32].p.k||1!==i[32].p.v||i[33].p.k||1!==i[33].p.v||i[34].p.k||0!==i[34].p.v||i[35].p.k||1!==i[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",r)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),r=createNS("feComponentTransfer")),(i[3].p.k||0!==i[3].p.v||i[4].p.k||1!==i[4].p.v||i[5].p.k||1!==i[5].p.v||i[6].p.k||0!==i[6].p.v||i[7].p.k||1!==i[7].p.v)&&(r.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(r),this.feFuncRComposed=this.createFeFunc("feFuncR",r),this.feFuncGComposed=this.createFeFunc("feFuncG",r),this.feFuncBComposed=this.createFeFunc("feFuncB",r))}function SVGDropShadowEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","400%"),t.setAttribute("height","400%"),this.filterManager=e;var i=createNS("feGaussianBlur");i.setAttribute("in","SourceAlpha"),i.setAttribute("result","drop_shadow_1"),i.setAttribute("stdDeviation","0"),this.feGaussianBlur=i,t.appendChild(i);var r=createNS("feOffset");r.setAttribute("dx","25"),r.setAttribute("dy","0"),r.setAttribute("in","drop_shadow_1"),r.setAttribute("result","drop_shadow_2"),this.feOffset=r,t.appendChild(r);var s=createNS("feFlood");s.setAttribute("flood-color","#00ff00"),s.setAttribute("flood-opacity","1"),s.setAttribute("result","drop_shadow_3"),this.feFlood=s,t.appendChild(s);var a=createNS("feComposite");a.setAttribute("in","drop_shadow_3"),a.setAttribute("in2","drop_shadow_2"),a.setAttribute("operator","in"),a.setAttribute("result","drop_shadow_4"),t.appendChild(a);var n=createNS("feMerge");t.appendChild(n);var o;o=createNS("feMergeNode"),n.appendChild(o),o=createNS("feMergeNode"),o.setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=n,this.originalNodeAdded=!1,n.appendChild(o)}function SVGMatte3Effect(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGEffects(t){var e,i=t.data.ef?t.data.ef.length:0,r=randomString(10),s=filtersFactory.createFilter(r),a=0;this.filters=[];var n;for(e=0;e<i;e+=1)n=null,20===t.data.ef[e].ty?(a+=1,n=new SVGTintFilter(s,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(a+=1,n=new SVGFillFilter(s,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?n=new SVGStrokeEffect(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(a+=1,n=new SVGTritoneFilter(s,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(a+=1,n=new SVGProLevelsFilter(s,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(a+=1,n=new SVGDropShadowEffect(s,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty&&(n=new SVGMatte3Effect(s,t.effectsManager.effectElements[e],t)),n&&this.filters.push(n);a&&(t.globalData.defs.appendChild(s),t.layerElement.setAttribute("filter","url("+locationHref+"#"+r+")"))}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",className:e&&e.className||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig};this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",hideOnTransparent:!e||e.hideOnTransparent!==!1},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0}function CVContextData(){this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1;var t,e=15;for(this.savedOp=createTypedArray("float32",e),t=0;t<e;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=e}function CVBaseElement(){}function CVImageElement(t,e,i){this.failed=!1,this.img=new Image,this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i),this.globalData.addPendingElement()}function CVCompElement(t,e,i){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this.dynamicProperties):{_placeholder:!0}}function CVMaskElement(t,e,i){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var r,s=this.masksProperties.length,a=!1;for(r=0;r<s;r++)"n"!==this.masksProperties[r].mode&&(a=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3,i,null);this.hasMasks=a}function CVShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.initElement(t,e,i)}function CVSolidElement(t,e,i){this.initElement(t,e,i)}function CVTextElement(t,e,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,i)}function CVEffects(){}function HBaseElement(t,e,i){}function HSolidElement(t,e,i){this.initElement(t,e,i)}function HCompElement(t,e,i){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this.dynamicProperties):{_placeholder:!0},this.initElement(t,e,i)}function HShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.shapesContainer=createNS("g"),this.initElement(t,e,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,i)}function HImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i)}function HCameraElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i);var r=PropertyFactory.getProp;if(this.pe=r(this,t.pe,0,0,this.dynamicProperties),t.ks.p.s?(this.px=r(this,t.ks.p.x,1,0,this.dynamicProperties),this.py=r(this,t.ks.p.y,1,0,this.dynamicProperties),this.pz=r(this,t.ks.p.z,1,0,this.dynamicProperties)):this.p=r(this,t.ks.p,1,0,this.dynamicProperties),t.ks.a&&(this.a=r(this,t.ks.a,1,0,this.dynamicProperties)),t.ks.or.k.length&&t.ks.or.k[0].to){var s,a=t.ks.or.k.length;for(s=0;s<a;s+=1)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=r(this,t.ks.or,1,degToRads,this.dynamicProperties),this.or.sh=!0,this.rx=r(this,t.ks.rx,0,degToRads,this.dynamicProperties),this.ry=r(this,t.ks.ry,0,degToRads,this.dynamicProperties),this.rz=r(this,t.ks.rz,0,degToRads,this.dynamicProperties),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0}function HEffects(){}function SliderEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function AngleEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function ColorEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function PointEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function LayerIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function MaskIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function CheckboxEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(t,e,i){var r=t.ef||[];this.effectElements=[];var s,a,n=r.length;for(s=0;s<n;s++)a=new GroupEffect(r[s],e,i),this.effectElements.push(a)}function GroupEffect(t,e,i){this.dynamicProperties=[],this.init(t,e,this.dynamicProperties),this.dynamicProperties.length&&i.push(this)}function setLocationHref(t){locationHref=t}function play(t){animationManager.play(t)}function pause(t){animationManager.pause(t)}function togglePause(t){animationManager.togglePause(t)}function setSpeed(t,e){animationManager.setSpeed(t,e)}function setDirection(t,e){animationManager.setDirection(t,e)}function stop(t){animationManager.stop(t)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function registerAnimation(t){return animationManager.registerAnimation(t)}function resize(){animationManager.resize()}function goToAndStop(t,e,i){animationManager.goToAndStop(t,e,i)}function setSubframeRendering(t){subframeEnabled=t}function loadAnimation(t){return standalone===!0&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function destroy(t){return animationManager.destroy(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(!(defaultCurveSegments>=50))}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),i=0;i<e.length;i++){var r=e[i].split("=");if(decodeURIComponent(r[0])==t)return decodeURIComponent(r[1])}}var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,blitter=10,BMMath={};!function(){var t,e=Object.getOwnPropertyNames(Math),i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){var e=typeof t;if("object"===e&&t.length){var i,r=createSizedArray(t.length),s=t.length;for(i=0;i<s;i+=1)r[i]=Math.abs(t[i]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;roundValues(!1);var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1==e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}();BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var i=this._cbs[t].length,r=0;r<i;r++)this._cbs[t][r](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var i=0,r=this._cbs[t].length;i<r;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,r-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var createTypedArray=function(){function t(t,e){var i,r=0,s=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(r=0;r<e;r+=1)s.push(i);return s}function e(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):void 0}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?e:t;
+}(),Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=k(t),i=M(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function i(t){if(0===t)return this;var e=k(t),i=M(t);return this._t(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1)}function r(t){if(0===t)return this;var e=k(t),i=M(t);return this._t(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1)}function s(t){if(0===t)return this;var e=k(t),i=M(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function a(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(T(t),T(e))}function o(t,e){var i=k(e),r=M(e);return this._t(i,r,0,0,-r,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,T(t),1,0,0,0,0,1,0,0,0,0,1)._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function h(t,e,i){return i=isNaN(i)?1:i,1==t&&1==e&&1==i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function l(t,e,i,r,s,a,n,o,h,l,p,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=r,this.props[4]=s,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function p(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function m(t,e,i,r,s,a,n,o,h,l,p,m,f,c,d,u){var y=this.props;if(1===t&&0===e&&0===i&&0===r&&0===s&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return y[12]=y[12]*t+y[15]*f,y[13]=y[13]*a+y[15]*c,y[14]=y[14]*p+y[15]*d,y[15]=y[15]*u,this._identityCalculated=!1,this;var g=y[0],v=y[1],b=y[2],E=y[3],P=y[4],x=y[5],S=y[6],_=y[7],C=y[8],A=y[9],k=y[10],M=y[11],T=y[12],D=y[13],w=y[14],F=y[15];return y[0]=g*t+v*s+b*h+E*f,y[1]=g*e+v*a+b*l+E*c,y[2]=g*i+v*n+b*p+E*d,y[3]=g*r+v*o+b*m+E*u,y[4]=P*t+x*s+S*h+_*f,y[5]=P*e+x*a+S*l+_*c,y[6]=P*i+x*n+S*p+_*d,y[7]=P*r+x*o+S*m+_*u,y[8]=C*t+A*s+k*h+M*f,y[9]=C*e+A*a+k*l+M*c,y[10]=C*i+A*n+k*p+M*d,y[11]=C*r+A*o+k*m+M*u,y[12]=T*t+D*s+w*h+F*f,y[13]=T*e+D*a+w*l+F*c,y[14]=T*i+D*n+w*p+F*d,y[15]=T*r+D*o+w*m+F*u,this._identityCalculated=!1,this}function f(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function c(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function d(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e]}function u(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function y(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function g(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function v(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function b(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function E(t){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],i=this.props[5]/e,r=-this.props[1]/e,s=-this.props[4]/e,a=this.props[0]/e,n=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e;return[t[0]*i+t[1]*s+n,t[0]*r+t[1]*a+o,0]}function P(t){var e,i=t.length,r=[];for(e=0;e<i;e+=1)r[e]=E(t[e]);return r}function x(t,e,i){var r=createTypedArray("float32",6);if(this.isIdentity())r[0]=t[0],r[1]=t[1],r[2]=e[0],r[3]=e[1],r[4]=i[0],r[5]=i[1];else{var s=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];r[0]=t[0]*s+t[1]*n+h,r[1]=t[0]*a+t[1]*o+l,r[2]=e[0]*s+e[1]*n+h,r[3]=e[0]*a+e[1]*o+l,r[4]=i[0]*s+i[1]*n+h,r[5]=i[0]*a+i[1]*o+l}return r}function S(t,e,i){var r;return r=this.isIdentity()?[t,e,i]:[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function _(t,e){return this.isIdentity()?t+","+e:t*this.props[0]+e*this.props[4]+this.props[12]+","+(t*this.props[1]+e*this.props[5]+this.props[13])}function C(){for(var t=0,e=this.props,i="matrix3d(",r=1e4;t<16;)i+=D(e[t]*r)/r,i+=15===t?")":",",t+=1;return i}function A(){var t=1e4,e=this.props;return"matrix("+D(e[0]*t)/t+","+D(e[1]*t)/t+","+D(e[4]*t)/t+","+D(e[5]*t)/t+","+D(e[12]*t)/t+","+D(e[13]*t)/t+")"}var k=Math.cos,M=Math.sin,T=Math.tan,D=Math.round;return function(){this.reset=t,this.rotate=e,this.rotateX=i,this.rotateY=r,this.rotateZ=s,this.skew=n,this.skewFromAxis=o,this.shear=a,this.scale=h,this.setTransform=l,this.translate=p,this.transform=m,this.applyToPoint=y,this.applyToX=g,this.applyToY=v,this.applyToZ=b,this.applyToPointArray=S,this.applyToTriplePoints=x,this.applyToPointStringified=_,this.toCSS=C,this.to2dCSS=A,this.clone=d,this.cloneFromProps=u,this.equals=c,this.inversePoints=P,this.inversePoint=E,this._t=this.transform,this.isIdentity=f,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();!function(t,e){function i(i,l,p){var c=[];l=l===!0?{entropy:!0}:l||{};var v=n(a(l.entropy?[i,h(t)]:null===i?o():i,3),c),b=new r(c),E=function(){for(var t=b.g(f),e=u,i=0;t<y;)t=(t+i)*m,e*=m,i=b.g(1);for(;t>=g;)t/=2,e/=2,i>>>=1;return(t+i)/e};return E.int32=function(){return 0|b.g(4)},E.quick=function(){return b.g(4)/4294967296},E["double"]=E,n(h(b.S),t),(l.pass||p||function(t,i,r,a){return a&&(a.S&&s(a,b),t.state=function(){return s(b,{})}),r?(e[d]=t,i):t})(E,v,"global"in l?l.global:this==e,l.state)}function r(t){var e,i=t.length,r=this,s=0,a=r.i=r.j=0,n=r.S=[];for(i||(t=[i++]);s<m;)n[s]=s++;for(s=0;s<m;s++)n[s]=n[a=v&a+t[s%i]+(e=n[s])],n[a]=e;r.g=function(t){for(var e,i=0,s=r.i,a=r.j,n=r.S;t--;)e=n[s=v&s+1],i=i*m+n[v&(n[s]=n[a=v&a+e])+(n[a]=e)];return r.i=s,r.j=a,i}(m)}function s(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function a(t,e){var i,r=[],s=typeof t;if(e&&"object"==s)for(i in t)try{r.push(a(t[i],e-1))}catch(n){}return r.length?r:"string"==s?t:t+"\0"}function n(t,e){for(var i,r=t+"",s=0;s<r.length;)e[v&s]=v&(i^=19*e[v&s])+r.charCodeAt(s++);return h(e)}function o(){try{if(l)return h(l.randomBytes(m));var e=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(e),h(e)}catch(i){var r=p.navigator,s=r&&r.plugins;return[+new Date,p,s,p.screen,h(t)]}}function h(t){return String.fromCharCode.apply(0,t)}var l,p=this,m=256,f=6,c=52,d="random",u=e.pow(m,f),y=e.pow(2,c),g=2*y,v=m-1;e["seed"+d]=i,n(e.random(),t)}([],BMMath);var BezierFactory=function(){function t(t,e,i,r,s){var a=s||("bez_"+t+"_"+e+"_"+i+"_"+r).replace(/\./g,"p");if(p[a])return p[a];var n=new h([t,e,i,r]);return p[a]=n,n}function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function r(t){return 3*t}function s(t,s,a){return((e(s,a)*t+i(s,a))*t+r(s))*t}function a(t,s,a){return 3*e(s,a)*t*t+2*i(s,a)*t+r(s)}function n(t,e,i,r,a){var n,o,h=0;do o=e+(i-e)/2,n=s(o,r,a)-t,n>0?i=o:e=o;while(Math.abs(n)>c&&++h<d);return o}function o(t,e,i,r){for(var n=0;n<m;++n){var o=a(e,i,r);if(0===o)return e;var h=s(e,i,r)-t;e-=h/o}return e}function h(t){this._p=t,this._mSampleValues=g?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var l={};l.getBezierEasing=t;var p={},m=4,f=.001,c=1e-7,d=10,u=11,y=1/(u-1),g="function"==typeof Float32Array;return h.prototype={get:function(t){var e=this._p[0],i=this._p[1],r=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===i&&r===a?t:0===t?0:1===t?1:s(this._getTForX(t),i,a)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],r=this._p[3];this._precomputed=!0,t===e&&i===r||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;i<u;++i)this._mSampleValues[i]=s(i*y,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],r=this._mSampleValues,s=0,h=1,l=u-1;h!==l&&r[h]<=t;++h)s+=y;--h;var p=(t-r[h])/(r[h+1]-r[h]),m=s+p*y,c=a(m,e,i);return c>=f?o(t,m,e,i):0===c?m:n(t,s,s+y,e,i)}},l}();!function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i<e.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[e[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[i]+"CancelAnimationFrame"]||window[e[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,i){var r=(new Date).getTime(),s=Math.max(0,16-(r-t)),a=setTimeout(function(){e(r+s)},s);return t=r+s,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var i=createTag("span");i.style.fontFamily=e;var r=createTag("span");r.innerHTML="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(r),document.body.appendChild(i);var s=r.offsetWidth;return r.style.fontFamily=t+", "+e,{node:r,w:s,parent:i}}function e(){var t,i,r,s=this.fonts.length,a=s;for(t=0;t<s;t+=1)if(this.fonts[t].loaded)a-=1;else if("t"===this.fonts[t].fOrigin||2===this.fonts[t].origin){if(window.Typekit&&window.Typekit.load&&0===this.typekitLoaded){this.typekitLoaded=1;try{window.Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(n){}}2===this.typekitLoaded&&(this.fonts[t].loaded=!0)}else"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(i=this.fonts[t].monoCase.node,r=this.fonts[t].monoCase.w,i.offsetWidth!==r?(a-=1,this.fonts[t].loaded=!0):(i=this.fonts[t].sansCase.node,r=this.fonts[t].sansCase.w,i.offsetWidth!==r&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<h?setTimeout(e.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function i(t,e){var i=createNS("text");i.style.fontSize="100px",i.style.fontFamily=e.fFamily,i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.className=e.fClass):i.style.fontFamily=e.fFamily,t.appendChild(i);var r=createTag("canvas").getContext("2d");return r.font="100px "+e.fFamily,r}function r(r,s){if(!r)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=r.list);var a,n=r.list,o=n.length;for(a=0;a<o;a+=1){if(n[a].loaded=!1,n[a].monoCase=t(n[a].fFamily,"monospace"),n[a].sansCase=t(n[a].fFamily,"sans-serif"),n[a].fPath){if("p"===n[a].fOrigin||3===n[a].origin){var h=createTag("style");h.type="text/css",h.innerHTML="@font-face {font-family: "+n[a].fFamily+"; font-style: normal; src: url('"+n[a].fPath+"');}",s.appendChild(h)}else if("g"===n[a].fOrigin||1===n[a].origin){var l=createTag("link");l.type="text/css",l.rel="stylesheet",l.href=n[a].fPath,s.appendChild(l)}else if("t"===n[a].fOrigin||2===n[a].origin){var p=createTag("script");p.setAttribute("src",n[a].fPath),s.appendChild(p)}}else n[a].loaded=!0;n[a].helper=i(s,n[a]),this.fonts.push(n[a])}e.bind(this)()}function s(t){if(t){this.chars||(this.chars=[]);var e,i,r,s=t.length,a=this.chars.length;for(e=0;e<s;e+=1){for(i=0,r=!1;i<a;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(r=!0),i+=1;r||(this.chars.push(t[e]),a+=1)}}}function a(t,e,i){for(var r=0,s=this.chars.length;r<s;){if(this.chars[r].ch===t&&this.chars[r].style===e&&this.chars[r].fFamily===i)return this.chars[r];r+=1}return console&&console.warn&&console.warn("Missing character from exported characters list: ",t,e,i),l}function n(t,e,i){var r=this.getFontByName(e),s=r.helper;return s.measureText(t).width*i/100}function o(t){for(var e=0,i=this.fonts.length;e<i;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var h=5e3,l={w:0,size:0,shapes:[]},p=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return p.prototype.addChars=s,p.prototype.addFonts=r,p.prototype.getCharData=a,p.prototype.getFontByName=o,p.prototype.measureText=n,p}(),PropertyFactory=function(){function t(t,e,i){var r,s=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",e.length));for(var a,n,o=i.lastIndex,h=o,l=this.keyframes.length-1,p=!0;p;){if(a=this.keyframes[h],n=this.keyframes[h+1],h==l-1&&t>=n.t-s){a.h&&(a=n),o=0;break}if(n.t-s>t){o=h;break}h<l-1?h+=1:(o=0,p=!1)}var m,f,c,d,u,y;if(a.to){a.bezierData||bez.buildBezierData(a);var g=a.bezierData;if(t>=n.t-s||t<a.t-s){var v=t>=n.t-s?g.points.length-1:0;for(f=g.points[v].point.length,m=0;m<f;m+=1)r[m]=g.points[v].point[m];i._lastBezierData=null}else{a.__fnct?y=a.__fnct:(y=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,a.__fnct=y),c=y((t-(a.t-s))/(n.t-s-(a.t-s)));var b,E=g.segmentLength*c,P=i.lastFrame<t&&i._lastBezierData===g?i._lastAddedLength:0;for(u=i.lastFrame<t&&i._lastBezierData===g?i._lastPoint:0,p=!0,d=g.points.length;p;){if(P+=g.points[u].partialLength,0===E||0===c||u==g.points.length-1){for(f=g.points[u].point.length,m=0;m<f;m+=1)r[m]=g.points[u].point[m];break}if(E>=P&&E<P+g.points[u+1].partialLength){for(b=(E-P)/g.points[u+1].partialLength,f=g.points[u].point.length,m=0;m<f;m+=1)r[m]=g.points[u].point[m]+(g.points[u+1].point[m]-g.points[u].point[m])*b;break}u<d-1?u+=1:p=!1}i._lastPoint=u,i._lastAddedLength=P-g.points[u].partialLength,i._lastBezierData=g}}else{var x,S,_,C,A;for(l=a.s.length,h=0;h<l;h+=1){if(1!==a.h&&(t>=n.t-s?c=1:t<a.t-s?c=0:(a.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[h]?y=a.__fnct[h]:(x=a.o.x[h]||a.o.x[0],S=a.o.y[h]||a.o.y[0],_=a.i.x[h]||a.i.x[0],C=a.i.y[h]||a.i.y[0],y=BezierFactory.getBezierEasing(x,S,_,C).get,a.__fnct[h]=y)):a.__fnct?y=a.__fnct:(x=a.o.x,S=a.o.y,_=a.i.x,C=a.i.y,y=BezierFactory.getBezierEasing(x,S,_,C).get,a.__fnct=y),c=y((t-(a.t-s))/(n.t-s-(a.t-s))))),this.sh&&1!==a.h){var k=a.s[h],M=a.e[h];k-M<-180?k+=360:k-M>180&&(k-=360),A=k+(M-k)*c}else A=1===a.h?a.s[h]:a.s[h]+(a.e[h]-a.s[h])*c;1===l?r=A:r[h]=A}}return i.lastIndex=o,r}function e(t){for(var e=0;e<this.v.length;)this.pv[e]=t[e],this.v[e]=this.mult?this.pv[e]*this.mult:this.pv[e],this.lastPValue[e]!==this.pv[e]&&(this._mdf=!0,this.lastPValue[e]=this.pv[e]),e+=1}function i(t){this.pv=t,this.v=this.mult?this.pv*this.mult:this.pv,this.lastPValue!=this.pv&&(this._mdf=!0,this.lastPValue=this.pv)}function r(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==p&&(this._caching.lastFrame>=i&&t>=i||this._caching.lastFrame<e&&t<e))){this._caching.lastIndex=this._caching.lastFrame<t?this._caching.lastIndex:0;var r=this.interpolateValue(t,this.pv,this._caching);this.calculateValueAtCurrentTime(r)}this._caching.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function s(){this._mdf=!1}function a(t,e,i){this.propType="unidimensional",this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.getValue=s}function n(t,e,i){this.propType="multidimensional",this.mult=i,this.data=e,this._mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r,a=e.k.length;this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.lastValue=createTypedArray("float32",a);createTypedArray("float32",a);for(this.vel=createTypedArray("float32",a),r=0;r<a;r+=1)this.v[r]=i?e.k[r]*i:e.k[r],this.pv[r]=e.k[r];this.getValue=s}function o(e,s,a){this.propType="unidimensional",this.keyframes=s.k,this.offsetTime=e.data.st,this.lastValue=p,this.lastPValue=p,this.frameId=-1,this._caching={lastFrame:p,lastIndex:0,value:0},this.k=!0,this.kf=!0,this.data=s,this.mult=a,this.elem=e,this._isFirstFrame=!1,this.comp=e.comp,this.v=a?s.k[0].s[0]*a:s.k[0].s[0],this.pv=s.k[0].s[0],this.getValue=r,this.calculateValueAtCurrentTime=i,this.interpolateValue=t}function h(i,s,a){this.propType="multidimensional";var n,o,h,l,m,f=s.k.length;for(n=0;n<f-1;n+=1)s.k[n].to&&s.k[n].s&&s.k[n].e&&(o=s.k[n].s,h=s.k[n].e,l=s.k[n].to,m=s.k[n].ti,(2===o.length&&(o[0]!==h[0]||o[1]!==h[1])&&bez.pointOnLine2D(o[0],o[1],h[0],h[1],o[0]+l[0],o[1]+l[1])&&bez.pointOnLine2D(o[0],o[1],h[0],h[1],h[0]+m[0],h[1]+m[1])||3===o.length&&(o[0]!==h[0]||o[1]!==h[1]||o[2]!==h[2])&&bez.pointOnLine3D(o[0],o[1],o[2],h[0],h[1],h[2],o[0]+l[0],o[1]+l[1],o[2]+l[2])&&bez.pointOnLine3D(o[0],o[1],o[2],h[0],h[1],h[2],h[0]+m[0],h[1]+m[1],h[2]+m[2]))&&(s.k[n].to=null,s.k[n].ti=null),o[0]===h[0]&&o[1]===h[1]&&0===l[0]&&0===l[1]&&0===m[0]&&0===m[1]&&(2===o.length||o[2]===h[2]&&0===l[2]&&0===m[2])&&(s.k[n].to=null,s.k[n].ti=null));this.keyframes=s.k,this.offsetTime=i.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=a,this.elem=i,this.comp=i.comp,this.getValue=r,this.calculateValueAtCurrentTime=e,this.interpolateValue=t,this.frameId=-1;var c=s.k[0].s.length;this.v=createTypedArray("float32",c),this.pv=createTypedArray("float32",c),this.lastValue=createTypedArray("float32",c),this.lastPValue=createTypedArray("float32",c),this._caching={lastFrame:p,lastIndex:0,value:createTypedArray("float32",c)}}function l(t,e,i,r,s){var l;if(0===e.a)l=0===i?new a(t,e,r):new n(t,e,r);else if(1===e.a)l=0===i?new o(t,e,r):new h(t,e,r);else if(e.k.length)if("number"==typeof e.k[0])l=new n(t,e,r);else switch(i){case 0:l=new o(t,e,r);break;case 1:l=new h(t,e,r)}else l=new a(t,e,r);return l.k&&s.push(l),l}var p=initialDefaultFrame,m={getProp:l};return m}(),TransformPropertyFactory=function(){function t(t){var e,i=this.dynamicProperties.length;for(e=0;e<i;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function e(t){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var e,i=this.dynamicProperties.length;for(e=0;e<i;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0);if(this._mdf||t){if(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented&&this.p.keyframes&&this.p.getValueAtTime){var r,s;this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/this.elem.globalData.frameRate,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/this.elem.globalData.frameRate,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/this.elem.globalData.frameRate,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.01)/this.elem.globalData.frameRate,0)):(r=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/this.elem.globalData.frameRate,this.p.offsetTime)),this.v.rotate(-Math.atan2(r[1]-s[1],r[0]-s[0]))}this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function i(){this.inverted=!0,this.iv=new Matrix,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}function r(){}function s(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.dynamicProperties=[],this._mdf=!1,this.data=e,this.v=new Matrix,e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this.dynamicProperties),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this.dynamicProperties),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this.dynamicProperties))):this.p=PropertyFactory.getProp(t,e.p,1,0,this.dynamicProperties),e.r)this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this.dynamicProperties);else if(e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this.dynamicProperties),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this.dynamicProperties),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this.dynamicProperties),e.or.k[0].ti){var r,s=e.or.k.length;for(r=0;r<s;r+=1)e.or.k[r].to=e.or.k[r].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this.dynamicProperties),this.or.sh=!0}e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this.dynamicProperties),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this.dynamicProperties)),e.a&&(this.a=PropertyFactory.getProp(t,e.a,1,0,this.dynamicProperties)),e.s&&(this.s=PropertyFactory.getProp(t,e.s,1,.01,this.dynamicProperties)),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,i):this.o={_mdf:!1,v:1},this.dynamicProperties.length?i.push(this):this.getValue(!0)}function a(t,e,i){return new s(t,e,i)}return s.prototype.applyToMatrix=t,s.prototype.getValue=e,s.prototype.setInverted=i,s.prototype.autoOrient=r,{getTransformProperty:a}}();ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var i=0;i<e;)this.v[i]=point_pool.newElement(),this.o[i]=point_pool.newElement(),this.i[i]=point_pool.newElement(),i+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,i,r,s){var a;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o}(!a[r]||a[r]&&!s)&&(a[r]=point_pool.newElement()),a[r][0]=t,a[r][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,r,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,r,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,s=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],r[0][0],r[0][1],0,!1),a=1);var n=this._length-1,o=this._length;for(i=a;i<o;i+=1)t.setTripleAt(e[n][0],e[n][1],s[n][0],s[n][1],r[n][0],r[n][1],i,!1),n-=1;return t};var ShapePropertyFactory=function(){function t(t,e,i,r){var s,a,n,o,h,l,p,m,f,c=r.lastIndex,d=!1;if(t<this.keyframes[0].t-this.offsetTime)s=this.keyframes[0].s[0],n=!0,c=0;else if(t>=this.keyframes[this.keyframes.length-1].t-this.offsetTime)s=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-1].s[0]:this.keyframes[this.keyframes.length-2].e[0],n=!0;else{for(var u,y,g=c,v=this.keyframes.length-1,b=!0;b&&(u=this.keyframes[g],y=this.keyframes[g+1],!(y.t-this.offsetTime>t));)g<v-1?g+=1:b=!1;if(n=1===u.h,c=g,!n){if(t>=y.t-this.offsetTime)m=1;else if(t<u.t-this.offsetTime)m=0;else{var E;u.__fnct?E=u.__fnct:(E=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,u.__fnct=E),m=E((t-(u.t-this.offsetTime))/(y.t-this.offsetTime-(u.t-this.offsetTime)))}a=u.e[0]}s=u.s[0]}for(l=e._length,p=s.i[0].length,r.lastIndex=c,o=0;o<l;o+=1)for(h=0;h<p;h+=1)f=n?s.i[o][h]:s.i[o][h]+(a.i[o][h]-s.i[o][h])*m,e.i[o][h]!==f&&(e.i[o][h]=f,i&&(this.pv.i[o][h]=f),d=!0),f=n?s.o[o][h]:s.o[o][h]+(a.o[o][h]-s.o[o][h])*m,e.o[o][h]!==f&&(e.o[o][h]=f,i&&(this.pv.o[o][h]=f),d=!0),f=n?s.v[o][h]:s.v[o][h]+(a.v[o][h]-s.v[o][h])*m,e.v[o][h]!==f&&(e.v[o][h]=f,i&&(this.pv.v[o][h]=f),d=!0);return d}function e(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;if(r===l||!(r<e&&t<e||r>i&&t>i)){this._caching.lastIndex=r<t?this._caching.lastIndex:0;var s=this.interpolateShape(t,this.v,!0,this._caching);this._mdf=s,s&&(this.paths=this.localShapeCollection)}this._caching.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function i(){return this.v}function r(){this.paths=this.localShapeCollection,this.k||(this._mdf=!1)}function s(t,e,i){this.propType="shape",this.comp=t.comp,this.k=!1,this._mdf=!1;var s=3===i?e.pt.k:e.ks.k;this.v=shape_pool.clone(s),this.pv=shape_pool.clone(this.v),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r}function a(t,e,i){this.propType="shape",this.comp=t.comp,this.elem=t,this.offsetTime=t.data.st,this.keyframes=3===i?e.pt.k:e.ks.k,this.k=!0,this.kf=!0;var s=this.keyframes[0].s[0].i.length;this.keyframes[0].s[0].i[0].length;this.v=shape_pool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,s),this.pv=shape_pool.clone(this.v),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=l,this.reset=r,this._caching={lastFrame:l,lastIndex:0}}function n(t,e,i,r){var n;if(3===i||4===i){var o=3===i?e.pt:e.ks,h=o.k;n=1===o.a||h.length?new a(t,e,i):new s(t,e,i)}else 5===i?n=new f(t,e):6===i?n=new p(t,e):7===i&&(n=new m(t,e));return n.k&&r.push(n),n}function o(){return s}function h(){return a}var l=-999999;s.prototype.interpolateShape=t,s.prototype.getValue=i,a.prototype.getValue=e,a.prototype.interpolateShape=t;var p=function(){function t(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,s=this.s.v[1]/2,a=3!==this.d,n=this.v;3!==this.d&&(n.v[0][0]=t,n.v[0][1]=e-s,n.v[1][0]=a?t+r:t-r,n.v[1][1]=e,n.v[2][0]=t,n.v[2][1]=e+s,n.v[3][0]=a?t-r:t+r,n.v[3][1]=e,n.i[0][0]=a?t-r*i:t+r*i,n.i[0][1]=e-s,n.i[1][0]=a?t+r:t-r,n.i[1][1]=e-s*i,n.i[2][0]=a?t+r*i:t-r*i,n.i[2][1]=e+s,n.i[3][0]=a?t-r:t+r,n.i[3][1]=e+s*i,n.o[0][0]=a?t+r*i:t-r*i,n.o[0][1]=e-s,n.o[1][0]=a?t+r:t-r,n.o[1][1]=e+s*i,n.o[2][0]=a?t-r*i:t+r*i,n.o[2][1]=e+s,n.o[3][0]=a?t-r:t+r,n.o[3][1]=e-s*i)}function e(t){var e,i=this.dynamicProperties.length;if(this.elem.globalData.frameId!==this.frameId){for(this._mdf=!1,this.frameId=this.elem.globalData.frameId,e=0;e<i;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e]._mdf&&(this._mdf=!0);this._mdf&&this.convertEllToPath()}}var i=roundCorner;return function(i,s){this.v=shape_pool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=s.d,this.dynamicProperties=[],this.elem=i,this.comp=i.comp,this.frameId=-1,this._mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=r,this.p=PropertyFactory.getProp(i,s.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(i,s.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),m=function(){function t(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,r=this.or.v,s=this.os.v,a=2*Math.PI*r/(4*e),n=-Math.PI/2,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var h=r*Math.cos(n),l=r*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*s*o,l-m*a*s*o,h+p*a*s*o,l+m*a*s*o,t,!0),n+=i*o}this.paths.length=0,this.paths[0]=this.v}function e(){var t,e,i,r,s=2*Math.floor(this.pt.v),a=2*Math.PI/s,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*s),f=2*Math.PI*h/(2*s),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<s;t+=1){e=n?o:h,i=n?l:p,r=n?m:f;var u=e*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*r*i*d,y-v*r*i*d,u+g*r*i*d,y+v*r*i*d,t,!0),n=!n,c+=a*d}}function i(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1,this.frameId=this.elem.globalData.frameId;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0);this._mdf&&this.convertToPath()}}return function(s,a){this.v=shape_pool.newElement(),this.v.setPathData(!0,0),this.elem=s,this.comp=s.comp,this.data=a,this.frameId=-1,this.d=a.d,this.dynamicProperties=[],this._mdf=!1,this.getValue=i,this.reset=r,1===a.sy?(this.ir=PropertyFactory.getProp(s,a.ir,0,0,this.dynamicProperties),this.is=PropertyFactory.getProp(s,a.is,0,.01,this.dynamicProperties),this.convertToPath=e):this.convertToPath=t,this.pt=PropertyFactory.getProp(s,a.pt,0,0,this.dynamicProperties),this.p=PropertyFactory.getProp(s,a.p,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(s,a.r,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(s,a.or,0,0,this.dynamicProperties),this.os=PropertyFactory.getProp(s,a.os,0,.01,this.dynamicProperties),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:this.convertToPath()}}(),f=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1,this.frameId=this.elem.globalData.frameId;var e,i=this.dynamicProperties.length;for(e=0;e<i;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e]._mdf&&(this._mdf=!0);this._mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,s=bm_min(i,r,this.r.v),a=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-r+s,t+i,e-r+s,t+i,e-r+a,0,!0),this.v.setTripleAt(t+i,e+r-s,t+i,e+r-a,t+i,e+r-s,1,!0),0!==s?(this.v.setTripleAt(t+i-s,e+r,t+i-s,e+r,t+i-a,e+r,2,!0),this.v.setTripleAt(t-i+s,e+r,t-i+a,e+r,t-i+s,e+r,3,!0),this.v.setTripleAt(t-i,e+r-s,t-i,e+r-s,t-i,e+r-a,4,!0),this.v.setTripleAt(t-i,e-r+s,t-i,e-r+a,t-i,e-r+s,5,!0),this.v.setTripleAt(t-i+s,e-r,t-i+s,e-r,t-i+a,e-r,6,!0),this.v.setTripleAt(t+i-s,e-r,t+i-a,e-r,t+i-s,e-r,7,!0)):(this.v.setTripleAt(t-i,e+r,t-i+a,e+r,t-i,e+r,2),this.v.setTripleAt(t-i,e-r,t-i,e-r+a,t-i,e-r,3))):(this.v.setTripleAt(t+i,e-r+s,t+i,e-r+a,t+i,e-r+s,0,!0),0!==s?(this.v.setTripleAt(t+i-s,e-r,t+i-s,e-r,t+i-a,e-r,1,!0),this.v.setTripleAt(t-i+s,e-r,t-i+a,e-r,t-i+s,e-r,2,!0),this.v.setTripleAt(t-i,e-r+s,t-i,e-r+s,t-i,e-r+a,3,!0),this.v.setTripleAt(t-i,e+r-s,t-i,e+r-a,t-i,e+r-s,4,!0),this.v.setTripleAt(t-i+s,e+r,t-i+s,e+r,t-i+a,e+r,5,!0),this.v.setTripleAt(t+i-s,e+r,t+i-a,e+r,t+i-s,e+r,6,!0),this.v.setTripleAt(t+i,e+r-s,t+i,e+r-s,t+i,e+r-a,7,!0)):(this.v.setTripleAt(t-i,e-r,t-i+a,e-r,t-i,e-r,1,!0),this.v.setTripleAt(t-i,e+r,t-i,e+r-a,t-i,e+r,2,!0),this.v.setTripleAt(t+i,e+r,t+i-a,e+r,t+i,e+r,3,!0)))}return function(i,s){this.v=shape_pool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.localShapeCollection.addShape(this.v),
+this.paths=this.localShapeCollection,this.elem=i,this.comp=i.comp,this.frameId=-1,this.d=s.d,this.dynamicProperties=[],this._mdf=!1,this.getValue=t,this.convertRectToPath=e,this.reset=r,this.p=PropertyFactory.getProp(i,s.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(i,s.s,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(i,s.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),c={};return c.getShapeProp=n,c.getConstructorFunction=o,c.getKeyframedConstructorFunction=h,c}(),ShapeModifiers=function(){function t(t,e){r[t]||(r[t]=e)}function e(t,e,i,s){return new r[t](e,i,s)}var i={},r={};return i.registerModifier=t,i.getModifier=e,i}();ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){var e={shape:t.sh,data:t,localShapeCollection:shapeCollection_pool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e)}},ShapeModifier.prototype.init=function(t,e,i){this.dynamicProperties=[],this.shapes=[],this.elem=t,this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this._mdf=!1,this.closed=!1,this.k=!1,this.dynamicProperties.length?(this.k=!0,i.push(this)):this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0);this.frameId=this.elem.globalData.frameId}},extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this.dynamicProperties),this.e=PropertyFactory.getProp(t,e.e,0,.01,this.dynamicProperties),this.o=PropertyFactory.getProp(t,e.o,0,0,this.dynamicProperties),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,i,r,s){var a=[];e<=1?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;n<l;n+=1)if(o=a[n],o.e*s<r||o.s*s>r+i);else{var p,m;p=o.s*s<=r?0:(o.s*s-r)/i,m=o.e*s>=r+i?1:(o.e*s-r)/i,h.push([p,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e<i;e+=1)segments_length_pool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,i;if(this._mdf||t){var r=this.o.v%360/360;if(r<0&&(r+=1),e=this.s.v+r,i=this.e.v+r,e>i){var s=e;e=i,i=s}this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var a,n,o,h,l,p,m,f=this.shapes.length,c=0;if(i===e)for(n=0;n<f;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection;else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(n=0;n<f;n+=1)this.shapes[n].shape._mdf=!0}else{var d,u,y=[];for(n=0;n<f;n+=1)if(d=this.shapes[n],d.shape._mdf||this._mdf||t||2===this.m){if(a=d.shape.paths,h=a._length,m=0,!d.shape._mdf&&d.pathsData.length)m=d.totalShapeLength;else{for(l=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)p=bez.getSegmentsLength(a.shapes[o]),l.push(p),m+=p.totalLength;d.totalShapeLength=m,d.pathsData=l}c+=m,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var g,v=e,b=i,E=0;for(n=f-1;n>=0;n-=1)if(d=this.shapes[n],d.shape._mdf){for(u=d.localShapeCollection,u.releaseShapes(),2===this.m&&f>1?(g=this.calculateShapeEdges(e,i,d.totalShapeLength,E,c),E+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o<h;o+=1){v=g[o][0],b=g[o][1],y.length=0,b<=1?y.push({s:d.totalShapeLength*v,e:d.totalShapeLength*b}):v>=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.v.c){var x=P.pop();this.addPaths(P,u),P=this.addShapes(d,y[1],x)}else this.addPaths(P,u),P=this.addShapes(d,y[1]);this.addPaths(P,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)e.addShape(t[i])},TrimModifier.prototype.addSegment=function(t,e,i,r,s,a,n){s.setXYAt(e[0],e[1],"o",a),s.setXYAt(i[0],i[1],"i",a+1),n&&s.setXYAt(t[0],t[1],"v",a),s.setXYAt(r[0],r[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,i,r){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),r&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},TrimModifier.prototype.addShapes=function(t,e,i){var r,s,a,n,o,h,l,p,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(i?(o=i._length,p=i._length):(i=shape_pool.newElement(),o=0,p=0),u.push(i),r=0;r<c;r+=1){for(h=m[r].lengths,i.c=f[r].c,a=f[r].c?h.length:h.length+1,s=1;s<a;s+=1)if(n=h[s-1],d+n.addedLength<e.s)d+=n.addedLength,i.c=!1;else{if(d>e.e){i.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[r].v[s-1],f[r].o[s-1],f[r].i[s],f[r].v[s],i,o,y),y=!1):(l=bez.getNewSegment(f[r].v[s-1],f[r].v[s],f[r].o[s-1],f[r].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1),d+=n.addedLength,o+=1}if(f[r].c){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[r].v[s-1],f[r].o[s-1],f[r].i[0],f[r].v[0],i,o,y),y=!1):(l=bez.getNewSegment(f[r].v[s-1],f[r].v[0],f[r].o[s-1],f[r].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1)}else i.c=!1;d+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),d>e.e)break;r<c-1&&(i=shape_pool.newElement(),y=!0,u.push(i),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this.dynamicProperties)},RoundCornersModifier.prototype.processPath=function(t,e){var i=shape_pool.newElement();i.c=t.c;var r,s,a,n,o,h,l,p,m,f,c,d,u,y=t._length,g=0;for(r=0;r<y;r+=1)s=t.v[r],n=t.o[r],a=t.i[r],s[0]===n[0]&&s[1]===n[1]&&s[0]===a[0]&&s[1]===a[1]?0!==r&&r!==y-1||t.c?(o=0===r?t.v[y-1]:t.v[r-1],h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)),l=h?Math.min(h/2,e)/h:0,p=d=s[0]+(o[0]-s[0])*l,m=u=s[1]-(s[1]-o[1])*l,f=p-(p-s[0])*roundCorner,c=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g),g+=1,o=r===y-1?t.v[0]:t.v[r+1],h=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)),l=h?Math.min(h/2,e)/h:0,p=f=s[0]+(o[0]-s[0])*l,m=c=s[1]+(o[1]-s[1])*l,d=p-(p-s[0])*roundCorner,u=m-(m-s[1])*roundCorner,i.setTripleAt(p,m,f,c,d,u,g),g+=1):(i.setTripleAt(s[0],s[1],n[0],n[1],a[0],a[1],g),g+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],g),g+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,i,r,s,a=this.shapes.length,n=this.rd.v;if(0!==n){var o,h,l;for(i=0;i<a;i+=1){if(o=this.shapes[i],h=o.shape.paths,l=o.localShapeCollection,o.shape._mdf||this._mdf||t)for(l.releaseShapes(),o.shape._mdf=!0,e=o.shape.paths.shapes,s=o.shape.paths._length,r=0;r<s;r+=1)l.addShape(this.processPath(e[r],n));o.shape.paths=o.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this.dynamicProperties),this.o=PropertyFactory.getProp(t,e.o,0,null,this.dynamicProperties),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this.dynamicProperties),this.data=e,this.dynamicProperties.length||this.getValue(!0),this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,i,r,s,a){var n=a?-1:1,o=r.s.v[0]+(1-r.s.v[0])*(1-s),h=r.s.v[1]+(1-r.s.v[1])*(1-s);t.translate(r.p.v[0]*n*s,r.p.v[1]*n*s,r.p.v[2]),e.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),e.rotate(-r.r.v*n*s),e.translate(r.a.v[0],r.a.v[1],r.a.v[2]),i.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),i.scale(a?1/o:o,a?1/h:h),i.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(t,e,i,r,s){this.elem=t,this.arr=e,this.pos=i,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.dynamicProperties=[],this.frameId=-1,this.initModifierProperties(t,e[i]);for(var a=0;i>0;)i-=1,this._elements.unshift(e[i]),a+=1;this.dynamicProperties.length?(this.k=!0,s.push(this)):this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=(t.length,JSON.parse(JSON.stringify(t)));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var i,r=t.length;for(i=0;i<r;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,i,r,s,a;if(this._mdf||t){var n=Math.ceil(this.c.v);if(this._groups.length<n){for(;this._groups.length<n;){var o={it:this.cloneElements(this._elements),ty:"gr"};o.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:0,ix:6,k:0},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,o),this._groups.splice(0,0,o),this._currentCopies+=1}this.elem.reloadShapes()}a=0;var h;for(r=0;r<=this._groups.length-1;r+=1)h=a<n,this._groups[r]._render=h,this.changeGroupRender(this._groups[r].it,h),a+=1;this._currentCopies=n;var l=this.o.v,p=l%1,m=l>0?Math.floor(l):Math.ceil(l),f=(this.tr.v.props,this.pMatrix.props),c=this.rMatrix.props,d=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var u=0;if(l>0){for(;u<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),u+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),u+=p)}else if(l<0){for(;u>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),u-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),u-=p)}r=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;for(var y,g;a;){if(e=this.elemsData[r].it,i=e[e.length-1].transform.mProps.v.props,g=i.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,0!==u){for((0!==r&&1===s||r!==this._currentCopies-1&&s===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),y=0;y<g;y+=1)i[y]=this.matrix.props[y];this.matrix.reset()}else for(this.matrix.reset(),y=0;y<g;y+=1)i[y]=this.matrix.props[y];u+=1,a-=1,r+=s}}else for(a=this._currentCopies,r=0,s=1;a;)e=this.elemsData[r].it,i=e[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,r+=s},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shape_pool.release(this.shapes[t]);this._length=0},DashProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId||t){var e=0,i=this.dataProps.length;for(this._mdf=!1,this.frameId=this.elem.globalData.frameId;e<i;){if(this.dataProps[e].p._mdf){this._mdf=!t;break}e+=1}if(this._mdf||t)for("svg"===this.renderer&&(this.dashStr=""),e=0;e<i;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},GradientProperty.prototype.comparePoints=function(t,e){for(var i,r=0,s=this.o.length/2;r<s;){if(i=Math.abs(t[4*r]-t[4*e+2*r]),i>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,r,s=4*this.data.p;for(e=0;e<s;e+=1)i=e%4===0?100:255,r=Math.round(this.prop.v[e]*i),this.c[e]!==r&&(this.c[e]=r,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;e<s;e+=1)i=e%2===0?100:1,r=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==r&&(this.o[e-4*this.data.p]=r,this._omdf=!t)}};var ImagePreloader=function(){function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(t){var e="";if(this.assetsPath){var i=t.p;i.indexOf("images/")!==-1&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e}function i(e){var i=createTag("img");i.addEventListener("load",t.bind(this),!1),i.addEventListener("error",t.bind(this),!1),i.src=e}function r(t,r){this.imagesLoadedCb=r,this.totalAssets=t.length;var s;for(s=0;s<this.totalAssets;s+=1)t[s].layers||(i.bind(this)(e.bind(this)(t[s])),this.totalImages+=1)}function s(t){this.path=t||""}function a(t){this.assetsPath=t||""}function n(){this.imagesLoadedCb=null}return function(){this.loadAssets=r,this.setAssetsPath=a,this.setPath=s,this.destroy=n,this.assetsPath="",this.path="",this.totalAssets=0,this.totalImages=0,this.loadedAssets=0,this.imagesLoadedCb=null}}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),filtersFactory=function(){function t(t){var e=createNS("filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e}function e(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t}var i={};return i.createFilter=t,i.createAlphaToLuminanceFilter=e,i}();TextAnimatorProperty.prototype.searchProperties=function(t){var e,i,r=this._textData.a.length,s=PropertyFactory.getProp;for(e=0;e<r;e+=1)i=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,i,this._dynamicProperties);this._textData.p&&"m"in this._textData.p?(this._pathData={f:s(this._elem,this._textData.p.f,0,0,this._dynamicProperties),l:s(this._elem,this._textData.p.l,0,0,this._dynamicProperties),r:this._textData.p.r,m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m.a,1,0,this._dynamicProperties),this._dynamicProperties.length&&t.push(this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,r,s,a,n,o,h,l,p,m,f,c,d,u,y,g,v,b,E,P=this._moreOptions.alignment.v,x=this._animatorsData,S=this._textData,_=this.mHelper,C=this._renderType,A=this.renderedLetters.length,k=(this.data,t.l);if(this._hasMaskedPath){if(E=this._pathData.m,!this._pathData.n||this._pathData._mdf){var M=E.v;this._pathData.r&&(M=M.reverse()),n={tLength:0,segments:[]},a=M._length-1;var T;for(g=0,s=0;s<a;s+=1)T={s:M.v[s],e:M.v[s+1],to:[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],ti:[M.i[s+1][0]-M.v[s+1][0],M.i[s+1][1]-M.v[s+1][1]]},bez.buildBezierData(T),n.tLength+=T.bezierData.segmentLength,n.segments.push(T),g+=T.bezierData.segmentLength;s=a,E.v.c&&(T={s:M.v[s],e:M.v[0],to:[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],ti:[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]},bez.buildBezierData(T),n.tLength+=T.bezierData.segmentLength,n.segments.push(T),g+=T.bezierData.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,f=0,m=1,l=0,p=!0,u=n.segments,o<0&&E.v.c)for(n.tLength<Math.abs(o)&&(o=-Math.abs(o)%n.tLength),f=u.length-1,d=u[f].bezierData.points,m=d.length-1;o<0;)o+=d[m].partialLength,m-=1,m<0&&(f-=1,d=u[f].bezierData.points,m=d.length-1);d=u[f].bezierData.points,c=d[m-1],h=d[m],y=h.partialLength}a=k.length,i=0,r=0;var D,w,F,I,V,R=1.2*t.finalSize*.714,B=!0;I=x.length;var L,G,z,N,O,H,j,W,q,Y,X,J,Z,K=-1,U=o,Q=f,$=m,tt=-1,et=0,it="",rt=this.defaultPropsArray;for(s=0;s<a;s+=1){if(_.reset(),O=1,k[s].n)i=0,r+=t.yOffset,r+=B?1:0,o=U,B=!1,et=0,this._hasMaskedPath&&(f=Q,m=$,d=u[f].bezierData.points,c=d[m-1],h=d[m],y=h.partialLength,l=0),Z=Y=J=it="",rt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(tt!==k[s].line){switch(t.j){case 1:o+=g-t.lineWidths[k[s].line];break;case 2:o+=(g-t.lineWidths[k[s].line])/2}tt=k[s].line}K!==k[s].ind&&(k[K]&&(o+=k[K].extra),o+=k[s].an/2,K=k[s].ind),o+=P[0]*k[s].an/200;var st=0;for(F=0;F<I;F+=1)D=x[F].a,D.p.propType&&(w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),st+=L.length?D.p.v[0]*L[0]:D.p.v[0]*L),D.a.propType&&(w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),st+=L.length?D.a.v[0]*L[0]:D.a.v[0]*L);for(p=!0;p;)l+y>=o+st||!d?(v=(o+st-l)/h.partialLength,z=c.point[0]+(h.point[0]-c.point[0])*v,N=c.point[1]+(h.point[1]-c.point[1])*v,_.translate(-P[0]*k[s].an/200,-(P[1]*R/100)),p=!1):d&&(l+=h.partialLength,m+=1,m>=d.length&&(m=0,f+=1,u[f]?d=u[f].bezierData.points:E.v.c?(m=0,f=0,d=u[f].bezierData.points):(l-=h.partialLength,d=null)),d&&(c=h,h=d[m],y=h.partialLength));G=k[s].an/2-k[s].add,_.translate(-G,0,0)}else G=k[s].an/2-k[s].add,_.translate(-G,0,0),_.translate(-P[0]*k[s].an/200,-P[1]*R/100,0);for(et+=k[s].l/2,F=0;F<I;F+=1)D=x[F].a,D.t.propType&&(w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?o+=L.length?D.t*L[0]:D.t*L:i+=L.length?D.t.v*L[0]:D.t.v*L);for(et+=k[s].l/2,t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(H=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<I;F+=1)D=x[F].a,D.a.propType&&(w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),L.length?_.translate(-D.a.v[0]*L[0],-D.a.v[1]*L[1],D.a.v[2]*L[2]):_.translate(-D.a.v[0]*L,-D.a.v[1]*L,D.a.v[2]*L));for(F=0;F<I;F+=1)D=x[F].a,D.s.propType&&(w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),L.length?_.scale(1+(D.s.v[0]-1)*L[0],1+(D.s.v[1]-1)*L[1],1):_.scale(1+(D.s.v[0]-1)*L,1+(D.s.v[1]-1)*L,1));for(F=0;F<I;F+=1){if(D=x[F].a,w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),D.sk.propType&&(L.length?_.skewFromAxis(-D.sk.v*L[0],D.sa.v*L[1]):_.skewFromAxis(-D.sk.v*L,D.sa.v*L)),D.r.propType&&(L.length?_.rotateZ(-D.r.v*L[2]):_.rotateZ(-D.r.v*L)),D.ry.propType&&(L.length?_.rotateY(D.ry.v*L[1]):_.rotateY(D.ry.v*L)),D.rx.propType&&(L.length?_.rotateX(D.rx.v*L[0]):_.rotateX(D.rx.v*L)),D.o.propType&&(O+=L.length?(D.o.v*L[0]-O)*L[0]:(D.o.v*L-O)*L),t.strokeWidthAnim&&D.sw.propType&&(j+=L.length?D.sw.v*L[0]:D.sw.v*L),t.strokeColorAnim&&D.sc.propType)for(q=0;q<3;q+=1)L.length?H[q]=H[q]+(D.sc.v[q]-H[q])*L[0]:H[q]=H[q]+(D.sc.v[q]-H[q])*L;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(q=0;q<3;q+=1)L.length?W[q]=W[q]+(D.fc.v[q]-W[q])*L[0]:W[q]=W[q]+(D.fc.v[q]-W[q])*L;D.fh.propType&&(W=L.length?addHueToRGB(W,D.fh.v*L[0]):addHueToRGB(W,D.fh.v*L)),D.fs.propType&&(W=L.length?addSaturationToRGB(W,D.fs.v*L[0]):addSaturationToRGB(W,D.fs.v*L)),D.fb.propType&&(W=L.length?addBrightnessToRGB(W,D.fb.v*L[0]):addBrightnessToRGB(W,D.fb.v*L))}}for(F=0;F<I;F+=1)D=x[F].a,D.p.propType&&(w=x[F].s,L=w.getMult(k[s].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?L.length?_.translate(0,D.p.v[1]*L[0],-D.p.v[2]*L[1]):_.translate(0,D.p.v[1]*L,-D.p.v[2]*L):L.length?_.translate(D.p.v[0]*L[0],D.p.v[1]*L[1],-D.p.v[2]*L[2]):_.translate(D.p.v[0]*L,D.p.v[1]*L,-D.p.v[2]*L));if(t.strokeWidthAnim&&(Y=j<0?0:j),t.strokeColorAnim&&(X="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),t.fillColorAnim&&t.fc&&(J="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(_.translate(0,-t.ls),_.translate(0,P[1]*R/100+r,0),S.p.p){b=(h.point[1]-c.point[1])/(h.point[0]-c.point[0]);var at=180*Math.atan(b)/Math.PI;h.point[0]<c.point[0]&&(at+=180),_.rotate(-at*Math.PI/180)}_.translate(z,N,0),o-=P[0]*k[s].an/200,k[s+1]&&K!==k[s+1].ind&&(o+=k[s].an/2,o+=t.tr/1e3*t.finalSize)}else{switch(_.translate(i,r,0),t.ps&&_.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:_.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[k[s].line]),0,0);break;case 2:_.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[k[s].line])/2,0,0)}_.translate(0,-t.ls),_.translate(G,0,0),_.translate(P[0]*k[s].an/200,P[1]*R/100,0),i+=k[s].l+t.tr/1e3*t.finalSize}"html"===C?it=_.toCSS():"svg"===C?it=_.to2dCSS():rt=[_.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]],Z=O}A<=s?(V=new LetterProps(Z,Y,X,J,it,rt),this.renderedLetters.push(V),A+=1,this.lettersChangedFlag=!0):(V=this.renderedLetters[s],this.lettersChangedFlag=V.update(Z,Y,X,J,it,rt)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){if(this._elem.globalData.frameId!==this._frameId){this._frameId=this._elem.globalData.frameId;var t,e=this._dynamicProperties.length;for(this._mdf=!1,t=0;t<e;t+=1)this._dynamicProperties[t].getValue(),this._mdf=this._dynamicProperties[t]._mdf||this._mdf}},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],LetterProps.prototype.update=function(t,e,i,r,s,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,n=!0),this.fc!==r&&(this.fc=r,this._mdf.fc=!0,n=!0),this.m!==s&&(this.m=s,this._mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,n=!0),n},TextProperty.prototype.setCurrentData=function(t){var e=this.currentData;e.ascent=t.ascent,e.boxWidth=t.boxWidth?t.boxWidth:e.boxWidth,e.f=t.f,e.fStyle=t.fStyle,e.fWeight=t.fWeight,e.fc=t.fc,e.j=t.j,e.justifyOffset=t.justifyOffset,e.l=t.l,e.lh=t.lh,e.lineWidths=t.lineWidths,e.ls=t.ls,e.of=t.of,e.s=t.s,e.sc=t.sc,e.sw=t.sw,e.sz=t.sz,e.ps=t.ps,e.t=t.t,e.tr=t.tr,e.fillColorAnim=t.fillColorAnim||e.fillColorAnim,e.strokeColorAnim=t.strokeColorAnim||e.strokeColorAnim,e.strokeWidthAnim=t.strokeWidthAnim||e.strokeWidthAnim,e.yOffset=t.yOffset,e.finalSize=t.finalSize,e.finalLineHeight=t.finalLineHeight,e.finalText=t.finalText,e.__complete=!1},TextProperty.prototype.searchProperty=function(){return this.kf=this.data.d.k.length>1,this.kf},TextProperty.prototype.getValue=function(t){this._mdf=!1;var e=this.elem.globalData.frameId;if(e!==this._frameId&&this.kf||this._isFirstFrame||t){for(var i,r=this.data.d.k,s=0,a=r.length;s<=a-1&&(i=r[s].s,!(s===a-1||r[s+1].t>e));)s+=1;this.keysIndex!==s&&(i.__complete||this.completeTextData(i),this.setCurrentData(i),this._mdf=!this._isFirstFrame,this.pv=this.v=this.currentData.t,this.keysIndex=s),this._frameId=e}},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,r,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],m=0,f=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),E=0,P=b.fStyle.split(" "),x="normal",S="normal";i=P.length;var _;for(e=0;e<i;e+=1)switch(_=P[e].toLowerCase()){case"italic":S="italic";break;case"bold":x="700";break;case"black":x="900";break;case"medium":x="500";break;case"regular":case"normal":x="400";break;case"light":case"thin":x="200"}t.fWeight=x,t.fStyle=S,i=t.t.length,t.finalSize=t.s,t.finalText=t.t,t.finalLineHeight=t.lh;var C=t.tr/1e3*t.finalSize;if(t.sz)for(var A,k,M=!0,T=t.sz[0],D=t.sz[1];M;){k=t.t,A=0,g=0,i=t.t.length,C=t.tr/1e3*t.finalSize;var w=-1;for(e=0;e<i;e+=1)r=!1," "===k.charAt(e)?w=e:13===k.charCodeAt(e)&&(g=0,r=!0,A+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(k.charAt(e),b.fStyle,b.fFamily),E=r?0:o.w*t.finalSize/100):E=h.measureText(k.charAt(e),t.f,t.finalSize),g+E>T&&" "!==k.charAt(e)?(w===-1?i+=1:e=w,A+=t.finalLineHeight||1.2*t.finalSize,k=k.substr(0,e)+"\r"+k.substr(e===w?e+1:e),w=-1,g=0):(g+=E,g+=C);A+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&D<A?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=k,i=t.finalText.length,M=!1)}g=-C,E=0;var F,I=0;for(e=0;e<i;e+=1)if(r=!1,F=t.finalText.charAt(e)," "===F?s="\xa0":13===F.charCodeAt(0)?(I=0,y.push(g),v=g>v?g:v,g=-2*C,s="",r=!0,u+=1):s=t.finalText.charAt(e),h.chars?(o=h.getCharData(F,b.fStyle,h.getFontByName(t.f).fFamily),E=r?0:o.w*t.finalSize/100):E=h.measureText(s,t.f,t.finalSize)," "===F?I+=E+C:(g+=E+C+I,I=0),p.push({l:E,an:E,add:c,n:r,anIndexes:[],val:s,line:u}),2==f){if(c+=E,""===s||"\xa0"===s||e===i-1){for(""!==s&&"\xa0"!==s||(c-=E);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=E,d+=1;m+=1,c=0}}else if(3==f){if(c+=E,""===s||e===i-1){for(""===s&&(c-=E);d<=e;)p[d].an=c,p[d].ind=m,p[d].extra=E,d+=1;c=0,m+=1}}else p[m].ind=m,p[m].extra=0,m+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var V,R,B=l.a;n=B.length;var L,G,z=[];for(a=0;a<n;a+=1){for(V=B[a],V.a.sc&&(t.strokeColorAnim=!0),V.a.sw&&(t.strokeWidthAnim=!0),(V.a.fc||V.a.fh||V.a.fs||V.a.fb)&&(t.fillColorAnim=!0),G=0,L=V.s.b,e=0;e<i;e+=1)R=p[e],R.anIndexes[a]=G,(1==L&&""!==R.val||2==L&&""!==R.val&&"\xa0"!==R.val||3==L&&(R.n||"\xa0"==R.val||e==i-1)||4==L&&(R.n||e==i-1))&&(1===V.s.rn&&z.push(G),G+=1);l.a[a].s.totalChars=G;var N,O=-1;if(1===V.s.rn)for(e=0;e<i;e+=1)R=p[e],O!=R.anIndexes[a]&&(O=R.anIndexes[a],N=z.splice(Math.floor(Math.random()*z.length),1)[0]),R.anIndexes[a]=N}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.data.d.k[e].s;for(var r in t)i[r]=t[r];this.recalculate(e)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=-1,this.getValue(!0)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex)};var TextSelectorProp=function(){function t(t){if(this._mdf=t||!1,this.dynamicProperties.length){var e,i=this.dynamicProperties.length;for(e=0;e<i;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)}var r=this.elem.textProperty.currentData?this.elem.textProperty.currentData.l.length:0;t&&2===this.data.r&&(this.e.v=r);var s=2===this.data.r?1:100/r,a=this.o.v/s,n=this.s.v/s+a,o=this.e.v/s+a;if(n>o){var h=n;n=o,o=h}this.finalS=n,this.finalE=o}function e(t){var e=BezierFactory.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,i=0,r=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)i=o===r?t>=o?1:0:s(0,a(.5/(o-r)+(t-r)/(o-r),1)),i=e(i);else if(3==h)i=o===r?t>=o?0:1:1-s(0,a(.5/(o-r)+(t-r)/(o-r),1)),i=e(i);else if(4==h)o===r?i=0:(i=s(0,a(.5/(o-r)+(t-r)/(o-r),1)),i<.5?i*=2:i=1-2*(i-.5)),i=e(i);else if(5==h){if(o===r)i=0;else{var l=o-r;t=a(s(0,t+.5-r),o-r);var p=-l/2+t,m=l/2;i=Math.sqrt(1-p*p/(m*m))}i=e(i)}else 6==h?(o===r?i=0:(t=a(s(0,t+.5-r),o-r),i=(1+Math.cos(Math.PI+2*Math.PI*t/(o-r)))/2),i=e(i)):(t>=n(r)&&(i=t-r<0?1-(r-t):s(0,a(o-t,1))),i=e(i));return i*this.a.v}function i(i,r,s){this._mdf=!1,this.k=!1,this.data=r,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.elem=i,this.comp=i.comp,this.finalS=0,this.finalE=0,this.s=PropertyFactory.getProp(i,r.s||{k:0},0,0,this.dynamicProperties),"e"in r?this.e=PropertyFactory.getProp(i,r.e,0,0,this.dynamicProperties):this.e={v:100},this.o=PropertyFactory.getProp(i,r.o||{k:0},0,0,this.dynamicProperties),this.xe=PropertyFactory.getProp(i,r.xe||{k:0},0,0,this.dynamicProperties),this.ne=PropertyFactory.getProp(i,r.ne||{k:0},0,0,this.dynamicProperties),this.a=PropertyFactory.getProp(i,r.a,0,.01,this.dynamicProperties),this.dynamicProperties.length?s.push(this):this.getValue()}function r(t,e,r){return new i(t,e,r)}var s=Math.max,a=Math.min,n=Math.floor;return{getTextSelectorProp:r}}(),pool_factory=function(){return function(t,e,i,r){function s(){var t;return n?(n-=1,t=h[n]):t=e(),t}function a(t){n===o&&(h=pooling["double"](h),o=2*o),i&&i(t),h[n]=t,n+=1}var n=0,o=t,h=createSizedArray(o),l={newElement:s,release:a};return l}}(),pooling=function(){function t(t){return t.concat(createSizedArray(t.length))}return{"double":t}}(),point_pool=function(){function t(){return createTypedArray("float32",2)}return pool_factory(8,t)}(),shape_pool=function(){function t(){return new ShapePath}function e(t){var e,i=t._length;for(e=0;e<i;e+=1)point_pool.release(t.v[e]),point_pool.release(t.i[e]),point_pool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}function i(t){var e,i=r.newElement(),s=void 0===t._length?t.v.length:t._length;i.setLength(s),i.c=t.c;for(e=0;e<s;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i}var r=pool_factory(4,t,e);return r.clone=i,r}(),shapeCollection_pool=function(){function t(){var t;return r?(r-=1,t=a[r]):t=new ShapeCollection,t}function e(t){var e,i=t._length;for(e=0;e<i;e+=1)shape_pool.release(t.shapes[e]);t._length=0,r===s&&(a=pooling["double"](a),s=2*s),a[r]=t,r+=1}var i={newShapeCollection:t,release:e},r=0,s=4,a=createSizedArray(s);return i}(),segments_length_pool=function(){function t(){return{lengths:[],totalLength:0}}function e(t){var e,i=t.lengths.length;for(e=0;e<i;e+=1)bezier_length_pool.release(t.lengths[e]);t.lengths.length=0}return pool_factory(8,t,e)}(),bezier_length_pool=function(){function t(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}return pool_factory(8,t)}();BaseRenderer.prototype.checkLayers=function(t){var e,i,r=this.layers.length;for(this.completeLayers=!0,e=r-1;e>=0;e--)this.elements[e]||(i=this.layers[e],i.ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t)}return this.createNull(t)},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);
+this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){this.completeLayers=!1;var e,i,r=t.length,s=this.layers.length;for(e=0;e<r;e+=1)for(i=0;i<s;){if(this.layers[i].id==t[e].id){this.layers[i]=t[e];break}i+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,i){for(var r=this.elements,s=this.layers,a=0,n=s.length;a<n;)s[a].ind==e&&(r[a]&&r[a]!==!0?(i.push(r[a]),r[a].setAsParent(),void 0!==s[a].parent?this.buildElementParenting(t,s[a].parent,i):t.setHierarchy(i)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;e<i;e+=1)if(t[e].xt){var r=this.createComp(t[e]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%"),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.nm=t.nm,this.globalData.compSize.w=t.w,this.globalData.compSize.h=t.h,this.globalData.frameRate=t.fr,this.data=t;var i=createNS("clipPath"),r=createNS("rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var s="animationMask_"+randomString(10);i.setAttribute("id",s),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(i),this.layers=t.layers,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);e[t]=i,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&this.elements[t-1]!==!0?i.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;e<i;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var e,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;e>=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<i;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var r,s=0;s<e;)this.elements[s]&&this.elements[s]!==!0&&this.elements[s].getBaseElement()&&(r=this.elements[s].getBaseElement()),s+=1;r?this.layerElement.insertBefore(i,r):this.layerElement.appendChild(i)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,i=this.masksProperties.length;for(e=0;e<i;e++)if((this.viewData[e].prop._mdf||this._isFirstFrame)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||this._isFirstFrame)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||this._isFirstFrame)&&(this.viewData[e].invRect.setAttribute("x",-t.props[12]),this.viewData[e].invRect.setAttribute("y",-t.props[13])),this.storedData[e].x&&(this.storedData[e].x._mdf||this._isFirstFrame))){var r=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),r.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}this._isFirstFrame=!1},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,i){var r,s,a=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,r=1;r<s;r+=1)a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[r][0]+","+e.i[r][1]+" "+e.v[r][0]+","+e.v[r][1];if(e.c&&s>1&&(a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var i,r=this.dynamicProperties.length;for(i=0;i<r;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this.dynamicProperties):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),11!==this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<r;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;i<r;i+=1)t=this.hierarchy[i].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i=!0,r=this.comp;i;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):i=!1;var s,a,n=e.length;for(s=0;s<n;s+=1)a=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){this.maskManager.renderFrame(this.finalTransform.mat),this.renderableEffectsManager.renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},function(){var t={initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.layerElement.style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||(this.layerElement.style.display="block"),this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(t)],RenderableDOMElement)}(),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGGradientFillStyleData.prototype.initGradientData=function(t,e,i,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,i),this.s=PropertyFactory.getProp(t,e.s,1,null,i),this.e=PropertyFactory.getProp(t,e.e,1,null,i),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,i),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,i),this.g=new GradientProperty(t,e.g,i),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r)},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var i="gr_"+randomString(10),r=createNS(1===e.t?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var s,a,n,o=[];for(n=4*e.g.p,a=0;a<n;a+=4)s=createNS("stop"),r.appendChild(s),o.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url(#"+i+")"),this.gf=r,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,s,a=createNS("mask"),n=createNS("path");a.appendChild(n);var o="op_"+randomString(10),h="mk_"+randomString(10);a.setAttribute("id",h);var l=createNS(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",o),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var p=this.stops;for(r=4*t.g.p;r<s;r+=2)i=createNS("stop"),i.setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(i),p.push(i);n.setAttribute("gf"===t.ty?"fill":"stroke","url(#"+o+")"),this.of=l,this.ms=a,this.ost=p,this.maskId=h,e.msElem=n}},SVGGradientStrokeStyleData.prototype.initGradientData=SVGGradientFillStyleData.prototype.initGradientData,SVGGradientStrokeStyleData.prototype.setGradientData=SVGGradientFillStyleData.prototype.setGradientData,SVGGradientStrokeStyleData.prototype.setGradientOpacity=SVGGradientFillStyleData.prototype.setGradientOpacity,BaseElement.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},BaseElement.prototype.initExpressions=function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},BaseElement.prototype.blendModeEnums={1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},BaseElement.prototype.getBlendMode=function(){return this.blendModeEnums[this.data.bm]||""},BaseElement.prototype.setBlendMode=function(){var t=this.getBlendMode(),e=this.baseElement||this.layerElement;e.style["mix-blend-mode"]=t},BaseElement.prototype.initBaseData=function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId="ly_"+randomString(10),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},BaseElement.prototype.getType=function(){return this.type},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,r=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),r=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=randomString(10),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),i.appendChild(this.layerElement),r=i,s.appendChild(i),i.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var a=createNS("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=createNS("g");a.appendChild(n),t=randomString(10),e=filtersFactory.createFilter(t);var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1"),e.appendChild(o),this.globalData.defs.appendChild(e);var h=createNS("rect");h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+t+")"),n.appendChild(h),n.appendChild(this.layerElement),r=n,featureSupport.maskType||(a.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),n.appendChild(h),i.appendChild(this.layerElement),r=i,n.appendChild(i)),this.globalData.defs.appendChild(a)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)),0===this.data.ty&&!this.data.hd){var l=createNS("clipPath"),p=createNS("path");p.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m="cp_"+randomString(8);if(l.setAttribute("id",m),l.appendChild(p),this.globalData.defs.appendChild(l),this.checkMasks()){var f=createNS("g");f.setAttribute("clip-path","url("+locationHref+"#"+m+")"),f.appendChild(this.layerElement),this.transformedElement=f,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+m+")")}0!==this.data.bm&&this.setBlendMode(),this.renderableEffectsManager=new SVGEffects(this)},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},addMasks:function(){this.maskManager=new MaskElement(this.data,this,this.globalData,this.dynamicProperties)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;e<i;e+=1)this.shapeModifiers[e].addShape(t)},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].reset();for(e=this.shapeModifiers.length,t=e-1;t>=0;t-=1)this.shapeModifiers[t].processShapes(this._isFirstFrame)}},lcEnum:{1:"butt",2:"round",3:"square"},ljEnum:{1:"miter",2:"round",3:"butt"},searchProcessedElement:function(t){for(var e=0,i=this.processedElements.length;e<i;){if(this.processedElements[e].elem===t)return this.processedElements[e].pos;e+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements.length;i;)if(i-=1,this.processedElements[i].elem===t){this.processedElements[i].pos=e;break}0===i&&this.processedElements.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},buildShapeString:function(t,e,i,r){var s,a="";for(s=1;s<e;s+=1)1===s&&(a+=" M"+r.applyToPointStringified(t.v[0][0],t.v[0][1])),a+=" C"+r.applyToPointStringified(t.o[s-1][0],t.o[s-1][1])+" "+r.applyToPointStringified(t.i[s][0],t.i[s][1])+" "+r.applyToPointStringified(t.v[s][0],t.v[s][1]);return 1===e&&(a+=" M"+r.applyToPointStringified(t.v[0][0],t.v[0][1])),i&&e&&(a+=" C"+r.applyToPointStringified(t.o[s-1][0],t.o[s-1][1])+" "+r.applyToPointStringified(t.i[0][0],t.i[0][1])+" "+r.applyToPointStringified(t.v[0][0],t.v[0][1]),a+="z"),a}},ITextElement.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1)},ITextElement.prototype.createPathShape=function(t,e){var i,r,s=e.length,a="";for(i=0;i<s;i+=1)r=e[i].ks.k,a+=this.buildShapeString(r,r.i.length,!0,t);return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e),this.buildNewText(),this.renderInnerContent()},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t),this.buildNewText(),this.renderInnerContent()},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t),this.buildNewText(),this.renderInnerContent()},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,i,r,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(r,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.buildShapeString=IShapeElement.prototype.buildShapeString,ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,r=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=0;i<r;i+=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio","xMidYMid slice"),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextElement),SVGTextElement.prototype.createContent=function(){this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextElement.prototype.buildNewText=function(){var t,e,i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var r=this.globalData.fontManager.getFontByName(i.f);if(r.fClass)this.layerElement.setAttribute("class",r.fClass);else{this.layerElement.setAttribute("font-family",r.fFamily);var s=i.fWeight,a=i.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",s)}var n=i.l||[],o=this.globalData.fontManager.chars;if(e=n.length){var h,l,p=this.mHelper,m="",f=this.data.singleShape,c=0,d=0,u=!0,y=i.tr/1e3*i.finalSize;if(!f||o||i.sz){var g,v,b=this.textSpans.length;for(t=0;t<e;t+=1)o&&f&&0!==t||(h=b>t?this.textSpans[t]:createNS(o?"path":"text"),b<=t&&(h.setAttribute("stroke-linecap","butt"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=h,this.layerElement.appendChild(h)),h.style.display="inherit"),p.reset(),p.scale(i.finalSize/100,i.finalSize/100),f&&(n[t].n&&(c=-y,d+=i.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(i,p,n[t].line,c,d),c+=n[t].l||0,c+=y),o?(v=this.globalData.fontManager.getCharData(i.finalText.charAt(t),r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily),g=v&&v.data||{},l=g.shapes?g.shapes[0].it:[],f?m+=this.createPathShape(p,l):h.setAttribute("d",this.createPathShape(p,l))):(f&&h.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),h.textContent=n[t].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));f&&h.setAttribute("d",m)}else{var E=this.textContainer,P="start";switch(i.j){case 1:P="end";break;case 2:P="middle"}E.setAttribute("text-anchor",P),E.setAttribute("letter-spacing",y);var x=i.finalText.split(String.fromCharCode(13));for(e=x.length,d=i.ps?i.ps[1]+i.ascent:0,t=0;t<e;t+=1)h=this.textSpans[t]||createNS("tspan"),h.textContent=x[t],h.setAttribute("x",0),h.setAttribute("y",d),h.style.display="inherit",E.appendChild(h),this.textSpans[t]=h,d+=i.finalLineHeight;this.layerElement.appendChild(E)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0}},SVGTextElement.prototype.sourceRectAtTime=function(t){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextElement.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,i=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;e=r.length;var s,a;for(t=0;t<e;t+=1)r[t].n||(s=i[t],a=this.textSpans[t],s._mdf.m&&a.setAttribute("transform",s.m),s._mdf.o&&a.setAttribute("opacity",s.o),s._mdf.sw&&a.setAttribute("stroke-width",s.sw),s._mdf.sc&&a.setAttribute("stroke",s.sc),s._mdf.fc&&a.setAttribute("fill",s.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0)},SVGShapeElement.prototype.createStyleElement=function(t,e,i){var r,s=new SVGStyleData(t,e),a=s.pElem;if("st"===t.ty)r=new SVGStrokeStyleData(this,t,i,s);else if("fl"===t.ty)r=new SVGFillStyleData(this,t,i,s);else if("gf"===t.ty||"gs"===t.ty){var n="gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData;r=new n(this,t,i,s),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),a.setAttribute("mask","url(#"+r.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),a.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),this.stylesList.push(s),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),e},SVGShapeElement.prototype.createTransformElement=function(t,e){return new SVGTransformData(TransformPropertyFactory.getTransformProperty(this,t,e),PropertyFactory.getProp(this,t.o,0,.01,e))},SVGShapeElement.prototype.createShapeElement=function(t,e,i,r){var s=4;"rc"===t.ty?s=5:"el"===t.ty?s=6:"sr"===t.ty&&(s=7);var a=ShapePropertyFactory.getShapeProp(this,t,s,r),n=new SVGShapeData(e,i,a);return this.shapes.push(n.sh),this.addShapeToModifiers(n),n},SVGShapeElement.prototype.setElementStyles=function(t){var e,i=t.styles,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,i,r,s,a,n,o){var h,l,p,m,f,c,d=[].concat(n),u=t.length-1,y=[],g=[];for(h=u;h>=0;h-=1){if(c=this.searchProcessedElement(t[h]),c?e[h]=i[c-1]:t[h]._render=o,"fl"==t[h].ty||"st"==t[h].ty||"gf"==t[h].ty||"gs"==t[h].ty)c?e[h].style.closed=!1:e[h]=this.createStyleElement(t[h],a,s),t[h]._render&&r.appendChild(e[h].style.pElem),y.push(e[h].style);else if("gr"==t[h].ty){if(c)for(p=e[h].it.length,l=0;l<p;l+=1)e[h].prevViewData[l]=e[h].it[l];else e[h]=this.createGroupElement(t[h]);this.searchShapes(t[h].it,e[h].it,e[h].prevViewData,e[h].gr,s,a+1,d,o),t[h]._render&&r.appendChild(e[h].gr)}else"tr"==t[h].ty?(c||(e[h]=this.createTransformElement(t[h],s)),
+m=e[h].transform,d.push(m)):"sh"==t[h].ty||"rc"==t[h].ty||"el"==t[h].ty||"sr"==t[h].ty?(c||(e[h]=this.createShapeElement(t[h],d,a,s)),this.setElementStyles(e[h])):"tm"==t[h].ty||"rd"==t[h].ty||"ms"==t[h].ty?(c?(f=e[h],f.closed=!1):(f=ShapeModifiers.getModifier(t[h].ty),f.init(this,t[h],s),e[h]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"==t[h].ty&&(c?(f=e[h],f.closed=!0):(f=ShapeModifiers.getModifier(t[h].ty),e[h]=f,f.init(this,t,h,e,s),this.shapeModifiers.push(f),o=!1),g.push(f));this.addProcessedElement(t[h],h+1)}for(u=y.length,h=0;h<u;h+=1)y[h].closed=!0;for(u=g.length,h=0;h<u;h+=1)g[h].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(this.shapesData,this.itemsData,this.layerElement),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(t,e,i){var r,s,a=t.length-1;for(r=0;r<=a;r+=1)s=t[r].ty,"tr"==s?((this._isFirstFrame||e[r].transform.op._mdf)&&i.setAttribute("opacity",e[r].transform.op.v),(this._isFirstFrame||e[r].transform.mProps._mdf)&&i.setAttribute("transform",e[r].transform.mProps.v.to2dCSS())):!t[r]._render||"sh"!=s&&"el"!=s&&"rc"!=s&&"sr"!=s?"fl"==s?this.renderFill(t[r],e[r]):"gf"==s?this.renderGradient(t[r],e[r]):"gs"==s?(this.renderGradient(t[r],e[r]),this.renderStroke(t[r],e[r])):"st"==s?this.renderStroke(t[r],e[r]):"gr"==s&&this.renderShape(t[r].it,e[r].it,e[r].gr):this.renderPath(e[r])},SVGShapeElement.prototype.renderPath=function(t){var e,i,r,s,a,n,o,h,l,p,m,f=t.styles.length,c=t.lvl;for(n=0;n<f;n+=1){if(s=t.sh._mdf||this._isFirstFrame,t.styles[n].lvl<c)for(h=this.mHelper.reset(),p=c-t.styles[n].lvl,m=t.transformers.length-1;p>0;)s=t.transformers[m].mProps._mdf||s,l=t.transformers[m].mProps.v.props,h.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15]),p--,m--;else h=this.identityMatrix;if(o=t.sh.paths,i=o._length,s){for(r="",e=0;e<i;e+=1)a=o.shapes[e],a&&a._length&&(r+=this.buildShapeString(a,a._length,a.c,h));t.caches[n]=r}else r=t.caches[n];t.styles[n].d+=r,t.styles[n]._mdf=s||t.styles[n]._mdf}},SVGShapeElement.prototype.renderFill=function(t,e){var i=e.style;(e.c._mdf||this._isFirstFrame)&&i.pElem.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||this._isFirstFrame)&&i.pElem.setAttribute("fill-opacity",e.o.v)},SVGShapeElement.prototype.renderGradient=function(t,e){var i=e.gf,r=e.g._hasOpacity,s=e.s.v,a=e.e.v;if(e.o._mdf||this._isFirstFrame){var n="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(n,e.o.v)}if(e.s._mdf||this._isFirstFrame){var o=1===t.t?"x1":"cx",h="x1"===o?"y1":"cy";i.setAttribute(o,s[0]),i.setAttribute(h,s[1]),r&&!e.g._collapsable&&(e.of.setAttribute(o,s[0]),e.of.setAttribute(h,s[1]))}var l,p,m,f;if(e.g._cmdf||this._isFirstFrame){l=e.cst;var c=e.g.c;for(m=l.length,p=0;p<m;p+=1)f=l[p],f.setAttribute("offset",c[4*p]+"%"),f.setAttribute("stop-color","rgb("+c[4*p+1]+","+c[4*p+2]+","+c[4*p+3]+")")}if(r&&(e.g._omdf||this._isFirstFrame)){var d=e.g.o;for(l=e.g._collapsable?e.cst:e.ost,m=l.length,p=0;p<m;p+=1)f=l[p],e.g._collapsable||f.setAttribute("offset",d[2*p]+"%"),f.setAttribute("stop-opacity",d[2*p+1])}if(1===t.t)(e.e._mdf||this._isFirstFrame)&&(i.setAttribute("x2",a[0]),i.setAttribute("y2",a[1]),r&&!e.g._collapsable&&(e.of.setAttribute("x2",a[0]),e.of.setAttribute("y2",a[1])));else{var u;if((e.s._mdf||e.e._mdf||this._isFirstFrame)&&(u=Math.sqrt(Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2)),i.setAttribute("r",u),r&&!e.g._collapsable&&e.of.setAttribute("r",u)),e.e._mdf||e.h._mdf||e.a._mdf||this._isFirstFrame){u||(u=Math.sqrt(Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2)));var y=Math.atan2(a[1]-s[1],a[0]-s[0]),g=e.h.v>=1?.99:e.h.v<=-1?-.99:e.h.v,v=u*g,b=Math.cos(y+e.a.v)*v+s[0],E=Math.sin(y+e.a.v)*v+s[1];i.setAttribute("fx",b),i.setAttribute("fy",E),r&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",E))}}},SVGShapeElement.prototype.renderStroke=function(t,e){var i=e.style,r=e.d;r&&(r._mdf||this._isFirstFrame)&&(i.pElem.setAttribute("stroke-dasharray",r.dashStr),i.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||this._isFirstFrame)&&i.pElem.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||this._isFirstFrame)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||this._isFirstFrame)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapeData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,i,r,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(r=this.elem.maskManager.masksProperties.length,i=0):(i=this.filterManager.effectElements[0].p.v-1,r=i+1),e=createNS("g"),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1),i;i<r;i+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),n="stms_"+randomString(10);a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=createNS("g");o.setAttribute("mask","url("+locationHref+"#"+n+")"),s[0]&&o.appendChild(s[0]),this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,i,r,s=this.paths.length;for(e=0;e<s;e+=1)if(i=this.elem.maskManager.viewData[this.paths[e].m],r=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&r.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,o=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,h=r.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),m=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100,f=Math.floor(p/m);for(l=0;l<f;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100;r.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bm_floor(255*c[0])+","+bm_floor(255*c[1])+","+bm_floor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,s=r[0]+" "+i[0]+" "+e[0],a=r[1]+" "+i[1]+" "+e[1],n=r[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var i=createNS(t);return i.setAttribute("type","table"),e.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(t,e,i,r,s){for(var a,n,o=0,h=256,l=Math.min(t,e),p=Math.max(t,e),m=Array.call(null,{length:h}),f=0,c=s-r,d=e-t;o<=256;)a=o/256,n=a<=l?d<0?s:r:a>=p?d<0?r:s:r+c*Math.pow((a-t)/d,1/i),m[f++]=n,o+=256/(h-1);return m.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[],_svgMatteMaskCounter=0;SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;e<i;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var r=i.children,s=0,a=r.length;s<a&&r[s]!==t.layerElement;)s+=1;var n;s<=a-2&&(n=r[s+1]);var o=createNS("use");o.setAttribute("href","#"+e),n?i.insertBefore(o,n):i.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i="matte_"+randomString(5)+"_"+_svgMatteMaskCounter++,r=createNS("mask");r.setAttribute("id",e.layerId),r.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(r);var a=createNS("symbol");a.setAttribute("id",i),this.replaceInParent(e,i),a.appendChild(e.layerElement),s.appendChild(a),useElem=createNS("use"),useElem.setAttribute("href","#"+i),r.appendChild(useElem),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=0,i=this.elem.comp.elements.length;e<i;)this.elem.comp.elements[e].data.ind===t&&this.setElementAsMask(this.elem,this.elem.comp.elements[e]),e+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)};var animationManager=function(){function t(t){for(var e=0,i=t.target;e<x;)E[e].animation===i&&(E.splice(e,1),e-=1,x-=1,i.isPaused||r()),e+=1}function e(t,e){if(!t)return null;for(var i=0;i<x;){if(E[i].elem==t&&null!==E[i].elem)return E[i].animation;i+=1}var r=new AnimationItem;return s(r,t),r.setData(t,e),r}function i(){_+=1,v()}function r(){_-=1,0===_&&(S=!0)}function s(e,s){e.addEventListener("destroy",t),e.addEventListener("_active",i),e.addEventListener("_idle",r),E.push({elem:s,animation:e}),x+=1}function a(t){var e=new AnimationItem;return s(e,null),e.setParams(t),e}function n(t,e){var i;for(i=0;i<x;i+=1)E[i].animation.setSpeed(t,e)}function o(t,e){var i;for(i=0;i<x;i+=1)E[i].animation.setDirection(t,e)}function h(t){var e;for(e=0;e<x;e+=1)E[e].animation.play(t)}function l(t){var e,i=t-P;for(e=0;e<x;e+=1)E[e].animation.advanceTime(i);P=t,S?C=!0:window.requestAnimationFrame(l)}function p(t){P=t,window.requestAnimationFrame(l)}function m(t){var e;for(e=0;e<x;e+=1)E[e].animation.pause(t)}function f(t,e,i){var r;for(r=0;r<x;r+=1)E[r].animation.goToAndStop(t,e,i)}function c(t){var e;for(e=0;e<x;e+=1)E[e].animation.stop(t)}function d(t){var e;for(e=0;e<x;e+=1)E[e].animation.togglePause(t)}function u(t){var e;for(e=x-1;e>=0;e-=1)E[e].animation.destroy(t)}function y(t,i,r){var s,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=a.length;for(s=0;s<n;s+=1)r&&a[s].setAttribute("data-bm-type",r),e(a[s],t);if(i&&0===n){r||(r="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=createTag("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",r),o.appendChild(h),e(h,t)}}function g(){var t;for(t=0;t<x;t+=1)E[t].animation.resize()}function v(){S&&(S=!1,C&&(window.requestAnimationFrame(p),C=!1))}var b={},E=[],P=0,x=0,S=!0,_=0,C=!0;return b.registerAnimation=e,b.loadAnimation=a,b.setSpeed=n,b.setDirection=o,b.play=h,b.pause=m,b.stop=c,b.togglePause=d,b.searchAnimations=y,b.resize=g,b.goToAndStop=f,b.destroy=u,b}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.subframeEnabled=subframeEnabled,this.segments=[],this._idle=!0,this.projectInterface=ProjectInterface()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var i=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(i){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}if(this.renderer.setProjectInterface(this.projectInterface),this.animType=i,""===t.loop||null===t.loop||(t.loop===!1?this.loop=!1:t.loop===!0?this.loop=!0:this.loop=parseInt(t.loop)),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var r=new XMLHttpRequest;t.path.lastIndexOf("\\")!=-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.assetsPath=t.assetsPath,this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),r.open("GET",t.path,!0),r.send(),r.onreadystatechange=function(){if(4==r.readyState)if(200==r.status)e.configAnimation(JSON.parse(r.responseText));else try{var t=JSON.parse(r.responseText);e.configAnimation(t)}catch(i){}}}},AnimationItem.prototype.setData=function(t,e){var i={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},r=t.attributes;i.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",i.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:"canvas";var s=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";""===s||("false"===s?i.loop=!1:"true"===s?i.loop=!0:i.loop=parseInt(s));var a=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:!r.getNamedItem("bm-autoplay")||r.getNamedItem("bm-autoplay").value;i.autoplay="false"!==a,i.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"";var n=r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"";"false"===n&&(i.prerender=!1),this.setParams(i)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip),this.animationData.tf=this.totalFrames);var e,i,r=this.animationData.layers,s=r.length,a=t.layers,n=a.length;for(i=0;i<n;i+=1)for(e=0;e<s;){if(r[e].id==a[i].id){r[e]=a[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,e=0;e<s;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.renderFrame(-1),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=new XMLHttpRequest,r=this,s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,i.open("GET",s,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)r.includeLayers(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);r.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){var e=this;this.renderer&&this.renderer.destroyed||(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.renderer.searchExtraCompositions(t.assets),this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.imagePreloader=new ImagePreloader,this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(t.assets,function(t){t||e.trigger("loaded_images")}),this.loadSegments(),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():(dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded()))},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.addPendingElement=function(){this.pendingElements+=1},AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.subframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.subframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"))},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.playCount=0,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.goToAndStop=function(t,e,i){i&&this.name!=i||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},AnimationItem.prototype.goToAndPlay=function(t,e,i){this.goToAndStop(t,e,i),this.play()},AnimationItem.prototype.advanceTime=function(t){if(this.isPaused!==!0&&this.isLoaded!==!1){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames?this.checkSegments(e%this.totalFrames)||(this.loop&&++this.playCount!==this.loop?(this.setCurrentRawFrameValue(e%this.totalFrames),this.trigger("loopComplete")):(i=!0,e=this.totalFrames)):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?i=t:this.currentRawFrame+this.firstFrame>e&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,i!==-1&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var i,r=t.length;for(i=0;i<r;i+=1)this.segments.push(t[i])}else this.segments.push(t);e&&this.checkSegments(0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||(this.renderer.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(this.assetsPath){var i=t.p;i.indexOf("images/")!==-1&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;e<i;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13]);this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var i=this.contextData.cTr.props;this.canvasContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])}},CanvasRenderer.prototype.ctxOpacity=function(t){return this.renderConfig.clearCanvas?(this.contextData.cO*=t<0?0:t,void(this.canvasContext.globalAlpha=this.contextData.cO)):void(this.canvasContext.globalAlpha*=t<0?0:t)},CanvasRenderer.prototype.reset=function(){return this.renderConfig.clearCanvas?void this.contextData.reset():void this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.save();t&&this.canvasContext.save();var e=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i,r=this.contextData.saved[this.contextData.cArrPos];for(i=0;i<16;i+=1)r[i]=e[i];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1},CanvasRenderer.prototype.restore=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.restore();t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,i=this.contextData.saved[this.contextData.cArrPos],r=this.contextData.cTr.props;for(e=0;e<16;e+=1)r[e]=i[e];this.canvasContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),i=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=i,this.canvasContext.globalAlpha=i},CanvasRenderer.prototype.configAnimation=function(t){this.animationItem.wrapper?(this.animationItem.container=createTag("canvas"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className)):this.canvasContext=this.renderConfig.context,this.data=t,this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.totalFrames=Math.floor(t.tf),this.globalData.compWidth=t.w,this.globalData.compHeight=t.h,this.globalData.frameRate=t.fr,this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.globalData.fontManager=new FontManager,
+this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document.body),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.addPendingElement=this.animationItem.addPendingElement.bind(this.animationItem),this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){this.reset();var t,e;this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr);var i,r;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var s=this.renderConfig.preserveAspectRatio.split(" "),a=s[1]||"meet",n=s[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);i=t/e,r=this.transformCanvas.w/this.transformCanvas.h,r>i&&"meet"===a||r<i&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)),"xMid"===o&&(r<i&&"meet"===a||r>i&&"slice"===a)?this.transformCanvas.tx=(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(r<i&&"meet"===a||r>i&&"slice"===a)?this.transformCanvas.tx=(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,"YMid"===h&&(r>i&&"meet"===a||r<i&&"slice"===a)?this.transformCanvas.ty=(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(r>i&&"meet"===a||r<i&&"slice"===a)?this.transformCanvas.ty=(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else"none"==this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip()},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t){if(!(this.renderedFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed||t===-1)){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!1,this.globalData.projectInterface.currentFrame=t;var e,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=0;e<i;e++)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),e=i-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){var i=this.createItem(this.layers[t],this,this.globalData);e[t]=i,i.initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([BaseRenderer],HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},HybridRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){var r=this.layers[e];if(r.ddd&&this.supports3d)this.addTo3dContainer(i,e);else{for(var s,a,n,o=0;o<e;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement&&(a=this.elements[o],n=this.layers[o].ddd?this.getThreeDContainerByPos(o):a.getBaseElement(),s=n||s),o+=1;s?r.ddd&&this.supports3d||this.layerElement.insertBefore(i,s):r.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},HybridRenderer.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRenderer.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextElement(t,this.globalData,this)},HybridRenderer.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRenderer.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new ICompElement(t,this.globalData,this)},HybridRenderer.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRenderer.prototype.createNull=SVGRenderer.prototype.createNull,HybridRenderer.prototype.getThreeDContainerByPos=function(t){for(var e=0,i=this.threeDElements.length;e<i;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}},HybridRenderer.prototype.createThreeDContainer=function(t){var e=createTag("div");styleDiv(e),e.style.width=this.globalData.compSize.w+"px",e.style.height=this.globalData.compSize.h+"px",e.style.transformOrigin=e.style.mozTransformOrigin=e.style.webkitTransformOrigin="50% 50%";var i=createTag("div");styleDiv(i),i.style.transform=i.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",e.appendChild(i),this.resizerElem.appendChild(e);var r={container:i,perspectiveElem:e,startPos:t,endPos:t};return this.threeDElements.push(r),r},HybridRenderer.prototype.build3dContainers=function(){var t,e,i=this.layers.length;for(t=0;t<i;t+=1)this.layers[t].ddd?(e||(e=this.createThreeDContainer(t)),e.endPos=Math.max(e.endPos,t)):e=null},HybridRenderer.prototype.addTo3dContainer=function(t,e){for(var i=0,r=this.threeDElements.length;i<r;){if(e<=this.threeDElements[i].endPos){for(var s,a=this.threeDElements[i].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a].getBaseElement()),a+=1;s?this.threeDElements[i].container.insertBefore(t,s):this.threeDElements[i].container.appendChild(t);break}i+=1}},HybridRenderer.prototype.configAnimation=function(t){var e=createTag("div"),i=this.animationItem.wrapper;e.style.width=t.w+"px",e.style.height=t.h+"px",this.resizerElem=e,styleDiv(e),e.style.transformStyle=e.style.webkitTransformStyle=e.style.mozTransformStyle="flat",this.renderConfig.className&&i.setAttribute("class",this.renderConfig.className),i.appendChild(e),e.style.overflow="hidden";var r=createNS("svg");r.setAttribute("width","1"),r.setAttribute("height","1"),styleDiv(r),this.resizerElem.appendChild(r);var s=createNS("defs");r.appendChild(s),this.globalData.defs=s,this.data=t,this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr,this.layers=t.layers,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,r),this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRenderer.prototype.updateContainerSize=function(){var t,e,i,r,s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,n=s/a,o=this.globalData.compSize.w/this.globalData.compSize.h;o>n?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,i=0,r=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,r=0),this.resizerElem.style.transform=this.resizerElem.style.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+r+",0,1)"},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.resizerElem.style.display="block"},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,r=this.threeDElements.length;for(t=0;t<r;t+=1)this.threeDElements[t].perspectiveElem.style.perspective=this.threeDElements[t].perspectiveElem.style.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(i,2))+"px"}},HybridRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length,r=createTag("div");for(e=0;e<i;e+=1)if(t[e].xt){var s=this.createComp(t[e],r,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var i=0;for(i=this._length;i<t;i+=1)this.saved[i]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=this.getBlendMode();t.canvasContext.globalCompositeOperation=e}},addMasks:function(){this.maskManager=new CVMaskElement(this.data,this,this.dynamicProperties)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){this.hidden||(this.renderTransform(),this.renderRenderable(),this.setBlendMode(),this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.imageLoaded=function(){if(this.globalData.elementLoaded(),this.assetData.w!==this.img.width||this.assetData.h!==this.img.height){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,i,r=t.getContext("2d"),s=this.img.width,a=this.img.height,n=s/a,o=this.assetData.w/this.assetData.h;n>o?(i=a,e=i*o):(e=s,i=e/o),r.drawImage(this.img,(s-e)/2,(a-i)/2,e,i,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.imageFailed=function(){this.failed=!0,this.globalData.elementLoaded()},CVImageElement.prototype.createContent=function(){var t=this.img;t.addEventListener("load",this.imageLoaded.bind(this),!1),t.addEventListener("error",this.imageFailed.bind(this),!1);var e=this.globalData.getAssetsPath(this.assetData);t.src=e},CVImageElement.prototype.renderInnerContent=function(t){this.failed||this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(t){if(this.hasMasks){var e,i,r,s,a=this.element.canvasContext,n=this.masksProperties.length;for(a.beginPath(),e=0;e<n;e++)if("n"!==this.masksProperties[e].mode){this.masksProperties[e].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compWidth,0),a.lineTo(this.element.globalData.compWidth,this.element.globalData.compHeight),a.lineTo(0,this.element.globalData.compHeight),a.lineTo(0,0)),s=this.viewData[e].v,i=t.applyToPointArray(s.v[0][0],s.v[0][1],0),a.moveTo(i[0],i[1]);var o,h=s._length;for(o=1;o<h;o++)r=t.applyToTriplePoints(s.o[o-1],s.i[o],s.v[o]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=t.applyToTriplePoints(s.o[o-1],s.i[0],s.v[0]),a.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,_matMdf:!1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.dynamicProperties,!0)},CVShapeElement.prototype.createStyleElement=function(t,e){var i={data:t,type:t.ty,elements:[]},r={};if("fl"!=t.ty&&"st"!=t.ty||(r.c=PropertyFactory.getProp(this,t.c,1,255,e),r.c.k||(i.co="rgb("+bm_floor(r.c.v[0])+","+bm_floor(r.c.v[1])+","+bm_floor(r.c.v[2])+")")),r.o=PropertyFactory.getProp(this,t.o,0,.01,e),"st"==t.ty){if(i.lc=this.lcEnum[t.lc]||"round",i.lj=this.ljEnum[t.lj]||"round",1==t.lj&&(i.ml=t.ml),r.w=PropertyFactory.getProp(this,t.w,0,null,e),r.w.k||(i.wi=r.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",e);r.d=s,r.d.k||(i.da=r.d.dashArray,i["do"]=r.d.dashoffset[0])}}else i.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(i),r.style=i,r},CVShapeElement.prototype.createGroupElement=function(t){var e={it:[],prevViewData:[]};return e},CVShapeElement.prototype.createTransformElement=function(t,e){var i={transform:{mat:new Matrix,opacity:1,_matMdf:!1,_opMdf:!1,op:PropertyFactory.getProp(this,t.o,0,.01,e),mProps:TransformPropertyFactory.getTransformProperty(this,t,e)},elements:[]};return i},CVShapeElement.prototype.createShapeElement=function(t,e){var i={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]},r=4;"rc"==t.ty?r=5:"el"==t.ty?r=6:"sr"==t.ty&&(r=7),i.sh=ShapePropertyFactory.getShapeProp(this,t,r,e),this.shapes.push(i.sh),this.addShapeToModifiers(i);var s,a=this.stylesList.length,n=!1,o=!1;for(s=0;s<a;s+=1)this.stylesList[s].closed||(this.stylesList[s].elements.push(i),"st"===this.stylesList[s].type?n=!0:o=!0);return i.st=n,i.fl=o,i},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.dynamicProperties,!0),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},CVShapeElement.prototype.searchShapes=function(t,e,i,r,s){var a,n,o,h,l,p=t.length-1,m=[],f=[];for(a=p;a>=0;a-=1){if(h=this.searchProcessedElement(t[a]),h?e[a]=i[h-1]:t[a]._render=s,"fl"==t[a].ty||"st"==t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],r),m.push(e[a].style);else if("gr"==t[a].ty){if(h)for(o=e[a].it.length,n=0;n<o;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,r,s)}else"tr"==t[a].ty?h||(e[a]=this.createTransformElement(t[a],r)):"sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty||"sr"==t[a].ty?h||(e[a]=this.createShapeElement(t[a],r)):"tm"==t[a].ty||"rd"==t[a].ty?(h?(l=e[a],l.closed=!1):(l=ShapeModifiers.getModifier(t[a].ty),l.init(this,t[a],r),e[a]=l,this.shapeModifiers.push(l)),f.push(l)):"rp"==t[a].ty&&(h?(l=e[a],l.closed=!0):(l=ShapeModifiers.getModifier(t[a].ty),e[a]=l,l.init(this,t,a,e,r),this.shapeModifiers.push(l),s=!1),f.push(l));this.addProcessedElement(t[a],a+1)}for(p=m.length,a=0;a<p;a+=1)m[a].closed=!0;for(p=f.length,a=0;a<p;a+=1)f[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.mat.reset(),this.transformHelper.opacity=1,this.transformHelper._matMdf=!1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){var i,r;(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0),(t._opMdf||e.op._mdf||this._isFirstFrame)&&(r=e.mat,r.cloneFromProps(e.mProps.v.props),e._matMdf=!0,i=t.mat.props,r.transform(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]))},CVShapeElement.prototype.drawLayer=function(){var t,e,i,r,s,a,n,o,h,l=this.stylesList.length,p=this.globalData.renderer,m=this.globalData.canvasContext;for(t=0;t<l;t+=1)if(h=this.stylesList[t],o=h.type,("st"!==o||0!==h.wi)&&h.data._render&&0!==h.coOp){for(p.save(),a=h.elements,"st"===o?(m.strokeStyle=h.co,m.lineWidth=h.wi,m.lineCap=h.lc,m.lineJoin=h.lj,m.miterLimit=h.ml||0):m.fillStyle=h.co,p.ctxOpacity(h.coOp),"st"!==o&&m.beginPath(),i=a.length,e=0;e<i;e+=1){for("st"===o&&(m.beginPath(),h.da?(m.setLineDash(h.da),m.lineDashOffset=h["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(m.setLineDash(this.dashResetter),this.globalData.isDashed=!1)),n=a[e].trNodes,s=n.length,r=0;r<s;r+=1)"m"==n[r].t?m.moveTo(n[r].p[0],n[r].p[1]):"c"==n[r].t?m.bezierCurveTo(n[r].pts[0],n[r].pts[1],n[r].pts[2],n[r].pts[3],n[r].pts[4],n[r].pts[5]):m.closePath();"st"===o&&m.stroke()}"st"!==o&&m.fill(h.r),p.restore()}},CVShapeElement.prototype.renderShape=function(t,e,i,r){var s,a,n=e.length-1;for(a=t,s=n;s>=0;s-=1)"tr"==e[s].ty?(a=i[s].transform,this.renderShapeTransform(t,a)):"sh"==e[s].ty||"el"==e[s].ty||"rc"==e[s].ty||"sr"==e[s].ty?this.renderPath(e[s],i[s],a):"fl"==e[s].ty?this.renderFill(e[s],i[s],a):"st"==e[s].ty?this.renderStroke(e[s],i[s],a):"gr"==e[s].ty?this.renderShape(a,e[s].it,i[s].it):"tm"==e[s].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderPath=function(t,e,i){var r,s,a,n,o=i._matMdf||e.sh._mdf||this._isFirstFrame;if(o){var h=e.sh.paths,l=i.mat;n=t._render===!1?0:h._length;var p=e.trNodes;for(p.length=0,a=0;a<n;a+=1){var m=h.shapes[a];if(m&&m.v){for(r=m._length,s=1;s<r;s+=1)1==s&&p.push({t:"m",p:l.applyToPointArray(m.v[0][0],m.v[0][1],0)}),p.push({t:"c",pts:l.applyToTriplePoints(m.o[s-1],m.i[s],m.v[s])});1==r&&p.push({t:"m",p:l.applyToPointArray(m.v[0][0],m.v[0][1],0)}),m.c&&r&&(p.push({t:"c",pts:l.applyToTriplePoints(m.o[s-1],m.i[0],m.v[0])}),p.push({t:"z"})),e.lStr=p}}if(e.st)for(s=0;s<16;s+=1)e.tr[s]=i.mat.props[s];e.trNodes=p}},CVShapeElement.prototype.renderFill=function(t,e,i){var r=e.style;(e.c._mdf||this._isFirstFrame)&&(r.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(r.coOp=e.o.v*i.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,i){var r=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(r.da=s.dashArray,r["do"]=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(r.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(r.coOp=e.o.v*i.opacity),(e.w._mdf||this._isFirstFrame)&&(r.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var i=!1;t.sc&&(i=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var r,s,a=this.globalData.fontManager.getFontByName(t.f),n=t.l,o=this.mHelper;this.stroke=i,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var h,l,p,m,f,c,d,u,y,g,v=this.data.singleShape,b=t.tr/1e3*t.finalSize,E=0,P=0,x=!0,S=0;for(r=0;r<s;r+=1){for(h=this.globalData.fontManager.getCharData(t.finalText.charAt(r),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),l=h&&h.data||{},o.reset(),v&&n[r].n&&(E=-b,P+=t.yOffset,P+=x?1:0,x=!1),f=l.shapes?l.shapes[0].it:[],d=f.length,o.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,o,n[r].line,E,P),y=createSizedArray(d),c=0;c<d;c+=1){for(m=f[c].ks.k.i.length,u=f[c].ks.k,g=[],p=1;p<m;p+=1)1==p&&g.push(o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[p][0],u.i[p][1],0),o.applyToY(u.i[p][0],u.i[p][1],0),o.applyToX(u.v[p][0],u.v[p][1],0),o.applyToY(u.v[p][0],u.v[p][1],0));g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[0][0],u.i[0][1],0),o.applyToY(u.i[0][0],u.i[0][1],0),o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),y[c]=g}v&&(E+=n[r].l,E+=b),this.textSpans[S]?this.textSpans[S].elem=y:this.textSpans[S]={elem:y},S+=1}},CVTextElement.prototype.renderInnerContent=function(){var t=this.canvasContext;this.finalTransform.mat.props;t.font=this.values.fValue,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var e,i,r,s,a,n,o=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;i=h.length;var l,p,m,f=null,c=null,d=null;for(e=0;e<i;e+=1)if(!h[e].n){if(l=o[e],l&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(l.p),this.globalData.renderer.ctxOpacity(l.o)),this.fill){for(l&&l.fc?f!==l.fc&&(f=l.fc,t.fillStyle=l.fc):f!==this.values.fill&&(f=this.values.fill,t.fillStyle=this.values.fill),p=this.textSpans[e].elem,s=p.length,this.globalData.canvasContext.beginPath(),r=0;r<s;r+=1)for(m=p[r],n=m.length,this.globalData.canvasContext.moveTo(m[0],m[1]),a=2;a<n;a+=6)this.globalData.canvasContext.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(l&&l.sw?d!==l.sw&&(d=l.sw,t.lineWidth=l.sw):d!==this.values.sWidth&&(d=this.values.sWidth,t.lineWidth=this.values.sWidth),l&&l.sc?c!==l.sc&&(c=l.sc,t.strokeStyle=l.sc):c!==this.values.stroke&&(c=this.values.stroke,t.strokeStyle=this.values.stroke),p=this.textSpans[e].elem,s=p.length,this.globalData.canvasContext.beginPath(),r=0;r<s;r+=1)for(m=p[r],n=m.length,this.globalData.canvasContext.moveTo(m[0],m[1]),a=2;a<n;a+=6)this.globalData.canvasContext.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}l&&this.globalData.renderer.restore()}},CVEffects.prototype.renderFrame=function(){},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag("div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&(this.transformedElement.style.transform=this.transformedElement.style.webkitTransform=this.finalTransform.mat.toCSS()),this.finalTransform._opMdf&&(this.transformedElement.style.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},addMasks:function(){this.maskManager=new MaskElement(this.data,this,this.globalData,this.dynamicProperties)},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?(t=createNS("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(t=createTag("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([HybridRenderer,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask&&(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h)),this.transformedElement=this.layerElement},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,this.dynamicProperties,0,[],!0),this.shapeCont=t},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.shapeCont.getBBox(),e=!1;this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),e=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),e=!0),(e||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y)&&(this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.shapeCont.style.transform=this.shapeCont.style.webkitTransform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(this.textProperty.currentData.l?this.textProperty.currentData.l.length:0);var e=this.innerElem.style;e.color=e.fill=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)",t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",i.fClass)this.innerElem.className=i.fClass;else{e.fontFamily=i.fFamily;var r=t.fWeight,s=t.fStyle;e.fontStyle=s,e.fontWeight=r}var a,n,o=t.l;n=o.length;var h,l,p,m,f=this.mHelper,c="",d=0;for(a=0;a<n;a+=1){if(this.globalData.fontManager.chars?(this.textPaths[d]?h=this.textPaths[d]:(h=createNS("path"),h.setAttribute("stroke-linecap","butt"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[d]?(l=this.textSpans[d],p=l.children[0]):(l=createTag("div"),p=createNS("svg"),p.appendChild(h),styleDiv(l)))):this.isMasked?h=this.textPaths[d]?this.textPaths[d]:createNS("text"):this.textSpans[d]?(l=this.textSpans[d],
+h=this.textPaths[d]):(l=createTag("span"),styleDiv(l),h=createTag("span"),styleDiv(h),l.appendChild(h)),this.globalData.fontManager.chars){var u,y=this.globalData.fontManager.getCharData(t.finalText.charAt(a),i.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(u=y?y.data:null,f.reset(),u&&u.shapes&&(m=u.shapes[0].it,f.scale(t.finalSize/100,t.finalSize/100),c=this.createPathShape(f,m),h.setAttribute("d",c)),this.isMasked)this.innerElem.appendChild(h);else if(this.innerElem.appendChild(l),u&&u.shapes){document.body.appendChild(p);var g=p.getBBox();p.setAttribute("width",g.width+2),p.setAttribute("height",g.height+2),p.setAttribute("viewBox",g.x-1+" "+(g.y-1)+" "+(g.width+2)+" "+(g.height+2)),p.style.transform=p.style.webkitTransform="translate("+(g.x-1)+"px,"+(g.y-1)+"px)",o[a].yOffset=g.y-1,l.appendChild(p)}else p.setAttribute("width",1),p.setAttribute("height",1)}else h.textContent=o[a].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked?this.innerElem.appendChild(h):(this.innerElem.appendChild(l),h.style.transform=h.style.webkitTransform="translate3d(0,"+-t.finalSize/1.2+"px,0)");this.isMasked?this.textSpans[d]=h:this.textSpans[d]=l,this.textSpans[d].style.display="block",this.textPaths[d]=h,d+=1}for(;d<this.textSpans.length;)this.textSpans[d].style.display="none",d+=1},HTextElement.prototype.renderInnerContent=function(){if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;this.isMasked&&this.finalTransform._matMdf&&(this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.svgElement.style.transform=this.svgElement.style.webkitTransform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)")}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var t,e,i=0,r=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;e=s.length;var a,n,o;for(t=0;t<e;t+=1)s[t].n?i+=1:(n=this.textSpans[t],o=this.textPaths[t],a=r[i],i+=1,this.isMasked?n.setAttribute("transform",a.m):n.style.transform=n.style.webkitTransform=a.m,n.style.opacity=a.o,a.sw&&o.setAttribute("stroke-width",a.sw),a.sc&&o.setAttribute("stroke",a.sc),a.fc&&(o.setAttribute("fill",a.fc),o.style.color=a.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var h=this.innerElem.getBBox();this.currentBBox.w!==h.width&&(this.currentBBox.w=h.width,this.svgElement.setAttribute("width",h.width)),this.currentBBox.h!==h.height&&(this.currentBBox.h=h.height,this.svgElement.setAttribute("height",h.height));var l=1;this.currentBBox.w===h.width+2*l&&this.currentBBox.h===h.height+2*l&&this.currentBBox.x===h.x-l&&this.currentBBox.y===h.y-l||(this.currentBBox.w=h.width+2*l,this.currentBBox.h=h.height+2*l,this.currentBBox.x=h.x-l,this.currentBBox.y=h.y-l,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.svgElement.style.transform=this.svgElement.style.webkitTransform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.src=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln)},extendPrototype([BaseElement,FrameElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,i=this.comp.threeDElements.length;for(t=0;t<i;t+=1)e=this.comp.threeDElements[t],e.perspectiveElem.style.perspective=e.perspectiveElem.style.webkitPerspective=this.pe.v+"px",e.container.style.transformOrigin=e.container.style.mozTransformOrigin=e.container.style.webkitTransformOrigin="0px 0px 0px",e.perspectiveElem.style.transform=e.perspectiveElem.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,i=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)i=this.hierarchy[t].finalTransform.mProp._mdf||i;if(i||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){if(this.mat.reset(),this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]],s=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)+Math.pow(r[2],2)),a=[r[0]/s,r[1]/s,r[2]/s],n=Math.sqrt(a[2]*a[2]+a[0]*a[0]),o=Math.atan2(a[1],n),h=Math.atan2(a[0],-a[2]);this.mat.rotateY(h).rotateX(-o)}if(this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v),this.hierarchy){var l;for(e=this.hierarchy.length,t=0;t<e;t+=1)l=this.hierarchy[t].finalTransform.mProp.iv.props,this.mat.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],-l[12],-l[13],l[14],l[15])}if(!this._prevMat.equals(this.mat)){e=this.comp.threeDElements.length;var p;for(t=0;t<e;t+=1)p=this.comp.threeDElements[t],p.container.style.transform=p.container.style.webkitTransform=this.mat.toCSS();this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.initExpressions=function(){},HCameraElement.prototype.getBaseElement=function(){return null},HEffects.prototype.renderFrame=function(){};var Expressions=function(){function t(t){t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer)}var e={};return e.initExpressions=t,e}();expressionsPlugin=Expressions;var ExpressionManager=function(){function duplicatePropertyValue(t,e){if(e=e||1,"number"==typeof t||t instanceof Number)return t*e;if(t.i)return shape_pool.clone(t);var i,r=createTypedArray("float32",t.length),s=t.length;for(i=0;i<s;i+=1)r[i]=t[i]*e;return r}function isTypeOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function shapesEqual(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,r=t._length;for(i=0;i<r;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if(isTypeOfArray(t)){var i,r=t.length,s=[];for(i=0;i<r;i+=1)s[i]=-t[i];return s}}function sum(t,e){var i=typeof t,r=typeof e;if("string"===i||"string"===r)return t+e;if(("number"===i||"boolean"===i||"string"===i||t instanceof Number)&&("number"===r||"boolean"===r||"string"===r||e instanceof Number))return t+e;if(isTypeOfArray(t)&&("number"===r||"boolean"===r||"string"===r||e instanceof Number))return t[0]=t[0]+e,t;if(("number"===i||"boolean"===i||"string"===i||t instanceof Number)&&isTypeOfArray(e))return e[0]=t+e[0],e;if(isTypeOfArray(t)&&isTypeOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?o[s]=t[s]+e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function sub(t,e){var i=typeof t,r=typeof e;if(("number"===i||"boolean"===i||"string"===i||t instanceof Number)&&("number"===r||"boolean"===r||"string"===r||e instanceof Number))return"string"===i&&(t=parseInt(t)),"string"===r&&(e=parseInt(e)),t-e;if(isTypeOfArray(t)&&("number"===r||"boolean"===r||"string"===r||e instanceof Number))return t[0]=t[0]-e,t;if(("number"===i||"boolean"===i||"string"===i||t instanceof Number)&&isTypeOfArray(e))return e[0]=t-e[0],e;if(isTypeOfArray(t)&&isTypeOfArray(e)){for(var s=0,a=t.length,n=e.length,o=[];s<a||s<n;)"number"==typeof t[s]||t[s]instanceof Number?o[s]=t[s]-e[s]:o[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return o}return 0}function mul(t,e){var i,r=typeof t,s=typeof e;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t*e;var a,n;if(isTypeOfArray(t)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number)){for(n=t.length,i=createTypedArray("float32",n),a=0;a<n;a+=1)i[a]=t[a]*e;return i}if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&isTypeOfArray(e)){for(n=e.length,i=createTypedArray("float32",n),a=0;a<n;a+=1)i[a]=t*e[a];return i}return 0}function div(t,e){var i,r=typeof t,s=typeof e;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t/e;var a,n;if(isTypeOfArray(t)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number)){for(n=t.length,i=createTypedArray("float32",n),a=0;a<n;a+=1)i[a]=t[a]/e;return i}if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&isTypeOfArray(e)){for(n=e.length,i=createTypedArray("float32",n),a=0;a<n;a+=1)i[a]=t/e[a];return i}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t)),"string"==typeof e&&(e=parseInt(e)),t%e}function clamp(t,e,i){if(e>i){var r=i;i=e,e=r}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}function degreesToRadians(t){return t*degToRads}function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var i,r=Math.min(t.length,e.length),s=0;for(i=0;i<r;i+=1)s+=Math.pow(e[i]-t[i],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,i,r=t[0],s=t[1],a=t[2],n=Math.max(r,s,a),o=Math.min(r,s,a),h=(n+o)/2;if(n==o)e=i=0;else{var l=n-o;switch(i=h>.5?l/(2-n-o):l/(n+o),n){case r:e=(s-a)/l+(s<a?6:0);break;case s:e=(a-r)/l+2;break;case a:e=(r-s)/l+4}e/=6}return[e,i,h,t[3]]}function hue2rgb(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,r,s=t[0],a=t[1],n=t[2];if(0===a)e=i=r=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),i=hue2rgb(h,o,s),r=hue2rgb(h,o,s-1/3)}return[e,i,r,t[3]]}function linear(t,e,i,r,s){if(void 0===r||void 0===s)return linear(t,0,1,e,i);if(t<=e)return r;if(t>=i)return s;var a=i===e?0:(t-e)/(i-e);if(!r.length)return r+(s-r)*a;var n,o=r.length,h=createTypedArray("float32",o);for(n=0;n<o;n+=1)h[n]=r[n]+(s[n]-r[n])*a;return h}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var i,r=e.length;t||(t=createTypedArray("float32",r));var s=createTypedArray("float32",r),a=BMMath.random();for(i=0;i<r;i+=1)s[i]=t[i]+a*(e[i]-t[i]);return s}void 0===t&&(t=0);var n=BMMath.random();return t+n*(e-t)}function createPath(t,e,i,r){e=e&&e.length?e:t,i=i&&i.length?i:t;var s,a=shape_pool.newElement(),n=t.length;for(a.setPathData(r,n),s=0;s<n;s+=1)a.setTripleAt(t[s][0],t[s][1],i[s][0]+t[s][0],i[s][1]+t[s][1],e[s][0]+t[s][0],e[s][1]+t[s][1],s,!0);return a}function initiateExpression(elem,data,property){function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}function lookAt(t,e){var i=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],r=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads,s=-Math.atan2(i[1],i[2])/degToRads;return[s,r,0]}function easeOut(t,e,i,r,s){return void 0===r?(r=e,s=i):t=(t-e)/(i-e),-(s-r)*t*(t-2)+r}function easeIn(t,e,i,r,s){return void 0===r?(r=e,s=i):t=(t-e)/(i-e),(s-r)*t*t+r}function nearestKey(t){var e,i,r,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(i=-1,t*=elem.comp.globalData.frameRate,t<data.k[0].t)i=1,r=data.k[0].t;else{for(e=0;e<s-1;e+=1){if(t===data.k[e].t){i=e+1,r=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(i=e+2,r=data.k[e+1].t):(i=e+1,r=data.k[e].t);break}}i===-1&&(i=e+1,r=data.k[e].t)}else i=0,r=0;var a={};return a.index=i,a.time=r/elem.comp.globalData.frameRate,a}function key(t){var e,i,r;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate};var s;for(s=t!==data.k.length-1||data.k[t].h?data.k[t].s:data.k[t-1].e,r=s.length,i=0;i<r;i+=1)e[i]=s[i];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function executeExpression(){if(_needsRandom&&seedRandom(randSeed),this.frameExpressionId!==elem.globalData.frameId||"textSelector"===this.propType){if(this.lock)return this.v=duplicatePropertyValue(this.pv,this.mult),!0;"textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),anchorPoint=transform.anchorPoint),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!(!elem.hierarchy||!elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),this.lock=!0,this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),"shape"===scoped_bm_rt.propType?this.v=shape_pool.clone(scoped_bm_rt.v):this.v=scoped_bm_rt,this.frameExpressionId=elem.globalData.frameId;var t,e;if(this.mult)if("unidimensional"===this.propType)this.v*=this.mult;else if(1===this.v.length)this.v=this.v[0]*this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;t<e;t+=1)this.v[t]*=this.mult;if(1===this.v.length&&(this.v=this.v[0]),"unidimensional"===this.propType)this.lastValue!==this.v&&(this.lastValue=this.v,this._mdf=!0);else if("shape"===this.propType)shapesEqual(this.v,this.localShapeCollection.shapes[0])||(this._mdf=!0,this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(shape_pool.clone(this.v)));else for(e=this.v.length,t=0;t<e;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this._mdf=!0);this.lock=!1}}var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,content,effect,thisProperty=property;elem.comp.frameDuration=1/elem.comp.globalData.frameRate;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,loopIn,loop_in,loopOut,loop_out,toWorld,fromWorld,fromComp,fromCompToSurface,anchorPoint,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,wiggle=function(t,e){var i,r,s=this.pv.length?this.pv.length:1,a=createTypedArray("float32",s);t=5;var n=Math.floor(time*t);for(i=0,r=0;i<n;){for(r=0;r<s;r+=1)a[r]+=-e+2*e*BMMath.random();i+=1}var o=time*t,h=o-Math.floor(o),l=createTypedArray("float32",s);if(s>1){for(r=0;r<s;r+=1)l[r]=this.pv[r]+a[r]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random());return executeExpression}var ob={},Math=BMMath,window=null,document=null,add=sum,radians_to_degrees=radiansToDegrees,degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];return ob.initiateExpression=initiateExpression,ob}();!function(){function t(){return this.pv}function e(t,e,i){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var r=this.comp.renderedFrame,s=this.keyframes,a=s[s.length-1].t;if(r<=a)return this.pv;var n,o;i?(n=e?Math.abs(a-elem.comp.globalData.frameRate*e):Math.max(0,a-this.elem.data.ip),o=a-n):((!e||e>s.length-1)&&(e=s.length-1),o=s[s.length-1-e].t,n=a-o);var h,l,p;if("pingpong"===t){var m=Math.floor((r-o)/n);if(m%2!==0)return this.getValueAtTime((n-(r-o)%n+o)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(o/this.comp.globalData.frameRate,0),c=this.getValueAtTime(a/this.comp.globalData.frameRate,0),d=this.getValueAtTime(((r-o)%n+o)/this.comp.globalData.frameRate,0),u=Math.floor((r-o)/n);if(this.pv.length){for(p=new Array(f.length),l=p.length,h=0;h<l;h+=1)p[h]=(c[h]-f[h])*u+d[h];return p}return(c-f)*u+d}if("continue"===t){var y=this.getValueAtTime(a/this.comp.globalData.frameRate,0),g=this.getValueAtTime((a-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(p=new Array(y.length),l=p.length,h=0;h<l;h+=1)p[h]=y[h]+(y[h]-g[h])*((r-a)/this.comp.globalData.frameRate)/5e-4;return p}return y+(y-g)*((r-a)/.001)}}return this.getValueAtTime(((r-o)%n+o)/this.comp.globalData.frameRate,0)}function i(t,e,i){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var r=this.comp.renderedFrame,s=this.keyframes,a=s[0].t;if(r>=a)return this.pv;var n,o;i?(n=e?Math.abs(elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-a),o=a+n):((!e||e>s.length-1)&&(e=s.length-1),o=s[e].t,n=o-a);var h,l,p;if("pingpong"===t){var m=Math.floor((a-r)/n);if(m%2===0)return this.getValueAtTime(((a-r)%n+a)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(a/this.comp.globalData.frameRate,0),c=this.getValueAtTime(o/this.comp.globalData.frameRate,0),d=this.getValueAtTime((n-(a-r)%n+a)/this.comp.globalData.frameRate,0),u=Math.floor((a-r)/n)+1;if(this.pv.length){for(p=new Array(f.length),l=p.length,h=0;h<l;h+=1)p[h]=d[h]-(c[h]-f[h])*u;return p}return d-(c-f)*u}if("continue"===t){var y=this.getValueAtTime(a/this.comp.globalData.frameRate,0),g=this.getValueAtTime((a+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(p=new Array(y.length),l=p.length,h=0;h<l;h+=1)p[h]=y[h]+(y[h]-g[h])*(a-r)/.001;return p}return y+(y-g)*(a-r)/.001}}return this.getValueAtTime((n-(a-r)%n+a)/this.comp.globalData.frameRate,0)}function r(t){return t!==this._cachingAtTime.lastFrame&&(t*=this.elem.globalData.frameRate,t-=this.offsetTime,this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this.pv,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value}function s(t){if(void 0!==this.vel)return this.vel;var e,i=-.01,r=this.getValueAtTime(t),s=this.getValueAtTime(t+i);if(r.length){e=createTypedArray("float32",r.length);var a;for(a=0;a<r.length;a+=1)e[a]=(s[a]-r[a])/i}else e=(s-r)/i;return e}function a(t){this.propertyGroup=t}function n(t,e,i){e.x&&(i.k=!0,i.x=!0,i.getValue&&(i.getPreValue=i.getValue),i.initiateExpression=ExpressionManager.initiateExpression,i.getValue=i.initiateExpression(t,e,i))}function o(t){}function h(t){}function l(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shape_pool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastTime=t,t*=this.elem.globalData.frameRate,this.interpolateShape(t,this._cachingAtTime.shapeValue,!1,this._cachingAtTime)),this._cachingAtTime.shapeValue}function p(){}var m=function(){function e(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(i,o){this.pv=1,this.comp=i.comp,this.elem=i,this.mult=.01,this.propType="textSelector",this.textTotal=o.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],n.bind(this)(i,o,this),this.getMult=e,this.getVelocityAtTime=s,this.kf?this.getValueAtTime=r.bind(this):this.getValueAtTime=t.bind(this),this.setGroupProperty=a}}(),f=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,i){var r=f(t,e,i);return r.dynamicProperties.length?r.getValueAtTime=o.bind(r):r.getValueAtTime=h.bind(r),r.setGroupProperty=a,r};var c=PropertyFactory.getProp;PropertyFactory.getProp=function(o,h,l,p,m){var f=c(o,h,l,p,m);f.kf?f.getValueAtTime=r.bind(f):f.getValueAtTime=t.bind(f),f.setGroupProperty=a,f.loopOut=e,f.loopIn=i,f.getVelocityAtTime=s,f.numKeys=1===h.a?h.k.length:0;var d=f.k;f.propertyIndex=h.ix;var u=0;return 0!==l&&(u=createTypedArray("float32",1===h.a?h.k[0].s.length:h.k.length)),f._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:u},n(o,h,f),!d&&f.x&&m.push(f),f};var d=ShapePropertyFactory.getConstructorFunction(),u=ShapePropertyFactory.getKeyframedConstructorFunction();p.prototype={vertices:function(t,e){var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var r,s=i._length,a=i[t],n=i.v,o=createSizedArray(s);for(r=0;r<s;r+=1)"i"===t||"o"===t?o[r]=[a[r][0]-n[r][0],a[r][1]-n[r][1]]:o[r]=[a[r][0],a[r][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(i));for(var r,s=this._segmentsLength,a=s.lengths,n=s.totalLength*t,o=0,h=a.length,l=0;o<h;){if(l+a[o].addedLength>n){var p=o,m=i.c&&o===h-1?0:o+1,f=(n-l)/a[o].addedLength;r=bez.getPointInSegment(i.v[p],i.v[m],i.o[p],i.i[m],f,a[o]);break}l+=a[o].addedLength,o+=1}return r||(r=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),r},vectorOnPath:function(t,e,i){t=1==t?this.v.c?0:.999:t;var r=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-r[0],n=s[1]-r[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2)),h="tangent"===i?[a/o,n/o]:[-n/o,a/o];return h},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:a,getValueAtTime:t},extendPrototype([p],d),extendPrototype([p],u),u.prototype.getValueAtTime=l,u.prototype.initiateExpression=ExpressionManager.initiateExpression;var y=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,i,r,s){var a=y(t,e,i,r,s),o=a.k;return a.propertyIndex=e.ix,a.lock=!1,3===i?n(t,e.pt,a):4===i&&n(t,e.ks,a),!o&&a.x&&r.push(a),a};var g=TextSelectorProp.getTextSelectorProp;TextSelectorProp.getTextSelectorProp=function(t,e,i){return 1===e.t?new m(t,e,i):g(t,e,i)}}(),function(){function t(){return!!this.data.d.x&&(this.comp=this.elem.comp,this.getValue&&(this.getPreValue=this.getValue),this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.getValue=this.getExpressionValue,!0)}TextProperty.prototype.searchProperty=function(){return this.kf=this.searchExpressions()||this.data.d.k.length>1,this.kf},TextProperty.prototype.getExpressionValue=function(t){this.calculateExpression(),this._mdf&&(this.currentData.t=this.v.toString(),this.completeTextData(this.currentData))},TextProperty.prototype.searchExpressions=t}();var ShapeExpressionInterface=function(){function t(t,e,n){var c,d=[],u=t?t.length:0;for(c=0;c<u;c+=1)"gr"==t[c].ty?d.push(i(t[c],e[c],n)):"fl"==t[c].ty?d.push(r(t[c],e[c],n)):"st"==t[c].ty?d.push(s(t[c],e[c],n)):"tm"==t[c].ty?d.push(a(t[c],e[c],n)):"tr"==t[c].ty||("el"==t[c].ty?d.push(o(t[c],e[c],n)):"sr"==t[c].ty?d.push(h(t[c],e[c],n)):"sh"==t[c].ty?d.push(f(t[c],e[c],n)):"rc"==t[c].ty?d.push(l(t[c],e[c],n)):"rd"==t[c].ty?d.push(p(t[c],e[c],n)):"rp"==t[c].ty&&d.push(m(t[c],e[c],n)));return d}function e(e,i,r){var s,a=function(t){for(var e=0,i=s.length;e<i;){if(s[e]._name===t||s[e].mn===t||s[e].propertyIndex===t||s[e].ix===t||s[e].ind===t)return s[e];e+=1}if("number"==typeof t)return s[t-1]};return a.propertyGroup=function(t){return 1===t?a:r(t-1)},s=t(e.it,i.it,a.propertyGroup),a.numProperties=s.length,a.propertyIndex=e.cix,a}function i(t,i,r){var s=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return s.content;default:return s.transform}};s.propertyGroup=function(t){return 1===t?s:r(t-1)};var a=e(t,i,s.propertyGroup),o=n(t.it[t.it.length-1],i.it[i.it.length-1],s.propertyGroup);return s.content=a,s.transform=o,Object.defineProperty(s,"_name",{get:function(){return t.nm}}),s.numProperties=t.np,s.propertyIndex=t.ix,s.nm=t.nm,s.mn=t.mn,s}function r(t,e,i){function r(t){return"Color"===t||"color"===t?r.color:"Opacity"===t||"opacity"===t?r.opacity:void 0}return Object.defineProperties(r,{color:{get:function(){return ExpressionValue(e.c,1/e.c.mult,"color")}},opacity:{get:function(){return ExpressionValue(e.o,100)}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(i),e.o.setGroupProperty(i),r}function s(t,e,i){function r(t){return 1===t?ob:i(t-1)}function s(t){return 1===t?l:r(t-1)}function a(i){Object.defineProperty(l,t.d[i].nm,{get:function(){return ExpressionValue(e.d.dataProps[i].p)}})}function n(t){return"Color"===t||"color"===t?n.color:"Opacity"===t||"opacity"===t?n.opacity:"Stroke Width"===t||"stroke width"===t?n.strokeWidth:void 0}var o,h=t.d?t.d.length:0,l={};for(o=0;o<h;o+=1)a(o),e.d.dataProps[o].p.setGroupProperty(s);return Object.defineProperties(n,{color:{get:function(){return ExpressionValue(e.c,1/e.c.mult,"color")}},opacity:{get:function(){return ExpressionValue(e.o,100)}},strokeWidth:{get:function(){return ExpressionValue(e.w)}},dash:{get:function(){return l}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(r),e.o.setGroupProperty(r),e.w.setGroupProperty(r),n}function a(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){return e===t.e.ix||"End"===e||"end"===e?s.end:e===t.s.ix?s.start:e===t.o.ix?s.offset:void 0}return s.propertyIndex=t.ix,e.s.setGroupProperty(r),e.e.setGroupProperty(r),e.o.setGroupProperty(r),s.propertyIndex=t.ix,Object.defineProperties(s,{start:{get:function(){return ExpressionValue(e.s,1/e.s.mult)}},end:{get:function(){return ExpressionValue(e.e,1/e.e.mult)}},offset:{get:function(){return ExpressionValue(e.o)}},_name:{value:t.nm}}),s.mn=t.mn,s}function n(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){return t.a.ix===e||"Anchor Point"===e?s.anchorPoint:t.o.ix===e||"Opacity"===e?s.opacity:t.p.ix===e||"Position"===e?s.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?s.rotation:t.s.ix===e||"Scale"===e?s.scale:t.sk&&t.sk.ix===e||"Skew"===e?s.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?s.skewAxis:void 0}return e.transform.mProps.o.setGroupProperty(r),e.transform.mProps.p.setGroupProperty(r),e.transform.mProps.a.setGroupProperty(r),e.transform.mProps.s.setGroupProperty(r),e.transform.mProps.r.setGroupProperty(r),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(r),e.transform.mProps.sa.setGroupProperty(r)),e.transform.op.setGroupProperty(r),Object.defineProperties(s,{opacity:{get:function(){return ExpressionValue(e.transform.mProps.o,1/e.transform.mProps.o.mult)}},position:{get:function(){return ExpressionValue(e.transform.mProps.p)}},anchorPoint:{get:function(){return ExpressionValue(e.transform.mProps.a)}},scale:{get:function(){return ExpressionValue(e.transform.mProps.s,1/e.transform.mProps.s.mult)}},rotation:{get:function(){return ExpressionValue(e.transform.mProps.r,1/e.transform.mProps.r.mult)}},skew:{get:function(){return ExpressionValue(e.transform.mProps.sk)}},skewAxis:{get:function(){return ExpressionValue(e.transform.mProps.sa)}},_name:{value:t.nm}}),s.ty="tr",s.mn=t.mn,s}function o(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){return t.p.ix===e?s.position:t.s.ix===e?s.size:void 0}s.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(r),a.p.setGroupProperty(r),Object.defineProperties(s,{size:{get:function(){return ExpressionValue(a.s)}},position:{get:function(){return ExpressionValue(a.p)}},_name:{value:t.nm}}),s.mn=t.mn,s}function h(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){return t.p.ix===e?s.position:t.r.ix===e?s.rotation:t.pt.ix===e?s.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?s.outerRadius:t.os.ix===e?s.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?s.innerRoundness:void 0:s.innerRadius}var a="tm"===e.sh.ty?e.sh.prop:e.sh;return s.propertyIndex=t.ix,a.or.setGroupProperty(r),a.os.setGroupProperty(r),a.pt.setGroupProperty(r),a.p.setGroupProperty(r),a.r.setGroupProperty(r),t.ir&&(a.ir.setGroupProperty(r),a.is.setGroupProperty(r)),Object.defineProperties(s,{position:{get:function(){return ExpressionValue(a.p)}},rotation:{get:function(){return ExpressionValue(a.r,1/a.r.mult)}},points:{get:function(){return ExpressionValue(a.pt)}},outerRadius:{get:function(){return ExpressionValue(a.or)}},outerRoundness:{get:function(){return ExpressionValue(a.os)}},innerRadius:{get:function(){return a.ir?ExpressionValue(a.ir):0}},innerRoundness:{get:function(){return a.is?ExpressionValue(a.is,1/a.is.mult):0}},_name:{value:t.nm}}),s.mn=t.mn,s}function l(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){return t.p.ix===e?s.position:t.r.ix===e?s.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?s.size:void 0}var a="tm"===e.sh.ty?e.sh.prop:e.sh;return s.propertyIndex=t.ix,a.p.setGroupProperty(r),a.s.setGroupProperty(r),a.r.setGroupProperty(r),Object.defineProperties(s,{position:{get:function(){return ExpressionValue(a.p)}},roundness:{get:function(){return ExpressionValue(a.r)}},size:{get:function(){return ExpressionValue(a.s)}},_name:{value:t.nm}}),s.mn=t.mn,s}function p(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){if(t.r.ix===e||"Round Corners 1"===e)return s.radius}var a=e;return s.propertyIndex=t.ix,a.rd.setGroupProperty(r),Object.defineProperties(s,{radius:{get:function(){return ExpressionValue(a.rd)}},_name:{value:t.nm}}),s.mn=t.mn,s}function m(t,e,i){function r(t){return 1==t?s:i(--t)}function s(e){return t.c.ix===e||"Copies"===e?s.copies:t.o.ix===e||"Offset"===e?s.offset:void 0}var a=e;return s.propertyIndex=t.ix,a.c.setGroupProperty(r),a.o.setGroupProperty(r),Object.defineProperties(s,{copies:{get:function(){return ExpressionValue(a.c)}},offset:{get:function(){return ExpressionValue(a.o)}},_name:{value:t.nm}}),s.mn=t.mn,s}function f(t,e,i){function r(t){return 1==t?s:i(--t)}function s(t){if("Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t)return s.path}var a=e.sh;return a.setGroupProperty(r),Object.defineProperties(s,{path:{get:function(){return a.k&&a.getValue(),a}},shape:{get:function(){return a.k&&a.getValue(),a}},_name:{value:t.nm},
+ix:{value:t.ix},mn:{value:t.mn}}),s}return function(e,i,r){function s(t){if("number"==typeof t)return a[t-1];for(var e=0,i=a.length;e<i;){if(a[e]._name===t)return a[e];e+=1}}var a;return s.propertyGroup=r,a=t(e,i,s),s}}(),TextExpressionInterface=function(){return function(t){function e(){}var i,r;return Object.defineProperty(e,"sourceText",{get:function(){var e=t.textProperty.currentData.t;return t.textProperty.currentData.t!==i&&(t.textProperty.currentData.t=i,r=new String(e),r.value=e?e:new String(e)),r}}),e}}(),LayerExpressionInterface=function(){function t(t,e){var i=new Matrix;i.reset();var r;if(r=e?this._elem.finalTransform.mProp:this._elem.finalTransform.mProp,r.applyToMatrix(i),this._elem.hierarchy&&this._elem.hierarchy.length){var s,a=this._elem.hierarchy.length;for(s=0;s<a;s+=1)this._elem.hierarchy[s].finalTransform.mProp.applyToMatrix(i);return i.applyToPointArray(t[0],t[1],t[2]||0)}return i.applyToPointArray(t[0],t[1],t[2]||0)}function e(t,e){var i=new Matrix;i.reset();var r;if(r=e?this._elem.finalTransform.mProp:this._elem.finalTransform.mProp,r.applyToMatrix(i),this._elem.hierarchy&&this._elem.hierarchy.length){var s,a=this._elem.hierarchy.length;for(s=0;s<a;s+=1)this._elem.hierarchy[s].finalTransform.mProp.applyToMatrix(i);return i.inversePoint(t)}return i.inversePoint(t)}function i(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,r=this._elem.hierarchy.length;for(i=0;i<r;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}return function(r){function s(t){n.mask=new MaskManagerInterface(t,r)}function a(t){n.effect=t}function n(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return n.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return o;case 4:case"ADBE Effect Parade":return n.effect}}var o;n.toWorld=t,n.fromWorld=e,n.toComp=t,n.fromComp=i,n.sourceRectAtTime=r.sourceRectAtTime.bind(r),n._elem=r,o=TransformExpressionInterface(r.finalTransform.mProp);var h=getDescriptor(o,"anchorPoint");return Object.defineProperties(n,{hasParent:{get:function(){return r.hierarchy.length}},parent:{get:function(){return r.hierarchy[0].layerInterface}},rotation:getDescriptor(o,"rotation"),scale:getDescriptor(o,"scale"),position:getDescriptor(o,"position"),opacity:getDescriptor(o,"opacity"),anchorPoint:h,anchor_point:h,transform:{get:function(){return o}},active:{get:function(){return r.isInRange}}}),n.startTime=r.data.st,n.index=r.data.ind,n.source=r.data.refId,n.height=0===r.data.ty?r.data.h:100,n.width=0===r.data.ty?r.data.w:100,n.registerMaskInterface=s,n.registerEffectsInterface=a,n}}(),CompExpressionInterface=function(){return function(t){function e(e){for(var i=0,r=t.layers.length;i<r;){if(t.layers[i].nm===e||t.layers[i].ind===e)return t.elements[i].layerInterface;i+=1}return{active:!1}}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.globalData.compSize.h,e.width=t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e}}(),TransformExpressionInterface=function(){return function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity}}return Object.defineProperty(e,"rotation",{get:function(){return t.r?ExpressionValue(t.r,1/degToRads):ExpressionValue(t.rz,1/degToRads)}}),Object.defineProperty(e,"scale",{get:function(){return ExpressionValue(t.s,100)}}),Object.defineProperty(e,"position",{get:function(){return t.p?ExpressionValue(t.p):[t.px.v,t.py.v,t.pz?t.pz.v:0]}}),Object.defineProperty(e,"xPosition",{get:function(){return ExpressionValue(t.px)}}),Object.defineProperty(e,"yPosition",{get:function(){return ExpressionValue(t.py)}}),Object.defineProperty(e,"zPosition",{get:function(){return ExpressionValue(t.pz)}}),Object.defineProperty(e,"anchorPoint",{get:function(){return ExpressionValue(t.a)}}),Object.defineProperty(e,"opacity",{get:function(){return ExpressionValue(t.o,100)}}),Object.defineProperty(e,"skew",{get:function(){return ExpressionValue(t.sk)}}),Object.defineProperty(e,"skewAxis",{get:function(){return ExpressionValue(t.sa)}}),Object.defineProperty(e,"orientation",{get:function(){return ExpressionValue(t.or)}}),e}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,i=this.compositions.length;e<i;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].prepareFrame(this.compositions[e].data.xt?this.currentFrame:this.compositions[e].renderedFrame),this.compositions[e].compInterface;e+=1}}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),EffectsExpressionInterface=function(){function t(t,i){if(t.effectsManager){var r,s=[],a=t.data.ef,n=t.effectsManager.effectElements.length;for(r=0;r<n;r+=1)s.push(e(a[r],t.effectsManager.effectElements[r],i,t));return function(e){for(var i=t.data.ef,r=0,a=i.length;r<a;){if(e===i[r].nm||e===i[r].mn||e===i[r].ix)return s[r];r+=1}}}}function e(t,r,s,a){function n(t){return 1===t?p:s(t-1)}var o,h=[],l=t.ef.length;for(o=0;o<l;o+=1)5===t.ef[o].ty?h.push(e(t.ef[o],r.effectElements[o],r.effectElements[o].propertyGroup,a)):h.push(i(r.effectElements[o],t.ef[o].ty,a,n));var p=function(e){for(var i=t.ef,r=0,s=i.length;r<s;){if(e===i[r].nm||e===i[r].mn||e===i[r].ix)return 5===i[r].ty?h[r]:h[r]();r+=1}return h[0]()};return p.propertyGroup=n,"ADBE Color Control"===t.mn&&Object.defineProperty(p,"color",{get:function(){return h[0]()}}),Object.defineProperty(p,"numProperties",{get:function(){return t.np}}),p.active=0!==t.en,p}function i(t,e,i,r){function s(){return 10===e?i.comp.compInterface(t.p.v):ExpressionValue(t.p)}return t.p.setGroupProperty&&t.p.setGroupProperty(r),s}var r={createEffectsInterface:t};return r}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}});var e=function(e,i){var r,s=createSizedArray(e.viewData.length),a=e.viewData.length;for(r=0;r<a;r+=1)s[r]=new t(e.viewData[r],e.masksProperties[r]);var n=function(t){for(r=0;r<a;){if(e.masksProperties[r].nm===t)return s[r];r+=1}};return n};return e}(),ExpressionValue=function(){return function(t,e,i){var r;t.k&&t.getValue();var s,a,n,o;if(i){if("color"===i){for(a=4,r=createTypedArray("float32",a),n=createTypedArray("float32",a),s=0;s<a;s+=1)r[s]=n[s]=e&&s<3?t.v[s]*e:1;r.value=n}}else if("number"==typeof t.v||t.v instanceof Number)o=e?t.v*e:t.v,r=new Number(o),r.value=o;else{for(a=t.v.length,r=createTypedArray("float32",a),n=createTypedArray("float32",a),s=0;s<a;s+=1)r[s]=n[s]=e?t.v[s]*e:t.v[s];r.value=n}return r.numKeys=t.keyframes?t.keyframes.length:0,r.key=function(e){return r.numKeys?t.keyframes[e-1].t:0},r.valueAtTime=t.getValueAtTime,r.propertyGroup=t.propertyGroup,r}}();GroupEffect.prototype.getValue=function(){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this._mdf=this.dynamicProperties[t]._mdf||this._mdf},GroupEffect.prototype.init=function(t,e,i){this.data=t,this._mdf=!1,this.effectElements=[];var r,s,a=this.data.ef.length,n=this.data.ef;for(r=0;r<a;r+=1){switch(s=null,n[r].ty){case 0:s=new SliderEffect(n[r],e,i);break;case 1:s=new AngleEffect(n[r],e,i);break;case 2:s=new ColorEffect(n[r],e,i);break;case 3:s=new PointEffect(n[r],e,i);break;case 4:case 7:s=new CheckboxEffect(n[r],e,i);break;case 10:s=new LayerIndexEffect(n[r],e,i);break;case 11:s=new MaskIndexEffect(n[r],e,i);break;case 5:s=new EffectsManager(n[r],e,i);break;default:s=new NoValueEffect(n[r],e,i)}s&&this.effectElements.push(s)}};var lottiejs={};lottiejs.play=play,lottiejs.pause=pause,lottiejs.setLocationHref=setLocationHref,lottiejs.togglePause=togglePause,lottiejs.setSpeed=setSpeed,lottiejs.setDirection=setDirection,lottiejs.stop=stop,lottiejs.searchAnimations=searchAnimations,lottiejs.registerAnimation=registerAnimation,lottiejs.loadAnimation=loadAnimation,lottiejs.setSubframeRendering=setSubframeRendering,lottiejs.resize=resize,lottiejs.goToAndStop=goToAndStop,lottiejs.destroy=destroy,lottiejs.setQuality=setQuality,lottiejs.inBrowser=inBrowser,lottiejs.installPlugin=installPlugin,lottiejs.__getFactory=getFactory,lottiejs.version="5.1.0";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""},queryString=myScript.src.replace(/^[^\?]+\??/,"");renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);return lottiejs});
\ No newline at end of file
diff --git a/build/player/lottie_light.js b/build/player/lottie_light.js
index 77d31ac..1df3b33 100644
--- a/build/player/lottie_light.js
+++ b/build/player/lottie_light.js
@@ -17,7 +17,6 @@
 
 var initialDefaultFrame = -999999;
 
-//TODO with subframe enabled, code deopt data shows up
 var subframeEnabled = true;
 var expressionsPlugin;
 var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
@@ -41,13 +40,13 @@
     }
 }());
 
-function ProjectInterface(){return {}};
+function ProjectInterface(){return {};}
 
 BMMath.random = Math.random;
 BMMath.abs = function(val){
     var tOfVal = typeof val;
     if(tOfVal === 'object' && val.length){
-        var absArr = _cv(val.length);
+        var absArr = createSizedArray(val.length);
         var i, len = val.length;
         for(i=0;i<len;i+=1){
             absArr[i] = Math.abs(val[i]);
@@ -56,7 +55,7 @@
     }
     return Math.abs(val);
 
-}
+};
 var defaultCurveSegments = 150;
 var degToRads = Math.PI/180;
 var roundCorner = 0.5519;
@@ -96,14 +95,14 @@
 
 function BMCompleteLoopEvent(n,c,t,d){
     this.type = n;
-    this.currentLoop = c;
-    this.totalLoops = t;
+    this.currentLoop = t;
+    this.totalLoops = c;
     this.direction = d < 0 ? -1:1;
 }
 
 function BMSegmentStartEvent(n,f,t){
     this.type = n;
-    this._ch = f;
+    this.firstFrame = f;
     this.totalFrames = t;
 }
 
@@ -124,21 +123,18 @@
 
 function HSVtoRGB(h, s, v) {
     var r, g, b, i, f, p, q, t;
-    if (arguments.length === 1) {
-        s = h.s, v = h.v, h = h.h;
-    }
     i = Math.floor(h * 6);
     f = h * 6 - i;
     p = v * (1 - s);
     q = v * (1 - f * s);
     t = v * (1 - (1 - f) * s);
     switch (i % 6) {
-        case 0: r = v, g = t, b = p; break;
-        case 1: r = q, g = v, b = p; break;
-        case 2: r = p, g = v, b = t; break;
-        case 3: r = p, g = q, b = v; break;
-        case 4: r = t, g = p, b = v; break;
-        case 5: r = v, g = p, b = q; break;
+        case 0: r = v; g = t; b = p; break;
+        case 1: r = q; g = v; b = p; break;
+        case 2: r = p; g = v; b = t; break;
+        case 3: r = p; g = q; b = v; break;
+        case 4: r = t; g = p; b = v; break;
+        case 5: r = v; g = p; b = q; break;
     }
     return [ r,
         g,
@@ -146,9 +142,6 @@
 }
 
 function RGBtoHSV(r, g, b) {
-    if (arguments.length === 1) {
-        g = r.g, b = r.b, r = r.r;
-    }
     var max = Math.max(r, g, b), min = Math.min(r, g, b),
         d = max - min,
         h,
@@ -229,7 +222,7 @@
 }());
 function BaseEvent(){}
 BaseEvent.prototype = {
-	_cy: function (eventName, args) {
+	triggerEvent: function (eventName, args) {
 	    if (this._cbs[eventName]) {
 	        var len = this._cbs[eventName].length;
 	        for (var i = 0; i < len; i++){
@@ -265,8 +258,8 @@
 	        }
 	    }
 	}
-}
-var _cs = (function(){
+};
+var createTypedArray = (function(){
 	function createRegularArray(type, len){
 		var i = 0, arr = [], value;
 		switch(type) {
@@ -283,7 +276,7 @@
 		}
 		return arr;
 	}
-	function _cs(type, len){
+	function createTypedArray(type, len){
 		if(type === 'float32') {
 			return new Float32Array(len);
 		} else if(type === 'int16') {
@@ -293,20 +286,20 @@
 		}
 	}
 	if(typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
-		return _cs
+		return createTypedArray;
 	} else {
-		return createRegularArray
+		return createRegularArray;
 	}
-}())
+}());
 
-function _cv(len) {
-	return Array.apply(null,{length:len})
+function createSizedArray(len) {
+	return Array.apply(null,{length:len});
 }
-function _ct(type) {
+function createNS(type) {
 	//return {appendChild:function(){},setAttribute:function(){},style:{}}
 	return document.createElementNS(svgNS, type);
 }
-function _cu(type) {
+function createTag(type) {
 	//return {appendChild:function(){},setAttribute:function(){},style:{}}
 	return document.createElement(type);
 }
@@ -372,10 +365,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(mCos, -mSin,  0, 0
-            , mSin,  mCos, 0, 0
-            , 0,  0,  1, 0
-            , 0, 0, 0, 1);
+        return this._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
     }
 
     function rotateX(angle){
@@ -384,10 +374,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(1, 0, 0, 0
-            , 0, mCos, -mSin, 0
-            , 0, mSin,  mCos, 0
-            , 0, 0, 0, 1);
+        return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin,  mCos, 0, 0, 0, 0, 1);
     }
 
     function rotateY(angle){
@@ -396,10 +383,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(mCos,  0,  mSin, 0
-            , 0, 1, 0, 0
-            , -mSin,  0,  mCos, 0
-            , 0, 0, 0, 1);
+        return this._t(mCos,  0,  mSin, 0, 0, 1, 0, 0, -mSin,  0,  mCos, 0, 0, 0, 0, 1);
     }
 
     function rotateZ(angle){
@@ -408,10 +392,7 @@
         }
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        return this._t(mCos, -mSin,  0, 0
-            , mSin,  mCos, 0, 0
-            , 0,  0,  1, 0
-            , 0, 0, 0, 1);
+        return this._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
     }
 
     function shear(sx,sy){
@@ -425,18 +406,9 @@
     function skewFromAxis(ax, angle){
         var mCos = _cos(angle);
         var mSin = _sin(angle);
-        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,  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);
     }
 
@@ -478,59 +450,61 @@
 
     function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
 
+        var _p = this.props;
+
         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){
             //NOTE: commenting this condition because TurboFan deoptimizes code when present
             //if(m2 !== 0 || n2 !== 0 || o2 !== 0){
-                this.props[12] = this.props[12] * a2 + this.props[15] * m2;
-                this.props[13] = this.props[13] * f2 + this.props[15] * n2;
-                this.props[14] = this.props[14] * k2 + this.props[15] * o2;
-                this.props[15] = this.props[15] * p2;
+                _p[12] = _p[12] * a2 + _p[15] * m2;
+                _p[13] = _p[13] * f2 + _p[15] * n2;
+                _p[14] = _p[14] * k2 + _p[15] * o2;
+                _p[15] = _p[15] * p2;
             //}
             this._identityCalculated = false;
             return this;
         }
 
-        var a1 = this.props[0];
-        var b1 = this.props[1];
-        var c1 = this.props[2];
-        var d1 = this.props[3];
-        var e1 = this.props[4];
-        var f1 = this.props[5];
-        var g1 = this.props[6];
-        var h1 = this.props[7];
-        var i1 = this.props[8];
-        var j1 = this.props[9];
-        var k1 = this.props[10];
-        var l1 = this.props[11];
-        var m1 = this.props[12];
-        var n1 = this.props[13];
-        var o1 = this.props[14];
-        var p1 = this.props[15];
+        var a1 = _p[0];
+        var b1 = _p[1];
+        var c1 = _p[2];
+        var d1 = _p[3];
+        var e1 = _p[4];
+        var f1 = _p[5];
+        var g1 = _p[6];
+        var h1 = _p[7];
+        var i1 = _p[8];
+        var j1 = _p[9];
+        var k1 = _p[10];
+        var l1 = _p[11];
+        var m1 = _p[12];
+        var n1 = _p[13];
+        var o1 = _p[14];
+        var p1 = _p[15];
 
         /* matrix order (canvas compatible):
          * ace
          * bdf
          * 001
          */
-        this.props[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
-        this.props[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2 ;
-        this.props[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2 ;
-        this.props[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2 ;
+        _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
+        _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2 ;
+        _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2 ;
+        _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2 ;
 
-        this.props[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2 ;
-        this.props[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2 ;
-        this.props[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2 ;
-        this.props[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2 ;
+        _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2 ;
+        _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2 ;
+        _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2 ;
+        _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2 ;
 
-        this.props[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2 ;
-        this.props[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2 ;
-        this.props[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2 ;
-        this.props[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2 ;
+        _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2 ;
+        _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2 ;
+        _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2 ;
+        _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2 ;
 
-        this.props[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2 ;
-        this.props[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2 ;
-        this.props[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2 ;
-        this.props[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2 ;
+        _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2 ;
+        _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2 ;
+        _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2 ;
+        _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2 ;
 
         this._identityCalculated = false;
         return this;
@@ -538,10 +512,7 @@
 
     function isIdentity() {
         if(!this._identityCalculated){
-            this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0
-                || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0
-                || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0
-                || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);
+            this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);
             this._identityCalculated = true;
         }
         return this._identity;
@@ -613,15 +584,37 @@
         return retPts;
     }
 
-    function _cn(x,y,z,dimensions){
-        if(dimensions && dimensions === 2) {
-            var arr = point_pool.newElement();
-            arr[0] = x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12]; 
-            arr[1] = x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13]; 
-            return arr;    
+    function applyToTriplePoints(pt1, pt2, pt3) {
+        var arr = createTypedArray('float32', 6);
+        if(this.isIdentity()) {
+            arr[0] = pt1[0];
+            arr[1] = pt1[1];
+            arr[2] = pt2[0];
+            arr[3] = pt2[1];
+            arr[4] = pt3[0];
+            arr[5] = pt3[1];
+        } else {
+            var p0 = this.props[0], p1 = this.props[1], p4 = this.props[4], p5 = this.props[5], p12 = this.props[12], p13 = this.props[13];
+            arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
+            arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
+            arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
+            arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
+            arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
+            arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
         }
-        return [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]];
+        return arr;
     }
+
+    function applyToPointArray(x,y,z){
+        var arr;
+        if(this.isIdentity()) {
+            arr = [x,y,z];
+        } else {
+            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]];
+        }
+        return arr;
+    }
+
     function applyToPointStringified(x, y) {
         if(this.isIdentity()) {
             return x + ',' + y;
@@ -639,7 +632,7 @@
         var cssValue = 'matrix3d(';
         var v = 10000;
         while(i<16){
-            cssValue += _rnd(props[i]*v)/v
+            cssValue += _rnd(props[i]*v)/v;
             cssValue += i === 15 ? ')':',';
             i += 1;
         }
@@ -673,7 +666,8 @@
         this.applyToX = applyToX;
         this.applyToY = applyToY;
         this.applyToZ = applyToZ;
-        this._cn = _cn;
+        this.applyToPointArray = applyToPointArray;
+        this.applyToTriplePoints = applyToTriplePoints;
         this.applyToPointStringified = applyToPointStringified;
         this.toCSS = toCSS;
         this.to2dCSS = to2dCSS;
@@ -687,9 +681,9 @@
         this._identity = true;
         this._identityCalculated = false;
 
-        this.props = _cs('float32', 16);
+        this.props = createTypedArray('float32', 16);
         this.reset();
-    }
+    };
 }());
 
 /*
@@ -737,12 +731,12 @@
 //
     function seedrandom(seed, options, callback) {
         var key = [];
-        options = (options == true) ? { entropy: true } : (options || {});
+        options = (options === true) ? { entropy: true } : (options || {});
 
         // Flatten the seed string or build one from local entropy if needed.
         var shortseed = mixkey(flatten(
             options.entropy ? [seed, tostring(pool)] :
-                (seed == null) ? autoseed() : seed, 3), key);
+                (seed === null) ? autoseed() : seed, 3), key);
 
         // Use the seed to initialize an ARC4 generator.
         var arc4 = new ARC4(key);
@@ -766,8 +760,8 @@
             return (n + x) / d;                 // Form the number within [0, 1).
         };
 
-        prng.int32 = function() { return arc4.g(4) | 0; }
-        prng.quick = function() { return arc4.g(4) / 0x100000000; }
+        prng.int32 = function() { return arc4.g(4) | 0; };
+        prng.quick = function() { return arc4.g(4) / 0x100000000; };
         prng.double = prng;
 
         // Mix the randomness into accumulated entropy.
@@ -780,7 +774,7 @@
                 // Load the arc4 state from the given state if it has an S array.
                 if (state.S) { copy(state, arc4); }
                 // Only provide the .state method if requested via options.state.
-                prng.state = function() { return copy(arc4, {}); }
+                prng.state = function() { return copy(arc4, {}); };
             }
 
             // If called as a method of Math (Math.seedrandom()), mutate
@@ -838,7 +832,7 @@
             // For robust unpredictability, the function call below automatically
             // discards an initial batch of values.  This is called RC4-drop[256].
             // See http://google.com/search?q=rsa+fluhrer+response&btnI
-        })(width);
+        }(width));
     }
 
 //
@@ -850,7 +844,7 @@
         t.j = f.j;
         t.S = f.S.slice();
         return t;
-    };
+    }
 
 //
 // flatten()
@@ -894,7 +888,7 @@
         } catch (e) {
             var browser = global.navigator,
                 plugins = browser && browser.plugins;
-            return [+new Date, global, plugins, global.screen, tostring(pool)];
+            return [+new Date(), global, plugins, global.screen, tostring(pool)];
         }
     }
 
@@ -1108,7 +1102,7 @@
 function extendPrototype(sources,destination){
     var i, len = sources.length, sourcePrototype;
     for (i = 0;i < len;i += 1) {
-        sourcePrototype = sources[i].prototype
+        sourcePrototype = sources[i].prototype;
         for (var attr in sourcePrototype) {
             if (sourcePrototype.hasOwnProperty(attr)) destination.prototype[attr] = sourcePrototype[attr];
         }
@@ -1118,6 +1112,12 @@
 function getDescriptor(object, prop) {
     return Object.getOwnPropertyDescriptor(object, prop);
 }
+
+function createProxyFunction(prototype) {
+	function ProxyFunction(){}
+	ProxyFunction.prototype = prototype;
+	return ProxyFunction;
+}
 function bezFunction(){
 
     var easingFunctions = [];
@@ -1240,7 +1240,7 @@
             var bezierData = new BezierData(curveSegments);
             len = pt3.length;
             for (k = 0; k < curveSegments; k += 1) {
-                point = _cv(len);
+                point = createSizedArray(len);
                 perc = k / (curveSegments - 1);
                 ptDistance = 0;
                 for (i = 0; i < len; i += 1){
@@ -1305,7 +1305,7 @@
 
     }
 
-    var bezier_segment_points = _cs('float32', 8);
+    var bezier_segment_points = createTypedArray('float32', 8);
 
     function getNewSegment(pt1,pt2,pt3,pt4,startPerc,endPerc, bezierData){
 
@@ -1368,9 +1368,9 @@
 var bez = bezFunction();
 function dataFunctionManager(){
 
-    //var tCanvasHelper = _cu('canvas').getContext('2d');
+    //var tCanvasHelper = createTag('canvas').getContext('2d');
 
-    function _db(layers, comps, _cr){
+    function completeLayers(layers, comps, fontManager){
         var layerData;
         var animArray, lastFrame;
         var i, len = layers.length;
@@ -1407,11 +1407,11 @@
             }
             if(layerData.ty===0){
                 layerData.layers = findCompLayers(layerData.refId, comps);
-                _db(layerData.layers,comps, _cr);
+                completeLayers(layerData.layers,comps, fontManager);
             }else if(layerData.ty === 4){
                 completeShapes(layerData.shapes);
             }else if(layerData.ty == 5){
-                completeText(layerData, _cr);
+                completeText(layerData, fontManager);
             }
         }
     }
@@ -1509,7 +1509,7 @@
                         t:0
                     }
                 ]
-            }
+            };
         }
 
         function iterateLayers(layers){
@@ -1534,8 +1534,8 @@
                     }
                 }
             }
-        }
-    }())
+        };
+    }());
 
     var checkChars = (function() {
         var minimumVersion = [4,7,99];
@@ -1558,9 +1558,8 @@
                     }
                 }
             }
-        }
-
-    }())
+        };
+    }());
 
     var checkColors = (function(){
         var minimumVersion = [4,1,9];
@@ -1620,7 +1619,7 @@
                     }
                 }
             }
-        }
+        };
     }());
 
     var checkShapes = (function(){
@@ -1698,7 +1697,7 @@
                     }
                 }
             }
-        }
+        };
     }());
 
     /*function blitPaths(path){
@@ -1756,7 +1755,7 @@
         }
     }
 
-    function blitText(data, _cr){
+    function blitText(data, fontManager){
 
     }
 
@@ -1795,7 +1794,7 @@
         }
     }
 
-    function blitLayers(layers,comps, _cr){
+    function blitLayers(layers,comps, fontManager){
         var layerData;
         var animArray, lastFrame;
         var i, len = layers.length;
@@ -1835,11 +1834,11 @@
             if(layerData.ty===0){
                 layerData.w = Math.round(layerData.w/blitter);
                 layerData.h = Math.round(layerData.h/blitter);
-                blitLayers(layerData.layers,comps, _cr);
+                blitLayers(layerData.layers,comps, fontManager);
             }else if(layerData.ty === 4){
                 blitShapes(layerData.shapes);
             }else if(layerData.ty == 5){
-                blitText(layerData, _cr);
+                blitText(layerData, fontManager);
             }else if(layerData.ty == 1){
                 layerData.sh /= blitter;
                 layerData.sw /= blitter;
@@ -1848,11 +1847,11 @@
         }
     }
 
-    function blitAnimation(animationData,comps, _cr){
-        blitLayers(animationData.layers,comps, _cr);
+    function blitAnimation(animationData,comps, fontManager){
+        blitLayers(animationData.layers,comps, fontManager);
     }*/
 
-    function completeData(animationData, _cr){
+    function completeData(animationData, fontManager){
         if(animationData.__complete){
             return;
         }
@@ -1860,12 +1859,12 @@
         checkText(animationData);
         checkChars(animationData);
         checkShapes(animationData);
-        _db(animationData.layers, animationData.assets, _cr);
+        completeLayers(animationData.layers, animationData.assets, fontManager);
         animationData.__complete = true;
-        //blitAnimation(animationData, animationData.assets, _cr);
+        //blitAnimation(animationData, animationData.assets, fontManager);
     }
 
-    function completeText(data, _cr){
+    function completeText(data, fontManager){
         if(data.t.a.length === 0 && !('m' in data.t.p)){
             data.singleShape = true;
         }
@@ -1885,12 +1884,12 @@
         w: 0,
         size:0,
         shapes:[]
-    }
+    };
 
     function setUpNode(font, family){
-        var parentNode = _cu('span');
+        var parentNode = createTag('span');
         parentNode.style.fontFamily    = family;
-        var node = _cu('span');
+        var node = createTag('span');
         // Characters that vary significantly among different fonts
         node.innerHTML = 'giItT1WQy@!-/#';
         // Visible - so we can measure it - but not on the screen
@@ -1964,10 +1963,10 @@
             setTimeout(function(){this.loaded = true;}.bind(this),0);
 
         }
-    };
+    }
 
     function createHelper(def, fontData){
-        var tHelper = _ct('text');
+        var tHelper = createNS('text');
         tHelper.style.fontSize = '100px';
         tHelper.style.fontFamily = fontData.fFamily;
         tHelper.textContent = '1';
@@ -1978,7 +1977,7 @@
             tHelper.style.fontFamily = fontData.fFamily;
         }
         def.appendChild(tHelper);
-        var tCanvasHelper = _cu('canvas').getContext('2d');
+        var tCanvasHelper = createTag('canvas').getContext('2d');
         tCanvasHelper.font = '100px '+ fontData.fFamily;
         return tCanvasHelper;
     }
@@ -2003,20 +2002,20 @@
             if(!fontArr[i].fPath) {
                 fontArr[i].loaded = true;
             }else if(fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3){
-                var s = _cu('style');
+                var s = createTag('style');
                 s.type = "text/css";
                 s.innerHTML = "@font-face {" + "font-family: "+fontArr[i].fFamily+"; font-style: normal; src: url('"+fontArr[i].fPath+"');}";
                 defs.appendChild(s);
             } else if(fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1){
                 //<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
-                var l = _cu('link');
+                var l = createTag('link');
                 l.type = "text/css";
                 l.rel = "stylesheet";
                 l.href = fontArr[i].fPath;
                 defs.appendChild(l);
             } else if(fontArr[i].fOrigin === 't' || fontArr[i].origin === 2){
                 //<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
-                var sc = _cu('script');
+                var sc = createTag('script');
                 sc.setAttribute('src',fontArr[i].fPath);
                 defs.appendChild(sc);
             }
@@ -2100,7 +2099,7 @@
     return Font;
 
 }());
-var _ai = (function(){
+var PropertyFactory = (function(){
 
     var initFrame = initialDefaultFrame;
 
@@ -2108,16 +2107,16 @@
         var offsetTime = this.offsetTime;
         var newValue;
         if(this.propType === 'multidimensional') {
-            newValue = _cs('float32', previousValue.length);
+            newValue = createTypedArray('float32', previousValue.length);
         }
         var iterationIndex = caching.lastIndex;
         var i = iterationIndex;
-        var len = this._df.length- 1,flag = true;
+        var len = this.keyframes.length- 1,flag = true;
         var keyData, nextKeyData;
 
         while(flag){
-            keyData = this._df[i];
-            nextKeyData = this._df[i+1];
+            keyData = this.keyframes[i];
+            nextKeyData = this.keyframes[i+1];
             if(i == len-1 && frameNum >= nextKeyData.t - offsetTime){
                 if(keyData.h){
                     keyData = nextKeyData;
@@ -2260,7 +2259,7 @@
             this.pv[i] = renderResult[i];
             this.v[i] = this.mult ? this.pv[i] * this.mult : this.pv[i];
             if(this.lastPValue[i] !== this.pv[i]) {
-                this.mdf = true;
+                this._mdf = true;
                 this.lastPValue[i] = this.pv[i];
             }
             i += 1;
@@ -2271,36 +2270,38 @@
         this.pv = renderResult;
         this.v = this.mult ? this.pv*this.mult : this.pv;
         if(this.lastPValue != this.pv){
-            this.mdf = true;
+            this._mdf = true;
             this.lastPValue = this.pv;
         }
     }
 
     function getValueAtCurrentTime(){
-        if(this.elem._x.frameId === this.frameId){
+        if(this.elem.globalData.frameId === this.frameId){
             return;
         }
-        this.mdf = false;
+        this._mdf = false;
         var frameNum = this.comp.renderedFrame - this.offsetTime;
-        var initTime = this._df[0].t - this.offsetTime;
-        var endTime = this._df[this._df.length- 1].t-this.offsetTime;
+        var initTime = this.keyframes[0].t - this.offsetTime;
+        var endTime = this.keyframes[this.keyframes.length- 1].t-this.offsetTime;
         if(!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))){
             this._caching.lastIndex = this._caching.lastFrame < frameNum ? this._caching.lastIndex : 0;
             var renderResult = this.interpolateValue(frameNum, this.pv, this._caching);
             this.calculateValueAtCurrentTime(renderResult);
         }
         this._caching.lastFrame = frameNum;
-        this.frameId = this.elem._x.frameId;
+        this.frameId = this.elem.globalData.frameId;
     }
 
-    function getNoValue(){}
+    function getNoValue(){
+        this._mdf = false;
+    }
 
     function ValueProperty(elem,data, mult){
         this.propType = 'unidimensional';
         this.mult = mult;
         this.v = mult ? data.k * mult : data.k;
         this.pv = data.k;
-        this.mdf = false;
+        this._mdf = false;
         this.comp = elem.comp;
         this.k = false;
         this.kf = false;
@@ -2308,44 +2309,44 @@
         this.getValue = getNoValue;
     }
 
-    function MultiDimensionalProperty(elem,data, mult){
+    function MultiDimensionalProperty(elem, data, mult) {
         this.propType = 'multidimensional';
         this.mult = mult;
         this.data = data;
-        this.mdf = false;
+        this._mdf = false;
         this.comp = elem.comp;
         this.k = false;
         this.kf = false;
         this.frameId = -1;
-        this.v = _cs('float32', data.k.length);
-        this.pv = _cs('float32', data.k.length);
-        this.lastValue = _cs('float32', data.k.length);
-        var arr = _cs('float32', data.k.length);
-        this.vel = _cs('float32', data.k.length);
         var i, len = data.k.length;
-        for(i = 0;i<len;i+=1){
+        this.v = createTypedArray('float32', len);
+        this.pv = createTypedArray('float32', len);
+        this.lastValue = createTypedArray('float32', len);
+        var arr = createTypedArray('float32', len);
+        this.vel = createTypedArray('float32', len);
+        for (i = 0; i < len; i += 1) {
             this.v[i] = mult ? data.k[i] * mult : data.k[i];
             this.pv[i] = data.k[i];
         }
         this.getValue = getNoValue;
     }
 
-    function KeyframedValueProperty(elem, data, mult){
+    function KeyframedValueProperty(elem, data, mult) {
         this.propType = 'unidimensional';
-        this._df = data.k;
+        this.keyframes = data.k;
         this.offsetTime = elem.data.st;
         this.lastValue = initFrame;
         this.lastPValue = initFrame;
         this.frameId = -1;
-        this._caching={lastFrame:initFrame,lastIndex:0,value:0};
+        this._caching = {lastFrame: initFrame, lastIndex: 0, value: 0};
         this.k = true;
         this.kf = true;
         this.data = data;
         this.mult = mult;
         this.elem = elem;
-        this._ch = false;
+        this._isFirstFrame = false;
         this.comp = elem.comp;
-        this.v = mult ? data.k[0].s[0]*mult : data.k[0].s[0];
+        this.v = mult ? data.k[0].s[0] * mult : data.k[0].s[0];
         this.pv = data.k[0].s[0];
         this.getValue = getValueAtCurrentTime;
         this.calculateValueAtCurrentTime = calculateUnidimenstionalValueAtCurrentTime;
@@ -2356,8 +2357,8 @@
         this.propType = 'multidimensional';
         var i, len = data.k.length;
         var s, e,to,ti;
-        for(i=0;i<len-1;i+=1){
-            if(data.k[i].to && data.k[i].s && data.k[i].e){
+        for (i = 0; i < len - 1; i += 1) {
+            if (data.k[i].to && data.k[i].s && data.k[i].e) {
                 s = data.k[i].s;
                 e = data.k[i].e;
                 to = data.k[i].to;
@@ -2374,11 +2375,11 @@
                 }
             }
         }
-        this._df = data.k;
+        this.keyframes = data.k;
         this.offsetTime = elem.data.st;
         this.k = true;
         this.kf = true;
-        this._ch = true;
+        this._isFirstFrame = true;
         this.mult = mult;
         this.elem = elem;
         this.comp = elem.comp;
@@ -2387,14 +2388,14 @@
         this.interpolateValue = interpolateValue;
         this.frameId = -1;
         var arrLen = data.k[0].s.length;
-        this.v = _cs('float32', arrLen);
-        this.pv = _cs('float32', arrLen);
-        this.lastValue = _cs('float32', arrLen);
-        this.lastPValue = _cs('float32', arrLen);
-        this._caching={lastFrame:initFrame,lastIndex:0,value:_cs('float32', arrLen)};
+        this.v = createTypedArray('float32', arrLen);
+        this.pv = createTypedArray('float32', arrLen);
+        this.lastValue = createTypedArray('float32', arrLen);
+        this.lastPValue = createTypedArray('float32', arrLen);
+        this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray('float32', arrLen)};
     }
 
-    function _bo(elem,data,type, mult, arr) {
+    function getProp(elem,data,type, mult, arr) {
         var p;
         if(data.a === 0){
             if(type === 0) {
@@ -2429,18 +2430,18 @@
     }
 
     var ob = {
-        _bo: _bo
+        getProp: getProp
     };
     return ob;
 }());
-var _ag = (function() {
+var TransformPropertyFactory = (function() {
 
     function applyToMatrix(mat) {
-        var i, len = this._co.length;
+        var i, len = this.dynamicProperties.length;
         for(i = 0; i < len; i += 1) {
-            this._co[i].getValue();
-            if (this._co[i].mdf) {
-                this.mdf = true;
+            this.dynamicProperties[i].getValue();
+            if (this.dynamicProperties[i]._mdf) {
+                this._mdf = true;
             }
         }
         if (this.a) {
@@ -2464,22 +2465,22 @@
             mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
         }
     }
-    function processKeys(_ch){
-        if (this.elem._x.frameId === this.frameId) {
+    function processKeys(forceRender){
+        if (this.elem.globalData.frameId === this.frameId) {
             return;
         }
 
-        this.mdf = _ch;
-        var i, len = this._co.length;
+        this._mdf = false;
+        var i, len = this.dynamicProperties.length;
 
         for(i = 0; i < len; i += 1) {
-            this._co[i].getValue();
-            if (this._co[i].mdf) {
-                this.mdf = true;
+            this.dynamicProperties[i].getValue();
+            if (this.dynamicProperties[i]._mdf) {
+                this._mdf = true;
             }
         }
 
-        if (this.mdf) {
+        if (this._mdf || forceRender) {
             this.v.reset();
             if (this.a) {
                 this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
@@ -2495,17 +2496,17 @@
             } else {
                 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]);
             }
-            if (this.autoOriented && this.p._df && this.p._dg) {
+            if (this.autoOriented && this.p.keyframes && this.p.getValueAtTime) {
                 var v1,v2;
-                if (this.p._caching.lastFrame+this.p.offsetTime <= this.p._df[0].t) {
-                    v1 = this.p._dg((this.p._df[0].t + 0.01) / this.elem._x.frameRate,0);
-                    v2 = this.p._dg(this.p._df[0].t / this.elem._x.frameRate, 0);
-                } else if(this.p._caching.lastFrame+this.p.offsetTime >= this.p._df[this.p._df.length - 1].t) {
-                    v1 = this.p._dg((this.p._df[this.p._df.length - 1].t / this.elem._x.frameRate), 0);
-                    v2 = this.p._dg((this.p._df[this.p._df.length - 1].t - 0.01) / this.elem._x.frameRate, 0);
+                if (this.p._caching.lastFrame+this.p.offsetTime <= this.p.keyframes[0].t) {
+                    v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / this.elem.globalData.frameRate,0);
+                    v2 = this.p.getValueAtTime(this.p.keyframes[0].t / this.elem.globalData.frameRate, 0);
+                } else if(this.p._caching.lastFrame+this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
+                    v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / this.elem.globalData.frameRate), 0);
+                    v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.01) / this.elem.globalData.frameRate, 0);
                 } else {
                     v1 = this.p.pv;
-                    v2 = this.p._dg((this.p._caching.lastFrame+this.p.offsetTime - 0.01) / this.elem._x.frameRate, this.p.offsetTime);
+                    v2 = this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime - 0.01) / this.elem.globalData.frameRate, this.p.offsetTime);
                 }
                 this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
             }
@@ -2519,7 +2520,7 @@
                 this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2]);
             }
         }
-        this.frameId = this.elem._x.frameId;
+        this.frameId = this.elem.globalData.frameId;
     }
 
     function setInverted(){
@@ -2547,89 +2548,89 @@
 
     function autoOrient(){
         //
-        //var prevP = this._dg();
+        //var prevP = this.getValueAtTime();
     }
 
-    function _bk(elem,data,arr){
+    function TransformProperty(elem,data,arr){
         this.elem = elem;
         this.frameId = -1;
         this.propType = 'transform';
-        this._co = [];
-        this.mdf = false;
+        this.dynamicProperties = [];
+        this._mdf = false;
         this.data = data;
         this.v = new Matrix();
         if(data.p.s){
-            this.px = _ai._bo(elem,data.p.x,0,0,this._co);
-            this.py = _ai._bo(elem,data.p.y,0,0,this._co);
+            this.px = PropertyFactory.getProp(elem,data.p.x,0,0,this.dynamicProperties);
+            this.py = PropertyFactory.getProp(elem,data.p.y,0,0,this.dynamicProperties);
             if(data.p.z){
-                this.pz = _ai._bo(elem,data.p.z,0,0,this._co);
+                this.pz = PropertyFactory.getProp(elem,data.p.z,0,0,this.dynamicProperties);
             }
         }else{
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
         }
         if(data.r) {
-            this.r = _ai._bo(elem, data.r, 0, degToRads, this._co);
+            this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this.dynamicProperties);
         } else if(data.rx) {
-            this.rx = _ai._bo(elem, data.rx, 0, degToRads, this._co);
-            this.ry = _ai._bo(elem, data.ry, 0, degToRads, this._co);
-            this.rz = _ai._bo(elem, data.rz, 0, degToRads, this._co);
+            this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this.dynamicProperties);
+            this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this.dynamicProperties);
+            this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this.dynamicProperties);
             if(data.or.k[0].ti) {
                 var i, len = data.or.k.length;
                 for(i=0;i<len;i+=1) {
                     data.or.k[i].to = data.or.k[i].ti = null;
                 }
             }
-            this.or = _ai._bo(elem, data.or, 1, degToRads, this._co);
+            this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this.dynamicProperties);
             //sh Indicates it needs to be capped between -180 and 180
             this.or.sh = true;
         }
         if(data.sk){
-            this.sk = _ai._bo(elem, data.sk, 0, degToRads, this._co);
-            this.sa = _ai._bo(elem, data.sa, 0, degToRads, this._co);
+            this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this.dynamicProperties);
+            this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this.dynamicProperties);
         }
         if(data.a) {
-            this.a = _ai._bo(elem,data.a,1,0,this._co);
+            this.a = PropertyFactory.getProp(elem,data.a,1,0,this.dynamicProperties);
         }
         if(data.s) {
-            this.s = _ai._bo(elem,data.s,1,0.01,this._co);
+            this.s = PropertyFactory.getProp(elem,data.s,1,0.01,this.dynamicProperties);
         }
-        // Opacity is not part of the transform properties, that's why it won't use this._co. That way transforms won't get updated if opacity changes.
+        // 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.
         if(data.o){
-            this.o = _ai._bo(elem,data.o,0,0.01,arr);
+            this.o = PropertyFactory.getProp(elem,data.o,0,0.01,arr);
         } else {
-            this.o = {mdf:false,v:1};
+            this.o = {_mdf:false,v:1};
         }
-        if(this._co.length){
+        if(this.dynamicProperties.length){
             arr.push(this);
         }else{
             this.getValue(true);
         }
     }
 
-    _bk.prototype.applyToMatrix = applyToMatrix;
-    _bk.prototype.getValue = processKeys;
-    _bk.prototype.setInverted = setInverted;
-    _bk.prototype.autoOrient = autoOrient;
+    TransformProperty.prototype.applyToMatrix = applyToMatrix;
+    TransformProperty.prototype.getValue = processKeys;
+    TransformProperty.prototype.setInverted = setInverted;
+    TransformProperty.prototype.autoOrient = autoOrient;
 
-    function _bj(elem,data,arr){
-        return new _bk(elem,data,arr)
+    function getTransformProperty(elem,data,arr){
+        return new TransformProperty(elem,data,arr);
     }
 
     return {
-        _bj: _bj
+        getTransformProperty: getTransformProperty
     };
 
 }());
-function _av(){
+function ShapePath(){
 	this.c = false;
 	this._length = 0;
 	this._maxLength = 8;
-	this.v = _cv(this._maxLength);
-	this.o = _cv(this._maxLength);
-	this.i = _cv(this._maxLength);
-};
+	this.v = createSizedArray(this._maxLength);
+	this.o = createSizedArray(this._maxLength);
+	this.i = createSizedArray(this._maxLength);
+}
 
-_av.prototype.setPathData = function(closed, len) {
+ShapePath.prototype.setPathData = function(closed, len) {
 	this.c = closed;
 	this.setLength(len);
 	var i = 0;
@@ -2641,21 +2642,21 @@
 	}
 };
 
-_av.prototype.setLength = function(len) {
+ShapePath.prototype.setLength = function(len) {
 	while(this._maxLength < len) {
 		this.doubleArrayLength();
 	}
 	this._length = len;
-}
+};
 
-_av.prototype.doubleArrayLength = function() {
-	this.v = this.v.concat(_cv(this._maxLength))
-	this.i = this.i.concat(_cv(this._maxLength))
-	this.o = this.o.concat(_cv(this._maxLength))
+ShapePath.prototype.doubleArrayLength = function() {
+	this.v = this.v.concat(createSizedArray(this._maxLength));
+	this.i = this.i.concat(createSizedArray(this._maxLength));
+	this.o = this.o.concat(createSizedArray(this._maxLength));
 	this._maxLength *= 2;
 };
 
-_av.prototype._ax = function(x, y, type, pos, replace) {
+ShapePath.prototype.setXYAt = function(x, y, type, pos, replace) {
 	var arr;
 	this._length = Math.max(this._length, pos + 1);
 	if(this._length >= this._maxLength) {
@@ -2679,54 +2680,54 @@
 	arr[pos][1] = y;
 };
 
-_av.prototype._aw = function(vX,vY,oX,oY,iX,iY,pos, replace) {
-	this._ax(vX,vY,'v',pos, replace);
-	this._ax(oX,oY,'o',pos, replace);
-	this._ax(iX,iY,'i',pos, replace);
+ShapePath.prototype.setTripleAt = function(vX,vY,oX,oY,iX,iY,pos, replace) {
+	this.setXYAt(vX,vY,'v',pos, replace);
+	this.setXYAt(oX,oY,'o',pos, replace);
+	this.setXYAt(iX,iY,'i',pos, replace);
 };
 
-_av.prototype.reverse = function() {
-	var newPath = new _av();
+ShapePath.prototype.reverse = function() {
+	var newPath = new ShapePath();
 	newPath.setPathData(this.c, this._length);
 	var vertices = this.v, outPoints = this.o, inPoints = this.i;
 	var init = 0;
 	if (this.c) {
-		newPath._aw(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
+		newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
         init = 1;
     }
     var cnt = this._length - 1;
     var len = this._length;
 
     for (i = init; i < len; i += 1) {
-    	newPath._aw(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
+    	newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
         cnt -= 1;
     }
     return newPath;
 };
-var _ah = (function(){
+var ShapePropertyFactory = (function(){
 
     var initFrame = -999999;
 
     function interpolateShape(frameNum, previousValue, isCurrentRender, caching) {
         var iterationIndex = caching.lastIndex;
-        var keyPropS,keyPropE,isHold;
-        if(frameNum < this._df[0].t-this.offsetTime){
-            keyPropS = this._df[0].s[0];
+        var keyPropS,keyPropE,isHold, j, k, jLen, kLen, perc, vertexValue, hasModified = false;
+        if(frameNum < this.keyframes[0].t-this.offsetTime){
+            keyPropS = this.keyframes[0].s[0];
             isHold = true;
             iterationIndex = 0;
-        }else if(frameNum >= this._df[this._df.length - 1].t-this.offsetTime){
-            if(this._df[this._df.length - 2].h === 1){
-                keyPropS = this._df[this._df.length - 1].s[0];
+        }else if(frameNum >= this.keyframes[this.keyframes.length - 1].t-this.offsetTime){
+            if(this.keyframes[this.keyframes.length - 2].h === 1){
+                keyPropS = this.keyframes[this.keyframes.length - 1].s[0];
             }else{
-                keyPropS = this._df[this._df.length - 2].e[0];
+                keyPropS = this.keyframes[this.keyframes.length - 2].e[0];
             }
             isHold = true;
         }else{
             var i = iterationIndex;
-            var len = this._df.length- 1,flag = true,keyData,nextKeyData, j, jLen, k, kLen;
+            var len = this.keyframes.length- 1,flag = true,keyData,nextKeyData;
             while(flag){
-                keyData = this._df[i];
-                nextKeyData = this._df[i+1];
+                keyData = this.keyframes[i];
+                nextKeyData = this.keyframes[i+1];
                 if((nextKeyData.t - this.offsetTime) > frameNum){
                     break;
                 }
@@ -2738,8 +2739,6 @@
             }
             isHold = keyData.h === 1;
             iterationIndex = i;
-
-            var perc;
             if(!isHold){
                 if(frameNum >= nextKeyData.t-this.offsetTime){
                     perc = 1;
@@ -2761,14 +2760,7 @@
         }
         jLen = previousValue._length;
         kLen = keyPropS.i[0].length;
-        var hasModified = false;
-        var vertexValue;
         caching.lastIndex = iterationIndex;
-        var j, k;
-        var jLen = previousValue._length;
-        var kLen = keyPropS.i[0].length;
-        var hasModified = false;
-        var vertexValue;
 
         for(j=0;j<jLen;j+=1){
             for(k=0;k<kLen;k+=1){
@@ -2803,26 +2795,26 @@
     }
 
     function interpolateShapeCurrentTime(){
-        if(this.elem._x.frameId === this.frameId){
+        if(this.elem.globalData.frameId === this.frameId){
             return;
         }
-        this.mdf = false;
+        this._mdf = false;
         var frameNum = this.comp.renderedFrame - this.offsetTime;
-        var initTime = this._df[0].t - this.offsetTime;
-        var endTime = this._df[this._df.length - 1].t - this.offsetTime;
+        var initTime = this.keyframes[0].t - this.offsetTime;
+        var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
         var lastFrame = this._caching.lastFrame;
         if(!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))){
             ////
             this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
             var hasModified = this.interpolateShape(frameNum, this.v, true, this._caching);
             ////
-            this.mdf = hasModified;
+            this._mdf = hasModified;
             if(hasModified) {
-                this.paths = this._ak;
+                this.paths = this.localShapeCollection;
             }
         }
         this._caching.lastFrame = frameNum;
-        this.frameId = this.elem._x.frameId;
+        this.frameId = this.elem.globalData.frameId;
     }
 
     function getShapeValue(){
@@ -2830,9 +2822,9 @@
     }
 
     function resetShape(){
-        this.paths = this._ak;
+        this.paths = this.localShapeCollection;
         if(!this.k){
-            this.mdf = false;
+            this._mdf = false;
         }
     }
 
@@ -2840,12 +2832,12 @@
         this.propType = 'shape';
         this.comp = elem.comp;
         this.k = false;
-        this.mdf = false;
+        this._mdf = false;
         var pathData = type === 3 ? data.pt.k : data.ks.k;
         this.v = shape_pool.clone(pathData);
         this.pv = shape_pool.clone(this.v);
-        this._ak = shapeCollection_pool._al();
-        this.paths = this._ak;
+        this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+        this.paths = this.localShapeCollection;
         this.paths.addShape(this.v);
         this.reset = resetShape;
     }
@@ -2857,16 +2849,16 @@
         this.comp = elem.comp;
         this.elem = elem;
         this.offsetTime = elem.data.st;
-        this._df = type === 3 ? data.pt.k : data.ks.k;
+        this.keyframes = type === 3 ? data.pt.k : data.ks.k;
         this.k = true;
         this.kf = true;
-        var i, len = this._df[0].s[0].i.length;
-        var jLen = this._df[0].s[0].i[0].length;
+        var i, len = this.keyframes[0].s[0].i.length;
+        var jLen = this.keyframes[0].s[0].i[0].length;
         this.v = shape_pool.newElement();
-        this.v.setPathData(this._df[0].s[0].c, len);
+        this.v.setPathData(this.keyframes[0].s[0].c, len);
         this.pv = shape_pool.clone(this.v);
-        this._ak = shapeCollection_pool._al();
-        this.paths = this._ak;
+        this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+        this.paths = this.localShapeCollection;
         this.paths.addShape(this.v);
         this.lastFrame = initFrame;
         this.reset = resetShape;
@@ -2912,53 +2904,53 @@
         }
 
         function processKeys(frameNum){
-            var i, len = this._co.length;
-            if(this.elem._x.frameId === this.frameId){
+            var i, len = this.dynamicProperties.length;
+            if(this.elem.globalData.frameId === this.frameId){
                 return;
             }
-            this.mdf = false;
-            this.frameId = this.elem._x.frameId;
+            this._mdf = false;
+            this.frameId = this.elem.globalData.frameId;
 
             for(i=0;i<len;i+=1){
-                this._co[i].getValue(frameNum);
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue(frameNum);
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
-            if(this.mdf){
+            if(this._mdf){
                 this.convertEllToPath();
             }
         }
 
         return function EllShapeProperty(elem,data) {
             /*this.v = {
-                v: _cv(4),
-                i: _cv(4),
-                o: _cv(4),
+                v: createSizedArray(4),
+                i: createSizedArray(4),
+                o: createSizedArray(4),
                 c: true
             };*/
             this.v = shape_pool.newElement();
             this.v.setPathData(true, 4);
-            this._ak = shapeCollection_pool._al();
-            this.paths = this._ak;
-            this._ak.addShape(this.v);
+            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+            this.paths = this.localShapeCollection;
+            this.localShapeCollection.addShape(this.v);
             this.d = data.d;
-            this._co = [];
+            this.dynamicProperties = [];
             this.elem = elem;
             this.comp = elem.comp;
             this.frameId = -1;
-            this.mdf = false;
+            this._mdf = false;
             this.getValue = processKeys;
             this.convertEllToPath = convertEllToPath;
             this.reset = resetShape;
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
-            this.s = _ai._bo(elem,data.s,1,0,this._co);
-            if(this._co.length){
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
+            this.s = PropertyFactory.getProp(elem,data.s,1,0,this.dynamicProperties);
+            if(this.dynamicProperties.length){
                 this.k = true;
             }else{
                 this.convertEllToPath();
             }
-        }
+        };
     }());
 
     var StarShapeProperty = (function() {
@@ -2983,7 +2975,7 @@
                 var oy = x === 0 && y === 0 ? 0 : -x/Math.sqrt(x*x + y*y);
                 x +=  + this.p.v[0];
                 y +=  + this.p.v[1];
-                this.v._aw(x,y,x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir,x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir, i, true);
+                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);
                 /*this.v.v[i] = [x,y];
                 this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
                 this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];*/
@@ -3020,7 +3012,7 @@
                 var oy = x === 0 && y === 0 ? 0 : -x/Math.sqrt(x*x + y*y);
                 x +=  + this.p.v[0];
                 y +=  + this.p.v[1];
-                this.v._aw(x,y,x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir,x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir, i, true);
+                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);
 
                 /*this.v.v[i] = [x,y];
                 this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
@@ -3032,20 +3024,20 @@
         }
 
         function processKeys() {
-            if(this.elem._x.frameId === this.frameId){
+            if(this.elem.globalData.frameId === this.frameId){
                 return;
             }
-            this.mdf = false;
-            this.frameId = this.elem._x.frameId;
-            var i, len = this._co.length;
+            this._mdf = false;
+            this.frameId = this.elem.globalData.frameId;
+            var i, len = this.dynamicProperties.length;
 
             for(i=0;i<len;i+=1){
-                this._co[i].getValue();
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue();
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
-            if(this.mdf){
+            if(this._mdf){
                 this.convertToPath();
             }
         }
@@ -3064,49 +3056,49 @@
             this.data = data;
             this.frameId = -1;
             this.d = data.d;
-            this._co = [];
-            this.mdf = false;
+            this.dynamicProperties = [];
+            this._mdf = false;
             this.getValue = processKeys;
             this.reset = resetShape;
             if(data.sy === 1){
-                this.ir = _ai._bo(elem,data.ir,0,0,this._co);
-                this.is = _ai._bo(elem,data.is,0,0.01,this._co);
+                this.ir = PropertyFactory.getProp(elem,data.ir,0,0,this.dynamicProperties);
+                this.is = PropertyFactory.getProp(elem,data.is,0,0.01,this.dynamicProperties);
                 this.convertToPath = convertStarToPath;
             } else {
                 this.convertToPath = convertPolygonToPath;
             }
-            this.pt = _ai._bo(elem,data.pt,0,0,this._co);
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
-            this.r = _ai._bo(elem,data.r,0,degToRads,this._co);
-            this.or = _ai._bo(elem,data.or,0,0,this._co);
-            this.os = _ai._bo(elem,data.os,0,0.01,this._co);
-            this._ak = shapeCollection_pool._al();
-            this._ak.addShape(this.v);
-            this.paths = this._ak;
-            if(this._co.length){
+            this.pt = PropertyFactory.getProp(elem,data.pt,0,0,this.dynamicProperties);
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
+            this.r = PropertyFactory.getProp(elem,data.r,0,degToRads,this.dynamicProperties);
+            this.or = PropertyFactory.getProp(elem,data.or,0,0,this.dynamicProperties);
+            this.os = PropertyFactory.getProp(elem,data.os,0,0.01,this.dynamicProperties);
+            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+            this.localShapeCollection.addShape(this.v);
+            this.paths = this.localShapeCollection;
+            if(this.dynamicProperties.length){
                 this.k = true;
             }else{
                 this.convertToPath();
             }
-        }
+        };
     }());
 
     var RectShapeProperty = (function() {
         function processKeys(frameNum){
-            if(this.elem._x.frameId === this.frameId){
+            if(this.elem.globalData.frameId === this.frameId){
                 return;
             }
-            this.mdf = false;
-            this.frameId = this.elem._x.frameId;
-            var i, len = this._co.length;
+            this._mdf = false;
+            this.frameId = this.elem.globalData.frameId;
+            var i, len = this.dynamicProperties.length;
 
             for(i=0;i<len;i+=1){
-                this._co[i].getValue(frameNum);
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue(frameNum);
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
-            if(this.mdf){
+            if(this._mdf){
                 this.convertRectToPath();
             }
 
@@ -3119,33 +3111,33 @@
             this.v._length = 0;
 
             if(this.d === 2 || this.d === 1) {
-                this.v._aw(p0+v0, p1-v1+round,p0+v0, p1-v1+round,p0+v0,p1-v1+cPoint,0, true);
-                this.v._aw(p0+v0, p1+v1-round,p0+v0, p1+v1-cPoint,p0+v0, p1+v1-round,1, true);
+                this.v.setTripleAt(p0+v0, p1-v1+round,p0+v0, p1-v1+round,p0+v0,p1-v1+cPoint,0, true);
+                this.v.setTripleAt(p0+v0, p1+v1-round,p0+v0, p1+v1-cPoint,p0+v0, p1+v1-round,1, true);
                 if(round!== 0){
-                    this.v._aw(p0+v0-round, p1+v1,p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,2, true);
-                    this.v._aw(p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,p0-v0+round,p1+v1,3, true);
-                    this.v._aw(p0-v0,p1+v1-round,p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,4, true);
-                    this.v._aw(p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,p0-v0,p1-v1+round,5, true);
-                    this.v._aw(p0-v0+round,p1-v1,p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,6, true);
-                    this.v._aw(p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,p0+v0-round,p1-v1,7, true);
+                    this.v.setTripleAt(p0+v0-round, p1+v1,p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,2, true);
+                    this.v.setTripleAt(p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,p0-v0+round,p1+v1,3, true);
+                    this.v.setTripleAt(p0-v0,p1+v1-round,p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,4, true);
+                    this.v.setTripleAt(p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,p0-v0,p1-v1+round,5, true);
+                    this.v.setTripleAt(p0-v0+round,p1-v1,p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,6, true);
+                    this.v.setTripleAt(p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,p0+v0-round,p1-v1,7, true);
                 } else {
-                    this.v._aw(p0-v0,p1+v1,p0-v0+cPoint,p1+v1,p0-v0,p1+v1,2);
-                    this.v._aw(p0-v0,p1-v1,p0-v0,p1-v1+cPoint,p0-v0,p1-v1,3);
+                    this.v.setTripleAt(p0-v0,p1+v1,p0-v0+cPoint,p1+v1,p0-v0,p1+v1,2);
+                    this.v.setTripleAt(p0-v0,p1-v1,p0-v0,p1-v1+cPoint,p0-v0,p1-v1,3);
                 }
             }else{
-                this.v._aw(p0+v0,p1-v1+round,p0+v0,p1-v1+cPoint,p0+v0,p1-v1+round,0, true);
+                this.v.setTripleAt(p0+v0,p1-v1+round,p0+v0,p1-v1+cPoint,p0+v0,p1-v1+round,0, true);
                 if(round!== 0){
-                    this.v._aw(p0+v0-round,p1-v1,p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,1, true);
-                    this.v._aw(p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,p0-v0+round,p1-v1,2, true);
-                    this.v._aw(p0-v0,p1-v1+round,p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,3, true);
-                    this.v._aw(p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,p0-v0,p1+v1-round,4, true);
-                    this.v._aw(p0-v0+round,p1+v1,p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,5, true);
-                    this.v._aw(p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,p0+v0-round,p1+v1,6, true);
-                    this.v._aw(p0+v0,p1+v1-round,p0+v0,p1+v1-round,p0+v0,p1+v1-cPoint,7, true);
+                    this.v.setTripleAt(p0+v0-round,p1-v1,p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,1, true);
+                    this.v.setTripleAt(p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,p0-v0+round,p1-v1,2, true);
+                    this.v.setTripleAt(p0-v0,p1-v1+round,p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,3, true);
+                    this.v.setTripleAt(p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,p0-v0,p1+v1-round,4, true);
+                    this.v.setTripleAt(p0-v0+round,p1+v1,p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,5, true);
+                    this.v.setTripleAt(p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,p0+v0-round,p1+v1,6, true);
+                    this.v.setTripleAt(p0+v0,p1+v1-round,p0+v0,p1+v1-round,p0+v0,p1+v1-cPoint,7, true);
                 } else {
-                    this.v._aw(p0-v0,p1-v1,p0-v0+cPoint,p1-v1,p0-v0,p1-v1,1, true);
-                    this.v._aw(p0-v0,p1+v1,p0-v0,p1+v1-cPoint,p0-v0,p1+v1,2, true);
-                    this.v._aw(p0+v0,p1+v1,p0+v0-cPoint,p1+v1,p0+v0,p1+v1,3, true);
+                    this.v.setTripleAt(p0-v0,p1-v1,p0-v0+cPoint,p1-v1,p0-v0,p1-v1,1, true);
+                    this.v.setTripleAt(p0-v0,p1+v1,p0-v0,p1+v1-cPoint,p0-v0,p1+v1,2, true);
+                    this.v.setTripleAt(p0+v0,p1+v1,p0+v0-cPoint,p1+v1,p0+v0,p1+v1,3, true);
 
                 }
             }
@@ -3154,30 +3146,30 @@
         return function RectShapeProperty(elem,data) {
             this.v = shape_pool.newElement();
             this.v.c = true;
-            this._ak = shapeCollection_pool._al();
-            this._ak.addShape(this.v);
-            this.paths = this._ak;
+            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
+            this.localShapeCollection.addShape(this.v);
+            this.paths = this.localShapeCollection;
             this.elem = elem;
             this.comp = elem.comp;
             this.frameId = -1;
             this.d = data.d;
-            this._co = [];
-            this.mdf = false;
+            this.dynamicProperties = [];
+            this._mdf = false;
             this.getValue = processKeys;
             this.convertRectToPath = convertRectToPath;
             this.reset = resetShape;
-            this.p = _ai._bo(elem,data.p,1,0,this._co);
-            this.s = _ai._bo(elem,data.s,1,0,this._co);
-            this.r = _ai._bo(elem,data.r,0,0,this._co);
-            if(this._co.length){
+            this.p = PropertyFactory.getProp(elem,data.p,1,0,this.dynamicProperties);
+            this.s = PropertyFactory.getProp(elem,data.s,1,0,this.dynamicProperties);
+            this.r = PropertyFactory.getProp(elem,data.r,0,0,this.dynamicProperties);
+            if(this.dynamicProperties.length){
                 this.k = true;
             }else{
                 this.convertRectToPath();
             }
-        }
+        };
     }());
 
-    function _bp(elem,data,type, arr){
+    function getShapeProp(elem,data,type, arr){
         var prop;
         if(type === 3 || type === 4){
             var dataProp = type === 3 ? data.pt : data.ks;
@@ -3209,12 +3201,12 @@
     }
 
     var ob = {};
-    ob._bp = _bp;
+    ob.getShapeProp = getShapeProp;
     ob.getConstructorFunction = getConstructorFunction;
     ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
     return ob;
 }());
-var _as = (function(){
+var ShapeModifiers = (function(){
     var ob = {};
     var modifiers = {};
     ob.registerModifier = registerModifier;
@@ -3226,112 +3218,92 @@
         }
     }
 
-    function getModifier(nm,elem, data, _co){
-        return new modifiers[nm](elem, data, _co);
+    function getModifier(nm,elem, data, dynamicProperties){
+        return new modifiers[nm](elem, data, dynamicProperties);
     }
 
     return ob;
 }());
 
-function _at(){}
-_at.prototype.initModifierProperties = function(){};
-_at.prototype.addShapeToModifier = function(){};
-_at.prototype.addShape = function(data){
+function ShapeModifier(){}
+ShapeModifier.prototype.initModifierProperties = function(){};
+ShapeModifier.prototype.addShapeToModifier = function(){};
+ShapeModifier.prototype.addShape = function(data){
     if(!this.closed){
-        var shapeData = {shape:data.sh, data: data, _ak:shapeCollection_pool._al()};
+        var shapeData = {shape:data.sh, data: data, localShapeCollection:shapeCollection_pool.newShapeCollection()};
         this.shapes.push(shapeData);
         this.addShapeToModifier(shapeData);
     }
-}
-_at.prototype.init = function(elem,data,_co){
-    this._co = [];
+};
+ShapeModifier.prototype.init = function(elem,data,dynamicProperties){
+    this.dynamicProperties = [];
     this.shapes = [];
     this.elem = elem;
     this.initModifierProperties(elem,data);
     this.frameId = initialDefaultFrame;
-    this.mdf = false;
+    this._mdf = false;
     this.closed = false;
     this.k = false;
-    if(this._co.length){
+    if(this.dynamicProperties.length){
         this.k = true;
-        _co.push(this);
+        dynamicProperties.push(this);
     }else{
         this.getValue(true);
     }
-}
-function _an(){
 };
-extendPrototype([_at], _an);
-_an.prototype.processKeys = function(forceRender) {
-    if (this.elem._x.frameId === this.frameId && !forceRender) {
+ShapeModifier.prototype.processKeys = function(){
+    if(this.elem.globalData.frameId === this.frameId){
         return;
     }
-    this.mdf = forceRender;
-    this.frameId = this.elem._x.frameId;
-    var i, len = this._co.length;
+    this._mdf = false;
+    var i, len = this.dynamicProperties.length;
 
-    for (i = 0; i < len; i +=1) {
-        this._co[i].getValue();
-        if (this._co[i].mdf) {
-            this.mdf = true;
+    for(i=0;i<len;i+=1){
+        this.dynamicProperties[i].getValue();
+        if(this.dynamicProperties[i]._mdf){
+            this._mdf = true;
         }
     }
-    if (this.mdf || forceRender) {
-        var o = (this.o.v % 360) / 360;
-        if (o < 0) {
-            o += 1;
-        }
-        var s = this.s.v + o;
-        var e = this.e.v + o;
-        if (s === e) {
-
-        }
-        if (s > e) {
-            var _s = s;
-            s = e;
-            e = _s;
-        }
-        this.sValue = s;
-        this.eValue = e;
-        this.oValue = o;
-    }
+    this.frameId = this.elem.globalData.frameId;
+};
+function TrimModifier(){
 }
-_an.prototype.initModifierProperties = function(elem, data) {
-    this.s = _ai._bo(elem, data.s, 0, 0.01, this._co);
-    this.e = _ai._bo(elem, data.e, 0, 0.01, this._co);
-    this.o = _ai._bo(elem, data.o, 0, 0, this._co);
+extendPrototype([ShapeModifier], TrimModifier);
+TrimModifier.prototype.initModifierProperties = function(elem, data) {
+    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this.dynamicProperties);
+    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this.dynamicProperties);
+    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this.dynamicProperties);
     this.sValue = 0;
     this.eValue = 0;
-    this.oValue = 0;
     this.getValue = this.processKeys;
     this.m = data.m;
 };
 
-_an.prototype.addShapeToModifier = function(shapeData){
+TrimModifier.prototype.addShapeToModifier = function(shapeData){
     shapeData.pathsData = [];
 };
 
-_an.prototype.calculateShapeEdges = function(s, e, shapeLength, addedLength, totalModifierLength) {
-    var segments = []
+TrimModifier.prototype.calculateShapeEdges = function(s, e, shapeLength, addedLength, totalModifierLength) {
+    var segments = [];
     if (e <= 1) {
         segments.push({
             s: s,
             e: e
-        })
+        });
     } else if (s >= 1) {
         segments.push({
             s: s - 1,
             e: e - 1
-        })
+        });
     } else {
         segments.push({
             s: s,
             e: 1
-        })
+        });
         segments.push({
             s: 0,
             e: e - 1
-        })
+        });
     }
     var shapeSegments = [];
     var i, len = segments.length, segmentOb;
@@ -3358,43 +3330,62 @@
         shapeSegments.push([0, 0]);
     }
     return shapeSegments;
-}
+};
 
-_an.prototype.releasePathsData = function(pathsData) {
+TrimModifier.prototype.releasePathsData = function(pathsData) {
     var i, len = pathsData.length;
     for (i = 0; i < len; i += 1) {
         segments_length_pool.release(pathsData[i]);
     }
     pathsData.length = 0;
     return pathsData;
-}
+};
 
-_an.prototype.processShapes = function(_ch) {
+TrimModifier.prototype.processShapes = function(_isFirstFrame) {
+    var s, e;
+    if (this._mdf || _isFirstFrame) {
+        var o = (this.o.v % 360) / 360;
+        if (o < 0) {
+            o += 1;
+        }
+        s = this.s.v + o;
+        e = this.e.v + o;
+        if (s === e) {
+
+        }
+        if (s > e) {
+            var _s = s;
+            s = e;
+            e = _s;
+        }
+        this.sValue = s;
+        this.eValue = e;
+    } else {
+        s = this.sValue;
+        e = this.eValue;
+    }
     var shapePaths;
-    var i, len = this.shapes.length;
-    var j, jLen;
-    var s = this.sValue;
-    var e = this.eValue;
+    var i, len = this.shapes.length, j, jLen;
     var pathsData, pathData, totalShapeLength, totalModifierLength = 0;
 
     if (e === s) {
         for (i = 0; i < len; i += 1) {
-            this.shapes[i]._ak.releaseShapes();
-            this.shapes[i].shape.mdf = true;
-            this.shapes[i].shape.paths = this.shapes[i]._ak;
+            this.shapes[i].localShapeCollection.releaseShapes();
+            this.shapes[i].shape._mdf = true;
+            this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
         }
     } else if (!((e === 1 && s === 0) || (e===0 && s === 1))){
-        var segments = [], shapeData, _ak;
+        var segments = [], shapeData, localShapeCollection;
         for (i = 0; i < len; i += 1) {
             shapeData = this.shapes[i];
             // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
-            if (!shapeData.shape.mdf && !this.mdf && !_ch && this.m !== 2) {
-                shapeData.shape.paths = shapeData._ak;
+            if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
+                shapeData.shape.paths = shapeData.localShapeCollection;
             } else {
                 shapePaths = shapeData.shape.paths;
                 jLen = shapePaths._length;
                 totalShapeLength = 0;
-                if (!shapeData.shape.mdf && shapeData.pathsData.length) {
+                if (!shapeData.shape._mdf && shapeData.pathsData.length) {
                     totalShapeLength = shapeData.totalShapeLength;
                 } else {
                     pathsData = this.releasePathsData(shapeData.pathsData);
@@ -3408,22 +3399,21 @@
                 }
 
                 totalModifierLength += totalShapeLength;
-                shapeData.shape.mdf = true;
+                shapeData.shape._mdf = true;
             }
         }
-        var shapeS = s, shapeE = e, addedLength = 0;
-        var j, jLen;
+        var shapeS = s, shapeE = e, addedLength = 0, edges;
         for (i = len - 1; i >= 0; i -= 1) {
             shapeData = this.shapes[i];
-            if (shapeData.shape.mdf) {
-                _ak = shapeData._ak;
-                _ak.releaseShapes();
+            if (shapeData.shape._mdf) {
+                localShapeCollection = shapeData.localShapeCollection;
+                localShapeCollection.releaseShapes();
                 //if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
                 if (this.m === 2 && len > 1) {
-                    var edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
+                    edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
                     addedLength += shapeData.totalShapeLength;
                 } else {
-                    edges = [[shapeS, shapeE]]
+                    edges = [[shapeS, shapeE]];
                 }
                 jLen = edges.length;
                 for (j = 0; j < jLen; j += 1) {
@@ -3434,77 +3424,74 @@
                         segments.push({
                             s:shapeData.totalShapeLength * shapeS,
                             e:shapeData.totalShapeLength * shapeE
-                        })
+                        });
                     } else if (shapeS >= 1) {
                         segments.push({
                             s:shapeData.totalShapeLength * (shapeS - 1),
                             e:shapeData.totalShapeLength * (shapeE - 1)
-                        })
+                        });
                     } else {
                         segments.push({
                             s:shapeData.totalShapeLength * shapeS,
                             e:shapeData.totalShapeLength
-                        })
+                        });
                         segments.push({
                             s:0,
                             e:shapeData.totalShapeLength * (shapeE - 1)
-                        })
+                        });
                     }
                     var newShapesData = this.addShapes(shapeData,segments[0]);
                     if (segments[0].s !== segments[0].e) {
                         if (segments.length > 1) {
                             if (shapeData.shape.v.c) {
                                 var lastShape = newShapesData.pop();
-                                this.addPaths(newShapesData, _ak);
+                                this.addPaths(newShapesData, localShapeCollection);
                                 newShapesData = this.addShapes(shapeData, segments[1], lastShape);
                             } else {
-                                this.addPaths(newShapesData, _ak);
+                                this.addPaths(newShapesData, localShapeCollection);
                                 newShapesData = this.addShapes(shapeData, segments[1]);
                             }
                         } 
-                        this.addPaths(newShapesData, _ak);
+                        this.addPaths(newShapesData, localShapeCollection);
                     }
                     
                 }
-                shapeData.shape.paths = _ak;
+                shapeData.shape.paths = localShapeCollection;
             }
         }
-    } else if (this.mdf) {
+    } else if (this._mdf) {
         for (i = 0; i < len; i += 1) {
-            this.shapes[i].shape.mdf = true;
+            this.shapes[i].shape._mdf = true;
         }
     }
-    if (!this._co.length) {
-        this.mdf = false;
-    }
-}
+};
 
-_an.prototype.addPaths = function(newPaths, _ak) {
+TrimModifier.prototype.addPaths = function(newPaths, localShapeCollection) {
     var i, len = newPaths.length;
     for (i = 0; i < len; i += 1) {
-        _ak.addShape(newPaths[i])
+        localShapeCollection.addShape(newPaths[i]);
     }
-}
+};
 
-_an.prototype.addSegment = function(pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
-    shapePath._ax(pt2[0], pt2[1], 'o', pos);
-    shapePath._ax(pt3[0], pt3[1], 'i', pos + 1);
+TrimModifier.prototype.addSegment = function(pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
+    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
+    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
     if(newShape){
-        shapePath._ax(pt1[0], pt1[1], 'v', pos);
+        shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
     }
-    shapePath._ax(pt4[0], pt4[1], 'v', pos + 1);
-}
+    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
+};
 
-_an.prototype.addSegmentFromArray = function(points, shapePath, pos, newShape) {
-    shapePath._ax(points[1], points[5], 'o', pos);
-    shapePath._ax(points[2], points[6], 'i', pos + 1);
+TrimModifier.prototype.addSegmentFromArray = function(points, shapePath, pos, newShape) {
+    shapePath.setXYAt(points[1], points[5], 'o', pos);
+    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
     if(newShape){
-        shapePath._ax(points[0], points[4], 'v', pos);
+        shapePath.setXYAt(points[0], points[4], 'v', pos);
     }
-    shapePath._ax(points[3], points[7], 'v', pos + 1);
-}
+    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
+};
 
-_an.prototype.addShapes = function(shapeData, shapeSegment, shapePath) {
+TrimModifier.prototype.addShapes = function(shapeData, shapeSegment, shapePath) {
     var pathsData = shapeData.pathsData;
     var shapePaths = shapeData.shape.paths.shapes;
     var i, len = shapeData.shape.paths._length, j, jLen;
@@ -3572,8 +3559,8 @@
             segmentCount += 1;
         }
         if (shapePath._length) {
-            shapePath._ax(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
-            shapePath._ax(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1],'o', shapePath._length - 1);
+            shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
+            shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1],'o', shapePath._length - 1);
         }
         if (addedLength > shapeSegment.e) {
             break;
@@ -3586,34 +3573,18 @@
         }
     }
     return shapes;
-
-}
-
-
-_as.registerModifier('tm', _an);
-function _au(){};
-extendPrototype([_at],_au);
-_au.prototype.processKeys = function(forceRender){
-    if(this.elem._x.frameId === this.frameId && !forceRender){
-        return;
-    }
-    this.mdf = forceRender ? true : false;
-    this.frameId = this.elem._x.frameId;
-    var i, len = this._co.length;
-
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-        if(this._co[i].mdf){
-            this.mdf = true;
-        }
-    }
-}
-_au.prototype.initModifierProperties = function(elem,data){
-    this.getValue = this.processKeys;
-    this.rd = _ai._bo(elem,data.r,0,null,this._co);
 };
 
-_au.prototype.processPath = function(path, round){
+
+ShapeModifiers.registerModifier('tm', TrimModifier);
+function RoundCornersModifier(){}
+extendPrototype([ShapeModifier],RoundCornersModifier);
+RoundCornersModifier.prototype.initModifierProperties = function(elem,data){
+    this.getValue = this.processKeys;
+    this.rd = PropertyFactory.getProp(elem,data.r,0,null,this.dynamicProperties);
+};
+
+RoundCornersModifier.prototype.processPath = function(path, round){
     var cloned_path = shape_pool.newElement();
     cloned_path.c = path.c;
     var i, len = path._length;
@@ -3625,7 +3596,7 @@
         currentI = path.i[i];
         if(currentV[0]===currentO[0] && currentV[1]===currentO[1] && currentV[0]===currentI[0] && currentV[1]===currentI[1]){
             if((i===0 || i === len - 1) && !path.c){
-                cloned_path._aw(currentV[0],currentV[1],currentO[0],currentO[1],currentI[0],currentI[1],index);
+                cloned_path.setTripleAt(currentV[0],currentV[1],currentO[0],currentO[1],currentI[0],currentI[1],index);
                 /*cloned_path.v[index] = currentV;
                 cloned_path.o[index] = currentO;
                 cloned_path.i[index] = currentI;*/
@@ -3642,7 +3613,7 @@
                 vY = iY = currentV[1]-(currentV[1]-closerV[1])*newPosPerc;
                 oX = vX-(vX-currentV[0])*roundCorner;
                 oY = vY-(vY-currentV[1])*roundCorner;
-                cloned_path._aw(vX,vY,oX,oY,iX,iY,index);
+                cloned_path.setTripleAt(vX,vY,oX,oY,iX,iY,index);
                 index += 1;
 
                 if(i === len - 1){
@@ -3656,72 +3627,58 @@
                 vY = oY = currentV[1]+(closerV[1]-currentV[1])*newPosPerc;
                 iX = vX-(vX-currentV[0])*roundCorner;
                 iY = vY-(vY-currentV[1])*roundCorner;
-                cloned_path._aw(vX,vY,oX,oY,iX,iY,index);
+                cloned_path.setTripleAt(vX,vY,oX,oY,iX,iY,index);
                 index += 1;
             }
         } else {
-            cloned_path._aw(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);
+            cloned_path.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);
             index += 1;
         }
     }
     return cloned_path;
-}
+};
 
-_au.prototype.processShapes = function(_ch){
+RoundCornersModifier.prototype.processShapes = function(_isFirstFrame){
     var shapePaths;
     var i, len = this.shapes.length;
     var j, jLen;
     var rd = this.rd.v;
 
     if(rd !== 0){
-        var shapeData, newPaths, _ak;
+        var shapeData, newPaths, localShapeCollection;
         for(i=0;i<len;i+=1){
             shapeData = this.shapes[i];
             newPaths = shapeData.shape.paths;
-            _ak = shapeData._ak;
-            if(!(!shapeData.shape.mdf && !this.mdf && !_ch)){
-                _ak.releaseShapes();
-                shapeData.shape.mdf = true;
+            localShapeCollection = shapeData.localShapeCollection;
+            if(!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)){
+                localShapeCollection.releaseShapes();
+                shapeData.shape._mdf = true;
                 shapePaths = shapeData.shape.paths.shapes;
                 jLen = shapeData.shape.paths._length;
                 for(j=0;j<jLen;j+=1){
-                    _ak.addShape(this.processPath(shapePaths[j],rd));
+                    localShapeCollection.addShape(this.processPath(shapePaths[j],rd));
                 }
             }
-            shapeData.shape.paths = shapeData._ak;
+            shapeData.shape.paths = shapeData.localShapeCollection;
         }
 
     }
-    if(!this._co.length){
-        this.mdf = false;
-    }
-}
-
-
-_as.registerModifier('rd',_au);
-function _aj(){};
-_aj.prototype.processKeys = function(forceRender){
-    if(this.elem._x.frameId === this.frameId && !forceRender){
-        return;
-    }
-    this.mdf = forceRender ? true : false;
-    var i, len = this._co.length;
-
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-        if(this._co[i].mdf){
-            this.mdf = true;
-        }
+    if(!this.dynamicProperties.length){
+        this._mdf = false;
     }
 };
 
-_aj.prototype.initModifierProperties = function(elem,data){
+ShapeModifiers.registerModifier('rd',RoundCornersModifier);
+function RepeaterModifier(){}
+extendPrototype([ShapeModifier], RepeaterModifier);
+
+RepeaterModifier.prototype.initModifierProperties = function(elem,data){
     this.getValue = this.processKeys;
-    this.c = _ai._bo(elem,data.c,0,null,this._co);
-    this.o = _ai._bo(elem,data.o,0,null,this._co);
-    this.tr = _ag._bj(elem,data.tr,this._co);
+    this.c = PropertyFactory.getProp(elem,data.c,0,null,this.dynamicProperties);
+    this.o = PropertyFactory.getProp(elem,data.o,0,null,this.dynamicProperties);
+    this.tr = TransformPropertyFactory.getTransformProperty(elem,data.tr,this.dynamicProperties);
     this.data = data;
-    if(!this._co.length){
+    if(!this.dynamicProperties.length){
         this.getValue(true);
     }
     this.pMatrix = new Matrix();
@@ -3731,7 +3688,7 @@
     this.matrix = new Matrix();
 };
 
-_aj.prototype.applyTransforms = function(pMatrix, rMatrix, sMatrix, transform, perc, inv){
+RepeaterModifier.prototype.applyTransforms = function(pMatrix, rMatrix, sMatrix, transform, perc, inv){
     var dir = inv ? -1 : 1;
     var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
     var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
@@ -3742,78 +3699,71 @@
     sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
     sMatrix.scale(inv ? 1/scaleX : scaleX, inv ? 1/scaleY : scaleY);
     sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
-}
+};
 
-_aj.prototype.init = function(elem, arr, pos, elemsData, _co) {
+RepeaterModifier.prototype.init = function(elem, arr, pos, elemsData, dynamicProperties) {
     this.elem = elem;
     this.arr = arr;
     this.pos = pos;
     this.elemsData = elemsData;
     this._currentCopies = 0;
-    this._bq = [];
+    this._elements = [];
     this._groups = [];
-    this._co = [];
+    this.dynamicProperties = [];
     this.frameId = -1;
     this.initModifierProperties(elem,arr[pos]);
     var cont = 0;
     while(pos>0){
         pos -= 1;
-        //this._bq.unshift(arr.splice(pos,1)[0]);
-        this._bq.unshift(arr[pos]);
+        //this._elements.unshift(arr.splice(pos,1)[0]);
+        this._elements.unshift(arr[pos]);
         cont += 1;
     }
-    if(this._co.length){
+    if(this.dynamicProperties.length){
         this.k = true;
-        _co.push(this);
+        dynamicProperties.push(this);
     }else{
         this.getValue(true);
     }
-}
+};
 
-_aj.prototype.resetElements = function(_br){
-    var i, len = _br.length;
+RepeaterModifier.prototype.resetElements = function(elements){
+    var i, len = elements.length;
     for(i = 0; i < len; i += 1) {
-        _br[i]._processed = false;
-        if(_br[i].ty === 'gr'){
-            this.resetElements(_br[i].it);
+        elements[i]._processed = false;
+        if(elements[i].ty === 'gr'){
+            this.resetElements(elements[i].it);
         }
     }
-}
+};
 
-_aj.prototype.cloneElements = function(_br){
-    var i, len = _br.length;
-    var newElements = JSON.parse(JSON.stringify(_br));
+RepeaterModifier.prototype.cloneElements = function(elements){
+    var i, len = elements.length;
+    var newElements = JSON.parse(JSON.stringify(elements));
     this.resetElements(newElements);
     return newElements;
-}
+};
 
-_aj.prototype.changeGroupRender = function(_br, renderFlag) {
-    var i, len = _br.length;
+RepeaterModifier.prototype.changeGroupRender = function(elements, renderFlag) {
+    var i, len = elements.length;
     for(i = 0; i < len ; i += 1) {
-        _br[i]._render = renderFlag;
-        if(_br[i].ty === 'gr') {
-            this.changeGroupRender(_br[i].it, renderFlag);
+        elements[i]._render = renderFlag;
+        if(elements[i].ty === 'gr') {
+            this.changeGroupRender(elements[i].it, renderFlag);
         }
     }
-}
+};
 
-_aj.prototype.processShapes = function(_ch){
-
-    if(this.elem._x.frameId === this.frameId){
-        return;
-    }
-    this.frameId = this.elem._x.frameId;
-    if(!this._co.length && !_ch){
-        this.mdf = false;
-    }
-    if(this.mdf){
+RepeaterModifier.prototype.processShapes = function(_isFirstFrame) {
+    var items, itemsTransform, i, dir, cont;
+    if(this._mdf || _isFirstFrame){
         var copies = Math.ceil(this.c.v);
         if(this._groups.length < copies){
             while(this._groups.length < copies){
                 var group = {
-                    it:this.cloneElements(this._bq),
+                    it:this.cloneElements(this._elements),
                     ty:'gr'
-                }
+                };
                 group.it.push({"a":{"a":0,"ix":1,"k":[0,0]},"nm":"Transform","o":{"a":0,"ix":7,"k":100},"p":{"a":0,"ix":2,"k":[0,0]},"r":{"a":0,"ix":6,"k":0},"s":{"a":0,"ix":3,"k":[100,100]},"sa":{"a":0,"ix":5,"k":0},"sk":{"a":0,"ix":4,"k":0},"ty":"tr"});
                 
                 this.arr.splice(0,0,group);
@@ -3822,7 +3772,8 @@
             }
             this.elem.reloadShapes();
         }
-        var i, cont = 0, renderFlag;
+        cont = 0;
+        var renderFlag;
         for(i = 0; i  <= this._groups.length - 1; i += 1){
             renderFlag = cont < copies;
             this._groups[i]._render = renderFlag;
@@ -3831,7 +3782,6 @@
         }
         
         this._currentCopies = copies;
-        this.elem._ch = true;
         ////
 
         var offset = this.o.v;
@@ -3869,9 +3819,15 @@
             }
         }
         i = this.data.m === 1 ? 0 : this._currentCopies - 1;
-        var dir = this.data.m === 1 ? 1 : -1;
+        dir = this.data.m === 1 ? 1 : -1;
         cont = this._currentCopies;
+        var j, jLen;
         while(cont){
+            items = this.elemsData[i].it;
+            itemsTransform = items[items.length - 1].transform.mProps.v.props;
+            jLen = itemsTransform.length;
+            items[items.length - 1].transform.mProps._mdf = true;
+            items[items.length - 1].transform.op._mdf = true;
             if(iteration !== 0){
                 if((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)){
                     this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
@@ -3879,18 +3835,13 @@
                 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]);
                 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]);
                 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]);
-                var items = this.elemsData[i].it;
-                var itemsTransform = items[items.length - 1].transform.mProps.v.props;
-                var j, jLen = itemsTransform.length;
+                
                 for(j=0;j<jLen;j+=1) {
                     itemsTransform[j] = this.matrix.props[j];
                 }
                 this.matrix.reset();
             } else {
                 this.matrix.reset();
-                var items = this.elemsData[i].it;
-                var itemsTransform = items[items.length - 1].transform.mProps.v.props;
-                var j, jLen = itemsTransform.length;
                 for(j=0;j<jLen;j+=1) {
                     itemsTransform[j] = this.matrix.props[j];
                 }
@@ -3899,72 +3850,84 @@
             cont -= 1;
             i += dir;
         }
+    } else {
+        cont = this._currentCopies;
+        i = 0;
+        dir = 1;
+        while(cont){
+            items = this.elemsData[i].it;
+            itemsTransform = items[items.length - 1].transform.mProps.v.props;
+            items[items.length - 1].transform.mProps._mdf = false;
+            items[items.length - 1].transform.op._mdf = false;
+            cont -= 1;
+            i += dir;
+        }
     }
-}
-
-_aj.prototype.addShape = function(){}
-
-_as.registerModifier('rp',_aj);
-function _am(){
-	this._length = 0;
-	this._maxLength = 4;
-	this.shapes = _cv(this._maxLength);
 };
 
-_am.prototype.addShape = function(shapeData){
+RepeaterModifier.prototype.addShape = function(){};
+
+ShapeModifiers.registerModifier('rp',RepeaterModifier);
+function ShapeCollection(){
+	this._length = 0;
+	this._maxLength = 4;
+	this.shapes = createSizedArray(this._maxLength);
+}
+
+ShapeCollection.prototype.addShape = function(shapeData){
 	if(this._length === this._maxLength){
-		this.shapes = this.shapes.concat(_cv(this._maxLength));
+		this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
 		this._maxLength *= 2;
 	}
 	this.shapes[this._length] = shapeData;
 	this._length += 1;
 };
 
-_am.prototype.releaseShapes = function(){
+ShapeCollection.prototype.releaseShapes = function(){
 	var i;
 	for(i = 0; i < this._length; i += 1) {
 		shape_pool.release(this.shapes[i]);
 	}
 	this._length = 0;
 };
-function DashProperty(elem, data, renderer, _co) {
+function DashProperty(elem, data, renderer, dynamicProperties) {
     this.elem = elem;
     this.frameId = -1;
-    this.dataProps = _cv(data.length);
+    this.dataProps = createSizedArray(data.length);
     this.renderer = renderer;
-    this.mdf = false;
+    this._mdf = false;
     this.k = false;
     this.dashStr = '';
-    this.dashArray = _cs('float32',  data.length - 1);
-    this.dashoffset = _cs('float32',  1);
+    this.dashArray = createTypedArray('float32',  data.length - 1);
+    this.dashoffset = createTypedArray('float32',  1);
     var i, len = data.length, prop;
     for(i=0;i<len;i+=1){
-        prop = _ai._bo(elem,data[i].v,0, 0, _co);
+        prop = PropertyFactory.getProp(elem,data[i].v,0, 0, dynamicProperties);
         this.k = prop.k ? true : this.k;
         this.dataProps[i] = {n:data[i].n,p:prop};
     }
     if(this.k){
-        _co.push(this);
+        dynamicProperties.push(this);
     }else{
         this.getValue(true);
     }
 }
 
 DashProperty.prototype.getValue = function(forceRender) {
-    if(this.elem._x.frameId === this.frameId && !forceRender){
+    if(this.elem.globalData.frameId === this.frameId && !forceRender){
         return;
     }
     var i = 0, len = this.dataProps.length;
-    this.mdf = false;
-    this.frameId = this.elem._x.frameId;
+    this._mdf = false;
+    this.frameId = this.elem.globalData.frameId;
     while(i<len){
-        if(this.dataProps[i].p.mdf){
-            this.mdf = !forceRender;
+        if(this.dataProps[i].p._mdf){
+            this._mdf = !forceRender;
             break;
         }
         i+=1;
     }
-    if(this.mdf || forceRender){
+    if(this._mdf || forceRender){
         if(this.renderer === 'svg') {
             this.dashStr = '';
         }
@@ -3980,16 +3943,16 @@
             }
         }
     }
-}
+};
 function GradientProperty(elem,data,arr){
-    this.prop = _ai._bo(elem,data.k,1,null,[]);
+    this.prop = PropertyFactory.getProp(elem,data.k,1,null,[]);
     this.data = data;
     this.k = this.prop.k;
-    this.c = _cs('uint8c', data.p*4);
+    this.c = createTypedArray('uint8c', data.p*4);
     var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p*4) : data.k.k.length - data.p*4;
-    this.o = _cs('float32', cLength);
-    this.cmdf = false;
-    this.omdf = false;
+    this.o = createTypedArray('float32', cLength);
+    this._cmdf = false;
+    this._omdf = false;
     this._collapsable = this.checkCollapsable();
     this._hasOpacity = cLength;
     if(this.prop.k){
@@ -4008,7 +3971,7 @@
         i += 1;
     }
     return true;
-}
+};
 
 GradientProperty.prototype.checkCollapsable = function() {
     if (this.o.length/2 !== this.c.length/4) {
@@ -4026,13 +3989,13 @@
         return false;
     }
     return true;
-}
+};
 
 GradientProperty.prototype.getValue = function(forceRender){
     this.prop.getValue();
-    this.cmdf = false;
-    this.omdf = false;
-    if(this.prop.mdf || forceRender){
+    this._cmdf = false;
+    this._omdf = false;
+    if(this.prop._mdf || forceRender){
         var i, len = this.data.p*4;
         var mult, val;
         for(i=0;i<len;i+=1){
@@ -4040,7 +4003,7 @@
             val = Math.round(this.prop.v[i]*mult);
             if(this.c[i] !== val){
                 this.c[i] = val;
-                this.cmdf = !forceRender;
+                this._cmdf = !forceRender;
             }
         }
         if(this.o.length){
@@ -4050,12 +4013,12 @@
                 val = i%2 === 0 ?  Math.round(this.prop.v[i]*100):this.prop.v[i];
                 if(this.o[i-this.data.p*4] !== val){
                     this.o[i-this.data.p*4] = val;
-                    this.omdf = !forceRender;
+                    this._omdf = !forceRender;
                 }
             }
         }
     }
-}
+};
 var ImagePreloader = (function(){
 
     function imageLoaded(){
@@ -4084,7 +4047,7 @@
     }
 
     function loadImage(path){
-        var img = _cu('img');
+        var img = createTag('img');
         img.addEventListener('load', imageLoaded.bind(this), false);
         img.addEventListener('error', imageLoaded.bind(this), false);
         img.src = path;
@@ -4124,12 +4087,12 @@
         this.totalImages = 0;
         this.loadedAssets = 0;
         this.imagesLoadedCb = null;
-    }
+    };
 }());
 var featureSupport = (function(){
 	var ob = {
 		maskType: true
-	}
+	};
 	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)) {
 	   ob.maskType = false;
 	}
@@ -4141,7 +4104,7 @@
 	ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
 
 	function createFilter(filId){
-        	var fil = _ct('filter');
+        	var fil = createNS('filter');
         	fil.setAttribute('id',filId);
                 fil.setAttribute('filterUnits','objectBoundingBox');
                 fil.setAttribute('x','0%');
@@ -4152,7 +4115,7 @@
 	}
 
 	function createAlphaToLuminanceFilter(){
-                var feColorMatrix = _ct('feColorMatrix');
+                var feColorMatrix = createNS('feColorMatrix');
                 feColorMatrix.setAttribute('type','matrix');
                 feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
                 feColorMatrix.setAttribute('values','0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
@@ -4160,37 +4123,37 @@
 	}
 
 	return ob;
-}())
-function _bl(textData, renderType, elem){
-    this.mdf = false;
-    this._ch = true;
+}());
+function TextAnimatorProperty(textData, renderType, elem){
+    this._mdf = false;
+    this._isFirstFrame = true;
 	this._hasMaskedPath = false;
 	this._frameId = -1;
-	this.__co = [];
+	this._dynamicProperties = [];
 	this._textData = textData;
 	this._renderType = renderType;
 	this._elem = elem;
-	this._animatorsData = _cv(this._textData.a.length);
-	this._pathData = {}
+	this._animatorsData = createSizedArray(this._textData.a.length);
+	this._pathData = {};
 	this._moreOptions = {
 		alignment: {}
 	};
-	this._bt = [];
+	this.renderedLetters = [];
     this.lettersChangedFlag = false;
 
 }
 
-_bl.prototype.searchProperties = function(_co){
+TextAnimatorProperty.prototype.searchProperties = function(dynamicProperties){
     var i, len = this._textData.a.length, animatorProps;
-    var _bo = _ai._bo;
+    var getProp = PropertyFactory.getProp;
     for(i=0;i<len;i+=1){
         animatorProps = this._textData.a[i];
-        this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this.__co);
+        this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this._dynamicProperties);
     }
     if(this._textData.p && 'm' in this._textData.p){
         this._pathData = {
-            f: _bo(this._elem,this._textData.p.f,0,0,this.__co),
-            l: _bo(this._elem,this._textData.p.l,0,0,this.__co),
+            f: getProp(this._elem,this._textData.p.f,0,0,this._dynamicProperties),
+            l: getProp(this._elem,this._textData.p.l,0,0,this._dynamicProperties),
             r: this._textData.p.r,
             m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
         };
@@ -4198,43 +4161,43 @@
     } else {
         this._hasMaskedPath = false;
     }
-    this._moreOptions.alignment = _bo(this._elem,this._textData.m.a,1,0,this.__co);
-    if(this.__co.length) {
-    	_co.push(this);
+    this._moreOptions.alignment = getProp(this._elem,this._textData.m.a,1,0,this._dynamicProperties);
+    if(this._dynamicProperties.length) {
+    	dynamicProperties.push(this);
     }
-}
+};
 
-_bl.prototype.getMeasures = function(documentData, lettersChangedFlag){
+TextAnimatorProperty.prototype.getMeasures = function(documentData, lettersChangedFlag){
     this.lettersChangedFlag = lettersChangedFlag;
-    if(!this.mdf && !this._ch && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m.mdf)) {
+    if(!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
         return;
     }
-    this._ch = false;
+    this._isFirstFrame = false;
     var alignment = this._moreOptions.alignment.v;
     var animators = this._animatorsData;
     var textData = this._textData;
     var matrixHelper = this.mHelper;
     var renderType = this._renderType;
-    var _bs = this._bt.length;
+    var renderedLettersCount = this.renderedLetters.length;
     var data = this.data;
     var xPos,yPos;
     var i, len;
-    var letters = documentData.l;
+    var letters = documentData.l, pathInfo, currentLength, currentPoint, segmentLength, flag, pointInd, segmentInd, prevPoint, points, segments, partialLength, totalLength, perc, tanAngle, mask;
     if(this._hasMaskedPath) {
-        var mask = this._pathData.m;
-        if(!this._pathData.n || this._pathData.mdf){
+        mask = this._pathData.m;
+        if(!this._pathData.n || this._pathData._mdf){
             var paths = mask.v;
             if(this._pathData.r){
                 paths = paths.reverse();
             }
             // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
-            var pathInfo = {
+            pathInfo = {
                 tLength: 0,
                 segments: []
             };
             len = paths._length - 1;
             var pathData;
-            var totalLength = 0;
+            totalLength = 0;
             for (i = 0; i < len; i += 1) {
                 pathData = {
                     s: paths.v[i],
@@ -4262,11 +4225,14 @@
             }
             this._pathData.pi = pathInfo;
         }
-        var pathInfo = this._pathData.pi;
+        pathInfo = this._pathData.pi;
 
-        var currentLength = this._pathData.f.v, segmentInd = 0, pointInd = 1, currentPoint, prevPoint, points;
-        var segmentLength = 0, flag = true;
-        var segments = pathInfo.segments;
+        currentLength = this._pathData.f.v;
+        segmentInd = 0;
+        pointInd = 1;
+        segmentLength = 0;
+        flag = true;
+        segments = pathInfo.segments;
         if (currentLength < 0 && mask.v.c) {
             if (pathInfo.tLength < Math.abs(currentLength)) {
                 currentLength = -Math.abs(currentLength) % pathInfo.tLength;
@@ -4288,28 +4254,20 @@
         points = segments[segmentInd].bezierData.points;
         prevPoint = points[pointInd - 1];
         currentPoint = points[pointInd];
-        var partialLength = currentPoint.partialLength;
-        var perc, tanAngle;
+        partialLength = currentPoint.partialLength;
     }
 
 
     len = letters.length;
     xPos = 0;
     yPos = 0;
-    var yOff = documentData.s*1.2*.714;
+    var yOff = documentData.finalSize * 1.2 * 0.714;
     var firstLine = true;
     var animatorProps, animatorSelector;
     var j, jLen;
     var letterValue;
 
     jLen = animators.length;
-    //Todo Confirm this is not necessary here. Text Animator Selectors should not be called without a text index. And it is later correctly called.
-    /*if (lettersChangedFlag) {
-        for (j = 0; j < jLen; j += 1) {
-            animatorSelector = animators[j].s;
-            //animatorSelector.getValue(true);
-        }
-    }*/
     var lastLetter;
 
     var mult, ind = -1, offf, xPathPos, yPathPos;
@@ -4538,7 +4496,7 @@
                 if (documentData.strokeColorAnim && animatorProps.sc.propType) {
                     for(k=0;k<3;k+=1){
                         if(mult.length) {
-                            sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult[0]
+                            sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult[0];
                         } else {
                             sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult;
                         }
@@ -4625,7 +4583,7 @@
                 currentLength -= alignment[0]*letters[i].an/200;
                 if(letters[i+1] && ind !== letters[i+1].ind){
                     currentLength += letters[i].an / 2;
-                    currentLength += documentData.tr/1000*documentData.s;
+                    currentLength += documentData.tr/1000*documentData.finalSize;
                 }
             }else{
 
@@ -4646,7 +4604,7 @@
                 matrixHelper.translate(0,-documentData.ls);
                 matrixHelper.translate(offf,0,0);
                 matrixHelper.translate(alignment[0]*letters[i].an/200,alignment[1]*yOff/100,0);
-                xPos += letters[i].l + documentData.tr/1000*documentData.s;
+                xPos += letters[i].l + documentData.tr/1000*documentData.finalSize;
             }
             if(renderType === 'html'){
                 letterM = matrixHelper.toCSS();
@@ -4658,57 +4616,57 @@
             letterO = elemOpacity;
         }
 
-        if(_bs <= i) {
+        if(renderedLettersCount <= i) {
             letterValue = new LetterProps(letterO,letterSw,letterSc,letterFc,letterM,letterP);
-            this._bt.push(letterValue);
-            _bs += 1;
+            this.renderedLetters.push(letterValue);
+            renderedLettersCount += 1;
             this.lettersChangedFlag = true;
         } else {
-            letterValue = this._bt[i];
+            letterValue = this.renderedLetters[i];
             this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
         }
     }
-}
+};
 
-_bl.prototype.getValue = function(){
-	if(this._elem._x.frameId === this._frameId){
+TextAnimatorProperty.prototype.getValue = function(){
+	if(this._elem.globalData.frameId === this._frameId){
         return;
     }
-    this._frameId = this._elem._x.frameId;
-	var i, len = this.__co.length;
-    this.mdf = false;
+    this._frameId = this._elem.globalData.frameId;
+	var i, len = this._dynamicProperties.length;
+    this._mdf = false;
 	for(i = 0; i < len; i += 1) {
-		this.__co[i].getValue();
-        this.mdf = this.__co[i].mdf || this.mdf;
+		this._dynamicProperties[i].getValue();
+        this._mdf = this._dynamicProperties[i]._mdf || this._mdf;
 	}
-}
+};
 
-_bl.prototype.mHelper = new Matrix();
-_bl.prototype.defaultPropsArray = [];
-function TextAnimatorDataProperty(elem, animatorProps, _co) {
+TextAnimatorProperty.prototype.mHelper = new Matrix();
+TextAnimatorProperty.prototype.defaultPropsArray = [];
+function TextAnimatorDataProperty(elem, animatorProps, dynamicProperties) {
 	var defaultData = {propType:false};
-	var _bo = _ai._bo;
-	var _bn = animatorProps.a;
+	var getProp = PropertyFactory.getProp;
+	var textAnimator_animatables = animatorProps.a;
 	this.a = {
-		r: _bn.r ? _bo(elem, _bn.r, 0, degToRads, _co) : defaultData,
-		rx: _bn.rx ? _bo(elem, _bn.rx, 0, degToRads, _co) : defaultData,
-		ry: _bn.ry ? _bo(elem, _bn.ry, 0, degToRads, _co) : defaultData,
-		sk: _bn.sk ? _bo(elem, _bn.sk, 0, degToRads, _co) : defaultData,
-		sa: _bn.sa ? _bo(elem, _bn.sa, 0, degToRads, _co) : defaultData,
-		s: _bn.s ? _bo(elem, _bn.s, 1, 0.01, _co) : defaultData,
-		a: _bn.a ? _bo(elem, _bn.a, 1, 0, _co) : defaultData,
-		o: _bn.o ? _bo(elem, _bn.o, 0, 0.01, _co) : defaultData,
-		p: _bn.p ? _bo(elem,_bn.p, 1, 0, _co) : defaultData,
-		sw: _bn.sw ? _bo(elem, _bn.sw, 0, 0, _co) : defaultData,
-		sc: _bn.sc ? _bo(elem, _bn.sc, 1, 0, _co) : defaultData,
-		fc: _bn.fc ? _bo(elem, _bn.fc, 1, 0, _co) : defaultData,
-		fh: _bn.fh ? _bo(elem, _bn.fh, 0, 0, _co) : defaultData,
-		fs: _bn.fs ? _bo(elem, _bn.fs, 0, 0.01, _co) : defaultData,
-		fb: _bn.fb ? _bo(elem, _bn.fb, 0, 0.01, _co) : defaultData,
-		t: _bn.t ? _bo(elem, _bn.t, 0, 0, _co) : defaultData
-	}
+		r: textAnimator_animatables.r ? getProp(elem, textAnimator_animatables.r, 0, degToRads, dynamicProperties) : defaultData,
+		rx: textAnimator_animatables.rx ? getProp(elem, textAnimator_animatables.rx, 0, degToRads, dynamicProperties) : defaultData,
+		ry: textAnimator_animatables.ry ? getProp(elem, textAnimator_animatables.ry, 0, degToRads, dynamicProperties) : defaultData,
+		sk: textAnimator_animatables.sk ? getProp(elem, textAnimator_animatables.sk, 0, degToRads, dynamicProperties) : defaultData,
+		sa: textAnimator_animatables.sa ? getProp(elem, textAnimator_animatables.sa, 0, degToRads, dynamicProperties) : defaultData,
+		s: textAnimator_animatables.s ? getProp(elem, textAnimator_animatables.s, 1, 0.01, dynamicProperties) : defaultData,
+		a: textAnimator_animatables.a ? getProp(elem, textAnimator_animatables.a, 1, 0, dynamicProperties) : defaultData,
+		o: textAnimator_animatables.o ? getProp(elem, textAnimator_animatables.o, 0, 0.01, dynamicProperties) : defaultData,
+		p: textAnimator_animatables.p ? getProp(elem,textAnimator_animatables.p, 1, 0, dynamicProperties) : defaultData,
+		sw: textAnimator_animatables.sw ? getProp(elem, textAnimator_animatables.sw, 0, 0, dynamicProperties) : defaultData,
+		sc: textAnimator_animatables.sc ? getProp(elem, textAnimator_animatables.sc, 1, 0, dynamicProperties) : defaultData,
+		fc: textAnimator_animatables.fc ? getProp(elem, textAnimator_animatables.fc, 1, 0, dynamicProperties) : defaultData,
+		fh: textAnimator_animatables.fh ? getProp(elem, textAnimator_animatables.fh, 0, 0, dynamicProperties) : defaultData,
+		fs: textAnimator_animatables.fs ? getProp(elem, textAnimator_animatables.fs, 0, 0.01, dynamicProperties) : defaultData,
+		fb: textAnimator_animatables.fb ? getProp(elem, textAnimator_animatables.fb, 0, 0.01, dynamicProperties) : defaultData,
+		t: textAnimator_animatables.t ? getProp(elem, textAnimator_animatables.t, 0, 0, dynamicProperties) : defaultData
+	};
 
-	this.s = TextSelectorProp.getTextSelectorProp(elem,animatorProps.s, _co);
+	this.s = TextSelectorProp.getTextSelectorProp(elem,animatorProps.s, dynamicProperties);
     this.s.t = animatorProps.s.t;
 }
 function LetterProps(o, sw, sc, fc, m, p){
@@ -4718,7 +4676,7 @@
     this.fc = fc;
     this.m = m;
     this.p = p;
-    this.mdf = {
+    this._mdf = {
     	o: true,
     	sw: !!sw,
     	sc: !!sc,
@@ -4729,56 +4687,58 @@
 }
 
 LetterProps.prototype.update = function(o, sw, sc, fc, m, p) {
-	this.mdf.o = false;
-	this.mdf.sw = false;
-	this.mdf.sc = false;
-	this.mdf.fc = false;
-	this.mdf.m = false;
-	this.mdf.p = false;
+	this._mdf.o = false;
+	this._mdf.sw = false;
+	this._mdf.sc = false;
+	this._mdf.fc = false;
+	this._mdf.m = false;
+	this._mdf.p = false;
 	var updated = false;
 
 	if(this.o !== o) {
 		this.o = o;
-		this.mdf.o = true;
+		this._mdf.o = true;
 		updated = true;
 	}
 	if(this.sw !== sw) {
 		this.sw = sw;
-		this.mdf.sw = true;
+		this._mdf.sw = true;
 		updated = true;
 	}
 	if(this.sc !== sc) {
 		this.sc = sc;
-		this.mdf.sc = true;
+		this._mdf.sc = true;
 		updated = true;
 	}
 	if(this.fc !== fc) {
 		this.fc = fc;
-		this.mdf.fc = true;
+		this._mdf.fc = true;
 		updated = true;
 	}
 	if(this.m !== m) {
 		this.m = m;
-		this.mdf.m = true;
+		this._mdf.m = true;
 		updated = true;
 	}
 	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])) {
 		this.p = p;
-		this.mdf.p = true;
+		this._mdf.p = true;
 		updated = true;
 	}
 	return updated;
-}
-function _ar(elem, data, _co){
+};
+function TextProperty(elem, data, dynamicProperties){
 	this._frameId = initialDefaultFrame;
 	this.pv = '';
 	this.v = '';
 	this.kf = false;
-	this._ch = true;
-	this.mdf = true;
+	this._isFirstFrame = true;
+	this._mdf = true;
 	this.data = data;
 	this.elem = elem;
 	this.keysIndex = -1;
+    this.canResize = false;
+    this.minimumFontSize = 1;
 	this.currentData = {
 		ascent: 0,
         boxWidth: [0,0],
@@ -4804,17 +4764,20 @@
         strokeColorAnim: false,
         strokeWidthAnim: false,
         yOffset: 0,
-        __complete: false
+        __complete: false,
+        finalSize:0,
+        finalText:'',
+        finalLineHeight: 0
 
-	}
+	};
 	if(this.searchProperty()) {
-		_co.push(this);
+		dynamicProperties.push(this);
 	} else {
 		this.getValue(true);
 	}
 }
 
-_ar.prototype.setCurrentData = function(data){
+TextProperty.prototype.setCurrentData = function(data){
 		var currentData = this.currentData;
         currentData.ascent = data.ascent;
         currentData.boxWidth = data.boxWidth ? data.boxWidth : currentData.boxWidth;
@@ -4840,18 +4803,21 @@
         currentData.strokeColorAnim = data.strokeColorAnim || currentData.strokeColorAnim;
         currentData.strokeWidthAnim = data.strokeWidthAnim || currentData.strokeWidthAnim;
         currentData.yOffset = data.yOffset;
+        currentData.finalSize = data.finalSize;
+        currentData.finalLineHeight = data.finalLineHeight;
+        currentData.finalText = data.finalText;
         currentData.__complete = false;
-}
+};
 
-_ar.prototype.searchProperty = function() {
+TextProperty.prototype.searchProperty = function() {
 	this.kf = this.data.d.k.length > 1;
 	return this.kf;
-}
+};
 
-_ar.prototype.getValue = function() {
-	this.mdf = false;
-	var frameId = this.elem._x.frameId;
-	if((frameId === this._frameId || !this.kf) && !this._ch) {
+TextProperty.prototype.getValue = function(_forceRender) {
+	this._mdf = false;
+	var frameId = this.elem.globalData.frameId;
+	if((frameId === this._frameId || !this.kf) && !this._isFirstFrame && !_forceRender) {
 		return;
 	}
 	var textKeys = this.data.d.k, textDocumentData;
@@ -4868,16 +4834,17 @@
             this.completeTextData(textDocumentData);
         }
         this.setCurrentData(textDocumentData);
-        this.mdf = this._ch ? false : true;
+        //TODO check this
+        this._mdf = !this._isFirstFrame;
         this.pv = this.v = this.currentData.t;
         this.keysIndex = i;
     }
 	this._frameId = frameId;
-}
+};
 
-_ar.prototype.completeTextData = function(documentData) {
+TextProperty.prototype.completeTextData = function(documentData) {
     documentData.__complete = true;
-    var _cr = this.elem._x._cr;
+    var fontManager = this.elem.globalData.fontManager;
     var data = this.data;
     var letters = [];
     var i, len;
@@ -4887,7 +4854,7 @@
     var lineWidth = 0;
     var maxLineWidth = 0;
     var j, jLen;
-    var fontData = _cr.getFontByName(documentData.f);
+    var fontData = fontManager.getFontByName(documentData.f);
     var charData, cLength = 0;
     var styles = fontData.fStyle.split(' ');
 
@@ -4912,6 +4879,7 @@
             case 'regular':
             case 'normal':
             fWeight = '400';
+            break;
             case 'light':
             case 'thin':
             fWeight = '200';
@@ -4921,40 +4889,64 @@
     documentData.fWeight = fWeight;
     documentData.fStyle = fStyle;
     len = documentData.t.length;
-    var trackingOffset = documentData.tr/1000*documentData.s;
+    documentData.finalSize = documentData.s;
+    documentData.finalText = documentData.t;
+    documentData.finalLineHeight = documentData.lh;
+    var trackingOffset = documentData.tr/1000*documentData.finalSize;
     if(documentData.sz){
+        var flag = true;
         var boxWidth = documentData.sz[0];
-        var lastSpaceIndex = -1;
-        for(i=0;i<len;i+=1){
-            newLineFlag = false;
-            if(documentData.t.charAt(i) === ' '){
-                lastSpaceIndex = i;
-            }else if(documentData.t.charCodeAt(i) === 13){
-                lineWidth = 0;
-                newLineFlag = true;
-            }
-            if(_cr.chars){
-                charData = _cr.getCharData(documentData.t.charAt(i), fontData.fStyle, fontData.fFamily);
-                cLength = newLineFlag ? 0 : charData.w*documentData.s/100;
-            }else{
-                //tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
-                cLength = _cr.measureText(documentData.t.charAt(i), documentData.f, documentData.s);
-            }
-            if(lineWidth + cLength > boxWidth && documentData.t.charAt(i) !== ' '){
-                if(lastSpaceIndex === -1){
-                    len += 1;
-                } else {
-                    i = lastSpaceIndex;
+        var boxHeight = documentData.sz[1];
+        var currentHeight, finalText;
+        while(flag) {
+            finalText = documentData.t;
+            currentHeight = 0;
+            lineWidth = 0;
+            len = documentData.t.length;
+            trackingOffset = documentData.tr/1000*documentData.finalSize;
+            var lastSpaceIndex = -1;
+            for(i=0;i<len;i+=1){
+                newLineFlag = false;
+                if(finalText.charAt(i) === ' '){
+                    lastSpaceIndex = i;
+                }else if(finalText.charCodeAt(i) === 13){
+                    lineWidth = 0;
+                    newLineFlag = true;
+                    currentHeight += documentData.finalLineHeight || documentData.finalSize*1.2;
                 }
-                documentData.t = documentData.t.substr(0,i) + "\r" + documentData.t.substr(i === lastSpaceIndex ? i + 1 : i);
-                lastSpaceIndex = -1;
-                lineWidth = 0;
-            }else {
-                lineWidth += cLength;
-                lineWidth += trackingOffset;
+                if(fontManager.chars){
+                    charData = fontManager.getCharData(finalText.charAt(i), fontData.fStyle, fontData.fFamily);
+                    cLength = newLineFlag ? 0 : charData.w*documentData.finalSize/100;
+                }else{
+                    //tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
+                    cLength = fontManager.measureText(finalText.charAt(i), documentData.f, documentData.finalSize);
+                }
+                if(lineWidth + cLength > boxWidth && finalText.charAt(i) !== ' '){
+                    if(lastSpaceIndex === -1){
+                        len += 1;
+                    } else {
+                        i = lastSpaceIndex;
+                    }
+                    currentHeight += documentData.finalLineHeight || documentData.finalSize*1.2;
+                    finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
+                    lastSpaceIndex = -1;
+                    lineWidth = 0;
+                }else {
+                    lineWidth += cLength;
+                    lineWidth += trackingOffset;
+                }
+            }
+            currentHeight += fontData.ascent*documentData.finalSize/100;
+            if(this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
+                documentData.finalSize -= 1;
+                documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
+            } else {
+                documentData.finalText = finalText;
+                len = documentData.finalText.length;
+                flag = false;
             }
         }
-        len = documentData.t.length;
+        
     }
     lineWidth = - trackingOffset;
     cLength = 0;
@@ -4962,7 +4954,7 @@
     var currentChar;
     for (i = 0;i < len ;i += 1) {
         newLineFlag = false;
-        currentChar = documentData.t.charAt(i);
+        currentChar = documentData.finalText.charAt(i);
         if(currentChar === ' '){
             val = '\u00A0';
         }else if(currentChar.charCodeAt(0) === 13){
@@ -4974,15 +4966,15 @@
             newLineFlag = true;
             currentLine += 1;
         }else{
-            val = documentData.t.charAt(i);
+            val = documentData.finalText.charAt(i);
         }
-        if(_cr.chars){
-            charData = _cr.getCharData(currentChar, fontData.fStyle, _cr.getFontByName(documentData.f).fFamily);
-            cLength = newLineFlag ? 0 : charData.w*documentData.s/100;
+        if(fontManager.chars){
+            charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
+            cLength = newLineFlag ? 0 : charData.w*documentData.finalSize/100;
         }else{
-            //var charWidth = _cr.measureText(val, documentData.f, documentData.s);
-            //tCanvasHelper.font = documentData.s + 'px '+ _cr.getFontByName(documentData.f).fFamily;
-            cLength = _cr.measureText(val, documentData.f, documentData.s);
+            //var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
+            //tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
+            cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
         }
 
         //
@@ -4995,8 +4987,8 @@
         letters.push({l:cLength,an:cLength,add:currentSize,n:newLineFlag, anIndexes:[], val: val, line: currentLine});
         if(anchorGrouping == 2){
             currentSize += cLength;
-            if(val == '' || val == '\u00A0' || i == len - 1){
-                if(val == '' || val == '\u00A0'){
+            if(val === '' || val === '\u00A0' || i === len - 1){
+                if(val === '' || val === '\u00A0'){
                     currentSize -= cLength;
                 }
                 while(currentPos<=i){
@@ -5010,8 +5002,8 @@
             }
         }else if(anchorGrouping == 3){
             currentSize += cLength;
-            if(val == '' || i == len - 1){
-                if(val == ''){
+            if(val === '' || i === len - 1){
+                if(val === ''){
                     currentSize -= cLength;
                 }
                 while(currentPos<=i){
@@ -5069,7 +5061,7 @@
         for(i=0;i<len;i+=1){
             letterData = letters[i];
             letterData.anIndexes[j] = ind;
-            if((based == 1 && letterData.val != '') || (based == 2 && letterData.val != '' && letterData.val != '\u00A0') || (based == 3 && (letterData.n || letterData.val == '\u00A0' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))){
+            if((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== '\u00A0') || (based == 3 && (letterData.n || letterData.val == '\u00A0' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))){
                 if(animatorData.s.rn === 1){
                     indexes.push(ind);
                 }
@@ -5089,33 +5081,48 @@
             }
         }
     }
-    documentData.yOffset = documentData.lh || documentData.s*1.2;
+    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize*1.2;
     documentData.ls = documentData.ls || 0;
-    documentData.ascent = fontData.ascent*documentData.s/100;
-}
+    documentData.ascent = fontData.ascent*documentData.finalSize/100;
+};
 
-_ar.prototype.updateDocumentData = function(newData, index) {
+TextProperty.prototype.updateDocumentData = function(newData, index) {
 	index = index === undefined ? this.keysIndex : index;
     var dData = this.data.d.k[index].s;
+    for(var s in newData) {
+        dData[s] = newData[s];
+    }
+    this.recalculate(index);
+};
+
+TextProperty.prototype.recalculate = function(index) {
+    var dData = this.data.d.k[index].s;
     dData.__complete = false;
-    dData.t = newData.t;
     this.keysIndex = -1;
-    this._ch = true;
-    this.getValue();
+    this.getValue(true);
 }
 
+TextProperty.prototype.canResizeFont = function(_canResize) {
+    this.canResize = _canResize;
+    this.recalculate(this.keysIndex);
+};
+
+TextProperty.prototype.setMinimumFontSize = function(_fontValue) {
+    this.minimumFontSize = Math.floor(_fontValue) || 1;
+    this.recalculate(this.keysIndex);
+};
 var TextSelectorProp = (function(){
     var max = Math.max;
     var min = Math.min;
     var floor = Math.floor;
     function updateRange(newCharsFlag){
-        this.mdf = newCharsFlag || false;
-        if(this._co.length){
-            var i, len = this._co.length;
+        this._mdf = newCharsFlag || false;
+        if(this.dynamicProperties.length){
+            var i, len = this.dynamicProperties.length;
             for(i=0;i<len;i+=1){
-                this._co[i].getValue();
-                if(this._co[i].mdf){
-                    this.mdf = true;
+                this.dynamicProperties[i].getValue();
+                if(this.dynamicProperties[i]._mdf){
+                    this._mdf = true;
                 }
             }
         }
@@ -5163,7 +5170,7 @@
                 mult = 0;
             }else{
                 mult = max(0,min(0.5/(e-s) + (ind-s)/(e-s),1));
-                if(mult<.5){
+                if(mult<0.5){
                     mult *= 2;
                 }else{
                     mult = 1 - 2*(mult-0.5);
@@ -5209,27 +5216,27 @@
     }
 
     function TextSelectorProp(elem,data, arr){
-        this.mdf = false;
+        this._mdf = false;
         this.k = false;
         this.data = data;
-        this._co = [];
+        this.dynamicProperties = [];
         this.getValue = updateRange;
         this.getMult = getMult;
         this.elem = elem;
         this.comp = elem.comp;
         this.finalS = 0;
         this.finalE = 0;
-        this.s = _ai._bo(elem,data.s || {k:0},0,0,this._co);
+        this.s = PropertyFactory.getProp(elem,data.s || {k:0},0,0,this.dynamicProperties);
         if('e' in data){
-            this.e = _ai._bo(elem,data.e,0,0,this._co);
+            this.e = PropertyFactory.getProp(elem,data.e,0,0,this.dynamicProperties);
         }else{
             this.e = {v:100};
         }
-        this.o = _ai._bo(elem,data.o || {k:0},0,0,this._co);
-        this.xe = _ai._bo(elem,data.xe || {k:0},0,0,this._co);
-        this.ne = _ai._bo(elem,data.ne || {k:0},0,0,this._co);
-        this.a = _ai._bo(elem,data.a,0,0.01,this._co);
-        if(this._co.length){
+        this.o = PropertyFactory.getProp(elem,data.o || {k:0},0,0,this.dynamicProperties);
+        this.xe = PropertyFactory.getProp(elem,data.xe || {k:0},0,0,this.dynamicProperties);
+        this.ne = PropertyFactory.getProp(elem,data.ne || {k:0},0,0,this.dynamicProperties);
+        this.a = PropertyFactory.getProp(elem,data.a,0,0.01,this.dynamicProperties);
+        if(this.dynamicProperties.length){
             arr.push(this);
         }else{
             this.getValue();
@@ -5238,11 +5245,11 @@
 
     function getTextSelectorProp(elem, data,arr) {
         return new TextSelectorProp(elem, data, arr);
-    };
+    }
 
     return {
         getTextSelectorProp: getTextSelectorProp
-    }
+    };
 }());
 
     
@@ -5251,12 +5258,12 @@
 
 		var _length = 0;
 		var _maxLength = initialLength;
-		var pool = _cv(_maxLength);
+		var pool = createSizedArray(_maxLength);
 
 		var ob = {
 			newElement: newElement,
 			release: release
-		}
+		};
 
 		function newElement(){
 			var element;
@@ -5282,36 +5289,35 @@
 		}
 
 		function clone() {
-			console.log(arguments)
 			var clonedElement = newElement();
 			return _clone(clonedElement);
 		}
 
 		return ob;
-	}
+	};
 }());
 
 var pooling = (function(){
 
 	function double(arr){
-		return arr.concat(_cv(arr.length));
+		return arr.concat(createSizedArray(arr.length));
 	}
 
 	return {
 		double: double
-	}
+	};
 }());
 var point_pool = (function(){
 
 	function create() {
-		return _cs('float32', 2);
+		return createTypedArray('float32', 2);
 	}
 	return pool_factory(8, create);
 }());
 var shape_pool = (function(){
 
 	function create() {
-		return new _av();
+		return new ShapePath();
 	}
 
 	function release(shapePath) {
@@ -5336,9 +5342,9 @@
 		var pt;
 		
 		for(i = 0; i < len; i += 1) {
-			cloned._aw(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);
+			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);
 		}
-		return cloned
+		return cloned;
 	}
 
 	var factory = pool_factory(4, create, release);
@@ -5348,21 +5354,21 @@
 }());
 var shapeCollection_pool = (function(){
 	var ob = {
-		_al: _al,
+		newShapeCollection: newShapeCollection,
 		release: release
-	}
+	};
 
 	var _length = 0;
 	var _maxLength = 4;
-	var pool = _cv(_maxLength);
+	var pool = createSizedArray(_maxLength);
 
-	function _al(){
+	function newShapeCollection(){
 		var shapeCollection;
 		if(_length){
 			_length -= 1;
 			shapeCollection = pool[_length];
 		} else {
-			shapeCollection = new _am();
+			shapeCollection = new ShapeCollection();
 		}
 		return shapeCollection;
 	}
@@ -5408,30 +5414,30 @@
 	function create() {
 		return {
             addedLength: 0,
-            percents: _cs('float32', defaultCurveSegments),
-            lengths: _cs('float32', defaultCurveSegments),
+            percents: createTypedArray('float32', defaultCurveSegments),
+            lengths: createTypedArray('float32', defaultCurveSegments),
         };
 	}
 	return pool_factory(8, create);
 }());
-function _l(){}
-_l.prototype.checkLayers = function(num){
+function BaseRenderer(){}
+BaseRenderer.prototype.checkLayers = function(num){
     var i, len = this.layers.length, data;
-    this._db = true;
+    this.completeLayers = true;
     for (i = len - 1; i >= 0; i--) {
-        if (!this._br[i]) {
+        if (!this.elements[i]) {
             data = this.layers[i];
             if(data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st))
             {
                 this.buildItem(i);
             }
         }
-        this._db = this._br[i] ? this._db:false;
+        this.completeLayers = this.elements[i] ? this.completeLayers:false;
     }
     this.checkPendingElements();
 };
 
-_l.prototype.createItem = function(layer){
+BaseRenderer.prototype.createItem = function(layer){
     switch(layer.ty){
         case 2:
             return this.createImage(layer);
@@ -5447,17 +5453,15 @@
             return this.createText(layer);
         case 13:
             return this.createCamera(layer);
-        case 99:
-            return null;
     }
-    return this.createBase(layer);
+    return this.createNull(layer);
 };
 
-_l.prototype.createCamera = function(){
+BaseRenderer.prototype.createCamera = function(){
     throw new Error('You\'re using a 3d camera. Try the html renderer.');
-}
+};
 
-_l.prototype.buildAllItems = function(){
+BaseRenderer.prototype.buildAllItems = function(){
     var i, len = this.layers.length;
     for(i=0;i<len;i+=1){
         this.buildItem(i);
@@ -5465,8 +5469,8 @@
     this.checkPendingElements();
 };
 
-_l.prototype.includeLayers = function(newLayers){
-    this._db = false;
+BaseRenderer.prototype.includeLayers = function(newLayers){
+    this.completeLayers = false;
     var i, len = newLayers.length;
     var j, jLen = this.layers.length;
     for(i=0;i<len;i+=1){
@@ -5481,51 +5485,63 @@
     }
 };
 
-_l.prototype.setProjectInterface = function(pInterface){
-    this._x.projectInterface = pInterface;
+BaseRenderer.prototype.setProjectInterface = function(pInterface){
+    this.globalData.projectInterface = pInterface;
 };
 
-_l.prototype.initItems = function(){
-    if(!this._x.progressiveLoad){
+BaseRenderer.prototype.initItems = function(){
+    if(!this.globalData.progressiveLoad){
         this.buildAllItems();
     }
 };
-_l.prototype.buildElementParenting = function(element, parentName, _dd) {
-    var _br = this._br;
+BaseRenderer.prototype.buildElementParenting = function(element, parentName, hierarchy) {
+    var elements = this.elements;
     var layers = this.layers;
     var i=0, len = layers.length;
     while (i < len) {
         if (layers[i].ind == parentName) {
-            if (!_br[i] || _br[i] === true) {
+            if (!elements[i] || elements[i] === true) {
                 this.buildItem(i);
                 this.addPendingElement(element);
-            } else if(layers[i].parent !== undefined) {
-                _dd.push(_br[i]);
-                _br[i]._isParent = true;
-                this.buildElementParenting(element, layers[i].parent, _dd);
             } else {
-                _dd.push(_br[i]);
-                _br[i]._isParent = true;
-                element.setHierarchy(_dd);
+                hierarchy.push(elements[i]);
+                elements[i].setAsParent();
+                if(layers[i].parent !== undefined) {
+                    this.buildElementParenting(element, layers[i].parent, hierarchy);
+                } else {
+                    element.setHierarchy(hierarchy);
+                }
             }
         }
         i += 1;
     }
 };
 
-_l.prototype.addPendingElement = function(element){
-    this._dc.push(element);
+BaseRenderer.prototype.addPendingElement = function(element){
+    this.pendingElements.push(element);
 };
-function _ao(_cq, config){
-    this._cq = _cq;
+
+BaseRenderer.prototype.searchExtraCompositions = function(assets){
+    var i, len = assets.length;
+    for(i=0;i<len;i+=1){
+        if(assets[i].xt){
+            var comp = this.createComp(assets[i]);
+            comp.initExpressions();
+            this.globalData.projectInterface.registerComposition(comp);
+        }
+    }
+};
+
+function SVGRenderer(animationItem, config){
+    this.animationItem = animationItem;
     this.layers = null;
     this.renderedFrame = -1;
-    this._cf = _ct('svg');
-    var maskElement = _ct('g');
-    this._cf.appendChild(maskElement);
-    this._bx = maskElement;
-    var defs = _ct( 'defs');
-    this._cf.appendChild(defs);
+    this.svgElement = createNS('svg');
+    var maskElement = createNS('g');
+    this.svgElement.appendChild(maskElement);
+    this.layerElement = maskElement;
+    var defs = createNS( 'defs');
+    this.svgElement.appendChild(defs);
     this.renderConfig = {
         preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
         progressiveLoad: (config && config.progressiveLoad) || false,
@@ -5534,88 +5550,84 @@
         viewBoxSize: (config && config.viewBoxSize) || false,
         className: (config && config.className) || ''
     };
-    this._x = {
-        mdf: false,
+    this.globalData = {
+        _mdf: false,
         frameNum: -1,
         defs: defs,
         frameId: 0,
-        _de: {w:0,h:0},
+        compSize: {w:0,h:0},
         renderConfig: this.renderConfig,
-        _cr: new FontManager()
+        fontManager: new FontManager()
     };
-    this._br = [];
-    this._dc = [];
+    this.elements = [];
+    this.pendingElements = [];
     this.destroyed = false;
 
 }
 
-extendPrototype([_l],_ao);
+extendPrototype([BaseRenderer],SVGRenderer);
 
-_ao.prototype.createBase = function (data) {
-    return new _d(data,this._x,this);
+SVGRenderer.prototype.createNull = function (data) {
+    return new NullElement(data,this.globalData,this);
 };
 
-_ao.prototype.createNull = function (data) {
-    return new _i(data,this._x,this);
+SVGRenderer.prototype.createShape = function (data) {
+    return new SVGShapeElement(data,this.globalData,this);
 };
 
-_ao.prototype.createShape = function (data) {
-    return new SVGShapeElement(data,this._x,this);
-};
-
-_ao.prototype.createText = function (data) {
-    return new _cw(data,this._x,this);
+SVGRenderer.prototype.createText = function (data) {
+    return new SVGTextElement(data,this.globalData,this);
 
 };
 
-_ao.prototype.createImage = function (data) {
-    return new _h(data,this._x,this);
+SVGRenderer.prototype.createImage = function (data) {
+    return new IImageElement(data,this.globalData,this);
 };
 
-_ao.prototype.createComp = function (data) {
-    return new SVGCompElement(data,this._x,this);
+SVGRenderer.prototype.createComp = function (data) {
+    return new SVGCompElement(data,this.globalData,this);
 
 };
 
-_ao.prototype.createSolid = function (data) {
-    return new _j(data,this._x,this);
+SVGRenderer.prototype.createSolid = function (data) {
+    return new ISolidElement(data,this.globalData,this);
 };
 
-_ao.prototype.configAnimation = function(animData){
-    this._cf.setAttribute('xmlns','http://www.w3.org/2000/svg');
+SVGRenderer.prototype.configAnimation = function(animData){
+    this.svgElement.setAttribute('xmlns','http://www.w3.org/2000/svg');
     if(this.renderConfig.viewBoxSize) {
-        this._cf.setAttribute('viewBox',this.renderConfig.viewBoxSize);
+        this.svgElement.setAttribute('viewBox',this.renderConfig.viewBoxSize);
     } else {
-        this._cf.setAttribute('viewBox','0 0 '+animData.w+' '+animData.h);
+        this.svgElement.setAttribute('viewBox','0 0 '+animData.w+' '+animData.h);
     }
 
     if(!this.renderConfig.viewBoxOnly) {
-        this._cf.setAttribute('width',animData.w);
-        this._cf.setAttribute('height',animData.h);
-        this._cf.style.width = '100%';
-        this._cf.style.height = '100%';
+        this.svgElement.setAttribute('width',animData.w);
+        this.svgElement.setAttribute('height',animData.h);
+        this.svgElement.style.width = '100%';
+        this.svgElement.style.height = '100%';
     }
     if(this.renderConfig.className) {
-        this._cf.setAttribute('class', this.renderConfig.className);
+        this.svgElement.setAttribute('class', this.renderConfig.className);
     }
-    this._cf.setAttribute('preserveAspectRatio',this.renderConfig.preserveAspectRatio);
-    //this._bx.style.transform = 'translate3d(0,0,0)';
-    //this._bx.style.transformOrigin = this._bx.style.mozTransformOrigin = this._bx.style.webkitTransformOrigin = this._bx.style['-webkit-transform'] = "0px 0px 0px";
-    this._cq.wrapper.appendChild(this._cf);
+    this.svgElement.setAttribute('preserveAspectRatio',this.renderConfig.preserveAspectRatio);
+    //this.layerElement.style.transform = 'translate3d(0,0,0)';
+    //this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
+    this.animationItem.wrapper.appendChild(this.svgElement);
     //Mask animation
-    var defs = this._x.defs;
+    var defs = this.globalData.defs;
 
-    this._x.getAssetData = this._cq.getAssetData.bind(this._cq);
-    this._x.getAssetsPath = this._cq.getAssetsPath.bind(this._cq);
-    this._x.progressiveLoad = this.renderConfig.progressiveLoad;
-    this._x.nm = animData.nm;
-    this._x._de.w = animData.w;
-    this._x._de.h = animData.h;
-    this._x.frameRate = animData.fr;
+    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
+    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
+    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
+    this.globalData.nm = animData.nm;
+    this.globalData.compSize.w = animData.w;
+    this.globalData.compSize.h = animData.h;
+    this.globalData.frameRate = animData.fr;
     this.data = animData;
 
-    var maskElement = _ct( 'clipPath');
-    var rect = _ct('rect');
+    var maskElement = createNS( 'clipPath');
+    var rect = createNS('rect');
     rect.setAttribute('width',animData.w);
     rect.setAttribute('height',animData.h);
     rect.setAttribute('x',0);
@@ -5623,69 +5635,69 @@
     var maskId = 'animationMask_'+randomString(10);
     maskElement.setAttribute('id', maskId);
     maskElement.appendChild(rect);
-    this._bx.setAttribute("clip-path", "url(" + locationHref + "#"+maskId+")");
+    this.layerElement.setAttribute("clip-path", "url(" + locationHref + "#"+maskId+")");
 
     defs.appendChild(maskElement);
     this.layers = animData.layers;
-    this._x._cr.addChars(animData.chars);
-    this._x._cr.addFonts(animData.fonts,defs);
-    this._br = _cv(animData.layers.length);
+    this.globalData.fontManager.addChars(animData.chars);
+    this.globalData.fontManager.addFonts(animData.fonts,defs);
+    this.elements = createSizedArray(animData.layers.length);
 };
 
 
-_ao.prototype.destroy = function () {
-    this._cq.wrapper.innerHTML = '';
-    this._bx = null;
-    this._x.defs = null;
+SVGRenderer.prototype.destroy = function () {
+    this.animationItem.wrapper.innerHTML = '';
+    this.layerElement = null;
+    this.globalData.defs = null;
     var i, len = this.layers ? this.layers.length : 0;
     for (i = 0; i < len; i++) {
-        if(this._br[i]){
-            this._br[i].destroy();
+        if(this.elements[i]){
+            this.elements[i].destroy();
         }
     }
-    this._br.length = 0;
+    this.elements.length = 0;
     this.destroyed = true;
-    this._cq = null;
+    this.animationItem = null;
 };
 
-_ao.prototype.updateContainerSize = function () {
+SVGRenderer.prototype.updateContainerSize = function () {
 };
 
-_ao.prototype.buildItem  = function(pos){
-    var _br = this._br;
-    if(_br[pos] || this.layers[pos].ty == 99){
+SVGRenderer.prototype.buildItem  = function(pos){
+    var elements = this.elements;
+    if(elements[pos] || this.layers[pos].ty == 99){
         return;
     }
-    _br[pos] = true;
+    elements[pos] = true;
     var element = this.createItem(this.layers[pos]);
 
-    _br[pos] = element;
+    elements[pos] = element;
     if(expressionsPlugin){
         if(this.layers[pos].ty === 0){
-            this._x.projectInterface.registerComposition(element);
+            this.globalData.projectInterface.registerComposition(element);
         }
         element.initExpressions();
     }
     this.appendElementInPos(element,pos);
     if(this.layers[pos].tt){
-        if(!this._br[pos - 1] || this._br[pos - 1] === true){
+        if(!this.elements[pos - 1] || this.elements[pos - 1] === true){
             this.buildItem(pos - 1);
             this.addPendingElement(element);
         } else {
-            element.setMatte(_br[pos - 1].layerId);
+            element.setMatte(elements[pos - 1].layerId);
         }
     }
 };
 
-_ao.prototype.checkPendingElements  = function(){
-    while(this._dc.length){
-        var element = this._dc.pop();
+SVGRenderer.prototype.checkPendingElements  = function(){
+    while(this.pendingElements.length){
+        var element = this.pendingElements.pop();
         element.checkParenting();
         if(element.data.tt){
-            var i = 0, len = this._br.length;
+            var i = 0, len = this.elements.length;
             while(i<len){
-                if(this._br[i] === element){
-                    element.setMatte(this._br[i - 1].layerId);
+                if(this.elements[i] === element){
+                    element.setMatte(this.elements[i - 1].layerId);
                     break;
                 }
                 i += 1;
@@ -5694,7 +5706,7 @@
     }
 };
 
-_ao.prototype._ba = function(num){
+SVGRenderer.prototype.renderFrame = function(num){
     if(this.renderedFrame === num || this.destroyed){
         return;
     }
@@ -5704,82 +5716,69 @@
         this.renderedFrame = num;
     }
     //clearPoints();
-    /*console.log('-------');
-    console.log('FRAME ',num);*/
-    this._x.frameNum = num;
-    this._x.frameId += 1;
-    this._x.projectInterface.currentFrame = num;
+    // console.log('-------');
+    // console.log('FRAME ',num);
+    this.globalData.frameNum = num;
+    this.globalData.frameId += 1;
+    this.globalData.projectInterface.currentFrame = num;
+    this.globalData._mdf = false;
     var i, len = this.layers.length;
-    if(!this._db){
+    if(!this.completeLayers){
         this.checkLayers(num);
     }
     for (i = len - 1; i >= 0; i--) {
-        if(this._db || this._br[i]){
-            this._br[i]._az(num - this.layers[i].st);
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].prepareFrame(num - this.layers[i].st);
         }
     }
-    for (i = 0; i < len; i += 1) {
-        if(this._db || this._br[i]){
-            this._br[i]._ba();
+    if(this.globalData._mdf) {
+        for (i = 0; i < len; i += 1) {
+            if(this.completeLayers || this.elements[i]){
+                this.elements[i].renderFrame();
+            }
         }
     }
 };
 
-_ao.prototype.appendElementInPos = function(element, pos){
-    var newElement = element.get_e();
+SVGRenderer.prototype.appendElementInPos = function(element, pos){
+    var newElement = element.getBaseElement();
     if(!newElement){
         return;
     }
     var i = 0;
     var nextElement;
     while(i<pos){
-        if(this._br[i] && this._br[i]!== true && this._br[i].get_e()){
-            nextElement = this._br[i].get_e();
+        if(this.elements[i] && this.elements[i]!== true && this.elements[i].getBaseElement()){
+            nextElement = this.elements[i].getBaseElement();
         }
         i += 1;
     }
     if(nextElement){
-        this._bx.insertBefore(newElement, nextElement);
+        this.layerElement.insertBefore(newElement, nextElement);
     } else {
-        this._bx.appendChild(newElement);
+        this.layerElement.appendChild(newElement);
     }
 };
 
-_ao.prototype.hide = function(){
-    this._bx.style.display = 'none';
+SVGRenderer.prototype.hide = function(){
+    this.layerElement.style.display = 'none';
 };
 
-_ao.prototype.show = function(){
-    this._bx.style.display = 'block';
+SVGRenderer.prototype.show = function(){
+    this.layerElement.style.display = 'block';
 };
 
-_ao.prototype.searchExtraCompositions = function(assets){
-    var i, len = assets.length;
-    var floatingContainer = _ct('g');
-    for(i=0;i<len;i+=1){
-        if(assets[i].xt){
-            var comp = this.createComp(assets[i],floatingContainer,this._x.comp,null);
-            comp.initExpressions();
-            //comp.compInterface = CompExpressionInterface(comp);
-            //Expressions.addLayersInterface(comp._br, this._x.projectInterface);
-            this._x.projectInterface.registerComposition(comp);
-        }
-    }
-};
-
-function _ay(data,element,_x) {
-    //TODO: check if dynamic properties array can be used from element
-    this._co = [];
+function MaskElement(data,element,globalData, dynamicProperties) {
     this.data = data;
     this.element = element;
-    this._x = _x;
+    this.globalData = globalData;
     this.storedData = [];
     this.masksProperties = this.data.masksProperties || [];
     this.maskElement = null;
-    this._ch = true;
-    var defs = this._x.defs;
+    this._isFirstFrame = true;
+    var defs = this.globalData.defs;
     var i, len = this.masksProperties ? this.masksProperties.length : 0;
-    this.viewData = _cv(len);
+    this.viewData = createSizedArray(len);
     this.solidPath = '';
 
 
@@ -5797,8 +5796,8 @@
             maskRef = 'mask';
         }
 
-        if((properties[i].mode == 's' || properties[i].mode == 'i') && count == 0){
-            rect = _ct( 'rect');
+        if((properties[i].mode == 's' || properties[i].mode == 'i') && count === 0){
+            rect = createNS( 'rect');
             rect.setAttribute('fill', '#ffffff');
             rect.setAttribute('width', this.element.comp.data.w);
             rect.setAttribute('height', this.element.comp.data.h);
@@ -5807,12 +5806,12 @@
             rect = null;
         }
 
-        path = _ct( 'path');
+        path = createNS( 'path');
         if(properties[i].mode == 'n') {
             // TODO move this to a factory or to a constructor
             this.viewData[i] = {
-                op: _ai._bo(this.element,properties[i].o,0,0.01,this._co),
-                prop: _ah._bp(this.element,properties[i],3,this._co,null),
+                op: PropertyFactory.getProp(this.element,properties[i].o,0,0.01,dynamicProperties),
+                prop: ShapePropertyFactory.getShapeProp(this.element,properties[i],3,dynamicProperties,null),
                 elem: path
             };
             defs.appendChild(path);
@@ -5822,15 +5821,16 @@
 
         path.setAttribute('fill', properties[i].mode === 's' ? '#000000':'#ffffff');
         path.setAttribute('clip-rule','nonzero');
+        var filterID;
 
         if (properties[i].x.k !== 0) {
             maskType = 'mask';
             maskRef = 'mask';
-            x = _ai._bo(this.element,properties[i].x,0,null,this._co);
-            var filterID = 'fi_'+randomString(10);
-            expansor = _ct('filter');
+            x = PropertyFactory.getProp(this.element,properties[i].x,0,null,dynamicProperties);
+            filterID = 'fi_'+randomString(10);
+            expansor = createNS('filter');
             expansor.setAttribute('id',filterID);
-            feMorph = _ct('feMorphology');
+            feMorph = createNS('feMorphology');
             feMorph.setAttribute('operator','dilate');
             feMorph.setAttribute('in','SourceGraphic');
             feMorph.setAttribute('radius','0');
@@ -5854,11 +5854,11 @@
         };
         if(properties[i].mode == 'i'){
             jLen = currentMasks.length;
-            var g = _ct('g');
+            var g = createNS('g');
             for(j=0;j<jLen;j+=1){
                 g.appendChild(currentMasks[j]);
             }
-            var mask = _ct('mask');
+            var mask = createNS('mask');
             mask.setAttribute('mask-type','alpha');
             mask.setAttribute('id',layerId+'_'+count);
             mask.appendChild(path);
@@ -5877,19 +5877,16 @@
         this.viewData[i] = {
             elem: path,
             lastPath: '',
-            op: _ai._bo(this.element,properties[i].o,0,0.01,this._co),
-            prop:_ah._bp(this.element,properties[i],3,this._co,null)
+            op: PropertyFactory.getProp(this.element,properties[i].o,0,0.01,dynamicProperties),
+            prop:ShapePropertyFactory.getShapeProp(this.element,properties[i],3,dynamicProperties,null),
+            invRect: rect
         };
-        if(rect){
-            //TODO: move the invRect property to the object definition in order to prevent a new hidden class creation.
-            this.viewData[i].invRect = rect;
-        }
         if(!this.viewData[i].prop.k){
             this.drawPath(properties[i],this.viewData[i].prop.v,this.viewData[i]);
         }
     }
 
-    this.maskElement = _ct( maskType);
+    this.maskElement = createNS( maskType);
 
     len = currentMasks.length;
     for(i=0;i<len;i+=1){
@@ -5898,39 +5895,31 @@
 
     if(count > 0){
         this.maskElement.setAttribute('id', layerId);
-        this.element._ca.setAttribute(maskRef, "url(" + locationHref + "#" + layerId + ")");
+        this.element.maskedElement.setAttribute(maskRef, "url(" + locationHref + "#" + layerId + ")");
         defs.appendChild(this.maskElement);
     }
 
-};
+}
 
-_ay.prototype.getMaskProperty = function(pos){
+MaskElement.prototype.getMaskProperty = function(pos){
     return this.viewData[pos].prop;
 };
 
-_ay.prototype._az = function(){
-    var i, len = this._co.length;
-    for(i=0;i<len;i+=1){
-        this._co[i].getValue();
-
-    }
-};
-
-_ay.prototype._ba = function (finalMat) {
+MaskElement.prototype.renderFrame = function (finalMat) {
     var i, len = this.masksProperties.length;
     for (i = 0; i < len; i++) {
-        if(this.viewData[i].prop.mdf || this._ch){
+        if(this.viewData[i].prop._mdf || this._isFirstFrame){
             this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]);
         }
-        if(this.viewData[i].op.mdf || this._ch){
+        if(this.viewData[i].op._mdf || this._isFirstFrame){
             this.viewData[i].elem.setAttribute('fill-opacity',this.viewData[i].op.v);
         }
         if(this.masksProperties[i].mode !== 'n'){
-            if(this.viewData[i].invRect && (this.element.finalTransform.mProp.mdf || this._ch)){
+            if(this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || this._isFirstFrame)){
                 this.viewData[i].invRect.setAttribute('x', -finalMat.props[12]);
                 this.viewData[i].invRect.setAttribute('y', -finalMat.props[13]);
             }
-            if(this.storedData[i].x && (this.storedData[i].x.mdf || this._ch)){
+            if(this.storedData[i].x && (this.storedData[i].x._mdf || this._isFirstFrame)){
                 var feMorph = this.storedData[i].expan;
                 if(this.storedData[i].x.v < 0){
                     if(this.storedData[i].lastOperator !== 'erode'){
@@ -5949,23 +5938,23 @@
             }
         }
     }
-    this._ch = false;
+    this._isFirstFrame = false;
 };
 
-_ay.prototype.getMaskelement = function () {
+MaskElement.prototype.getMaskelement = function () {
     return this.maskElement;
 };
 
-_ay.prototype.createLayerSolidPath = function(){
+MaskElement.prototype.createLayerSolidPath = function(){
     var path = 'M0,0 ';
-    path += ' h' + this._x._de.w ;
-    path += ' v' + this._x._de.h ;
-    path += ' h-' + this._x._de.w ;
-    path += ' v-' + this._x._de.h + ' ';
+    path += ' h' + this.globalData.compSize.w ;
+    path += ' v' + this.globalData.compSize.h ;
+    path += ' h-' + this.globalData.compSize.w ;
+    path += ' v-' + this.globalData.compSize.h + ' ';
     return path;
 };
 
-_ay.prototype.drawPath = function(pathData,pathNodes,viewData){
+MaskElement.prototype.drawPath = function(pathData,pathNodes,viewData){
     var pathString = " M"+pathNodes.v[0][0]+','+pathNodes.v[0][1];
     var i, len;
     len = pathNodes._length;
@@ -5992,41 +5981,62 @@
     }
 };
 
-_ay.prototype.destroy = function(){
+MaskElement.prototype.destroy = function(){
     this.element = null;
-    this._x = null;
+    this.globalData = null;
     this.maskElement = null;
     this.data = null;
     this.masksProperties = null;
 };
-function _ad(){}
+/**
+ * @file 
+ * Handles AE's layer parenting property.
+ *
+ */
 
-_ad.prototype.initHierarchy = function() {
-    this._dd = [];
-    this._isParent = false;
-    this.checkParenting();
-}
+function HierarchyElement(){}
 
-_ad.prototype.resetHierarchy = function() {
-    this._dd.length = 0;
-};
-
-_ad.prototype.getHierarchy = function() {
-    return this._dd;
-};
-
-_ad.prototype.setHierarchy = function(_dd){
-    this._dd = _dd;
-};
-
-_ad.prototype.checkParenting = function(){
-    if (this.data.parent !== undefined){
-        this.comp.buildElementParenting(this, this.data.parent, []);
-    }
-};
-
-_ad.prototype.prepareHierarchy = function(){
-    
+HierarchyElement.prototype = {
+	/**
+     * @function 
+     * Initializes hierarchy properties
+     *
+     */
+	initHierarchy: function() {
+		//element's parent list
+	    this.hierarchy = [];
+	    //if element is parent of another layer _isParent will be true
+	    this._isParent = false;
+	    this.checkParenting();
+	},
+	/**
+     * @function 
+     * Sets layer's hierarchy.
+     * @param {array} hierarch
+     * layer's parent list
+     *
+     */ 
+	setHierarchy: function(hierarchy){
+	    this.hierarchy = hierarchy;
+	},
+	/**
+     * @function 
+     * Sets layer as parent.
+     *
+     */ 
+	setAsParent: function() {
+	    this._isParent = true;
+	},
+	/**
+     * @function 
+     * Searches layer's parenting chain
+     *
+     */ 
+	checkParenting: function(){
+	    if (this.data.parent !== undefined){
+	        this.comp.buildElementParenting(this, this.data.parent, []);
+	    }
+	}
 };
 /**
  * @file 
@@ -6035,259 +6045,251 @@
  *
  */
 
-function _ac(){}
+function FrameElement(){}
 
-/**
- * @function 
- * Initializes frame related properties.
- *
- */
-
-_ac.prototype.initFrame = function(){
-	//set to true when inpoint is rendered
-	this._ch = false;
-	//list of animated properties
-	this._co = [];
-}
-
-
-/**
- * @function 
- * Calculates all dynamic values
- *
- * @param {number} num
- * current frame number in Layer's time
- * 
- */
-_ac.prototype.prepareProperties = function(num, isVisible) {
-    var i, len = this._co.length;
-    for (i = 0;i < len; i += 1) {
-        //TODO change .type to .propType
-        if (isVisible || (this._isParent && this._co[i].propType === 'transform')) {
-            this._co[i].getValue(this._ch);
-            if (this._co[i].mdf) {
-                this._x.mdf = true;
-            }
-        }
-    }
-}
-function _af(){}
-
-_af.prototype.initTransform = function() {
-    this.finalTransform = {
-        mProp: this.data.ks ? _ag._bj(this, this.data.ks, this._co) : {o:0},
-        matMdf: false,
-        opMdf: false,
-        mat: new Matrix()
-    };
-    if (this.data.ao) {
-        this.finalTransform.mProp.autoOriented = true;
-    }
-
-    //TODO: check TYPE 11: Guided _br
-    if (this.data.ty !== 11) {
-        //this.createElements();
-    }
-}
-
-_af.prototype.renderTransform = function() {
-
-	this.finalTransform.opMdf = this.finalTransform.mProp.o.mdf || this._ch;
-    this.finalTransform.matMdf = this.finalTransform.mProp.mdf || this._ch;
-
-    if (this._dd) {
-        var mat;
-        var finalMat = this.finalTransform.mat;
-        var i = 0, len = this._dd.length;
-        //Checking if any of the transformation matrices in the _dd chain has changed.
-        if (!this.finalTransform.matMdf) {
-            while (i < len) {
-                if (this._dd[i].finalTransform.mProp.mdf) {
-                    this.finalTransform.matMdf = true;
-                    break;
+FrameElement.prototype = {
+    /**
+     * @function 
+     * Initializes frame related properties.
+     *
+     */
+    initFrame: function(){
+        //set to true when inpoint is rendered
+        this._isFirstFrame = false;
+        //list of animated properties
+        this.dynamicProperties = [];
+        // If layer has been modified in current tick this will be true
+        this._mdf = false;
+    },
+    /**
+     * @function 
+     * Calculates all dynamic values
+     *
+     * @param {number} num
+     * current frame number in Layer's time
+     * @param {boolean} isVisible
+     * if layers is currently in range
+     * 
+     */
+    prepareProperties: function(num, isVisible) {
+        var i, len = this.dynamicProperties.length;
+        for (i = 0;i < len; i += 1) {
+            if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
+                this.dynamicProperties[i].getValue();
+                if (this.dynamicProperties[i]._mdf) {
+                    this.globalData._mdf = true;
+                    this._mdf = true;
                 }
-                i += 1;
-            }
-        }
-        
-        if (this.finalTransform.matMdf) {
-            mat = this.finalTransform.mProp.v.props;
-            finalMat.cloneFromProps(mat);
-            for (i = 0; i < len; i += 1) {
-                mat = this._dd[i].finalTransform.mProp.v.props;
-                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]);
             }
         }
     }
-}
-
-_af.prototype.globalToLocal = function(pt) {
-    var transforms = [];
-    transforms.push(this.finalTransform);
-    var flag = true;
-    var comp = this.comp;
-    while (flag) {
-        if (comp.finalTransform) {
-            if (comp.data.hasMask) {
-                transforms.splice(0, 0, comp.finalTransform);
-            }
-            comp = comp.comp;
-        } else {
-            flag = false;
-        }
-    }
-    var i, len = transforms.length,ptNew;
-    for (i = 0; i < len; i += 1) {
-        ptNew = transforms[i].mat._cn(0, 0, 0);
-        //ptNew = transforms[i].mat._cn(pt[0],pt[1],pt[2]);
-        pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
-    }
-    return pt;
 };
+function TransformElement(){}
 
-_af.prototype.mHelper = new Matrix();
-function _ae(){
-
-}
-
-_ae.prototype.initRenderable = function() {
-	//layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
-	this.isInRange = false;
-	//layer's display state
-	this.hidden = false;
-    // If layer's transparency equals 0, it can be hidden
-    this.isTransparent = false;
-}
-
-_ae.prototype.prepareRenderableFrame = function(num) {
-	this.checkLayerLimits(num);
-	this.prepareMasks(num);
-    if(this.finalTransform.mProp.o.v <= 0) {
-        if(!this.isTransparent && this._x.renderConfig.hideOnTransparent){
-            this.isTransparent = true;
-            this.hide();
+TransformElement.prototype = {
+    initTransform: function() {
+        this.finalTransform = {
+            mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this.dynamicProperties) : {o:0},
+            _matMdf: false,
+            _opMdf: false,
+            mat: new Matrix()
+        };
+        if (this.data.ao) {
+            this.finalTransform.mProp.autoOriented = true;
         }
-    } else if(this.isTransparent) {
-        this.isTransparent = false;
-        this.show();
-    }
+
+        //TODO: check TYPE 11: Guided elements
+        if (this.data.ty !== 11) {
+            //this.createElements();
+        }
+    },
+    renderTransform: function() {
+
+        this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
+        this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
+
+        if (this.hierarchy) {
+            var mat;
+            var finalMat = this.finalTransform.mat;
+            var i = 0, len = this.hierarchy.length;
+            //Checking if any of the transformation matrices in the hierarchy chain has changed.
+            if (!this.finalTransform._matMdf) {
+                while (i < len) {
+                    if (this.hierarchy[i].finalTransform.mProp._mdf) {
+                        this.finalTransform._matMdf = true;
+                        break;
+                    }
+                    i += 1;
+                }
+            }
+            
+            if (this.finalTransform._matMdf) {
+                mat = this.finalTransform.mProp.v.props;
+                finalMat.cloneFromProps(mat);
+                for (i = 0; i < len; i += 1) {
+                    mat = this.hierarchy[i].finalTransform.mProp.v.props;
+                    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]);
+                }
+            }
+        }
+    },
+    globalToLocal: function(pt) {
+        var transforms = [];
+        transforms.push(this.finalTransform);
+        var flag = true;
+        var comp = this.comp;
+        while (flag) {
+            if (comp.finalTransform) {
+                if (comp.data.hasMask) {
+                    transforms.splice(0, 0, comp.finalTransform);
+                }
+                comp = comp.comp;
+            } else {
+                flag = false;
+            }
+        }
+        var i, len = transforms.length,ptNew;
+        for (i = 0; i < len; i += 1) {
+            ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
+            //ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
+            pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
+        }
+        return pt;
+    },
+    mHelper: new Matrix()
+};
+function RenderableElement(){
+
 }
 
-/**
- * @function 
- * Initializes frame related properties.
- *
- * @param {number} num
- * current frame number in Layer's time
- * 
- */
-
-_ae.prototype.checkLayerLimits = function(num) {
-	if(this.data.ip - this.data.st <= num && this.data.op - this.data.st > num)
-    {
-        if(this.isInRange !== true){
-            this._x.mdf = true;
-            this.isInRange = true;
+RenderableElement.prototype = {
+    initRenderable: function() {
+        //layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
+        this.isInRange = false;
+        //layer's display state
+        this.hidden = false;
+        // If layer's transparency equals 0, it can be hidden
+        this.isTransparent = false;
+    },
+    prepareRenderableFrame: function(num) {
+        this.checkLayerLimits(num);
+    },
+    checkTransparency: function(){
+        if(this.finalTransform.mProp.o.v <= 0) {
+            if(!this.isTransparent && this.globalData.renderConfig.hideOnTransparent){
+                this.isTransparent = true;
+                this.hide();
+            }
+        } else if(this.isTransparent) {
+            this.isTransparent = false;
             this.show();
         }
-    } else {
-        if(this.isInRange !== false){
-            this._x.mdf = true;
-            this.isInRange = false;
+    },
+    /**
+     * @function 
+     * Initializes frame related properties.
+     *
+     * @param {number} num
+     * current frame number in Layer's time
+     * 
+     */
+    checkLayerLimits: function(num) {
+        if(this.data.ip - this.data.st <= num && this.data.op - this.data.st > num)
+        {
+            if(this.isInRange !== true){
+                this.globalData._mdf = true;
+                this._mdf = true;
+                this.isInRange = true;
+                this.show();
+            }
+        } else {
+            if(this.isInRange !== false){
+                this.globalData._mdf = true;
+                this.isInRange = false;
+                this.hide();
+            }
+        }
+    },
+    renderRenderable: function() {
+        this.maskManager.renderFrame(this.finalTransform.mat);
+        this.renderableEffectsManager.renderFrame(this._isFirstFrame);
+    },
+    sourceRectAtTime: function(){
+        return {
+            top:0,
+            left:0,
+            width:100,
+            height:100
+        };
+    },
+    getLayerSize: function(){
+        if(this.data.ty === 5){
+            return {w:this.data.textData.width,h:this.data.textData.height};
+        }else{
+            return {w:this.data.width,h:this.data.height};
+        }
+    }
+};
+function RenderableDOMElement() {}
+
+(function(){
+    var _prototype = {
+        initElement: function(data,globalData,comp) {
+            this.initFrame();
+            this.initBaseData(data, globalData, comp);
+            this.initTransform(data, globalData, comp);
+            this.initHierarchy();
+            this.initRenderable();
+            this.initRendererElement();
+            this.createContainerElements();
+            this.addMasks();
+            this.createContent();
             this.hide();
+        },
+        hide: function(){
+            if (!this.hidden && (!this.isInRange || this.isTransparent)) {
+                this.layerElement.style.display = 'none';
+                this.hidden = true;
+            }
+        },
+        show: function(){
+            if (this.isInRange && !this.isTransparent){
+                if (!this.data.hd) {
+                    this.layerElement.style.display = 'block';
+                }
+                this.hidden = false;
+                this._isFirstFrame = true;
+                this.maskManager._isFirstFrame = true;
+            }
+        },
+        renderFrame: function() {
+            //If it is exported as hidden (data.hd === true) no need to render
+            //If it is not visible no need to render
+            if (this.data.hd || this.hidden) {
+                return;
+            }
+            this.renderTransform();
+            this.renderRenderable();
+            this.renderElement();
+            this.renderInnerContent();
+            if (this._isFirstFrame) {
+                this._isFirstFrame = false;
+            }
+        },
+        renderInnerContent: function() {},
+        prepareFrame: function(num) {
+            this._mdf = false;
+            this.prepareRenderableFrame(num);
+            this.prepareProperties(num, this.isInRange);
+            this.checkTransparency();
+        },
+        destroy: function(){
+            this.innerElem =  null;
+            this.destroyBaseElement();
         }
-    }
-}
-
-_ae.prototype.prepareMasks = function() {
-	if(this.isInRange) {
-        this.maskManager._az();
-	}
-}
-
-_ae.prototype.renderRenderable = function() {
-    this.maskManager._ba(this.finalTransform.mat);
-    this.effectsManager._ba(this._ch);
-}
-
-_ae.prototype.sourceRectAtTime = function(){
-    return {
-        top:0,
-        left:0,
-        width:100,
-        height:100
-    }
-};
-
-_ae.prototype.getLayerSize = function(){
-    if(this.data.ty === 5){
-        return {w:this.data.textData.width,h:this.data.textData.height};
-    }else{
-        return {w:this.data.width,h:this.data.height};
-    }
-};
-function _ci() {
-
-}
-extendPrototype([_ae], _ci);
-
-_ci.prototype._cz = function(data,_x,comp) {
-    this.initFrame();
-    this.initBaseData(data, _x, comp);
-    this.initTransform(data, _x, comp);
-    this.initHierarchy();
-    this.initRenderable();
-    this.initRendererElement();
-    this.createContainerElements();
-    this.addMasks();
-    this.createContent();
-    this.hide();
-}
-
-_ci.prototype.hide = function(){
-    if (!this.hidden && (!this.isInRange || this.isTransparent)) {
-        this._bx.style.display = 'none';
-        this.hidden = true;
-    }
-};
-
-_ci.prototype.show = function(){
-    if (this.isInRange && !this.isTransparent){
-        if (!this.data.hd) {
-            this._bx.style.display = 'block';
-        }
-        this.hidden = false;
-        this._ch = true;
-        this.maskManager._ch = true;
-    }
-};
-
-_ci.prototype._ba = function() {
-    //If it is exported as hidden (data.hd === true) no need to render
-    //If it is not visible no need to render
-    if (this.data.hd || this.hidden) {
-        return;
-    }
-    this.renderTransform();
-    this.renderRenderable();
-    this.renderElement();
-    this.renderInnerContent();
-    if (this._ch) {
-        this._ch = false;
-    }
-};
-
-_ci.prototype.renderInnerContent = function() {};
-
-_ci.prototype.destroy = function(){
-    this._cc =  null;
-    this.destroy_e();
-};
-
-_ci.prototype._az = function(num) {
-    this.prepareRenderableFrame(num);
-    this.prepareProperties(num, this.isInRange);
-};
+    };
+    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
+}());
 function ProcessedElement(element, position) {
 	this.elem = element;
 	this.pos = position;
@@ -6297,16 +6299,16 @@
 	this.type = data.ty;
 	this.d = '';
 	this.lvl = level;
-	this.mdf = false;
+	this._mdf = false;
 	this.closed = false;
-	this.pElem = _ct('path');
+	this.pElem = createNS('path');
 	this.msElem = null;
 }
 
 SVGStyleData.prototype.reset = function() {
 	this.d = '';
-	this.mdf = false;
-}
+	this._mdf = false;
+};
 function SVGShapeData(transformers, level, shape) {
     this.caches = [];
     this.styles = [];
@@ -6319,43 +6321,43 @@
 	this.transform = {
 		mProps: mProps,
 		op: op
-	}
-	this._br = []
+	};
+	this.elements = [];
 }
-function SVGStrokeStyleData(elem, data, _co, styleOb){
-	this.o = _ai._bo(elem,data.o,0,0.01,_co);
-	this.w = _ai._bo(elem,data.w,0,null,_co);
-	this.d = new DashProperty(elem,data.d||{},'svg',_co);
-	this.c = _ai._bo(elem,data.c,1,255,_co);
+function SVGStrokeStyleData(elem, data, dynamicProperties, styleOb){
+	this.o = PropertyFactory.getProp(elem,data.o,0,0.01,dynamicProperties);
+	this.w = PropertyFactory.getProp(elem,data.w,0,null,dynamicProperties);
+	this.d = new DashProperty(elem,data.d||{},'svg',dynamicProperties);
+	this.c = PropertyFactory.getProp(elem,data.c,1,255,dynamicProperties);
 	this.style = styleOb;
 }
-function SVGFillStyleData(elem, data, _co, styleOb){
-	this.o = _ai._bo(elem,data.o,0,0.01,_co);
-	this.c = _ai._bo(elem,data.c,1,255,_co);
+function SVGFillStyleData(elem, data, dynamicProperties, styleOb){
+	this.o = PropertyFactory.getProp(elem,data.o,0,0.01,dynamicProperties);
+	this.c = PropertyFactory.getProp(elem,data.c,1,255,dynamicProperties);
 	this.style = styleOb;
 }
-function _ck(elem, data, _co, styleOb){
-    this.initGradientData(elem, data, _co, styleOb);
+function SVGGradientFillStyleData(elem, data, dynamicProperties, styleOb){
+    this.initGradientData(elem, data, dynamicProperties, styleOb);
 }
 
-_ck.prototype.initGradientData = function(elem, data, _co, styleOb){
-    this.o = _ai._bo(elem,data.o,0,0.01,_co);
-    this.s = _ai._bo(elem,data.s,1,null,_co);
-    this.e = _ai._bo(elem,data.e,1,null,_co);
-    this.h = _ai._bo(elem,data.h||{k:0},0,0.01,_co);
-    this.a = _ai._bo(elem,data.a||{k:0},0,degToRads,_co);
-    this.g = new GradientProperty(elem,data.g,_co);
+SVGGradientFillStyleData.prototype.initGradientData = function(elem, data, dynamicProperties, styleOb){
+    this.o = PropertyFactory.getProp(elem,data.o,0,0.01,dynamicProperties);
+    this.s = PropertyFactory.getProp(elem,data.s,1,null,dynamicProperties);
+    this.e = PropertyFactory.getProp(elem,data.e,1,null,dynamicProperties);
+    this.h = PropertyFactory.getProp(elem,data.h||{k:0},0,0.01,dynamicProperties);
+    this.a = PropertyFactory.getProp(elem,data.a||{k:0},0,degToRads,dynamicProperties);
+    this.g = new GradientProperty(elem,data.g,dynamicProperties);
     this.style = styleOb;
     this.stops = [];
     this.setGradientData(styleOb.pElem, data);
     this.setGradientOpacity(data, styleOb);
 
-}
+};
 
-_ck.prototype.setGradientData = function(pathElement,data){
+SVGGradientFillStyleData.prototype.setGradientData = function(pathElement,data){
 
     var gradientId = 'gr_'+randomString(10);
-    var gfill = _ct(data.t === 1 ? 'linearGradient' : 'radialGradient');
+    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
     gfill.setAttribute('id',gradientId);
     gfill.setAttribute('spreadMethod','pad');
     gfill.setAttribute('gradientUnits','userSpaceOnUse');
@@ -6363,7 +6365,7 @@
     var stop, j, jLen;
     jLen = data.g.p*4;
     for(j=0;j<jLen;j+=4){
-        stop = _ct('stop');
+        stop = createNS('stop');
         gfill.appendChild(stop);
         stops.push(stop);
     }
@@ -6371,25 +6373,25 @@
     
     this.gf = gfill;
     this.cst = stops;
-}
+};
 
-_ck.prototype.setGradientOpacity = function(data, styleOb){
+SVGGradientFillStyleData.prototype.setGradientOpacity = function(data, styleOb){
     if(this.g._hasOpacity && !this.g._collapsable){
         var stop, j, jLen;
-        var mask = _ct("mask");
-        var maskElement = _ct( 'path');
+        var mask = createNS("mask");
+        var maskElement = createNS( 'path');
         mask.appendChild(maskElement);
         var opacityId = 'op_'+randomString(10);
         var maskId = 'mk_'+randomString(10);
         mask.setAttribute('id',maskId);
-        var opFill = _ct(data.t === 1 ? 'linearGradient' : 'radialGradient');
+        var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
         opFill.setAttribute('id',opacityId);
         opFill.setAttribute('spreadMethod','pad');
         opFill.setAttribute('gradientUnits','userSpaceOnUse');
         jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
         var stops = this.stops;
         for(j=data.g.p*4;j<jLen;j+=2){
-            stop = _ct('stop');
+            stop = createNS('stop');
             stop.setAttribute('stop-color','rgb(255,255,255)');
             opFill.appendChild(stop);
             stops.push(stop);
@@ -6402,23 +6404,23 @@
         styleOb.msElem = maskElement;
     }
 };
-function _cj(elem, data, _co, styleOb){
-	this.w = _ai._bo(elem,data.w,0,null,_co);
-	this.d = new DashProperty(elem,data.d||{},'svg',_co);
-    this.initGradientData(elem, data, _co, styleOb);
+function SVGGradientStrokeStyleData(elem, data, dynamicProperties, styleOb){
+	this.w = PropertyFactory.getProp(elem,data.w,0,null,dynamicProperties);
+	this.d = new DashProperty(elem,data.d||{},'svg',dynamicProperties);
+    this.initGradientData(elem, data, dynamicProperties, styleOb);
 }
 
-_cj.prototype.initGradientData = _ck.prototype.initGradientData;
-_cj.prototype.setGradientData = _ck.prototype.setGradientData;
-_cj.prototype.setGradientOpacity = _ck.prototype.setGradientOpacity;
+SVGGradientStrokeStyleData.prototype.initGradientData = SVGGradientFillStyleData.prototype.initGradientData;
+SVGGradientStrokeStyleData.prototype.setGradientData = SVGGradientFillStyleData.prototype.setGradientData;
+SVGGradientStrokeStyleData.prototype.setGradientOpacity = SVGGradientFillStyleData.prototype.setGradientOpacity;
 function ShapeGroupData() {
 	this.it = [];
     this.prevViewData = [];
-    this.gr = _ct('g');
+    this.gr = createNS('g');
 }
-function _e(){
-};
-_e.prototype.checkMasks = function(){
+function BaseElement(){
+}
+BaseElement.prototype.checkMasks = function(){
     if(!this.data.hasMask){
         return false;
     }
@@ -6430,9 +6432,9 @@
         i += 1;
     }
     return false;
-}
+};
 
-_e.prototype.initExpressions = function(){
+BaseElement.prototype.initExpressions = function(){
     this.layerInterface = LayerExpressionInterface(this);
     if(this.data.hasMask){
         this.layerInterface.registerMaskInterface(this.maskManager);
@@ -6449,9 +6451,9 @@
         this.layerInterface.textInterface = TextExpressionInterface(this);
         this.layerInterface.text = this.layerInterface.textInterface;
     }
-}
+};
 
-_e.prototype.blendModeEnums = {
+BaseElement.prototype.blendModeEnums = {
     1:'multiply',
     2:'screen',
     3:'overlay',
@@ -6467,21 +6469,21 @@
     13:'saturation',
     14:'color',
     15:'luminosity'
-}
+};
 
-_e.prototype.getBlendMode = function(){
+BaseElement.prototype.getBlendMode = function(){
     return this.blendModeEnums[this.data.bm] || '';
-}
+};
 
-_e.prototype.setBlendMode = function(){
+BaseElement.prototype.setBlendMode = function(){
     var blendModeValue = this.getBlendMode();
-    var elem = this._by || this._bx;
+    var elem = this.baseElement || this.layerElement;
 
     elem.style['mix-blend-mode'] = blendModeValue;
-}
+};
 
-_e.prototype.initBaseData = function(data, _x, comp){
-    this._x = _x;
+BaseElement.prototype.initBaseData = function(data, globalData, comp){
+    this.globalData = globalData;
     this.comp = comp;
     this.data = data;
     this.layerId = 'ly_'+randomString(10);
@@ -6491,209 +6493,206 @@
         this.data.sr = 1;
     }
     // effects manager
-    this.effects = new EffectsManager(this.data,this,this._co);
+    this.effectsManager = new EffectsManager(this.data,this,this.dynamicProperties);
     
 };
 
-_e.prototype.getType = function(){
+BaseElement.prototype.getType = function(){
     return this.type;
 };
 
-function _i(data,_x,comp){
+function NullElement(data,globalData,comp){
     this.initFrame();
-	this.initBaseData(data, _x, comp);
+	this.initBaseData(data, globalData, comp);
     this.initFrame();
-    this.initTransform(data, _x, comp);
+    this.initTransform(data, globalData, comp);
     this.initHierarchy();
 }
 
-_i.prototype._az = function(num) {
+NullElement.prototype.prepareFrame = function(num) {
     this.prepareProperties(num, true);
 };
 
-_i.prototype._ba = function() {
+NullElement.prototype.renderFrame = function() {
 };
 
-_i.prototype.get_e = function() {
+NullElement.prototype.getBaseElement = function() {
 	return null;
 };
 
-_i.prototype.destroy = function() {
+NullElement.prototype.destroy = function() {
 };
 
-_i.prototype.sourceRectAtTime = function() {
+NullElement.prototype.sourceRectAtTime = function() {
 };
 
-_i.prototype.hide = function() {
+NullElement.prototype.hide = function() {
 };
 
-extendPrototype([_e,_af,_ad,_ac], _i);
+extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement], NullElement);
 
-function _d(){
-};
-
-_d.prototype.initRendererElement = function() {
-    this._bx = _ct('g');
+function SVGBaseElement(){
 }
 
-_d.prototype.createContainerElements = function(){
-    this.matteElement = _ct('g');
-    this._bz = this._bx;
-    this._ca = this._bx;
-    this._sizeChanged = false;
-    var _bw = null;
-    //If this layer acts as a mask for the following layer
-    if (this.data.td) {
-        if (this.data.td == 3 || this.data.td == 1) {
-            var masker = _ct('mask');
-            masker.setAttribute('id', this.layerId);
-            masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha');
-            masker.appendChild(this._bx);
-            _bw = masker;
-            this._x.defs.appendChild(masker);
-            // This is only for IE and Edge when mask if of type alpha
-            if (!featureSupport.maskType && this.data.td == 1) {
-                masker.setAttribute('mask-type', 'luminance');
-                var filId = randomString(10);
-                var fil = filtersFactory.createFilter(filId);
-                this._x.defs.appendChild(fil);
-                fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-                var gg = _ct('g');
-                gg.appendChild(this._bx);
-                _bw = gg;
-                masker.appendChild(gg);
-                gg.setAttribute('filter','url(' + locationHref + '#' + filId + ')');
-            }
-        } else if(this.data.td == 2) {
-            var maskGroup = _ct('mask');
-            maskGroup.setAttribute('id', this.layerId);
-            maskGroup.setAttribute('mask-type','alpha');
-            var maskGrouper = _ct('g');
-            maskGroup.appendChild(maskGrouper);
-            var filId = randomString(10);
-            var fil = filtersFactory.createFilter(filId);
-            ////
+SVGBaseElement.prototype = {
+    initRendererElement: function() {
+        this.layerElement = createNS('g');
+    },
+    createContainerElements: function(){
+        this.matteElement = createNS('g');
+        this.transformedElement = this.layerElement;
+        this.maskedElement = this.layerElement;
+        this._sizeChanged = false;
+        var layerElementParent = null;
+        //If this layer acts as a mask for the following layer
+        var filId, fil, gg;
+        if (this.data.td) {
+            if (this.data.td == 3 || this.data.td == 1) {
+                var masker = createNS('mask');
+                masker.setAttribute('id', this.layerId);
+                masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha');
+                masker.appendChild(this.layerElement);
+                layerElementParent = masker;
+                this.globalData.defs.appendChild(masker);
+                // This is only for IE and Edge when mask if of type alpha
+                if (!featureSupport.maskType && this.data.td == 1) {
+                    masker.setAttribute('mask-type', 'luminance');
+                    filId = randomString(10);
+                    fil = filtersFactory.createFilter(filId);
+                    this.globalData.defs.appendChild(fil);
+                    fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+                    gg = createNS('g');
+                    gg.appendChild(this.layerElement);
+                    layerElementParent = gg;
+                    masker.appendChild(gg);
+                    gg.setAttribute('filter','url(' + locationHref + '#' + filId + ')');
+                }
+            } else if(this.data.td == 2) {
+                var maskGroup = createNS('mask');
+                maskGroup.setAttribute('id', this.layerId);
+                maskGroup.setAttribute('mask-type','alpha');
+                var maskGrouper = createNS('g');
+                maskGroup.appendChild(maskGrouper);
+                filId = randomString(10);
+                fil = filtersFactory.createFilter(filId);
+                ////
 
-            var feColorMatrix = _ct('feColorMatrix');
-            feColorMatrix.setAttribute('type', 'matrix');
-            feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
-            feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
-            fil.appendChild(feColorMatrix);
+                var feColorMatrix = createNS('feColorMatrix');
+                feColorMatrix.setAttribute('type', 'matrix');
+                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
+                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
+                fil.appendChild(feColorMatrix);
 
-            ////
-            /*var feCTr = _ct('feComponentTransfer');
-            feCTr.setAttribute('in','SourceGraphic');
-            fil.appendChild(feCTr);
-            var feFunc = _ct('feFuncA');
-            feFunc.setAttribute('type','table');
-            feFunc.setAttribute('tableValues','1.0 0.0');
-            feCTr.appendChild(feFunc);*/
-            this._x.defs.appendChild(fil);
-            var alphaRect = _ct('rect');
-            alphaRect.setAttribute('width',  this.comp.data.w);
-            alphaRect.setAttribute('height', this.comp.data.h);
-            alphaRect.setAttribute('x','0');
-            alphaRect.setAttribute('y','0');
-            alphaRect.setAttribute('fill','#ffffff');
-            alphaRect.setAttribute('opacity','0');
-            maskGrouper.setAttribute('filter', 'url(' + locationHref + '#'+filId+')');
-            maskGrouper.appendChild(alphaRect);
-            maskGrouper.appendChild(this._bx);
-            _bw = maskGrouper;
-            if (!featureSupport.maskType) {
-                maskGroup.setAttribute('mask-type', 'luminance');
-                fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
-                var gg = _ct('g');
+                ////
+                /*var feCTr = createNS('feComponentTransfer');
+                feCTr.setAttribute('in','SourceGraphic');
+                fil.appendChild(feCTr);
+                var feFunc = createNS('feFuncA');
+                feFunc.setAttribute('type','table');
+                feFunc.setAttribute('tableValues','1.0 0.0');
+                feCTr.appendChild(feFunc);*/
+                this.globalData.defs.appendChild(fil);
+                var alphaRect = createNS('rect');
+                alphaRect.setAttribute('width',  this.comp.data.w);
+                alphaRect.setAttribute('height', this.comp.data.h);
+                alphaRect.setAttribute('x','0');
+                alphaRect.setAttribute('y','0');
+                alphaRect.setAttribute('fill','#ffffff');
+                alphaRect.setAttribute('opacity','0');
+                maskGrouper.setAttribute('filter', 'url(' + locationHref + '#'+filId+')');
                 maskGrouper.appendChild(alphaRect);
-                gg.appendChild(this._bx);
-                _bw = gg;
-                maskGrouper.appendChild(gg);
+                maskGrouper.appendChild(this.layerElement);
+                layerElementParent = maskGrouper;
+                if (!featureSupport.maskType) {
+                    maskGroup.setAttribute('mask-type', 'luminance');
+                    fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
+                    gg = createNS('g');
+                    maskGrouper.appendChild(alphaRect);
+                    gg.appendChild(this.layerElement);
+                    layerElementParent = gg;
+                    maskGrouper.appendChild(gg);
+                }
+                this.globalData.defs.appendChild(maskGroup);
             }
-            this._x.defs.appendChild(maskGroup);
-        }
-    } else if (this.data.tt) {
-        this.matteElement.appendChild(this._bx);
-        _bw = this.matteElement;
-        this._by = this.matteElement;
-    } else {
-        this._by = this._bx;
-    }
-    if ((this.data.ln || this.data.cl) && (this.data.ty === 4 || this.data.ty === 0)) {
-        if (this.data.ln) {
-            this._bx.setAttribute('id', this.data.ln);
-        }
-        if (this.data.cl) {
-            this._bx.setAttribute('class', this.data.cl);
-        }
-    }
-    //Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
-    if (this.data.ty === 0 && !this.data.hd) {
-        var cp = _ct( 'clipPath');
-        var pt = _ct('path');
-        pt.setAttribute('d','M0,0 L' + this.data.w + ',0' + ' L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
-        var clipId = 'cp_'+randomString(8);
-        cp.setAttribute('id',clipId);
-        cp.appendChild(pt);
-        this._x.defs.appendChild(cp);
-
-        if (this.checkMasks()) {
-            var cpGroup = _ct('g');
-            cpGroup.setAttribute('clip-path','url(' + locationHref + '#'+clipId + ')');
-            cpGroup.appendChild(this._bx);
-            this._bz = cpGroup;
-            if (_bw) {
-                _bw.appendChild(this._bz);
-            } else {
-                this._by = this._bz;
-            }
+        } else if (this.data.tt) {
+            this.matteElement.appendChild(this.layerElement);
+            layerElementParent = this.matteElement;
+            this.baseElement = this.matteElement;
         } else {
-            this._bx.setAttribute('clip-path','url(' + locationHref + '#'+clipId+')');
+            this.baseElement = this.layerElement;
         }
-        
-    }
-    if (this.data.bm !== 0) {
-        this.setBlendMode();
-    }
-    this.effectsManager = new _bi(this);
+        if ((this.data.ln || this.data.cl) && (this.data.ty === 4 || this.data.ty === 0)) {
+            if (this.data.ln) {
+                this.layerElement.setAttribute('id', this.data.ln);
+            }
+            if (this.data.cl) {
+                this.layerElement.setAttribute('class', this.data.cl);
+            }
+        }
+        //Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
+        if (this.data.ty === 0 && !this.data.hd) {
+            var cp = createNS( 'clipPath');
+            var pt = createNS('path');
+            pt.setAttribute('d','M0,0 L' + this.data.w + ',0' + ' L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
+            var clipId = 'cp_'+randomString(8);
+            cp.setAttribute('id',clipId);
+            cp.appendChild(pt);
+            this.globalData.defs.appendChild(cp);
 
-};
+            if (this.checkMasks()) {
+                var cpGroup = createNS('g');
+                cpGroup.setAttribute('clip-path','url(' + locationHref + '#'+clipId + ')');
+                cpGroup.appendChild(this.layerElement);
+                this.transformedElement = cpGroup;
+                if (layerElementParent) {
+                    layerElementParent.appendChild(this.transformedElement);
+                } else {
+                    this.baseElement = this.transformedElement;
+                }
+            } else {
+                this.layerElement.setAttribute('clip-path','url(' + locationHref + '#'+clipId+')');
+            }
+            
+        }
+        if (this.data.bm !== 0) {
+            this.setBlendMode();
+        }
+        this.renderableEffectsManager = new SVGEffects(this);
 
-_d.prototype.renderElement = function() {
-    if (this.finalTransform.matMdf) {
-        this._bz.setAttribute('transform', this.finalTransform.mat.to2dCSS());
-    }
-    if (this.finalTransform.opMdf) {
-        this._bz.setAttribute('opacity', this.finalTransform.mProp.o.v);
+    },
+    renderElement: function() {
+        if (this.finalTransform._matMdf) {
+            this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
+        }
+        if (this.finalTransform._opMdf) {
+            this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
+        }
+    },
+    destroyBaseElement: function() {
+        this.layerElement = null;
+        this.matteElement = null;
+        this.maskManager.destroy();
+    },
+    getBaseElement: function() {
+        if (this.data.hd) {
+            return null;
+        }
+        return this.baseElement;
+    },
+    addMasks: function() {
+        this.maskManager = new MaskElement(this.data, this, this.globalData, this.dynamicProperties);
+    },
+    setMatte: function(id) {
+        if (!this.matteElement) {
+            return;
+        }
+        this.matteElement.setAttribute("mask", "url(" + locationHref + "#" + id + ")");
     }
 };
-
-_d.prototype.destroy_e = function() {
-    this._bx = null;
-    this.matteElement = null;
-    this.maskManager.destroy();
-};
-
-_d.prototype.get_e = function() {
-    if (this.data.hd) {
-        return null;
-    }
-    return this._by;
-};
-_d.prototype.addMasks = function() {
-    this.maskManager = new _ay(this.data, this, this._x);
-};
-
-_d.prototype.setMatte = function(id) {
-    if (!this.matteElement) {
-        return;
-    }
-    this.matteElement.setAttribute("mask", "url(" + locationHref + "#" + id + ")");
-};
-
-function _f(){
+function IShapeElement(){
 }
 
-_f.prototype = {
+IShapeElement.prototype = {
     addShapeToModifiers: function(data) {
         var i, len = this.shapeModifiers.length;
         for(i=0;i<len;i+=1){
@@ -6711,7 +6710,7 @@
 
         len = this.shapeModifiers.length;
         for(i=len-1;i>=0;i-=1){
-            this.shapeModifiers[i].processShapes(this._ch);
+            this.shapeModifiers[i].processShapes(this._isFirstFrame);
         }
     },
     lcEnum: {
@@ -6747,7 +6746,7 @@
             this.processedElements.push(new ProcessedElement(elem, pos));
         }
     },
-    _az: function(num) {
+    prepareFrame: function(num) {
         this.prepareRenderableFrame(num);
         this.prepareProperties(num, this.isInRange);
     },
@@ -6768,36 +6767,37 @@
         }
         return shapeString;
     }
-}
-function _k(){
+};
+function ITextElement(){
 }
 
-_k.prototype._cz = function(data,_x,comp){
+ITextElement.prototype.initElement = function(data,globalData,comp){
     this.lettersChangedFlag = true;
     this.initFrame();
-    this.initBaseData(data, _x, comp);
-    this.textAnimator = new _bl(data.t, this.renderType, this);
-    this.textProperty = new _ar(this, data.t, this._co);
-    this.initTransform(data, _x, comp);
+    this.initBaseData(data, globalData, comp);
+    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
+    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
+    this.initTransform(data, globalData, comp);
     this.initHierarchy();
     this.initRenderable();
     this.initRendererElement();
     this.createContainerElements();
     this.addMasks();
     this.createContent();
-    this.textAnimator.searchProperties(this._co);
+    this.textAnimator.searchProperties(this.dynamicProperties);
 };
 
-_k.prototype._az = function(num) {
+ITextElement.prototype.prepareFrame = function(num) {
+    this._mdf = false;
     this.prepareRenderableFrame(num);
     this.prepareProperties(num, this.isInRange);
-    if(this.textProperty.mdf || this.textProperty._ch) {
+    if(this.textProperty._mdf || this.textProperty._isFirstFrame) {
         this.buildNewText();
-        this.textProperty._ch = false;
+        this.textProperty._isFirstFrame = false;
     }
-}
+};
 
-_k.prototype.createPathShape = function(matrixHelper, shapes) {
+ITextElement.prototype.createPathShape = function(matrixHelper, shapes) {
     var j,jLen = shapes.length;
     var k, kLen, pathNodes;
     var shapeStr = '';
@@ -6808,11 +6808,25 @@
     return shapeStr;
 };
 
-_k.prototype.updateDocumentData = function(newData, index) {
+ITextElement.prototype.updateDocumentData = function(newData, index) {
     this.textProperty.updateDocumentData(newData, index);
-}
+    this.buildNewText();
+    this.renderInnerContent();
+};
 
-_k.prototype.applyTextPropertiesToMatrix = function(documentData, matrixHelper, lineNumber, xPos, yPos) {
+ITextElement.prototype.canResizeFont = function(_canResize) {
+    this.textProperty.canResizeFont(_canResize);
+    this.buildNewText();
+    this.renderInnerContent();
+};
+
+ITextElement.prototype.setMinimumFontSize = function(_fontSize) {
+    this.textProperty.setMinimumFontSize(_fontSize);
+    this.buildNewText();
+    this.renderInnerContent();
+};
+
+ITextElement.prototype.applyTextPropertiesToMatrix = function(documentData, matrixHelper, lineNumber, xPos, yPos) {
     if(documentData.ps){
         matrixHelper.translate(documentData.ps[0],documentData.ps[1] + documentData.ascent,0);
     }
@@ -6826,51 +6840,52 @@
             break;
     }
     matrixHelper.translate(xPos, yPos, 0);
-}
+};
 
-_k.prototype.buildColor = function(colorData) {
+ITextElement.prototype.buildColor = function(colorData) {
     return 'rgb(' + Math.round(colorData[0]*255) + ',' + Math.round(colorData[1]*255) + ',' + Math.round(colorData[2]*255) + ')';
-}
+};
 
-_k.prototype.buildShapeString = _f.prototype.buildShapeString;
+ITextElement.prototype.buildShapeString = IShapeElement.prototype.buildShapeString;
 
-_k.prototype.emptyProp = new LetterProps();
+ITextElement.prototype.emptyProp = new LetterProps();
 
-_k.prototype.destroy = function(){
+ITextElement.prototype.destroy = function(){
     
 };
-function _g(){}
+function ICompElement(){}
 
-extendPrototype([_e, _af, _ad, _ac, _ci], _g);
+extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
 
-_g.prototype._cz = function(data,_x,comp) {
+ICompElement.prototype.initElement = function(data,globalData,comp) {
     this.initFrame();
-    this.initBaseData(data, _x, comp);
-    this.initTransform(data, _x, comp);
+    this.initBaseData(data, globalData, comp);
+    this.initTransform(data, globalData, comp);
     this.initRenderable();
     this.initHierarchy();
     this.initRendererElement();
     this.createContainerElements();
     this.addMasks();
-    if(this.data.xt || !_x.progressiveLoad){
+    if(this.data.xt || !globalData.progressiveLoad){
         this.buildAllItems();
     }
     this.hide();
 };
 
-/*_g.prototype.hide = function(){
+/*ICompElement.prototype.hide = function(){
     if(!this.hidden){
         this.hideElement();
-        var i,len = this._br.length;
+        var i,len = this.elements.length;
         for( i = 0; i < len; i+=1 ){
-            if(this._br[i]){
-                this._br[i].hide();
+            if(this.elements[i]){
+                this.elements[i].hide();
             }
         }
     }
 };*/
 
-_g.prototype._az = function(num){
+ICompElement.prototype.prepareFrame = function(num){
+    this._mdf = false;
     this.prepareRenderableFrame(num);
     this.prepareProperties(num, this.isInRange);
     if(!this.isInRange && !this.data.xt){
@@ -6886,146 +6901,147 @@
     } else {
         this.renderedFrame = num/this.data.sr;
     }
-    var i,len = this._br.length;
-    if(!this._db){
+    var i,len = this.elements.length;
+    if(!this.completeLayers){
         this.checkLayers(this.renderedFrame);
     }
     for( i = 0; i < len; i+=1 ){
-        if(this._db || this._br[i]){
-            this._br[i]._az(this.renderedFrame - this.layers[i].st);
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
+            if(this.elements[i]._mdf) {
+                this._mdf = true;
+            }
         }
     }
 };
 
-_g.prototype.renderInnerContent = function() {
+ICompElement.prototype.renderInnerContent = function() {
     var i,len = this.layers.length;
     for( i = 0; i < len; i += 1 ){
-        if(this._db || this._br[i]){
-            this._br[i]._ba();
+        if(this.completeLayers || this.elements[i]){
+            this.elements[i].renderFrame();
         }
     }
 };
 
-_g.prototype.setElements = function(elems){
-    this._br = elems;
+ICompElement.prototype.setElements = function(elems){
+    this.elements = elems;
 };
 
-_g.prototype.getElements = function(){
-    return this._br;
+ICompElement.prototype.getElements = function(){
+    return this.elements;
 };
 
-_g.prototype.destroyElements = function(){
+ICompElement.prototype.destroyElements = function(){
     var i,len = this.layers.length;
     for( i = 0; i < len; i+=1 ){
-        if(this._br[i]){
-            this._br[i].destroy();
+        if(this.elements[i]){
+            this.elements[i].destroy();
         }
     }
 };
 
-_g.prototype.destroy = function(){
+ICompElement.prototype.destroy = function(){
     this.destroyElements();
-    this.destroy_e();
+    this.destroyBaseElement();
 };
 
-function _h(data,_x,comp){
-    this.assetData = _x.getAssetData(data.refId);
-    this._cz(data,_x,comp);
+function IImageElement(data,globalData,comp){
+    this.assetData = globalData.getAssetData(data.refId);
+    this.initElement(data,globalData,comp);
 }
 
-extendPrototype([_e,_af,_d,_ad,_ac,_ci], _h);
+extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], IImageElement);
 
-_h.prototype.createContent = function(){
+IImageElement.prototype.createContent = function(){
 
-    var assetPath = this._x.getAssetsPath(this.assetData);
+    var assetPath = this.globalData.getAssetsPath(this.assetData);
 
-    this._cc = _ct('image');
-    this._cc.setAttribute('width',this.assetData.w+"px");
-    this._cc.setAttribute('height',this.assetData.h+"px");
-    this._cc.setAttribute('preserveAspectRatio','xMidYMid slice');
-    this._cc.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
+    this.innerElem = createNS('image');
+    this.innerElem.setAttribute('width',this.assetData.w+"px");
+    this.innerElem.setAttribute('height',this.assetData.h+"px");
+    this.innerElem.setAttribute('preserveAspectRatio','xMidYMid slice');
+    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
     
-    //TODO check if this is needed. Doesn't look like it is
-    //this._ca = this._cc;
-    this._bx.appendChild(this._cc);
+    this.layerElement.appendChild(this.innerElem);
 };
 
-function _j(data,_x,comp){
-    this._cz(data,_x,comp);
+function ISolidElement(data,globalData,comp){
+    this.initElement(data,globalData,comp);
 }
-extendPrototype([_h], _j);
+extendPrototype([IImageElement], ISolidElement);
 
-_j.prototype.createContent = function(){
+ISolidElement.prototype.createContent = function(){
 
-    var rect = _ct('rect');
+    var rect = createNS('rect');
     ////rect.style.width = this.data.sw;
     ////rect.style.height = this.data.sh;
     ////rect.style.fill = this.data.sc;
     rect.setAttribute('width',this.data.sw);
     rect.setAttribute('height',this.data.sh);
     rect.setAttribute('fill',this.data.sc);
-    this._bx.appendChild(rect);
+    this.layerElement.appendChild(rect);
 };
-function SVGCompElement(data,_x,comp){
+function SVGCompElement(data,globalData,comp){
     this.layers = data.layers;
     this.supports3d = true;
-    this._db = false;
-    this._dc = [];
-    this._br = this.layers ? _cv(this.layers.length) : [];
-    //this._bx = _ct('g');
-    this._cz(data,_x,comp);
-    this.tm = data.tm ? _ai._bo(this,data.tm,0,_x.frameRate,this._co) : {_placeholder:true};
+    this.completeLayers = false;
+    this.pendingElements = [];
+    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
+    //this.layerElement = createNS('g');
+    this.initElement(data,globalData,comp);
+    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate,this.dynamicProperties) : {_placeholder:true};
 }
 
-extendPrototype([_ao, _g, _d], SVGCompElement);
-function _cw(data,_x,comp){
+extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
+function SVGTextElement(data,globalData,comp){
     this.textSpans = [];
     this.renderType = 'svg';
-    this._cz(data,_x,comp);
+    this.initElement(data,globalData,comp);
 }
 
-extendPrototype([_e,_af,_d,_ad,_ac,_ci,_k], _cw);
+extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement], SVGTextElement);
 
-_cw.prototype.createContent = function(){
+SVGTextElement.prototype.createContent = function(){
 
     if(this.data.ln){
-        this._bx.setAttribute('id',this.data.ln);
+        this.layerElement.setAttribute('id',this.data.ln);
     }
     if(this.data.cl){
-        this._bx.setAttribute('class',this.data.cl);
+        this.layerElement.setAttribute('class',this.data.cl);
     }
-    if (this.data.singleShape && !this._x._cr.chars) {
-        this.textContainer = _ct('text');
+    if (this.data.singleShape && !this.globalData.fontManager.chars) {
+        this.textContainer = createNS('text');
     }
 };
 
-_cw.prototype.buildNewText = function(){
+SVGTextElement.prototype.buildNewText = function(){
     var i, len;
 
     var documentData = this.textProperty.currentData;
-    this._bt = _cv(documentData ? documentData.l.length : 0);
+    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
     if(documentData.fc) {
-        this._bx.setAttribute('fill', this.buildColor(documentData.fc));
+        this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
     }else{
-        this._bx.setAttribute('fill', 'rgba(0,0,0,0)');
+        this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
     }
     if(documentData.sc){
-        this._bx.setAttribute('stroke', this.buildColor(documentData.sc));
-        this._bx.setAttribute('stroke-width', documentData.sw);
+        this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
+        this.layerElement.setAttribute('stroke-width', documentData.sw);
     }
-    this._bx.setAttribute('font-size', documentData.s);
-    var fontData = this._x._cr.getFontByName(documentData.f);
+    this.layerElement.setAttribute('font-size', documentData.finalSize);
+    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
     if(fontData.fClass){
-        this._bx.setAttribute('class',fontData.fClass);
+        this.layerElement.setAttribute('class',fontData.fClass);
     } else {
-        this._bx.setAttribute('font-family', fontData.fFamily);
+        this.layerElement.setAttribute('font-family', fontData.fFamily);
         var fWeight = documentData.fWeight, fStyle = documentData.fStyle;
-        this._bx.setAttribute('font-style', fStyle);
-        this._bx.setAttribute('font-weight', fWeight);
+        this.layerElement.setAttribute('font-style', fStyle);
+        this.layerElement.setAttribute('font-weight', fWeight);
     }
 
     var letters = documentData.l || [];
-    var usesGlyphs = this._x._cr.chars;
+    var usesGlyphs = this.globalData.fontManager.chars;
     len = letters.length;
     if(!len){
         return;
@@ -7034,10 +7050,10 @@
     var matrixHelper = this.mHelper;
     var shapes, shapeStr = '', singleShape = this.data.singleShape;
     var xPos = 0, yPos = 0, firstLine = true;
-    var trackingOffset = documentData.tr/1000*documentData.s;
-    if(singleShape && !usesGlyphs) {
+    var trackingOffset = documentData.tr/1000*documentData.finalSize;
+    if(singleShape && !usesGlyphs && !documentData.sz) {
         var tElement = this.textContainer;
-        var justify = '';
+        var justify = 'start';
         switch(documentData.j) {
             case 1:
                 justify = 'end';
@@ -7045,59 +7061,56 @@
             case 2:
                 justify = 'middle';
                 break;
-            case 2:
-                justify = 'start';
-                break;
         }
         tElement.setAttribute('text-anchor',justify);
         tElement.setAttribute('letter-spacing',trackingOffset);
-        var textContent = documentData.t.split(String.fromCharCode(13));
+        var textContent = documentData.finalText.split(String.fromCharCode(13));
         len = textContent.length;
-        var yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
+        yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
         for ( i = 0; i < len; i += 1) {
-            tSpan = this.textSpans[i] || _ct('tspan');
+            tSpan = this.textSpans[i] || createNS('tspan');
             tSpan.textContent = textContent[i];
             tSpan.setAttribute('x', 0);
             tSpan.setAttribute('y', yPos);
             tSpan.style.display = 'inherit';
             tElement.appendChild(tSpan);
             this.textSpans[i] = tSpan;
-            yPos += documentData.lh;
+            yPos += documentData.finalLineHeight;
         }
         
-        this._bx.appendChild(tElement);
+        this.layerElement.appendChild(tElement);
     } else {
         var cachedSpansLength = this.textSpans.length;
         var shapeData, charData;
         for (i = 0; i < len; i += 1) {
             if(!usesGlyphs || !singleShape || i === 0){
-                tSpan = cachedSpansLength > i ? this.textSpans[i] : _ct(usesGlyphs?'path':'text');
+                tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs?'path':'text');
                 if (cachedSpansLength <= i) {
                     tSpan.setAttribute('stroke-linecap', 'butt');
                     tSpan.setAttribute('stroke-linejoin','round');
                     tSpan.setAttribute('stroke-miterlimit','4');
                     this.textSpans[i] = tSpan;
-                    this._bx.appendChild(tSpan);
+                    this.layerElement.appendChild(tSpan);
                 }
                 tSpan.style.display = 'inherit';
             }
             
             matrixHelper.reset();
-            if(usesGlyphs) {
-                matrixHelper.scale(documentData.s / 100, documentData.s / 100);
-                if (singleShape) {
-                    if(letters[i].n) {
-                        xPos = -trackingOffset;
-                        yPos += documentData.yOffset;
-                        yPos += firstLine ? 1 : 0;
-                        firstLine = false;
-                    }
-                    this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
-                    xPos += letters[i].l || 0;
-                    //xPos += letters[i].val === ' ' ? 0 : trackingOffset;
-                    xPos += trackingOffset;
+            matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
+            if (singleShape) {
+                if(letters[i].n) {
+                    xPos = -trackingOffset;
+                    yPos += documentData.yOffset;
+                    yPos += firstLine ? 1 : 0;
+                    firstLine = false;
                 }
-                charData = this._x._cr.getCharData(documentData.t.charAt(i), fontData.fStyle, this._x._cr.getFontByName(documentData.f).fFamily);
+                this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
+                xPos += letters[i].l || 0;
+                //xPos += letters[i].val === ' ' ? 0 : trackingOffset;
+                xPos += trackingOffset;
+            }
+            if(usesGlyphs) {
+                charData = this.globalData.fontManager.getCharData(documentData.finalText.charAt(i), fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
                 shapeData = charData && charData.data || {};
                 shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
                 if(!singleShape){
@@ -7106,6 +7119,9 @@
                     shapeStr += this.createPathShape(matrixHelper,shapes);
                 }
             } else {
+                if(singleShape) {
+                    tSpan.setAttribute("transform", "translate(" + matrixHelper.props[12] + "," + matrixHelper.props[13] + ")");
+                }
                 tSpan.textContent = letters[i].val;
                 tSpan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space","preserve");
             }
@@ -7121,64 +7137,64 @@
     }
     
     this._sizeChanged = true;
-}
+};
 
-_cw.prototype.sourceRectAtTime = function(time){
-    this._az(this.comp.renderedFrame - this.data.st);
+SVGTextElement.prototype.sourceRectAtTime = function(time){
+    this.prepareFrame(this.comp.renderedFrame - this.data.st);
     this.renderInnerContent();
     if(this._sizeChanged){
         this._sizeChanged = false;
-        var textBox = this._bx.getBBox();
+        var textBox = this.layerElement.getBBox();
         this.bbox = {
             top: textBox.y,
             left: textBox.x,
             width: textBox.width,
             height: textBox.height
-        }
+        };
     }
     return this.bbox;
-}
+};
 
-_cw.prototype.renderInnerContent = function(){
+SVGTextElement.prototype.renderInnerContent = function(){
 
     if(!this.data.singleShape){
         this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
         if(this.lettersChangedFlag || this.textAnimator.lettersChangedFlag){
             this._sizeChanged = true;
             var  i,len;
-            var _bt = this.textAnimator._bt;
+            var renderedLetters = this.textAnimator.renderedLetters;
 
             var letters = this.textProperty.currentData.l;
 
             len = letters.length;
-            var _bu, textSpan;
+            var renderedLetter, textSpan;
             for(i=0;i<len;i+=1){
                 if(letters[i].n){
                     continue;
                 }
-                _bu = _bt[i];
+                renderedLetter = renderedLetters[i];
                 textSpan = this.textSpans[i];
-                if(_bu.mdf.m) {
-                    textSpan.setAttribute('transform',_bu.m);
+                if(renderedLetter._mdf.m) {
+                    textSpan.setAttribute('transform',renderedLetter.m);
                 }
-                if(_bu.mdf.o) {
-                    textSpan.setAttribute('opacity',_bu.o);
+                if(renderedLetter._mdf.o) {
+                    textSpan.setAttribute('opacity',renderedLetter.o);
                 }
-                if(_bu.mdf.sw){
-                    textSpan.setAttribute('stroke-width',_bu.sw);
+                if(renderedLetter._mdf.sw){
+                    textSpan.setAttribute('stroke-width',renderedLetter.sw);
                 }
-                if(_bu.mdf.sc){
-                    textSpan.setAttribute('stroke',_bu.sc);
+                if(renderedLetter._mdf.sc){
+                    textSpan.setAttribute('stroke',renderedLetter.sc);
                 }
-                if(_bu.mdf.fc){
-                    textSpan.setAttribute('fill',_bu.fc);
+                if(renderedLetter._mdf.fc){
+                    textSpan.setAttribute('fill',renderedLetter.fc);
                 }
             }
         }
     }
-}
-function SVGShapeElement(data,_x,comp){
-    //List of drawable _br
+};
+function SVGShapeElement(data,globalData,comp){
+    //List of drawable elements
     this.shapes = [];
     // Full shape data
     this.shapesData = data.shapes;
@@ -7190,42 +7206,42 @@
     this.itemsData = [];
     //List of items in previous shape tree
     this.processedElements = [];
-    this._cz(data,_x,comp);
+    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.
-    // List of _br that have been created
+    // List of elements that have been created
     this.prevViewData = [];
 }
 
-extendPrototype([_e,_af,_d,_f,_ad,_ac,_ci], SVGShapeElement);
+extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement], SVGShapeElement);
 
 SVGShapeElement.prototype.initSecondaryElement = function() {
-}
+};
 
 SVGShapeElement.prototype.identityMatrix = new Matrix();
 
 SVGShapeElement.prototype.buildExpressionInterface = function(){};
 
 SVGShapeElement.prototype.createContent = function(){
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co, 0, [], true);
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties, 0, [], true);
 };
 
-SVGShapeElement.prototype.createStyleElement = function(data, level, _co){
+SVGShapeElement.prototype.createStyleElement = function(data, level, dynamicProperties){
     //TODO: prevent drawing of hidden styles
     var elementData;
     var styleOb = new SVGStyleData(data, level);
 
     var pathElement = styleOb.pElem;
     if(data.ty === 'st') {
-        elementData = new SVGStrokeStyleData(this, data, _co, styleOb);
+        elementData = new SVGStrokeStyleData(this, data, dynamicProperties, styleOb);
     } else if(data.ty === 'fl') {
-        elementData = new SVGFillStyleData(this, data, _co, styleOb);
+        elementData = new SVGFillStyleData(this, data, dynamicProperties, styleOb);
     } else if(data.ty === 'gf' || data.ty === 'gs') {
-        var gradientConstructor = data.ty === 'gf' ? _ck : _cj;
-        elementData = new gradientConstructor(this, data, _co, styleOb);
-        this._x.defs.appendChild(elementData.gf);
+        var gradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
+        elementData = new gradientConstructor(this, data, dynamicProperties, styleOb);
+        this.globalData.defs.appendChild(elementData.gf);
         if (elementData.maskId) {
-            this._x.defs.appendChild(elementData.ms);
-            this._x.defs.appendChild(elementData.of);
+            this.globalData.defs.appendChild(elementData.ms);
+            this.globalData.defs.appendChild(elementData.of);
             pathElement.setAttribute('mask','url(#' + elementData.maskId + ')');
         }
     }
@@ -7251,7 +7267,7 @@
     }
     this.stylesList.push(styleOb);
     return elementData;
-}
+};
 
 SVGShapeElement.prototype.createGroupElement = function(data) {
     var elementData = new ShapeGroupData();
@@ -7259,13 +7275,13 @@
         elementData.gr.setAttribute('id',data.ln);
     }
     return elementData;
-}
+};
 
-SVGShapeElement.prototype._cp = function(data, _co) {
-    return new SVGTransformData(_ag._bj(this,data,_co), _ai._bo(this,data.o,0,0.01,_co))
-}
+SVGShapeElement.prototype.createTransformElement = function(data, dynamicProperties) {
+    return new SVGTransformData(TransformPropertyFactory.getTransformProperty(this,data,dynamicProperties), PropertyFactory.getProp(this,data.o,0,0.01,dynamicProperties));
+};
 
-SVGShapeElement.prototype.createShapeElement = function(data, ownTransformers, level, _co) {
+SVGShapeElement.prototype.createShapeElement = function(data, ownTransformers, level, dynamicProperties) {
     var ty = 4;
     if(data.ty === 'rc'){
         ty = 5;
@@ -7274,12 +7290,12 @@
     }else if(data.ty === 'sr'){
         ty = 7;
     }
-    var shapeProperty = _ah._bp(this,data,ty,_co);
-    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty)
+    var shapeProperty = ShapePropertyFactory.getShapeProp(this,data,ty,dynamicProperties);
+    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
     this.shapes.push(elementData.sh);
     this.addShapeToModifiers(elementData);
     return elementData;
-}
+};
 
 SVGShapeElement.prototype.setElementStyles = function(elementData){
     var arr = elementData.styles;
@@ -7289,23 +7305,23 @@
             arr.push(this.stylesList[j]);
         }
     }
-}
+};
 
 SVGShapeElement.prototype.reloadShapes = function(){
-    this._ch = true;
+    this._isFirstFrame = true;
     var i, len = this.itemsData.length;
     for( i = 0; i < len; i += 1) {
         this.prevViewData[i] = this.itemsData[i];
     }
-    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co, 0, [], true);
-    var i, len = this._co.length;
+    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties, 0, [], true);
+    len = this.dynamicProperties.length;
     for(i = 0; i < len; i += 1) {
-        this._co[i].getValue();
+        this.dynamicProperties[i].getValue();
     }
     this.renderModifiers();
-}
+};
 
-SVGShapeElement.prototype.searchShapes = function(arr,itemsData,prevViewData,container,_co, level, transformers, render){
+SVGShapeElement.prototype.searchShapes = function(arr,itemsData,prevViewData,container,dynamicProperties, level, transformers, render){
     var ownTransformers = [].concat(transformers);
     var i, len = arr.length - 1;
     var j, jLen;
@@ -7319,7 +7335,7 @@
         }
         if(arr[i].ty == 'fl' || arr[i].ty == 'st' || arr[i].ty == 'gf' || arr[i].ty == 'gs'){
             if(!processedPos){
-                itemsData[i] = this.createStyleElement(arr[i], level, _co);
+                itemsData[i] = this.createStyleElement(arr[i], level, dynamicProperties);
             } else {
                 itemsData[i].style.closed = false;
             }
@@ -7336,26 +7352,26 @@
                     itemsData[i].prevViewData[j] = itemsData[i].it[j];
                 }
             }
-            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,itemsData[i].gr,_co, level + 1, ownTransformers, render);
+            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,itemsData[i].gr,dynamicProperties, level + 1, ownTransformers, render);
             if(arr[i]._render){
                 container.appendChild(itemsData[i].gr);
             }
         }else if(arr[i].ty == 'tr'){
             if(!processedPos){
-                itemsData[i] = this._cp(arr[i], _co);
+                itemsData[i] = this.createTransformElement(arr[i], dynamicProperties);
             }
             currentTransform = itemsData[i].transform;
             ownTransformers.push(currentTransform);
         }else if(arr[i].ty == 'sh' || arr[i].ty == 'rc' || arr[i].ty == 'el' || arr[i].ty == 'sr'){
             if(!processedPos){
-                itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level, _co);
+                itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level, dynamicProperties);
             }
             this.setElementStyles(itemsData[i]);
 
         }else if(arr[i].ty == 'tm' || arr[i].ty == 'rd' || arr[i].ty == 'ms'){
             if(!processedPos){
-                modifier = _as.getModifier(arr[i].ty);
-                modifier.init(this,arr[i],_co);
+                modifier = ShapeModifiers.getModifier(arr[i].ty);
+                modifier.init(this,arr[i],dynamicProperties);
                 itemsData[i] = modifier;
                 this.shapeModifiers.push(modifier);
             } else {
@@ -7365,9 +7381,9 @@
             ownModifiers.push(modifier);
         }else if(arr[i].ty == 'rp'){
             if(!processedPos){
-                modifier = _as.getModifier(arr[i].ty);
+                modifier = ShapeModifiers.getModifier(arr[i].ty);
                 itemsData[i] = modifier;
-                modifier.init(this,arr,i,itemsData,_co);
+                modifier.init(this,arr,i,itemsData,dynamicProperties);
                 this.shapeModifiers.push(modifier);
                 render = false;
             }else{
@@ -7394,10 +7410,10 @@
     for(i=0;i<len;i+=1){
         this.stylesList[i].reset();
     }
-    this.renderShape(this.shapesData,this.itemsData, null);
+    this.renderShape(this.shapesData, this.itemsData, this.layerElement);
 
     for (i = 0; i < len; i += 1) {
-        if (this.stylesList[i].mdf || this._ch) {
+        if (this.stylesList[i]._mdf || this._isFirstFrame) {
             if(this.stylesList[i].msElem){
                 this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
                 //Adding M0 0 fixes same mask bug on all browsers
@@ -7410,16 +7426,15 @@
 
 
 SVGShapeElement.prototype.renderShape = function(items, data, container) {
-    //TODO: find out why a container could be missing
     var i, len = items.length - 1;
     var ty;
     for(i=0;i<=len;i+=1){
         ty = items[i].ty;
         if(ty == 'tr'){
-            if(this._ch || data[i].transform.op.mdf && container){
+            if(this._isFirstFrame || data[i].transform.op._mdf){
                 container.setAttribute('opacity',data[i].transform.op.v);
             }
-            if(this._ch || data[i].transform.mProps.mdf && container){
+            if(this._isFirstFrame || data[i].transform.mProps._mdf){
                 container.setAttribute('transform',data[i].transform.mProps.v.to2dCSS());
             }
         }else if(items[i]._render && (ty == 'sh' || ty == 'el' || ty == 'rc' || ty == 'sr')){
@@ -7447,13 +7462,13 @@
     var lvl = itemData.lvl;
     var paths, mat, props, iterations, k;
     for(l=0;l<lLen;l+=1){
-        redraw = itemData.sh.mdf || this._ch;
+        redraw = itemData.sh._mdf || this._isFirstFrame;
         if(itemData.styles[l].lvl < lvl){
             mat = this.mHelper.reset();
             iterations = lvl - itemData.styles[l].lvl;
             k = itemData.transformers.length-1;
             while(iterations > 0) {
-                redraw = itemData.transformers[k].mProps.mdf || redraw;
+                redraw = itemData.transformers[k].mProps._mdf || redraw;
                 props = itemData.transformers[k].mProps.v.props;
                 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]);
                 iterations --;
@@ -7477,17 +7492,17 @@
             pathStringTransformed = itemData.caches[l];
         }
         itemData.styles[l].d += pathStringTransformed;
-        itemData.styles[l].mdf = redraw || itemData.styles[l].mdf;
+        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
     }
 };
 
 SVGShapeElement.prototype.renderFill = function(styleData,itemData){
     var styleElem = itemData.style;
 
-    if(itemData.c.mdf || this._ch){
+    if(itemData.c._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('fill','rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')');
     }
-    if(itemData.o.mdf || this._ch){
+    if(itemData.o._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('fill-opacity',itemData.o.v);
     }
 };
@@ -7497,11 +7512,11 @@
     var hasOpacity = itemData.g._hasOpacity;
     var pt1 = itemData.s.v, pt2 = itemData.e.v;
 
-    if (itemData.o.mdf || this._ch) {
+    if (itemData.o._mdf || this._isFirstFrame) {
         var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
         itemData.style.pElem.setAttribute(attr, itemData.o.v);
     }
-    if (itemData.s.mdf || this._ch) {
+    if (itemData.s._mdf || this._isFirstFrame) {
         var attr1 = styleData.t === 1 ? 'x1' : 'cx';
         var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
         gfill.setAttribute(attr1, pt1[0]);
@@ -7512,7 +7527,7 @@
         }
     }
     var stops, i, len, stop;
-    if (itemData.g.cmdf || this._ch) {
+    if (itemData.g._cmdf || this._isFirstFrame) {
         stops = itemData.cst;
         var cValues = itemData.g.c;
         len = stops.length;
@@ -7522,7 +7537,7 @@
             stop.setAttribute('stop-color','rgb('+ cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ','+cValues[i * 4 + 3] + ')');
         }
     }
-    if (hasOpacity && (itemData.g.omdf || this._ch)) {
+    if (hasOpacity && (itemData.g._omdf || this._isFirstFrame)) {
         var oValues = itemData.g.o;
         if(itemData.g._collapsable) {
             stops = itemData.cst;
@@ -7539,7 +7554,7 @@
         }
     }
     if (styleData.t === 1) {
-        if (itemData.e.mdf  || this._ch) {
+        if (itemData.e._mdf  || this._isFirstFrame) {
             gfill.setAttribute('x2', pt2[0]);
             gfill.setAttribute('y2', pt2[1]);
             if (hasOpacity && !itemData.g._collapsable) {
@@ -7549,14 +7564,14 @@
         }
     } else {
         var rad;
-        if (itemData.s.mdf || itemData.e.mdf || this._ch) {
+        if (itemData.s._mdf || itemData.e._mdf || this._isFirstFrame) {
             rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
             gfill.setAttribute('r', rad);
             if(hasOpacity && !itemData.g._collapsable){
                 itemData.of.setAttribute('r', rad);
             }
         }
-        if (itemData.e.mdf || itemData.h.mdf || itemData.a.mdf || this._ch) {
+        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || this._isFirstFrame) {
             if (!rad) {
                 rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
             }
@@ -7580,17 +7595,17 @@
 SVGShapeElement.prototype.renderStroke = function(styleData, itemData) {
     var styleElem = itemData.style;
     var d = itemData.d;
-    if (d && (d.mdf || this._ch)) {
+    if (d && (d._mdf || this._isFirstFrame)) {
         styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
         styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
     }
-    if(itemData.c && (itemData.c.mdf || this._ch)){
+    if(itemData.c && (itemData.c._mdf || this._isFirstFrame)){
         styleElem.pElem.setAttribute('stroke','rgb(' + bm_floor(itemData.c.v[0]) + ',' + bm_floor(itemData.c.v[1]) + ',' + bm_floor(itemData.c.v[2]) + ')');
     }
-    if(itemData.o.mdf || this._ch){
+    if(itemData.o._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
     }
-    if(itemData.w.mdf || this._ch){
+    if(itemData.w._mdf || this._isFirstFrame){
         styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
         if(styleElem.msElem){
             styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
@@ -7599,121 +7614,121 @@
 };
 
 SVGShapeElement.prototype.destroy = function(){
-    this.destroy_e();
+    this.destroyBaseElement();
     this.shapeData = null;
     this.itemsData = null;
 };
 
-function _bb(filter, _cl){
-    this._cl = _cl;
-    var feColorMatrix = _ct('feColorMatrix');
+function SVGTintFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','linearRGB');
     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');
     feColorMatrix.setAttribute('result','f1');
     filter.appendChild(feColorMatrix);
-    feColorMatrix = _ct('feColorMatrix');
+    feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
     feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
     feColorMatrix.setAttribute('result','f2');
     filter.appendChild(feColorMatrix);
     this.matrixFilter = feColorMatrix;
-    if(_cl._cm[2].p.v !== 100 || _cl._cm[2].p.k){
-        var feMerge = _ct('feMerge');
+    if(filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k){
+        var feMerge = createNS('feMerge');
         filter.appendChild(feMerge);
         var feMergeNode;
-        feMergeNode = _ct('feMergeNode');
+        feMergeNode = createNS('feMergeNode');
         feMergeNode.setAttribute('in','SourceGraphic');
         feMerge.appendChild(feMergeNode);
-        feMergeNode = _ct('feMergeNode');
+        feMergeNode = createNS('feMergeNode');
         feMergeNode.setAttribute('in','f2');
         feMerge.appendChild(feMergeNode);
     }
 }
 
-_bb.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        var colorBlack = this._cl._cm[0].p.v;
-        var colorWhite = this._cl._cm[1].p.v;
-        var opacity = this._cl._cm[2].p.v/100;
+SVGTintFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        var colorBlack = this.filterManager.effectElements[0].p.v;
+        var colorWhite = this.filterManager.effectElements[1].p.v;
+        var opacity = this.filterManager.effectElements[2].p.v/100;
         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');
     }
 };
-function _bc(filter, _cl){
-    this._cl = _cl;
-    var feColorMatrix = _ct('feColorMatrix');
+function SVGFillFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
     feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
     filter.appendChild(feColorMatrix);
     this.matrixFilter = feColorMatrix;
 }
-_bc.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        var color = this._cl._cm[2].p.v;
-        var opacity = this._cl._cm[6].p.v;
+SVGFillFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        var color = this.filterManager.effectElements[2].p.v;
+        var opacity = this.filterManager.effectElements[6].p.v;
         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');
     }
 };
-function _bd(elem, _cl){
+function SVGStrokeEffect(elem, filterManager){
     this.initialized = false;
-    this._cl = _cl;
+    this.filterManager = filterManager;
     this.elem = elem;
     this.paths = [];
 }
 
-_bd.prototype.initialize = function(){
+SVGStrokeEffect.prototype.initialize = function(){
 
-    var elemChildren = this.elem._bx.children || this.elem._bx.childNodes;
+    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
     var path,groupPath, i, len;
-    if(this._cl._cm[1].p.v === 1){
+    if(this.filterManager.effectElements[1].p.v === 1){
         len = this.elem.maskManager.masksProperties.length;
         i = 0;
     } else {
-        i = this._cl._cm[0].p.v - 1;
+        i = this.filterManager.effectElements[0].p.v - 1;
         len = i + 1;
     }
-    groupPath = _ct('g'); 
+    groupPath = createNS('g'); 
     groupPath.setAttribute('fill','none');
     groupPath.setAttribute('stroke-linecap','round');
     groupPath.setAttribute('stroke-dashoffset',1);
     for(i;i<len;i+=1){
-        path = _ct('path');
+        path = createNS('path');
         groupPath.appendChild(path);
         this.paths.push({p:path,m:i});
     }
-    if(this._cl._cm[10].p.v === 3){
-        var mask = _ct('mask');
+    if(this.filterManager.effectElements[10].p.v === 3){
+        var mask = createNS('mask');
         var id = 'stms_' + randomString(10);
         mask.setAttribute('id',id);
         mask.setAttribute('mask-type','alpha');
         mask.appendChild(groupPath);
-        this.elem._x.defs.appendChild(mask);
-        var g = _ct('g');
+        this.elem.globalData.defs.appendChild(mask);
+        var g = createNS('g');
         g.setAttribute('mask','url(' + locationHref + '#'+id+')');
         if(elemChildren[0]){
             g.appendChild(elemChildren[0]);
         }
-        this.elem._bx.appendChild(g);
+        this.elem.layerElement.appendChild(g);
         this.masker = mask;
         groupPath.setAttribute('stroke','#fff');
-    } else if(this._cl._cm[10].p.v === 1 || this._cl._cm[10].p.v === 2){
-        if(this._cl._cm[10].p.v === 2){
-            var elemChildren = this.elem._bx.children || this.elem._bx.childNodes;
+    } else if(this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2){
+        if(this.filterManager.effectElements[10].p.v === 2){
+            elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
             while(elemChildren.length){
-                this.elem._bx.removeChild(elemChildren[0]);
+                this.elem.layerElement.removeChild(elemChildren[0]);
             }
         }
-        this.elem._bx.appendChild(groupPath);
-        this.elem._bx.removeAttribute('mask');
+        this.elem.layerElement.appendChild(groupPath);
+        this.elem.layerElement.removeAttribute('mask');
         groupPath.setAttribute('stroke','#fff');
     }
     this.initialized = true;
     this.pathMasker = groupPath;
-}
+};
 
-_bd.prototype._ba = function(forceRender){
+SVGStrokeEffect.prototype.renderFrame = function(forceRender){
     if(!this.initialized){
         this.initialize();
     }
@@ -7722,111 +7737,111 @@
     for(i=0;i<len;i+=1){
         mask = this.elem.maskManager.viewData[this.paths[i].m];
         path = this.paths[i].p;
-        if(forceRender || this._cl.mdf || mask.prop.mdf){
+        if(forceRender || this.filterManager._mdf || mask.prop._mdf){
             path.setAttribute('d',mask.lastPath);
         }
-        if(forceRender || this._cl._cm[9].p.mdf || this._cl._cm[4].p.mdf || this._cl._cm[7].p.mdf || this._cl._cm[8].p.mdf || mask.prop.mdf){
+        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){
             var dasharrayValue;
-            if(this._cl._cm[7].p.v !== 0 || this._cl._cm[8].p.v !== 100){
-                var s = Math.min(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100;
-                var e = Math.max(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100;
+            if(this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100){
+                var s = Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100;
+                var e = Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100;
                 var l = path.getTotalLength();
                 dasharrayValue = '0 0 0 ' + l*s + ' ';
                 var lineLength = l*(e-s);
-                var segment = 1+this._cl._cm[4].p.v*2*this._cl._cm[9].p.v/100;
+                var segment = 1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100;
                 var units = Math.floor(lineLength/segment);
                 var j;
                 for(j=0;j<units;j+=1){
-                    dasharrayValue += '1 ' + this._cl._cm[4].p.v*2*this._cl._cm[9].p.v/100 + ' ';
+                    dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100 + ' ';
                 }
                 dasharrayValue += '0 ' + l*10 + ' 0 0';
             } else {
-                dasharrayValue = '1 ' + this._cl._cm[4].p.v*2*this._cl._cm[9].p.v/100;
+                dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100;
             }
             path.setAttribute('stroke-dasharray',dasharrayValue);
         }
     }
-    if(forceRender || this._cl._cm[4].p.mdf){
-        this.pathMasker.setAttribute('stroke-width',this._cl._cm[4].p.v*2);
+    if(forceRender || this.filterManager.effectElements[4].p._mdf){
+        this.pathMasker.setAttribute('stroke-width',this.filterManager.effectElements[4].p.v*2);
     }
     
-    if(forceRender || this._cl._cm[6].p.mdf){
-        this.pathMasker.setAttribute('opacity',this._cl._cm[6].p.v);
+    if(forceRender || this.filterManager.effectElements[6].p._mdf){
+        this.pathMasker.setAttribute('opacity',this.filterManager.effectElements[6].p.v);
     }
-    if(this._cl._cm[10].p.v === 1 || this._cl._cm[10].p.v === 2){
-        if(forceRender || this._cl._cm[3].p.mdf){
-            var color = this._cl._cm[3].p.v;
+    if(this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2){
+        if(forceRender || this.filterManager.effectElements[3].p._mdf){
+            var color = this.filterManager.effectElements[3].p.v;
             this.pathMasker.setAttribute('stroke','rgb('+bm_floor(color[0]*255)+','+bm_floor(color[1]*255)+','+bm_floor(color[2]*255)+')');
         }
     }
 };
-function _be(filter, _cl){
-    this._cl = _cl;
-    var feColorMatrix = _ct('feColorMatrix');
+function SVGTritoneFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var feColorMatrix = createNS('feColorMatrix');
     feColorMatrix.setAttribute('type','matrix');
     feColorMatrix.setAttribute('color-interpolation-filters','linearRGB');
     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');
     feColorMatrix.setAttribute('result','f1');
     filter.appendChild(feColorMatrix);
-    var feComponentTransfer = _ct('feComponentTransfer');
+    var feComponentTransfer = createNS('feComponentTransfer');
     feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
     filter.appendChild(feComponentTransfer);
     this.matrixFilter = feComponentTransfer;
-    var feFuncR = _ct('feFuncR');
+    var feFuncR = createNS('feFuncR');
     feFuncR.setAttribute('type','table');
     feComponentTransfer.appendChild(feFuncR);
     this.feFuncR = feFuncR;
-    var feFuncG = _ct('feFuncG');
+    var feFuncG = createNS('feFuncG');
     feFuncG.setAttribute('type','table');
     feComponentTransfer.appendChild(feFuncG);
     this.feFuncG = feFuncG;
-    var feFuncB = _ct('feFuncB');
+    var feFuncB = createNS('feFuncB');
     feFuncB.setAttribute('type','table');
     feComponentTransfer.appendChild(feFuncB);
     this.feFuncB = feFuncB;
 }
 
-_be.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        var color1 = this._cl._cm[0].p.v;
-        var color2 = this._cl._cm[1].p.v;
-        var color3 = this._cl._cm[2].p.v;
-        var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0]
-        var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1]
-        var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2]
+SVGTritoneFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        var color1 = this.filterManager.effectElements[0].p.v;
+        var color2 = this.filterManager.effectElements[1].p.v;
+        var color3 = this.filterManager.effectElements[2].p.v;
+        var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
+        var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
+        var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
         this.feFuncR.setAttribute('tableValues', tableR);
         this.feFuncG.setAttribute('tableValues', tableG);
         this.feFuncB.setAttribute('tableValues', tableB);
-        //var opacity = this._cl._cm[2].p.v/100;
+        //var opacity = this.filterManager.effectElements[2].p.v/100;
         //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');
     }
 };
-function _bf(filter, _cl){
-    this._cl = _cl;
-    var _cm = this._cl._cm;
-    var feComponentTransfer = _ct('feComponentTransfer');
+function SVGProLevelsFilter(filter, filterManager){
+    this.filterManager = filterManager;
+    var effectElements = this.filterManager.effectElements;
+    var feComponentTransfer = createNS('feComponentTransfer');
     var feFuncR, feFuncG, feFuncB;
     
-    if(_cm[10].p.k || _cm[10].p.v !== 0 || _cm[11].p.k || _cm[11].p.v !== 1 || _cm[12].p.k || _cm[12].p.v !== 1 || _cm[13].p.k || _cm[13].p.v !== 0 || _cm[14].p.k || _cm[14].p.v !== 1){
+    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){
         this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
     }
-    if(_cm[17].p.k || _cm[17].p.v !== 0 || _cm[18].p.k || _cm[18].p.v !== 1 || _cm[19].p.k || _cm[19].p.v !== 1 || _cm[20].p.k || _cm[20].p.v !== 0 || _cm[21].p.k || _cm[21].p.v !== 1){
+    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){
         this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
     }
-    if(_cm[24].p.k || _cm[24].p.v !== 0 || _cm[25].p.k || _cm[25].p.v !== 1 || _cm[26].p.k || _cm[26].p.v !== 1 || _cm[27].p.k || _cm[27].p.v !== 0 || _cm[28].p.k || _cm[28].p.v !== 1){
+    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){
         this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
     }
-    if(_cm[31].p.k || _cm[31].p.v !== 0 || _cm[32].p.k || _cm[32].p.v !== 1 || _cm[33].p.k || _cm[33].p.v !== 1 || _cm[34].p.k || _cm[34].p.v !== 0 || _cm[35].p.k || _cm[35].p.v !== 1){
+    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){
         this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
     }
     
     if(this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA){
         feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
         filter.appendChild(feComponentTransfer);
-        feComponentTransfer = _ct('feComponentTransfer');
+        feComponentTransfer = createNS('feComponentTransfer');
     }
 
-    if(_cm[3].p.k || _cm[3].p.v !== 0 || _cm[4].p.k || _cm[4].p.v !== 1 || _cm[5].p.k || _cm[5].p.v !== 1 || _cm[6].p.k || _cm[6].p.v !== 0 || _cm[7].p.k || _cm[7].p.v !== 1){
+    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){
 
         feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
         filter.appendChild(feComponentTransfer);
@@ -7836,14 +7851,14 @@
     }
 }
 
-_bf.prototype.createFeFunc = function(type, feComponentTransfer) {
-    var feFunc = _ct(type);
+SVGProLevelsFilter.prototype.createFeFunc = function(type, feComponentTransfer) {
+    var feFunc = createNS(type);
     feFunc.setAttribute('type','table');
     feComponentTransfer.appendChild(feFunc);
     return feFunc;
 };
 
-_bf.prototype.getTableValue = function(inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
+SVGProLevelsFilter.prototype.getTableValue = function(inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
     var cnt = 0;
     var segments = 256;
     var perc;
@@ -7869,76 +7884,69 @@
     return table.join(' ');
 };
 
-_bf.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
+SVGProLevelsFilter.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
         var val, cnt, perc, bezier;
-        var _cm = this._cl._cm;
-        if(this.feFuncRComposed && (forceRender || _cm[3].p.mdf || _cm[4].p.mdf || _cm[5].p.mdf || _cm[6].p.mdf || _cm[7].p.mdf)){
-            val = this.getTableValue(_cm[3].p.v,_cm[4].p.v,_cm[5].p.v,_cm[6].p.v,_cm[7].p.v);
+        var effectElements = this.filterManager.effectElements;
+        if(this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)){
+            val = this.getTableValue(effectElements[3].p.v,effectElements[4].p.v,effectElements[5].p.v,effectElements[6].p.v,effectElements[7].p.v);
             this.feFuncRComposed.setAttribute('tableValues',val);
             this.feFuncGComposed.setAttribute('tableValues',val);
             this.feFuncBComposed.setAttribute('tableValues',val);
         }
 
 
-        if(this.feFuncR && (forceRender || _cm[10].p.mdf || _cm[11].p.mdf || _cm[12].p.mdf || _cm[13].p.mdf || _cm[14].p.mdf)){
-            val = this.getTableValue(_cm[10].p.v,_cm[11].p.v,_cm[12].p.v,_cm[13].p.v,_cm[14].p.v);
+        if(this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)){
+            val = this.getTableValue(effectElements[10].p.v,effectElements[11].p.v,effectElements[12].p.v,effectElements[13].p.v,effectElements[14].p.v);
             this.feFuncR.setAttribute('tableValues',val);
         }
 
-        if(this.feFuncG && (forceRender || _cm[17].p.mdf || _cm[18].p.mdf || _cm[19].p.mdf || _cm[20].p.mdf || _cm[21].p.mdf)){
-            val = this.getTableValue(_cm[17].p.v,_cm[18].p.v,_cm[19].p.v,_cm[20].p.v,_cm[21].p.v);
+        if(this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)){
+            val = this.getTableValue(effectElements[17].p.v,effectElements[18].p.v,effectElements[19].p.v,effectElements[20].p.v,effectElements[21].p.v);
             this.feFuncG.setAttribute('tableValues',val);
         }
 
-        if(this.feFuncB && (forceRender || _cm[24].p.mdf || _cm[25].p.mdf || _cm[26].p.mdf || _cm[27].p.mdf || _cm[28].p.mdf)){
-            val = this.getTableValue(_cm[24].p.v,_cm[25].p.v,_cm[26].p.v,_cm[27].p.v,_cm[28].p.v);
+        if(this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)){
+            val = this.getTableValue(effectElements[24].p.v,effectElements[25].p.v,effectElements[26].p.v,effectElements[27].p.v,effectElements[28].p.v);
             this.feFuncB.setAttribute('tableValues',val);
         }
 
-        if(this.feFuncA && (forceRender || _cm[31].p.mdf || _cm[32].p.mdf || _cm[33].p.mdf || _cm[34].p.mdf || _cm[35].p.mdf)){
-            val = this.getTableValue(_cm[31].p.v,_cm[32].p.v,_cm[33].p.v,_cm[34].p.v,_cm[35].p.v);
+        if(this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)){
+            val = this.getTableValue(effectElements[31].p.v,effectElements[32].p.v,effectElements[33].p.v,effectElements[34].p.v,effectElements[35].p.v);
             this.feFuncA.setAttribute('tableValues',val);
         }
         
     }
 };
-function _bg(filter, _cl){
-    /*<feGaussianBlur in="SourceAlpha" stdDeviation="3"/> <!-- stdDeviation is how much to blur -->
-  <feOffset dx="2" dy="2" result="offsetblur"/> <!-- how much to offset -->
-  <feMerge> 
-    <feMergeNode/> <!-- this contains the offset blurred image -->
-    <feMergeNode in="SourceGraphic"/> <!-- this contains the element that the filter is applied to -->
-  </feMerge>*/
-  /*<feFlood flood-color="#3D4574" flood-opacity="0.5" result="offsetColor"/>*/
+function SVGDropShadowEffect(filter, filterManager){
     filter.setAttribute('x','-100%');
     filter.setAttribute('y','-100%');
     filter.setAttribute('width','400%');
     filter.setAttribute('height','400%');
-    this._cl = _cl;
+    this.filterManager = filterManager;
 
-    var feGaussianBlur = _ct('feGaussianBlur');
+    var feGaussianBlur = createNS('feGaussianBlur');
     feGaussianBlur.setAttribute('in','SourceAlpha');
     feGaussianBlur.setAttribute('result','drop_shadow_1');
     feGaussianBlur.setAttribute('stdDeviation','0');
     this.feGaussianBlur = feGaussianBlur;
     filter.appendChild(feGaussianBlur);
 
-    var feOffset = _ct('feOffset');
+    var feOffset = createNS('feOffset');
     feOffset.setAttribute('dx','25');
     feOffset.setAttribute('dy','0');
     feOffset.setAttribute('in','drop_shadow_1');
     feOffset.setAttribute('result','drop_shadow_2');
     this.feOffset = feOffset;
     filter.appendChild(feOffset);
-    var feFlood = _ct('feFlood');
+    var feFlood = createNS('feFlood');
     feFlood.setAttribute('flood-color','#00ff00');
     feFlood.setAttribute('flood-opacity','1');
     feFlood.setAttribute('result','drop_shadow_3');
     this.feFlood = feFlood;
     filter.appendChild(feFlood);
 
-    var feComposite = _ct('feComposite');
+    var feComposite = createNS('feComposite');
     feComposite.setAttribute('in','drop_shadow_3');
     feComposite.setAttribute('in2','drop_shadow_2');
     feComposite.setAttribute('operator','in');
@@ -7946,12 +7954,12 @@
     filter.appendChild(feComposite);
 
 
-    var feMerge = _ct('feMerge');
+    var feMerge = createNS('feMerge');
     filter.appendChild(feMerge);
     var feMergeNode;
-    feMergeNode = _ct('feMergeNode');
+    feMergeNode = createNS('feMergeNode');
     feMerge.appendChild(feMergeNode);
-    feMergeNode = _ct('feMergeNode');
+    feMergeNode = createNS('feMergeNode');
     feMergeNode.setAttribute('in','SourceGraphic');
     this.feMergeNode = feMergeNode;
     this.feMerge = feMerge;
@@ -7959,31 +7967,31 @@
     feMerge.appendChild(feMergeNode);
 }
 
-_bg.prototype._ba = function(forceRender){
-    if(forceRender || this._cl.mdf){
-        if(forceRender || this._cl._cm[4].p.mdf){
-            this.feGaussianBlur.setAttribute('stdDeviation', this._cl._cm[4].p.v / 4);
+SVGDropShadowEffect.prototype.renderFrame = function(forceRender){
+    if(forceRender || this.filterManager._mdf){
+        if(forceRender || this.filterManager.effectElements[4].p._mdf){
+            this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
         }
-        if(forceRender || this._cl._cm[0].p.mdf){
-            var col = this._cl._cm[0].p.v;
+        if(forceRender || this.filterManager.effectElements[0].p._mdf){
+            var col = this.filterManager.effectElements[0].p.v;
             this.feFlood.setAttribute('flood-color',rgbToHex(Math.round(col[0]*255),Math.round(col[1]*255),Math.round(col[2]*255)));
         }
-        if(forceRender || this._cl._cm[1].p.mdf){
-            this.feFlood.setAttribute('flood-opacity',this._cl._cm[1].p.v/255);
+        if(forceRender || this.filterManager.effectElements[1].p._mdf){
+            this.feFlood.setAttribute('flood-opacity',this.filterManager.effectElements[1].p.v/255);
         }
-        if(forceRender || this._cl._cm[2].p.mdf || this._cl._cm[3].p.mdf){
-            var distance = this._cl._cm[3].p.v
-            var angle = (this._cl._cm[2].p.v - 90) * degToRads
-            var x = distance * Math.cos(angle)
-            var y = distance * Math.sin(angle)
+        if(forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf){
+            var distance = this.filterManager.effectElements[3].p.v;
+            var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
+            var x = distance * Math.cos(angle);
+            var y = distance * Math.sin(angle);
             this.feOffset.setAttribute('dx', x);
             this.feOffset.setAttribute('dy', y);
         }
-        /*if(forceRender || this._cl._cm[5].p.mdf){
-            if(this._cl._cm[5].p.v === 1 && this.originalNodeAdded) {
+        /*if(forceRender || this.filterManager.effectElements[5].p._mdf){
+            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
                 this.feMerge.removeChild(this.feMergeNode);
                 this.originalNodeAdded = false;
-            } else if(this._cl._cm[5].p.v === 0 && !this.originalNodeAdded) {
+            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
                 this.feMerge.appendChild(this.feMergeNode);
                 this.originalNodeAdded = true;
             }
@@ -7993,18 +8001,18 @@
 var _svgMatteSymbols = [];
 var _svgMatteMaskCounter = 0;
 
-function _bh(filterElem, _cl, elem){
+function SVGMatte3Effect(filterElem, filterManager, elem){
     this.initialized = false;
-    this._cl = _cl;
+    this.filterManager = filterManager;
     this.filterElem = filterElem;
     this.elem = elem;
-    elem.matteElement = _ct('g');
-    elem.matteElement.appendChild(elem._bx);
-    elem.matteElement.appendChild(elem._bz);
-    elem._by = elem.matteElement;
+    elem.matteElement = createNS('g');
+    elem.matteElement.appendChild(elem.layerElement);
+    elem.matteElement.appendChild(elem.transformedElement);
+    elem.baseElement = elem.matteElement;
 }
 
-_bh.prototype.findSymbol = function(mask) {
+SVGMatte3Effect.prototype.findSymbol = function(mask) {
     var i = 0, len = _svgMatteSymbols.length;
     while(i < len) {
         if(_svgMatteSymbols[i] === mask) {
@@ -8013,17 +8021,17 @@
         i += 1;
     }
     return null;
-}
+};
 
-_bh.prototype.replaceInParent = function(mask, symbolId) {
-    var parentNode = mask._bx.parentNode;
+SVGMatte3Effect.prototype.replaceInParent = function(mask, symbolId) {
+    var parentNode = mask.layerElement.parentNode;
     if(!parentNode) {
         return;
     }
     var children = parentNode.children;
     var i = 0, len = children.length;
     while (i < len) {
-        if (children[i] === mask._bx) {
+        if (children[i] === mask.layerElement) {
             break;
         }
         i += 1;
@@ -8032,102 +8040,99 @@
     if (i <= len - 2) {
         nextChild = children[i + 1];
     }
-    var useElem = _ct('use');
+    var useElem = createNS('use');
     useElem.setAttribute('href', '#' + symbolId);
     if(nextChild) {
         parentNode.insertBefore(useElem, nextChild);
     } else {
         parentNode.appendChild(useElem);
     }
-}
+};
 
-_bh.prototype.setElementAsMask = function(elem, mask) {
+SVGMatte3Effect.prototype.setElementAsMask = function(elem, mask) {
     if(!this.findSymbol(mask)) {
         var symbolId = 'matte_' + randomString(5) + '_' + _svgMatteMaskCounter++;
-        var masker = _ct('mask');
+        var masker = createNS('mask');
         masker.setAttribute('id', mask.layerId);
         masker.setAttribute('mask-type', 'alpha');
         _svgMatteSymbols.push(mask);
-        var defs = elem._x.defs;
+        var defs = elem.globalData.defs;
         defs.appendChild(masker);
-        var symbol = _ct('symbol');
+        var symbol = createNS('symbol');
         symbol.setAttribute('id', symbolId);
         this.replaceInParent(mask, symbolId);
-        symbol.appendChild(mask._bx);
+        symbol.appendChild(mask.layerElement);
         defs.appendChild(symbol);
-        useElem = _ct('use');
+        useElem = createNS('use');
         useElem.setAttribute('href', '#' + symbolId);
         masker.appendChild(useElem);
         mask.data.hd = false;
         mask.show();
     }
     elem.setMatte(mask.layerId);
-}
+};
 
-_bh.prototype.initialize = function() {
-    var ind = this._cl._cm[0].p.v;
-    var i = 0, len = this.elem.comp._br.length;
+SVGMatte3Effect.prototype.initialize = function() {
+    var ind = this.filterManager.effectElements[0].p.v;
+    var i = 0, len = this.elem.comp.elements.length;
     while (i < len) {
-    	if (this.elem.comp._br[i].data.ind === ind) {
-    		this.setElementAsMask(this.elem, this.elem.comp._br[i]);
+    	if (this.elem.comp.elements[i].data.ind === ind) {
+    		this.setElementAsMask(this.elem, this.elem.comp.elements[i]);
     	}
     	i += 1;
     }
     this.initialized = true;
-}
+};
 
-_bh.prototype._ba = function() {
+SVGMatte3Effect.prototype.renderFrame = function() {
 	if(!this.initialized) {
 		this.initialize();
 	}
-}
-function _bi(elem){
+};
+function SVGEffects(elem){
     var i, len = elem.data.ef ? elem.data.ef.length : 0;
     var filId = randomString(10);
     var fil = filtersFactory.createFilter(filId);
     var count = 0;
     this.filters = [];
-    var _cl;
+    var filterManager;
     for(i=0;i<len;i+=1){
+        filterManager = null;
         if(elem.data.ef[i].ty === 20){
             count += 1;
-            _cl = new _bb(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 21){
             count += 1;
-            _cl = new _bc(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 22){
-            _cl = new _bd(elem, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 23){
             count += 1;
-            _cl = new _be(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 24){
             count += 1;
-            _cl = new _bf(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 25){
             count += 1;
-            _cl = new _bg(fil, elem.effects._cm[i]);
-            this.filters.push(_cl);
+            filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
         }else if(elem.data.ef[i].ty === 28){
             //count += 1;
-            _cl = new _bh(fil, elem.effects._cm[i], elem);
-            this.filters.push(_cl);
+            filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
+        }
+        if(filterManager) {
+            this.filters.push(filterManager);
         }
     }
     if(count){
-        elem._x.defs.appendChild(fil);
-        elem._bx.setAttribute('filter','url(' + locationHref + '#'+filId+')');
+        elem.globalData.defs.appendChild(fil);
+        elem.layerElement.setAttribute('filter','url(' + locationHref + '#'+filId+')');
     }
 }
 
-_bi.prototype._ba = function(_ch){
+SVGEffects.prototype.renderFrame = function(_isFirstFrame){
     var i, len = this.filters.length;
     for(i=0;i<len;i+=1){
-        this.filters[i]._ba(_ch);
+        this.filters[i].renderFrame(_isFirstFrame);
     }
 };
 var animationManager = (function(){
@@ -8166,7 +8171,7 @@
             }
             i+=1;
         }
-        var animItem = new _a();
+        var animItem = new AnimationItem();
         setupAnimation(animItem, element);
         animItem.setData(element, animationData);
         return animItem;
@@ -8193,7 +8198,7 @@
     }
 
     function loadAnimation(params){
-        var animItem = new _a();
+        var animItem = new AnimationItem();
         setupAnimation(animItem, null);
         animItem.setParams(params);
         return animItem;
@@ -8220,14 +8225,6 @@
             registeredAnimations[i].animation.play(animation);
         }
     }
-
-    function moveFrame (value, animation) {
-        initTime = Date.now();
-        var i;
-        for(i=0;i<len;i+=1){
-            registeredAnimations[i].animation.moveFrame(value,animation);
-        }
-    }
     function resume(nowTime) {
         var elapsedTime = nowTime - initTime;
         var i;
@@ -8298,7 +8295,7 @@
             }
             var body = document.getElementsByTagName('body')[0];
             body.innerHTML = '';
-            var div = _cu('div');
+            var div = createTag('div');
             div.style.width = '100%';
             div.style.height = '100%';
             div.setAttribute('data-bm-type',renderer);
@@ -8337,7 +8334,6 @@
     moduleOb.setSpeed = setSpeed;
     moduleOb.setDirection = setDirection;
     moduleOb.play = play;
-    moduleOb.moveFrame = moveFrame;
     moduleOb.pause = pause;
     moduleOb.stop = stop;
     moduleOb.togglePause = togglePause;
@@ -8349,7 +8345,7 @@
     return moduleOb;
 }());
 
-var _a = function () {
+var AnimationItem = function () {
     this._cbs = [];
     this.name = '';
     this.path = '';
@@ -8361,7 +8357,7 @@
     this.frameMult = 0;
     this.playSpeed = 1;
     this.playDirection = 1;
-    this._dc = 0;
+    this.pendingElements = 0;
     this.playCount = 0;
     this.animationData = {};
     this.layers = [];
@@ -8376,14 +8372,13 @@
     this.segmentPos = 0;
     this.subframeEnabled = subframeEnabled;
     this.segments = [];
-    this.pendingSegment = false;
     this._idle = true;
     this.projectInterface = ProjectInterface();
 };
 
-extendPrototype([BaseEvent], _a);
+extendPrototype([BaseEvent], AnimationItem);
 
-_a.prototype.setParams = function(params) {
+AnimationItem.prototype.setParams = function(params) {
     var self = this;
     if(params.context){
         this.context = params.context;
@@ -8394,15 +8389,13 @@
     var animType = params.animType ? params.animType : params.renderer ? params.renderer : 'svg';
     switch(animType){
         case 'canvas':
-            this.renderer = new _aq(this, params.rendererSettings);
+            this.renderer = new CanvasRenderer(this, params.rendererSettings);
             break;
         case 'svg':
-            this.renderer = new _ao(this, params.rendererSettings);
+            this.renderer = new SVGRenderer(this, params.rendererSettings);
             break;
-        case 'hybrid':
-        case 'html':
         default:
-            this.renderer = new _ap(this, params.rendererSettings);
+            this.renderer = new HybridRenderer(this, params.rendererSettings);
             break;
     }
     this.renderer.setProjectInterface(this.projectInterface);
@@ -8456,7 +8449,7 @@
     }
 };
 
-_a.prototype.setData = function (wrapper, animationData) {
+AnimationItem.prototype.setData = function (wrapper, animationData) {
     var params = {
         wrapper: wrapper,
         animationData: animationData ? (typeof animationData  === "object") ? animationData : JSON.parse(animationData) : null
@@ -8487,7 +8480,7 @@
     this.setParams(params);
 };
 
-_a.prototype.includeLayers = function(data) {
+AnimationItem.prototype.includeLayers = function(data) {
     if(data.op > this.animationData.op){
         this.animationData.op = data.op;
         this.totalFrames = Math.floor(data.op - this.animationData.ip);
@@ -8508,8 +8501,8 @@
         }
     }
     if(data.chars || data.fonts){
-        this.renderer._x._cr.addChars(data.chars);
-        this.renderer._x._cr.addFonts(data.fonts, this.renderer._x.defs);
+        this.renderer.globalData.fontManager.addChars(data.chars);
+        this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
     }
     if(data.assets){
         len = data.assets.length;
@@ -8520,16 +8513,16 @@
     //this.totalFrames = 50;
     //this.animationData.tf = 50;
     this.animationData.__complete = false;
-    dataManager.completeData(this.animationData,this.renderer._x._cr);
+    dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
     this.renderer.includeLayers(data.layers);
     if(expressionsPlugin){
         expressionsPlugin.initExpressions(this);
     }
-    this.renderer._ba(null);
+    this.renderer.renderFrame(-1);
     this.loadNextSegment();
 };
 
-_a.prototype.loadNextSegment = function() {
+AnimationItem.prototype.loadNextSegment = function() {
     var segments = this.animationData.segments;
     if(!segments || segments.length === 0 || !this.autoloadSegments){
         this.trigger('data_ready');
@@ -8559,7 +8552,7 @@
     };
 };
 
-_a.prototype.loadSegments = function() {
+AnimationItem.prototype.loadSegments = function() {
     var segments = this.animationData.segments;
     if(!segments) {
         this.timeCompleted = this.animationData.tf;
@@ -8567,7 +8560,7 @@
     this.loadNextSegment();
 };
 
-_a.prototype.configAnimation = function (animData) {
+AnimationItem.prototype.configAnimation = function (animData) {
     var _this = this;
     if(this.renderer && this.renderer.destroyed){
         return;
@@ -8591,7 +8584,7 @@
     this.layers = this.animationData.layers;
     this.assets = this.animationData.assets;
     this.frameRate = this.animationData.fr;
-    this._ch = Math.round(this.animationData.ip);
+    this.firstFrame = Math.round(this.animationData.ip);
     this.frameMult = this.animationData.fr / 1000;
     this.trigger('config_ready');
     this.imagePreloader = new ImagePreloader();
@@ -8604,18 +8597,18 @@
     });
     this.loadSegments();
     this.updaFrameModifier();
-    if(this.renderer._x._cr){
+    if(this.renderer.globalData.fontManager){
         this.waitForFontsLoaded();
     }else{
-        dataManager.completeData(this.animationData,this.renderer._x._cr);
+        dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
         this.checkLoaded();
     }
 };
 
-_a.prototype.waitForFontsLoaded = (function(){
+AnimationItem.prototype.waitForFontsLoaded = (function(){
     function checkFontsLoaded(){
-        if(this.renderer._x._cr.loaded){
-            dataManager.completeData(this.animationData,this.renderer._x._cr);
+        if(this.renderer.globalData.fontManager.loaded){
+            dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
             //this.renderer.buildItems(this.animationData.layers);
             this.checkLoaded();
         }else{
@@ -8628,17 +8621,17 @@
     };
 }());
 
-_a.prototype.addPendingElement = function () {
-    this._dc += 1;
+AnimationItem.prototype.addPendingElement = function () {
+    this.pendingElements += 1;
 };
 
-_a.prototype.elementLoaded = function () {
-    this._dc--;
+AnimationItem.prototype.elementLoaded = function () {
+    this.pendingElements--;
     this.checkLoaded();
 };
 
-_a.prototype.checkLoaded = function () {
-    if (this._dc === 0) {
+AnimationItem.prototype.checkLoaded = function () {
+    if (this.pendingElements === 0) {
         if(expressionsPlugin){
             expressionsPlugin.initExpressions(this);
         }
@@ -8654,33 +8647,35 @@
     }
 };
 
-_a.prototype.resize = function () {
+AnimationItem.prototype.resize = function () {
     this.renderer.updateContainerSize();
 };
 
-_a.prototype.setSubframe = function(flag){
+AnimationItem.prototype.setSubframe = function(flag){
     this.subframeEnabled = flag ? true : false;
 };
 
-_a.prototype.gotoFrame = function () {
+AnimationItem.prototype.gotoFrame = function () {
     this.currentFrame = this.subframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame;
 
     if(this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted){
         this.currentFrame = this.timeCompleted;
     }
+    //console.log(this.currentFrame)
     this.trigger('enterFrame');
-    this._ba();
+    // console.log('gotoFrame: ', this.currentFrame )
+    this.renderFrame();
 };
 
-_a.prototype._ba = function () {
+AnimationItem.prototype.renderFrame = function () {
     if(this.isLoaded === false){
         return;
     }
-    //console.log('this.currentFrame:',this.currentFrame + this._ch);
-    this.renderer._ba(this.currentFrame + this._ch);
+    //console.log('this.currentFrame:',this.currentFrame + this.firstFrame);
+    this.renderer.renderFrame(this.currentFrame + this.firstFrame);
 };
 
-_a.prototype.play = function (name) {
+AnimationItem.prototype.play = function (name) {
     if(name && this.name != name){
         return;
     }
@@ -8693,20 +8688,18 @@
     }
 };
 
-_a.prototype.pause = function (name) {
+AnimationItem.prototype.pause = function (name) {
     if(name && this.name != name){
         return;
     }
     if(this.isPaused === false){
         this.isPaused = true;
-        if(!this.pendingSegment){
-            this._idle = true;
-            this.trigger('_idle');
-        }
+        this._idle = true;
+        this.trigger('_idle');
     }
 };
 
-_a.prototype.togglePause = function (name) {
+AnimationItem.prototype.togglePause = function (name) {
     if(name && this.name != name){
         return;
     }
@@ -8717,17 +8710,16 @@
     }
 };
 
-_a.prototype.stop = function (name) {
+AnimationItem.prototype.stop = function (name) {
     if(name && this.name != name){
         return;
     }
     this.pause();
-    this.currentFrame = this.currentRawFrame = 0;
     this.playCount = 0;
-    this.gotoFrame();
+    this.setCurrentRawFrameValue(0);
 };
 
-_a.prototype.goToAndStop = function (value, isFrame, name) {
+AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
     if(name && this.name != name){
         return;
     }
@@ -8739,38 +8731,48 @@
     this.pause();
 };
 
-_a.prototype.goToAndPlay = function (value, isFrame, name) {
+AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
     this.goToAndStop(value, isFrame, name);
     this.play();
 };
 
-_a.prototype.advanceTime = function (value) {
-    if(this.pendingSegment){
-        this.pendingSegment = false;
-        this.adjustSegment(this.segments.shift());
-        if(this.isPaused){
-            this.play();
-        }
-        return;
-    }
+AnimationItem.prototype.advanceTime = function (value) {
     if (this.isPaused === true || this.isLoaded === false) {
         return;
     }
-    this.setCurrentRawFrameValue(this.currentRawFrame + value * this.frameModifier);
-};
-
-_a.prototype.updateAnimation = function (perc) {
-    this.setCurrentRawFrameValue(this.totalFrames * perc);
-};
-
-_a.prototype.moveFrame = function (value, name) {
-    if(name && this.name != name){
-        return;
+    var nextValue = this.currentRawFrame + value * this.frameModifier;
+    var _isComplete = false;
+    if (nextValue >= this.totalFrames) {
+        if(!this.checkSegments(nextValue % this.totalFrames)) {
+            if (this.loop && !(++this.playCount === this.loop)) {
+                this.setCurrentRawFrameValue(nextValue % this.totalFrames);
+                this.trigger('loopComplete');
+            } else {
+                _isComplete = true;
+                nextValue = this.totalFrames;
+            }
+        }
+    } else if(nextValue < 0) {
+        if(!this.checkSegments(nextValue % this.totalFrames)) {
+            if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
+                this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
+                this.trigger('loopComplete');
+            } else {
+                _isComplete = true;
+                nextValue = 0;
+            }
+        }
+    } else {
+        this.setCurrentRawFrameValue(nextValue);
     }
-    this.setCurrentRawFrameValue(this.currentRawFrame+value);
+    if (_isComplete) {
+        this.setCurrentRawFrameValue(nextValue);
+        this.pause();
+        this.trigger('complete');
+    }
 };
 
-_a.prototype.adjustSegment = function(arr){
+AnimationItem.prototype.adjustSegment = function(arr, offset){
     this.playCount = 0;
     if(arr[1] < arr[0]){
         if(this.frameModifier > 0){
@@ -8781,8 +8783,8 @@
             }
         }
         this.totalFrames = arr[0] - arr[1];
-        this._ch = arr[1];
-        this.setCurrentRawFrameValue(this.totalFrames - 0.001);
+        this.firstFrame = arr[1];
+        this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
     } else if(arr[1] > arr[0]){
         if(this.frameModifier < 0){
             if(this.playSpeed < 0){
@@ -8792,29 +8794,29 @@
             }
         }
         this.totalFrames = arr[1] - arr[0];
-        this._ch = arr[0];
-        this.setCurrentRawFrameValue(0.001);
+        this.firstFrame = arr[0];
+        this.setCurrentRawFrameValue(0.001 + offset);
     }
     this.trigger('segmentStart');
 };
-_a.prototype.setSegment = function (init,end) {
+AnimationItem.prototype.setSegment = function (init,end) {
     var pendingFrame = -1;
     if(this.isPaused) {
-        if (this.currentRawFrame + this._ch < init) {
+        if (this.currentRawFrame + this.firstFrame < init) {
             pendingFrame = init;
-        } else if (this.currentRawFrame + this._ch > end) {
+        } else if (this.currentRawFrame + this.firstFrame > end) {
             pendingFrame = end - init;
         }
     }
 
-    this._ch = init;
+    this.firstFrame = init;
     this.totalFrames = end - init;
     if(pendingFrame !== -1) {
         this.goToAndStop(pendingFrame,true);
     }
 };
 
-_a.prototype.playSegments = function (arr,forceFlag) {
+AnimationItem.prototype.playSegments = function (arr,forceFlag) {
     if(typeof arr[0] === 'object'){
         var i, len = arr.length;
         for(i=0;i<len;i+=1){
@@ -8824,35 +8826,38 @@
         this.segments.push(arr);
     }
     if(forceFlag){
-        this.adjustSegment(this.segments.shift());
+        this.checkSegments(0);
     }
     if(this.isPaused){
         this.play();
     }
 };
 
-_a.prototype.resetSegments = function (forceFlag) {
+AnimationItem.prototype.resetSegments = function (forceFlag) {
     this.segments.length = 0;
     this.segments.push([this.animationData.ip,this.animationData.op]);
     //this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op - this.animationData.ip+this.animationData.ip*this.frameRate)]);
     if(forceFlag){
-        this.adjustSegment(this.segments.shift());
+        this.checkSegments(0);
     }
 };
-_a.prototype.checkSegments = function(){
-    if(this.segments.length){
-        this.pendingSegment = true;
+AnimationItem.prototype.checkSegments = function(offset){
+    if(this.segments.length) {
+        //console.log(this.currentRawFrame % lastFrame)
+        this.adjustSegment(this.segments.shift(), offset);
+        return true;
     }
+    return false;
 };
 
-_a.prototype.remove = function (name) {
+AnimationItem.prototype.remove = function (name) {
     if(name && this.name != name){
         return;
     }
     this.renderer.destroy();
 };
 
-_a.prototype.destroy = function (name) {
+AnimationItem.prototype.destroy = function (name) {
     if((name && this.name != name) || (this.renderer && this.renderer.destroyed)){
         return;
     }
@@ -8863,66 +8868,30 @@
     this.renderer = null;
 };
 
-_a.prototype.setCurrentRawFrameValue = function(value){
+AnimationItem.prototype.setCurrentRawFrameValue = function(value){
     this.currentRawFrame = value;
-    //console.log(this.totalFrames);
-    var _completeFlag = false;
-    if (this.currentRawFrame >= this.totalFrames) {
-        this.checkSegments();
-        if(this.loop === false){
-            this.currentRawFrame = this.totalFrames;
-            _completeFlag = true;
-        }else{
-            this.trigger('loopComplete');
-            this.playCount += 1;
-            if((this.loop !== true && this.playCount == this.loop) || this.pendingSegment){
-                this.currentRawFrame = this.totalFrames;
-                _completeFlag = true;
-            } else {
-                this.currentRawFrame = this.currentRawFrame % this.totalFrames;
-            }
-        }
-    } else if (this.currentRawFrame < 0) {
-        this.checkSegments();
-        this.playCount -= 1;
-        if(this.playCount < 0){
-            this.playCount = 0;
-        }
-        if(this.loop === false  || this.pendingSegment){
-            this.currentRawFrame = 0;
-            _completeFlag = true;
-        }else{
-            this.trigger('loopComplete');
-            this.currentRawFrame = (this.totalFrames + this.currentRawFrame) % this.totalFrames;
-        }
-    }
-
     this.gotoFrame();
-    if(_completeFlag) {
-        this.pause();
-        this.trigger('complete');
-    }
 };
 
-_a.prototype.setSpeed = function (val) {
+AnimationItem.prototype.setSpeed = function (val) {
     this.playSpeed = val;
     this.updaFrameModifier();
 };
 
-_a.prototype.setDirection = function (val) {
+AnimationItem.prototype.setDirection = function (val) {
     this.playDirection = val < 0 ? -1 : 1;
     this.updaFrameModifier();
 };
 
-_a.prototype.updaFrameModifier = function () {
+AnimationItem.prototype.updaFrameModifier = function () {
     this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
 };
 
-_a.prototype.getPath = function () {
+AnimationItem.prototype.getPath = function () {
     return this.path;
 };
 
-_a.prototype.getAssetsPath = function (assetData) {
+AnimationItem.prototype.getAssetsPath = function (assetData) {
     var path = '';
     if(this.assetsPath){
         var imagePath = assetData.p;
@@ -8938,7 +8907,7 @@
     return path;
 };
 
-_a.prototype.getAssetData = function (id) {
+AnimationItem.prototype.getAssetData = function (id) {
     var i = 0, len = this.assets.length;
     while (i < len) {
         if(id == this.assets[i].id){
@@ -8948,38 +8917,38 @@
     }
 };
 
-_a.prototype.hide = function () {
+AnimationItem.prototype.hide = function () {
     this.renderer.hide();
 };
 
-_a.prototype.show = function () {
+AnimationItem.prototype.show = function () {
     this.renderer.show();
 };
 
-_a.prototype.getAssets = function () {
+AnimationItem.prototype.getAssets = function () {
     return this.assets;
 };
 
-_a.prototype.trigger = function(name){
+AnimationItem.prototype.trigger = function(name){
     if(this._cbs && this._cbs[name]){
         switch(name){
             case 'enterFrame':
-                this._cy(name,new BMEnterFrameEvent(name,this.currentFrame,this.totalFrames,this.frameMult));
+                this.triggerEvent(name,new BMEnterFrameEvent(name,this.currentFrame,this.totalFrames,this.frameMult));
                 break;
             case 'loopComplete':
-                this._cy(name,new BMCompleteLoopEvent(name,this.loop,this.playCount,this.frameMult));
+                this.triggerEvent(name,new BMCompleteLoopEvent(name,this.loop,this.playCount,this.frameMult));
                 break;
             case 'complete':
-                this._cy(name,new BMCompleteEvent(name,this.frameMult));
+                this.triggerEvent(name,new BMCompleteEvent(name,this.frameMult));
                 break;
             case 'segmentStart':
-                this._cy(name,new BMSegmentStartEvent(name,this._ch,this.totalFrames));
+                this.triggerEvent(name,new BMSegmentStartEvent(name,this.firstFrame,this.totalFrames));
                 break;
             case 'destroy':
-                this._cy(name,new BMDestroyEvent(name,this));
+                this.triggerEvent(name,new BMDestroyEvent(name,this));
                 break;
             default:
-                this._cy(name);
+                this.triggerEvent(name);
         }
     }
     if(name === 'enterFrame' && this.onEnterFrame){
@@ -8992,7 +8961,7 @@
         this.onComplete.call(this,new BMCompleteEvent(name,this.frameMult));
     }
     if(name === 'segmentStart' && this.onSegmentStart){
-        this.onSegmentStart.call(this,new BMSegmentStartEvent(name,this._ch,this.totalFrames));
+        this.onSegmentStart.call(this,new BMSegmentStartEvent(name,this.firstFrame,this.totalFrames));
     }
     if(name === 'destroy' && this.onDestroy){
         this.onDestroy.call(this,new BMDestroyEvent(name,this));
@@ -9027,10 +8996,6 @@
         animationManager.stop(animation);
     }
 
-    function moveFrame(value) {
-        animationManager.moveFrame(value);
-    }
-
     function searchAnimations() {
         if (standalone === true) {
             animationManager.searchAnimations(animationData, standalone, renderer);
@@ -9106,9 +9071,9 @@
     function getFactory(name) {
         switch (name) {
             case "propertyFactory":
-                return _ai;
-            case "shape_ai":
-                return _ah;
+                return PropertyFactory;
+            case "shapePropertyFactory":
+                return ShapePropertyFactory;
             case "matrix":
                 return Matrix;
         }
@@ -9120,7 +9085,6 @@
     lottiejs.setSpeed = setSpeed;
     lottiejs.setDirection = setDirection;
     lottiejs.stop = stop;
-    lottiejs.moveFrame = moveFrame;
     lottiejs.searchAnimations = searchAnimations;
     lottiejs.registerAnimation = registerAnimation;
     lottiejs.loadAnimation = loadAnimation;
@@ -9133,7 +9097,7 @@
     lottiejs.inBrowser = inBrowser;
     lottiejs.installPlugin = installPlugin;
     lottiejs.__getFactory = getFactory;
-    lottiejs.version = '5.0.6';
+    lottiejs.version = '5.1.0';
 
     function checkReady() {
         if (document.readyState === "complete") {
diff --git a/build/player/lottie_light.min.js b/build/player/lottie_light.min.js
index 23456e6..bfb3e70 100644
--- a/build/player/lottie_light.min.js
+++ b/build/player/lottie_light.min.js
@@ -1,5 +1,5 @@
-!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(t):(t.lottie=e(t),t.bodymovin=t.lottie)}(window||{},function(t){"use strict";function e(){return{}}function s(t){zt=t?Math.round:function(t){return t}}function a(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}function r(t,e){this.type=t,this.direction=e<0?-1:1}function n(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=i<0?-1:1}function h(t,e,s){this.type=t,this._ch=e,this.totalFrames=s}function o(t,e){this.type=t,this.target=e}function p(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}function l(t,e,s){var i,a,r,n,h,o,p,l;switch(1===arguments.length&&(e=t.s,s=t.v,t=t.h),n=Math.floor(6*t),h=6*t-n,o=s*(1-e),p=s*(1-h*e),l=s*(1-(1-h)*e),n%6){case 0:i=s,a=l,r=o;break;case 1:i=p,a=s,r=o;break;case 2:i=o,a=s,r=l;break;case 3:i=o,a=p,r=s;break;case 4:i=l,a=o,r=s;break;case 5:i=s,a=o,r=p}return[i,a,r]}function f(t,e,s){1===arguments.length&&(e=t.g,s=t.b,t=t.r);var i,a=Math.max(t,e,s),r=Math.min(t,e,s),n=a-r,h=0===a?0:n/a,o=a/255;switch(a){case r:i=0;break;case t:i=e-s+n*(e<s?6:0),i/=6*n;break;case e:i=s-t+2*n,i/=6*n;break;case s:i=t-e+4*n,i/=6*n}return[i,h,o]}function m(t,e){var s=f(255*t[0],255*t[1],255*t[2]);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),l(s[0],s[1],s[2])}function d(t,e){var s=f(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),l(s[0],s[1],s[2])}function c(t,e){var s=f(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),l(s[0],s[1],s[2])}function u(){}function g(t){return Array.apply(null,{length:t})}function y(t){return document.createElementNS(Bt,t)}function v(t){return document.createElement(t)}function b(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1){i=t[s].prototype;for(var r in i)i.hasOwnProperty(r)&&(e.prototype[r]=i[r])}}function k(){function t(t,e,s,i,a,r){var n=t*i+e*a+s*r-a*i-r*t-s*e;return n>-1e-4&&n<1e-4}function e(e,s,i,a,r,n,h,o,p){if(0===i&&0===n&&0===p)return t(e,s,a,r,h,o);var l,f=Math.sqrt(Math.pow(a-e,2)+Math.pow(r-s,2)+Math.pow(n-i,2)),m=Math.sqrt(Math.pow(h-e,2)+Math.pow(o-s,2)+Math.pow(p-i,2)),d=Math.sqrt(Math.pow(h-a,2)+Math.pow(o-r,2)+Math.pow(p-n,2));return l=f>m?f>d?f-m-d:d-m-f:d>m?d-m-f:m-f-d,l>-1e-4&&l<1e-4}function s(t){var e,s=ye.newElement(),i=t.c,a=t.v,r=t.o,n=t.i,h=t._length,p=s.lengths,l=0;for(e=0;e<h-1;e+=1)p[e]=o(a[e],a[e+1],r[e],n[e+1]),l+=p[e].addedLength;return i&&(p[e]=o(a[e],a[0],r[e],n[0]),l+=p[e].addedLength),s.totalLength=l,s}function i(t){this.segmentLength=0,this.points=new Array(t)}function a(t,e){this.partialLength=t,this.point=e}function r(t,e){var s=e.percents,i=e.lengths,a=s.length,r=qt((a-1)*t),n=t*e.addedLength,h=0;if(r===a-1||0===r||n===i[r])return s[r];for(var o=i[r]>n?-1:1,p=!0;p;)if(i[r]<=n&&i[r+1]>n?(h=(n-i[r])/(i[r+1]-i[r]),p=!1):r+=o,r<0||r>=a-1){if(r===a-1)return s[r];p=!1}return s[r]+(s[r+1]-s[r])*h}function n(t,e,s,i,a,n){var h=r(a,n),o=1-h,p=Math.round(1e3*(o*o*o*t[0]+(h*o*o+o*h*o+o*o*h)*s[0]+(h*h*o+o*h*h+h*o*h)*i[0]+h*h*h*e[0]))/1e3,l=Math.round(1e3*(o*o*o*t[1]+(h*o*o+o*h*o+o*o*h)*s[1]+(h*h*o+o*h*h+h*o*h)*i[1]+h*h*h*e[1]))/1e3;return[p,l]}function h(t,e,s,i,a,n,h){a=a<0?0:a>1?1:a;var o=r(a,h);n=n>1?1:n;var p,f=r(n,h),m=t.length,d=1-o,c=1-f,u=d*d*d,g=o*d*d*3,y=o*o*d*3,v=o*o*o,b=d*d*c,k=o*d*c+d*o*c+d*d*f,A=o*o*c+d*o*f+o*d*f,P=o*o*f,M=d*c*c,_=o*c*c+d*f*c+d*c*f,E=o*f*c+d*f*f+o*c*f,w=o*f*f,F=c*c*c,C=f*c*c+c*f*c+c*c*f,x=f*f*c+c*f*f+f*c*f,D=f*f*f;for(p=0;p<m;p+=1)l[4*p]=Math.round(1e3*(u*t[p]+g*s[p]+y*i[p]+v*e[p]))/1e3,l[4*p+1]=Math.round(1e3*(b*t[p]+k*s[p]+A*i[p]+P*e[p]))/1e3,l[4*p+2]=Math.round(1e3*(M*t[p]+_*s[p]+E*i[p]+w*e[p]))/1e3,l[4*p+3]=Math.round(1e3*(F*t[p]+C*s[p]+x*i[p]+D*e[p]))/1e3;return l}var o=(Math,function(){return function(t,e,s,i){var a,r,n,h,o,p,l=Jt,f=0,m=[],d=[],c=ve.newElement();for(n=s.length,a=0;a<l;a+=1){for(o=a/(l-1),p=0,r=0;r<n;r+=1)h=Wt(1-o,3)*t[r]+3*Wt(1-o,2)*o*s[r]+3*(1-o)*Wt(o,2)*i[r]+Wt(o,3)*e[r],m[r]=h,null!==d[r]&&(p+=Wt(m[r]-d[r],2)),d[r]=m[r];p&&(p=Xt(p),f+=p),c.percents[a]=o,c.lengths[a]=f}return c.addedLength=f,c}}()),p=function(){var e={};return function(s){var r=s.s,n=s.e,h=s.to,o=s.ti,p=(r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+h[0]+"_"+h[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(e[p])return void(s.bezierData=e[p]);var l,f,m,d,c,u,y,v=Jt,b=0,k=null;2===r.length&&(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+h[0],r[1]+h[1])&&t(r[0],r[1],n[0],n[1],n[0]+o[0],n[1]+o[1])&&(v=2);var A=new i(v);for(m=h.length,l=0;l<v;l+=1){for(y=g(m),c=l/(v-1),u=0,f=0;f<m;f+=1)d=Wt(1-c,3)*r[f]+3*Wt(1-c,2)*c*(r[f]+h[f])+3*(1-c)*Wt(c,2)*(n[f]+o[f])+Wt(c,3)*n[f],y[f]=d,null!==k&&(u+=Wt(y[f]-k[f],2));u=Xt(u),b+=u,A.points[l]=new a(u,y),k=y}A.segmentLength=b,s.bezierData=A,e[p]=A}}(),l=Qt("float32",8);return{getSegmentsLength:s,getNewSegment:h,getPointInSegment:n,buildBezierData:p,pointOnLine2D:t,pointOnLine3D:e}}function A(){function t(a,r,h){var o,p,l,f,m,d,c,u,g=a.length;for(f=0;f<g;f+=1)if(o=a[f],"ks"in o&&!o.completed){if(o.completed=!0,o.tt&&(a[f-1].td=o.tt),p=[],l=-1,o.hasMask){var y=o.masksProperties;for(d=y.length,m=0;m<d;m+=1)if(y[m].pt.k.i)i(y[m].pt.k);else for(u=y[m].pt.k.length,c=0;c<u;c+=1)y[m].pt.k[c].s&&i(y[m].pt.k[c].s[0]),y[m].pt.k[c].e&&i(y[m].pt.k[c].e[0])}0===o.ty?(o.layers=e(o.refId,r),t(o.layers,r,h)):4===o.ty?s(o.shapes):5==o.ty&&n(o,h)}}function e(t,e){for(var s=0,i=e.length;s<i;){if(e[s].id===t)return e[s].layers.__used?JSON.parse(JSON.stringify(e[s].layers)):(e[s].layers.__used=!0,e[s].layers);s+=1}}function s(t){var e,a,r,n=t.length,h=!1;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)i(t[e].ks.k);else for(r=t[e].ks.k.length,a=0;a<r;a+=1)t[e].ks.k[a].s&&i(t[e].ks.k[a].s[0]),t[e].ks.k[a].e&&i(t[e].ks.k[a].e[0]);h=!0}else"gr"==t[e].ty&&s(t[e].it)}function i(t){var e,s=t.i.length;for(e=0;e<s;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function a(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&void 0))}function r(e,s){e.__complete||(p(e),h(e),o(e),l(e),t(e.layers,e.assets,s),e.__complete=!0)}function n(t,e){0!==t.t.a.length||"m"in t.t.p||(t.singleShape=!0)}var h=function(){function t(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function e(e){var s,i=e.length;for(s=0;s<i;s+=1)5===e[s].ty&&t(e[s])}var s=[4,4,14];return function(t){if(a(s,t.v)&&(e(t.layers),t.assets)){var i,r=t.assets.length;for(i=0;i<r;i+=1)t.assets[i].layers&&e(t.assets[i].layers)}}}(),o=function(){var t=[4,7,99];return function(e){if(e.chars&&!a(t,e.v)){var s,r,n,h,o,p=e.chars.length;for(s=0;s<p;s+=1)if(e.chars[s].data&&e.chars[s].data.shapes)for(o=e.chars[s].data.shapes[0].it,n=o.length,r=0;r<n;r+=1)h=o[r].ks.k,h.__converted||(i(o[r].ks.k),h.__converted=!0)}}}(),p=function(){function t(e){var s,i,a,r=e.length;for(s=0;s<r;s+=1)if("gr"===e[s].ty)t(e[s].it);else if("fl"===e[s].ty||"st"===e[s].ty)if(e[s].c.k&&e[s].c.k[0].i)for(a=e[s].c.k.length,i=0;i<a;i+=1)e[s].c.k[i].s&&(e[s].c.k[i].s[0]/=255,e[s].c.k[i].s[1]/=255,e[s].c.k[i].s[2]/=255,e[s].c.k[i].s[3]/=255),e[s].c.k[i].e&&(e[s].c.k[i].e[0]/=255,e[s].c.k[i].e[1]/=255,e[s].c.k[i].e[2]/=255,e[s].c.k[i].e[3]/=255);else e[s].c.k[0]/=255,e[s].c.k[1]/=255,e[s].c.k[2]/=255,e[s].c.k[3]/=255}function e(e){var s,i=e.length;for(s=0;s<i;s+=1)4===e[s].ty&&t(e[s].shapes)}var s=[4,1,9];return function(t){if(a(s,t.v)&&(e(t.layers),t.assets)){var i,r=t.assets.length;for(i=0;i<r;i+=1)t.assets[i].layers&&e(t.assets[i].layers)}}}(),l=function(){function t(e){var s,i,a,r=e.length,n=!1;for(s=r-1;s>=0;s-=1)if("sh"==e[s].ty){if(e[s].ks.k.i)e[s].ks.k.c=e[s].closed;else for(a=e[s].ks.k.length,i=0;i<a;i+=1)e[s].ks.k[i].s&&(e[s].ks.k[i].s[0].c=e[s].closed),e[s].ks.k[i].e&&(e[s].ks.k[i].e[0].c=e[s].closed);n=!0}else"gr"==e[s].ty&&t(e[s].it)}function e(e){var s,i,a,r,n,h,o=e.length;for(i=0;i<o;i+=1){if(s=e[i],s.hasMask){var p=s.masksProperties;for(r=p.length,a=0;a<r;a+=1)if(p[a].pt.k.i)p[a].pt.k.c=p[a].cl;else for(h=p[a].pt.k.length,n=0;n<h;n+=1)p[a].pt.k[n].s&&(p[a].pt.k[n].s[0].c=p[a].cl),p[a].pt.k[n].e&&(p[a].pt.k[n].e[0].c=p[a].cl)}4===s.ty&&t(s.shapes)}}var s=[4,4,18];return function(t){if(a(s,t.v)&&(e(t.layers),t.assets)){var i,r=t.assets.length;for(i=0;i<r;i+=1)t.assets[i].layers&&e(t.assets[i].layers)}}}(),f={};return f.completeData=r,f}function P(){this.c=!1,this._length=0,this._maxLength=8,this.v=g(this._maxLength),this.o=g(this._maxLength),this.i=g(this._maxLength)}function M(){}function _(){}function E(){}function w(){}function F(){this._length=0,this._maxLength=4,this.shapes=g(this._maxLength)}function C(t,e,s,i){this.elem=t,this.frameId=-1,this.dataProps=g(e.length),this.renderer=s,this.mdf=!1,this.k=!1,this.dashStr="",this.dashArray=Qt("float32",e.length-1),this.dashoffset=Qt("float32",1);var a,r,n=e.length;for(a=0;a<n;a+=1)r=ae._bo(t,e[a].v,0,0,i),this.k=!!r.k||this.k,this.dataProps[a]={n:e[a].n,p:r};this.k?i.push(this):this.getValue(!0)}function x(t,e,s){this.prop=ae._bo(t,e.k,1,null,[]),this.data=e,this.k=this.prop.k,this.c=Qt("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=Qt("float32",i),this.cmdf=!1,this.omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.prop.k&&s.push(this),this.getValue(!0)}function D(t,e,s){this.mdf=!1,this._ch=!0,this._hasMaskedPath=!1,this._frameId=-1,this.__co=[],this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=g(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this._bt=[],this.lettersChangedFlag=!1}function S(t,e,s){var i={propType:!1},a=ae._bo,r=e.a;this.a={r:r.r?a(t,r.r,0,Ut,s):i,rx:r.rx?a(t,r.rx,0,Ut,s):i,ry:r.ry?a(t,r.ry,0,Ut,s):i,sk:r.sk?a(t,r.sk,0,Ut,s):i,sa:r.sa?a(t,r.sa,0,Ut,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=fe.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function T(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this.mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function I(t,e,s){this._frameId=jt,this.pv="",this.v="",this.kf=!1,this._ch=!0,this.mdf=!0,this.data=e,this.elem=t,this.keysIndex=-1,this.currentData={ascent:0,boxWidth:[0,0],f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:[0,0],fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,__complete:!1},this.searchProperty()?s.push(this):this.getValue(!0)}function L(){}function R(t,e){this._cq=t,this.layers=null,this.renderedFrame=-1,this._cf=y("svg");var s=y("g");this._cf.appendChild(s),this._bx=s;var i=y("defs");this._cf.appendChild(i),this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!e||e.hideOnTransparent!==!1,viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||""},this._x={mdf:!1,frameNum:-1,defs:i,frameId:0,_de:{w:0,h:0},renderConfig:this.renderConfig,_cr:new ie},this._br=[],this._dc=[],this.destroyed=!1}function V(t,e,s){this._co=[],this.data=t,this.element=e,this._x=s,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null,this._ch=!0;var i,a=this._x.defs,r=this.masksProperties?this.masksProperties.length:0;this.viewData=g(r),this.solidPath="";var n,h,o,l,f,m,d,c=this.masksProperties,u=0,v=[],b=p(10),k="clipPath",A="clip-path";for(i=0;i<r;i++)if(("a"!==c[i].mode&&"n"!==c[i].mode||c[i].inv||100!==c[i].o.k)&&(k="mask",A="mask"),"s"!=c[i].mode&&"i"!=c[i].mode||0!=u?l=null:(l=y("rect"),l.setAttribute("fill","#ffffff"),l.setAttribute("width",this.element.comp.data.w),l.setAttribute("height",this.element.comp.data.h),v.push(l)),n=y("path"),"n"!=c[i].mode){if(u+=1,n.setAttribute("fill","s"===c[i].mode?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),0!==c[i].x.k){k="mask",A="mask",d=ae._bo(this.element,c[i].x,0,null,this._co);var P="fi_"+p(10);f=y("filter"),f.setAttribute("id",P),m=y("feMorphology"),m.setAttribute("operator","dilate"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),f.appendChild(m),a.appendChild(f),n.setAttribute("stroke","s"===c[i].mode?"#000000":"#ffffff")}else m=null,d=null;if(this.storedData[i]={elem:n,x:d,expan:m,lastPath:"",lastOperator:"",filterId:P,lastRadius:0},"i"==c[i].mode){o=v.length;var M=y("g");for(h=0;h<o;h+=1)M.appendChild(v[h]);var _=y("mask");_.setAttribute("mask-type","alpha"),_.setAttribute("id",b+"_"+u),_.appendChild(n),a.appendChild(_),M.setAttribute("mask","url("+Ot+"#"+b+"_"+u+")"),v.length=0,v.push(M)}else v.push(n);c[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:n,lastPath:"",op:ae._bo(this.element,c[i].o,0,.01,this._co),prop:ne._bp(this.element,c[i],3,this._co,null)},l&&(this.viewData[i].invRect=l),this.viewData[i].prop.k||this.drawPath(c[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={op:ae._bo(this.element,c[i].o,0,.01,this._co),prop:ne._bp(this.element,c[i],3,this._co,null),elem:n},a.appendChild(n);for(this.maskElement=y(k),r=v.length,i=0;i<r;i+=1)this.maskElement.appendChild(v[i]);u>0&&(this.maskElement.setAttribute("id",b),this.element._ca.setAttribute(A,"url("+Ot+"#"+b+")"),a.appendChild(this.maskElement))}function N(){}function z(){}function B(){}function O(){}function j(){}function G(t,e){this.elem=t,this.pos=e}function W(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this.mdf=!1,this.closed=!1,this.pElem=y("path"),this.msElem=null}function X(t,e,s){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e}function q(t,e){this.transform={mProps:t,op:e},this._br=[]}function Y(t,e,s,i){this.o=ae._bo(t,e.o,0,.01,s),this.w=ae._bo(t,e.w,0,null,s),this.d=new C(t,e.d||{},"svg",s),this.c=ae._bo(t,e.c,1,255,s),this.style=i}function H(t,e,s,i){this.o=ae._bo(t,e.o,0,.01,s),this.c=ae._bo(t,e.c,1,255,s),this.style=i}function J(t,e,s,i){this.initGradientData(t,e,s,i)}function U(t,e,s,i){this.w=ae._bo(t,e.w,0,null,s),this.d=new C(t,e.d||{},"svg",s),this.initGradientData(t,e,s,i)}function Z(){this.it=[],this.prevViewData=[],this.gr=y("g")}function K(){}function Q(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function $(){}function tt(){}function et(){}function st(){}function it(t,e,s){this.assetData=e.getAssetData(t.refId),this._cz(t,e,s)}function at(t,e,s){this._cz(t,e,s)}function rt(t,e,s){this.layers=t.layers,this.supports3d=!0,this._db=!1,this._dc=[],this._br=this.layers?g(this.layers.length):[],this._cz(t,e,s),this.tm=t.tm?ae._bo(this,t.tm,0,e.frameRate,this._co):{_placeholder:!0}}function nt(t,e,s){this.textSpans=[],this.renderType="svg",this._cz(t,e,s)}function ht(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this._cz(t,e,s),this.prevViewData=[]}function ot(t,e){this._cl=e;var s=y("feColorMatrix");if(s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.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"),s.setAttribute("result","f1"),t.appendChild(s),s=y("feColorMatrix"),s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result","f2"),t.appendChild(s),this.matrixFilter=s,100!==e._cm[2].p.v||e._cm[2].p.k){var i=y("feMerge");t.appendChild(i);var a;a=y("feMergeNode"),a.setAttribute("in","SourceGraphic"),i.appendChild(a),a=y("feMergeNode"),a.setAttribute("in","f2"),i.appendChild(a)}}function pt(t,e){this._cl=e;var s=y("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(s),this.matrixFilter=s}function lt(t,e){this.initialized=!1,this._cl=e,this.elem=t,this.paths=[]}function ft(t,e){this._cl=e;var s=y("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.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"),s.setAttribute("result","f1"),t.appendChild(s);var i=y("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var a=y("feFuncR");a.setAttribute("type","table"),i.appendChild(a),this.feFuncR=a;var r=y("feFuncG");r.setAttribute("type","table"),i.appendChild(r),this.feFuncG=r;var n=y("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function mt(t,e){this._cl=e;var s=this._cl._cm,i=y("feComponentTransfer");(s[10].p.k||0!==s[10].p.v||s[11].p.k||1!==s[11].p.v||s[12].p.k||1!==s[12].p.v||s[13].p.k||0!==s[13].p.v||s[14].p.k||1!==s[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(s[17].p.k||0!==s[17].p.v||s[18].p.k||1!==s[18].p.v||s[19].p.k||1!==s[19].p.v||s[20].p.k||0!==s[20].p.v||s[21].p.k||1!==s[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(s[24].p.k||0!==s[24].p.v||s[25].p.k||1!==s[25].p.v||s[26].p.k||1!==s[26].p.v||s[27].p.k||0!==s[27].p.v||s[28].p.k||1!==s[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(s[31].p.k||0!==s[31].p.v||s[32].p.k||1!==s[32].p.v||s[33].p.k||1!==s[33].p.v||s[34].p.k||0!==s[34].p.v||s[35].p.k||1!==s[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=y("feComponentTransfer")),(s[3].p.k||0!==s[3].p.v||s[4].p.k||1!==s[4].p.v||s[5].p.k||1!==s[5].p.v||s[6].p.k||0!==s[6].p.v||s[7].p.k||1!==s[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function dt(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","400%"),t.setAttribute("height","400%"),this._cl=e;var s=y("feGaussianBlur");s.setAttribute("in","SourceAlpha"),s.setAttribute("result","drop_shadow_1"),s.setAttribute("stdDeviation","0"),this.feGaussianBlur=s,t.appendChild(s);var i=y("feOffset");i.setAttribute("dx","25"),i.setAttribute("dy","0"),i.setAttribute("in","drop_shadow_1"),i.setAttribute("result","drop_shadow_2"),this.feOffset=i,t.appendChild(i);var a=y("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var r=y("feComposite");r.setAttribute("in","drop_shadow_3"),r.setAttribute("in2","drop_shadow_2"),r.setAttribute("operator","in"),r.setAttribute("result","drop_shadow_4"),t.appendChild(r);var n=y("feMerge");t.appendChild(n);var h;h=y("feMergeNode"),n.appendChild(h),h=y("feMergeNode"),h.setAttribute("in","SourceGraphic"),this.feMergeNode=h,this.feMerge=n,this.originalNodeAdded=!1,n.appendChild(h)}function ct(t,e,s){this.initialized=!1,this._cl=e,this.filterElem=t,this.elem=s,s.matteElement=y("g"),s.matteElement.appendChild(s._bx),s.matteElement.appendChild(s._bz),s._by=s.matteElement}function ut(t){var e,s=t.data.ef?t.data.ef.length:0,i=p(10),a=le.createFilter(i),r=0;this.filters=[];var n;for(e=0;e<s;e+=1)20===t.data.ef[e].ty?(r+=1,n=new ot(a,t.effects._cm[e]),this.filters.push(n)):21===t.data.ef[e].ty?(r+=1,n=new pt(a,t.effects._cm[e]),this.filters.push(n)):22===t.data.ef[e].ty?(n=new lt(t,t.effects._cm[e]),this.filters.push(n)):23===t.data.ef[e].ty?(r+=1,n=new ft(a,t.effects._cm[e]),this.filters.push(n)):24===t.data.ef[e].ty?(r+=1,n=new mt(a,t.effects._cm[e]),this.filters.push(n)):25===t.data.ef[e].ty?(r+=1,n=new dt(a,t.effects._cm[e]),this.filters.push(n)):28===t.data.ef[e].ty&&(n=new ct(a,t.effects._cm[e],t),this.filters.push(n));r&&(t._x.defs.appendChild(a),t._bx.setAttribute("filter","url("+Ot+"#"+i+")"))}function gt(t){Ot=t}function yt(t){Ae.play(t)}function vt(t){Ae.pause(t)}function bt(t){Ae.togglePause(t)}function kt(t,e){Ae.setSpeed(t,e)}function At(t,e){Ae.setDirection(t,e)}function Pt(t){Ae.stop(t)}function Mt(t){Ae.moveFrame(t)}function _t(){_e===!0?Ae.searchAnimations(Ee,_e,we):Ae.searchAnimations()}function Et(t){return Ae.registerAnimation(t)}function wt(){Ae.resize()}function Ft(t,e,s){Ae.goToAndStop(t,e,s)}function Ct(t){Gt=t}function xt(t){return _e===!0&&(t.animationData=JSON.parse(Ee)),Ae.loadAnimation(t)}function Dt(t){return Ae.destroy(t)}function St(t){if("string"==typeof t)switch(t){case"high":Jt=200;break;case"medium":Jt=50;break;case"low":Jt=10}else!isNaN(t)&&t>1&&(Jt=t);s(!(Jt>=50))}function Tt(){return"undefined"!=typeof navigator}function It(t,e){"expressions"===t&&(Nt=e)}function Lt(t){switch(t){case"propertyFactory":return ae;case"shape_ai":return ne;case"matrix":return $t}}function Rt(){"complete"===document.readyState&&(clearInterval(Se),_t())}function Vt(t){for(var e=De.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var Nt,zt,Bt="http://www.w3.org/2000/svg",Ot="",jt=-999999,Gt=!0,Wt=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Math.round,Math.pow),Xt=Math.sqrt,qt=(Math.abs,Math.floor),Yt=(Math.max,Math.min),Ht={};!function(){var t,e=Object.getOwnPropertyNames(Math),s=e.length;for(t=0;t<s;t+=1)Ht[e[t]]=Math[e[t]]}(),Ht.random=Math.random,Ht.abs=function(t){var e=typeof t;if("object"===e&&t.length){var s,i=g(t.length),a=t.length;for(s=0;s<a;s+=1)i[s]=Math.abs(t[s]);return i}return Math.abs(t)};var Jt=150,Ut=Math.PI/180,Zt=.5519;s(!1);var Kt=function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1==e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+s[t]+s[e]+s[i]}}();u.prototype={_cy:function(t,e){if(this._cbs[t])for(var s=this._cbs[t].length,i=0;i<s;i++)this._cbs[t][i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var Qt=function(){function t(t,e){var s,i=0,a=[];switch(t){case"int16":case"uint8c":s=1;break;default:s=1.1}for(i=0;i<e;i+=1)a.push(s);return a}function e(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):void 0}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?e:t}(),$t=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=w(t),s=F(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function s(t){if(0===t)return this;var e=w(t),s=F(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}function i(t){if(0===t)return this;var e=w(t),s=F(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}function a(t){if(0===t)return this;var e=w(t),s=F(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function r(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(C(t),C(e))}function h(t,e){var s=w(e),i=F(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,C(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}function o(t,e,s){return s=isNaN(s)?1:s,1==t&&1==e&&1==s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function p(t,e,s,i,a,r,n,h,o,p,l,f,m,d,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this.props[6]=n,this.props[7]=h,this.props[8]=o,this.props[9]=p,this.props[10]=l,this.props[11]=f,this.props[12]=m,this.props[13]=d,this.props[14]=c,this.props[15]=u,this}function l(t,e,s){return s=s||0,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function f(t,e,s,i,a,r,n,h,o,p,l,f,m,d,c,u){if(1===t&&0===e&&0===s&&0===i&&0===a&&1===r&&0===n&&0===h&&0===o&&0===p&&1===l&&0===f)return this.props[12]=this.props[12]*t+this.props[15]*m,this.props[13]=this.props[13]*r+this.props[15]*d,this.props[14]=this.props[14]*l+this.props[15]*c,this.props[15]=this.props[15]*u,this._identityCalculated=!1,this;var g=this.props[0],y=this.props[1],v=this.props[2],b=this.props[3],k=this.props[4],A=this.props[5],P=this.props[6],M=this.props[7],_=this.props[8],E=this.props[9],w=this.props[10],F=this.props[11],C=this.props[12],x=this.props[13],D=this.props[14],S=this.props[15];return this.props[0]=g*t+y*a+v*o+b*m,this.props[1]=g*e+y*r+v*p+b*d,this.props[2]=g*s+y*n+v*l+b*c,this.props[3]=g*i+y*h+v*f+b*u,this.props[4]=k*t+A*a+P*o+M*m,this.props[5]=k*e+A*r+P*p+M*d,this.props[6]=k*s+A*n+P*l+M*c,this.props[7]=k*i+A*h+P*f+M*u,this.props[8]=_*t+E*a+w*o+F*m,this.props[9]=_*e+E*r+w*p+F*d,this.props[10]=_*s+E*n+w*l+F*c,this.props[11]=_*i+E*h+w*f+F*u,this.props[12]=C*t+x*a+D*o+S*m,this.props[13]=C*e+x*r+D*p+S*d,this.props[14]=C*s+x*n+D*l+S*c,this.props[15]=C*i+x*h+D*f+S*u,this._identityCalculated=!1,this}function m(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function d(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function c(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e]}function u(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function g(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function y(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function v(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function b(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function k(t){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],s=this.props[5]/e,i=-this.props[1]/e,a=-this.props[4]/e,r=this.props[0]/e,n=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,h=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e;return[t[0]*s+t[1]*a+n,t[0]*i+t[1]*r+h,0]}function A(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=k(t[e]);return i}function P(t,e,s,i){if(i&&2===i){var a=ce.newElement();return a[0]=t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],a[1]=t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],a}return[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function M(t,e){return this.isIdentity()?t+","+e:t*this.props[0]+e*this.props[4]+this.props[12]+","+(t*this.props[1]+e*this.props[5]+this.props[13])}function _(){for(var t=0,e=this.props,s="matrix3d(",i=1e4;t<16;)s+=x(e[t]*i)/i,s+=15===t?")":",",t+=1;return s}function E(){var t=1e4,e=this.props;return"matrix("+x(e[0]*t)/t+","+x(e[1]*t)/t+","+x(e[4]*t)/t+","+x(e[5]*t)/t+","+x(e[12]*t)/t+","+x(e[13]*t)/t+")"}var w=Math.cos,F=Math.sin,C=Math.tan,x=Math.round;return function(){this.reset=t,this.rotate=e,this.rotateX=s,this.rotateY=i,this.rotateZ=a,this.skew=n,this.skewFromAxis=h,this.shear=r,this.scale=o,this.setTransform=p,this.translate=l,this.transform=f,this.applyToPoint=g,this.applyToX=y,this.applyToY=v,this.applyToZ=b,this._cn=P,this.applyToPointStringified=M,this.toCSS=_,this.to2dCSS=E,this.clone=c,this.cloneFromProps=u,this.equals=d,this.inversePoints=A,this.inversePoint=k,this._t=this.transform,this.isIdentity=m,this._identity=!0,this._identityCalculated=!1,this.props=Qt("float32",16),this.reset()}}();!function(t,e){function s(s,p,l){var d=[];p=1==p?{entropy:!0}:p||{};var v=n(r(p.entropy?[s,o(t)]:null==s?h():s,3),d),b=new i(d),k=function(){for(var t=b.g(m),e=u,s=0;t<g;)t=(t+s)*f,e*=f,s=b.g(1);for(;t>=y;)t/=2,e/=2,s>>>=1;return(t+s)/e};return k.int32=function(){return 0|b.g(4)},k.quick=function(){return b.g(4)/4294967296},k["double"]=k,n(o(b.S),t),(p.pass||l||function(t,s,i,r){return r&&(r.S&&a(r,b),t.state=function(){return a(b,{})}),i?(e[c]=t,s):t})(k,v,"global"in p?p.global:this==e,p.state)}function i(t){var e,s=t.length,i=this,a=0,r=i.i=i.j=0,n=i.S=[];for(s||(t=[s++]);a<f;)n[a]=a++;for(a=0;a<f;a++)n[a]=n[r=v&r+t[a%s]+(e=n[a])],n[r]=e;(i.g=function(t){for(var e,s=0,a=i.i,r=i.j,n=i.S;t--;)e=n[a=v&a+1],s=s*f+n[v&(n[a]=n[r=v&r+e])+(n[r]=e)];return i.i=a,i.j=r,s})(f)}function a(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function r(t,e){var s,i=[],a=typeof t;if(e&&"object"==a)for(s in t)try{i.push(r(t[s],e-1))}catch(n){}return i.length?i:"string"==a?t:t+"\0"}function n(t,e){for(var s,i=t+"",a=0;a<i.length;)e[v&a]=v&(s^=19*e[v&a])+i.charCodeAt(a++);return o(e)}function h(){try{if(p)return o(p.randomBytes(f));var e=new Uint8Array(f);return(l.crypto||l.msCrypto).getRandomValues(e),o(e)}catch(s){var i=l.navigator,a=i&&i.plugins;return[+new Date,l,a,l.screen,o(t)]}}function o(t){return String.fromCharCode.apply(0,t)}var p,l=this,f=256,m=6,d=52,c="random",u=e.pow(f,m),g=e.pow(2,d),y=2*g,v=f-1;e["seed"+c]=s,n(e.random(),t)}([],Ht);var te=function(){function t(t,e,s,i,a){var r=a||("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p");if(l[r])return l[r];var n=new o([t,e,s,i]);return l[r]=n,n}function e(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function i(t){return 3*t}function a(t,a,r){return((e(a,r)*t+s(a,r))*t+i(a))*t}function r(t,a,r){return 3*e(a,r)*t*t+2*s(a,r)*t+i(a)}function n(t,e,s,i,r){var n,h,o=0;do h=e+(s-e)/2,n=a(h,i,r)-t,n>0?s=h:e=h;while(Math.abs(n)>d&&++o<c);return h}function h(t,e,s,i){for(var n=0;n<f;++n){var h=r(e,s,i);if(0===h)return e;var o=a(e,s,i)-t;e-=o/h}return e}function o(t){this._p=t,this._mSampleValues=y?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var p={};p.getBezierEasing=t;var l={},f=4,m=.001,d=1e-7,c=10,u=11,g=1/(u-1),y="function"==typeof Float32Array;return o.prototype={get:function(t){var e=this._p[0],s=this._p[1],i=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===s&&i===r?t:0===t?0:1===t?1:a(this._getTForX(t),s,r)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&s===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<u;++s)this._mSampleValues[s]=a(s*g,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],i=this._mSampleValues,a=0,o=1,p=u-1;o!==p&&i[o]<=t;++o)a+=g;
---o;var l=(t-i[o])/(i[o+1]-i[o]),f=a+l*g,d=r(f,e,s);return d>=m?h(t,f,e,s):0===d?f:n(t,a,a+g,e,s)}},p}();!function(){for(var e=0,s=["ms","moz","webkit","o"],i=0;i<s.length&&!t.requestAnimationFrame;++i)t.requestAnimationFrame=t[s[i]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[s[i]+"CancelAnimationFrame"]||t[s[i]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t,s){var i=(new Date).getTime(),a=Math.max(0,16-(i-e)),r=setTimeout(function(){t(i+a)},a);return e=i+a,r}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}();var ee=k(),se=A(),ie=function(){function e(t,e){var s=v("span");s.style.fontFamily=e;var i=v("span");i.innerHTML="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function s(){var e,i,a,r=this.fonts.length,n=r;for(e=0;e<r;e+=1)if(this.fonts[e].loaded)n-=1;else if("t"===this.fonts[e].fOrigin||2===this.fonts[e].origin){if(t.Typekit&&t.Typekit.load&&0===this.typekitLoaded){this.typekitLoaded=1;try{t.Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(h){}}2===this.typekitLoaded&&(this.fonts[e].loaded=!0)}else"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(i=this.fonts[e].monoCase.node,a=this.fonts[e].monoCase.w,i.offsetWidth!==a?(n-=1,this.fonts[e].loaded=!0):(i=this.fonts[e].sansCase.node,a=this.fonts[e].sansCase.w,i.offsetWidth!==a&&(n-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==n&&Date.now()-this.initTime<p?setTimeout(s.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function i(t,e){var s=y("text");s.style.fontSize="100px",s.style.fontFamily=e.fFamily,s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.className=e.fClass):s.style.fontFamily=e.fFamily,t.appendChild(s);var i=v("canvas").getContext("2d");return i.font="100px "+e.fFamily,i}function a(t,a){if(!t)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=t.list);var r,n=t.list,h=n.length;for(r=0;r<h;r+=1){if(n[r].loaded=!1,n[r].monoCase=e(n[r].fFamily,"monospace"),n[r].sansCase=e(n[r].fFamily,"sans-serif"),n[r].fPath){if("p"===n[r].fOrigin||3===n[r].origin){var o=v("style");o.type="text/css",o.innerHTML="@font-face {font-family: "+n[r].fFamily+"; font-style: normal; src: url('"+n[r].fPath+"');}",a.appendChild(o)}else if("g"===n[r].fOrigin||1===n[r].origin){var p=v("link");p.type="text/css",p.rel="stylesheet",p.href=n[r].fPath,a.appendChild(p)}else if("t"===n[r].fOrigin||2===n[r].origin){var l=v("script");l.setAttribute("src",n[r].fPath),a.appendChild(l)}}else n[r].loaded=!0;n[r].helper=i(a,n[r]),this.fonts.push(n[r])}s.bind(this)()}function r(t){if(t){this.chars||(this.chars=[]);var e,s,i,a=t.length,r=this.chars.length;for(e=0;e<a;e+=1){for(s=0,i=!1;s<r;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(i=!0),s+=1;i||(this.chars.push(t[e]),r+=1)}}}function n(t,e,s){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}return console&&console.warn&&console.warn("Missing character from exported characters list: ",t,e,s),l}function h(t,e,s){var i=this.getFontByName(e),a=i.helper;return a.measureText(t).width*s/100}function o(t){for(var e=0,s=this.fonts.length;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var p=5e3,l={w:0,size:0,shapes:[]},f=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return f.prototype.addChars=r,f.prototype.addFonts=a,f.prototype.getCharData=n,f.prototype.getFontByName=o,f.prototype.measureText=h,f}(),ae=function(){function t(t,e,s){var i,a=this.offsetTime;"multidimensional"===this.propType&&(i=Qt("float32",e.length));for(var r,n,h=s.lastIndex,o=h,p=this._df.length-1,l=!0;l;){if(r=this._df[o],n=this._df[o+1],o==p-1&&t>=n.t-a){r.h&&(r=n),h=0;break}if(n.t-a>t){h=o;break}o<p-1?o+=1:(h=0,l=!1)}var f,m,d,c,u,g;if(r.to){r.bezierData||ee.buildBezierData(r);var y=r.bezierData;if(t>=n.t-a||t<r.t-a){var v=t>=n.t-a?y.points.length-1:0;for(m=y.points[v].point.length,f=0;f<m;f+=1)i[f]=y.points[v].point[f];s._lastBezierData=null}else{r.__fnct?g=r.__fnct:(g=te.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,r.__fnct=g),d=g((t-(r.t-a))/(n.t-a-(r.t-a)));var b,k=y.segmentLength*d,A=s.lastFrame<t&&s._lastBezierData===y?s._lastAddedLength:0;for(u=s.lastFrame<t&&s._lastBezierData===y?s._lastPoint:0,l=!0,c=y.points.length;l;){if(A+=y.points[u].partialLength,0===k||0===d||u==y.points.length-1){for(m=y.points[u].point.length,f=0;f<m;f+=1)i[f]=y.points[u].point[f];break}if(k>=A&&k<A+y.points[u+1].partialLength){for(b=(k-A)/y.points[u+1].partialLength,m=y.points[u].point.length,f=0;f<m;f+=1)i[f]=y.points[u].point[f]+(y.points[u+1].point[f]-y.points[u].point[f])*b;break}u<c-1?u+=1:l=!1}s._lastPoint=u,s._lastAddedLength=A-y.points[u].partialLength,s._lastBezierData=y}}else{var P,M,_,E,w;for(p=r.s.length,o=0;o<p;o+=1){if(1!==r.h&&(t>=n.t-a?d=1:t<r.t-a?d=0:(r.o.x.constructor===Array?(r.__fnct||(r.__fnct=[]),r.__fnct[o]?g=r.__fnct[o]:(P=r.o.x[o]||r.o.x[0],M=r.o.y[o]||r.o.y[0],_=r.i.x[o]||r.i.x[0],E=r.i.y[o]||r.i.y[0],g=te.getBezierEasing(P,M,_,E).get,r.__fnct[o]=g)):r.__fnct?g=r.__fnct:(P=r.o.x,M=r.o.y,_=r.i.x,E=r.i.y,g=te.getBezierEasing(P,M,_,E).get,r.__fnct=g),d=g((t-(r.t-a))/(n.t-a-(r.t-a))))),this.sh&&1!==r.h){var F=r.s[o],C=r.e[o];F-C<-180?F+=360:F-C>180&&(F-=360),w=F+(C-F)*d}else w=1===r.h?r.s[o]:r.s[o]+(r.e[o]-r.s[o])*d;1===p?i=w:i[o]=w}}return s.lastIndex=h,i}function e(t){for(var e=0;e<this.v.length;)this.pv[e]=t[e],this.v[e]=this.mult?this.pv[e]*this.mult:this.pv[e],this.lastPValue[e]!==this.pv[e]&&(this.mdf=!0,this.lastPValue[e]=this.pv[e]),e+=1}function s(t){this.pv=t,this.v=this.mult?this.pv*this.mult:this.pv,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)}function i(){if(this.elem._x.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this._df[0].t-this.offsetTime,s=this._df[this._df.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==l&&(this._caching.lastFrame>=s&&t>=s||this._caching.lastFrame<e&&t<e))){this._caching.lastIndex=this._caching.lastFrame<t?this._caching.lastIndex:0;var i=this.interpolateValue(t,this.pv,this._caching);this.calculateValueAtCurrentTime(i)}this._caching.lastFrame=t,this.frameId=this.elem._x.frameId}}function a(){}function r(t,e,s){this.propType="unidimensional",this.mult=s,this.v=s?e.k*s:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.getValue=a}function n(t,e,s){this.propType="multidimensional",this.mult=s,this.data=e,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1,this.v=Qt("float32",e.k.length),this.pv=Qt("float32",e.k.length),this.lastValue=Qt("float32",e.k.length);Qt("float32",e.k.length);this.vel=Qt("float32",e.k.length);var i,r=e.k.length;for(i=0;i<r;i+=1)this.v[i]=s?e.k[i]*s:e.k[i],this.pv[i]=e.k[i];this.getValue=a}function h(e,a,r){this.propType="unidimensional",this._df=a.k,this.offsetTime=e.data.st,this.lastValue=l,this.lastPValue=l,this.frameId=-1,this._caching={lastFrame:l,lastIndex:0,value:0},this.k=!0,this.kf=!0,this.data=a,this.mult=r,this.elem=e,this._ch=!1,this.comp=e.comp,this.v=r?a.k[0].s[0]*r:a.k[0].s[0],this.pv=a.k[0].s[0],this.getValue=i,this.calculateValueAtCurrentTime=s,this.interpolateValue=t}function o(s,a,r){this.propType="multidimensional";var n,h,o,p,f,m=a.k.length;for(n=0;n<m-1;n+=1)a.k[n].to&&a.k[n].s&&a.k[n].e&&(h=a.k[n].s,o=a.k[n].e,p=a.k[n].to,f=a.k[n].ti,(2===h.length&&(h[0]!==o[0]||h[1]!==o[1])&&ee.pointOnLine2D(h[0],h[1],o[0],o[1],h[0]+p[0],h[1]+p[1])&&ee.pointOnLine2D(h[0],h[1],o[0],o[1],o[0]+f[0],o[1]+f[1])||3===h.length&&(h[0]!==o[0]||h[1]!==o[1]||h[2]!==o[2])&&ee.pointOnLine3D(h[0],h[1],h[2],o[0],o[1],o[2],h[0]+p[0],h[1]+p[1],h[2]+p[2])&&ee.pointOnLine3D(h[0],h[1],h[2],o[0],o[1],o[2],o[0]+f[0],o[1]+f[1],o[2]+f[2]))&&(a.k[n].to=null,a.k[n].ti=null),h[0]===o[0]&&h[1]===o[1]&&0===p[0]&&0===p[1]&&0===f[0]&&0===f[1]&&(2===h.length||h[2]===o[2]&&0===p[2]&&0===f[2])&&(a.k[n].to=null,a.k[n].ti=null));this._df=a.k,this.offsetTime=s.data.st,this.k=!0,this.kf=!0,this._ch=!0,this.mult=r,this.elem=s,this.comp=s.comp,this.getValue=i,this.calculateValueAtCurrentTime=e,this.interpolateValue=t,this.frameId=-1;var d=a.k[0].s.length;this.v=Qt("float32",d),this.pv=Qt("float32",d),this.lastValue=Qt("float32",d),this.lastPValue=Qt("float32",d),this._caching={lastFrame:l,lastIndex:0,value:Qt("float32",d)}}function p(t,e,s,i,a){var p;if(0===e.a)p=0===s?new r(t,e,i):new n(t,e,i);else if(1===e.a)p=0===s?new h(t,e,i):new o(t,e,i);else if(e.k.length)if("number"==typeof e.k[0])p=new n(t,e,i);else switch(s){case 0:p=new h(t,e,i);break;case 1:p=new o(t,e,i)}else p=new r(t,e,i);return p.k&&a.push(p),p}var l=jt,f={_bo:p};return f}(),re=function(){function t(t){var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function e(t){if(this.elem._x.frameId!==this.frameId){this.mdf=t;var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0);if(this.mdf){if(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented&&this.p._df&&this.p._dg){var i,a;this.p._caching.lastFrame+this.p.offsetTime<=this.p._df[0].t?(i=this.p._dg((this.p._df[0].t+.01)/this.elem._x.frameRate,0),a=this.p._dg(this.p._df[0].t/this.elem._x.frameRate,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p._df[this.p._df.length-1].t?(i=this.p._dg(this.p._df[this.p._df.length-1].t/this.elem._x.frameRate,0),a=this.p._dg((this.p._df[this.p._df.length-1].t-.01)/this.elem._x.frameRate,0)):(i=this.p.pv,a=this.p._dg((this.p._caching.lastFrame+this.p.offsetTime-.01)/this.elem._x.frameRate,this.p.offsetTime)),this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem._x.frameId}}function s(){this.inverted=!0,this.iv=new $t,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}function i(){}function a(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this._co=[],this.mdf=!1,this.data=e,this.v=new $t,e.p.s?(this.px=ae._bo(t,e.p.x,0,0,this._co),this.py=ae._bo(t,e.p.y,0,0,this._co),e.p.z&&(this.pz=ae._bo(t,e.p.z,0,0,this._co))):this.p=ae._bo(t,e.p,1,0,this._co),e.r)this.r=ae._bo(t,e.r,0,Ut,this._co);else if(e.rx){if(this.rx=ae._bo(t,e.rx,0,Ut,this._co),this.ry=ae._bo(t,e.ry,0,Ut,this._co),this.rz=ae._bo(t,e.rz,0,Ut,this._co),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=e.or.k[i].ti=null}this.or=ae._bo(t,e.or,1,Ut,this._co),this.or.sh=!0}e.sk&&(this.sk=ae._bo(t,e.sk,0,Ut,this._co),this.sa=ae._bo(t,e.sa,0,Ut,this._co)),e.a&&(this.a=ae._bo(t,e.a,1,0,this._co)),e.s&&(this.s=ae._bo(t,e.s,1,.01,this._co)),e.o?this.o=ae._bo(t,e.o,0,.01,s):this.o={mdf:!1,v:1},this._co.length?s.push(this):this.getValue(!0)}function r(t,e,s){return new a(t,e,s)}return a.prototype.applyToMatrix=t,a.prototype.getValue=e,a.prototype.setInverted=s,a.prototype.autoOrient=i,{_bj:r}}();P.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=ce.newElement(),this.o[s]=ce.newElement(),this.i[s]=ce.newElement(),s+=1},P.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},P.prototype.doubleArrayLength=function(){this.v=this.v.concat(g(this._maxLength)),this.i=this.i.concat(g(this._maxLength)),this.o=this.o.concat(g(this._maxLength)),this._maxLength*=2},P.prototype._ax=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o}(!r[i]||r[i]&&!a)&&(r[i]=ce.newElement()),r[i][0]=t,r[i][1]=e},P.prototype._aw=function(t,e,s,i,a,r,n,h){this._ax(t,e,"v",n,h),this._ax(s,i,"o",n,h),this._ax(a,r,"i",n,h)},P.prototype.reverse=function(){var t=new P;t.setPathData(this.c,this._length);var e=this.v,s=this.o,a=this.i,r=0;this.c&&(t._aw(e[0][0],e[0][1],a[0][0],a[0][1],s[0][0],s[0][1],0,!1),r=1);var n=this._length-1,h=this._length;for(i=r;i<h;i+=1)t._aw(e[n][0],e[n][1],a[n][0],a[n][1],s[n][0],s[n][1],i,!1),n-=1;return t};var ne=function(){function t(t,e,s,i){var a,r,n,h=i.lastIndex;if(t<this._df[0].t-this.offsetTime)a=this._df[0].s[0],n=!0,h=0;else if(t>=this._df[this._df.length-1].t-this.offsetTime)a=1===this._df[this._df.length-2].h?this._df[this._df.length-1].s[0]:this._df[this._df.length-2].e[0],n=!0;else{for(var o,p,l,f,m,d,c=h,u=this._df.length-1,g=!0;g&&(o=this._df[c],p=this._df[c+1],!(p.t-this.offsetTime>t));)c<u-1?c+=1:g=!1;n=1===o.h,h=c;var y;if(!n){if(t>=p.t-this.offsetTime)y=1;else if(t<o.t-this.offsetTime)y=0;else{var v;o.__fnct?v=o.__fnct:(v=te.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y).get,o.__fnct=v),y=v((t-(o.t-this.offsetTime))/(p.t-this.offsetTime-(o.t-this.offsetTime)))}r=o.e[0]}a=o.s[0]}f=e._length,d=a.i[0].length;var b,k=!1;i.lastIndex=h;var l,m,b,f=e._length,d=a.i[0].length,k=!1;for(l=0;l<f;l+=1)for(m=0;m<d;m+=1)b=n?a.i[l][m]:a.i[l][m]+(r.i[l][m]-a.i[l][m])*y,e.i[l][m]!==b&&(e.i[l][m]=b,s&&(this.pv.i[l][m]=b),k=!0),b=n?a.o[l][m]:a.o[l][m]+(r.o[l][m]-a.o[l][m])*y,e.o[l][m]!==b&&(e.o[l][m]=b,s&&(this.pv.o[l][m]=b),k=!0),b=n?a.v[l][m]:a.v[l][m]+(r.v[l][m]-a.v[l][m])*y,e.v[l][m]!==b&&(e.v[l][m]=b,s&&(this.pv.v[l][m]=b),k=!0);return k}function e(){if(this.elem._x.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this._df[0].t-this.offsetTime,s=this._df[this._df.length-1].t-this.offsetTime,i=this._caching.lastFrame;if(i===p||!(i<e&&t<e||i>s&&t>s)){this._caching.lastIndex=i<t?this._caching.lastIndex:0;var a=this.interpolateShape(t,this.v,!0,this._caching);this.mdf=a,a&&(this.paths=this._ak)}this._caching.lastFrame=t,this.frameId=this.elem._x.frameId}}function s(){return this.v}function i(){this.paths=this._ak,this.k||(this.mdf=!1)}function a(t,e,s){this.propType="shape",this.comp=t.comp,this.k=!1,this.mdf=!1;var a=3===s?e.pt.k:e.ks.k;this.v=ue.clone(a),this.pv=ue.clone(this.v),this._ak=ge._al(),this.paths=this._ak,this.paths.addShape(this.v),this.reset=i}function r(t,e,s){this.propType="shape",this.comp=t.comp,this.elem=t,this.offsetTime=t.data.st,this._df=3===s?e.pt.k:e.ks.k,this.k=!0,this.kf=!0;var a=this._df[0].s[0].i.length;this._df[0].s[0].i[0].length;this.v=ue.newElement(),this.v.setPathData(this._df[0].s[0].c,a),this.pv=ue.clone(this.v),this._ak=ge._al(),this.paths=this._ak,this.paths.addShape(this.v),this.lastFrame=p,this.reset=i,this._caching={lastFrame:p,lastIndex:0}}function n(t,e,s,i){var n;if(3===s||4===s){var h=3===s?e.pt:e.ks,o=h.k;n=1===h.a||o.length?new r(t,e,s):new a(t,e,s)}else 5===s?n=new m(t,e):6===s?n=new l(t,e):7===s&&(n=new f(t,e));return n.k&&i.push(n),n}function h(){return a}function o(){return r}var p=-999999;a.prototype.interpolateShape=t,a.prototype.getValue=s,r.prototype.getValue=e,r.prototype.interpolateShape=t;var l=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2,r=3!==this.d,n=this.v;3!==this.d&&(n.v[0][0]=t,n.v[0][1]=e-a,n.v[1][0]=r?t+i:t-i,n.v[1][1]=e,n.v[2][0]=t,n.v[2][1]=e+a,n.v[3][0]=r?t-i:t+i,n.v[3][1]=e,n.i[0][0]=r?t-i*s:t+i*s,n.i[0][1]=e-a,n.i[1][0]=r?t+i:t-i,n.i[1][1]=e-a*s,n.i[2][0]=r?t+i*s:t-i*s,n.i[2][1]=e+a,n.i[3][0]=r?t-i:t+i,n.i[3][1]=e+a*s,n.o[0][0]=r?t+i*s:t-i*s,n.o[0][1]=e-a,n.o[1][0]=r?t+i:t-i,n.o[1][1]=e+a*s,n.o[2][0]=r?t-i*s:t+i*s,n.o[2][1]=e+a,n.o[3][0]=r?t-i:t+i,n.o[3][1]=e-a*s)}function e(t){var e,s=this._co.length;if(this.elem._x.frameId!==this.frameId){for(this.mdf=!1,this.frameId=this.elem._x.frameId,e=0;e<s;e+=1)this._co[e].getValue(t),this._co[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}}var s=Zt;return function(s,a){this.v=ue.newElement(),this.v.setPathData(!0,4),this._ak=ge._al(),this.paths=this._ak,this._ak.addShape(this.v),this.d=a.d,this._co=[],this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=i,this.p=ae._bo(s,a.p,1,0,this._co),this.s=ae._bo(s,a.s,1,0,this._co),this._co.length?this.k=!0:this.convertEllToPath()}}(),f=function(){function t(){var t,e=Math.floor(this.pt.v),s=2*Math.PI/e,i=this.or.v,a=this.os.v,r=2*Math.PI*i/(4*e),n=-Math.PI/2,h=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var o=i*Math.cos(n),p=i*Math.sin(n),l=0===o&&0===p?0:p/Math.sqrt(o*o+p*p),f=0===o&&0===p?0:-o/Math.sqrt(o*o+p*p);o+=+this.p.v[0],p+=+this.p.v[1],this.v._aw(o,p,o-l*r*a*h,p-f*r*a*h,o+l*r*a*h,p+f*r*a*h,t,!0),n+=s*h}this.paths.length=0,this.paths[0]=this.v}function e(){var t,e,s,i,a=2*Math.floor(this.pt.v),r=2*Math.PI/a,n=!0,h=this.or.v,o=this.ir.v,p=this.os.v,l=this.is.v,f=2*Math.PI*h/(2*a),m=2*Math.PI*o/(2*a),d=-Math.PI/2;d+=this.r.v;var c=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<a;t+=1){e=n?h:o,s=n?p:l,i=n?f:m;var u=e*Math.cos(d),g=e*Math.sin(d),y=0===u&&0===g?0:g/Math.sqrt(u*u+g*g),v=0===u&&0===g?0:-u/Math.sqrt(u*u+g*g);u+=+this.p.v[0],g+=+this.p.v[1],this.v._aw(u,g,u-y*i*s*c,g-v*i*s*c,u+y*i*s*c,g+v*i*s*c,t,!0),n=!n,d+=r*c}}function s(){if(this.elem._x.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem._x.frameId;var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue(),this._co[t].mdf&&(this.mdf=!0);this.mdf&&this.convertToPath()}}return function(a,r){this.v=ue.newElement(),this.v.setPathData(!0,0),this.elem=a,this.comp=a.comp,this.data=r,this.frameId=-1,this.d=r.d,this._co=[],this.mdf=!1,this.getValue=s,this.reset=i,1===r.sy?(this.ir=ae._bo(a,r.ir,0,0,this._co),this.is=ae._bo(a,r.is,0,.01,this._co),this.convertToPath=e):this.convertToPath=t,this.pt=ae._bo(a,r.pt,0,0,this._co),this.p=ae._bo(a,r.p,1,0,this._co),this.r=ae._bo(a,r.r,0,Ut,this._co),this.or=ae._bo(a,r.or,0,0,this._co),this.os=ae._bo(a,r.os,0,.01,this._co),this._ak=ge._al(),this._ak.addShape(this.v),this.paths=this._ak,this._co.length?this.k=!0:this.convertToPath()}}(),m=function(){function t(t){if(this.elem._x.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem._x.frameId;var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(t),this._co[e].mdf&&(this.mdf=!0);this.mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=Yt(s,i,this.r.v),r=a*(1-Zt);this.v._length=0,2===this.d||1===this.d?(this.v._aw(t+s,e-i+a,t+s,e-i+a,t+s,e-i+r,0,!0),this.v._aw(t+s,e+i-a,t+s,e+i-r,t+s,e+i-a,1,!0),0!==a?(this.v._aw(t+s-a,e+i,t+s-a,e+i,t+s-r,e+i,2,!0),this.v._aw(t-s+a,e+i,t-s+r,e+i,t-s+a,e+i,3,!0),this.v._aw(t-s,e+i-a,t-s,e+i-a,t-s,e+i-r,4,!0),this.v._aw(t-s,e-i+a,t-s,e-i+r,t-s,e-i+a,5,!0),this.v._aw(t-s+a,e-i,t-s+a,e-i,t-s+r,e-i,6,!0),this.v._aw(t+s-a,e-i,t+s-r,e-i,t+s-a,e-i,7,!0)):(this.v._aw(t-s,e+i,t-s+r,e+i,t-s,e+i,2),this.v._aw(t-s,e-i,t-s,e-i+r,t-s,e-i,3))):(this.v._aw(t+s,e-i+a,t+s,e-i+r,t+s,e-i+a,0,!0),0!==a?(this.v._aw(t+s-a,e-i,t+s-a,e-i,t+s-r,e-i,1,!0),this.v._aw(t-s+a,e-i,t-s+r,e-i,t-s+a,e-i,2,!0),this.v._aw(t-s,e-i+a,t-s,e-i+a,t-s,e-i+r,3,!0),this.v._aw(t-s,e+i-a,t-s,e+i-r,t-s,e+i-a,4,!0),this.v._aw(t-s+a,e+i,t-s+a,e+i,t-s+r,e+i,5,!0),this.v._aw(t+s-a,e+i,t+s-r,e+i,t+s-a,e+i,6,!0),this.v._aw(t+s,e+i-a,t+s,e+i-a,t+s,e+i-r,7,!0)):(this.v._aw(t-s,e-i,t-s+r,e-i,t-s,e-i,1,!0),this.v._aw(t-s,e+i,t-s,e+i-r,t-s,e+i,2,!0),this.v._aw(t+s,e+i,t+s-r,e+i,t+s,e+i,3,!0)))}return function(s,a){this.v=ue.newElement(),this.v.c=!0,this._ak=ge._al(),this._ak.addShape(this.v),this.paths=this._ak,this.elem=s,this.comp=s.comp,this.frameId=-1,this.d=a.d,this._co=[],this.mdf=!1,this.getValue=t,this.convertRectToPath=e,this.reset=i,this.p=ae._bo(s,a.p,1,0,this._co),this.s=ae._bo(s,a.s,1,0,this._co),this.r=ae._bo(s,a.r,0,0,this._co),this._co.length?this.k=!0:this.convertRectToPath()}}(),d={};return d._bp=n,d.getConstructorFunction=h,d.getKeyframedConstructorFunction=o,d}(),he=function(){function t(t,e){i[t]||(i[t]=e)}function e(t,e,s,a){return new i[t](e,s,a)}var s={},i={};return s.registerModifier=t,s.getModifier=e,s}();M.prototype.initModifierProperties=function(){},M.prototype.addShapeToModifier=function(){},M.prototype.addShape=function(t){if(!this.closed){var e={shape:t.sh,data:t,_ak:ge._al()};this.shapes.push(e),this.addShapeToModifier(e)}},M.prototype.init=function(t,e,s){this._co=[],this.shapes=[],this.elem=t,this.initModifierProperties(t,e),this.frameId=jt,this.mdf=!1,this.closed=!1,this.k=!1,this._co.length?(this.k=!0,s.push(this)):this.getValue(!0)},b([M],_),_.prototype.processKeys=function(t){if(this.elem._x.frameId!==this.frameId||t){this.mdf=t,this.frameId=this.elem._x.frameId;var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0);if(this.mdf||t){var i=this.o.v%360/360;i<0&&(i+=1);var a=this.s.v+i,r=this.e.v+i;if(a>r){var n=a;a=r,r=n}this.sValue=a,this.eValue=r,this.oValue=i}}},_.prototype.initModifierProperties=function(t,e){this.s=ae._bo(t,e.s,0,.01,this._co),this.e=ae._bo(t,e.e,0,.01,this._co),this.o=ae._bo(t,e.o,0,0,this._co),this.sValue=0,this.eValue=0,this.oValue=0,this.getValue=this.processKeys,this.m=e.m},_.prototype.addShapeToModifier=function(t){t.pathsData=[]},_.prototype.calculateShapeEdges=function(t,e,s,i,a){var r=[];e<=1?r.push({s:t,e:e}):t>=1?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,h,o=[],p=r.length;for(n=0;n<p;n+=1)if(h=r[n],h.e*a<i||h.s*a>i+s);else{var l,f;l=h.s*a<=i?0:(h.s*a-i)/s,f=h.e*a>=i+s?1:(h.e*a-i)/s,o.push([l,f])}return o.length||o.push([0,0]),o},_.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)ye.release(t[e]);return t.length=0,t},_.prototype.processShapes=function(t){var e,s,i,a,r,n,h,o=this.shapes.length,p=this.sValue,l=this.eValue,f=0;if(l===p)for(s=0;s<o;s+=1)this.shapes[s]._ak.releaseShapes(),this.shapes[s].shape.mdf=!0,this.shapes[s].shape.paths=this.shapes[s]._ak;else if(1===l&&0===p||0===l&&1===p){if(this.mdf)for(s=0;s<o;s+=1)this.shapes[s].shape.mdf=!0}else{var m,d,c=[];for(s=0;s<o;s+=1)if(m=this.shapes[s],m.shape.mdf||this.mdf||t||2===this.m){if(e=m.shape.paths,a=e._length,h=0,!m.shape.mdf&&m.pathsData.length)h=m.totalShapeLength;else{for(r=this.releasePathsData(m.pathsData),i=0;i<a;i+=1)n=ee.getSegmentsLength(e.shapes[i]),r.push(n),h+=n.totalLength;m.totalShapeLength=h,m.pathsData=r}f+=h,m.shape.mdf=!0}else m.shape.paths=m._ak;var i,a,u=p,g=l,y=0;for(s=o-1;s>=0;s-=1)if(m=this.shapes[s],m.shape.mdf){if(d=m._ak,d.releaseShapes(),2===this.m&&o>1){var v=this.calculateShapeEdges(p,l,m.totalShapeLength,y,f);y+=m.totalShapeLength}else v=[[u,g]];for(a=v.length,i=0;i<a;i+=1){u=v[i][0],g=v[i][1],c.length=0,g<=1?c.push({s:m.totalShapeLength*u,e:m.totalShapeLength*g}):u>=1?c.push({s:m.totalShapeLength*(u-1),e:m.totalShapeLength*(g-1)}):(c.push({s:m.totalShapeLength*u,e:m.totalShapeLength}),c.push({s:0,e:m.totalShapeLength*(g-1)}));var b=this.addShapes(m,c[0]);if(c[0].s!==c[0].e){if(c.length>1)if(m.shape.v.c){var k=b.pop();this.addPaths(b,d),b=this.addShapes(m,c[1],k)}else this.addPaths(b,d),b=this.addShapes(m,c[1]);this.addPaths(b,d)}}m.shape.paths=d}}this._co.length||(this.mdf=!1)},_.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},_.prototype.addSegment=function(t,e,s,i,a,r,n){a._ax(e[0],e[1],"o",r),a._ax(s[0],s[1],"i",r+1),n&&a._ax(t[0],t[1],"v",r),a._ax(i[0],i[1],"v",r+1)},_.prototype.addSegmentFromArray=function(t,e,s,i){e._ax(t[1],t[5],"o",s),e._ax(t[2],t[6],"i",s+1),i&&e._ax(t[0],t[4],"v",s),e._ax(t[3],t[7],"v",s+1)},_.prototype.addShapes=function(t,e,s){var i,a,r,n,h,o,p,l,f=t.pathsData,m=t.shape.paths.shapes,d=t.shape.paths._length,c=0,u=[],g=!0;for(s?(h=s._length,l=s._length):(s=ue.newElement(),h=0,l=0),u.push(s),i=0;i<d;i+=1){for(o=f[i].lengths,s.c=m[i].c,r=m[i].c?o.length:o.length+1,a=1;a<r;a+=1)if(n=o[a-1],c+n.addedLength<e.s)c+=n.addedLength,s.c=!1;else{if(c>e.e){s.c=!1;break}e.s<=c&&e.e>=c+n.addedLength?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[a],m[i].v[a],s,h,g),g=!1):(p=ee.getNewSegment(m[i].v[a-1],m[i].v[a],m[i].o[a-1],m[i].i[a],(e.s-c)/n.addedLength,(e.e-c)/n.addedLength,o[a-1]),this.addSegmentFromArray(p,s,h,g),g=!1,s.c=!1),c+=n.addedLength,h+=1}if(m[i].c){if(n=o[a-1],c<=e.e){var y=o[a-1].addedLength;e.s<=c&&e.e>=c+y?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[0],m[i].v[0],s,h,g),g=!1):(p=ee.getNewSegment(m[i].v[a-1],m[i].v[0],m[i].o[a-1],m[i].i[0],(e.s-c)/y,(e.e-c)/y,o[a-1]),this.addSegmentFromArray(p,s,h,g),g=!1,s.c=!1)}else s.c=!1;c+=n.addedLength,h+=1}if(s._length&&(s._ax(s.v[l][0],s.v[l][1],"i",l),s._ax(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),c>e.e)break;i<d-1&&(s=ue.newElement(),g=!0,u.push(s),h=0)}return u},he.registerModifier("tm",_),b([M],E),E.prototype.processKeys=function(t){if(this.elem._x.frameId!==this.frameId||t){this.mdf=!!t,this.frameId=this.elem._x.frameId;var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0)}},E.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=ae._bo(t,e.r,0,null,this._co)},E.prototype.processPath=function(t,e){var s=ue.newElement();s.c=t.c;var i,a,r,n,h,o,p,l,f,m,d,c,u,g=t._length,y=0;for(i=0;i<g;i+=1)a=t.v[i],n=t.o[i],r=t.i[i],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==i&&i!==g-1||t.c?(h=0===i?t.v[g-1]:t.v[i-1],o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)),p=o?Math.min(o/2,e)/o:0,l=c=a[0]+(h[0]-a[0])*p,f=u=a[1]-(a[1]-h[1])*p,m=l-(l-a[0])*Zt,d=f-(f-a[1])*Zt,s._aw(l,f,m,d,c,u,y),y+=1,h=i===g-1?t.v[0]:t.v[i+1],o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)),p=o?Math.min(o/2,e)/o:0,l=m=a[0]+(h[0]-a[0])*p,f=d=a[1]+(h[1]-a[1])*p,c=l-(l-a[0])*Zt,u=f-(f-a[1])*Zt,s._aw(l,f,m,d,c,u,y),y+=1):(s._aw(a[0],a[1],n[0],n[1],r[0],r[1],y),y+=1):(s._aw(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],y),y+=1);return s},E.prototype.processShapes=function(t){var e,s,i,a,r=this.shapes.length,n=this.rd.v;if(0!==n){var h,o,p;for(s=0;s<r;s+=1){if(h=this.shapes[s],o=h.shape.paths,p=h._ak,h.shape.mdf||this.mdf||t)for(p.releaseShapes(),h.shape.mdf=!0,e=h.shape.paths.shapes,a=h.shape.paths._length,i=0;i<a;i+=1)p.addShape(this.processPath(e[i],n));h.shape.paths=h._ak}}this._co.length||(this.mdf=!1)},he.registerModifier("rd",E),w.prototype.processKeys=function(t){if(this.elem._x.frameId!==this.frameId||t){this.mdf=!!t;var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0)}},w.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=ae._bo(t,e.c,0,null,this._co),this.o=ae._bo(t,e.o,0,null,this._co),this.tr=re._bj(t,e.tr,this._co),this.data=e,this._co.length||this.getValue(!0),this.pMatrix=new $t,this.rMatrix=new $t,this.sMatrix=new $t,this.tMatrix=new $t,this.matrix=new $t},w.prototype.applyTransforms=function(t,e,s,i,a,r){var n=r?-1:1,h=i.s.v[0]+(1-i.s.v[0])*(1-a),o=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(r?1/h:h,r?1/o:o),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])},w.prototype.init=function(t,e,s,i,a){this.elem=t,this.arr=e,this.pos=s,this.elemsData=i,this._currentCopies=0,this._bq=[],this._groups=[],this._co=[],this.frameId=-1,this.initModifierProperties(t,e[s]);for(var r=0;s>0;)s-=1,this._bq.unshift(e[s]),r+=1;this._co.length?(this.k=!0,a.push(this)):this.getValue(!0)},w.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},w.prototype.cloneElements=function(t){var e=(t.length,JSON.parse(JSON.stringify(t)));return this.resetElements(e),e},w.prototype.changeGroupRender=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]._render=e,"gr"===t[s].ty&&this.changeGroupRender(t[s].it,e)},w.prototype.processShapes=function(t){if(this.elem._x.frameId!==this.frameId&&(this.frameId=this.elem._x.frameId,this._co.length||t||(this.mdf=!1),this.mdf)){var e=Math.ceil(this.c.v);if(this._groups.length<e){for(;this._groups.length<e;){var s={it:this.cloneElements(this._bq),
-ty:"gr"};s.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:0,ix:6,k:0},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,s),this._groups.splice(0,0,s),this._currentCopies+=1}this.elem.reloadShapes()}var i,a,r=0;for(i=0;i<=this._groups.length-1;i+=1)a=r<e,this._groups[i]._render=a,this.changeGroupRender(this._groups[i].it,a),r+=1;this._currentCopies=e,this.elem._ch=!0;var n=this.o.v,h=n%1,o=n>0?Math.floor(n):Math.ceil(n),p=(this.tr.v.props,this.pMatrix.props),l=this.rMatrix.props,f=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var m=0;if(n>0){for(;m<o;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),m+=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,h,!1),m+=h)}else if(n<0){for(;m>o;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),m-=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-h,!0),m-=h)}i=1===this.data.m?0:this._currentCopies-1;var d=1===this.data.m?1:-1;for(r=this._currentCopies;r;){if(0!==m){(0!==i&&1===d||i!==this._currentCopies-1&&d===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15]),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),this.matrix.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]);var c,u=this.elemsData[i].it,g=u[u.length-1].transform.mProps.v.props,y=g.length;for(c=0;c<y;c+=1)g[c]=this.matrix.props[c];this.matrix.reset()}else{this.matrix.reset();var c,u=this.elemsData[i].it,g=u[u.length-1].transform.mProps.v.props,y=g.length;for(c=0;c<y;c+=1)g[c]=this.matrix.props[c]}m+=1,r-=1,i+=d}}},w.prototype.addShape=function(){},he.registerModifier("rp",w),F.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(g(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},F.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)ue.release(this.shapes[t]);this._length=0},C.prototype.getValue=function(t){if(this.elem._x.frameId!==this.frameId||t){var e=0,s=this.dataProps.length;for(this.mdf=!1,this.frameId=this.elem._x.frameId;e<s;){if(this.dataProps[e].p.mdf){this.mdf=!t;break}e+=1}if(this.mdf||t)for("svg"===this.renderer&&(this.dashStr=""),e=0;e<s;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},x.prototype.comparePoints=function(t,e){for(var s,i=0,a=this.o.length/2;i<a;){if(s=Math.abs(t[4*i]-t[4*e+2*i]),s>.01)return!1;i+=1}return!0},x.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},x.prototype.getValue=function(t){if(this.prop.getValue(),this.cmdf=!1,this.omdf=!1,this.prop.mdf||t){var e,s,i,a=4*this.data.p;for(e=0;e<a;e+=1)s=e%4===0?100:255,i=Math.round(this.prop.v[e]*s),this.c[e]!==i&&(this.c[e]=i,this.cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)s=e%2===0?100:1,i=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this.omdf=!t)}};var oe=function(){function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(t){var e="";if(this.assetsPath){var s=t.p;s.indexOf("images/")!==-1&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e}function s(e){var s=v("img");s.addEventListener("load",t.bind(this),!1),s.addEventListener("error",t.bind(this),!1),s.src=e}function i(t,i){this.imagesLoadedCb=i,this.totalAssets=t.length;var a;for(a=0;a<this.totalAssets;a+=1)t[a].layers||(s.bind(this)(e.bind(this)(t[a])),this.totalImages+=1)}function a(t){this.path=t||""}function r(t){this.assetsPath=t||""}function n(){this.imagesLoadedCb=null}return function(){this.loadAssets=i,this.setAssetsPath=r,this.setPath=a,this.destroy=n,this.assetsPath="",this.path="",this.totalAssets=0,this.totalImages=0,this.loadedAssets=0,this.imagesLoadedCb=null}}(),pe=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),le=function(){function t(t){var e=y("filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e}function e(){var t=y("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t}var s={};return s.createFilter=t,s.createAlphaToLuminanceFilter=e,s}();D.prototype.searchProperties=function(t){var e,s,i=this._textData.a.length,a=ae._bo;for(e=0;e<i;e+=1)s=this._textData.a[e],this._animatorsData[e]=new S(this._elem,s,this.__co);this._textData.p&&"m"in this._textData.p?(this._pathData={f:a(this._elem,this._textData.p.f,0,0,this.__co),l:a(this._elem,this._textData.p.l,0,0,this.__co),r:this._textData.p.r,m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=a(this._elem,this._textData.m.a,1,0,this.__co),this.__co.length&&t.push(this)},D.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this.mdf||this._ch||e||this._hasMaskedPath&&this._pathData.m.mdf){this._ch=!1;var s,i,a,r,n=this._moreOptions.alignment.v,h=this._animatorsData,o=this._textData,p=this.mHelper,l=this._renderType,f=this._bt.length,u=(this.data,t.l);if(this._hasMaskedPath){var g=this._pathData.m;if(!this._pathData.n||this._pathData.mdf){var y=g.v;this._pathData.r&&(y=y.reverse());var v={tLength:0,segments:[]};r=y._length-1;var b,k=0;for(a=0;a<r;a+=1)b={s:y.v[a],e:y.v[a+1],to:[y.o[a][0]-y.v[a][0],y.o[a][1]-y.v[a][1]],ti:[y.i[a+1][0]-y.v[a+1][0],y.i[a+1][1]-y.v[a+1][1]]},ee.buildBezierData(b),v.tLength+=b.bezierData.segmentLength,v.segments.push(b),k+=b.bezierData.segmentLength;a=r,g.v.c&&(b={s:y.v[a],e:y.v[0],to:[y.o[a][0]-y.v[a][0],y.o[a][1]-y.v[a][1]],ti:[y.i[0][0]-y.v[0][0],y.i[0][1]-y.v[0][1]]},ee.buildBezierData(b),v.tLength+=b.bezierData.segmentLength,v.segments.push(b),k+=b.bezierData.segmentLength),this._pathData.pi=v}var A,P,M,v=this._pathData.pi,_=this._pathData.f.v,E=0,w=1,F=0,C=!0,x=v.segments;if(_<0&&g.v.c)for(v.tLength<Math.abs(_)&&(_=-Math.abs(_)%v.tLength),E=x.length-1,M=x[E].bezierData.points,w=M.length-1;_<0;)_+=M[w].partialLength,w-=1,w<0&&(E-=1,M=x[E].bezierData.points,w=M.length-1);M=x[E].bezierData.points,P=M[w-1],A=M[w];var D,S,I=A.partialLength}r=u.length,s=0,i=0;var L,R,V,N,z,B=1.2*t.s*.714,O=!0;N=h.length;var j,G,W,X,q,Y,H,J,U,Z,K,Q,$,tt=-1,et=_,st=E,it=w,at=-1,rt=0,nt="",ht=this.defaultPropsArray;for(a=0;a<r;a+=1){if(p.reset(),q=1,u[a].n)s=0,i+=t.yOffset,i+=O?1:0,_=et,O=!1,rt=0,this._hasMaskedPath&&(E=st,w=it,M=x[E].bezierData.points,P=M[w-1],A=M[w],I=A.partialLength,F=0),$=Z=Q=nt="",ht=this.defaultPropsArray;else{if(this._hasMaskedPath){if(at!==u[a].line){switch(t.j){case 1:_+=k-t.lineWidths[u[a].line];break;case 2:_+=(k-t.lineWidths[u[a].line])/2}at=u[a].line}tt!==u[a].ind&&(u[tt]&&(_+=u[tt].extra),_+=u[a].an/2,tt=u[a].ind),_+=n[0]*u[a].an/200;var ot=0;for(V=0;V<N;V+=1)L=h[V].a,L.p.propType&&(R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),ot+=j.length?L.p.v[0]*j[0]:L.p.v[0]*j),L.a.propType&&(R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),ot+=j.length?L.a.v[0]*j[0]:L.a.v[0]*j);for(C=!0;C;)F+I>=_+ot||!M?(D=(_+ot-F)/A.partialLength,W=P.point[0]+(A.point[0]-P.point[0])*D,X=P.point[1]+(A.point[1]-P.point[1])*D,p.translate(-n[0]*u[a].an/200,-(n[1]*B/100)),C=!1):M&&(F+=A.partialLength,w+=1,w>=M.length&&(w=0,E+=1,x[E]?M=x[E].bezierData.points:g.v.c?(w=0,E=0,M=x[E].bezierData.points):(F-=A.partialLength,M=null)),M&&(P=A,A=M[w],I=A.partialLength));G=u[a].an/2-u[a].add,p.translate(-G,0,0)}else G=u[a].an/2-u[a].add,p.translate(-G,0,0),p.translate(-n[0]*u[a].an/200,-n[1]*B/100,0);for(rt+=u[a].l/2,V=0;V<N;V+=1)L=h[V].a,L.t.propType&&(R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),this._hasMaskedPath?_+=j.length?L.t*j[0]:L.t*j:s+=j.length?L.t.v*j[0]:L.t.v*j);for(rt+=u[a].l/2,t.strokeWidthAnim&&(H=t.sw||0),t.strokeColorAnim&&(Y=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(J=[t.fc[0],t.fc[1],t.fc[2]]),V=0;V<N;V+=1)L=h[V].a,L.a.propType&&(R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),j.length?p.translate(-L.a.v[0]*j[0],-L.a.v[1]*j[1],L.a.v[2]*j[2]):p.translate(-L.a.v[0]*j,-L.a.v[1]*j,L.a.v[2]*j));for(V=0;V<N;V+=1)L=h[V].a,L.s.propType&&(R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),j.length?p.scale(1+(L.s.v[0]-1)*j[0],1+(L.s.v[1]-1)*j[1],1):p.scale(1+(L.s.v[0]-1)*j,1+(L.s.v[1]-1)*j,1));for(V=0;V<N;V+=1){if(L=h[V].a,R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),L.sk.propType&&(j.length?p.skewFromAxis(-L.sk.v*j[0],L.sa.v*j[1]):p.skewFromAxis(-L.sk.v*j,L.sa.v*j)),L.r.propType&&(j.length?p.rotateZ(-L.r.v*j[2]):p.rotateZ(-L.r.v*j)),L.ry.propType&&(j.length?p.rotateY(L.ry.v*j[1]):p.rotateY(L.ry.v*j)),L.rx.propType&&(j.length?p.rotateX(L.rx.v*j[0]):p.rotateX(L.rx.v*j)),L.o.propType&&(q+=j.length?(L.o.v*j[0]-q)*j[0]:(L.o.v*j-q)*j),t.strokeWidthAnim&&L.sw.propType&&(H+=j.length?L.sw.v*j[0]:L.sw.v*j),t.strokeColorAnim&&L.sc.propType)for(U=0;U<3;U+=1)j.length?Y[U]=Y[U]+(L.sc.v[U]-Y[U])*j[0]:Y[U]=Y[U]+(L.sc.v[U]-Y[U])*j;if(t.fillColorAnim&&t.fc){if(L.fc.propType)for(U=0;U<3;U+=1)j.length?J[U]=J[U]+(L.fc.v[U]-J[U])*j[0]:J[U]=J[U]+(L.fc.v[U]-J[U])*j;L.fh.propType&&(J=j.length?c(J,L.fh.v*j[0]):c(J,L.fh.v*j)),L.fs.propType&&(J=j.length?m(J,L.fs.v*j[0]):m(J,L.fs.v*j)),L.fb.propType&&(J=j.length?d(J,L.fb.v*j[0]):d(J,L.fb.v*j))}}for(V=0;V<N;V+=1)L=h[V].a,L.p.propType&&(R=h[V].s,j=R.getMult(u[a].anIndexes[V],o.a[V].s.totalChars),this._hasMaskedPath?j.length?p.translate(0,L.p.v[1]*j[0],-L.p.v[2]*j[1]):p.translate(0,L.p.v[1]*j,-L.p.v[2]*j):j.length?p.translate(L.p.v[0]*j[0],L.p.v[1]*j[1],-L.p.v[2]*j[2]):p.translate(L.p.v[0]*j,L.p.v[1]*j,-L.p.v[2]*j));if(t.strokeWidthAnim&&(Z=H<0?0:H),t.strokeColorAnim&&(K="rgb("+Math.round(255*Y[0])+","+Math.round(255*Y[1])+","+Math.round(255*Y[2])+")"),t.fillColorAnim&&t.fc&&(Q="rgb("+Math.round(255*J[0])+","+Math.round(255*J[1])+","+Math.round(255*J[2])+")"),this._hasMaskedPath){if(p.translate(0,-t.ls),p.translate(0,n[1]*B/100+i,0),o.p.p){S=(A.point[1]-P.point[1])/(A.point[0]-P.point[0]);var pt=180*Math.atan(S)/Math.PI;A.point[0]<P.point[0]&&(pt+=180),p.rotate(-pt*Math.PI/180)}p.translate(W,X,0),_-=n[0]*u[a].an/200,u[a+1]&&tt!==u[a+1].ind&&(_+=u[a].an/2,_+=t.tr/1e3*t.s)}else{switch(p.translate(s,i,0),t.ps&&p.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:p.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[u[a].line]),0,0);break;case 2:p.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[u[a].line])/2,0,0)}p.translate(0,-t.ls),p.translate(G,0,0),p.translate(n[0]*u[a].an/200,n[1]*B/100,0),s+=u[a].l+t.tr/1e3*t.s}"html"===l?nt=p.toCSS():"svg"===l?nt=p.to2dCSS():ht=[p.props[0],p.props[1],p.props[2],p.props[3],p.props[4],p.props[5],p.props[6],p.props[7],p.props[8],p.props[9],p.props[10],p.props[11],p.props[12],p.props[13],p.props[14],p.props[15]],$=q}f<=a?(z=new T($,Z,K,Q,nt,ht),this._bt.push(z),f+=1,this.lettersChangedFlag=!0):(z=this._bt[a],this.lettersChangedFlag=z.update($,Z,K,Q,nt,ht)||this.lettersChangedFlag)}}},D.prototype.getValue=function(){if(this._elem._x.frameId!==this._frameId){this._frameId=this._elem._x.frameId;var t,e=this.__co.length;for(this.mdf=!1,t=0;t<e;t+=1)this.__co[t].getValue(),this.mdf=this.__co[t].mdf||this.mdf}},D.prototype.mHelper=new $t,D.prototype.defaultPropsArray=[],T.prototype.update=function(t,e,s,i,a,r){this.mdf.o=!1,this.mdf.sw=!1,this.mdf.sc=!1,this.mdf.fc=!1,this.mdf.m=!1,this.mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this.mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this.mdf.sw=!0,n=!0),this.sc!==s&&(this.sc=s,this.mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this.mdf.fc=!0,n=!0),this.m!==a&&(this.m=a,this.mdf.m=!0,n=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,this.mdf.p=!0,n=!0),n},I.prototype.setCurrentData=function(t){var e=this.currentData;e.ascent=t.ascent,e.boxWidth=t.boxWidth?t.boxWidth:e.boxWidth,e.f=t.f,e.fStyle=t.fStyle,e.fWeight=t.fWeight,e.fc=t.fc,e.j=t.j,e.justifyOffset=t.justifyOffset,e.l=t.l,e.lh=t.lh,e.lineWidths=t.lineWidths,e.ls=t.ls,e.of=t.of,e.s=t.s,e.sc=t.sc,e.sw=t.sw,e.sz=t.sz,e.ps=t.ps,e.t=t.t,e.tr=t.tr,e.fillColorAnim=t.fillColorAnim||e.fillColorAnim,e.strokeColorAnim=t.strokeColorAnim||e.strokeColorAnim,e.strokeWidthAnim=t.strokeWidthAnim||e.strokeWidthAnim,e.yOffset=t.yOffset,e.__complete=!1},I.prototype.searchProperty=function(){return this.kf=this.data.d.k.length>1,this.kf},I.prototype.getValue=function(){this.mdf=!1;var t=this.elem._x.frameId;if(t!==this._frameId&&this.kf||this._ch){for(var e,s=this.data.d.k,i=0,a=s.length;i<=a-1&&(e=s[i].s,!(i===a-1||s[i+1].t>t));)i+=1;this.keysIndex!==i&&(e.__complete||this.completeTextData(e),this.setCurrentData(e),this.mdf=!this._ch,this.pv=this.v=this.currentData.t,this.keysIndex=i),this._frameId=t}},I.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,h,o=this.elem._x._cr,p=this.data,l=[],f=0,m=p.m.g,d=0,c=0,u=0,g=[],y=0,v=0,b=o.getFontByName(t.f),k=0,A=b.fStyle.split(" "),P="normal",M="normal";s=A.length;var _;for(e=0;e<s;e+=1)switch(_=A[e].toLowerCase()){case"italic":M="italic";break;case"bold":P="700";break;case"black":P="900";break;case"medium":P="500";break;case"regular":case"normal":P="400";case"light":case"thin":P="200"}t.fWeight=P,t.fStyle=M,s=t.t.length;var E=t.tr/1e3*t.s;if(t.sz){var w=t.sz[0],F=-1;for(e=0;e<s;e+=1)i=!1," "===t.t.charAt(e)?F=e:13===t.t.charCodeAt(e)&&(y=0,i=!0),o.chars?(h=o.getCharData(t.t.charAt(e),b.fStyle,b.fFamily),k=i?0:h.w*t.s/100):k=o.measureText(t.t.charAt(e),t.f,t.s),y+k>w&&" "!==t.t.charAt(e)?(F===-1?s+=1:e=F,t.t=t.t.substr(0,e)+"\r"+t.t.substr(e===F?e+1:e),F=-1,y=0):(y+=k,y+=E);s=t.t.length}y=-E,k=0;var C,x=0;for(e=0;e<s;e+=1)if(i=!1,C=t.t.charAt(e)," "===C?a="\xa0":13===C.charCodeAt(0)?(x=0,g.push(y),v=y>v?y:v,y=-2*E,a="",i=!0,u+=1):a=t.t.charAt(e),o.chars?(h=o.getCharData(C,b.fStyle,o.getFontByName(t.f).fFamily),k=i?0:h.w*t.s/100):k=o.measureText(a,t.f,t.s)," "===C?x+=k+E:(y+=k+E+x,x=0),l.push({l:k,an:k,add:d,n:i,anIndexes:[],val:a,line:u}),2==m){if(d+=k,""==a||"\xa0"==a||e==s-1){for(""!=a&&"\xa0"!=a||(d-=k);c<=e;)l[c].an=d,l[c].ind=f,l[c].extra=k,c+=1;f+=1,d=0}}else if(3==m){if(d+=k,""==a||e==s-1){for(""==a&&(d-=k);c<=e;)l[c].an=d,l[c].ind=f,l[c].extra=k,c+=1;d=0,f+=1}}else l[f].ind=f,l[f].extra=0,f+=1;if(t.l=l,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var D,S,T=p.a;n=T.length;var I,L,R=[];for(r=0;r<n;r+=1){for(D=T[r],D.a.sc&&(t.strokeColorAnim=!0),D.a.sw&&(t.strokeWidthAnim=!0),(D.a.fc||D.a.fh||D.a.fs||D.a.fb)&&(t.fillColorAnim=!0),L=0,I=D.s.b,e=0;e<s;e+=1)S=l[e],S.anIndexes[r]=L,(1==I&&""!=S.val||2==I&&""!=S.val&&"\xa0"!=S.val||3==I&&(S.n||"\xa0"==S.val||e==s-1)||4==I&&(S.n||e==s-1))&&(1===D.s.rn&&R.push(L),L+=1);p.a[r].s.totalChars=L;var V,N=-1;if(1===D.s.rn)for(e=0;e<s;e+=1)S=l[e],N!=S.anIndexes[r]&&(N=S.anIndexes[r],V=R.splice(Math.floor(Math.random()*R.length),1)[0]),S.anIndexes[r]=V}t.yOffset=t.lh||1.2*t.s,t.ls=t.ls||0,t.ascent=b.ascent*t.s/100},I.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var s=this.data.d.k[e].s;s.__complete=!1,s.t=t.t,this.keysIndex=-1,this._ch=!0,this.getValue()};var fe=function(){function t(t){if(this.mdf=t||!1,this._co.length){var e,s=this._co.length;for(e=0;e<s;e+=1)this._co[e].getValue(),this._co[e].mdf&&(this.mdf=!0)}var i=this.elem.textProperty.currentData?this.elem.textProperty.currentData.l.length:0;t&&2===this.data.r&&(this.e.v=i);var a=2===this.data.r?1:100/i,r=this.o.v/a,n=this.s.v/a+r,h=this.e.v/a+r;if(n>h){var o=n;n=h,h=o}this.finalS=n,this.finalE=h}function e(t){var e=te.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,s=0,i=this.finalS,h=this.finalE,o=this.data.sh;if(2==o)s=h===i?t>=h?1:0:a(0,r(.5/(h-i)+(t-i)/(h-i),1)),s=e(s);else if(3==o)s=h===i?t>=h?0:1:1-a(0,r(.5/(h-i)+(t-i)/(h-i),1)),s=e(s);else if(4==o)h===i?s=0:(s=a(0,r(.5/(h-i)+(t-i)/(h-i),1)),s<.5?s*=2:s=1-2*(s-.5)),s=e(s);else if(5==o){if(h===i)s=0;else{var p=h-i;t=r(a(0,t+.5-i),h-i);var l=-p/2+t,f=p/2;s=Math.sqrt(1-l*l/(f*f))}s=e(s)}else 6==o?(h===i?s=0:(t=r(a(0,t+.5-i),h-i),s=(1+Math.cos(Math.PI+2*Math.PI*t/(h-i)))/2),s=e(s)):(t>=n(i)&&(s=t-i<0?1-(i-t):a(0,r(h-t,1))),s=e(s));return s*this.a.v}function s(s,i,a){this.mdf=!1,this.k=!1,this.data=i,this._co=[],this.getValue=t,this.getMult=e,this.elem=s,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=ae._bo(s,i.s||{k:0},0,0,this._co),"e"in i?this.e=ae._bo(s,i.e,0,0,this._co):this.e={v:100},this.o=ae._bo(s,i.o||{k:0},0,0,this._co),this.xe=ae._bo(s,i.xe||{k:0},0,0,this._co),this.ne=ae._bo(s,i.ne||{k:0},0,0,this._co),this.a=ae._bo(s,i.a,0,.01,this._co),this._co.length?a.push(this):this.getValue()}function i(t,e,i){return new s(t,e,i)}var a=Math.max,r=Math.min,n=Math.floor;return{getTextSelectorProp:i}}(),me=function(){return function(t,e,s,i){function a(){var t;return n?(n-=1,t=o[n]):t=e(),t}function r(t){n===h&&(o=de["double"](o),h=2*h),s&&s(t),o[n]=t,n+=1}var n=0,h=t,o=g(h),p={newElement:a,release:r};return p}}(),de=function(){function t(t){return t.concat(g(t.length))}return{"double":t}}(),ce=function(){function t(){return Qt("float32",2)}return me(8,t)}(),ue=function(){function t(){return new P}function e(t){var e,s=t._length;for(e=0;e<s;e+=1)ce.release(t.v[e]),ce.release(t.i[e]),ce.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}function s(t){var e,s=i.newElement(),a=void 0===t._length?t.v.length:t._length;s.setLength(a),s.c=t.c;for(e=0;e<a;e+=1)s._aw(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return s}var i=me(4,t,e);return i.clone=s,i}(),ge=function(){function t(){var t;return i?(i-=1,t=r[i]):t=new F,t}function e(t){var e,s=t._length;for(e=0;e<s;e+=1)ue.release(t.shapes[e]);t._length=0,i===a&&(r=de["double"](r),a=2*a),r[i]=t,i+=1}var s={_al:t,release:e},i=0,a=4,r=g(a);return s}(),ye=function(){function t(){return{lengths:[],totalLength:0}}function e(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)ve.release(t.lengths[e]);t.lengths.length=0}return me(8,t,e)}(),ve=function(){function t(){return{addedLength:0,percents:Qt("float32",Jt),lengths:Qt("float32",Jt)}}return me(8,t)}();L.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this._db=!0,e=i-1;e>=0;e--)this._br[e]||(s=this.layers[e],s.ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e)),this._db=!!this._br[e]&&this._db;this.checkPendingElements()},L.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t);case 99:return null}return this.createBase(t)},L.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},L.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},L.prototype.includeLayers=function(t){this._db=!1;var e,s,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(s=0;s<a;){if(this.layers[s].id==t[e].id){this.layers[s]=t[e];break}s+=1}},L.prototype.setProjectInterface=function(t){this._x.projectInterface=t},L.prototype.initItems=function(){this._x.progressiveLoad||this.buildAllItems()},L.prototype.buildElementParenting=function(t,e,s){for(var i=this._br,a=this.layers,r=0,n=a.length;r<n;)a[r].ind==e&&(i[r]&&i[r]!==!0?void 0!==a[r].parent?(s.push(i[r]),i[r]._isParent=!0,this.buildElementParenting(t,a[r].parent,s)):(s.push(i[r]),i[r]._isParent=!0,t.setHierarchy(s)):(this.buildItem(r),this.addPendingElement(t))),r+=1},L.prototype.addPendingElement=function(t){this._dc.push(t)},b([L],R),R.prototype.createBase=function(t){return new $(t,this._x,this)},R.prototype.createNull=function(t){return new Q(t,this._x,this)},R.prototype.createShape=function(t){return new ht(t,this._x,this)},R.prototype.createText=function(t){return new nt(t,this._x,this)},R.prototype.createImage=function(t){return new it(t,this._x,this)},R.prototype.createComp=function(t){return new rt(t,this._x,this)},R.prototype.createSolid=function(t){return new at(t,this._x,this)},R.prototype.configAnimation=function(t){this._cf.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this._cf.setAttribute("viewBox",this.renderConfig.viewBoxSize):this._cf.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this._cf.setAttribute("width",t.w),this._cf.setAttribute("height",t.h),this._cf.style.width="100%",this._cf.style.height="100%"),this.renderConfig.className&&this._cf.setAttribute("class",this.renderConfig.className),this._cf.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this._cq.wrapper.appendChild(this._cf);var e=this._x.defs;this._x.getAssetData=this._cq.getAssetData.bind(this._cq),this._x.getAssetsPath=this._cq.getAssetsPath.bind(this._cq),this._x.progressiveLoad=this.renderConfig.progressiveLoad,this._x.nm=t.nm,this._x._de.w=t.w,this._x._de.h=t.h,this._x.frameRate=t.fr,this.data=t;var s=y("clipPath"),i=y("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+p(10);s.setAttribute("id",a),s.appendChild(i),this._bx.setAttribute("clip-path","url("+Ot+"#"+a+")"),e.appendChild(s),this.layers=t.layers,this._x._cr.addChars(t.chars),this._x._cr.addFonts(t.fonts,e),this._br=g(t.layers.length)},R.prototype.destroy=function(){this._cq.wrapper.innerHTML="",this._bx=null,this._x.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this._br[t]&&this._br[t].destroy();this._br.length=0,this.destroyed=!0,this._cq=null},R.prototype.updateContainerSize=function(){},R.prototype.buildItem=function(t){var e=this._br;if(!e[t]&&99!=this.layers[t].ty){e[t]=!0;var s=this.createItem(this.layers[t]);e[t]=s,Nt&&(0===this.layers[t].ty&&this._x.projectInterface.registerComposition(s),s.initExpressions()),this.appendElementInPos(s,t),this.layers[t].tt&&(this._br[t-1]&&this._br[t-1]!==!0?s.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(s)))}},R.prototype.checkPendingElements=function(){for(;this._dc.length;){var t=this._dc.pop();if(t.checkParenting(),t.data.tt)for(var e=0,s=this._br.length;e<s;){if(this._br[e]===t){t.setMatte(this._br[e-1].layerId);break}e+=1}}},R.prototype._ba=function(t){if(this.renderedFrame!==t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this._x.frameNum=t,this._x.frameId+=1,this._x.projectInterface.currentFrame=t;var e,s=this.layers.length;for(this._db||this.checkLayers(t),e=s-1;e>=0;e--)(this._db||this._br[e])&&this._br[e]._az(t-this.layers[e].st);for(e=0;e<s;e+=1)(this._db||this._br[e])&&this._br[e]._ba()}},R.prototype.appendElementInPos=function(t,e){var s=t.get_e();if(s){for(var i,a=0;a<e;)this._br[a]&&this._br[a]!==!0&&this._br[a].get_e()&&(i=this._br[a].get_e()),a+=1;i?this._bx.insertBefore(s,i):this._bx.appendChild(s)}},R.prototype.hide=function(){this._bx.style.display="none"},R.prototype.show=function(){this._bx.style.display="block"},R.prototype.searchExtraCompositions=function(t){var e,s=t.length,i=y("g");for(e=0;e<s;e+=1)if(t[e].xt){var a=this.createComp(t[e],i,this._x.comp,null);a.initExpressions(),this._x.projectInterface.registerComposition(a)}},V.prototype.getMaskProperty=function(t){return this.viewData[t].prop},V.prototype._az=function(){var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue()},V.prototype._ba=function(t){var e,s=this.masksProperties.length;for(e=0;e<s;e++)if((this.viewData[e].prop.mdf||this._ch)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op.mdf||this._ch)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp.mdf||this._ch)&&(this.viewData[e].invRect.setAttribute("x",-t.props[12]),this.viewData[e].invRect.setAttribute("y",-t.props[13])),this.storedData[e].x&&(this.storedData[e].x.mdf||this._ch))){var i=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+Ot+"#"+this.storedData[e].filterId+")")),i.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}this._ch=!1},V.prototype.getMaskelement=function(){return this.maskElement},V.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this._x._de.w,t+=" v"+this._x._de.h,t+=" h-"+this._x._de.w,t+=" v-"+this._x._de.h+" "},V.prototype.drawPath=function(t,e,s){var i,a,r=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&a>1&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},V.prototype.destroy=function(){this.element=null,this._x=null,this.maskElement=null,this.data=null,this.masksProperties=null},N.prototype.initHierarchy=function(){this._dd=[],this._isParent=!1,this.checkParenting()},N.prototype.resetHierarchy=function(){this._dd.length=0},N.prototype.getHierarchy=function(){return this._dd},N.prototype.setHierarchy=function(t){this._dd=t},N.prototype.checkParenting=function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])},N.prototype.prepareHierarchy=function(){},z.prototype.initFrame=function(){this._ch=!1,this._co=[]},z.prototype.prepareProperties=function(t,e){var s,i=this._co.length;for(s=0;s<i;s+=1)(e||this._isParent&&"transform"===this._co[s].propType)&&(this._co[s].getValue(this._ch),this._co[s].mdf&&(this._x.mdf=!0))},B.prototype.initTransform=function(){this.finalTransform={mProp:this.data.ks?re._bj(this,this.data.ks,this._co):{o:0},matMdf:!1,opMdf:!1,mat:new $t},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),11!==this.data.ty},B.prototype.renderTransform=function(){if(this.finalTransform.opMdf=this.finalTransform.mProp.o.mdf||this._ch,this.finalTransform.matMdf=this.finalTransform.mProp.mdf||this._ch,this._dd){var t,e=this.finalTransform.mat,s=0,i=this._dd.length;if(!this.finalTransform.matMdf)for(;s<i;){if(this._dd[s].finalTransform.mProp.mdf){this.finalTransform.matMdf=!0;break}s+=1}if(this.finalTransform.matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),s=0;s<i;s+=1)t=this._dd[s].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},B.prototype.globalToLocal=function(t){var e=[];e.push(this.finalTransform);for(var s=!0,i=this.comp;s;)i.finalTransform?(i.data.hasMask&&e.splice(0,0,i.finalTransform),i=i.comp):s=!1;var a,r,n=e.length;for(a=0;a<n;a+=1)r=e[a].mat._cn(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},B.prototype.mHelper=new $t,O.prototype.initRenderable=function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1},O.prototype.prepareRenderableFrame=function(t){this.checkLayerLimits(t),this.prepareMasks(t),this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this._x.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},O.prototype.checkLayerLimits=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this._x.mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this._x.mdf=!0,this.isInRange=!1,this.hide())},O.prototype.prepareMasks=function(){this.isInRange&&this.maskManager._az()},O.prototype.renderRenderable=function(){this.maskManager._ba(this.finalTransform.mat),this.effectsManager._ba(this._ch)},O.prototype.sourceRectAtTime=function(){return{top:0,left:0,width:100,height:100}},O.prototype.getLayerSize=function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}},b([O],j),j.prototype._cz=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.hide()},j.prototype.hide=function(){this.hidden||this.isInRange&&!this.isTransparent||(this._bx.style.display="none",this.hidden=!0)},j.prototype.show=function(){this.isInRange&&!this.isTransparent&&(this.data.hd||(this._bx.style.display="block"),this.hidden=!1,this._ch=!0,this.maskManager._ch=!0)},j.prototype._ba=function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._ch&&(this._ch=!1))},j.prototype.renderInnerContent=function(){},j.prototype.destroy=function(){this._cc=null,this.destroy_e()},j.prototype._az=function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},W.prototype.reset=function(){this.d="",this.mdf=!1},J.prototype.initGradientData=function(t,e,s,i){this.o=ae._bo(t,e.o,0,.01,s),
-this.s=ae._bo(t,e.s,1,null,s),this.e=ae._bo(t,e.e,1,null,s),this.h=ae._bo(t,e.h||{k:0},0,.01,s),this.a=ae._bo(t,e.a||{k:0},0,Ut,s),this.g=new x(t,e.g,s),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i)},J.prototype.setGradientData=function(t,e){var s="gr_"+p(10),i=y(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",s),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var a,r,n,h=[];for(n=4*e.g.p,r=0;r<n;r+=4)a=y("stop"),i.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url(#"+s+")"),this.gf=i,this.cst=h},J.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var s,i,a,r=y("mask"),n=y("path");r.appendChild(n);var h="op_"+p(10),o="mk_"+p(10);r.setAttribute("id",o);var l=y(1===t.t?"linearGradient":"radialGradient");l.setAttribute("id",h),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var f=this.stops;for(i=4*t.g.p;i<a;i+=2)s=y("stop"),s.setAttribute("stop-color","rgb(255,255,255)"),l.appendChild(s),f.push(s);n.setAttribute("gf"===t.ty?"fill":"stroke","url(#"+h+")"),this.of=l,this.ms=r,this.ost=f,this.maskId=o,e.msElem=n}},U.prototype.initGradientData=J.prototype.initGradientData,U.prototype.setGradientData=J.prototype.setGradientData,U.prototype.setGradientOpacity=J.prototype.setGradientOpacity,K.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},K.prototype.initExpressions=function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},K.prototype.blendModeEnums={1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},K.prototype.getBlendMode=function(){return this.blendModeEnums[this.data.bm]||""},K.prototype.setBlendMode=function(){var t=this.getBlendMode(),e=this._by||this._bx;e.style["mix-blend-mode"]=t},K.prototype.initBaseData=function(t,e,s){this._x=e,this.comp=s,this.data=t,this.layerId="ly_"+p(10),this.data.sr||(this.data.sr=1),this.effects=new EffectsManager(this.data,this,this._co)},K.prototype.getType=function(){return this.type},Q.prototype._az=function(t){this.prepareProperties(t,!0)},Q.prototype._ba=function(){},Q.prototype.get_e=function(){return null},Q.prototype.destroy=function(){},Q.prototype.sourceRectAtTime=function(){},Q.prototype.hide=function(){},b([K,B,N,z],Q),$.prototype.initRendererElement=function(){this._bx=y("g")},$.prototype.createContainerElements=function(){this.matteElement=y("g"),this._bz=this._bx,this._ca=this._bx,this._sizeChanged=!1;var t=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var e=y("mask");if(e.setAttribute("id",this.layerId),e.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),e.appendChild(this._bx),t=e,this._x.defs.appendChild(e),!pe.maskType&&1==this.data.td){e.setAttribute("mask-type","luminance");var s=p(10),i=le.createFilter(s);this._x.defs.appendChild(i),i.appendChild(le.createAlphaToLuminanceFilter());var a=y("g");a.appendChild(this._bx),t=a,e.appendChild(a),a.setAttribute("filter","url("+Ot+"#"+s+")")}}else if(2==this.data.td){var r=y("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type","alpha");var n=y("g");r.appendChild(n);var s=p(10),i=le.createFilter(s),h=y("feColorMatrix");h.setAttribute("type","matrix"),h.setAttribute("color-interpolation-filters","sRGB"),h.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1"),i.appendChild(h),this._x.defs.appendChild(i);var o=y("rect");if(o.setAttribute("width",this.comp.data.w),o.setAttribute("height",this.comp.data.h),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("fill","#ffffff"),o.setAttribute("opacity","0"),n.setAttribute("filter","url("+Ot+"#"+s+")"),n.appendChild(o),n.appendChild(this._bx),t=n,!pe.maskType){r.setAttribute("mask-type","luminance"),i.appendChild(le.createAlphaToLuminanceFilter());var a=y("g");n.appendChild(o),a.appendChild(this._bx),t=a,n.appendChild(a)}this._x.defs.appendChild(r)}}else this.data.tt?(this.matteElement.appendChild(this._bx),t=this.matteElement,this._by=this.matteElement):this._by=this._bx;if(!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.data.ln&&this._bx.setAttribute("id",this.data.ln),this.data.cl&&this._bx.setAttribute("class",this.data.cl)),0===this.data.ty&&!this.data.hd){var l=y("clipPath"),f=y("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m="cp_"+p(8);if(l.setAttribute("id",m),l.appendChild(f),this._x.defs.appendChild(l),this.checkMasks()){var d=y("g");d.setAttribute("clip-path","url("+Ot+"#"+m+")"),d.appendChild(this._bx),this._bz=d,t?t.appendChild(this._bz):this._by=this._bz}else this._bx.setAttribute("clip-path","url("+Ot+"#"+m+")")}0!==this.data.bm&&this.setBlendMode(),this.effectsManager=new ut(this)},$.prototype.renderElement=function(){this.finalTransform.matMdf&&this._bz.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform.opMdf&&this._bz.setAttribute("opacity",this.finalTransform.mProp.o.v)},$.prototype.destroy_e=function(){this._bx=null,this.matteElement=null,this.maskManager.destroy()},$.prototype.get_e=function(){return this.data.hd?null:this._by},$.prototype.addMasks=function(){this.maskManager=new V(this.data,this,this._x)},$.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+Ot+"#"+t+")")},tt.prototype={addShapeToModifiers:function(t){var e,s=this.shapeModifiers.length;for(e=0;e<s;e+=1)this.shapeModifiers[e].addShape(t)},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].reset();for(e=this.shapeModifiers.length,t=e-1;t>=0;t-=1)this.shapeModifiers[t].processShapes(this._ch)}},lcEnum:{1:"butt",2:"round",3:"square"},ljEnum:{1:"miter",2:"round",3:"butt"},searchProcessedElement:function(t){for(var e=0,s=this.processedElements.length;e<s;){if(this.processedElements[e].elem===t)return this.processedElements[e].pos;e+=1}return 0},addProcessedElement:function(t,e){for(var s=this.processedElements.length;s;)if(s-=1,this.processedElements[s].elem===t){this.processedElements[s].pos=e;break}0===s&&this.processedElements.push(new G(t,e))},_az:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},buildShapeString:function(t,e,s,i){var a,r="";for(a=1;a<e;a+=1)1===a&&(r+=" M"+i.applyToPointStringified(t.v[0][0],t.v[0][1])),r+=" C"+i.applyToPointStringified(t.o[a-1][0],t.o[a-1][1])+" "+i.applyToPointStringified(t.i[a][0],t.i[a][1])+" "+i.applyToPointStringified(t.v[a][0],t.v[a][1]);return 1===e&&(r+=" M"+i.applyToPointStringified(t.v[0][0],t.v[0][1])),s&&e&&(r+=" C"+i.applyToPointStringified(t.o[a-1][0],t.o[a-1][1])+" "+i.applyToPointStringified(t.i[0][0],t.i[0][1])+" "+i.applyToPointStringified(t.v[0][0],t.v[0][1]),r+="z"),r}},et.prototype._cz=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textAnimator=new D(t.t,this.renderType,this),this.textProperty=new I(this,t.t,this._co),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.textAnimator.searchProperties(this._co)},et.prototype._az=function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty.mdf||this.textProperty._ch)&&(this.buildNewText(),this.textProperty._ch=!1)},et.prototype.createPathShape=function(t,e){var s,i,a=e.length,r="";for(s=0;s<a;s+=1)i=e[s].ks.k,r+=this.buildShapeString(i,i.i.length,!0,t);return r},et.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},et.prototype.applyTextPropertiesToMatrix=function(t,e,s,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s])/2,0,0)}e.translate(i,a,0)},et.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},et.prototype.buildShapeString=tt.prototype.buildShapeString,et.prototype.emptyProp=new T,et.prototype.destroy=function(){},b([K,B,N,z,j],st),st.prototype._cz=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},st.prototype._az=function(t){if(this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var s,i=this._br.length;for(this._db||this.checkLayers(this.renderedFrame),s=0;s<i;s+=1)(this._db||this._br[s])&&this._br[s]._az(this.renderedFrame-this.layers[s].st)}},st.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this._db||this._br[t])&&this._br[t]._ba()},st.prototype.setElements=function(t){this._br=t},st.prototype.getElements=function(){return this._br},st.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this._br[t]&&this._br[t].destroy()},st.prototype.destroy=function(){this.destroyElements(),this.destroy_e()},b([K,B,$,N,z,j],it),it.prototype.createContent=function(){var t=this._x.getAssetsPath(this.assetData);this._cc=y("image"),this._cc.setAttribute("width",this.assetData.w+"px"),this._cc.setAttribute("height",this.assetData.h+"px"),this._cc.setAttribute("preserveAspectRatio","xMidYMid slice"),this._cc.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this._bx.appendChild(this._cc)},b([it],at),at.prototype.createContent=function(){var t=y("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this._bx.appendChild(t)},b([R,st,$],rt),b([K,B,$,N,z,j,et],nt),nt.prototype.createContent=function(){this.data.ln&&this._bx.setAttribute("id",this.data.ln),this.data.cl&&this._bx.setAttribute("class",this.data.cl),this.data.singleShape&&!this._x._cr.chars&&(this.textContainer=y("text"))},nt.prototype.buildNewText=function(){var t,e,s=this.textProperty.currentData;this._bt=g(s?s.l.length:0),s.fc?this._bx.setAttribute("fill",this.buildColor(s.fc)):this._bx.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this._bx.setAttribute("stroke",this.buildColor(s.sc)),this._bx.setAttribute("stroke-width",s.sw)),this._bx.setAttribute("font-size",s.s);var i=this._x._cr.getFontByName(s.f);if(i.fClass)this._bx.setAttribute("class",i.fClass);else{this._bx.setAttribute("font-family",i.fFamily);var a=s.fWeight,r=s.fStyle;this._bx.setAttribute("font-style",r),this._bx.setAttribute("font-weight",a)}var n=s.l||[],h=this._x._cr.chars;if(e=n.length){var o,p,l=this.mHelper,f="",m=this.data.singleShape,d=0,c=0,u=!0,v=s.tr/1e3*s.s;if(m&&!h){var b=this.textContainer,k="";switch(s.j){case 1:k="end";break;case 2:k="middle";break;case 2:k="start"}b.setAttribute("text-anchor",k),b.setAttribute("letter-spacing",v);var A=s.t.split(String.fromCharCode(13));e=A.length;var c=s.ps?s.ps[1]+s.ascent:0;for(t=0;t<e;t+=1)o=this.textSpans[t]||y("tspan"),o.textContent=A[t],o.setAttribute("x",0),o.setAttribute("y",c),o.style.display="inherit",b.appendChild(o),this.textSpans[t]=o,c+=s.lh;this._bx.appendChild(b)}else{var P,M,_=this.textSpans.length;for(t=0;t<e;t+=1)h&&m&&0!==t||(o=_>t?this.textSpans[t]:y(h?"path":"text"),_<=t&&(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=o,this._bx.appendChild(o)),o.style.display="inherit"),l.reset(),h?(l.scale(s.s/100,s.s/100),m&&(n[t].n&&(d=-v,c+=s.yOffset,c+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(s,l,n[t].line,d,c),d+=n[t].l||0,d+=v),M=this._x._cr.getCharData(s.t.charAt(t),i.fStyle,this._x._cr.getFontByName(s.f).fFamily),P=M&&M.data||{},p=P.shapes?P.shapes[0].it:[],m?f+=this.createPathShape(l,p):o.setAttribute("d",this.createPathShape(l,p))):(o.textContent=n[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));m&&o.setAttribute("d",f)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0}},nt.prototype.sourceRectAtTime=function(t){if(this._az(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this._bx.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},nt.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,s=this.textAnimator._bt,i=this.textProperty.currentData.l;e=i.length;var a,r;for(t=0;t<e;t+=1)i[t].n||(a=s[t],r=this.textSpans[t],a.mdf.m&&r.setAttribute("transform",a.m),a.mdf.o&&r.setAttribute("opacity",a.o),a.mdf.sw&&r.setAttribute("stroke-width",a.sw),a.mdf.sc&&r.setAttribute("stroke",a.sc),a.mdf.fc&&r.setAttribute("fill",a.fc))}},b([K,B,$,tt,N,z,j],ht),ht.prototype.initSecondaryElement=function(){},ht.prototype.identityMatrix=new $t,ht.prototype.buildExpressionInterface=function(){},ht.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co,0,[],!0)},ht.prototype.createStyleElement=function(t,e,s){var i,a=new W(t,e),r=a.pElem;if("st"===t.ty)i=new Y(this,t,s,a);else if("fl"===t.ty)i=new H(this,t,s,a);else if("gf"===t.ty||"gs"===t.ty){var n="gf"===t.ty?J:U;i=new n(this,t,s,a),this._x.defs.appendChild(i.gf),i.maskId&&(this._x.defs.appendChild(i.ms),this._x.defs.appendChild(i.of),r.setAttribute("mask","url(#"+i.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(r.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),r.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),r.setAttribute("fill-opacity","0"),1===t.lj&&r.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&r.setAttribute("id",t.ln),t.cl&&r.setAttribute("class",t.cl),this.stylesList.push(a),i},ht.prototype.createGroupElement=function(t){var e=new Z;return t.ln&&e.gr.setAttribute("id",t.ln),e},ht.prototype._cp=function(t,e){return new q(re._bj(this,t,e),ae._bo(this,t.o,0,.01,e))},ht.prototype.createShapeElement=function(t,e,s,i){var a=4;"rc"===t.ty?a=5:"el"===t.ty?a=6:"sr"===t.ty&&(a=7);var r=ne._bp(this,t,a,i),n=new X(e,s,r);return this.shapes.push(n.sh),this.addShapeToModifiers(n),n},ht.prototype.setElementStyles=function(t){var e,s=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||s.push(this.stylesList[e])},ht.prototype.reloadShapes=function(){this._ch=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this._bx,this._co,0,[],!0);var t,e=this._co.length;for(t=0;t<e;t+=1)this._co[t].getValue();this.renderModifiers()},ht.prototype.searchShapes=function(t,e,s,i,a,r,n,h){var o,p,l,f,m,d,c=[].concat(n),u=t.length-1,g=[],y=[];for(o=u;o>=0;o-=1){if(d=this.searchProcessedElement(t[o]),d?e[o]=s[d-1]:t[o]._render=h,"fl"==t[o].ty||"st"==t[o].ty||"gf"==t[o].ty||"gs"==t[o].ty)d?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],r,a),t[o]._render&&i.appendChild(e[o].style.pElem),g.push(e[o].style);else if("gr"==t[o].ty){if(d)for(l=e[o].it.length,p=0;p<l;p+=1)e[o].prevViewData[p]=e[o].it[p];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,a,r+1,c,h),t[o]._render&&i.appendChild(e[o].gr)}else"tr"==t[o].ty?(d||(e[o]=this._cp(t[o],a)),f=e[o].transform,c.push(f)):"sh"==t[o].ty||"rc"==t[o].ty||"el"==t[o].ty||"sr"==t[o].ty?(d||(e[o]=this.createShapeElement(t[o],c,r,a)),this.setElementStyles(e[o])):"tm"==t[o].ty||"rd"==t[o].ty||"ms"==t[o].ty?(d?(m=e[o],m.closed=!1):(m=he.getModifier(t[o].ty),m.init(this,t[o],a),e[o]=m,this.shapeModifiers.push(m)),y.push(m)):"rp"==t[o].ty&&(d?(m=e[o],m.closed=!0):(m=he.getModifier(t[o].ty),e[o]=m,m.init(this,t,o,e,a),this.shapeModifiers.push(m),h=!1),y.push(m));this.addProcessedElement(t[o],o+1)}for(u=g.length,o=0;o<u;o+=1)g[o].closed=!0;for(u=y.length,o=0;o<u;o+=1)y[o].closed=!0},ht.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(this.shapesData,this.itemsData,null),t=0;t<e;t+=1)(this.stylesList[t].mdf||this._ch)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},ht.prototype.renderShape=function(t,e,s){var i,a,r=t.length-1;for(i=0;i<=r;i+=1)a=t[i].ty,"tr"==a?((this._ch||e[i].transform.op.mdf&&s)&&s.setAttribute("opacity",e[i].transform.op.v),(this._ch||e[i].transform.mProps.mdf&&s)&&s.setAttribute("transform",e[i].transform.mProps.v.to2dCSS())):!t[i]._render||"sh"!=a&&"el"!=a&&"rc"!=a&&"sr"!=a?"fl"==a?this.renderFill(t[i],e[i]):"gf"==a?this.renderGradient(t[i],e[i]):"gs"==a?(this.renderGradient(t[i],e[i]),this.renderStroke(t[i],e[i])):"st"==a?this.renderStroke(t[i],e[i]):"gr"==a&&this.renderShape(t[i].it,e[i].it,e[i].gr):this.renderPath(e[i])},ht.prototype.renderPath=function(t){var e,s,i,a,r,n,h,o,p,l,f,m=t.styles.length,d=t.lvl;for(n=0;n<m;n+=1){if(a=t.sh.mdf||this._ch,t.styles[n].lvl<d)for(o=this.mHelper.reset(),l=d-t.styles[n].lvl,f=t.transformers.length-1;l>0;)a=t.transformers[f].mProps.mdf||a,p=t.transformers[f].mProps.v.props,o.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]),l--,f--;else o=this.identityMatrix;if(h=t.sh.paths,s=h._length,a){for(i="",e=0;e<s;e+=1)r=h.shapes[e],r&&r._length&&(i+=this.buildShapeString(r,r._length,r.c,o));t.caches[n]=i}else i=t.caches[n];t.styles[n].d+=i,t.styles[n].mdf=a||t.styles[n].mdf}},ht.prototype.renderFill=function(t,e){var s=e.style;(e.c.mdf||this._ch)&&s.pElem.setAttribute("fill","rgb("+qt(e.c.v[0])+","+qt(e.c.v[1])+","+qt(e.c.v[2])+")"),(e.o.mdf||this._ch)&&s.pElem.setAttribute("fill-opacity",e.o.v)},ht.prototype.renderGradient=function(t,e){var s=e.gf,i=e.g._hasOpacity,a=e.s.v,r=e.e.v;if(e.o.mdf||this._ch){var n="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(n,e.o.v)}if(e.s.mdf||this._ch){var h=1===t.t?"x1":"cx",o="x1"===h?"y1":"cy";s.setAttribute(h,a[0]),s.setAttribute(o,a[1]),i&&!e.g._collapsable&&(e.of.setAttribute(h,a[0]),e.of.setAttribute(o,a[1]))}var p,l,f,m;if(e.g.cmdf||this._ch){p=e.cst;var d=e.g.c;for(f=p.length,l=0;l<f;l+=1)m=p[l],m.setAttribute("offset",d[4*l]+"%"),m.setAttribute("stop-color","rgb("+d[4*l+1]+","+d[4*l+2]+","+d[4*l+3]+")")}if(i&&(e.g.omdf||this._ch)){var c=e.g.o;for(p=e.g._collapsable?e.cst:e.ost,f=p.length,l=0;l<f;l+=1)m=p[l],e.g._collapsable||m.setAttribute("offset",c[2*l]+"%"),m.setAttribute("stop-opacity",c[2*l+1])}if(1===t.t)(e.e.mdf||this._ch)&&(s.setAttribute("x2",r[0]),s.setAttribute("y2",r[1]),i&&!e.g._collapsable&&(e.of.setAttribute("x2",r[0]),e.of.setAttribute("y2",r[1])));else{var u;if((e.s.mdf||e.e.mdf||this._ch)&&(u=Math.sqrt(Math.pow(a[0]-r[0],2)+Math.pow(a[1]-r[1],2)),s.setAttribute("r",u),i&&!e.g._collapsable&&e.of.setAttribute("r",u)),e.e.mdf||e.h.mdf||e.a.mdf||this._ch){u||(u=Math.sqrt(Math.pow(a[0]-r[0],2)+Math.pow(a[1]-r[1],2)));var g=Math.atan2(r[1]-a[1],r[0]-a[0]),y=e.h.v>=1?.99:e.h.v<=-1?-.99:e.h.v,v=u*y,b=Math.cos(g+e.a.v)*v+a[0],k=Math.sin(g+e.a.v)*v+a[1];s.setAttribute("fx",b),s.setAttribute("fy",k),i&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",k))}}},ht.prototype.renderStroke=function(t,e){var s=e.style,i=e.d;i&&(i.mdf||this._ch)&&(s.pElem.setAttribute("stroke-dasharray",i.dashStr),s.pElem.setAttribute("stroke-dashoffset",i.dashoffset[0])),e.c&&(e.c.mdf||this._ch)&&s.pElem.setAttribute("stroke","rgb("+qt(e.c.v[0])+","+qt(e.c.v[1])+","+qt(e.c.v[2])+")"),(e.o.mdf||this._ch)&&s.pElem.setAttribute("stroke-opacity",e.o.v),(e.w.mdf||this._ch)&&(s.pElem.setAttribute("stroke-width",e.w.v),s.msElem&&s.msElem.setAttribute("stroke-width",e.w.v))},ht.prototype.destroy=function(){this.destroy_e(),this.shapeData=null,this.itemsData=null},ot.prototype._ba=function(t){if(t||this._cl.mdf){var e=this._cl._cm[0].p.v,s=this._cl._cm[1].p.v,i=this._cl._cm[2].p.v/100;this.matrixFilter.setAttribute("values",s[0]-e[0]+" 0 0 0 "+e[0]+" "+(s[1]-e[1])+" 0 0 0 "+e[1]+" "+(s[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},pt.prototype._ba=function(t){if(t||this._cl.mdf){var e=this._cl._cm[2].p.v,s=this._cl._cm[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},lt.prototype.initialize=function(){var t,e,s,i,a=this.elem._bx.children||this.elem._bx.childNodes;for(1===this._cl._cm[1].p.v?(i=this.elem.maskManager.masksProperties.length,s=0):(s=this._cl._cm[0].p.v-1,i=s+1),e=y("g"),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1),s;s<i;s+=1)t=y("path"),e.appendChild(t),this.paths.push({p:t,m:s});if(3===this._cl._cm[10].p.v){var r=y("mask"),n="stms_"+p(10);r.setAttribute("id",n),r.setAttribute("mask-type","alpha"),r.appendChild(e),this.elem._x.defs.appendChild(r);var h=y("g");h.setAttribute("mask","url("+Ot+"#"+n+")"),a[0]&&h.appendChild(a[0]),this.elem._bx.appendChild(h),this.masker=r,e.setAttribute("stroke","#fff")}else if(1===this._cl._cm[10].p.v||2===this._cl._cm[10].p.v){if(2===this._cl._cm[10].p.v)for(var a=this.elem._bx.children||this.elem._bx.childNodes;a.length;)this.elem._bx.removeChild(a[0]);this.elem._bx.appendChild(e),this.elem._bx.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},lt.prototype._ba=function(t){this.initialized||this.initialize();var e,s,i,a=this.paths.length;for(e=0;e<a;e+=1)if(s=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this._cl.mdf||s.prop.mdf)&&i.setAttribute("d",s.lastPath),t||this._cl._cm[9].p.mdf||this._cl._cm[4].p.mdf||this._cl._cm[7].p.mdf||this._cl._cm[8].p.mdf||s.prop.mdf){var r;if(0!==this._cl._cm[7].p.v||100!==this._cl._cm[8].p.v){var n=Math.min(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100,h=Math.max(this._cl._cm[7].p.v,this._cl._cm[8].p.v)/100,o=i.getTotalLength();r="0 0 0 "+o*n+" ";var p,l=o*(h-n),f=1+2*this._cl._cm[4].p.v*this._cl._cm[9].p.v/100,m=Math.floor(l/f);for(p=0;p<m;p+=1)r+="1 "+2*this._cl._cm[4].p.v*this._cl._cm[9].p.v/100+" ";r+="0 "+10*o+" 0 0"}else r="1 "+2*this._cl._cm[4].p.v*this._cl._cm[9].p.v/100;i.setAttribute("stroke-dasharray",r)}if((t||this._cl._cm[4].p.mdf)&&this.pathMasker.setAttribute("stroke-width",2*this._cl._cm[4].p.v),(t||this._cl._cm[6].p.mdf)&&this.pathMasker.setAttribute("opacity",this._cl._cm[6].p.v),(1===this._cl._cm[10].p.v||2===this._cl._cm[10].p.v)&&(t||this._cl._cm[3].p.mdf)){var d=this._cl._cm[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+qt(255*d[0])+","+qt(255*d[1])+","+qt(255*d[2])+")")}},ft.prototype._ba=function(t){if(t||this._cl.mdf){var e=this._cl._cm[0].p.v,s=this._cl._cm[1].p.v,i=this._cl._cm[2].p.v,a=i[0]+" "+s[0]+" "+e[0],r=i[1]+" "+s[1]+" "+e[1],n=i[2]+" "+s[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",r),this.feFuncB.setAttribute("tableValues",n)}},mt.prototype.createFeFunc=function(t,e){var s=y(t);return s.setAttribute("type","table"),e.appendChild(s),s},mt.prototype.getTableValue=function(t,e,s,i,a){for(var r,n,h=0,o=256,p=Math.min(t,e),l=Math.max(t,e),f=Array.call(null,{length:o}),m=0,d=a-i,c=e-t;h<=256;)r=h/256,n=r<=p?c<0?a:i:r>=l?c<0?i:a:i+d*Math.pow((r-t)/c,1/s),f[m++]=n,h+=256/(o-1);return f.join(" ")},mt.prototype._ba=function(t){if(t||this._cl.mdf){var e,s=this._cl._cm;this.feFuncRComposed&&(t||s[3].p.mdf||s[4].p.mdf||s[5].p.mdf||s[6].p.mdf||s[7].p.mdf)&&(e=this.getTableValue(s[3].p.v,s[4].p.v,s[5].p.v,s[6].p.v,s[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||s[10].p.mdf||s[11].p.mdf||s[12].p.mdf||s[13].p.mdf||s[14].p.mdf)&&(e=this.getTableValue(s[10].p.v,s[11].p.v,s[12].p.v,s[13].p.v,s[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||s[17].p.mdf||s[18].p.mdf||s[19].p.mdf||s[20].p.mdf||s[21].p.mdf)&&(e=this.getTableValue(s[17].p.v,s[18].p.v,s[19].p.v,s[20].p.v,s[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||s[24].p.mdf||s[25].p.mdf||s[26].p.mdf||s[27].p.mdf||s[28].p.mdf)&&(e=this.getTableValue(s[24].p.v,s[25].p.v,s[26].p.v,s[27].p.v,s[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||s[31].p.mdf||s[32].p.mdf||s[33].p.mdf||s[34].p.mdf||s[35].p.mdf)&&(e=this.getTableValue(s[31].p.v,s[32].p.v,s[33].p.v,s[34].p.v,s[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},dt.prototype._ba=function(t){if(t||this._cl.mdf){if((t||this._cl._cm[4].p.mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this._cl._cm[4].p.v/4),t||this._cl._cm[0].p.mdf){var e=this._cl._cm[0].p.v;this.feFlood.setAttribute("flood-color",Kt(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this._cl._cm[1].p.mdf)&&this.feFlood.setAttribute("flood-opacity",this._cl._cm[1].p.v/255),t||this._cl._cm[2].p.mdf||this._cl._cm[3].p.mdf){var s=this._cl._cm[3].p.v,i=(this._cl._cm[2].p.v-90)*Ut,a=s*Math.cos(i),r=s*Math.sin(i);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",r)}}};var be=[],ke=0;ct.prototype.findSymbol=function(t){for(var e=0,s=be.length;e<s;){if(be[e]===t)return be[e];e+=1}return null},ct.prototype.replaceInParent=function(t,e){var s=t._bx.parentNode;if(s){for(var i=s.children,a=0,r=i.length;a<r&&i[a]!==t._bx;)a+=1;var n;a<=r-2&&(n=i[a+1]);var h=y("use");h.setAttribute("href","#"+e),n?s.insertBefore(h,n):s.appendChild(h)}},ct.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var s="matte_"+p(5)+"_"+ke++,i=y("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),be.push(e);var a=t._x.defs;a.appendChild(i);var r=y("symbol");r.setAttribute("id",s),this.replaceInParent(e,s),r.appendChild(e._bx),a.appendChild(r),useElem=y("use"),useElem.setAttribute("href","#"+s),i.appendChild(useElem),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},ct.prototype.initialize=function(){for(var t=this._cl._cm[0].p.v,e=0,s=this.elem.comp._br.length;e<s;)this.elem.comp._br[e].data.ind===t&&this.setElementAsMask(this.elem,this.elem.comp._br[e]),e+=1;this.initialized=!0},ct.prototype._ba=function(){this.initialized||this.initialize()},ut.prototype._ba=function(t){var e,s=this.filters.length;for(e=0;e<s;e+=1)this.filters[e]._ba(t)};var Ae=function(){function e(t){for(var e=0,s=t.target;e<E;)M[e].animation===s&&(M.splice(e,1),e-=1,E-=1,s.isPaused||a()),e+=1}function s(t,e){if(!t)return null;for(var s=0;s<E;){if(M[s].elem==t&&null!==M[s].elem)return M[s].animation;s+=1}var i=new Pe;return r(i,t),i.setData(t,e),i}function i(){F+=1,A()}function a(){F-=1,0===F&&(w=!0)}function r(t,s){t.addEventListener("destroy",e),t.addEventListener("_active",i),t.addEventListener("_idle",a),M.push({elem:s,animation:t}),E+=1}function n(t){var e=new Pe;return r(e,null),e.setParams(t),e}function h(t,e){var s;for(s=0;s<E;s+=1)M[s].animation.setSpeed(t,e)}function o(t,e){var s;for(s=0;s<E;s+=1)M[s].animation.setDirection(t,e)}function p(t){var e;for(e=0;e<E;e+=1)M[e].animation.play(t)}function l(t,e){_=Date.now();var s;for(s=0;s<E;s+=1)M[s].animation.moveFrame(t,e)}function f(e){var s,i=e-_;for(s=0;s<E;s+=1)M[s].animation.advanceTime(i);_=e,w?C=!0:t.requestAnimationFrame(f)}function m(e){_=e,t.requestAnimationFrame(f)}function d(t){var e;for(e=0;e<E;e+=1)M[e].animation.pause(t)}function c(t,e,s){var i;for(i=0;i<E;i+=1)M[i].animation.goToAndStop(t,e,s)}function u(t){var e;for(e=0;e<E;e+=1)M[e].animation.stop(t)}function g(t){var e;for(e=0;e<E;e+=1)M[e].animation.togglePause(t)}function y(t){var e;for(e=E-1;e>=0;e-=1)M[e].animation.destroy(t)}function b(t,e,i){var a,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=r.length;for(a=0;a<n;a+=1)i&&r[a].setAttribute("data-bm-type",i),s(r[a],t);if(e&&0===n){i||(i="svg");var h=document.getElementsByTagName("body")[0];h.innerHTML="";var o=v("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",i),
-h.appendChild(o),s(o,t)}}function k(){var t;for(t=0;t<E;t+=1)M[t].animation.resize()}function A(){w&&(w=!1,C&&(t.requestAnimationFrame(m),C=!1))}var P={},M=[],_=0,E=0,w=!0,F=0,C=!0;return P.registerAnimation=s,P.loadAnimation=n,P.setSpeed=h,P.setDirection=o,P.play=p,P.moveFrame=l,P.pause=d,P.stop=u,P.togglePause=g,P.searchAnimations=b,P.resize=k,P.goToAndStop=c,P.destroy=y,P}(),Pe=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this._dc=0,this.playCount=0,this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=p(10),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.subframeEnabled=Gt,this.segments=[],this.pendingSegment=!1,this._idle=!0,this.projectInterface=e()};b([u],Pe),Pe.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(s){case"canvas":this.renderer=new _aq(this,t.rendererSettings);break;case"svg":this.renderer=new R(this,t.rendererSettings);break;case"hybrid":case"html":default:this.renderer=new _ap(this,t.rendererSettings)}if(this.renderer.setProjectInterface(this.projectInterface),this.animType=s,""===t.loop||null===t.loop||(t.loop===!1?this.loop=!1:t.loop===!0?this.loop=!0:this.loop=parseInt(t.loop)),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;t.path.lastIndexOf("\\")!=-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.assetsPath=t.assetsPath,this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},Pe.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||("false"===a?s.loop=!1:"true"===a?s.loop=!0:s.loop=parseInt(a));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;s.autoplay="false"!==r,s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var n=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===n&&(s.prerender=!1),this.setParams(s)},Pe.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip),this.animationData.tf=this.totalFrames);var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;s<n;s+=1)for(e=0;e<a;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}if((t.chars||t.fonts)&&(this.renderer._x._cr.addChars(t.chars),this.renderer._x._cr.addFonts(t.fonts,this.renderer._x.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,se.completeData(this.animationData,this.renderer._x._cr),this.renderer.includeLayers(t.layers),Nt&&Nt.initExpressions(this),this.renderer._ba(null),this.loadNextSegment()},Pe.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},Pe.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},Pe.prototype.configAnimation=function(t){var e=this;this.renderer&&this.renderer.destroyed||(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.renderer.searchExtraCompositions(t.assets),this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this._ch=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.imagePreloader=new oe,this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(t.assets,function(t){t||e.trigger("loaded_images")}),this.loadSegments(),this.updaFrameModifier(),this.renderer._x._cr?this.waitForFontsLoaded():(se.completeData(this.animationData,this.renderer._x._cr),this.checkLoaded()))},Pe.prototype.waitForFontsLoaded=function(){function t(){this.renderer._x._cr.loaded?(se.completeData(this.animationData,this.renderer._x._cr),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),Pe.prototype.addPendingElement=function(){this._dc+=1},Pe.prototype.elementLoaded=function(){this._dc--,this.checkLoaded()},Pe.prototype.checkLoaded=function(){0===this._dc&&(Nt&&Nt.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},Pe.prototype.resize=function(){this.renderer.updateContainerSize()},Pe.prototype.setSubframe=function(t){this.subframeEnabled=!!t},Pe.prototype.gotoFrame=function(){this.currentFrame=this.subframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this._ba()},Pe.prototype._ba=function(){this.isLoaded!==!1&&this.renderer._ba(this.currentFrame+this._ch)},Pe.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},Pe.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0,this.pendingSegment||(this._idle=!0,this.trigger("_idle")))},Pe.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?this.play():this.pause())},Pe.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},Pe.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},Pe.prototype.goToAndPlay=function(t,e,s){this.goToAndStop(t,e,s),this.play()},Pe.prototype.advanceTime=function(t){return this.pendingSegment?(this.pendingSegment=!1,this.adjustSegment(this.segments.shift()),void(this.isPaused&&this.play())):void(this.isPaused!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier))},Pe.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},Pe.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},Pe.prototype.adjustSegment=function(t){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this._ch=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this._ch=t[0],this.setCurrentRawFrameValue(.001)),this.trigger("segmentStart")},Pe.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this._ch<t?s=t:this.currentRawFrame+this._ch>e&&(s=e-t)),this._ch=t,this.totalFrames=e-t,s!==-1&&this.goToAndStop(s,!0)},Pe.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&this.adjustSegment(this.segments.shift()),this.isPaused&&this.play()},Pe.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.adjustSegment(this.segments.shift())},Pe.prototype.checkSegments=function(){this.segments.length&&(this.pendingSegment=!0)},Pe.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},Pe.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||(this.renderer.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},Pe.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;this.currentRawFrame>=this.totalFrames?(this.checkSegments(),this.loop===!1?(this.currentRawFrame=this.totalFrames,e=!0):(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop||this.pendingSegment?(this.currentRawFrame=this.totalFrames,e=!0):this.currentRawFrame=this.currentRawFrame%this.totalFrames)):this.currentRawFrame<0&&(this.checkSegments(),this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1||this.pendingSegment?(this.currentRawFrame=0,e=!0):(this.trigger("loopComplete"),this.currentRawFrame=(this.totalFrames+this.currentRawFrame)%this.totalFrames)),this.gotoFrame(),e&&(this.pause(),this.trigger("complete"))},Pe.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},Pe.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},Pe.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},Pe.prototype.getPath=function(){return this.path},Pe.prototype.getAssetsPath=function(t){var e="";if(this.assetsPath){var s=t.p;s.indexOf("images/")!==-1&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},Pe.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t==this.assets[e].id)return this.assets[e];e+=1}},Pe.prototype.hide=function(){this.renderer.hide()},Pe.prototype.show=function(){this.renderer.show()},Pe.prototype.getAssets=function(){return this.assets},Pe.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this._cy(t,new a(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this._cy(t,new n(t,this.loop,this.playCount,this.frameMult));break;case"complete":this._cy(t,new r(t,this.frameMult));break;case"segmentStart":this._cy(t,new h(t,this._ch,this.totalFrames));break;case"destroy":this._cy(t,new o(t,this));break;default:this._cy(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new a(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new n(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new r(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new h(t,this._ch,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new o(t,this))};var Me={};Me.play=yt,Me.pause=vt,Me.setLocationHref=gt,Me.togglePause=bt,Me.setSpeed=kt,Me.setDirection=At,Me.stop=Pt,Me.moveFrame=Mt,Me.searchAnimations=_t,Me.registerAnimation=Et,Me.loadAnimation=xt,Me.setSubframeRendering=Ct,Me.resize=wt,Me.goToAndStop=Ft,Me.destroy=Dt,Me.setQuality=St,Me.inBrowser=Tt,Me.installPlugin=It,Me.__getFactory=Lt,Me.version="5.0.6";var _e="__[STANDALONE]__",Ee="__[ANIMATIONDATA]__",we="";if(_e){var Fe=document.getElementsByTagName("script"),Ce=Fe.length-1,xe=Fe[Ce]||{src:""},De=xe.src.replace(/^[^\?]+\??/,"");we=Vt("renderer")}var Se=setInterval(Rt,100);return Me});
\ No newline at end of file
+!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(t):(t.lottie=e(t),t.bodymovin=t.lottie)}(window||{},function(t){"use strict";function e(){return{}}function s(t){Vt=t?Math.round:function(t){return t}}function a(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}function r(t,e){this.type=t,this.direction=e<0?-1:1}function n(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}function h(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}function o(t,e){this.type=t,this.target=e}function l(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}function p(t,e,s){var i,a,r,n,h,o,l,p;switch(n=Math.floor(6*t),h=6*t-n,o=s*(1-e),l=s*(1-h*e),p=s*(1-(1-h)*e),n%6){case 0:i=s,a=p,r=o;break;case 1:i=l,a=s,r=o;break;case 2:i=o,a=s,r=p;break;case 3:i=o,a=l,r=s;break;case 4:i=p,a=o,r=s;break;case 5:i=s,a=o,r=l}return[i,a,r]}function f(t,e,s){var i,a=Math.max(t,e,s),r=Math.min(t,e,s),n=a-r,h=0===a?0:n/a,o=a/255;switch(a){case r:i=0;break;case t:i=e-s+n*(e<s?6:0),i/=6*n;break;case e:i=s-t+2*n,i/=6*n;break;case s:i=t-e+4*n,i/=6*n}return[i,h,o]}function m(t,e){var s=f(255*t[0],255*t[1],255*t[2]);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),p(s[0],s[1],s[2])}function d(t,e){var s=f(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),p(s[0],s[1],s[2])}function c(t,e){var s=f(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),p(s[0],s[1],s[2])}function u(){}function g(t){return Array.apply(null,{length:t})}function v(t){return document.createElementNS(Bt,t)}function y(t){return document.createElement(t)}function b(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1){i=t[s].prototype;for(var r in i)i.hasOwnProperty(r)&&(e.prototype[r]=i[r])}}function _(t){function e(){}return e.prototype=t,e}function k(){function t(t,e,s,i,a,r){var n=t*i+e*a+s*r-a*i-r*t-s*e;return n>-1e-4&&n<1e-4}function e(e,s,i,a,r,n,h,o,l){if(0===i&&0===n&&0===l)return t(e,s,a,r,h,o);var p,f=Math.sqrt(Math.pow(a-e,2)+Math.pow(r-s,2)+Math.pow(n-i,2)),m=Math.sqrt(Math.pow(h-e,2)+Math.pow(o-s,2)+Math.pow(l-i,2)),d=Math.sqrt(Math.pow(h-a,2)+Math.pow(o-r,2)+Math.pow(l-n,2));return p=f>m?f>d?f-m-d:d-m-f:d>m?d-m-f:m-f-d,p>-1e-4&&p<1e-4}function s(t){var e,s=ve.newElement(),i=t.c,a=t.v,r=t.o,n=t.i,h=t._length,l=s.lengths,p=0;for(e=0;e<h-1;e+=1)l[e]=o(a[e],a[e+1],r[e],n[e+1]),p+=l[e].addedLength;return i&&(l[e]=o(a[e],a[0],r[e],n[0]),p+=l[e].addedLength),s.totalLength=p,s}function i(t){this.segmentLength=0,this.points=new Array(t)}function a(t,e){this.partialLength=t,this.point=e}function r(t,e){var s=e.percents,i=e.lengths,a=s.length,r=Xt((a-1)*t),n=t*e.addedLength,h=0;if(r===a-1||0===r||n===i[r])return s[r];for(var o=i[r]>n?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(h=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=o,r<0||r>=a-1){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*h}function n(t,e,s,i,a,n){var h=r(a,n),o=1-h,l=Math.round(1e3*(o*o*o*t[0]+(h*o*o+o*h*o+o*o*h)*s[0]+(h*h*o+o*h*h+h*o*h)*i[0]+h*h*h*e[0]))/1e3,p=Math.round(1e3*(o*o*o*t[1]+(h*o*o+o*h*o+o*o*h)*s[1]+(h*h*o+o*h*h+h*o*h)*i[1]+h*h*h*e[1]))/1e3;return[l,p]}function h(t,e,s,i,a,n,h){a=a<0?0:a>1?1:a;var o=r(a,h);n=n>1?1:n;var l,f=r(n,h),m=t.length,d=1-o,c=1-f,u=d*d*d,g=o*d*d*3,v=o*o*d*3,y=o*o*o,b=d*d*c,_=o*d*c+d*o*c+d*d*f,k=o*o*c+d*o*f+o*d*f,A=o*o*f,P=d*c*c,M=o*c*c+d*f*c+d*c*f,F=o*f*c+d*f*f+o*c*f,E=o*f*f,x=c*c*c,w=f*c*c+c*f*c+c*c*f,C=f*f*c+c*f*f+f*c*f,S=f*f*f;for(l=0;l<m;l+=1)p[4*l]=Math.round(1e3*(u*t[l]+g*s[l]+v*i[l]+y*e[l]))/1e3,p[4*l+1]=Math.round(1e3*(b*t[l]+_*s[l]+k*i[l]+A*e[l]))/1e3,p[4*l+2]=Math.round(1e3*(P*t[l]+M*s[l]+F*i[l]+E*e[l]))/1e3,p[4*l+3]=Math.round(1e3*(x*t[l]+w*s[l]+C*i[l]+S*e[l]))/1e3;return p}var o=(Math,function(){return function(t,e,s,i){var a,r,n,h,o,l,p=Jt,f=0,m=[],d=[],c=ye.newElement();for(n=s.length,a=0;a<p;a+=1){for(o=a/(p-1),l=0,r=0;r<n;r+=1)h=Wt(1-o,3)*t[r]+3*Wt(1-o,2)*o*s[r]+3*(1-o)*Wt(o,2)*i[r]+Wt(o,3)*e[r],m[r]=h,null!==d[r]&&(l+=Wt(m[r]-d[r],2)),d[r]=m[r];l&&(l=Ht(l),f+=l),c.percents[a]=o,c.lengths[a]=f}return c.addedLength=f,c}}()),l=function(){var e={};return function(s){var r=s.s,n=s.e,h=s.to,o=s.ti,l=(r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+h[0]+"_"+h[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(e[l])return void(s.bezierData=e[l]);var p,f,m,d,c,u,v,y=Jt,b=0,_=null;2===r.length&&(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+h[0],r[1]+h[1])&&t(r[0],r[1],n[0],n[1],n[0]+o[0],n[1]+o[1])&&(y=2);var k=new i(y);for(m=h.length,p=0;p<y;p+=1){for(v=g(m),c=p/(y-1),u=0,f=0;f<m;f+=1)d=Wt(1-c,3)*r[f]+3*Wt(1-c,2)*c*(r[f]+h[f])+3*(1-c)*Wt(c,2)*(n[f]+o[f])+Wt(c,3)*n[f],v[f]=d,null!==_&&(u+=Wt(v[f]-_[f],2));u=Ht(u),b+=u,k.points[p]=new a(u,v),_=v}k.segmentLength=b,s.bezierData=k,e[l]=k}}(),p=Qt("float32",8);return{getSegmentsLength:s,getNewSegment:h,getPointInSegment:n,buildBezierData:l,pointOnLine2D:t,pointOnLine3D:e}}function A(){function t(a,r,h){var o,l,p,f,m,d,c,u,g=a.length;for(f=0;f<g;f+=1)if(o=a[f],"ks"in o&&!o.completed){if(o.completed=!0,o.tt&&(a[f-1].td=o.tt),l=[],p=-1,o.hasMask){var v=o.masksProperties;for(d=v.length,m=0;m<d;m+=1)if(v[m].pt.k.i)i(v[m].pt.k);else for(u=v[m].pt.k.length,c=0;c<u;c+=1)v[m].pt.k[c].s&&i(v[m].pt.k[c].s[0]),v[m].pt.k[c].e&&i(v[m].pt.k[c].e[0])}0===o.ty?(o.layers=e(o.refId,r),t(o.layers,r,h)):4===o.ty?s(o.shapes):5==o.ty&&n(o,h)}}function e(t,e){for(var s=0,i=e.length;s<i;){if(e[s].id===t)return e[s].layers.__used?JSON.parse(JSON.stringify(e[s].layers)):(e[s].layers.__used=!0,e[s].layers);s+=1}}function s(t){var e,a,r,n=t.length,h=!1;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)i(t[e].ks.k);else for(r=t[e].ks.k.length,a=0;a<r;a+=1)t[e].ks.k[a].s&&i(t[e].ks.k[a].s[0]),t[e].ks.k[a].e&&i(t[e].ks.k[a].e[0]);h=!0}else"gr"==t[e].ty&&s(t[e].it)}function i(t){var e,s=t.i.length;for(e=0;e<s;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function a(t,e){var s=e?e.split("."):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&void 0))}function r(e,s){e.__complete||(l(e),h(e),o(e),p(e),t(e.layers,e.assets,s),e.__complete=!0)}function n(t,e){0!==t.t.a.length||"m"in t.t.p||(t.singleShape=!0)}var h=function(){function t(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function e(e){var s,i=e.length;for(s=0;s<i;s+=1)5===e[s].ty&&t(e[s])}var s=[4,4,14];return function(t){if(a(s,t.v)&&(e(t.layers),t.assets)){var i,r=t.assets.length;for(i=0;i<r;i+=1)t.assets[i].layers&&e(t.assets[i].layers)}}}(),o=function(){var t=[4,7,99];return function(e){if(e.chars&&!a(t,e.v)){var s,r,n,h,o,l=e.chars.length;for(s=0;s<l;s+=1)if(e.chars[s].data&&e.chars[s].data.shapes)for(o=e.chars[s].data.shapes[0].it,n=o.length,r=0;r<n;r+=1)h=o[r].ks.k,h.__converted||(i(o[r].ks.k),h.__converted=!0)}}}(),l=function(){function t(e){var s,i,a,r=e.length;for(s=0;s<r;s+=1)if("gr"===e[s].ty)t(e[s].it);else if("fl"===e[s].ty||"st"===e[s].ty)if(e[s].c.k&&e[s].c.k[0].i)for(a=e[s].c.k.length,i=0;i<a;i+=1)e[s].c.k[i].s&&(e[s].c.k[i].s[0]/=255,e[s].c.k[i].s[1]/=255,e[s].c.k[i].s[2]/=255,e[s].c.k[i].s[3]/=255),e[s].c.k[i].e&&(e[s].c.k[i].e[0]/=255,e[s].c.k[i].e[1]/=255,e[s].c.k[i].e[2]/=255,e[s].c.k[i].e[3]/=255);else e[s].c.k[0]/=255,e[s].c.k[1]/=255,e[s].c.k[2]/=255,e[s].c.k[3]/=255}function e(e){var s,i=e.length;for(s=0;s<i;s+=1)4===e[s].ty&&t(e[s].shapes)}var s=[4,1,9];return function(t){if(a(s,t.v)&&(e(t.layers),t.assets)){var i,r=t.assets.length;for(i=0;i<r;i+=1)t.assets[i].layers&&e(t.assets[i].layers)}}}(),p=function(){function t(e){var s,i,a,r=e.length,n=!1;for(s=r-1;s>=0;s-=1)if("sh"==e[s].ty){if(e[s].ks.k.i)e[s].ks.k.c=e[s].closed;else for(a=e[s].ks.k.length,i=0;i<a;i+=1)e[s].ks.k[i].s&&(e[s].ks.k[i].s[0].c=e[s].closed),e[s].ks.k[i].e&&(e[s].ks.k[i].e[0].c=e[s].closed);n=!0}else"gr"==e[s].ty&&t(e[s].it)}function e(e){var s,i,a,r,n,h,o=e.length;for(i=0;i<o;i+=1){if(s=e[i],s.hasMask){var l=s.masksProperties;for(r=l.length,a=0;a<r;a+=1)if(l[a].pt.k.i)l[a].pt.k.c=l[a].cl;else for(h=l[a].pt.k.length,n=0;n<h;n+=1)l[a].pt.k[n].s&&(l[a].pt.k[n].s[0].c=l[a].cl),l[a].pt.k[n].e&&(l[a].pt.k[n].e[0].c=l[a].cl)}4===s.ty&&t(s.shapes)}}var s=[4,4,18];return function(t){if(a(s,t.v)&&(e(t.layers),t.assets)){var i,r=t.assets.length;for(i=0;i<r;i+=1)t.assets[i].layers&&e(t.assets[i].layers)}}}(),f={};return f.completeData=r,f}function P(){this.c=!1,this._length=0,this._maxLength=8,this.v=g(this._maxLength),this.o=g(this._maxLength),this.i=g(this._maxLength)}function M(){}function F(){}function E(){}function x(){}function w(){this._length=0,this._maxLength=4,this.shapes=g(this._maxLength)}function C(t,e,s,i){this.elem=t,this.frameId=-1,this.dataProps=g(e.length),this.renderer=s,this._mdf=!1,this.k=!1,this.dashStr="",this.dashArray=Qt("float32",e.length-1),this.dashoffset=Qt("float32",1);var a,r,n=e.length;for(a=0;a<n;a+=1)r=ae.getProp(t,e[a].v,0,0,i),this.k=!!r.k||this.k,this.dataProps[a]={n:e[a].n,p:r};this.k?i.push(this):this.getValue(!0)}function S(t,e,s){this.prop=ae.getProp(t,e.k,1,null,[]),this.data=e,this.k=this.prop.k,this.c=Qt("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=Qt("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.prop.k&&s.push(this),this.getValue(!0)}function D(t,e,s){this._mdf=!1,this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._dynamicProperties=[],this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=g(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1}function T(t,e,s){var i={propType:!1},a=ae.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,Ut,s):i,rx:r.rx?a(t,r.rx,0,Ut,s):i,ry:r.ry?a(t,r.ry,0,Ut,s):i,sk:r.sk?a(t,r.sk,0,Ut,s):i,sa:r.sa?a(t,r.sa,0,Ut,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=fe.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function I(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function L(t,e,s){this._frameId=Gt,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!0,this.data=e,this.elem=t,this.keysIndex=-1,this.canResize=!1,this.minimumFontSize=1,this.currentData={ascent:0,boxWidth:[0,0],f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:[0,0],fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,__complete:!1,finalSize:0,finalText:"",finalLineHeight:0},this.searchProperty()?s.push(this):this.getValue(!0)}function z(){}function N(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=v("svg");var s=v("g");this.svgElement.appendChild(s),this.layerElement=s;var i=v("defs");this.svgElement.appendChild(i),this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!e||e.hideOnTransparent!==!1,viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||""},this.globalData={_mdf:!1,frameNum:-1,defs:i,frameId:0,compSize:{w:0,h:0},renderConfig:this.renderConfig,fontManager:new ie},this.elements=[],this.pendingElements=[],this.destroyed=!1}function R(t,e,s,i){this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null,this._isFirstFrame=!0;var a,r=this.globalData.defs,n=this.masksProperties?this.masksProperties.length:0;this.viewData=g(n),this.solidPath="";var h,o,p,f,m,d,c,u=this.masksProperties,y=0,b=[],_=l(10),k="clipPath",A="clip-path";for(a=0;a<n;a++)if(("a"!==u[a].mode&&"n"!==u[a].mode||u[a].inv||100!==u[a].o.k)&&(k="mask",A="mask"),"s"!=u[a].mode&&"i"!=u[a].mode||0!==y?f=null:(f=v("rect"),f.setAttribute("fill","#ffffff"),f.setAttribute("width",this.element.comp.data.w),f.setAttribute("height",this.element.comp.data.h),b.push(f)),h=v("path"),"n"!=u[a].mode){y+=1,h.setAttribute("fill","s"===u[a].mode?"#000000":"#ffffff"),h.setAttribute("clip-rule","nonzero");var P;if(0!==u[a].x.k?(k="mask",A="mask",c=ae.getProp(this.element,u[a].x,0,null,i),P="fi_"+l(10),m=v("filter"),m.setAttribute("id",P),d=v("feMorphology"),d.setAttribute("operator","dilate"),d.setAttribute("in","SourceGraphic"),d.setAttribute("radius","0"),m.appendChild(d),r.appendChild(m),h.setAttribute("stroke","s"===u[a].mode?"#000000":"#ffffff")):(d=null,c=null),this.storedData[a]={elem:h,x:c,expan:d,lastPath:"",lastOperator:"",filterId:P,lastRadius:0},"i"==u[a].mode){p=b.length;var M=v("g");for(o=0;o<p;o+=1)M.appendChild(b[o]);var F=v("mask");F.setAttribute("mask-type","alpha"),F.setAttribute("id",_+"_"+y),F.appendChild(h),r.appendChild(F),M.setAttribute("mask","url("+Ot+"#"+_+"_"+y+")"),b.length=0,b.push(M)}else b.push(h);u[a].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[a]={elem:h,lastPath:"",op:ae.getProp(this.element,u[a].o,0,.01,i),prop:ne.getShapeProp(this.element,u[a],3,i,null),invRect:f},this.viewData[a].prop.k||this.drawPath(u[a],this.viewData[a].prop.v,this.viewData[a])}else this.viewData[a]={op:ae.getProp(this.element,u[a].o,0,.01,i),prop:ne.getShapeProp(this.element,u[a],3,i,null),elem:h},r.appendChild(h);for(this.maskElement=v(k),n=b.length,a=0;a<n;a+=1)this.maskElement.appendChild(b[a]);y>0&&(this.maskElement.setAttribute("id",_),this.element.maskedElement.setAttribute(A,"url("+Ot+"#"+_+")"),r.appendChild(this.maskElement))}function V(){}function B(){}function O(){}function G(){}function j(){}function W(t,e){this.elem=t,this.pos=e}function H(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!1,this.pElem=v("path"),this.msElem=null}function X(t,e,s){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e}function q(t,e){this.transform={mProps:t,op:e},this.elements=[]}function Y(t,e,s,i){this.o=ae.getProp(t,e.o,0,.01,s),this.w=ae.getProp(t,e.w,0,null,s),this.d=new C(t,e.d||{},"svg",s),this.c=ae.getProp(t,e.c,1,255,s),this.style=i}function J(t,e,s,i){this.o=ae.getProp(t,e.o,0,.01,s),this.c=ae.getProp(t,e.c,1,255,s),this.style=i}function U(t,e,s,i){this.initGradientData(t,e,s,i)}function Z(t,e,s,i){this.w=ae.getProp(t,e.w,0,null,s),this.d=new C(t,e.d||{},"svg",s),this.initGradientData(t,e,s,i)}function K(){this.it=[],this.prevViewData=[],this.gr=v("g")}function Q(){}function $(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function tt(){}function et(){}function st(){}function it(){}function at(t,e,s){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s)}function rt(t,e,s){this.initElement(t,e,s)}function nt(t,e,s){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?g(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?ae.getProp(this,t.tm,0,e.frameRate,this.dynamicProperties):{_placeholder:!0}}function ht(t,e,s){this.textSpans=[],this.renderType="svg",this.initElement(t,e,s)}function ot(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.initElement(t,e,s),this.prevViewData=[]}function lt(t,e){this.filterManager=e;var s=v("feColorMatrix");if(s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.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"),s.setAttribute("result","f1"),t.appendChild(s),s=v("feColorMatrix"),s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result","f2"),t.appendChild(s),this.matrixFilter=s,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var i=v("feMerge");t.appendChild(i);var a;a=v("feMergeNode"),a.setAttribute("in","SourceGraphic"),i.appendChild(a),a=v("feMergeNode"),a.setAttribute("in","f2"),i.appendChild(a)}}function pt(t,e){this.filterManager=e;var s=v("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(s),this.matrixFilter=s}function ft(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function mt(t,e){this.filterManager=e;var s=v("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.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"),s.setAttribute("result","f1"),t.appendChild(s);var i=v("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.matrixFilter=i;var a=v("feFuncR");a.setAttribute("type","table"),i.appendChild(a),this.feFuncR=a;var r=v("feFuncG");r.setAttribute("type","table"),i.appendChild(r),this.feFuncG=r;var n=v("feFuncB");n.setAttribute("type","table"),i.appendChild(n),this.feFuncB=n}function dt(t,e){this.filterManager=e;var s=this.filterManager.effectElements,i=v("feComponentTransfer");(s[10].p.k||0!==s[10].p.v||s[11].p.k||1!==s[11].p.v||s[12].p.k||1!==s[12].p.v||s[13].p.k||0!==s[13].p.v||s[14].p.k||1!==s[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(s[17].p.k||0!==s[17].p.v||s[18].p.k||1!==s[18].p.v||s[19].p.k||1!==s[19].p.v||s[20].p.k||0!==s[20].p.v||s[21].p.k||1!==s[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(s[24].p.k||0!==s[24].p.v||s[25].p.k||1!==s[25].p.v||s[26].p.k||1!==s[26].p.v||s[27].p.k||0!==s[27].p.v||s[28].p.k||1!==s[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(s[31].p.k||0!==s[31].p.v||s[32].p.k||1!==s[32].p.v||s[33].p.k||1!==s[33].p.v||s[34].p.k||0!==s[34].p.v||s[35].p.k||1!==s[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=v("feComponentTransfer")),(s[3].p.k||0!==s[3].p.v||s[4].p.k||1!==s[4].p.v||s[5].p.k||1!==s[5].p.v||s[6].p.k||0!==s[6].p.v||s[7].p.k||1!==s[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function ct(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","400%"),t.setAttribute("height","400%"),this.filterManager=e;var s=v("feGaussianBlur");s.setAttribute("in","SourceAlpha"),s.setAttribute("result","drop_shadow_1"),s.setAttribute("stdDeviation","0"),this.feGaussianBlur=s,t.appendChild(s);var i=v("feOffset");i.setAttribute("dx","25"),i.setAttribute("dy","0"),i.setAttribute("in","drop_shadow_1"),i.setAttribute("result","drop_shadow_2"),this.feOffset=i,t.appendChild(i);var a=v("feFlood");a.setAttribute("flood-color","#00ff00"),a.setAttribute("flood-opacity","1"),a.setAttribute("result","drop_shadow_3"),this.feFlood=a,t.appendChild(a);var r=v("feComposite");r.setAttribute("in","drop_shadow_3"),r.setAttribute("in2","drop_shadow_2"),r.setAttribute("operator","in"),r.setAttribute("result","drop_shadow_4"),t.appendChild(r);var n=v("feMerge");t.appendChild(n);var h;h=v("feMergeNode"),n.appendChild(h),h=v("feMergeNode"),h.setAttribute("in","SourceGraphic"),this.feMergeNode=h,this.feMerge=n,this.originalNodeAdded=!1,n.appendChild(h)}function ut(t,e,s){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=s,s.matteElement=v("g"),s.matteElement.appendChild(s.layerElement),s.matteElement.appendChild(s.transformedElement),s.baseElement=s.matteElement}function gt(t){var e,s=t.data.ef?t.data.ef.length:0,i=l(10),a=pe.createFilter(i),r=0;this.filters=[];var n;for(e=0;e<s;e+=1)n=null,20===t.data.ef[e].ty?(r+=1,n=new lt(a,t.effectsManager.effectElements[e])):21===t.data.ef[e].ty?(r+=1,n=new pt(a,t.effectsManager.effectElements[e])):22===t.data.ef[e].ty?n=new ft(t,t.effectsManager.effectElements[e]):23===t.data.ef[e].ty?(r+=1,n=new mt(a,t.effectsManager.effectElements[e])):24===t.data.ef[e].ty?(r+=1,n=new dt(a,t.effectsManager.effectElements[e])):25===t.data.ef[e].ty?(r+=1,n=new ct(a,t.effectsManager.effectElements[e])):28===t.data.ef[e].ty&&(n=new ut(a,t.effectsManager.effectElements[e],t)),n&&this.filters.push(n);r&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+Ot+"#"+i+")"))}function vt(t){Ot=t}function yt(t){ke.play(t)}function bt(t){ke.pause(t)}function _t(t){ke.togglePause(t)}function kt(t,e){ke.setSpeed(t,e)}function At(t,e){ke.setDirection(t,e)}function Pt(t){ke.stop(t)}function Mt(){Me===!0?ke.searchAnimations(Fe,Me,Ee):ke.searchAnimations()}function Ft(t){return ke.registerAnimation(t)}function Et(){ke.resize()}function xt(t,e,s){ke.goToAndStop(t,e,s)}function wt(t){jt=t}function Ct(t){return Me===!0&&(t.animationData=JSON.parse(Fe)),ke.loadAnimation(t)}function St(t){return ke.destroy(t)}function Dt(t){if("string"==typeof t)switch(t){case"high":Jt=200;break;case"medium":Jt=50;break;case"low":Jt=10}else!isNaN(t)&&t>1&&(Jt=t);s(!(Jt>=50))}function Tt(){return"undefined"!=typeof navigator}function It(t,e){"expressions"===t&&(Rt=e)}function Lt(t){switch(t){case"propertyFactory":return ae;case"shapePropertyFactory":return ne;case"matrix":return $t}}function zt(){"complete"===document.readyState&&(clearInterval(De),Mt())}function Nt(t){for(var e=Se.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var Rt,Vt,Bt="http://www.w3.org/2000/svg",Ot="",Gt=-999999,jt=!0,Wt=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Math.round,Math.pow),Ht=Math.sqrt,Xt=(Math.abs,Math.floor),qt=(Math.max,Math.min),Yt={};!function(){var t,e=Object.getOwnPropertyNames(Math),s=e.length;for(t=0;t<s;t+=1)Yt[e[t]]=Math[e[t]]}(),Yt.random=Math.random,Yt.abs=function(t){var e=typeof t;if("object"===e&&t.length){var s,i=g(t.length),a=t.length;for(s=0;s<a;s+=1)i[s]=Math.abs(t[s]);return i}return Math.abs(t)};var Jt=150,Ut=Math.PI/180,Zt=.5519;s(!1);var Kt=function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1==e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+s[t]+s[e]+s[i]}}();u.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t].length,i=0;i<s;i++)this._cbs[t][i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var Qt=function(){function t(t,e){var s,i=0,a=[];switch(t){case"int16":case"uint8c":s=1;break;default:s=1.1}for(i=0;i<e;i+=1)a.push(s);return a}function e(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):void 0}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?e:t}(),$t=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=x(t),s=w(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function s(t){if(0===t)return this;var e=x(t),s=w(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}function i(t){if(0===t)return this;var e=x(t),s=w(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}function a(t){if(0===t)return this;var e=x(t),s=w(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}function r(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(C(t),C(e))}function h(t,e){var s=x(e),i=w(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,C(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}function o(t,e,s){return s=isNaN(s)?1:s,1==t&&1==e&&1==s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}function l(t,e,s,i,a,r,n,h,o,l,p,f,m,d,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this.props[6]=n,this.props[7]=h,this.props[8]=o,this.props[9]=l,this.props[10]=p,this.props[11]=f,this.props[12]=m,this.props[13]=d,this.props[14]=c,this.props[15]=u,this}function p(t,e,s){return s=s||0,0!==t||0!==e||0!==s?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,s,1):this}function f(t,e,s,i,a,r,n,h,o,l,p,f,m,d,c,u){var g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===a&&1===r&&0===n&&0===h&&0===o&&0===l&&1===p&&0===f)return g[12]=g[12]*t+g[15]*m,g[13]=g[13]*r+g[15]*d,g[14]=g[14]*p+g[15]*c,g[15]=g[15]*u,this._identityCalculated=!1,this;var v=g[0],y=g[1],b=g[2],_=g[3],k=g[4],A=g[5],P=g[6],M=g[7],F=g[8],E=g[9],x=g[10],w=g[11],C=g[12],S=g[13],D=g[14],T=g[15];return g[0]=v*t+y*a+b*o+_*m,g[1]=v*e+y*r+b*l+_*d,g[2]=v*s+y*n+b*p+_*c,g[3]=v*i+y*h+b*f+_*u,g[4]=k*t+A*a+P*o+M*m,g[5]=k*e+A*r+P*l+M*d,g[6]=k*s+A*n+P*p+M*c,g[7]=k*i+A*h+P*f+M*u,g[8]=F*t+E*a+x*o+w*m,g[9]=F*e+E*r+x*l+w*d,g[10]=F*s+E*n+x*p+w*c,g[11]=F*i+E*h+x*f+w*u,g[12]=C*t+S*a+D*o+T*m,g[13]=C*e+S*r+D*l+T*d,g[14]=C*s+S*n+D*p+T*c,g[15]=C*i+S*h+D*f+T*u,this._identityCalculated=!1,this}function m(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function d(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function c(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e]}function u(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function g(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}function v(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function y(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}function b(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}function _(t){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],s=this.props[5]/e,i=-this.props[1]/e,a=-this.props[4]/e,r=this.props[0]/e,n=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,h=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e;return[t[0]*s+t[1]*a+n,t[0]*i+t[1]*r+h,0]}function k(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=_(t[e]);return i}function A(t,e,s){var i=Qt("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=s[0],i[5]=s[1];else{var a=this.props[0],r=this.props[1],n=this.props[4],h=this.props[5],o=this.props[12],l=this.props[13];i[0]=t[0]*a+t[1]*n+o,i[1]=t[0]*r+t[1]*h+l,i[2]=e[0]*a+e[1]*n+o,i[3]=e[0]*r+e[1]*h+l,i[4]=s[0]*a+s[1]*n+o,i[5]=s[0]*r+s[1]*h+l}return i}function P(t,e,s){var i;return i=this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}function M(t,e){return this.isIdentity()?t+","+e:t*this.props[0]+e*this.props[4]+this.props[12]+","+(t*this.props[1]+e*this.props[5]+this.props[13])}function F(){for(var t=0,e=this.props,s="matrix3d(",i=1e4;t<16;)s+=S(e[t]*i)/i,s+=15===t?")":",",t+=1;return s}function E(){var t=1e4,e=this.props;return"matrix("+S(e[0]*t)/t+","+S(e[1]*t)/t+","+S(e[4]*t)/t+","+S(e[5]*t)/t+","+S(e[12]*t)/t+","+S(e[13]*t)/t+")"}var x=Math.cos,w=Math.sin,C=Math.tan,S=Math.round;return function(){this.reset=t,this.rotate=e,this.rotateX=s,this.rotateY=i,this.rotateZ=a,this.skew=n,this.skewFromAxis=h,this.shear=r,this.scale=o,this.setTransform=l,this.translate=p,this.transform=f,this.applyToPoint=g,this.applyToX=v,this.applyToY=y,this.applyToZ=b,this.applyToPointArray=P,this.applyToTriplePoints=A,this.applyToPointStringified=M,this.toCSS=F,this.to2dCSS=E,this.clone=c,this.cloneFromProps=u,this.equals=d,this.inversePoints=k,this.inversePoint=_,this._t=this.transform,this.isIdentity=m,this._identity=!0,this._identityCalculated=!1,this.props=Qt("float32",16),this.reset()}}();!function(t,e){function s(s,l,p){var d=[];l=l===!0?{entropy:!0}:l||{};var y=n(r(l.entropy?[s,o(t)]:null===s?h():s,3),d),b=new i(d),_=function(){for(var t=b.g(m),e=u,s=0;t<g;)t=(t+s)*f,e*=f,s=b.g(1);for(;t>=v;)t/=2,e/=2,s>>>=1;return(t+s)/e};return _.int32=function(){return 0|b.g(4)},_.quick=function(){return b.g(4)/4294967296},_["double"]=_,n(o(b.S),t),(l.pass||p||function(t,s,i,r){return r&&(r.S&&a(r,b),t.state=function(){return a(b,{})}),i?(e[c]=t,s):t})(_,y,"global"in l?l.global:this==e,l.state)}function i(t){var e,s=t.length,i=this,a=0,r=i.i=i.j=0,n=i.S=[];for(s||(t=[s++]);a<f;)n[a]=a++;for(a=0;a<f;a++)n[a]=n[r=y&r+t[a%s]+(e=n[a])],n[r]=e;i.g=function(t){for(var e,s=0,a=i.i,r=i.j,n=i.S;t--;)e=n[a=y&a+1],s=s*f+n[y&(n[a]=n[r=y&r+e])+(n[r]=e)];return i.i=a,i.j=r,s}(f)}function a(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function r(t,e){var s,i=[],a=typeof t;if(e&&"object"==a)for(s in t)try{i.push(r(t[s],e-1))}catch(n){}return i.length?i:"string"==a?t:t+"\0"}function n(t,e){for(var s,i=t+"",a=0;a<i.length;)e[y&a]=y&(s^=19*e[y&a])+i.charCodeAt(a++);return o(e)}function h(){try{if(l)return o(l.randomBytes(f));var e=new Uint8Array(f);return(p.crypto||p.msCrypto).getRandomValues(e),o(e)}catch(s){var i=p.navigator,a=i&&i.plugins;return[+new Date,p,a,p.screen,o(t)]}}function o(t){return String.fromCharCode.apply(0,t)}var l,p=this,f=256,m=6,d=52,c="random",u=e.pow(f,m),g=e.pow(2,d),v=2*g,y=f-1;e["seed"+c]=s,n(e.random(),t)}([],Yt);var te=function(){function t(t,e,s,i,a){var r=a||("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p");if(p[r])return p[r];var n=new o([t,e,s,i]);return p[r]=n,n}function e(t,e){return 1-3*e+3*t}function s(t,e){return 3*e-6*t}function i(t){return 3*t}function a(t,a,r){return((e(a,r)*t+s(a,r))*t+i(a))*t}function r(t,a,r){return 3*e(a,r)*t*t+2*s(a,r)*t+i(a)}function n(t,e,s,i,r){var n,h,o=0;do h=e+(s-e)/2,n=a(h,i,r)-t,n>0?s=h:e=h;while(Math.abs(n)>d&&++o<c);return h}function h(t,e,s,i){for(var n=0;n<f;++n){var h=r(e,s,i);if(0===h)return e;var o=a(e,s,i)-t;e-=o/h}return e}function o(t){this._p=t,this._mSampleValues=v?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var l={};l.getBezierEasing=t;var p={},f=4,m=.001,d=1e-7,c=10,u=11,g=1/(u-1),v="function"==typeof Float32Array;return o.prototype={get:function(t){var e=this._p[0],s=this._p[1],i=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===s&&i===r?t:0===t?0:1===t?1:a(this._getTForX(t),s,r)},_precompute:function(){var t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&s===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;s<u;++s)this._mSampleValues[s]=a(s*g,t,e)},_getTForX:function(t){for(var e=this._p[0],s=this._p[2],i=this._mSampleValues,a=0,o=1,l=u-1;o!==l&&i[o]<=t;++o)a+=g;--o;var p=(t-i[o])/(i[o+1]-i[o]),f=a+p*g,d=r(f,e,s);return d>=m?h(t,f,e,s):0===d?f:n(t,a,a+g,e,s)}},l}();!function(){for(var e=0,s=["ms","moz","webkit","o"],i=0;i<s.length&&!t.requestAnimationFrame;++i)t.requestAnimationFrame=t[s[i]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[s[i]+"CancelAnimationFrame"]||t[s[i]+"CancelRequestAnimationFrame"];
+t.requestAnimationFrame||(t.requestAnimationFrame=function(t,s){var i=(new Date).getTime(),a=Math.max(0,16-(i-e)),r=setTimeout(function(){t(i+a)},a);return e=i+a,r}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}();var ee=k(),se=A(),ie=function(){function e(t,e){var s=y("span");s.style.fontFamily=e;var i=y("span");i.innerHTML="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function s(){var e,i,a,r=this.fonts.length,n=r;for(e=0;e<r;e+=1)if(this.fonts[e].loaded)n-=1;else if("t"===this.fonts[e].fOrigin||2===this.fonts[e].origin){if(t.Typekit&&t.Typekit.load&&0===this.typekitLoaded){this.typekitLoaded=1;try{t.Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(h){}}2===this.typekitLoaded&&(this.fonts[e].loaded=!0)}else"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(i=this.fonts[e].monoCase.node,a=this.fonts[e].monoCase.w,i.offsetWidth!==a?(n-=1,this.fonts[e].loaded=!0):(i=this.fonts[e].sansCase.node,a=this.fonts[e].sansCase.w,i.offsetWidth!==a&&(n-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==n&&Date.now()-this.initTime<l?setTimeout(s.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function i(t,e){var s=v("text");s.style.fontSize="100px",s.style.fontFamily=e.fFamily,s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.className=e.fClass):s.style.fontFamily=e.fFamily,t.appendChild(s);var i=y("canvas").getContext("2d");return i.font="100px "+e.fFamily,i}function a(t,a){if(!t)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=t.list);var r,n=t.list,h=n.length;for(r=0;r<h;r+=1){if(n[r].loaded=!1,n[r].monoCase=e(n[r].fFamily,"monospace"),n[r].sansCase=e(n[r].fFamily,"sans-serif"),n[r].fPath){if("p"===n[r].fOrigin||3===n[r].origin){var o=y("style");o.type="text/css",o.innerHTML="@font-face {font-family: "+n[r].fFamily+"; font-style: normal; src: url('"+n[r].fPath+"');}",a.appendChild(o)}else if("g"===n[r].fOrigin||1===n[r].origin){var l=y("link");l.type="text/css",l.rel="stylesheet",l.href=n[r].fPath,a.appendChild(l)}else if("t"===n[r].fOrigin||2===n[r].origin){var p=y("script");p.setAttribute("src",n[r].fPath),a.appendChild(p)}}else n[r].loaded=!0;n[r].helper=i(a,n[r]),this.fonts.push(n[r])}s.bind(this)()}function r(t){if(t){this.chars||(this.chars=[]);var e,s,i,a=t.length,r=this.chars.length;for(e=0;e<a;e+=1){for(s=0,i=!1;s<r;)this.chars[s].style===t[e].style&&this.chars[s].fFamily===t[e].fFamily&&this.chars[s].ch===t[e].ch&&(i=!0),s+=1;i||(this.chars.push(t[e]),r+=1)}}}function n(t,e,s){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}return console&&console.warn&&console.warn("Missing character from exported characters list: ",t,e,s),p}function h(t,e,s){var i=this.getFontByName(e),a=i.helper;return a.measureText(t).width*s/100}function o(t){for(var e=0,s=this.fonts.length;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var l=5e3,p={w:0,size:0,shapes:[]},f=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return f.prototype.addChars=r,f.prototype.addFonts=a,f.prototype.getCharData=n,f.prototype.getFontByName=o,f.prototype.measureText=h,f}(),ae=function(){function t(t,e,s){var i,a=this.offsetTime;"multidimensional"===this.propType&&(i=Qt("float32",e.length));for(var r,n,h=s.lastIndex,o=h,l=this.keyframes.length-1,p=!0;p;){if(r=this.keyframes[o],n=this.keyframes[o+1],o==l-1&&t>=n.t-a){r.h&&(r=n),h=0;break}if(n.t-a>t){h=o;break}o<l-1?o+=1:(h=0,p=!1)}var f,m,d,c,u,g;if(r.to){r.bezierData||ee.buildBezierData(r);var v=r.bezierData;if(t>=n.t-a||t<r.t-a){var y=t>=n.t-a?v.points.length-1:0;for(m=v.points[y].point.length,f=0;f<m;f+=1)i[f]=v.points[y].point[f];s._lastBezierData=null}else{r.__fnct?g=r.__fnct:(g=te.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,r.__fnct=g),d=g((t-(r.t-a))/(n.t-a-(r.t-a)));var b,_=v.segmentLength*d,k=s.lastFrame<t&&s._lastBezierData===v?s._lastAddedLength:0;for(u=s.lastFrame<t&&s._lastBezierData===v?s._lastPoint:0,p=!0,c=v.points.length;p;){if(k+=v.points[u].partialLength,0===_||0===d||u==v.points.length-1){for(m=v.points[u].point.length,f=0;f<m;f+=1)i[f]=v.points[u].point[f];break}if(_>=k&&_<k+v.points[u+1].partialLength){for(b=(_-k)/v.points[u+1].partialLength,m=v.points[u].point.length,f=0;f<m;f+=1)i[f]=v.points[u].point[f]+(v.points[u+1].point[f]-v.points[u].point[f])*b;break}u<c-1?u+=1:p=!1}s._lastPoint=u,s._lastAddedLength=k-v.points[u].partialLength,s._lastBezierData=v}}else{var A,P,M,F,E;for(l=r.s.length,o=0;o<l;o+=1){if(1!==r.h&&(t>=n.t-a?d=1:t<r.t-a?d=0:(r.o.x.constructor===Array?(r.__fnct||(r.__fnct=[]),r.__fnct[o]?g=r.__fnct[o]:(A=r.o.x[o]||r.o.x[0],P=r.o.y[o]||r.o.y[0],M=r.i.x[o]||r.i.x[0],F=r.i.y[o]||r.i.y[0],g=te.getBezierEasing(A,P,M,F).get,r.__fnct[o]=g)):r.__fnct?g=r.__fnct:(A=r.o.x,P=r.o.y,M=r.i.x,F=r.i.y,g=te.getBezierEasing(A,P,M,F).get,r.__fnct=g),d=g((t-(r.t-a))/(n.t-a-(r.t-a))))),this.sh&&1!==r.h){var x=r.s[o],w=r.e[o];x-w<-180?x+=360:x-w>180&&(x-=360),E=x+(w-x)*d}else E=1===r.h?r.s[o]:r.s[o]+(r.e[o]-r.s[o])*d;1===l?i=E:i[o]=E}}return s.lastIndex=h,i}function e(t){for(var e=0;e<this.v.length;)this.pv[e]=t[e],this.v[e]=this.mult?this.pv[e]*this.mult:this.pv[e],this.lastPValue[e]!==this.pv[e]&&(this._mdf=!0,this.lastPValue[e]=this.pv[e]),e+=1}function s(t){this.pv=t,this.v=this.mult?this.pv*this.mult:this.pv,this.lastPValue!=this.pv&&(this._mdf=!0,this.lastPValue=this.pv)}function i(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==p&&(this._caching.lastFrame>=s&&t>=s||this._caching.lastFrame<e&&t<e))){this._caching.lastIndex=this._caching.lastFrame<t?this._caching.lastIndex:0;var i=this.interpolateValue(t,this.pv,this._caching);this.calculateValueAtCurrentTime(i)}this._caching.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function a(){this._mdf=!1}function r(t,e,s){this.propType="unidimensional",this.mult=s,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.getValue=a}function n(t,e,s){this.propType="multidimensional",this.mult=s,this.data=e,this._mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,r=e.k.length;this.v=Qt("float32",r),this.pv=Qt("float32",r),this.lastValue=Qt("float32",r);Qt("float32",r);for(this.vel=Qt("float32",r),i=0;i<r;i+=1)this.v[i]=s?e.k[i]*s:e.k[i],this.pv[i]=e.k[i];this.getValue=a}function h(e,a,r){this.propType="unidimensional",this.keyframes=a.k,this.offsetTime=e.data.st,this.lastValue=p,this.lastPValue=p,this.frameId=-1,this._caching={lastFrame:p,lastIndex:0,value:0},this.k=!0,this.kf=!0,this.data=a,this.mult=r,this.elem=e,this._isFirstFrame=!1,this.comp=e.comp,this.v=r?a.k[0].s[0]*r:a.k[0].s[0],this.pv=a.k[0].s[0],this.getValue=i,this.calculateValueAtCurrentTime=s,this.interpolateValue=t}function o(s,a,r){this.propType="multidimensional";var n,h,o,l,f,m=a.k.length;for(n=0;n<m-1;n+=1)a.k[n].to&&a.k[n].s&&a.k[n].e&&(h=a.k[n].s,o=a.k[n].e,l=a.k[n].to,f=a.k[n].ti,(2===h.length&&(h[0]!==o[0]||h[1]!==o[1])&&ee.pointOnLine2D(h[0],h[1],o[0],o[1],h[0]+l[0],h[1]+l[1])&&ee.pointOnLine2D(h[0],h[1],o[0],o[1],o[0]+f[0],o[1]+f[1])||3===h.length&&(h[0]!==o[0]||h[1]!==o[1]||h[2]!==o[2])&&ee.pointOnLine3D(h[0],h[1],h[2],o[0],o[1],o[2],h[0]+l[0],h[1]+l[1],h[2]+l[2])&&ee.pointOnLine3D(h[0],h[1],h[2],o[0],o[1],o[2],o[0]+f[0],o[1]+f[1],o[2]+f[2]))&&(a.k[n].to=null,a.k[n].ti=null),h[0]===o[0]&&h[1]===o[1]&&0===l[0]&&0===l[1]&&0===f[0]&&0===f[1]&&(2===h.length||h[2]===o[2]&&0===l[2]&&0===f[2])&&(a.k[n].to=null,a.k[n].ti=null));this.keyframes=a.k,this.offsetTime=s.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r,this.elem=s,this.comp=s.comp,this.getValue=i,this.calculateValueAtCurrentTime=e,this.interpolateValue=t,this.frameId=-1;var d=a.k[0].s.length;this.v=Qt("float32",d),this.pv=Qt("float32",d),this.lastValue=Qt("float32",d),this.lastPValue=Qt("float32",d),this._caching={lastFrame:p,lastIndex:0,value:Qt("float32",d)}}function l(t,e,s,i,a){var l;if(0===e.a)l=0===s?new r(t,e,i):new n(t,e,i);else if(1===e.a)l=0===s?new h(t,e,i):new o(t,e,i);else if(e.k.length)if("number"==typeof e.k[0])l=new n(t,e,i);else switch(s){case 0:l=new h(t,e,i);break;case 1:l=new o(t,e,i)}else l=new r(t,e,i);return l.k&&a.push(l),l}var p=Gt,f={getProp:l};return f}(),re=function(){function t(t){var e,s=this.dynamicProperties.length;for(e=0;e<s;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function e(t){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var e,s=this.dynamicProperties.length;for(e=0;e<s;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0);if(this._mdf||t){if(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented&&this.p.keyframes&&this.p.getValueAtTime){var i,a;this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/this.elem.globalData.frameRate,0),a=this.p.getValueAtTime(this.p.keyframes[0].t/this.elem.globalData.frameRate,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/this.elem.globalData.frameRate,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.01)/this.elem.globalData.frameRate,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/this.elem.globalData.frameRate,this.p.offsetTime)),this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function s(){this.inverted=!0,this.iv=new $t,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}function i(){}function a(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this.dynamicProperties=[],this._mdf=!1,this.data=e,this.v=new $t,e.p.s?(this.px=ae.getProp(t,e.p.x,0,0,this.dynamicProperties),this.py=ae.getProp(t,e.p.y,0,0,this.dynamicProperties),e.p.z&&(this.pz=ae.getProp(t,e.p.z,0,0,this.dynamicProperties))):this.p=ae.getProp(t,e.p,1,0,this.dynamicProperties),e.r)this.r=ae.getProp(t,e.r,0,Ut,this.dynamicProperties);else if(e.rx){if(this.rx=ae.getProp(t,e.rx,0,Ut,this.dynamicProperties),this.ry=ae.getProp(t,e.ry,0,Ut,this.dynamicProperties),this.rz=ae.getProp(t,e.rz,0,Ut,this.dynamicProperties),e.or.k[0].ti){var i,a=e.or.k.length;for(i=0;i<a;i+=1)e.or.k[i].to=e.or.k[i].ti=null}this.or=ae.getProp(t,e.or,1,Ut,this.dynamicProperties),this.or.sh=!0}e.sk&&(this.sk=ae.getProp(t,e.sk,0,Ut,this.dynamicProperties),this.sa=ae.getProp(t,e.sa,0,Ut,this.dynamicProperties)),e.a&&(this.a=ae.getProp(t,e.a,1,0,this.dynamicProperties)),e.s&&(this.s=ae.getProp(t,e.s,1,.01,this.dynamicProperties)),e.o?this.o=ae.getProp(t,e.o,0,.01,s):this.o={_mdf:!1,v:1},this.dynamicProperties.length?s.push(this):this.getValue(!0)}function r(t,e,s){return new a(t,e,s)}return a.prototype.applyToMatrix=t,a.prototype.getValue=e,a.prototype.setInverted=s,a.prototype.autoOrient=i,{getTransformProperty:r}}();P.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=ce.newElement(),this.o[s]=ce.newElement(),this.i[s]=ce.newElement(),s+=1},P.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},P.prototype.doubleArrayLength=function(){this.v=this.v.concat(g(this._maxLength)),this.i=this.i.concat(g(this._maxLength)),this.o=this.o.concat(g(this._maxLength)),this._maxLength*=2},P.prototype.setXYAt=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o}(!r[i]||r[i]&&!a)&&(r[i]=ce.newElement()),r[i][0]=t,r[i][1]=e},P.prototype.setTripleAt=function(t,e,s,i,a,r,n,h){this.setXYAt(t,e,"v",n,h),this.setXYAt(s,i,"o",n,h),this.setXYAt(a,r,"i",n,h)},P.prototype.reverse=function(){var t=new P;t.setPathData(this.c,this._length);var e=this.v,s=this.o,a=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],a[0][0],a[0][1],s[0][0],s[0][1],0,!1),r=1);var n=this._length-1,h=this._length;for(i=r;i<h;i+=1)t.setTripleAt(e[n][0],e[n][1],a[n][0],a[n][1],s[n][0],s[n][1],i,!1),n-=1;return t};var ne=function(){function t(t,e,s,i){var a,r,n,h,o,l,p,f,m,d=i.lastIndex,c=!1;if(t<this.keyframes[0].t-this.offsetTime)a=this.keyframes[0].s[0],n=!0,d=0;else if(t>=this.keyframes[this.keyframes.length-1].t-this.offsetTime)a=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-1].s[0]:this.keyframes[this.keyframes.length-2].e[0],n=!0;else{for(var u,g,v=d,y=this.keyframes.length-1,b=!0;b&&(u=this.keyframes[v],g=this.keyframes[v+1],!(g.t-this.offsetTime>t));)v<y-1?v+=1:b=!1;if(n=1===u.h,d=v,!n){if(t>=g.t-this.offsetTime)f=1;else if(t<u.t-this.offsetTime)f=0;else{var _;u.__fnct?_=u.__fnct:(_=te.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,u.__fnct=_),f=_((t-(u.t-this.offsetTime))/(g.t-this.offsetTime-(u.t-this.offsetTime)))}r=u.e[0]}a=u.s[0]}for(l=e._length,p=a.i[0].length,i.lastIndex=d,h=0;h<l;h+=1)for(o=0;o<p;o+=1)m=n?a.i[h][o]:a.i[h][o]+(r.i[h][o]-a.i[h][o])*f,e.i[h][o]!==m&&(e.i[h][o]=m,s&&(this.pv.i[h][o]=m),c=!0),m=n?a.o[h][o]:a.o[h][o]+(r.o[h][o]-a.o[h][o])*f,e.o[h][o]!==m&&(e.o[h][o]=m,s&&(this.pv.o[h][o]=m),c=!0),m=n?a.v[h][o]:a.v[h][o]+(r.v[h][o]-a.v[h][o])*f,e.v[h][o]!==m&&(e.v[h][o]=m,s&&(this.pv.v[h][o]=m),c=!0);return c}function e(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;if(i===l||!(i<e&&t<e||i>s&&t>s)){this._caching.lastIndex=i<t?this._caching.lastIndex:0;var a=this.interpolateShape(t,this.v,!0,this._caching);this._mdf=a,a&&(this.paths=this.localShapeCollection)}this._caching.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function s(){return this.v}function i(){this.paths=this.localShapeCollection,this.k||(this._mdf=!1)}function a(t,e,s){this.propType="shape",this.comp=t.comp,this.k=!1,this._mdf=!1;var a=3===s?e.pt.k:e.ks.k;this.v=ue.clone(a),this.pv=ue.clone(this.v),this.localShapeCollection=ge.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i}function r(t,e,s){this.propType="shape",this.comp=t.comp,this.elem=t,this.offsetTime=t.data.st,this.keyframes=3===s?e.pt.k:e.ks.k,this.k=!0,this.kf=!0;var a=this.keyframes[0].s[0].i.length;this.keyframes[0].s[0].i[0].length;this.v=ue.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,a),this.pv=ue.clone(this.v),this.localShapeCollection=ge.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=l,this.reset=i,this._caching={lastFrame:l,lastIndex:0}}function n(t,e,s,i){var n;if(3===s||4===s){var h=3===s?e.pt:e.ks,o=h.k;n=1===h.a||o.length?new r(t,e,s):new a(t,e,s)}else 5===s?n=new m(t,e):6===s?n=new p(t,e):7===s&&(n=new f(t,e));return n.k&&i.push(n),n}function h(){return a}function o(){return r}var l=-999999;a.prototype.interpolateShape=t,a.prototype.getValue=s,r.prototype.getValue=e,r.prototype.interpolateShape=t;var p=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2,r=3!==this.d,n=this.v;3!==this.d&&(n.v[0][0]=t,n.v[0][1]=e-a,n.v[1][0]=r?t+i:t-i,n.v[1][1]=e,n.v[2][0]=t,n.v[2][1]=e+a,n.v[3][0]=r?t-i:t+i,n.v[3][1]=e,n.i[0][0]=r?t-i*s:t+i*s,n.i[0][1]=e-a,n.i[1][0]=r?t+i:t-i,n.i[1][1]=e-a*s,n.i[2][0]=r?t+i*s:t-i*s,n.i[2][1]=e+a,n.i[3][0]=r?t-i:t+i,n.i[3][1]=e+a*s,n.o[0][0]=r?t+i*s:t-i*s,n.o[0][1]=e-a,n.o[1][0]=r?t+i:t-i,n.o[1][1]=e+a*s,n.o[2][0]=r?t-i*s:t+i*s,n.o[2][1]=e+a,n.o[3][0]=r?t-i:t+i,n.o[3][1]=e-a*s)}function e(t){var e,s=this.dynamicProperties.length;if(this.elem.globalData.frameId!==this.frameId){for(this._mdf=!1,this.frameId=this.elem.globalData.frameId,e=0;e<s;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e]._mdf&&(this._mdf=!0);this._mdf&&this.convertEllToPath()}}var s=Zt;return function(s,a){this.v=ue.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=ge.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=a.d,this.dynamicProperties=[],this.elem=s,this.comp=s.comp,this.frameId=-1,this._mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=i,this.p=ae.getProp(s,a.p,1,0,this.dynamicProperties),this.s=ae.getProp(s,a.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),f=function(){function t(){var t,e=Math.floor(this.pt.v),s=2*Math.PI/e,i=this.or.v,a=this.os.v,r=2*Math.PI*i/(4*e),n=-Math.PI/2,h=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var o=i*Math.cos(n),l=i*Math.sin(n),p=0===o&&0===l?0:l/Math.sqrt(o*o+l*l),f=0===o&&0===l?0:-o/Math.sqrt(o*o+l*l);o+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(o,l,o-p*r*a*h,l-f*r*a*h,o+p*r*a*h,l+f*r*a*h,t,!0),n+=s*h}this.paths.length=0,this.paths[0]=this.v}function e(){var t,e,s,i,a=2*Math.floor(this.pt.v),r=2*Math.PI/a,n=!0,h=this.or.v,o=this.ir.v,l=this.os.v,p=this.is.v,f=2*Math.PI*h/(2*a),m=2*Math.PI*o/(2*a),d=-Math.PI/2;d+=this.r.v;var c=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<a;t+=1){e=n?h:o,s=n?l:p,i=n?f:m;var u=e*Math.cos(d),g=e*Math.sin(d),v=0===u&&0===g?0:g/Math.sqrt(u*u+g*g),y=0===u&&0===g?0:-u/Math.sqrt(u*u+g*g);u+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(u,g,u-v*i*s*c,g-y*i*s*c,u+v*i*s*c,g+y*i*s*c,t,!0),n=!n,d+=r*c}}function s(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1,this.frameId=this.elem.globalData.frameId;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0);this._mdf&&this.convertToPath()}}return function(a,r){this.v=ue.newElement(),this.v.setPathData(!0,0),this.elem=a,this.comp=a.comp,this.data=r,this.frameId=-1,this.d=r.d,this.dynamicProperties=[],this._mdf=!1,this.getValue=s,this.reset=i,1===r.sy?(this.ir=ae.getProp(a,r.ir,0,0,this.dynamicProperties),this.is=ae.getProp(a,r.is,0,.01,this.dynamicProperties),this.convertToPath=e):this.convertToPath=t,this.pt=ae.getProp(a,r.pt,0,0,this.dynamicProperties),this.p=ae.getProp(a,r.p,1,0,this.dynamicProperties),this.r=ae.getProp(a,r.r,0,Ut,this.dynamicProperties),this.or=ae.getProp(a,r.or,0,0,this.dynamicProperties),this.os=ae.getProp(a,r.os,0,.01,this.dynamicProperties),this.localShapeCollection=ge.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:this.convertToPath()}}(),m=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1,this.frameId=this.elem.globalData.frameId;var e,s=this.dynamicProperties.length;for(e=0;e<s;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e]._mdf&&(this._mdf=!0);this._mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,a=qt(s,i,this.r.v),r=a*(1-Zt);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+a,t+s,e-i+r,0,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-r,t+s,e+i-a,1,!0),0!==a?(this.v.setTripleAt(t+s-a,e+i,t+s-a,e+i,t+s-r,e+i,2,!0),this.v.setTripleAt(t-s+a,e+i,t-s+r,e+i,t-s+a,e+i,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-a,t-s,e+i-r,4,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+r,t-s,e-i+a,5,!0),this.v.setTripleAt(t-s+a,e-i,t-s+a,e-i,t-s+r,e-i,6,!0),this.v.setTripleAt(t+s-a,e-i,t+s-r,e-i,t+s-a,e-i,7,!0)):(this.v.setTripleAt(t-s,e+i,t-s+r,e+i,t-s,e+i,2),this.v.setTripleAt(t-s,e-i,t-s,e-i+r,t-s,e-i,3))):(this.v.setTripleAt(t+s,e-i+a,t+s,e-i+r,t+s,e-i+a,0,!0),0!==a?(this.v.setTripleAt(t+s-a,e-i,t+s-a,e-i,t+s-r,e-i,1,!0),this.v.setTripleAt(t-s+a,e-i,t-s+r,e-i,t-s+a,e-i,2,!0),this.v.setTripleAt(t-s,e-i+a,t-s,e-i+a,t-s,e-i+r,3,!0),this.v.setTripleAt(t-s,e+i-a,t-s,e+i-r,t-s,e+i-a,4,!0),this.v.setTripleAt(t-s+a,e+i,t-s+a,e+i,t-s+r,e+i,5,!0),this.v.setTripleAt(t+s-a,e+i,t+s-r,e+i,t+s-a,e+i,6,!0),this.v.setTripleAt(t+s,e+i-a,t+s,e+i-a,t+s,e+i-r,7,!0)):(this.v.setTripleAt(t-s,e-i,t-s+r,e-i,t-s,e-i,1,!0),this.v.setTripleAt(t-s,e+i,t-s,e+i-r,t-s,e+i,2,!0),this.v.setTripleAt(t+s,e+i,t+s-r,e+i,t+s,e+i,3,!0)))}return function(s,a){this.v=ue.newElement(),this.v.c=!0,this.localShapeCollection=ge.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=s,this.comp=s.comp,this.frameId=-1,this.d=a.d,this.dynamicProperties=[],this._mdf=!1,this.getValue=t,this.convertRectToPath=e,this.reset=i,this.p=ae.getProp(s,a.p,1,0,this.dynamicProperties),this.s=ae.getProp(s,a.s,1,0,this.dynamicProperties),this.r=ae.getProp(s,a.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),d={};return d.getShapeProp=n,d.getConstructorFunction=h,d.getKeyframedConstructorFunction=o,d}(),he=function(){function t(t,e){i[t]||(i[t]=e)}function e(t,e,s,a){return new i[t](e,s,a)}var s={},i={};return s.registerModifier=t,s.getModifier=e,s}();M.prototype.initModifierProperties=function(){},M.prototype.addShapeToModifier=function(){},M.prototype.addShape=function(t){if(!this.closed){var e={shape:t.sh,data:t,localShapeCollection:ge.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e)}},M.prototype.init=function(t,e,s){this.dynamicProperties=[],this.shapes=[],this.elem=t,this.initModifierProperties(t,e),this.frameId=Gt,this._mdf=!1,this.closed=!1,this.k=!1,this.dynamicProperties.length?(this.k=!0,s.push(this)):this.getValue(!0)},M.prototype.processKeys=function(){if(this.elem.globalData.frameId!==this.frameId){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0);this.frameId=this.elem.globalData.frameId}},b([M],F),F.prototype.initModifierProperties=function(t,e){this.s=ae.getProp(t,e.s,0,.01,this.dynamicProperties),this.e=ae.getProp(t,e.e,0,.01,this.dynamicProperties),this.o=ae.getProp(t,e.o,0,0,this.dynamicProperties),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m},F.prototype.addShapeToModifier=function(t){t.pathsData=[]},F.prototype.calculateShapeEdges=function(t,e,s,i,a){var r=[];e<=1?r.push({s:t,e:e}):t>=1?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,h,o=[],l=r.length;for(n=0;n<l;n+=1)if(h=r[n],h.e*a<i||h.s*a>i+s);else{var p,f;p=h.s*a<=i?0:(h.s*a-i)/s,f=h.e*a>=i+s?1:(h.e*a-i)/s,o.push([p,f])}return o.length||o.push([0,0]),o},F.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)ve.release(t[e]);return t.length=0,t},F.prototype.processShapes=function(t){var e,s;if(this._mdf||t){var i=this.o.v%360/360;if(i<0&&(i+=1),e=this.s.v+i,s=this.e.v+i,e>s){var a=e;e=s,s=a}this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var r,n,h,o,l,p,f,m=this.shapes.length,d=0;if(s===e)for(n=0;n<m;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection;else if(1===s&&0===e||0===s&&1===e){if(this._mdf)for(n=0;n<m;n+=1)this.shapes[n].shape._mdf=!0}else{var c,u,g=[];for(n=0;n<m;n+=1)if(c=this.shapes[n],c.shape._mdf||this._mdf||t||2===this.m){if(r=c.shape.paths,o=r._length,f=0,!c.shape._mdf&&c.pathsData.length)f=c.totalShapeLength;else{for(l=this.releasePathsData(c.pathsData),h=0;h<o;h+=1)p=ee.getSegmentsLength(r.shapes[h]),l.push(p),f+=p.totalLength;c.totalShapeLength=f,c.pathsData=l}d+=f,c.shape._mdf=!0}else c.shape.paths=c.localShapeCollection;var v,y=e,b=s,_=0;for(n=m-1;n>=0;n-=1)if(c=this.shapes[n],c.shape._mdf){for(u=c.localShapeCollection,u.releaseShapes(),2===this.m&&m>1?(v=this.calculateShapeEdges(e,s,c.totalShapeLength,_,d),_+=c.totalShapeLength):v=[[y,b]],o=v.length,h=0;h<o;h+=1){y=v[h][0],b=v[h][1],g.length=0,b<=1?g.push({s:c.totalShapeLength*y,e:c.totalShapeLength*b}):y>=1?g.push({s:c.totalShapeLength*(y-1),e:c.totalShapeLength*(b-1)}):(g.push({s:c.totalShapeLength*y,e:c.totalShapeLength}),g.push({s:0,e:c.totalShapeLength*(b-1)}));var k=this.addShapes(c,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(c.shape.v.c){var A=k.pop();this.addPaths(k,u),k=this.addShapes(c,g[1],A)}else this.addPaths(k,u),k=this.addShapes(c,g[1]);this.addPaths(k,u)}}c.shape.paths=u}}},F.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},F.prototype.addSegment=function(t,e,s,i,a,r,n){a.setXYAt(e[0],e[1],"o",r),a.setXYAt(s[0],s[1],"i",r+1),n&&a.setXYAt(t[0],t[1],"v",r),a.setXYAt(i[0],i[1],"v",r+1)},F.prototype.addSegmentFromArray=function(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)},F.prototype.addShapes=function(t,e,s){var i,a,r,n,h,o,l,p,f=t.pathsData,m=t.shape.paths.shapes,d=t.shape.paths._length,c=0,u=[],g=!0;for(s?(h=s._length,p=s._length):(s=ue.newElement(),h=0,p=0),u.push(s),i=0;i<d;i+=1){for(o=f[i].lengths,s.c=m[i].c,r=m[i].c?o.length:o.length+1,a=1;a<r;a+=1)if(n=o[a-1],c+n.addedLength<e.s)c+=n.addedLength,s.c=!1;else{if(c>e.e){s.c=!1;break}e.s<=c&&e.e>=c+n.addedLength?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[a],m[i].v[a],s,h,g),g=!1):(l=ee.getNewSegment(m[i].v[a-1],m[i].v[a],m[i].o[a-1],m[i].i[a],(e.s-c)/n.addedLength,(e.e-c)/n.addedLength,o[a-1]),this.addSegmentFromArray(l,s,h,g),g=!1,s.c=!1),c+=n.addedLength,h+=1}if(m[i].c){if(n=o[a-1],c<=e.e){var v=o[a-1].addedLength;e.s<=c&&e.e>=c+v?(this.addSegment(m[i].v[a-1],m[i].o[a-1],m[i].i[0],m[i].v[0],s,h,g),g=!1):(l=ee.getNewSegment(m[i].v[a-1],m[i].v[0],m[i].o[a-1],m[i].i[0],(e.s-c)/v,(e.e-c)/v,o[a-1]),this.addSegmentFromArray(l,s,h,g),g=!1,s.c=!1)}else s.c=!1;c+=n.addedLength,h+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),c>e.e)break;i<d-1&&(s=ue.newElement(),g=!0,u.push(s),h=0)}return u},he.registerModifier("tm",F),b([M],E),E.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=ae.getProp(t,e.r,0,null,this.dynamicProperties)},E.prototype.processPath=function(t,e){var s=ue.newElement();s.c=t.c;var i,a,r,n,h,o,l,p,f,m,d,c,u,g=t._length,v=0;for(i=0;i<g;i+=1)a=t.v[i],n=t.o[i],r=t.i[i],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==i&&i!==g-1||t.c?(h=0===i?t.v[g-1]:t.v[i-1],o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)),l=o?Math.min(o/2,e)/o:0,p=c=a[0]+(h[0]-a[0])*l,f=u=a[1]-(a[1]-h[1])*l,m=p-(p-a[0])*Zt,d=f-(f-a[1])*Zt,s.setTripleAt(p,f,m,d,c,u,v),v+=1,h=i===g-1?t.v[0]:t.v[i+1],o=Math.sqrt(Math.pow(a[0]-h[0],2)+Math.pow(a[1]-h[1],2)),l=o?Math.min(o/2,e)/o:0,p=m=a[0]+(h[0]-a[0])*l,f=d=a[1]+(h[1]-a[1])*l,c=p-(p-a[0])*Zt,u=f-(f-a[1])*Zt,s.setTripleAt(p,f,m,d,c,u,v),v+=1):(s.setTripleAt(a[0],a[1],n[0],n[1],r[0],r[1],v),v+=1):(s.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],v),v+=1);return s},E.prototype.processShapes=function(t){var e,s,i,a,r=this.shapes.length,n=this.rd.v;if(0!==n){var h,o,l;for(s=0;s<r;s+=1){if(h=this.shapes[s],o=h.shape.paths,l=h.localShapeCollection,h.shape._mdf||this._mdf||t)for(l.releaseShapes(),h.shape._mdf=!0,e=h.shape.paths.shapes,a=h.shape.paths._length,i=0;i<a;i+=1)l.addShape(this.processPath(e[i],n));h.shape.paths=h.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)},he.registerModifier("rd",E),b([M],x),x.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=ae.getProp(t,e.c,0,null,this.dynamicProperties),this.o=ae.getProp(t,e.o,0,null,this.dynamicProperties),this.tr=re.getTransformProperty(t,e.tr,this.dynamicProperties),this.data=e,this.dynamicProperties.length||this.getValue(!0),this.pMatrix=new $t,this.rMatrix=new $t,this.sMatrix=new $t,this.tMatrix=new $t,this.matrix=new $t},x.prototype.applyTransforms=function(t,e,s,i,a,r){var n=r?-1:1,h=i.s.v[0]+(1-i.s.v[0])*(1-a),o=i.s.v[1]+(1-i.s.v[1])*(1-a);t.translate(i.p.v[0]*n*a,i.p.v[1]*n*a,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*a),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(r?1/h:h,r?1/o:o),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])},x.prototype.init=function(t,e,s,i,a){this.elem=t,this.arr=e,this.pos=s,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.dynamicProperties=[],this.frameId=-1,this.initModifierProperties(t,e[s]);for(var r=0;s>0;)s-=1,this._elements.unshift(e[s]),r+=1;this.dynamicProperties.length?(this.k=!0,a.push(this)):this.getValue(!0)},x.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},x.prototype.cloneElements=function(t){var e=(t.length,JSON.parse(JSON.stringify(t)));return this.resetElements(e),e},x.prototype.changeGroupRender=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)t[s]._render=e,"gr"===t[s].ty&&this.changeGroupRender(t[s].it,e)},x.prototype.processShapes=function(t){var e,s,i,a,r;if(this._mdf||t){var n=Math.ceil(this.c.v);if(this._groups.length<n){for(;this._groups.length<n;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:0,ix:6,k:0},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes()}r=0;var o;for(i=0;i<=this._groups.length-1;i+=1)o=r<n,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),r+=1;this._currentCopies=n;var l=this.o.v,p=l%1,f=l>0?Math.floor(l):Math.ceil(l),m=(this.tr.v.props,this.pMatrix.props),d=this.rMatrix.props,c=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var u=0;if(l>0){for(;u<f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),u+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),u+=p)}else if(l<0){for(;u>f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),u-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),u-=p)}i=1===this.data.m?0:this._currentCopies-1,
+a=1===this.data.m?1:-1,r=this._currentCopies;for(var g,v;r;){if(e=this.elemsData[i].it,s=e[e.length-1].transform.mProps.v.props,v=s.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,0!==u){for((0!==i&&1===a||i!==this._currentCopies-1&&a===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),this.matrix.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),g=0;g<v;g+=1)s[g]=this.matrix.props[g];this.matrix.reset()}else for(this.matrix.reset(),g=0;g<v;g+=1)s[g]=this.matrix.props[g];u+=1,r-=1,i+=a}}else for(r=this._currentCopies,i=0,a=1;r;)e=this.elemsData[i].it,s=e[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,r-=1,i+=a},x.prototype.addShape=function(){},he.registerModifier("rp",x),w.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(g(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},w.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)ue.release(this.shapes[t]);this._length=0},C.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId||t){var e=0,s=this.dataProps.length;for(this._mdf=!1,this.frameId=this.elem.globalData.frameId;e<s;){if(this.dataProps[e].p._mdf){this._mdf=!t;break}e+=1}if(this._mdf||t)for("svg"===this.renderer&&(this.dashStr=""),e=0;e<s;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},S.prototype.comparePoints=function(t,e){for(var s,i=0,a=this.o.length/2;i<a;){if(s=Math.abs(t[4*i]-t[4*e+2*i]),s>.01)return!1;i+=1}return!0},S.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},S.prototype.getValue=function(t){if(this.prop.getValue(),this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,s,i,a=4*this.data.p;for(e=0;e<a;e+=1)s=e%4===0?100:255,i=Math.round(this.prop.v[e]*s),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(a=this.prop.v.length,e=4*this.data.p;e<a;e+=1)s=e%2===0?100:1,i=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t)}};var oe=function(){function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(t){var e="";if(this.assetsPath){var s=t.p;s.indexOf("images/")!==-1&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e}function s(e){var s=y("img");s.addEventListener("load",t.bind(this),!1),s.addEventListener("error",t.bind(this),!1),s.src=e}function i(t,i){this.imagesLoadedCb=i,this.totalAssets=t.length;var a;for(a=0;a<this.totalAssets;a+=1)t[a].layers||(s.bind(this)(e.bind(this)(t[a])),this.totalImages+=1)}function a(t){this.path=t||""}function r(t){this.assetsPath=t||""}function n(){this.imagesLoadedCb=null}return function(){this.loadAssets=i,this.setAssetsPath=r,this.setPath=a,this.destroy=n,this.assetsPath="",this.path="",this.totalAssets=0,this.totalImages=0,this.loadedAssets=0,this.imagesLoadedCb=null}}(),le=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),pe=function(){function t(t){var e=v("filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e}function e(){var t=v("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t}var s={};return s.createFilter=t,s.createAlphaToLuminanceFilter=e,s}();D.prototype.searchProperties=function(t){var e,s,i=this._textData.a.length,a=ae.getProp;for(e=0;e<i;e+=1)s=this._textData.a[e],this._animatorsData[e]=new T(this._elem,s,this._dynamicProperties);this._textData.p&&"m"in this._textData.p?(this._pathData={f:a(this._elem,this._textData.p.f,0,0,this._dynamicProperties),l:a(this._elem,this._textData.p.l,0,0,this._dynamicProperties),r:this._textData.p.r,m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=a(this._elem,this._textData.m.a,1,0,this._dynamicProperties),this._dynamicProperties.length&&t.push(this)},D.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var s,i,a,r,n,h,o,l,p,f,u,g,v,y,b,_,k,A,P,M=this._moreOptions.alignment.v,F=this._animatorsData,E=this._textData,x=this.mHelper,w=this._renderType,C=this.renderedLetters.length,S=(this.data,t.l);if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var D=P.v;this._pathData.r&&(D=D.reverse()),n={tLength:0,segments:[]},r=D._length-1;var T;for(_=0,a=0;a<r;a+=1)T={s:D.v[a],e:D.v[a+1],to:[D.o[a][0]-D.v[a][0],D.o[a][1]-D.v[a][1]],ti:[D.i[a+1][0]-D.v[a+1][0],D.i[a+1][1]-D.v[a+1][1]]},ee.buildBezierData(T),n.tLength+=T.bezierData.segmentLength,n.segments.push(T),_+=T.bezierData.segmentLength;a=r,P.v.c&&(T={s:D.v[a],e:D.v[0],to:[D.o[a][0]-D.v[a][0],D.o[a][1]-D.v[a][1]],ti:[D.i[0][0]-D.v[0][0],D.i[0][1]-D.v[0][1]]},ee.buildBezierData(T),n.tLength+=T.bezierData.segmentLength,n.segments.push(T),_+=T.bezierData.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,h=this._pathData.f.v,u=0,f=1,l=0,p=!0,y=n.segments,h<0&&P.v.c)for(n.tLength<Math.abs(h)&&(h=-Math.abs(h)%n.tLength),u=y.length-1,v=y[u].bezierData.points,f=v.length-1;h<0;)h+=v[f].partialLength,f-=1,f<0&&(u-=1,v=y[u].bezierData.points,f=v.length-1);v=y[u].bezierData.points,g=v[f-1],o=v[f],b=o.partialLength}r=S.length,s=0,i=0;var L,z,N,R,V,B=1.2*t.finalSize*.714,O=!0;R=F.length;var G,j,W,H,X,q,Y,J,U,Z,K,Q,$,tt=-1,et=h,st=u,it=f,at=-1,rt=0,nt="",ht=this.defaultPropsArray;for(a=0;a<r;a+=1){if(x.reset(),X=1,S[a].n)s=0,i+=t.yOffset,i+=O?1:0,h=et,O=!1,rt=0,this._hasMaskedPath&&(u=st,f=it,v=y[u].bezierData.points,g=v[f-1],o=v[f],b=o.partialLength,l=0),$=Z=Q=nt="",ht=this.defaultPropsArray;else{if(this._hasMaskedPath){if(at!==S[a].line){switch(t.j){case 1:h+=_-t.lineWidths[S[a].line];break;case 2:h+=(_-t.lineWidths[S[a].line])/2}at=S[a].line}tt!==S[a].ind&&(S[tt]&&(h+=S[tt].extra),h+=S[a].an/2,tt=S[a].ind),h+=M[0]*S[a].an/200;var ot=0;for(N=0;N<R;N+=1)L=F[N].a,L.p.propType&&(z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),ot+=G.length?L.p.v[0]*G[0]:L.p.v[0]*G),L.a.propType&&(z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),ot+=G.length?L.a.v[0]*G[0]:L.a.v[0]*G);for(p=!0;p;)l+b>=h+ot||!v?(k=(h+ot-l)/o.partialLength,W=g.point[0]+(o.point[0]-g.point[0])*k,H=g.point[1]+(o.point[1]-g.point[1])*k,x.translate(-M[0]*S[a].an/200,-(M[1]*B/100)),p=!1):v&&(l+=o.partialLength,f+=1,f>=v.length&&(f=0,u+=1,y[u]?v=y[u].bezierData.points:P.v.c?(f=0,u=0,v=y[u].bezierData.points):(l-=o.partialLength,v=null)),v&&(g=o,o=v[f],b=o.partialLength));j=S[a].an/2-S[a].add,x.translate(-j,0,0)}else j=S[a].an/2-S[a].add,x.translate(-j,0,0),x.translate(-M[0]*S[a].an/200,-M[1]*B/100,0);for(rt+=S[a].l/2,N=0;N<R;N+=1)L=F[N].a,L.t.propType&&(z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),this._hasMaskedPath?h+=G.length?L.t*G[0]:L.t*G:s+=G.length?L.t.v*G[0]:L.t.v*G);for(rt+=S[a].l/2,t.strokeWidthAnim&&(Y=t.sw||0),t.strokeColorAnim&&(q=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(J=[t.fc[0],t.fc[1],t.fc[2]]),N=0;N<R;N+=1)L=F[N].a,L.a.propType&&(z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),G.length?x.translate(-L.a.v[0]*G[0],-L.a.v[1]*G[1],L.a.v[2]*G[2]):x.translate(-L.a.v[0]*G,-L.a.v[1]*G,L.a.v[2]*G));for(N=0;N<R;N+=1)L=F[N].a,L.s.propType&&(z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),G.length?x.scale(1+(L.s.v[0]-1)*G[0],1+(L.s.v[1]-1)*G[1],1):x.scale(1+(L.s.v[0]-1)*G,1+(L.s.v[1]-1)*G,1));for(N=0;N<R;N+=1){if(L=F[N].a,z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),L.sk.propType&&(G.length?x.skewFromAxis(-L.sk.v*G[0],L.sa.v*G[1]):x.skewFromAxis(-L.sk.v*G,L.sa.v*G)),L.r.propType&&(G.length?x.rotateZ(-L.r.v*G[2]):x.rotateZ(-L.r.v*G)),L.ry.propType&&(G.length?x.rotateY(L.ry.v*G[1]):x.rotateY(L.ry.v*G)),L.rx.propType&&(G.length?x.rotateX(L.rx.v*G[0]):x.rotateX(L.rx.v*G)),L.o.propType&&(X+=G.length?(L.o.v*G[0]-X)*G[0]:(L.o.v*G-X)*G),t.strokeWidthAnim&&L.sw.propType&&(Y+=G.length?L.sw.v*G[0]:L.sw.v*G),t.strokeColorAnim&&L.sc.propType)for(U=0;U<3;U+=1)G.length?q[U]=q[U]+(L.sc.v[U]-q[U])*G[0]:q[U]=q[U]+(L.sc.v[U]-q[U])*G;if(t.fillColorAnim&&t.fc){if(L.fc.propType)for(U=0;U<3;U+=1)G.length?J[U]=J[U]+(L.fc.v[U]-J[U])*G[0]:J[U]=J[U]+(L.fc.v[U]-J[U])*G;L.fh.propType&&(J=G.length?c(J,L.fh.v*G[0]):c(J,L.fh.v*G)),L.fs.propType&&(J=G.length?m(J,L.fs.v*G[0]):m(J,L.fs.v*G)),L.fb.propType&&(J=G.length?d(J,L.fb.v*G[0]):d(J,L.fb.v*G))}}for(N=0;N<R;N+=1)L=F[N].a,L.p.propType&&(z=F[N].s,G=z.getMult(S[a].anIndexes[N],E.a[N].s.totalChars),this._hasMaskedPath?G.length?x.translate(0,L.p.v[1]*G[0],-L.p.v[2]*G[1]):x.translate(0,L.p.v[1]*G,-L.p.v[2]*G):G.length?x.translate(L.p.v[0]*G[0],L.p.v[1]*G[1],-L.p.v[2]*G[2]):x.translate(L.p.v[0]*G,L.p.v[1]*G,-L.p.v[2]*G));if(t.strokeWidthAnim&&(Z=Y<0?0:Y),t.strokeColorAnim&&(K="rgb("+Math.round(255*q[0])+","+Math.round(255*q[1])+","+Math.round(255*q[2])+")"),t.fillColorAnim&&t.fc&&(Q="rgb("+Math.round(255*J[0])+","+Math.round(255*J[1])+","+Math.round(255*J[2])+")"),this._hasMaskedPath){if(x.translate(0,-t.ls),x.translate(0,M[1]*B/100+i,0),E.p.p){A=(o.point[1]-g.point[1])/(o.point[0]-g.point[0]);var lt=180*Math.atan(A)/Math.PI;o.point[0]<g.point[0]&&(lt+=180),x.rotate(-lt*Math.PI/180)}x.translate(W,H,0),h-=M[0]*S[a].an/200,S[a+1]&&tt!==S[a+1].ind&&(h+=S[a].an/2,h+=t.tr/1e3*t.finalSize)}else{switch(x.translate(s,i,0),t.ps&&x.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:x.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[S[a].line]),0,0);break;case 2:x.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[S[a].line])/2,0,0)}x.translate(0,-t.ls),x.translate(j,0,0),x.translate(M[0]*S[a].an/200,M[1]*B/100,0),s+=S[a].l+t.tr/1e3*t.finalSize}"html"===w?nt=x.toCSS():"svg"===w?nt=x.to2dCSS():ht=[x.props[0],x.props[1],x.props[2],x.props[3],x.props[4],x.props[5],x.props[6],x.props[7],x.props[8],x.props[9],x.props[10],x.props[11],x.props[12],x.props[13],x.props[14],x.props[15]],$=X}C<=a?(V=new I($,Z,K,Q,nt,ht),this.renderedLetters.push(V),C+=1,this.lettersChangedFlag=!0):(V=this.renderedLetters[a],this.lettersChangedFlag=V.update($,Z,K,Q,nt,ht)||this.lettersChangedFlag)}}},D.prototype.getValue=function(){if(this._elem.globalData.frameId!==this._frameId){this._frameId=this._elem.globalData.frameId;var t,e=this._dynamicProperties.length;for(this._mdf=!1,t=0;t<e;t+=1)this._dynamicProperties[t].getValue(),this._mdf=this._dynamicProperties[t]._mdf||this._mdf}},D.prototype.mHelper=new $t,D.prototype.defaultPropsArray=[],I.prototype.update=function(t,e,s,i,a,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==s&&(this.sc=s,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==a&&(this.m=a,this._mdf.m=!0,n=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,this._mdf.p=!0,n=!0),n},L.prototype.setCurrentData=function(t){var e=this.currentData;e.ascent=t.ascent,e.boxWidth=t.boxWidth?t.boxWidth:e.boxWidth,e.f=t.f,e.fStyle=t.fStyle,e.fWeight=t.fWeight,e.fc=t.fc,e.j=t.j,e.justifyOffset=t.justifyOffset,e.l=t.l,e.lh=t.lh,e.lineWidths=t.lineWidths,e.ls=t.ls,e.of=t.of,e.s=t.s,e.sc=t.sc,e.sw=t.sw,e.sz=t.sz,e.ps=t.ps,e.t=t.t,e.tr=t.tr,e.fillColorAnim=t.fillColorAnim||e.fillColorAnim,e.strokeColorAnim=t.strokeColorAnim||e.strokeColorAnim,e.strokeWidthAnim=t.strokeWidthAnim||e.strokeWidthAnim,e.yOffset=t.yOffset,e.finalSize=t.finalSize,e.finalLineHeight=t.finalLineHeight,e.finalText=t.finalText,e.__complete=!1},L.prototype.searchProperty=function(){return this.kf=this.data.d.k.length>1,this.kf},L.prototype.getValue=function(t){this._mdf=!1;var e=this.elem.globalData.frameId;if(e!==this._frameId&&this.kf||this._isFirstFrame||t){for(var s,i=this.data.d.k,a=0,r=i.length;a<=r-1&&(s=i[a].s,!(a===r-1||i[a+1].t>e));)a+=1;this.keysIndex!==a&&(s.__complete||this.completeTextData(s),this.setCurrentData(s),this._mdf=!this._isFirstFrame,this.pv=this.v=this.currentData.t,this.keysIndex=a),this._frameId=e}},L.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,h,o=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,d=0,c=0,u=0,g=[],v=0,y=0,b=o.getFontByName(t.f),_=0,k=b.fStyle.split(" "),A="normal",P="normal";s=k.length;var M;for(e=0;e<s;e+=1)switch(M=k[e].toLowerCase()){case"italic":P="italic";break;case"bold":A="700";break;case"black":A="900";break;case"medium":A="500";break;case"regular":case"normal":A="400";break;case"light":case"thin":A="200"}t.fWeight=A,t.fStyle=P,s=t.t.length,t.finalSize=t.s,t.finalText=t.t,t.finalLineHeight=t.lh;var F=t.tr/1e3*t.finalSize;if(t.sz)for(var E,x,w=!0,C=t.sz[0],S=t.sz[1];w;){x=t.t,E=0,v=0,s=t.t.length,F=t.tr/1e3*t.finalSize;var D=-1;for(e=0;e<s;e+=1)i=!1," "===x.charAt(e)?D=e:13===x.charCodeAt(e)&&(v=0,i=!0,E+=t.finalLineHeight||1.2*t.finalSize),o.chars?(h=o.getCharData(x.charAt(e),b.fStyle,b.fFamily),_=i?0:h.w*t.finalSize/100):_=o.measureText(x.charAt(e),t.f,t.finalSize),v+_>C&&" "!==x.charAt(e)?(D===-1?s+=1:e=D,E+=t.finalLineHeight||1.2*t.finalSize,x=x.substr(0,e)+"\r"+x.substr(e===D?e+1:e),D=-1,v=0):(v+=_,v+=F);E+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&S<E?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=x,s=t.finalText.length,w=!1)}v=-F,_=0;var T,I=0;for(e=0;e<s;e+=1)if(i=!1,T=t.finalText.charAt(e)," "===T?a="\xa0":13===T.charCodeAt(0)?(I=0,g.push(v),y=v>y?v:y,v=-2*F,a="",i=!0,u+=1):a=t.finalText.charAt(e),o.chars?(h=o.getCharData(T,b.fStyle,o.getFontByName(t.f).fFamily),_=i?0:h.w*t.finalSize/100):_=o.measureText(a,t.f,t.finalSize)," "===T?I+=_+F:(v+=_+F+I,I=0),p.push({l:_,an:_,add:d,n:i,anIndexes:[],val:a,line:u}),2==m){if(d+=_,""===a||"\xa0"===a||e===s-1){for(""!==a&&"\xa0"!==a||(d-=_);c<=e;)p[c].an=d,p[c].ind=f,p[c].extra=_,c+=1;f+=1,d=0}}else if(3==m){if(d+=_,""===a||e===s-1){for(""===a&&(d-=_);c<=e;)p[c].an=d,p[c].ind=f,p[c].extra=_,c+=1;d=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,y=v>y?v:y,g.push(v),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=y,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var L,z,N=l.a;n=N.length;var R,V,B=[];for(r=0;r<n;r+=1){for(L=N[r],L.a.sc&&(t.strokeColorAnim=!0),L.a.sw&&(t.strokeWidthAnim=!0),(L.a.fc||L.a.fh||L.a.fs||L.a.fb)&&(t.fillColorAnim=!0),V=0,R=L.s.b,e=0;e<s;e+=1)z=p[e],z.anIndexes[r]=V,(1==R&&""!==z.val||2==R&&""!==z.val&&"\xa0"!==z.val||3==R&&(z.n||"\xa0"==z.val||e==s-1)||4==R&&(z.n||e==s-1))&&(1===L.s.rn&&B.push(V),V+=1);l.a[r].s.totalChars=V;var O,G=-1;if(1===L.s.rn)for(e=0;e<s;e+=1)z=p[e],G!=z.anIndexes[r]&&(G=z.anIndexes[r],O=B.splice(Math.floor(Math.random()*B.length),1)[0]),z.anIndexes[r]=O}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},L.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var s=this.data.d.k[e].s;for(var i in t)s[i]=t[i];this.recalculate(e)},L.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=-1,this.getValue(!0)},L.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex)},L.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex)};var fe=function(){function t(t){if(this._mdf=t||!1,this.dynamicProperties.length){var e,s=this.dynamicProperties.length;for(e=0;e<s;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)}var i=this.elem.textProperty.currentData?this.elem.textProperty.currentData.l.length:0;t&&2===this.data.r&&(this.e.v=i);var a=2===this.data.r?1:100/i,r=this.o.v/a,n=this.s.v/a+r,h=this.e.v/a+r;if(n>h){var o=n;n=h,h=o}this.finalS=n,this.finalE=h}function e(t){var e=te.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,s=0,i=this.finalS,h=this.finalE,o=this.data.sh;if(2==o)s=h===i?t>=h?1:0:a(0,r(.5/(h-i)+(t-i)/(h-i),1)),s=e(s);else if(3==o)s=h===i?t>=h?0:1:1-a(0,r(.5/(h-i)+(t-i)/(h-i),1)),s=e(s);else if(4==o)h===i?s=0:(s=a(0,r(.5/(h-i)+(t-i)/(h-i),1)),s<.5?s*=2:s=1-2*(s-.5)),s=e(s);else if(5==o){if(h===i)s=0;else{var l=h-i;t=r(a(0,t+.5-i),h-i);var p=-l/2+t,f=l/2;s=Math.sqrt(1-p*p/(f*f))}s=e(s)}else 6==o?(h===i?s=0:(t=r(a(0,t+.5-i),h-i),s=(1+Math.cos(Math.PI+2*Math.PI*t/(h-i)))/2),s=e(s)):(t>=n(i)&&(s=t-i<0?1-(i-t):a(0,r(h-t,1))),s=e(s));return s*this.a.v}function s(s,i,a){this._mdf=!1,this.k=!1,this.data=i,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.elem=s,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=ae.getProp(s,i.s||{k:0},0,0,this.dynamicProperties),"e"in i?this.e=ae.getProp(s,i.e,0,0,this.dynamicProperties):this.e={v:100},this.o=ae.getProp(s,i.o||{k:0},0,0,this.dynamicProperties),this.xe=ae.getProp(s,i.xe||{k:0},0,0,this.dynamicProperties),this.ne=ae.getProp(s,i.ne||{k:0},0,0,this.dynamicProperties),this.a=ae.getProp(s,i.a,0,.01,this.dynamicProperties),this.dynamicProperties.length?a.push(this):this.getValue()}function i(t,e,i){return new s(t,e,i)}var a=Math.max,r=Math.min,n=Math.floor;return{getTextSelectorProp:i}}(),me=function(){return function(t,e,s,i){function a(){var t;return n?(n-=1,t=o[n]):t=e(),t}function r(t){n===h&&(o=de["double"](o),h=2*h),s&&s(t),o[n]=t,n+=1}var n=0,h=t,o=g(h),l={newElement:a,release:r};return l}}(),de=function(){function t(t){return t.concat(g(t.length))}return{"double":t}}(),ce=function(){function t(){return Qt("float32",2)}return me(8,t)}(),ue=function(){function t(){return new P}function e(t){var e,s=t._length;for(e=0;e<s;e+=1)ce.release(t.v[e]),ce.release(t.i[e]),ce.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}function s(t){var e,s=i.newElement(),a=void 0===t._length?t.v.length:t._length;s.setLength(a),s.c=t.c;for(e=0;e<a;e+=1)s.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return s}var i=me(4,t,e);return i.clone=s,i}(),ge=function(){function t(){var t;return i?(i-=1,t=r[i]):t=new w,t}function e(t){var e,s=t._length;for(e=0;e<s;e+=1)ue.release(t.shapes[e]);t._length=0,i===a&&(r=de["double"](r),a=2*a),r[i]=t,i+=1}var s={newShapeCollection:t,release:e},i=0,a=4,r=g(a);return s}(),ve=function(){function t(){return{lengths:[],totalLength:0}}function e(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)ye.release(t.lengths[e]);t.lengths.length=0}return me(8,t,e)}(),ye=function(){function t(){return{addedLength:0,percents:Qt("float32",Jt),lengths:Qt("float32",Jt)}}return me(8,t)}();z.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e--)this.elements[e]||(s=this.layers[e],s.ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},z.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t)}return this.createNull(t)},z.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},z.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},z.prototype.includeLayers=function(t){this.completeLayers=!1;var e,s,i=t.length,a=this.layers.length;for(e=0;e<i;e+=1)for(s=0;s<a;){if(this.layers[s].id==t[e].id){this.layers[s]=t[e];break}s+=1}},z.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},z.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},z.prototype.buildElementParenting=function(t,e,s){for(var i=this.elements,a=this.layers,r=0,n=a.length;r<n;)a[r].ind==e&&(i[r]&&i[r]!==!0?(s.push(i[r]),i[r].setAsParent(),void 0!==a[r].parent?this.buildElementParenting(t,a[r].parent,s):t.setHierarchy(s)):(this.buildItem(r),this.addPendingElement(t))),r+=1},z.prototype.addPendingElement=function(t){this.pendingElements.push(t)},z.prototype.searchExtraCompositions=function(t){var e,s=t.length;for(e=0;e<s;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},b([z],N),N.prototype.createNull=function(t){return new $(t,this.globalData,this)},N.prototype.createShape=function(t){return new ot(t,this.globalData,this)},N.prototype.createText=function(t){return new ht(t,this.globalData,this)},N.prototype.createImage=function(t){return new at(t,this.globalData,this)},N.prototype.createComp=function(t){return new nt(t,this.globalData,this)},N.prototype.createSolid=function(t){return new rt(t,this.globalData,this)},N.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%"),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.nm=t.nm,this.globalData.compSize.w=t.w,this.globalData.compSize.h=t.h,this.globalData.frameRate=t.fr,this.data=t;var s=v("clipPath"),i=v("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+l(10);s.setAttribute("id",a),s.appendChild(i),this.layerElement.setAttribute("clip-path","url("+Ot+"#"+a+")"),e.appendChild(s),this.layers=t.layers,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.elements=g(t.layers.length)},N.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},N.prototype.updateContainerSize=function(){},N.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){e[t]=!0;var s=this.createItem(this.layers[t]);e[t]=s,Rt&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(s),s.initExpressions()),this.appendElementInPos(s,t),this.layers[t].tt&&(this.elements[t-1]&&this.elements[t-1]!==!0?s.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(s)))}},N.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,s=this.elements.length;e<s;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},N.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var e,s=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=s-1;e>=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<s;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},N.prototype.appendElementInPos=function(t,e){var s=t.getBaseElement();if(s){for(var i,a=0;a<e;)this.elements[a]&&this.elements[a]!==!0&&this.elements[a].getBaseElement()&&(i=this.elements[a].getBaseElement()),a+=1;i?this.layerElement.insertBefore(s,i):this.layerElement.appendChild(s)}},N.prototype.hide=function(){this.layerElement.style.display="none"},N.prototype.show=function(){this.layerElement.style.display="block"},R.prototype.getMaskProperty=function(t){return this.viewData[t].prop},R.prototype.renderFrame=function(t){var e,s=this.masksProperties.length;for(e=0;e<s;e++)if((this.viewData[e].prop._mdf||this._isFirstFrame)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||this._isFirstFrame)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||this._isFirstFrame)&&(this.viewData[e].invRect.setAttribute("x",-t.props[12]),this.viewData[e].invRect.setAttribute("y",-t.props[13])),this.storedData[e].x&&(this.storedData[e].x._mdf||this._isFirstFrame))){var i=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+Ot+"#"+this.storedData[e].filterId+")")),i.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}this._isFirstFrame=!1},R.prototype.getMaskelement=function(){return this.maskElement},R.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},R.prototype.drawPath=function(t,e,s){var i,a,r=" M"+e.v[0][0]+","+e.v[0][1];for(a=e._length,i=1;i<a;i+=1)r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&a>1&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},R.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},V.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},B.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var s,i=this.dynamicProperties.length;for(s=0;s<i;s+=1)(e||this._isParent&&"transform"===this.dynamicProperties[s].propType)&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))}},O.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?re.getTransformProperty(this,this.data.ks,this.dynamicProperties):{o:0},_matMdf:!1,_opMdf:!1,mat:new $t},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),11!==this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,s=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<i;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),s=0;s<i;s+=1)t=this.hierarchy[s].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var s=!0,i=this.comp;s;)i.finalTransform?(i.data.hasMask&&e.splice(0,0,i.finalTransform),i=i.comp):s=!1;var a,r,n=e.length;for(a=0;a<n;a+=1)r=e[a].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new $t},G.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){this.maskManager.renderFrame(this.finalTransform.mat),this.renderableEffectsManager.renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},function(){var t={initElement:function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.layerElement.style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||(this.layerElement.style.display="block"),this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};b([G,_(t)],j)}(),H.prototype.reset=function(){this.d="",this._mdf=!1},U.prototype.initGradientData=function(t,e,s,i){this.o=ae.getProp(t,e.o,0,.01,s),this.s=ae.getProp(t,e.s,1,null,s),this.e=ae.getProp(t,e.e,1,null,s),this.h=ae.getProp(t,e.h||{k:0},0,.01,s),this.a=ae.getProp(t,e.a||{k:0},0,Ut,s),this.g=new S(t,e.g,s),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i)},U.prototype.setGradientData=function(t,e){var s="gr_"+l(10),i=v(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",s),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var a,r,n,h=[];for(n=4*e.g.p,r=0;r<n;r+=4)a=v("stop"),
+i.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url(#"+s+")"),this.gf=i,this.cst=h},U.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var s,i,a,r=v("mask"),n=v("path");r.appendChild(n);var h="op_"+l(10),o="mk_"+l(10);r.setAttribute("id",o);var p=v(1===t.t?"linearGradient":"radialGradient");p.setAttribute("id",h),p.setAttribute("spreadMethod","pad"),p.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var f=this.stops;for(i=4*t.g.p;i<a;i+=2)s=v("stop"),s.setAttribute("stop-color","rgb(255,255,255)"),p.appendChild(s),f.push(s);n.setAttribute("gf"===t.ty?"fill":"stroke","url(#"+h+")"),this.of=p,this.ms=r,this.ost=f,this.maskId=o,e.msElem=n}},Z.prototype.initGradientData=U.prototype.initGradientData,Z.prototype.setGradientData=U.prototype.setGradientData,Z.prototype.setGradientOpacity=U.prototype.setGradientOpacity,Q.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},Q.prototype.initExpressions=function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},Q.prototype.blendModeEnums={1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},Q.prototype.getBlendMode=function(){return this.blendModeEnums[this.data.bm]||""},Q.prototype.setBlendMode=function(){var t=this.getBlendMode(),e=this.baseElement||this.layerElement;e.style["mix-blend-mode"]=t},Q.prototype.initBaseData=function(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId="ly_"+l(10),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},Q.prototype.getType=function(){return this.type},$.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},$.prototype.renderFrame=function(){},$.prototype.getBaseElement=function(){return null},$.prototype.destroy=function(){},$.prototype.sourceRectAtTime=function(){},$.prototype.hide=function(){},b([Q,O,V,B],$),tt.prototype={initRendererElement:function(){this.layerElement=v("g")},createContainerElements:function(){this.matteElement=v("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,s,i=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=v("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),i=a,this.globalData.defs.appendChild(a),le.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=l(10),e=pe.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(pe.createAlphaToLuminanceFilter()),s=v("g"),s.appendChild(this.layerElement),i=s,a.appendChild(s),s.setAttribute("filter","url("+Ot+"#"+t+")"))}else if(2==this.data.td){var r=v("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type","alpha");var n=v("g");r.appendChild(n),t=l(10),e=pe.createFilter(t);var h=v("feColorMatrix");h.setAttribute("type","matrix"),h.setAttribute("color-interpolation-filters","sRGB"),h.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1"),e.appendChild(h),this.globalData.defs.appendChild(e);var o=v("rect");o.setAttribute("width",this.comp.data.w),o.setAttribute("height",this.comp.data.h),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("fill","#ffffff"),o.setAttribute("opacity","0"),n.setAttribute("filter","url("+Ot+"#"+t+")"),n.appendChild(o),n.appendChild(this.layerElement),i=n,le.maskType||(r.setAttribute("mask-type","luminance"),e.appendChild(pe.createAlphaToLuminanceFilter()),s=v("g"),n.appendChild(o),s.appendChild(this.layerElement),i=s,n.appendChild(s)),this.globalData.defs.appendChild(r)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),i=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)),0===this.data.ty&&!this.data.hd){var p=v("clipPath"),f=v("path");f.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m="cp_"+l(8);if(p.setAttribute("id",m),p.appendChild(f),this.globalData.defs.appendChild(p),this.checkMasks()){var d=v("g");d.setAttribute("clip-path","url("+Ot+"#"+m+")"),d.appendChild(this.layerElement),this.transformedElement=d,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+Ot+"#"+m+")")}0!==this.data.bm&&this.setBlendMode(),this.renderableEffectsManager=new gt(this)},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},addMasks:function(){this.maskManager=new R(this.data,this,this.globalData,this.dynamicProperties)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+Ot+"#"+t+")")}},et.prototype={addShapeToModifiers:function(t){var e,s=this.shapeModifiers.length;for(e=0;e<s;e+=1)this.shapeModifiers[e].addShape(t)},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].reset();for(e=this.shapeModifiers.length,t=e-1;t>=0;t-=1)this.shapeModifiers[t].processShapes(this._isFirstFrame)}},lcEnum:{1:"butt",2:"round",3:"square"},ljEnum:{1:"miter",2:"round",3:"butt"},searchProcessedElement:function(t){for(var e=0,s=this.processedElements.length;e<s;){if(this.processedElements[e].elem===t)return this.processedElements[e].pos;e+=1}return 0},addProcessedElement:function(t,e){for(var s=this.processedElements.length;s;)if(s-=1,this.processedElements[s].elem===t){this.processedElements[s].pos=e;break}0===s&&this.processedElements.push(new W(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},buildShapeString:function(t,e,s,i){var a,r="";for(a=1;a<e;a+=1)1===a&&(r+=" M"+i.applyToPointStringified(t.v[0][0],t.v[0][1])),r+=" C"+i.applyToPointStringified(t.o[a-1][0],t.o[a-1][1])+" "+i.applyToPointStringified(t.i[a][0],t.i[a][1])+" "+i.applyToPointStringified(t.v[a][0],t.v[a][1]);return 1===e&&(r+=" M"+i.applyToPointStringified(t.v[0][0],t.v[0][1])),s&&e&&(r+=" C"+i.applyToPointStringified(t.o[a-1][0],t.o[a-1][1])+" "+i.applyToPointStringified(t.i[0][0],t.i[0][1])+" "+i.applyToPointStringified(t.v[0][0],t.v[0][1]),r+="z"),r}},st.prototype.initElement=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textAnimator=new D(t.t,this.renderType,this),this.textProperty=new L(this,t.t,this.dynamicProperties),this.initTransform(t,e,s),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),this.createContent(),this.textAnimator.searchProperties(this.dynamicProperties)},st.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1)},st.prototype.createPathShape=function(t,e){var s,i,a=e.length,r="";for(s=0;s<a;s+=1)i=e[s].ks.k,r+=this.buildShapeString(i,i.i.length,!0,t);return r},st.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e),this.buildNewText(),this.renderInnerContent()},st.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t),this.buildNewText(),this.renderInnerContent()},st.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t),this.buildNewText(),this.renderInnerContent()},st.prototype.applyTextPropertiesToMatrix=function(t,e,s,i,a){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[s])/2,0,0)}e.translate(i,a,0)},st.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},st.prototype.buildShapeString=et.prototype.buildShapeString,st.prototype.emptyProp=new I,st.prototype.destroy=function(){},b([Q,O,V,B,j],it),it.prototype.initElement=function(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(t,e,s),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.addMasks(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},it.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var s,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),s=0;s<i;s+=1)(this.completeLayers||this.elements[s])&&(this.elements[s].prepareFrame(this.renderedFrame-this.layers[s].st),this.elements[s]._mdf&&(this._mdf=!0))}},it.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},it.prototype.setElements=function(t){this.elements=t},it.prototype.getElements=function(){return this.elements},it.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},it.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},b([Q,O,tt,V,B,j],at),at.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=v("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio","xMidYMid slice"),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},b([at],rt),rt.prototype.createContent=function(){var t=v("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},b([N,it,tt],nt),b([Q,O,tt,V,B,j,st],ht),ht.prototype.createContent=function(){this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=v("text"))},ht.prototype.buildNewText=function(){var t,e,s=this.textProperty.currentData;this.renderedLetters=g(s?s.l.length:0),s.fc?this.layerElement.setAttribute("fill",this.buildColor(s.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(s.sc)),this.layerElement.setAttribute("stroke-width",s.sw)),this.layerElement.setAttribute("font-size",s.finalSize);var i=this.globalData.fontManager.getFontByName(s.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var a=s.fWeight,r=s.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",a)}var n=s.l||[],h=this.globalData.fontManager.chars;if(e=n.length){var o,l,p=this.mHelper,f="",m=this.data.singleShape,d=0,c=0,u=!0,y=s.tr/1e3*s.finalSize;if(!m||h||s.sz){var b,_,k=this.textSpans.length;for(t=0;t<e;t+=1)h&&m&&0!==t||(o=k>t?this.textSpans[t]:v(h?"path":"text"),k<=t&&(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=o,this.layerElement.appendChild(o)),o.style.display="inherit"),p.reset(),p.scale(s.finalSize/100,s.finalSize/100),m&&(n[t].n&&(d=-y,c+=s.yOffset,c+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(s,p,n[t].line,d,c),d+=n[t].l||0,d+=y),h?(_=this.globalData.fontManager.getCharData(s.finalText.charAt(t),i.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily),b=_&&_.data||{},l=b.shapes?b.shapes[0].it:[],m?f+=this.createPathShape(p,l):o.setAttribute("d",this.createPathShape(p,l))):(m&&o.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),o.textContent=n[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));m&&o.setAttribute("d",f)}else{var A=this.textContainer,P="start";switch(s.j){case 1:P="end";break;case 2:P="middle"}A.setAttribute("text-anchor",P),A.setAttribute("letter-spacing",y);var M=s.finalText.split(String.fromCharCode(13));for(e=M.length,c=s.ps?s.ps[1]+s.ascent:0,t=0;t<e;t+=1)o=this.textSpans[t]||v("tspan"),o.textContent=M[t],o.setAttribute("x",0),o.setAttribute("y",c),o.style.display="inherit",A.appendChild(o),this.textSpans[t]=o,c+=s.finalLineHeight;this.layerElement.appendChild(A)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0}},ht.prototype.sourceRectAtTime=function(t){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},ht.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,s=this.textAnimator.renderedLetters,i=this.textProperty.currentData.l;e=i.length;var a,r;for(t=0;t<e;t+=1)i[t].n||(a=s[t],r=this.textSpans[t],a._mdf.m&&r.setAttribute("transform",a.m),a._mdf.o&&r.setAttribute("opacity",a.o),a._mdf.sw&&r.setAttribute("stroke-width",a.sw),a._mdf.sc&&r.setAttribute("stroke",a.sc),a._mdf.fc&&r.setAttribute("fill",a.fc))}},b([Q,O,tt,et,V,B,j],ot),ot.prototype.initSecondaryElement=function(){},ot.prototype.identityMatrix=new $t,ot.prototype.buildExpressionInterface=function(){},ot.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0)},ot.prototype.createStyleElement=function(t,e,s){var i,a=new H(t,e),r=a.pElem;if("st"===t.ty)i=new Y(this,t,s,a);else if("fl"===t.ty)i=new J(this,t,s,a);else if("gf"===t.ty||"gs"===t.ty){var n="gf"===t.ty?U:Z;i=new n(this,t,s,a),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),r.setAttribute("mask","url(#"+i.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(r.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),r.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),r.setAttribute("fill-opacity","0"),1===t.lj&&r.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&r.setAttribute("id",t.ln),t.cl&&r.setAttribute("class",t.cl),this.stylesList.push(a),i},ot.prototype.createGroupElement=function(t){var e=new K;return t.ln&&e.gr.setAttribute("id",t.ln),e},ot.prototype.createTransformElement=function(t,e){return new q(re.getTransformProperty(this,t,e),ae.getProp(this,t.o,0,.01,e))},ot.prototype.createShapeElement=function(t,e,s,i){var a=4;"rc"===t.ty?a=5:"el"===t.ty?a=6:"sr"===t.ty&&(a=7);var r=ne.getShapeProp(this,t,a,i),n=new X(e,s,r);return this.shapes.push(n.sh),this.addShapeToModifiers(n),n},ot.prototype.setElementStyles=function(t){var e,s=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||s.push(this.stylesList[e])},ot.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},ot.prototype.searchShapes=function(t,e,s,i,a,r,n,h){var o,l,p,f,m,d,c=[].concat(n),u=t.length-1,g=[],v=[];for(o=u;o>=0;o-=1){if(d=this.searchProcessedElement(t[o]),d?e[o]=s[d-1]:t[o]._render=h,"fl"==t[o].ty||"st"==t[o].ty||"gf"==t[o].ty||"gs"==t[o].ty)d?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],r,a),t[o]._render&&i.appendChild(e[o].style.pElem),g.push(e[o].style);else if("gr"==t[o].ty){if(d)for(p=e[o].it.length,l=0;l<p;l+=1)e[o].prevViewData[l]=e[o].it[l];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,a,r+1,c,h),t[o]._render&&i.appendChild(e[o].gr)}else"tr"==t[o].ty?(d||(e[o]=this.createTransformElement(t[o],a)),f=e[o].transform,c.push(f)):"sh"==t[o].ty||"rc"==t[o].ty||"el"==t[o].ty||"sr"==t[o].ty?(d||(e[o]=this.createShapeElement(t[o],c,r,a)),this.setElementStyles(e[o])):"tm"==t[o].ty||"rd"==t[o].ty||"ms"==t[o].ty?(d?(m=e[o],m.closed=!1):(m=he.getModifier(t[o].ty),m.init(this,t[o],a),e[o]=m,this.shapeModifiers.push(m)),v.push(m)):"rp"==t[o].ty&&(d?(m=e[o],m.closed=!0):(m=he.getModifier(t[o].ty),e[o]=m,m.init(this,t,o,e,a),this.shapeModifiers.push(m),h=!1),v.push(m));this.addProcessedElement(t[o],o+1)}for(u=g.length,o=0;o<u;o+=1)g[o].closed=!0;for(u=v.length,o=0;o<u;o+=1)v[o].closed=!0},ot.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(this.shapesData,this.itemsData,this.layerElement),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},ot.prototype.renderShape=function(t,e,s){var i,a,r=t.length-1;for(i=0;i<=r;i+=1)a=t[i].ty,"tr"==a?((this._isFirstFrame||e[i].transform.op._mdf)&&s.setAttribute("opacity",e[i].transform.op.v),(this._isFirstFrame||e[i].transform.mProps._mdf)&&s.setAttribute("transform",e[i].transform.mProps.v.to2dCSS())):!t[i]._render||"sh"!=a&&"el"!=a&&"rc"!=a&&"sr"!=a?"fl"==a?this.renderFill(t[i],e[i]):"gf"==a?this.renderGradient(t[i],e[i]):"gs"==a?(this.renderGradient(t[i],e[i]),this.renderStroke(t[i],e[i])):"st"==a?this.renderStroke(t[i],e[i]):"gr"==a&&this.renderShape(t[i].it,e[i].it,e[i].gr):this.renderPath(e[i])},ot.prototype.renderPath=function(t){var e,s,i,a,r,n,h,o,l,p,f,m=t.styles.length,d=t.lvl;for(n=0;n<m;n+=1){if(a=t.sh._mdf||this._isFirstFrame,t.styles[n].lvl<d)for(o=this.mHelper.reset(),p=d-t.styles[n].lvl,f=t.transformers.length-1;p>0;)a=t.transformers[f].mProps._mdf||a,l=t.transformers[f].mProps.v.props,o.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15]),p--,f--;else o=this.identityMatrix;if(h=t.sh.paths,s=h._length,a){for(i="",e=0;e<s;e+=1)r=h.shapes[e],r&&r._length&&(i+=this.buildShapeString(r,r._length,r.c,o));t.caches[n]=i}else i=t.caches[n];t.styles[n].d+=i,t.styles[n]._mdf=a||t.styles[n]._mdf}},ot.prototype.renderFill=function(t,e){var s=e.style;(e.c._mdf||this._isFirstFrame)&&s.pElem.setAttribute("fill","rgb("+Xt(e.c.v[0])+","+Xt(e.c.v[1])+","+Xt(e.c.v[2])+")"),(e.o._mdf||this._isFirstFrame)&&s.pElem.setAttribute("fill-opacity",e.o.v)},ot.prototype.renderGradient=function(t,e){var s=e.gf,i=e.g._hasOpacity,a=e.s.v,r=e.e.v;if(e.o._mdf||this._isFirstFrame){var n="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(n,e.o.v)}if(e.s._mdf||this._isFirstFrame){var h=1===t.t?"x1":"cx",o="x1"===h?"y1":"cy";s.setAttribute(h,a[0]),s.setAttribute(o,a[1]),i&&!e.g._collapsable&&(e.of.setAttribute(h,a[0]),e.of.setAttribute(o,a[1]))}var l,p,f,m;if(e.g._cmdf||this._isFirstFrame){l=e.cst;var d=e.g.c;for(f=l.length,p=0;p<f;p+=1)m=l[p],m.setAttribute("offset",d[4*p]+"%"),m.setAttribute("stop-color","rgb("+d[4*p+1]+","+d[4*p+2]+","+d[4*p+3]+")")}if(i&&(e.g._omdf||this._isFirstFrame)){var c=e.g.o;for(l=e.g._collapsable?e.cst:e.ost,f=l.length,p=0;p<f;p+=1)m=l[p],e.g._collapsable||m.setAttribute("offset",c[2*p]+"%"),m.setAttribute("stop-opacity",c[2*p+1])}if(1===t.t)(e.e._mdf||this._isFirstFrame)&&(s.setAttribute("x2",r[0]),s.setAttribute("y2",r[1]),i&&!e.g._collapsable&&(e.of.setAttribute("x2",r[0]),e.of.setAttribute("y2",r[1])));else{var u;if((e.s._mdf||e.e._mdf||this._isFirstFrame)&&(u=Math.sqrt(Math.pow(a[0]-r[0],2)+Math.pow(a[1]-r[1],2)),s.setAttribute("r",u),i&&!e.g._collapsable&&e.of.setAttribute("r",u)),e.e._mdf||e.h._mdf||e.a._mdf||this._isFirstFrame){u||(u=Math.sqrt(Math.pow(a[0]-r[0],2)+Math.pow(a[1]-r[1],2)));var g=Math.atan2(r[1]-a[1],r[0]-a[0]),v=e.h.v>=1?.99:e.h.v<=-1?-.99:e.h.v,y=u*v,b=Math.cos(g+e.a.v)*y+a[0],_=Math.sin(g+e.a.v)*y+a[1];s.setAttribute("fx",b),s.setAttribute("fy",_),i&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",_))}}},ot.prototype.renderStroke=function(t,e){var s=e.style,i=e.d;i&&(i._mdf||this._isFirstFrame)&&(s.pElem.setAttribute("stroke-dasharray",i.dashStr),s.pElem.setAttribute("stroke-dashoffset",i.dashoffset[0])),e.c&&(e.c._mdf||this._isFirstFrame)&&s.pElem.setAttribute("stroke","rgb("+Xt(e.c.v[0])+","+Xt(e.c.v[1])+","+Xt(e.c.v[2])+")"),(e.o._mdf||this._isFirstFrame)&&s.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||this._isFirstFrame)&&(s.pElem.setAttribute("stroke-width",e.w.v),s.msElem&&s.msElem.setAttribute("stroke-width",e.w.v))},ot.prototype.destroy=function(){this.destroyBaseElement(),this.shapeData=null,this.itemsData=null},lt.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",s[0]-e[0]+" 0 0 0 "+e[0]+" "+(s[1]-e[1])+" 0 0 0 "+e[1]+" "+(s[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},pt.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,s=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},ft.prototype.initialize=function(){var t,e,s,i,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,s=0):(s=this.filterManager.effectElements[0].p.v-1,i=s+1),e=v("g"),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1),s;s<i;s+=1)t=v("path"),e.appendChild(t),this.paths.push({p:t,m:s});if(3===this.filterManager.effectElements[10].p.v){var r=v("mask"),n="stms_"+l(10);r.setAttribute("id",n),r.setAttribute("mask-type","alpha"),r.appendChild(e),this.elem.globalData.defs.appendChild(r);var h=v("g");h.setAttribute("mask","url("+Ot+"#"+n+")"),a[0]&&h.appendChild(a[0]),this.elem.layerElement.appendChild(h),this.masker=r,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},ft.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,s,i,a=this.paths.length;for(e=0;e<a;e+=1)if(s=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||s.prop._mdf)&&i.setAttribute("d",s.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||s.prop._mdf){var r;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,h=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,o=i.getTotalLength();r="0 0 0 "+o*n+" ";var l,p=o*(h-n),f=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100,m=Math.floor(p/f);for(l=0;l<m;l+=1)r+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100+" ";r+="0 "+10*o+" 0 0"}else r="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100;i.setAttribute("stroke-dasharray",r)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var d=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+Xt(255*d[0])+","+Xt(255*d[1])+","+Xt(255*d[2])+")")}},mt.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,a=i[0]+" "+s[0]+" "+e[0],r=i[1]+" "+s[1]+" "+e[1],n=i[2]+" "+s[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",r),this.feFuncB.setAttribute("tableValues",n)}},dt.prototype.createFeFunc=function(t,e){var s=v(t);return s.setAttribute("type","table"),e.appendChild(s),s},dt.prototype.getTableValue=function(t,e,s,i,a){for(var r,n,h=0,o=256,l=Math.min(t,e),p=Math.max(t,e),f=Array.call(null,{length:o}),m=0,d=a-i,c=e-t;h<=256;)r=h/256,n=r<=l?c<0?a:i:r>=p?c<0?i:a:i+d*Math.pow((r-t)/c,1/s),f[m++]=n,h+=256/(o-1);return f.join(" ")},dt.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,s=this.filterManager.effectElements;this.feFuncRComposed&&(t||s[3].p._mdf||s[4].p._mdf||s[5].p._mdf||s[6].p._mdf||s[7].p._mdf)&&(e=this.getTableValue(s[3].p.v,s[4].p.v,s[5].p.v,s[6].p.v,s[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||s[10].p._mdf||s[11].p._mdf||s[12].p._mdf||s[13].p._mdf||s[14].p._mdf)&&(e=this.getTableValue(s[10].p.v,s[11].p.v,s[12].p.v,s[13].p.v,s[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||s[17].p._mdf||s[18].p._mdf||s[19].p._mdf||s[20].p._mdf||s[21].p._mdf)&&(e=this.getTableValue(s[17].p.v,s[18].p.v,s[19].p.v,s[20].p.v,s[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||s[24].p._mdf||s[25].p._mdf||s[26].p._mdf||s[27].p._mdf||s[28].p._mdf)&&(e=this.getTableValue(s[24].p.v,s[25].p.v,s[26].p.v,s[27].p.v,s[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||s[31].p._mdf||s[32].p._mdf||s[33].p._mdf||s[34].p._mdf||s[35].p._mdf)&&(e=this.getTableValue(s[31].p.v,s[32].p.v,s[33].p.v,s[34].p.v,s[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},ct.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",Kt(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var s=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*Ut,a=s*Math.cos(i),r=s*Math.sin(i);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",r)}}};var be=[],_e=0;ut.prototype.findSymbol=function(t){for(var e=0,s=be.length;e<s;){if(be[e]===t)return be[e];e+=1}return null},ut.prototype.replaceInParent=function(t,e){var s=t.layerElement.parentNode;if(s){for(var i=s.children,a=0,r=i.length;a<r&&i[a]!==t.layerElement;)a+=1;var n;a<=r-2&&(n=i[a+1]);var h=v("use");h.setAttribute("href","#"+e),n?s.insertBefore(h,n):s.appendChild(h)}},ut.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var s="matte_"+l(5)+"_"+_e++,i=v("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),be.push(e);var a=t.globalData.defs;a.appendChild(i);var r=v("symbol");r.setAttribute("id",s),this.replaceInParent(e,s),r.appendChild(e.layerElement),a.appendChild(r),useElem=v("use"),useElem.setAttribute("href","#"+s),i.appendChild(useElem),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},ut.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=0,s=this.elem.comp.elements.length;e<s;)this.elem.comp.elements[e].data.ind===t&&this.setElementAsMask(this.elem,this.elem.comp.elements[e]),e+=1;this.initialized=!0},ut.prototype.renderFrame=function(){this.initialized||this.initialize()},gt.prototype.renderFrame=function(t){var e,s=this.filters.length;for(e=0;e<s;e+=1)this.filters[e].renderFrame(t)};var ke=function(){function e(t){for(var e=0,s=t.target;e<M;)A[e].animation===s&&(A.splice(e,1),e-=1,M-=1,s.isPaused||a()),e+=1}function s(t,e){if(!t)return null;for(var s=0;s<M;){if(A[s].elem==t&&null!==A[s].elem)return A[s].animation;s+=1}var i=new Ae;return r(i,t),i.setData(t,e),i}function i(){E+=1,_()}function a(){E-=1,0===E&&(F=!0)}function r(t,s){t.addEventListener("destroy",e),t.addEventListener("_active",i),t.addEventListener("_idle",a),A.push({elem:s,animation:t}),M+=1}function n(t){var e=new Ae;return r(e,null),e.setParams(t),e}function h(t,e){var s;for(s=0;s<M;s+=1)A[s].animation.setSpeed(t,e)}function o(t,e){var s;for(s=0;s<M;s+=1)A[s].animation.setDirection(t,e)}function l(t){var e;for(e=0;e<M;e+=1)A[e].animation.play(t)}function p(e){var s,i=e-P;for(s=0;s<M;s+=1)A[s].animation.advanceTime(i);P=e,F?x=!0:t.requestAnimationFrame(p)}function f(e){P=e,t.requestAnimationFrame(p)}function m(t){var e;for(e=0;e<M;e+=1)A[e].animation.pause(t)}function d(t,e,s){var i;for(i=0;i<M;i+=1)A[i].animation.goToAndStop(t,e,s)}function c(t){var e;for(e=0;e<M;e+=1)A[e].animation.stop(t)}function u(t){var e;for(e=0;e<M;e+=1)A[e].animation.togglePause(t)}function g(t){var e;for(e=M-1;e>=0;e-=1)A[e].animation.destroy(t)}function v(t,e,i){var a,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),n=r.length;for(a=0;a<n;a+=1)i&&r[a].setAttribute("data-bm-type",i),s(r[a],t);if(e&&0===n){i||(i="svg");var h=document.getElementsByTagName("body")[0];h.innerHTML="";var o=y("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",i),h.appendChild(o),
+s(o,t)}}function b(){var t;for(t=0;t<M;t+=1)A[t].animation.resize()}function _(){F&&(F=!1,x&&(t.requestAnimationFrame(f),x=!1))}var k={},A=[],P=0,M=0,F=!0,E=0,x=!0;return k.registerAnimation=s,k.loadAnimation=n,k.setSpeed=h,k.setDirection=o,k.play=l,k.pause=m,k.stop=c,k.togglePause=u,k.searchAnimations=v,k.resize=b,k.goToAndStop=d,k.destroy=g,k}(),Ae=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=l(10),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.subframeEnabled=jt,this.segments=[],this._idle=!0,this.projectInterface=e()};b([u],Ae),Ae.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new N(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}if(this.renderer.setProjectInterface(this.projectInterface),this.animType=s,""===t.loop||null===t.loop||(t.loop===!1?this.loop=!1:t.loop===!0?this.loop=!0:this.loop=parseInt(t.loop)),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;t.path.lastIndexOf("\\")!=-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.assetsPath=t.assetsPath,this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},Ae.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||("false"===a?s.loop=!1:"true"===a?s.loop=!0:s.loop=parseInt(a));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;s.autoplay="false"!==r,s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var n=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===n&&(s.prerender=!1),this.setParams(s)},Ae.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip),this.animationData.tf=this.totalFrames);var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;s<n;s+=1)for(e=0;e<a;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(a=t.assets.length,e=0;e<a;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,se.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),Rt&&Rt.initExpressions(this),this.renderer.renderFrame(-1),this.loadNextSegment()},Ae.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},Ae.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},Ae.prototype.configAnimation=function(t){var e=this;this.renderer&&this.renderer.destroyed||(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.renderer.searchExtraCompositions(t.assets),this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.imagePreloader=new oe,this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(t.assets,function(t){t||e.trigger("loaded_images")}),this.loadSegments(),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():(se.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded()))},Ae.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(se.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),Ae.prototype.addPendingElement=function(){this.pendingElements+=1},Ae.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},Ae.prototype.checkLoaded=function(){0===this.pendingElements&&(Rt&&Rt.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},Ae.prototype.resize=function(){this.renderer.updateContainerSize()},Ae.prototype.setSubframe=function(t){this.subframeEnabled=!!t},Ae.prototype.gotoFrame=function(){this.currentFrame=this.subframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},Ae.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},Ae.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},Ae.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"))},Ae.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?this.play():this.pause())},Ae.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.playCount=0,this.setCurrentRawFrameValue(0))},Ae.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},Ae.prototype.goToAndPlay=function(t,e,s){this.goToAndStop(t,e,s),this.play()},Ae.prototype.advanceTime=function(t){if(this.isPaused!==!0&&this.isLoaded!==!1){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames?this.checkSegments(e%this.totalFrames)||(this.loop&&++this.playCount!==this.loop?(this.setCurrentRawFrameValue(e%this.totalFrames),this.trigger("loopComplete")):(s=!0,e=this.totalFrames)):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(s=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},Ae.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},Ae.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,s!==-1&&this.goToAndStop(s,!0)},Ae.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&this.checkSegments(0),this.isPaused&&this.play()},Ae.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},Ae.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},Ae.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},Ae.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||(this.renderer.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},Ae.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},Ae.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},Ae.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},Ae.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},Ae.prototype.getPath=function(){return this.path},Ae.prototype.getAssetsPath=function(t){var e="";if(this.assetsPath){var s=t.p;s.indexOf("images/")!==-1&&(s=s.split("/")[1]),e=this.assetsPath+s}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},Ae.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t==this.assets[e].id)return this.assets[e];e+=1}},Ae.prototype.hide=function(){this.renderer.hide()},Ae.prototype.show=function(){this.renderer.show()},Ae.prototype.getAssets=function(){return this.assets},Ae.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new a(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new n(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new r(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new h(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new o(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new a(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new n(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new r(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new h(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new o(t,this))};var Pe={};Pe.play=yt,Pe.pause=bt,Pe.setLocationHref=vt,Pe.togglePause=_t,Pe.setSpeed=kt,Pe.setDirection=At,Pe.stop=Pt,Pe.searchAnimations=Mt,Pe.registerAnimation=Ft,Pe.loadAnimation=Ct,Pe.setSubframeRendering=wt,Pe.resize=Et,Pe.goToAndStop=xt,Pe.destroy=St,Pe.setQuality=Dt,Pe.inBrowser=Tt,Pe.installPlugin=It,Pe.__getFactory=Lt,Pe.version="5.1.0";var Me="__[STANDALONE]__",Fe="__[ANIMATIONDATA]__",Ee="";if(Me){var xe=document.getElementsByTagName("script"),we=xe.length-1,Ce=xe[we]||{src:""},Se=Ce.src.replace(/^[^\?]+\??/,"");Ee=Nt("renderer")}var De=setInterval(zt,100);return Pe});
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
index 509bd3e..fda1b1b 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -20,7 +20,7 @@
 var replace = require('gulp-replace');
 var batch_replace = require('gulp-batch-replace');
 
-var bm_version = '5.0.6';
+var bm_version = '5.1.0';
 
 var files = [
     {
diff --git a/package.json b/package.json
index 65af5a3..6cb642f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "lottie-web",
-  "version": "5.0.6",
+  "version": "5.1.0",
   "description": "After Effects plugin for exporting animations to SVG + JavaScript or canvas + JavaScript",
   "main": "./build/player/lottie.js",
   "repository": {