text: !function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).lottie_api=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";var Renderer=require("../renderer/Renderer"),layer_api=require("../helpers/layerAPIBuilder");module.exports=function(animation){var state={animation:animation,elements:animation.renderer.elements.map(function(item){return layer_api(item,animation)}),boundingRect:null,scaleData:null};function recalculateSize(container){container=animation.wrapper;state.boundingRect=container.getBoundingClientRect(),state.scaleData=function(boundingRect){var scale,xAlignment,yAlignment,compWidth=animation.animationData.w,compHeight=animation.animationData.h,compRel=compWidth/compHeight,elementWidth=boundingRect.width,elementHeight=boundingRect.height,elementRel=elementWidth/elementHeight,aspectRatio=animation.renderer.renderConfig.preserveAspectRatio.split(" ");return scale="meet"===aspectRatio[1]?compRel<elementRel?elementHeight/compHeight:elementWidth/compWidth:compRel<elementRel?elementWidth/compWidth:elementHeight/compHeight,xAlignment=aspectRatio[0].substr(0,4),{scaleYOffset:"YMin"===(yAlignment=aspectRatio[0].substr(4))?0:"YMid"===yAlignment?(elementHeight-compHeight*scale)/2:elementHeight-compHeight*scale,scaleXOffset:"xMin"===xAlignment?0:"xMid"===xAlignment?(elementWidth-compWidth*scale)/2:elementWidth-compWidth*scale,scale:scale}}(state.boundingRect)}var methods={recalculateSize:recalculateSize,getScaleData:function(){return state.scaleData},toContainerPoint:function(point){if(!animation.wrapper||!animation.wrapper.getBoundingClientRect)return point;state.boundingRect||recalculateSize();var boundingRect=state.boundingRect,newPoint=[point[0]-boundingRect.left,point[1]-boundingRect.top],scaleData=state.scaleData;return newPoint[0]=(newPoint[0]-scaleData.scaleXOffset)/scaleData.scale,newPoint[1]=(newPoint[1]-scaleData.scaleYOffset)/scaleData.scale,newPoint},fromContainerPoint:function(point){if(!animation.wrapper||!animation.wrapper.getBoundingClientRect)return point;state.boundingRect||recalculateSize();var newPoint,boundingRect=state.boundingRect,scaleData=state.scaleData;return newPoint=[(newPoint=[point[0]*scaleData.scale+scaleData.scaleXOffset,point[1]*scaleData.scale+scaleData.scaleYOffset])[0]+boundingRect.left,newPoint[1]+boundingRect.top]},getCurrentFrame:function(){return animation.currentFrame},getCurrentTime:function(){return animation.currentFrame/animation.frameRate},addValueCallback:function(properties,value){var i,len=properties.length;for(i=0;i<len;i+=1)properties.getPropertyAtIndex(i).setValue(value)},toKeypathLayerPoint:function(properties,point){var i,len=properties.length,points=[];for(i=0;i<len;i+=1)points.push(properties.getPropertyAtIndex(i).toKeypathLayerPoint(point));return 1===points.length?points[0]:points},fromKeypathLayerPoint:function(properties,point){var i,len=properties.length,points=[];for(i=0;i<len;i+=1)points.push(properties.getPropertyAtIndex(i).fromKeypathLayerPoint(point));return 1===points.length?points[0]:points}};return Object.assign({},Renderer(state),methods)}},{"../helpers/layerAPIBuilder":6,"../renderer/Renderer":42}],2:[function(require,module,exports){"use strict";module.exports=","},{}],3:[function(require,module,exports){"use strict";module.exports={0:0,1:1,2:2,3:3,4:4,5:5,13:13,comp:0,composition:0,solid:1,image:2,null:3,shape:4,text:5,camera:13}},{}],4:[function(require,module,exports){"use strict";module.exports={LAYER_TRANSFORM:"transform"}},{}],5:[function(require,module,exports){"use strict";var key_path_separator=require("../enums/key_path_separator"),sanitizeString=require("./stringSanitizer");module.exports=function(propertyPath){var keyPathSplit=propertyPath.split(key_path_separator),selector=keyPathSplit.shift();return{selector:sanitizeString(selector),propertyPath:keyPathSplit.join(key_path_separator)}}},{"../enums/key_path_separator":2,"./stringSanitizer":7}],6:[function(require,module,exports){"use strict";var TextElement=require("../layer/text/TextElement"),ShapeElement=require("../layer/shape/Shape"),NullElement=require("../layer/null_element/NullElement"),SolidElement=require("../layer/solid/SolidElement"),ImageElement=require("../layer/image/ImageElement"),CameraElement=require("../layer/camera/Camera"),LayerBase=require("../layer/LayerBase");module.exports=function(element,parent){var layerType=element.data.ty,Composition=require("../layer/composition/Composition");switch(layerType){case 0:return Composition(element,parent);case 1:return SolidElement(element,parent);case 2:return ImageElement(element,parent);case 3:return NullElement(element,parent);case 4:return ShapeElement(element,parent,element.data.shapes,element.itemsData);case 5:return TextElement(element,parent);case 13:return CameraElement(element,parent);default:return LayerBase(element,parent)}}},{"../layer/LayerBase":13,"../layer/camera/Camera":15,"../layer/composition/Composition":16,"../layer/image/ImageElement":20,"../layer/null_element/NullElement":21,"../layer/shape/Shape":22,"../layer/solid/SolidElement":35,"../layer/text/TextElement":38}],7:[function(require,module,exports){"use strict";module.exports=function(string){return string.trim()}},{}],8:[function(require,module,exports){"use strict";var _cos,_sin,_tan,_rnd,createTypedArray=require("./typedArrays"),Matrix=(_cos=Math.cos,_sin=Math.sin,_tan=Math.tan,_rnd=Math.round,function(){return new MatrixInstance});function reset(){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 rotate(angle){if(0===angle)return this;var mCos=_cos(angle),mSin=_sin(angle);return this._t(mCos,-mSin,0,0,mSin,mCos,0,0,0,0,1,0,0,0,0,1)}function rotateX(angle){if(0===angle)return this;var mCos=_cos(angle),mSin=_sin(angle);return this._t(1,0,0,0,0,mCos,-mSin,0,0,mSin,mCos,0,0,0,0,1)}function rotateY(angle){if(0===angle)return this;var mCos=_cos(angle),mSin=_sin(angle);return this._t(mCos,0,mSin,0,0,1,0,0,-mSin,0,mCos,0,0,0,0,1)}function rotateZ(angle){if(0===angle)return this;var mCos=_cos(angle),mSin=_sin(angle);return this._t(mCos,-mSin,0,0,mSin,mCos,0,0,0,0,1,0,0,0,0,1)}function shear(sx,sy){return this._t(1,sy,sx,1,0,0)}function skew(ax,ay){return this.shear(_tan(ax),_tan(ay))}function skewFromAxis(ax,angle){var mCos=_cos(angle),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)}function scale(sx,sy,sz){return sz=isNaN(sz)?1:sz,1==sx&&1==sy&&1==sz?this:this._t(sx,0,0,0,0,sy,0,0,0,0,sz,0,0,0,0,1)}function setTransform(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){return this.props[0]=a,this.props[1]=b,this.props[2]=c,this.props[3]=d,this.props[4]=e,this.props[5]=f,this.props[6]=g,this.props[7]=h,this.props[8]=i,this.props[9]=j,this.props[10]=k,this.props[11]=l,this.props[12]=m,this.props[13]=n,this.props[14]=o,this.props[15]=p,this}function translate(tx,ty,tz){return tz=tz||0,0!==tx||0!==ty||0!==tz?this._t(1,0,0,0,0,1,0,0,0,0,1,0,tx,ty,tz,1):this}function transform(a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2,m2,n2,o2,p2){var _p=this.props;if(1===a2&&0===b2&&0===c2&&0===d2&&0===e2&&1===f2&&0===g2&&0===h2&&0===i2&&0===j2&&1===k2&&0===l2)return _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=!1,this;var a1=_p[0],b1=_p[1],c1=_p[2],d1=_p[3],e1=_p[4],f1=_p[5],g1=_p[6],h1=_p[7],i1=_p[8],j1=_p[9],k1=_p[10],l1=_p[11],m1=_p[12],n1=_p[13],o1=_p[14],p1=_p[15];return _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,_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,_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,_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=!1,this}function isIdentity(){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 equals(matr){for(var i=0;i<16;){if(matr.props[i]!==this.props[i])return!1;i+=1}return!0}function clone(matr){var i;for(i=0;i<16;i+=1)matr.props[i]=this.props[i]}function cloneFromProps(props){var i;for(i=0;i<16;i+=1)this.props[i]=props[i]}function applyToPoint(x,y,z){return{x:x*this.props[0]+y*this.props[4]+z*this.props[8]+this.props[12],y:x*this.props[1]+y*this.props[5]+z*this.props[9]+this.props[13],z:x*this.props[2]+y*this.props[6]+z*this.props[10]+this.props[14]}}function applyToX(x,y,z){return x*this.props[0]+y*this.props[4]+z*this.props[8]+this.props[12]}function applyToY(x,y,z){return x*this.props[1]+y*this.props[5]+z*this.props[9]+this.props[13]}function applyToZ(x,y,z){return x*this.props[2]+y*this.props[6]+z*this.props[10]+this.props[14]}function inversePoint(pt){var determinant=this.props[0]*this.props[5]-this.props[1]*this.props[4],a=this.props[5]/determinant,b=-this.props[1]/determinant,c=-this.props[4]/determinant,d=this.props[0]/determinant,e=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/determinant,f=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/determinant;return[pt[0]*a+pt[1]*c+e,pt[0]*b+pt[1]*d+f,0]}function inversePoints(pts){var i,len=pts.length,retPts=[];for(i=0;i<len;i+=1)retPts[i]=inversePoint(pts[i]);return retPts}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 arr}function applyToPointArray(x,y,z){return this.isIdentity()?[x,y,z]:[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]]}function applyToPointStringified(x,y){return this.isIdentity()?x+","+y:x*this.props[0]+y*this.props[4]+this.props[12]+","+(x*this.props[1]+y*this.props[5]+this.props[13])}function toCSS(){for(var i=0,props=this.props,cssValue="matrix3d(";i<16;)cssValue+=_rnd(1e4*props[i])/1e4,cssValue+=15===i?")":",",i+=1;return cssValue}function to2dCSS(){var v=1e4,props=this.props;return"matrix("+_rnd(props[0]*v)/v+","+_rnd(props[1]*v)/v+","+_rnd(props[4]*v)/v+","+_rnd(props[5]*v)/v+","+_rnd(props[12]*v)/v+","+_rnd(props[13]*v)/v+")"}function MatrixInstance(){this.reset=reset,this.rotate=rotate,this.rotateX=rotateX,this.rotateY=rotateY,this.rotateZ=rotateZ,this.skew=skew,this.skewFromAxis=skewFromAxis,this.shear=shear,this.scale=scale,this.setTransform=setTransform,this.translate=translate,this.transform=transform,this.applyToPoint=applyToPoint,this.applyToX=applyToX,this.applyToY=applyToY,this.applyToZ=applyToZ,this.applyToPointArray=applyToPointArray,this.applyToTriplePoints=applyToTriplePoints,this.applyToPointStringified=applyToPointStringified,this.toCSS=toCSS,this.to2dCSS=to2dCSS,this.clone=clone,this.cloneFromProps=cloneFromProps,this.equals=equals,this.inversePoints=inversePoints,this.inversePoint=inversePoint,this._t=this.transform,this.isIdentity=isIdentity,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}module.exports=Matrix},{"./typedArrays":9}],9:[function(require,module,exports){"use strict";var createTypedArray="function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(type,len){return"float32"===type?new Float32Array(len):"int16"===type?new Int16Array(len):"uint8c"===type?new Uint8ClampedArray(len):void 0}:function(type,len){var value,i=0,arr=[];switch(type){case"int16":case"uint8c":value=1;break;default:value=1.1}for(i=0;i<len;i+=1)arr.push(value);return arr};module.exports=createTypedArray},{}],10:[function(require,module,exports){"use strict";var AnimationItem=require("./animation/AnimationItem");module.exports={createAnimationApi:function(anim){return Object.assign({},AnimationItem(anim))}}},{"./animation/AnimationItem":1}],11:[function(require,module,exports){"use strict";var keyPathBuilder=require("../helpers/keyPathBuilder"),layer_types=require("../enums/layer_types");module.exports=function KeyPathList(elements,node_type){function getLayersByType(selector){return KeyPathList(function(elements,type){return elements.filter(function(element){return element.getTargetLayer().data.ty===layer_types[type]})}(elements,selector),"layer")}var methods={getKeyPath:function(propertyPath){var nodesByName,nodesByType,selectedNodes,keyPathData=keyPathBuilder(propertyPath),selector=keyPathData.selector;return"renderer"===node_type||"layer"===node_type?(nodesByName=function(selector){return KeyPathList(function(elements,name){return elements.filter(function(element){return element.getTargetLayer().data.nm===name})}(elements,selector),"layer")}(selector),nodesByType=getLayersByType(selector),selectedNodes=0===nodesByName.length&&0===nodesByType.length?function(selector){return KeyPathList(function(elements,name){return elements.filter(function(element){return!!element.hasProperty(name)&&element.getProperty(name)})}(elements,selector).map(function(element){return element.getProperty(selector)}),"property")}(selector):nodesByName.concat(nodesByType),keyPathData.propertyPath?selectedNodes.getKeyPath(keyPathData.propertyPath):selectedNodes):"property"===node_type?(selectedNodes=function(selector){return KeyPathList(elements.filter(function(element){return element.hasProperty(selector)}).map(function(element){return element.getProperty(selector)}),"property")}(selector),keyPathData.propertyPath?selectedNodes.getKeyPath(keyPathData.propertyPath):selectedNodes):void 0},concat:function(nodes){var nodesElements=nodes.getElements();return KeyPathList(elements.concat(nodesElements),node_type)},getElements:function(){return elements},getPropertyAtIndex:function(index){return elements[index]}};return Object.defineProperty(methods,"length",{get:function(){return elements.length}}),methods}},{"../enums/layer_types":3,"../helpers/keyPathBuilder":5}],12:[function(require,module,exports){"use strict";require("../enums/key_path_separator"),require("../enums/property_names");module.exports=function(state){function getPropertyByPath(selector){for(var instanceProperties=state.properties||[],i=0,len=instanceProperties.length;i<len;){if(instanceProperties[i].name===selector)return instanceProperties[i].value;i+=1}return null}return{hasProperty:function(selector){return!!getPropertyByPath(selector)},getProperty:function(selector){return getPropertyByPath(selector)},fromKeypathLayerPoint:function(point){return state.parent.fromKeypathLayerPoint(point)},toKeypathLayerPoint:function(point){return state.parent.toKeypathLayerPoint(point)}}}},{"../enums/key_path_separator":2,"../enums/property_names":4}],13:[function(require,module,exports){"use strict";var KeyPathNode=require("../key_path/KeyPathNode"),Transform=require("./transform/Transform"),Effects=require("./effects/Effects"),Matrix=require("../helpers/transformationMatrix");module.exports=function(state){var transform=Transform(state.element.finalTransform.mProp,state),effects=Effects(state.element.effectsManager.effectElements||[],state),methods={getTargetLayer:function(){return state.element},toKeypathLayerPoint:function(point){var element=state.element;state.parent.toKeypathLayerPoint&&(point=state.parent.toKeypathLayerPoint(point));var toWorldMat=Matrix();if(state.getProperty("Transform").getTargetTransform().applyToMatrix(toWorldMat),element.hierarchy&&element.hierarchy.length){var i,len=element.hierarchy.length;for(i=0;i<len;i+=1)element.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat)}return toWorldMat.inversePoint(point)},fromKeypathLayerPoint:function(point){var element=state.element,toWorldMat=Matrix();if(state.getProperty("Transform").getTargetTransform().applyToMatrix(toWorldMat),element.hierarchy&&element.hierarchy.length){var i,len=element.hierarchy.length;for(i=0;i<len;i+=1)element.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat)}return point=toWorldMat.applyToPointArray(point[0],point[1],point[2]||0),state.parent.fromKeypathLayerPoint?state.parent.fromKeypathLayerPoint(point):point}};return state.properties.push({name:"transform",value:transform},{name:"Transform",value:transform},{name:"Effects",value:effects},{name:"effects",value:effects}),Object.assign(state,KeyPathNode(state),methods)}},{"../helpers/transformationMatrix":8,"../key_path/KeyPathNode":12,"./effects/Effects":19,"./transform/Transform":39}],14:[function(require,module,exports){"use strict";var layer_types=require("../enums/layer_types"),layer_api=require("../helpers/layerAPIBuilder");module.exports=function LayerList(elements){function addIteratableMethods(iteratableMethods){iteratableMethods.reduce(function(accumulator,value){var _value=value;return accumulator[value]=function(){var _arguments=arguments;return elements.map(function(element){var layer=layer_api(element);return layer[_value]?layer[_value].apply(null,_arguments):null})},accumulator},methods)}var methods={getLayers:function(){return LayerList(elements)},getLayersByType:function(type){return LayerList(function(elements,type){return elements.filter(function(element){return element.data.ty===layer_types[type]})}(elements,type))},getLayersByName:function(type){return LayerList(function(elements,name){return elements.filter(function(element){return element.data.nm===name})}(elements,type))},layer:function(index){return index>=elements.length?[]:layer_api(elements[parseInt(index)])},concat:function(list){return elements.concat(list.getTargetElements())},getTargetElements:function(){return elements}};return addIteratableMethods(["setTranslate","getType","getDuration"]),addIteratableMethods(["setText","getText","setDocumentData","canResizeFont","setMinimumFontSize"]),Object.defineProperty(methods,"length",{get:function(){return elements.length}}),methods}},{"../enums/layer_types":3,"../helpers/layerAPIBuilder":6}],15:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={element:element,parent:parent,properties:[{name:"Point of Interest",value:Property(element.a,parent)},{name:"Zoom",value:Property(element.pe,parent)},{name:"Position",value:Property(element.p,parent)},{name:"X Rotation",value:Property(element.rx,parent)},{name:"Y Rotation",value:Property(element.ry,parent)},{name:"Z Rotation",value:Property(element.rz,parent)},{name:"Orientation",value:Property(element.or,parent)}]},methods={getTargetLayer:function(){return state.element}};return Object.assign({},KeyPathNode(state),methods)}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],16:[function(require,module,exports){"use strict";var KeyPathList=require("../../key_path/KeyPathList"),LayerBase=require("../LayerBase"),layer_api=require("../../helpers/layerAPIBuilder"),TimeRemap=(require("../../property/Property"),require("./TimeRemap"));module.exports=function(element,parent){var compositionLayers,state={element:element,parent:parent,properties:(compositionLayers=element.layers.map(buildLayerApi),[{name:"Time Remap",value:TimeRemap(element.tm)}].concat(compositionLayers))};function buildLayerApi(layer,index){var _layerApi=null,ob={name:layer.nm};return Object.defineProperty(ob,"value",{get:function(){return _layerApi||(_layerApi=layer_api(element.elements[index],state)),_layerApi}}),ob}return Object.assign({},LayerBase(state),KeyPathList(state.elements,"layer"),{})}},{"../../helpers/layerAPIBuilder":6,"../../key_path/KeyPathList":11,"../../property/Property":40,"../LayerBase":13,"./TimeRemap":17}],17:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),ValueProperty=require("../../property/ValueProperty");module.exports=function(property,parent){var _destroyFunction,state={property:property,parent:parent},_isCallbackAdded=!1,currentSegmentInit=0,currentSegmentEnd=0,previousTime=0,currentTime=0,_loop=!0,_speed=1,_paused=!1,_isDebugging=!1,queuedSegments=[],enterFrameEvent={time:-1};function playSegment(init,end,clear){_paused=!1,clear&&(clearQueue(),currentTime=init),_isDebugging&&console.log(init,end),0,previousTime=Date.now(),currentSegmentInit=init,currentSegmentEnd=end,addCallback()}function playQueuedSegment(){var newSegment=queuedSegments.shift();playSegment(newSegment[0],newSegment[1])}function clearQueue(){queuedSegments.length=0}function _segmentPlayer(currentValue){if(currentSegmentInit===currentSegmentEnd)currentTime=currentSegmentInit;else if(!_paused){var nowTime=Date.now(),elapsedTime=_speed*(nowTime-previousTime)/1e3;previousTime=nowTime,currentSegmentInit<currentSegmentEnd?currentSegmentEnd<(currentTime+=elapsedTime)&&(1,queuedSegments.length?playQueuedSegment():_loop?currentTime%=currentSegmentEnd-currentSegmentInit:currentTime=currentSegmentEnd):(currentTime-=elapsedTime)<currentSegmentEnd&&(1,queuedSegments.length?playQueuedSegment():currentTime=_loop?currentSegmentInit-(currentSegmentEnd-currentTime):currentSegmentEnd),_isDebugging&&console.log(currentTime)}return instance.onEnterFrame&&enterFrameEvent.time!==currentTime&&(enterFrameEvent.time=currentTime,instance.onEnterFrame(enterFrameEvent)),currentTime}function addCallback(){_isCallbackAdded||(_isCallbackAdded=!0,_destroyFunction=instance.setValue(_segmentPlayer,_isDebugging))}var methods={playSegment:playSegment,playTo:function(end,clear){_paused=!1,clear&&clearQueue(),addCallback(),currentSegmentEnd=end},queueSegment:function(init,end){queuedSegments.push([init,end])},clearQueue:clearQueue,setLoop:function(flag){_loop=flag},setSpeed:function(value){_speed=value},pause:function(){_paused=!0},setDebugging:function(flag){_isDebugging=flag},getCurrentTime:function(){return _isCallbackAdded?currentTime:property.v/property.mult},onEnterFrame:null,destroy:function(){_destroyFunction&&(_destroyFunction(),state.property=null,state.parent=null)}},instance={};return Object.assign(instance,methods,ValueProperty(state),KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/ValueProperty":41}],18:[function(require,module,exports){"use strict";var Property=require("../../property/Property");module.exports=function(effect,parent){return Property(effect.p,parent)}},{"../../property/Property":40}],19:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");require("./EffectElement");module.exports=function Effects(effects,parent){var state={parent:parent,properties:function(){var i,effectData,index,nm,effectElement,len=effects.length,arr=[];for(i=0;i<len;i+=1)arr.push((effectData=effects[i],index=i,nm=effectData.data?effectData.data.nm:index.toString(),effectElement=effectData.data?Effects(effectData.effectElements,parent):Property(effectData.p,parent),{name:nm,value:effectElement}));return arr}()};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40,"./EffectElement":18}],20:[function(require,module,exports){"use strict";var LayerBase=require("../LayerBase");module.exports=function(element){return Object.assign({},LayerBase(element),{})}},{"../LayerBase":13}],21:[function(require,module,exports){"use strict";var LayerBase=require("../LayerBase");module.exports=function(element,parent){var state={element:element,parent:parent,properties:[]};return Object.assign({},LayerBase(state),{})}},{"../LayerBase":13}],22:[function(require,module,exports){"use strict";var LayerBase=require("../LayerBase"),ShapeContents=require("./ShapeContents");module.exports=function(element,parent){var state={properties:[],parent:parent,element:element},shapeContents=ShapeContents(element.data.shapes,element.itemsData,state);return state.properties.push({name:"Contents",value:shapeContents}),Object.assign(state,LayerBase(state),{})}},{"../LayerBase":13,"./ShapeContents":23}],23:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),ShapeRectangle=(require("../../property/Property"),require("./ShapeRectangle")),ShapeFill=require("./ShapeFill"),ShapeStroke=require("./ShapeStroke"),ShapeEllipse=require("./ShapeEllipse"),ShapeGradientFill=require("./ShapeGradientFill"),ShapeGradientStroke=require("./ShapeGradientStroke"),ShapeTrimPaths=require("./ShapeTrimPaths"),ShapeRepeater=require("./ShapeRepeater"),ShapePolystar=require("./ShapePolystar"),ShapeRoundCorners=require("./ShapeRoundCorners"),ShapePath=require("./ShapePath"),Transform=require("../transform/Transform"),Matrix=require("../../helpers/transformationMatrix");module.exports=function ShapeContents(shapesData,shapes,parent){var state={properties:shapesData.map(function(shape,index){return function(shape,index){var ob={name:shape.nm};return Object.defineProperty(ob,"value",{get:function(){return cachedShapeProperties[index]?cachedShapeProperties[index]:("gr"===shape.ty?property=ShapeContents(shapesData[index].it,shapes[index].it,state):"rc"===shape.ty?property=ShapeRectangle(shapes[index],state):"el"===shape.ty?property=ShapeEllipse(shapes[index],state):"fl"===shape.ty?property=ShapeFill(shapes[index],state):"st"===shape.ty?property=ShapeStroke(shapes[index],state):"gf"===shape.ty?property=ShapeGradientFill(shapes[index],state):"gs"===shape.ty?property=ShapeGradientStroke(shapes[index],state):"tm"===shape.ty?property=ShapeTrimPaths(shapes[index],state):"rp"===shape.ty?property=ShapeRepeater(shapes[index],state):"sr"===shape.ty?property=ShapePolystar(shapes[index],state):"rd"===shape.ty?property=ShapeRoundCorners(shapes[index],state):"sh"===shape.ty?property=ShapePath(shapes[index],state):"tr"===shape.ty?property=Transform(shapes[index].transform.mProps,state):console.log(shape.ty),cachedShapeProperties[index]=property);var property}}),ob}(shape,index)}),parent:parent},cachedShapeProperties=[];var methods={fromKeypathLayerPoint:function(point){if(state.hasProperty("Transform")){var toWorldMat=Matrix();state.getProperty("Transform").getTargetTransform().applyToMatrix(toWorldMat),point=toWorldMat.applyToPointArray(point[0],point[1],point[2]||0)}return state.parent.fromKeypathLayerPoint(point)},toKeypathLayerPoint:function(point){if(point=state.parent.toKeypathLayerPoint(point),state.hasProperty("Transform")){var toWorldMat=Matrix();state.getProperty("Transform").getTargetTransform().applyToMatrix(toWorldMat),point=toWorldMat.inversePoint(point)}return point}};return Object.assign(state,KeyPathNode(state),methods)}},{"../../helpers/transformationMatrix":8,"../../key_path/KeyPathNode":12,"../../property/Property":40,"../transform/Transform":39,"./ShapeEllipse":24,"./ShapeFill":25,"./ShapeGradientFill":26,"./ShapeGradientStroke":27,"./ShapePath":28,"./ShapePolystar":29,"./ShapeRectangle":30,"./ShapeRepeater":31,"./ShapeRoundCorners":32,"./ShapeStroke":33,"./ShapeTrimPaths":34}],24:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Size",value:Property(element.sh.s,parent)},{name:"Position",value:Property(element.sh.p,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],25:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Color",value:Property(element.c,parent)},{name:"Opacity",value:{setValue:Property(element.o,parent)}}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],26:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Start Point",value:Property(element.s,parent)},{name:"End Point",value:Property(element.s,parent)},{name:"Opacity",value:Property(element.o,parent)},{name:"Highlight Length",value:Property(element.h,parent)},{name:"Highlight Angle",value:Property(element.a,parent)},{name:"Colors",value:Property(element.g.prop,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],27:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Start Point",value:Property(element.s,parent)},{name:"End Point",value:Property(element.e,parent)},{name:"Opacity",value:Property(element.o,parent)},{name:"Highlight Length",value:Property(element.h,parent)},{name:"Highlight Angle",value:Property(element.a,parent)},{name:"Colors",value:Property(element.g.prop,parent)},{name:"Stroke Width",value:Property(element.w,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],28:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"path",value:Property(element.sh,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],29:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Points",value:Property(element.sh.pt,parent)},{name:"Position",value:Property(element.sh.p,parent)},{name:"Rotation",value:Property(element.sh.r,parent)},{name:"Inner Radius",value:Property(element.sh.ir,parent)},{name:"Outer Radius",value:Property(element.sh.or,parent)},{name:"Inner Roundness",value:Property(element.sh.is,parent)},{name:"Outer Roundness",value:Property(element.sh.os,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],30:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Size",value:Property(element.sh.s,parent)},{name:"Position",value:Property(element.sh.p,parent)},{name:"Roundness",value:Property(element.sh.r,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],31:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property"),Transform=require("../transform/Transform");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Copies",value:Property(element.c,parent)},{name:"Offset",value:Property(element.o,parent)},{name:"Transform",value:Transform(element.tr,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40,"../transform/Transform":39}],32:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Radius",value:Property(element.rd,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],33:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"color",value:Property(element.c,parent)},{name:"stroke width",value:Property(element.w,parent)},{name:"opacity",value:Property(element.o,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],34:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(element,parent){var state={parent:parent,properties:[{name:"Start",value:Property(element.s,parent)},{name:"End",value:Property(element.e,parent)},{name:"Offset",value:Property(element.o,parent)}]};return Object.assign({},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],35:[function(require,module,exports){"use strict";var LayerBase=require("../LayerBase");module.exports=function(element,parent){var state={element:element,parent:parent,properties:[]};return Object.assign({},LayerBase(state),{})}},{"../LayerBase":13}],36:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),TextAnimator=(require("../../property/Property"),require("./TextAnimator"));module.exports=function(element,parent){var state={element:element,parent:parent,properties:[{name:"Source",value:{setValue:function(_function){var previousValue;element.textProperty.addEffect(function(data){var newValue=_function(element.textProperty.currentData);return previousValue!==newValue?(previousValue=newValue,Object.assign({},data,newValue,{__complete:!1})):data})}}}].concat(function(){var i,textAnimator,animatorProperties=[],animators=element.textAnimator._animatorsData,len=animators.length;for(i=0;i<len;i+=1)textAnimator=TextAnimator(animators[i]),animatorProperties.push({name:element.textAnimator._textData.a[i].nm||"Animator "+(i+1),value:textAnimator});return animatorProperties}())};return Object.assign({},{},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40,"./TextAnimator":37}],37:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(animator){var state={properties:[{name:"Anchor Point",value:{setValue:setAnchorPoint}},{name:"Fill Brightness",value:{setValue:setFillBrightness}},{name:"Fill Color",value:{setValue:setFillColor}},{name:"Fill Hue",value:{setValue:setFillHue}},{name:"Fill Saturation",value:{setValue:setFillSaturation}},{name:"Fill Opacity",value:{setValue:setFillOpacity}},{name:"Opacity",value:{setValue:setOpacity}},{name:"Position",value:{setValue:setPosition}},{name:"Rotation X",value:{setValue:setRotationX}},{name:"Rotation Y",value:{setValue:setRotationY}},{name:"Scale",value:{setValue:setScale}},{name:"Skew Axis",value:{setValue:setSkewAxis}},{name:"Stroke Color",value:{setValue:setStrokeColor}},{name:"Skew",value:{setValue:setSkew}},{name:"Stroke Width",value:{setValue:setStrokeWidth}},{name:"Tracking Amount",value:{setValue:setTrackingAmount}},{name:"Stroke Opacity",value:{setValue:setStrokeOpacity}},{name:"Stroke Brightness",value:{setValue:setStrokeBrightness}},{name:"Stroke Saturation",value:{setValue:setStrokeSaturation}},{name:"Stroke Hue",value:{setValue:setStrokeHue}}]};function setAnchorPoint(value){Property(animator.a.a).setValue(value)}function setFillBrightness(value){Property(animator.a.fb).setValue(value)}function setFillColor(value){Property(animator.a.fc).setValue(value)}function setFillHue(value){Property(animator.a.fh).setValue(value)}function setFillSaturation(value){Property(animator.a.fs).setValue(value)}function setFillOpacity(value){Property(animator.a.fo).setValue(value)}function setOpacity(value){Property(animator.a.o).setValue(value)}function setPosition(value){Property(animator.a.p).setValue(value)}function setRotationX(value){Property(animator.a.rx).setValue(value)}function setRotationY(value){Property(animator.a.ry).setValue(value)}function setScale(value){Property(animator.a.s).setValue(value)}function setSkewAxis(value){Property(animator.a.sa).setValue(value)}function setStrokeColor(value){Property(animator.a.sc).setValue(value)}function setSkew(value){Property(animator.a.sk).setValue(value)}function setStrokeOpacity(value){Property(animator.a.so).setValue(value)}function setStrokeWidth(value){Property(animator.a.sw).setValue(value)}function setStrokeBrightness(value){Property(animator.a.sb).setValue(value)}function setStrokeHue(value){Property(animator.a.sh).setValue(value)}function setStrokeSaturation(value){Property(animator.a.ss).setValue(value)}function setTrackingAmount(value){Property(animator.a.t).setValue(value)}return Object.assign({},{},KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],38:[function(require,module,exports){"use strict";var LayerBase=require("../LayerBase"),Text=require("./Text");module.exports=function(element){var TextProperty=Text(element),state={element:element,properties:[{name:"text",value:TextProperty},{name:"Text",value:TextProperty}]};function setDocumentData(data,index){return element.updateDocumentData(data,index)}var methods={getText:function(){return element.textProperty.currentData.t},setText:function(value,index){setDocumentData({t:value},index)},canResizeFont:function(_canResize){return element.canResizeFont(_canResize)},setDocumentData:setDocumentData,setMinimumFontSize:function(_fontSize){return element.setMinimumFontSize(_fontSize)}};return Object.assign({},LayerBase(state),methods)}},{"../LayerBase":13,"./Text":36}],39:[function(require,module,exports){"use strict";var KeyPathNode=require("../../key_path/KeyPathNode"),Property=require("../../property/Property");module.exports=function(props,parent){var state={properties:[{name:"Anchor Point",value:Property(props.a,parent)},{name:"Point of Interest",value:Property(props.a,parent)},{name:"Position",value:Property(props.p,parent)},{name:"Scale",value:Property(props.s,parent)},{name:"Rotation",value:Property(props.r,parent)},{name:"X Position",value:Property(props.px,parent)},{name:"Y Position",value:Property(props.py,parent)},{name:"Z Position",value:Property(props.pz,parent)},{name:"X Rotation",value:Property(props.rx,parent)},{name:"Y Rotation",value:Property(props.ry,parent)},{name:"Z Rotation",value:Property(props.rz,parent)},{name:"Opacity",value:Property(props.o,parent)}]},methods={getTargetTransform:function(){return props}};return Object.assign(methods,KeyPathNode(state))}},{"../../key_path/KeyPathNode":12,"../../property/Property":40}],40:[function(require,module,exports){"use strict";var KeyPathNode=require("../key_path/KeyPathNode"),ValueProperty=require("./ValueProperty");module.exports=function(property,parent){var state={property:property,parent:parent},methods={destroy:function(){state.property=null,state.parent=null}};return Object.assign({},methods,ValueProperty(state),KeyPathNode(state))}},{"../key_path/KeyPathNode":12,"./ValueProperty":41}],41:[function(require,module,exports){"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};module.exports=function(state){return{setValue:function(value){var property=state.property;if(property&&property.addEffect)return"function"==typeof value?property.addEffect(value):"multidimensional"===property.propType&&"object"===(void 0===value?"undefined":_typeof(value))&&2===value.length?property.addEffect(function(){return value}):"unidimensional"===property.propType&&"number"==typeof value?property.addEffect(function(){return value}):void 0},getValue:function(){return state.property.v}}}},{}],42:[function(require,module,exports){"use strict";var LayerList=require("../layer/LayerList"),KeyPathList=require("../key_path/KeyPathList");module.exports=function(state){return state._type="renderer",Object.assign({getRendererType:function(){return state.animation.animType}},LayerList(state.elements),KeyPathList(state.elements,"renderer"))}},{"../key_path/KeyPathList":11,"../layer/LayerList":14}]},{},[10])(10)});
  