diff --git a/bower.json b/bower.json index c30469f1f..d8e6394e3 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "mojs", "description": "motion graphics toolbelt for the web", - "version": "0.229.0", + "version": "0.230.0", "license": "MIT", "homepage": "https://github.com/legomushroom/mojs", "authors": [ diff --git a/build/mo.js b/build/mo.js index afa1af057..2d43da2fc 100644 --- a/build/mo.js +++ b/build/mo.js @@ -51,10 +51,9 @@ /* 1 */ /***/ function(module, exports, __webpack_require__) { - var $ = __webpack_require__(57); - module.exports = function create(P, D){ - return $.create(P, D); - }; + __webpack_require__(57); + __webpack_require__(58); + module.exports = __webpack_require__(53).Symbol; /***/ }, /* 2 */ @@ -1265,7 +1264,7 @@ exports.__esModule = true; - var _keys = __webpack_require__(26); + var _keys = __webpack_require__(24); var _keys2 = _interopRequireDefault(_keys); @@ -1801,7 +1800,7 @@ exports.__esModule = true; - var _keys = __webpack_require__(26); + var _keys = __webpack_require__(24); var _keys2 = _interopRequireDefault(_keys); @@ -1898,10 +1897,6 @@ x: 0, // ∆ :: Units :: Possible values: [ number, string ] y: 0, - // ∆ :: Units :: Possible values: [ number, string ] - rx: 0, - // ∆ :: Units :: Possible values: [ number, string ] - ry: 0, // ∆ :: Possible values: [ number ] angle: 0, // ∆ :: Possible values: [ number ] @@ -1910,8 +1905,14 @@ scaleX: null, // ∆ :: Possible values: [ number ] Fallbacks to `scale`. scaleY: null, + // ∆ :: Possible values: [ number, string ] + origin: '50% 50%', // ∆ :: Possible values: [ 0..1 ] opacity: 1, + // ∆ :: Units :: Possible values: [ number, string ] + rx: 0, + // ∆ :: Units :: Possible values: [ number, string ] + ry: 0, // ∆ :: Possible values: [ number ] points: 3, // ∆ :: Possible values: [ number ] @@ -2092,9 +2093,15 @@ if (isTranslate || isScale || isRotate) { var transform = this._fillTransform(), style = this.el.style; - style["#{h.prefix.css}#{'transform'}"] = transform; + style[h.prefix.css + 'transform'] = transform; style['transform'] = transform; - // h.setPrefixedStyle(this.el, 'transform', this._fillTransform()); + } + + if (this._isPropChanged('origin') || this._deltas['origin']) { + var origin = this._fillOrigin(), + style = this.el.style; + style[h.prefix.css + 'transform-origin'] = origin; + style['transform-origin'] = origin; } } }; @@ -2175,7 +2182,7 @@ radius = this._calcMaxShapeRadius(), dStroke = this._deltas['strokeWidth'], stroke = dStroke != null ? Math.max(Math.abs(dStroke.start), Math.abs(dStroke.end)) : this._props.strokeWidth; - p.size = 2 * radius + 2 * stroke; + p.size = 2 * radius + stroke; this._increaseSizeWithEasing(); this._increaseSizeWithBitRatio(); return p.center = p.size / 2; @@ -2190,6 +2197,7 @@ var p = this._props, easing = this._o.easing, isStringEasing = easing && typeof easing === 'string'; + switch (isStringEasing && easing.toLowerCase()) { case 'elastic.out': case 'elastic.inout': @@ -2208,7 +2216,7 @@ Transit.prototype._increaseSizeWithBitRatio = function _increaseSizeWithBitRatio() { var p = this._props; - p.size *= this.bit._props.ratio; + // p.size *= this.bit._props.ratio; p.size += 2 * p.sizeGap; }; /* @@ -2323,7 +2331,7 @@ this._applyCallbackOverrides(this._o); }; /* - Method to create transform string; + Method to create transform string. @private @returns {String} Transform string. */ @@ -2337,6 +2345,21 @@ return 'scale(' + scale + ') translate(' + p.x + ', ' + p.y + ') rotate(' + p.angle + 'deg)'; }; + /* + Method to create transform-origin string. + @private + @returns {String} Transform string. + */ + + + Transit.prototype._fillOrigin = function _fillOrigin() { + var p = this._props, + str = ''; + for (var i = 0; i < p.origin.length; i++) { + str += p.origin[i].string + ' '; + } + return str; + }; /* Method to hide previousChainModule. @private @@ -2601,7 +2624,7 @@ 'use strict'; - var _keys = __webpack_require__(26); + var _keys = __webpack_require__(24); var _keys2 = _interopRequireDefault(_keys); @@ -3014,7 +3037,7 @@ exports.__esModule = true; - var _getIterator2 = __webpack_require__(27); + var _getIterator2 = __webpack_require__(25); var _getIterator3 = _interopRequireDefault(_getIterator2); @@ -3352,9 +3375,9 @@ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - __webpack_require__(24); + __webpack_require__(26); - __webpack_require__(25); + __webpack_require__(27); var _h = __webpack_require__(16); @@ -3701,7 +3724,7 @@ exports.__esModule = true; - var _keys = __webpack_require__(26); + var _keys = __webpack_require__(24); var _keys2 = _interopRequireDefault(_keys); @@ -4009,7 +4032,7 @@ exports.__esModule = true; - var _keys = __webpack_require__(26); + var _keys = __webpack_require__(24); var _keys2 = _interopRequireDefault(_keys); @@ -4303,8 +4326,9 @@ // map of props that should be // parsed to arrays of values this._arrayPropertyMap = { + strokeDashoffset: 1, strokeDasharray: 1, - strokeDashoffset: 1 + origin: 1 }; this._skipPropsDelta = { @@ -4644,6 +4668,7 @@ Module.prototype._calcCurrentProps = function _calcCurrentProps(p) { for (var key in this._deltas) { var value = this._deltas[key]; + // this._o.isIt && console.log(value) if (value.type === 'array') { var arr; // if prop property is array - reuse it else - create an array @@ -4653,11 +4678,17 @@ } else { arr = []; } + for (var i = 0; i < value.delta.length; i++) { var item = value.delta[i], dash = value.start[i].value + p * item.value; - arr.push({ value: dash, unit: item.unit }); + arr.push({ + string: '' + dash + item.unit, + value: dash, + unit: item.unit + }); } + this._props[key] = arr; } else if (value.type === 'number') { this._props[key] = value.start + value.delta * p; @@ -4715,11 +4746,11 @@ exports.__esModule = true; - var _iterator = __webpack_require__(28); + var _iterator = __webpack_require__(39); var _iterator2 = _interopRequireDefault(_iterator); - var _symbol = __webpack_require__(29); + var _symbol = __webpack_require__(40); var _symbol2 = _interopRequireDefault(_symbol); @@ -5163,7 +5194,7 @@ a: endColorObj.a - startColorObj.a } }; - } else if (key === 'strokeDasharray' || key === 'strokeDashoffset') { + } else if (key === 'strokeDasharray' || key === 'strokeDashoffset' || key === 'origin') { startArr = this.strToArr(start); endArr = this.strToArr(end); this.normDashArrays(startArr, endArr); @@ -5416,19 +5447,19 @@ Bit = __webpack_require__(23)["default"] || __webpack_require__(23); - Circle = __webpack_require__(31); + Circle = __webpack_require__(29); - Line = __webpack_require__(32); + Line = __webpack_require__(30); - Zigzag = __webpack_require__(33); + Zigzag = __webpack_require__(31); - Rect = __webpack_require__(30); + Rect = __webpack_require__(28); - Polygon = __webpack_require__(34); + Polygon = __webpack_require__(32); - Cross = __webpack_require__(35); + Cross = __webpack_require__(33); - Equal = __webpack_require__(36); + Equal = __webpack_require__(34); h = __webpack_require__(16); @@ -5471,7 +5502,7 @@ h = __webpack_require__(16); - resize = __webpack_require__(40); + resize = __webpack_require__(38); Tween = __webpack_require__(2)["default"]; @@ -6003,11 +6034,11 @@ var Easing, PathEasing, bezier, easing, h, mix; - bezier = __webpack_require__(37); + bezier = __webpack_require__(35); - PathEasing = __webpack_require__(38); + PathEasing = __webpack_require__(36); - mix = __webpack_require__(39); + mix = __webpack_require__(37); h = __webpack_require__(16); @@ -6379,7 +6410,7 @@ exports.__esModule = true; - var _keys = __webpack_require__(26); + var _keys = __webpack_require__(24); var _keys2 = _interopRequireDefault(_keys); @@ -6583,6 +6614,18 @@ /* 24 */ /***/ function(module, exports, __webpack_require__) { + module.exports = { "default": __webpack_require__(44), __esModule: true }; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(43), __esModule: true }; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + /* istanbul ignore next */ (function() { @@ -6615,7 +6658,7 @@ /***/ }, -/* 25 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { @@ -6637,34 +6680,10 @@ })(window); -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(44), __esModule: true }; - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(43), __esModule: true }; - /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(45), __esModule: true }; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(46), __esModule: true }; - -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { - /* istanbul ignore next */ var Bit, Rect, @@ -6682,8 +6701,7 @@ Rect.prototype._declareDefaults = function() { Rect.__super__._declareDefaults.apply(this, arguments); - this._defaults.shape = 'rect'; - return this._defaults.ratio = 1.43; + return this._defaults.shape = 'rect'; }; Rect.prototype.draw = function() { @@ -6716,7 +6734,7 @@ /***/ }, -/* 31 */ +/* 29 */ /***/ function(module, exports, __webpack_require__) { @@ -6765,7 +6783,7 @@ /***/ }, -/* 32 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { @@ -6803,7 +6821,7 @@ /***/ }, -/* 33 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { @@ -6823,8 +6841,7 @@ Zigzag.prototype._declareDefaults = function() { Zigzag.__super__._declareDefaults.apply(this, arguments); - this._defaults.shape = 'path'; - return this._defaults.ratio = 1.43; + return this._defaults.shape = 'path'; }; Zigzag.prototype.draw = function() { @@ -6838,8 +6855,8 @@ stepX = 2 * radiusX / this._props.points; stepY = 2 * radiusY / this._props.points; strokeWidth = this._props['stroke-width']; - xStart = this._props.x - radiusX; - yStart = this._props.y - radiusY; + xStart = this._props.x - radiusX - strokeWidth; + yStart = this._props.y - radiusY - strokeWidth; for (i = j = ref = this._props.points; ref <= 0 ? j < 0 : j > 0; i = ref <= 0 ? ++j : --j) { iX = xStart + i * stepX + strokeWidth; iY = yStart + i * stepY + strokeWidth; @@ -6862,7 +6879,7 @@ /***/ }, -/* 34 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { @@ -6932,7 +6949,7 @@ /***/ }, -/* 35 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { @@ -6989,7 +7006,7 @@ /***/ }, -/* 36 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { @@ -7009,8 +7026,7 @@ Equal.prototype._declareDefaults = function() { Equal.__super__._declareDefaults.apply(this, arguments); - this._defaults.shape = 'path'; - return this._defaults.ratio = 1.43; + return this._defaults.shape = 'path'; }; Equal.prototype.draw = function() { @@ -7047,7 +7063,7 @@ /***/ }, -/* 37 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var BezierEasing, bezierEasing, h, @@ -7224,7 +7240,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 38 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { var PathEasing, h; @@ -7460,7 +7476,7 @@ /***/ }, -/* 39 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { var create, easing, getNearest, mix, parseIfEasing, sort, @@ -7533,7 +7549,7 @@ /***/ }, -/* 40 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; @@ -7753,6 +7769,18 @@ })(); +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(45), __esModule: true }; + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(1), __esModule: true }; + /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { @@ -7763,7 +7791,7 @@ /* 42 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(1), __esModule: true }; + module.exports = { "default": __webpack_require__(46), __esModule: true }; /***/ }, /* 43 */ @@ -7792,15 +7820,16 @@ /* 46 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(55); - __webpack_require__(56); - module.exports = __webpack_require__(53).Symbol; + var $ = __webpack_require__(55); + module.exports = function create(P, D){ + return $.create(P, D); + }; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(58); + __webpack_require__(56); module.exports = __webpack_require__(53).Object.setPrototypeOf; /***/ }, @@ -7880,7 +7909,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var mojs = { - revision: '0.229.0', isDebug: true, helpers: _h2.default, + revision: '0.230.0', isDebug: true, helpers: _h2.default, Transit: _transit2.default, Swirl: _swirl2.default, Burst: _burst2.default, stagger: _stagger2.default, Spriter: _spriter2.default, MotionPath: _motionPath2.default, Tween: _tween2.default, Timeline: _timeline2.default, Tweenable: _tweenable2.default, Thenable: _thenable2.default, Tunable: _tunable2.default, Module: _module2.default, tweener: _tweener2.default, easing: _easing2.default, shapesMap: _shapesMap2.default @@ -7904,15 +7933,22 @@ // let tr = new mojs.Transit({ // left: '50%', top: '50%', + // isIt: 1, + // shape: 'zigzag', + // stroke: 'white', + // // origin: '50% 50%', + // origin: { '50% 50%': '100% 100%' }, // duration: 2000, - // radius: 50, - // radiusY: { 0: 20 } - // }).then({ - // radiusX: 100, - // radiusY: 120, - // }).then({ - // radiusY: 100 - // });; + // angle: { 0: 200 } + // }) + // .then({ + // origin: '50% 50%', + // // radiusX: 100, + // // radiusY: 120, + // }) + // // .then({ + // // radiusY: 100 + // // });; // let mojsPlayer = new MojsPlayer({ // add: tr @@ -7934,8 +7970,8 @@ /* 49 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(61); - var Iterators = __webpack_require__(62); + __webpack_require__(59); + var Iterators = __webpack_require__(60); Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; /***/ }, @@ -7943,10 +7979,10 @@ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var $at = __webpack_require__(59)(true); + var $at = __webpack_require__(63)(true); // 21.1.3.27 String.prototype[@@iterator]() - __webpack_require__(60)(String, 'String', function(iterated){ + __webpack_require__(64)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() @@ -7977,9 +8013,9 @@ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(63); + var toObject = __webpack_require__(61); - __webpack_require__(64)('keys', function($keys){ + __webpack_require__(62)('keys', function($keys){ return function keys(it){ return $keys(toObject(it)); }; @@ -8006,28 +8042,54 @@ /***/ }, /* 55 */ +/***/ function(module, exports, __webpack_require__) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(70); + $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); + +/***/ }, +/* 57 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim - var $ = __webpack_require__(57) + var $ = __webpack_require__(55) , global = __webpack_require__(69) - , has = __webpack_require__(70) - , DESCRIPTORS = __webpack_require__(71) - , $export = __webpack_require__(72) - , redefine = __webpack_require__(73) - , $fails = __webpack_require__(74) + , has = __webpack_require__(72) + , DESCRIPTORS = __webpack_require__(73) + , $export = __webpack_require__(70) + , redefine = __webpack_require__(74) + , $fails = __webpack_require__(75) , shared = __webpack_require__(67) - , setToStringTag = __webpack_require__(75) + , setToStringTag = __webpack_require__(76) , uid = __webpack_require__(68) , wks = __webpack_require__(54) - , keyOf = __webpack_require__(76) - , $names = __webpack_require__(77) - , enumKeys = __webpack_require__(78) - , isArray = __webpack_require__(79) + , keyOf = __webpack_require__(77) + , $names = __webpack_require__(78) + , enumKeys = __webpack_require__(79) + , isArray = __webpack_require__(80) , anObject = __webpack_require__(65) - , toIObject = __webpack_require__(80) - , createDesc = __webpack_require__(81) + , toIObject = __webpack_require__(81) + , createDesc = __webpack_require__(82) , getDesc = $.getDesc , setDesc = $.setDesc , _create = $.create @@ -8167,7 +8229,7 @@ $.getNames = $names.get = $getOwnPropertyNames; $.getSymbols = $getOwnPropertySymbols; - if(DESCRIPTORS && !__webpack_require__(82)){ + if(DESCRIPTORS && !__webpack_require__(83)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } } @@ -8237,43 +8299,87 @@ setToStringTag(global.JSON, 'JSON', true); /***/ }, -/* 56 */ +/* 58 */ /***/ function(module, exports, __webpack_require__) { /***/ }, -/* 57 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { - var $Object = Object; - module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach + 'use strict'; + var addToUnscopables = __webpack_require__(84) + , step = __webpack_require__(85) + , Iterators = __webpack_require__(60) + , toIObject = __webpack_require__(81); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(64)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = {}; + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(86); + module.exports = function(it){ + return Object(defined(it)); }; /***/ }, -/* 58 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { - // 19.1.3.19 Object.setPrototypeOf(O, proto) - var $export = __webpack_require__(72); - $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(83).set}); + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(70) + , core = __webpack_require__(53) + , fails = __webpack_require__(75); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; /***/ }, -/* 59 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { - var toInteger = __webpack_require__(84) - , defined = __webpack_require__(85); + var toInteger = __webpack_require__(89) + , defined = __webpack_require__(86); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ @@ -8291,19 +8397,19 @@ }; /***/ }, -/* 60 */ +/* 64 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var LIBRARY = __webpack_require__(82) - , $export = __webpack_require__(72) - , redefine = __webpack_require__(73) - , hide = __webpack_require__(86) - , has = __webpack_require__(70) - , Iterators = __webpack_require__(62) - , $iterCreate = __webpack_require__(87) - , setToStringTag = __webpack_require__(75) - , getProto = __webpack_require__(57).getProto + var LIBRARY = __webpack_require__(83) + , $export = __webpack_require__(70) + , redefine = __webpack_require__(74) + , hide = __webpack_require__(90) + , has = __webpack_require__(72) + , Iterators = __webpack_require__(60) + , $iterCreate = __webpack_require__(91) + , setToStringTag = __webpack_require__(76) + , getProto = __webpack_require__(55).getProto , ITERATOR = __webpack_require__(54)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' @@ -8361,81 +8467,11 @@ return methods; }; -/***/ }, -/* 61 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var addToUnscopables = __webpack_require__(88) - , step = __webpack_require__(89) - , Iterators = __webpack_require__(62) - , toIObject = __webpack_require__(80); - - // 22.1.3.4 Array.prototype.entries() - // 22.1.3.13 Array.prototype.keys() - // 22.1.3.29 Array.prototype.values() - // 22.1.3.30 Array.prototype[@@iterator]() - module.exports = __webpack_require__(60)(Array, 'Array', function(iterated, kind){ - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind - // 22.1.5.2.1 %ArrayIteratorPrototype%.next() - }, function(){ - var O = this._t - , kind = this._k - , index = this._i++; - if(!O || index >= O.length){ - this._t = undefined; - return step(1); - } - if(kind == 'keys' )return step(0, index); - if(kind == 'values')return step(0, O[index]); - return step(0, [index, O[index]]); - }, 'values'); - - // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) - Iterators.Arguments = Iterators.Array; - - addToUnscopables('keys'); - addToUnscopables('values'); - addToUnscopables('entries'); - -/***/ }, -/* 62 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = {}; - -/***/ }, -/* 63 */ -/***/ function(module, exports, __webpack_require__) { - - // 7.1.13 ToObject(argument) - var defined = __webpack_require__(85); - module.exports = function(it){ - return Object(defined(it)); - }; - -/***/ }, -/* 64 */ -/***/ function(module, exports, __webpack_require__) { - - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(72) - , core = __webpack_require__(53) - , fails = __webpack_require__(74); - module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); - }; - /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(90); + var isObject = __webpack_require__(87); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; @@ -8445,9 +8481,9 @@ /* 66 */ /***/ function(module, exports, __webpack_require__) { - var classof = __webpack_require__(91) + var classof = __webpack_require__(88) , ITERATOR = __webpack_require__(54)('iterator') - , Iterators = __webpack_require__(62); + , Iterators = __webpack_require__(60); module.exports = __webpack_require__(53).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] @@ -8486,24 +8522,6 @@ /***/ }, /* 70 */ -/***/ function(module, exports, __webpack_require__) { - - var hasOwnProperty = {}.hasOwnProperty; - module.exports = function(it, key){ - return hasOwnProperty.call(it, key); - }; - -/***/ }, -/* 71 */ -/***/ function(module, exports, __webpack_require__) { - - // Thank's IE8 for his funny defineProperty - module.exports = !__webpack_require__(74)(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; - }); - -/***/ }, -/* 72 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(69) @@ -8553,14 +8571,63 @@ $export.W = 32; // wrap module.exports = $export; +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var getDesc = __webpack_require__(55).getDesc + , isObject = __webpack_require__(87) + , anObject = __webpack_require__(65); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(92)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + /***/ }, /* 73 */ /***/ function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(86); + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(75)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); /***/ }, /* 74 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(90); + +/***/ }, +/* 75 */ /***/ function(module, exports, __webpack_require__) { module.exports = function(exec){ @@ -8572,11 +8639,11 @@ }; /***/ }, -/* 75 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { - var def = __webpack_require__(57).setDesc - , has = __webpack_require__(70) + var def = __webpack_require__(55).setDesc + , has = __webpack_require__(72) , TAG = __webpack_require__(54)('toStringTag'); module.exports = function(it, tag, stat){ @@ -8584,11 +8651,11 @@ }; /***/ }, -/* 76 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { - var $ = __webpack_require__(57) - , toIObject = __webpack_require__(80); + var $ = __webpack_require__(55) + , toIObject = __webpack_require__(81); module.exports = function(object, el){ var O = toIObject(object) , keys = $.getKeys(O) @@ -8599,12 +8666,12 @@ }; /***/ }, -/* 77 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window - var toIObject = __webpack_require__(80) - , getNames = __webpack_require__(57).getNames + var toIObject = __webpack_require__(81) + , getNames = __webpack_require__(55).getNames , toString = {}.toString; var windowNames = typeof window == 'object' && Object.getOwnPropertyNames @@ -8624,11 +8691,11 @@ }; /***/ }, -/* 78 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols - var $ = __webpack_require__(57); + var $ = __webpack_require__(55); module.exports = function(it){ var keys = $.getKeys(it) , getSymbols = $.getSymbols; @@ -8643,28 +8710,28 @@ }; /***/ }, -/* 79 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) - var cof = __webpack_require__(94); + var cof = __webpack_require__(93); module.exports = Array.isArray || function(arg){ return cof(arg) == 'Array'; }; /***/ }, -/* 80 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings - var IObject = __webpack_require__(93) - , defined = __webpack_require__(85); + var IObject = __webpack_require__(94) + , defined = __webpack_require__(86); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, -/* 81 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { module.exports = function(bitmap, value){ @@ -8677,55 +8744,27 @@ }; /***/ }, -/* 82 */ +/* 83 */ /***/ function(module, exports, __webpack_require__) { module.exports = true; /***/ }, -/* 83 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { - // Works with __proto__ only. Old v8 can't work with null proto objects. - /* eslint-disable no-proto */ - var getDesc = __webpack_require__(57).getDesc - , isObject = __webpack_require__(90) - , anObject = __webpack_require__(65); - var check = function(O, proto){ - anObject(O); - if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); - }; - module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function(test, buggy, set){ - try { - set = __webpack_require__(92)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch(e){ buggy = true; } - return function setPrototypeOf(O, proto){ - check(O, proto); - if(buggy)O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check - }; + module.exports = function(){ /* empty */ }; /***/ }, -/* 84 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { - // 7.1.4 ToInteger - var ceil = Math.ceil - , floor = Math.floor; - module.exports = function(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + module.exports = function(done, value){ + return {value: value, done: !!done}; }; /***/ }, -/* 85 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { // 7.2.1 RequireObjectCoercible(argument) @@ -8734,78 +8773,75 @@ return it; }; -/***/ }, -/* 86 */ -/***/ function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(57) - , createDesc = __webpack_require__(81); - module.exports = __webpack_require__(71) ? function(object, key, value){ - return $.setDesc(object, key, createDesc(1, value)); - } : function(object, key, value){ - object[key] = value; - return object; - }; - /***/ }, /* 87 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(57) - , descriptor = __webpack_require__(81) - , setToStringTag = __webpack_require__(75) - , IteratorPrototype = {}; - - // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() - __webpack_require__(86)(IteratorPrototype, __webpack_require__(54)('iterator'), function(){ return this; }); - - module.exports = function(Constructor, NAME, next){ - Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); - setToStringTag(Constructor, NAME + ' Iterator'); + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }, /* 88 */ /***/ function(module, exports, __webpack_require__) { - module.exports = function(){ /* empty */ }; + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(93) + , TAG = __webpack_require__(54)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + + module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = (O = Object(it))[TAG]) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; /***/ }, /* 89 */ /***/ function(module, exports, __webpack_require__) { - module.exports = function(done, value){ - return {value: value, done: !!done}; + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }, /* 90 */ /***/ function(module, exports, __webpack_require__) { - module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; + var $ = __webpack_require__(55) + , createDesc = __webpack_require__(82); + module.exports = __webpack_require__(73) ? function(object, key, value){ + return $.setDesc(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; }; /***/ }, /* 91 */ /***/ function(module, exports, __webpack_require__) { - // getting tag from 19.1.3.6 Object.prototype.toString() - var cof = __webpack_require__(94) - , TAG = __webpack_require__(54)('toStringTag') - // ES3 wrong here - , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + 'use strict'; + var $ = __webpack_require__(55) + , descriptor = __webpack_require__(82) + , setToStringTag = __webpack_require__(76) + , IteratorPrototype = {}; - module.exports = function(it){ - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = (O = Object(it))[TAG]) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(90)(IteratorPrototype, __webpack_require__(54)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }, @@ -8837,20 +8873,20 @@ /* 93 */ /***/ function(module, exports, __webpack_require__) { - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var cof = __webpack_require__(94); - module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); }; /***/ }, /* 94 */ /***/ function(module, exports, __webpack_require__) { - var toString = {}.toString; - - module.exports = function(it){ - return toString.call(it).slice(8, -1); + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(93); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, diff --git a/build/mo.min.js b/build/mo.min.js index 8bed13957..6a7ab5f70 100644 --- a/build/mo.min.js +++ b/build/mo.min.js @@ -1,11 +1,11 @@ /*! :: mo · js :: motion graphics toolbelt for the web Oleg Solomka @LegoMushroom 2015 MIT - 0.229.0 + 0.230.0 */ -!function(t){function e(i){if(r[i])return r[i].exports;var s=r[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var r={};return e.m=t,e.c=r,e.p="build/",e(0)}([function(t,e,r){t.exports=r(48)},function(t,e,r){var i=r(57);t.exports=function(t,e){return i.create(t,e)}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(20),n=i(s),o=r(21),a=i(o),p=r(22),u=i(p),l=r(16),h=(i(l),r(9)),c=i(h),f=r(19),d=i(f),_=r(13),y=i(_),m=function(t){function e(){var r,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n["default"](this,e);var s=a["default"](this,t.call(this,i));return null==s._props.name&&s._setSelfName(),r=s,a["default"](s,r)}return u["default"](e,t),e.prototype._declareDefaults=function(){this._defaults={duration:350,delay:0,repeat:0,speed:1,yoyo:!1,easing:"Ease.Out",name:null,nameBase:"Tween",onProgress:null,onStart:null,onComplete:null,onRepeatStart:null,onRepeatComplete:null,onFirstUpdate:null,onUpdate:null,isChained:!1,onPlaybackStart:null,onPlaybackPause:null,onPlaybackStop:null,onPlaybackComplete:null,callbacksContext:null}},e.prototype.play=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return"play"===this._state&&this._isRunning?this:(this._props.isReversed=!1,this._subPlay(t,"play"),this._setPlaybackState("play"),this)},e.prototype.playBackward=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return"reverse"===this._state&&this._isRunning?this:(this._props.isReversed=!0,this._subPlay(t,"reverse"),this._setPlaybackState("reverse"),this)},e.prototype.pause=function(){return"pause"===this._state||"stop"===this._state?this:(this._removeFromTweener(),this._setPlaybackState("pause"),this)},e.prototype.stop=function(t){if("stop"===this._state)return this;var e=null!=t?t:"reverse"===this._state?1:0;return this.setProgress(e),this.reset(),this},e.prototype.replay=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return this.reset(),this.play(t),this},e.prototype.replayBackward=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return this.reset(),this.playBackward(t),this},e.prototype.setProgress=function(t){var e=this._props;return!e.startTime&&this._setStartTime(),this._playTime=null,0>t&&(t=0),t>1&&(t=1),this._update(e.startTime-e.delay+t*e.repeatTime),this},e.prototype.setSpeed=function(t){return this._props.speed=t,("play"===this._state||"reverse"===this._state)&&this._setResumeTime(this._state),this},e.prototype.reset=function(){return this._removeFromTweener(),this._setPlaybackState("stop"),this._progressTime=0,this._isCompleted=!1,this._isStarted=!1,this._isFirstUpdate=!1,this._wasUknownUpdate=void 0,this._prevTime=void 0,this._prevYoyo=void 0,this._props.startTime=void 0,this._props.isReversed=!1,this},e.prototype._subPlay=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments[1],r=this._props,i=this._state,s=this._prevState,n="pause"===i,o="play"===i||n&&"play"===s,a="reverse"===i||n&&"reverse"===s,p=o&&"reverse"===e||a&&"play"===e;return this._progressTime=this._progressTime>=r.repeatTime?0:this._progressTime,p&&(this._progressTime=r.repeatTime-this._progressTime),this._setResumeTime(e,t),c["default"].add(this),this},e.prototype._setResumeTime=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];this._resumeTime=performance.now();var r=this._resumeTime-Math.abs(e)-this._progressTime;this._setStartTime(r,!1),null!=this._prevTime&&(this._prevTime="play"===t?this._normPrevTimeForward():this._props.endTime-this._progressTime)},e.prototype._normPrevTimeForward=function(){var t=this._props;return t.startTime+this._progressTime-t.delay},e.prototype._setSelfName=function(){var t="_"+this._props.nameBase+"s";c["default"][t]=null==c["default"][t]?1:++c["default"][t],this._props.name=this._props.nameBase+" "+c["default"][t]},e.prototype._setPlaybackState=function(t){this._prevState=this._state,this._state=t;var e="pause"===this._prevState,r="stop"===this._prevState,i="play"===this._prevState,s="reverse"===this._prevState,n=i||s,o=r||e;"play"!==t&&"reverse"!==t||!o||this._playbackStart(),"pause"===t&&n&&this._playbackPause(),"stop"===t&&(n||e)&&this._playbackStop()},e.prototype._vars=function(){return this.progress=0,this._prevTime=void 0,this._progressTime=0,this._negativeShift=0,this._state="stop",this._props.delay<0&&(this._negativeShift=this._props.delay,this._props.delay=0),this._calcDimentions()},e.prototype._calcDimentions=function(){this._props.time=this._props.duration+this._props.delay,this._props.repeatTime=this._props.time*(this._props.repeat+1)},e.prototype._extendDefaults=function(){this._callbackOverrides=this._o.callbackOverrides||{},delete this._o.callbackOverrides,t.prototype._extendDefaults.call(this),this._props.easing=d["default"].parseEasing(this._props.easing)},e.prototype._setStartTime=function(t){var e=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],r=this._props,i=r.shiftTime||0;e&&(this._isCompleted=!1,this._isRepeatCompleted=!1,this._isStarted=!1);var s=null==t?performance.now():t;return r.startTime=s+r.delay+this._negativeShift+i,r.endTime=r.startTime+r.repeatTime-r.delay,this._playTime=null!=this._resumeTime?this._resumeTime:s+i,this._resumeTime=null,this},e.prototype._update=function(t,e,r,i){var s=this._props;null==this._prevTime&&null!=e&&(this._prevTime=e,this._wasUknownUpdate=!0);var n=s.startTime-s.delay;if(s.speed&&this._playTime&&(t=this._playTime+s.speed*(t-this._playTime)),i&&null!=r){var o=this._getPeriod(t),a=!(!s.yoyo||!this._props.repeat||o%2!==1);1===i?r?(this._prevTime=t+1,this._repeatStart(t,a),this._start(t,a)):(this._prevTime=t-1,this._repeatComplete(t,a),this._complete(t,a)):-1===i&&(r?(this._prevTime=t-1,this._repeatComplete(t,a),this._complete(t,a)):this._prevTime>=s.startTime&&this._prevTime<=s.endTime&&(this._prevTime=t+1,this._repeatStart(t,a),this._start(t,a),this._isCompleted=!0)),this._prevTime=void 0}return t>n&&t=t?this._progressTime=0:t>=s.endTime&&(this._progressTime=s.repeatTime+1e-11),s.isReversed&&(t=s.endTime-this._progressTime),null==this._prevTime?(this._prevTime=t,this._wasUknownUpdate=!0,!1):(t>=n&&t<=s.endTime&&this._progress((t-n)/s.repeatTime,t),t>=s.startTime&&t<=s.endTime?this._updateInActiveArea(t):this._isInActiveArea&&this._updateInInactiveArea(t),this._prevTime=t,t>=s.endTime||n>=t)},e.prototype._updateInInactiveArea=function(t){if(this._isInActiveArea){var e=this._props;if(t>e.endTime&&!this._isCompleted){this._progress(1,t);var r=this._getPeriod(e.endTime),i=e.yoyo&&r%2===0;this._setProgress(i?0:1,t,i),this._repeatComplete(t,i),this._complete(t,i)}tthis._prevTime&&(this._isRepeatCompleted=!1),this._repeatComplete(t,l),this._complete(t,l)}if(this._isCompleted=!1,i+s>=e.startTime){this._isInActiveArea=!0,this._isRepeatCompleted=!1,this._isRepeatStart=!1,this._isStarted=!1;var f=(t-e.startTime)%r,d=f/e.duration,_=o>0&&o>p,y=p>o;if(this._onEdge=0,_&&(this._onEdge=1),y&&(this._onEdge=-1),this._wasUknownUpdate&&(t>this._prevTime&&(this._start(t,l),this._repeatStart(t,l),this._firstUpdate(t,l)),t=0&&this._repeatStart(t,l)}t>this._prevTime&&(!this._isStarted&&this._prevTime<=e.startTime&&(this._start(t,l),this._repeatStart(t,l),this._isStarted=!1,this._isRepeatStart=!1),this._firstUpdate(t,l)),y&&(0!==this.progress&&1!==this.progress&&p!=n&&this._repeatStart(t,h),p!==n||this._wasUknownUpdate||(this._complete(t,l),this._repeatComplete(t,l),this._firstUpdate(t,l),this._isCompleted=!1),this._repeatComplete(t,l)),"delay"===p&&(u>o&&this._repeatComplete(t,l),o===u&&o>0&&this._repeatStart(t,l)),t>this._prevTime?(0===d&&this._repeatStart(t,l),t!==e.endTime&&this._setProgress(l?1-d:d,t,l)):(t!==e.endTime&&this._setProgress(l?1-d:d,t,l),0===d&&this._repeatStart(t,l)),t===e.startTime&&this._start(t,l)}else if(this._isInActiveArea){var g="delay"===o?a:o,v=t>this._prevTime;v&&g--,c=e.yoyo&&g%2===1?1:0,tthis._prevTime&&(0!==this.progress||1===c)&&this._repeatComplete(t,1===c),this._isInActiveArea=!1}this._wasUknownUpdate=!1},e.prototype._removeFromTweener=function(){return c["default"].remove(this),this},e.prototype._getPeriod=function(t){var e=this._props,r=e.delay+e.duration,i=e.delay+t-e.startTime,s=i/r,n=t=e.endTime?Math.round(s):Math.floor(s),t>e.endTime?s=Math.round((e.endTime-e.startTime+e.delay)/r):n>0&&nthis._prevTime,r),i.prevEasedProgress=this.easedProgress,i.wasYoyo=r,this},e.prototype._start=function(t,e){if(!this._isStarted){var r=this._props;null!=r.onStart&&"function"==typeof r.onStart&&r.onStart.call(r.callbacksContext||this,t>this._prevTime,e),this._isCompleted=!1,this._isStarted=!0,this._isFirstUpdate=!1}},e.prototype._playbackStart=function(){var t=this._props;null!=t.onPlaybackStart&&"function"==typeof t.onPlaybackStart&&t.onPlaybackStart.call(t.callbacksContext||this)},e.prototype._playbackPause=function(){var t=this._props;null!=t.onPlaybackPause&&"function"==typeof t.onPlaybackPause&&t.onPlaybackPause.call(t.callbacksContext||this)},e.prototype._playbackStop=function(){var t=this._props;null!=t.onPlaybackStop&&"function"==typeof t.onPlaybackStop&&t.onPlaybackStop.call(t.callbacksContext||this)},e.prototype._playbackComplete=function(){var t=this._props;null!=t.onPlaybackComplete&&"function"==typeof t.onPlaybackComplete&&t.onPlaybackComplete.call(t.callbacksContext||this)},e.prototype._complete=function(t,e){if(!this._isCompleted){var r=this._props;null!=r.onComplete&&"function"==typeof r.onComplete&&r.onComplete.call(r.callbacksContext||this,t>this._prevTime,e),this._isCompleted=!0,this._isStarted=!1,this._isFirstUpdate=!1,this._prevYoyo=void 0}},e.prototype._firstUpdate=function(t,e){if(!this._isFirstUpdate){var r=this._props;null!=r.onFirstUpdate&&"function"==typeof r.onFirstUpdate&&(r.onFirstUpdate.tween=this,r.onFirstUpdate.call(r.callbacksContext||this,t>this._prevTime,e)),this._isFirstUpdate=!0}},e.prototype._repeatComplete=function(t,e){if(!this._isRepeatCompleted){var r=this._props;null!=r.onRepeatComplete&&"function"==typeof r.onRepeatComplete&&r.onRepeatComplete.call(r.callbacksContext||this,t>this._prevTime,e),this._isRepeatCompleted=!0}},e.prototype._repeatStart=function(t,e){if(!this._isRepeatStart){var r=this._props;null!=r.onRepeatStart&&"function"==typeof r.onRepeatStart&&r.onRepeatStart.call(r.callbacksContext||this,t>this._prevTime,e),this._isRepeatStart=!0}},e.prototype._progress=function(t,e){var r=this._props;null!=r.onProgress&&"function"==typeof r.onProgress&&r.onProgress.call(r.callbacksContext||this,t,e>this._prevTime)},e.prototype._onTweenerRemove=function(){},e.prototype._onTweenerFinish=function(){this._setPlaybackState("stop"),this._playbackComplete()},e.prototype._setProp=function(e,r){t.prototype._setProp.call(this,e,r),this._calcDimentions()},e.prototype._assignProp=function(e,r){null==r&&(r=this._defaults[e]),"easing"===e&&(r=d["default"].parseEasing(r));var i=this._callbackOverrides[e],s=!r||!r.isMojsCallbackOverride;i&&s&&(r=this._overrideCallback(r,i)),t.prototype._assignProp.call(this,e,r)},e.prototype._overrideCallback=function(t,e){var r=t&&"function"==typeof t,i=function(){r&&t.apply(this,arguments),e.apply(this,arguments)};return i.isMojsCallbackOverride=!0,i},e}(y["default"]);e["default"]=m},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(26),n=i(s),o=r(20),a=i(o),p=r(21),u=i(p),l=r(22),h=i(l),c=r(4),f=(i(c),r(8)),d=i(f),_=r(5),y=i(_),m=r(12),g=i(m),v=r(16),w=i(v),b=function(t){function e(){return a["default"](this,e),u["default"](this,t.apply(this,arguments))}return h["default"](e,t),e.prototype._declareDefaults=function(){this._defaults={count:5,degree:360,radius:{0:50},radiusX:null,radiusY:null,easing:"linear.none",isSwirl:!1}},e.prototype.then=function(t){this._removeTweenProperties(t);var e=this._masterThen(t),r=this._childThen(t,e);return this._setSwirlDuration(e,this._calcPackTime(r)),this.timeline._recalcTotalDuration(),this},e.prototype.tune=function(t){return null==t?this:(this._saveTimelineOptions(t),this.timeline._setProp(this._timelineOptions),this._removeTweenProperties(t),this._tuneNewOptions(t),this.masterSwirl.tune(t),this._tuneSwirls(t),this._recalcModulesTime(),this)},e.prototype._extendDefaults=function(){this._removeTweenProperties(this._o),t.prototype._extendDefaults.call(this)},e.prototype._removeTweenProperties=function(t){for(var e in w["default"].tweenOptionMap)null==this._defaults[e]&&delete t[e]},e.prototype._recalcModulesTime=function(){for(var t=this.masterSwirl._modules,e=this._swirls,r=0,i=0;ii;i++){var s=this._getOptionByIndex(i,t);s.isRunLess=!0;var n=new e(s);this.childModules.push(n),this.timeline.add(n)}return this},t.prototype.run=function(){this.timeline.play()},t}();t.exports=function(t){return function(e){return new c(e,t)}}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(20),n=i(s),o=r(16),a=i(o),p=r(2),u=i(p),l=r(8),h=i(l),c=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return n["default"](this,t),this.o=e,this.o.el?(this._vars(),this._declareDefaults(),this._extendDefaults(),this._parseFrames(),this._frames.length<=2&&a["default"].warn("Spriter: only "+this._frames.length+" frames found"),this._frames.length<1&&a["default"].error("Spriter: there is no frames to animate, aborting"),this._createTween(),this):a["default"].error('No "el" option specified, aborting')}return t.prototype._declareDefaults=function(){this._defaults={duration:500,delay:0,easing:"linear.none",repeat:0,yoyo:!1,isRunLess:!1,isShowEnd:!1,onStart:null,onUpdate:null,onComplete:null}},t.prototype._vars=function(){this._props=a["default"].cloneObj(this.o),this.el=this.o.el,this._frames=[]},t.prototype.run=function(t){return this.timeline.play()},t.prototype._extendDefaults=function(){return a["default"].extend(this._props,this._defaults)},t.prototype._parseFrames=function(){this._frames=Array.prototype.slice.call(this.el.children,0),this._frames.forEach(function(t,e){return t.style.opacity=0}),this._frameStep=1/this._frames.length},t.prototype._createTween=function(){var t=this;this._tween=new u["default"]({duration:this._props.duration,delay:this._props.delay,yoyo:this._props.yoyo,repeat:this._props.repeat,easing:this._props.easing,onStart:function(){return t._props.onStart&&t._props.onStart()},onComplete:function(){return t._props.onComplete&&t._props.onComplete()},onUpdate:function(e){return t._setProgress(e)}}),this.timeline=new h["default"],this.timeline.add(this._tween),this._props.isRunLess||this._startTween()},t.prototype._startTween=function(){var t=this;setTimeout(function(){return t.timeline.play()},1)},t.prototype._setProgress=function(t){var e=Math.floor(t/this._frameStep);if(this._prevFrame!=this._frames[e]){this._prevFrame&&(this._prevFrame.style.opacity=0);var r=1===t&&this._props.isShowEnd?e-1:e;this._frames[r]&&(this._frames[r].style.opacity=1),this._prevFrame=this._frames[e]}this._props.onUpdate&&this._props.onUpdate(t)},t}();e["default"]=c},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(27),n=i(s),o=r(20),a=i(o),p=r(21),u=i(p),l=r(22),h=i(l),c=r(16),f=i(c),d=r(9),_=(i(d),r(2)),y=i(_),m=function(t){function e(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return a["default"](this,e),u["default"](this,t.call(this,r))}return h["default"](e,t),e.prototype.add=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return this._pushTimelineArray(e),this._calcDimentions(),this},e.prototype.append=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i=e,s=Array.isArray(i),o=0,i=s?i:n["default"](i);;){var a;if(s){if(o>=i.length)break;a=i[o++]}else{if(o=i.next(),o.done)break;a=o.value}var p=a;f["default"].isArray(p)?this._appendTimelineArray(p):this._appendTimeline(p,this._timelines.length),this._calcDimentions()}return this},e.prototype.reset=function(){t.prototype.reset.call(this);for(var e=0;ethis._prevTime?-1:1;this._props.yoyo&&r&&(i*=-1);for(var s=this._props.startTime+t*this._props.duration,n=s+i,o=this._timelines.length,a=0;o>a;a++){ -var p=s>n?a:o-1-a;this._timelines[p]._update(s,n,this._prevYoyo,this._onEdge)}this._prevYoyo=r},e.prototype._recalcDuration=function(t){var e=t._props,r=e.repeatTime/e.speed+(e.shiftTime||0);this._props.duration=Math.max(r,this._props.duration)},e.prototype._recalcTotalDuration=function(){var t=this._timelines.length;for(this._props.duration=0;t--;){var e=this._timelines[t];e._recalcTotalDuration&&e._recalcTotalDuration(),this._recalcDuration(e)}this._calcDimentions()},e.prototype._setStartTime=function(e){var r=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];t.prototype._setStartTime.call(this,e),this._startTimelines(this._props.startTime,r)},e.prototype._startTimelines=function(t){var e=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],r=(this._props,"stop"===this._state);null==t&&(t=this._props.startTime);for(var i=0;i-1,this.isChrome=t.indexOf("Chrome")>-1,this.isOpera=t.toLowerCase().indexOf("op")>-1,this.isChrome&&this.isSafari&&(this.isSafari=!1),t.match(/PhantomJS/gim)&&(this.isSafari=!1),this.isChrome&&this.isOpera&&(this.isChrome=!1),this.is3d=this.checkIf3d(),this.uniqIDs=-1,this.div=document.createElement("div"),document.body.appendChild(this.div)},t.prototype.cloneObj=function(t,e){var r,i,s,n;for(s=Object.keys(t),n={},r=s.length;r--;)i=s[r],null!=e?e[i]||(n[i]=t[i]):n[i]=t[i];return n},t.prototype.extend=function(t,e){var r,i;for(r in e)i=e[r],null==t[r]&&(t[r]=e[r]);return t},t.prototype.getRemBase=function(){var t,e;return t=document.querySelector("html"),e=getComputedStyle(t),this.remBase=parseFloat(e.fontSize)},t.prototype.clamp=function(t,e,r){return e>t?e:t>r?r:t},t.prototype.setPrefixedStyle=function(t,e,r){return"transform"===e&&(t.style[""+this.prefix.css+e]=r),t.style[e]=r},t.prototype.style=function(t,e,r){var i,s,n,o;if("object"==typeof e){for(s=Object.keys(e),n=s.length,o=[];n--;)i=s[n],r=e[i],o.push(this.setPrefixedStyle(t,i,r));return o}return this.setPrefixedStyle(t,e,r)},t.prototype.prepareForLog=function(t){return t=Array.prototype.slice.apply(t),t.unshift("::"),t.unshift(this.logBadgeCss),t.unshift("%cmo·js%c"),t},t.prototype.log=function(){return mojs.isDebug!==!1?console.log.apply(console,this.prepareForLog(arguments)):void 0},t.prototype.warn=function(){return mojs.isDebug!==!1?console.warn.apply(console,this.prepareForLog(arguments)):void 0},t.prototype.error=function(){return mojs.isDebug!==!1?console.error.apply(console,this.prepareForLog(arguments)):void 0},t.prototype.parseUnit=function(t){var e,r,i,s,n,o;return"number"==typeof t?n={unit:"px",isStrict:!1,value:t,string:0===t?""+t:t+"px"}:"string"==typeof t?(s=/px|%|rem|em|ex|cm|ch|mm|in|pt|pc|vh|vw|vmin/gim,o=null!=(i=t.match(s))?i[0]:void 0,r=!0,o||(o="px",r=!1),e=parseFloat(t),n={unit:o,isStrict:r,value:e,string:0===e?""+e:""+e+o}):t},t.prototype.bind=function(t,e){var r,i;return i=function(){var i,s;return i=Array.prototype.slice.call(arguments),s=r.concat(i),t.apply(e,s)},r=Array.prototype.slice.call(arguments,2),i},t.prototype.getRadialPoint=function(t){var e,r,i,s;return null==t&&(t={}),null!=t.radius&&null!=t.angle&&null!=t.center?(r=(t.angle-90)*(Math.PI/180),i=null!=t.radiusX?t.radiusX:t.radius,s=null!=t.radiusY?t.radiusY:t.radius,e={x:t.center.x+Math.cos(r)*i,y:t.center.y+Math.sin(r)*s}):void 0},t.prototype.getPrefix=function(){var t,e,r,i;return r=window.getComputedStyle(document.documentElement,""),i=Array.prototype.slice.call(r).join("").match(/-(moz|webkit|ms)-/),e=(i||""===r.OLink&&["","o"])[1],t="WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1],{dom:t,lowercase:e,css:"-"+e+"-",js:e[0].toUpperCase()+e.substr(1)}},t.prototype.strToArr=function(t){var e;return e=[],"number"!=typeof t||isNaN(t)?(t.trim().split(/\s+/gim).forEach(function(t){return function(r){return e.push(t.parseUnit(t.parseIfRand(r)))}}(this)),e):(e.push(this.parseUnit(t)),e)},t.prototype.calcArrDelta=function(t,e){var r,i,s,n,o;for(r=[],i=s=0,n=t.length;n>s;i=++s)o=t[i],r[i]=this.parseUnit(""+(e[i].value-t[i].value)+e[i].unit);return r},t.prototype.isArray=function(t){return t instanceof Array},t.prototype.normDashArrays=function(t,e){var r,i,s,n,o,a,p,u,l,h;if(r=t.length,i=e.length,r>i)for(p=r-i,h=e.length,n=o=0,u=p;u>=0?u>o:o>u;n=u>=0?++o:--o)s=n+h,e.push(this.parseUnit("0"+t[s].unit));else if(i>r)for(p=i-r,h=t.length,n=a=0,l=p;l>=0?l>a:a>l;n=l>=0?++a:--a)s=n+h,t.push(this.parseUnit("0"+e[s].unit));return[t,e]},t.prototype.makeColorObj=function(t){var e,r,i,s,n,o,a,p,u,l;return"#"===t[0]&&(u=/^#?([a-f\d]{1,2})([a-f\d]{1,2})([a-f\d]{1,2})$/i.exec(t),i={},u&&(o=2===u[1].length?u[1]:u[1]+u[1],s=2===u[2].length?u[2]:u[2]+u[2],r=2===u[3].length?u[3]:u[3]+u[3],i={r:parseInt(o,16),g:parseInt(s,16),b:parseInt(r,16),a:1})),"#"!==t[0]&&(n="r"===t[0]&&"g"===t[1]&&"b"===t[2],n&&(l=t),n||(l=this.shortColors[t]?this.shortColors[t]:(this.div.style.color=t,this.computedStyle(this.div).color)),a="^rgba?\\((\\d{1,3}),\\s?(\\d{1,3}),",p="\\s?(\\d{1,3}),?\\s?(\\d{1}|0?\\.\\d{1,})?\\)$",u=new RegExp(a+p,"gi").exec(l),i={},e=parseFloat(u[4]||1),u&&(i={r:parseInt(u[1],10),g:parseInt(u[2],10),b:parseInt(u[3],10),a:null==e||isNaN(e)?1:e})),i},t.prototype.computedStyle=function(t){return getComputedStyle(t)},t.prototype.capitalize=function(t){if("string"!=typeof t)throw Error("String expected - nothing to capitalize");return t.charAt(0).toUpperCase()+t.substring(1)},t.prototype.parseRand=function(t){var e,r,i;return r=t.split(/rand\(|\,|\)/),i=this.parseUnit(r[2]),e=this.rand(parseFloat(r[1]),parseFloat(r[2])),i.unit&&r[2].match(i.unit)?e+i.unit:e},t.prototype.parseStagger=function(t,e){var r,i,s,n,o,a;return a=t.split(/stagger\(|\)$/)[1].toLowerCase(),s=a.split(/(rand\(.*?\)|[^\(,\s]+)(?=\s*,|\s*$)/gim),a=s.length>3?(r=this.parseUnit(this.parseIfRand(s[1])),s[3]):(r=this.parseUnit(0),s[1]),a=this.parseIfRand(a),o=this.parseUnit(a),i=e*o.value+r.value,n=r.isStrict?r.unit:o.isStrict?o.unit:"",n?""+i+n:i},t.prototype.parseIfStagger=function(t,e){return"string"==typeof t&&t.match(/stagger/g)?this.parseStagger(t,e):t},t.prototype.parseIfRand=function(t){return"string"==typeof t&&t.match(/rand\(/)?this.parseRand(t):t},t.prototype.parseDelta=function(t,e,r){var i,s,n,o,a,p,u,l,h,c;if(l=Object.keys(e)[0],s=e[l],i={start:l},!isNaN(parseFloat(l))||l.match(/rand\(/)||l.match(/stagger\(/))if("strokeDasharray"===t||"strokeDashoffset"===t){for(h=this.strToArr(l),n=this.strToArr(s),this.normDashArrays(h,n),a=p=0,u=h.length;u>p;a=++p)l=h[a],s=n[a],this.mergeUnits(l,s,t);i={start:h,end:n,delta:this.calcArrDelta(h,n),type:"array"}}else this.callbacksMap[t]||this.tweenOptionMap[t]||(this.unitOptionMap[t]?(s=this.parseUnit(this.parseStringOption(s,r)),l=this.parseUnit(this.parseStringOption(l,r)),this.mergeUnits(l,s,t),i={start:l,end:s,delta:s.value-l.value,type:"unit"}):(s=parseFloat(this.parseStringOption(s,r)),l=parseFloat(this.parseStringOption(l,r)),i={start:l,end:s,delta:s-l,type:"number"}));else{if("strokeLinecap"===t)return this.warn("Sorry, stroke-linecap property is not animatable yet, using the start("+l+") value instead",e),i;c=this.makeColorObj(l),o=this.makeColorObj(s),i={start:c,end:o,type:"color",delta:{r:o.r-c.r,g:o.g-c.g,b:o.b-c.b,a:o.a-c.a}}}return i},t.prototype.mergeUnits=function(t,e,r){return!e.isStrict&&t.isStrict?(e.unit=t.unit,e.string=""+e.value+e.unit):e.isStrict&&!t.isStrict?(t.unit=e.unit,t.string=""+t.value+t.unit):e.isStrict&&t.isStrict&&e.unit!==t.unit?(t.unit=e.unit,t.string=""+t.value+t.unit,this.warn('Two different units were specified on "'+r+'" delta property, mo · js will fallback to end "'+e.unit+'" unit ')):void 0},t.prototype.rand=function(t,e){return Math.random()*(e-t)+t},t.prototype.isDOM=function(t){var e;return null==t?!1:(e="number"==typeof t.nodeType&&"string"==typeof t.nodeName,"object"==typeof t&&e)},t.prototype.getChildElements=function(t){var e,r,i;for(e=t.childNodes,r=[],i=e.length;i--;)1===e[i].nodeType&&r.unshift(e[i]);return r},t.prototype.delta=function(t,e){var r,i,s,n,o;return n=typeof t,o=typeof e,r="string"===n||"number"===n&&!isNaN(t),i="string"===o||"number"===o&&!isNaN(e),r&&i?(s={},s[t]=e,s):void this.error("delta method expects Strings or Numbers at input but got - "+t+", "+e)},t.prototype.getUniqID=function(){return++this.uniqIDs},t.prototype.parsePath=function(t){var e;return"string"==typeof t?"m"===t.charAt(0).toLowerCase()?(e=document.createElementNS(this.NS,"path"),e.setAttributeNS(null,"d",t),e):document.querySelector(t):t.style?t:void 0},t.prototype.closeEnough=function(t,e,r){return Math.abs(t-e)0&&this.createFilter(),this.path=this.getPath(),this.path.getAttribute("d")?(this.len=this.path.getTotalLength(),this.slicedLen=this.len*(this.props.pathEnd-this.props.pathStart),this.startLen=this.props.pathStart*this.len,this.fill=this.props.fill,null!=this.fill&&(this.container=this.parseEl(this.props.fill.container),this.fillRule=this.props.fill.fillRule||"all",this.getScaler(),null!=this.container)?(this.removeEvent(this.container,"onresize",this.getScaler),this.addEvent(this.container,"onresize",this.getScaler)):void 0):(o.error("Path has no coordinates to work with, aborting"),!0)):(o.error('Missed "el" option. It could be a selector, DOMNode or another module.'),!0)},t.prototype.addEvent=function(t,e,r){return t.addEventListener(e,r,!1)},t.prototype.removeEvent=function(t,e,r){return t.removeEventListener(e,r,!1)},t.prototype.createFilter=function(){var t,e;return t=document.createElement("div"),this.filterID="filter-"+o.getUniqID(),t.innerHTML='',e=t.querySelector("#svg-"+this.filterID),this.filter=e.querySelector("#blur"),this.filterOffset=e.querySelector("#blur-offset"),document.body.insertBefore(e,document.body.firstChild),this.el.style.filter="url(#"+this.filterID+")",this.el.style[o.prefix.css+"filter"]="url(#"+this.filterID+")"},t.prototype.parseEl=function(t){return"string"==typeof t?document.querySelector(t):t instanceof HTMLElement?t:null!=t._setProp?(this.isModule=!0,t):void 0},t.prototype.getPath=function(){var t;return t=o.parsePath(this.props.path),t?t:this.props.path.x||this.props.path.y?this.curveToPath({start:{x:0,y:0},shift:{x:this.props.path.x||0,y:this.props.path.y||0},curvature:{x:this.props.curvature.x||this.defaults.curvature.x,y:this.props.curvature.y||this.defaults.curvature.y}}):void 0},t.prototype.getScaler=function(){var t,e,r;switch(this.cSize={width:this.container.offsetWidth||0,height:this.container.offsetHeight||0},r=this.path.getPointAtLength(0),t=this.path.getPointAtLength(this.len),e={},this.scaler={},e.width=t.x>=r.x?t.x-r.x:r.x-t.x,e.height=t.y>=r.y?t.y-r.y:r.y-t.y,this.fillRule){case"all":return this.calcWidth(e),this.calcHeight(e);case"width":return this.calcWidth(e),this.scaler.y=this.scaler.x;case"height":return this.calcHeight(e),this.scaler.x=this.scaler.y}},t.prototype.calcWidth=function(t){return this.scaler.x=this.cSize.width/t.width,!isFinite(this.scaler.x)&&(this.scaler.x=1)},t.prototype.calcHeight=function(t){return this.scaler.y=this.cSize.height/t.height,!isFinite(this.scaler.y)&&(this.scaler.y=1)},t.prototype.run=function(t){var e,r,i;if(t){e=this.history[0];for(r in t)i=t[r],o.callbacksMap[r]||o.tweenOptionMap[r]?(o.warn('the property "'+r+'" property can not be overridden on run yet'),delete t[r]):this.history[0][r]=i;this.tuneOptions(t)}return this.startTween()},t.prototype.createTween=function(){return this.tween=new n({duration:this.props.duration,delay:this.props.delay,yoyo:this.props.yoyo,repeat:this.props.repeat,easing:this.props.easing,onStart:function(t){return function(){var e;return null!=(e=t.props.onStart)?e.apply(t):void 0}}(this),onComplete:function(t){return function(){var e;return t.props.motionBlur&&t.setBlur({blur:{x:0,y:0},offset:{x:0,y:0}}),null!=(e=t.props.onComplete)?e.apply(t):void 0}}(this),onUpdate:function(t){return function(e){return t.setProgress(e)}}(this),onFirstUpdate:function(t){return function(e,r){return e?void 0:t.history.length>1&&t.tuneOptions(t.history[0])}}(this)}),this.timeline=new s,this.timeline.add(this.tween),!this.props.isRunLess&&this.startTween(),this.props.isPresetPosition&&this.setProgress(0,!0)},t.prototype.startTween=function(){return setTimeout(function(t){return function(){var e;return null!=(e=t.timeline)?e.play():void 0}}(this),1)},t.prototype.setProgress=function(t,e){var r,i,s,n;return r=this.startLen+(this.props.isReverse?(1-t)*this.slicedLen:t*this.slicedLen),i=this.path.getPointAtLength(r),s=i.x+this.props.offsetX,n=i.y+this.props.offsetY,this._getCurrentAngle(i,r,t),this._setTransformOrigin(t),this._setTransform(s,n,t,e),this.props.motionBlur&&this.makeMotionBlur(s,n)},t.prototype.setElPosition=function(t,e,r){var i,s,n,a;return n=0!==this.angle?"rotate("+this.angle+"deg)":"",s=this.props.isCompositeLayer&&o.is3d,i=s?"translateZ(0)":"",a="translate("+t+"px,"+e+"px) "+n+" "+i,o.setPrefixedStyle(this.el,"transform",a)},t.prototype.setModulePosition=function(t,e){return this.el._setProp({shiftX:t+"px",shiftY:e+"px",angle:this.angle}),this.el._draw()},t.prototype._getCurrentAngle=function(t,e,r){var i,s,n,a,p;return s="function"==typeof this.props.transformOrigin,this.props.isAngle||null!=this.props.angleOffset||s?(n=this.path.getPointAtLength(e-1),a=t.y-n.y,p=t.x-n.x,i=Math.atan(a/p),!isFinite(i)&&(i=0),this.angle=i*o.RAD_TO_DEG,"function"!=typeof this.props.angleOffset?this.angle+=this.props.angleOffset||0:this.angle=this.props.angleOffset.call(this,this.angle,r)):this.angle=0},t.prototype._setTransform=function(t,e,r,i){var s;return this.scaler&&(t*=this.scaler.x,e*=this.scaler.y),s=null,i||(s="function"==typeof this.onUpdate?this.onUpdate(r,{x:t,y:e,angle:this.angle}):void 0),this.isModule?this.setModulePosition(t,e):"string"!=typeof s?this.setElPosition(t,e,r):o.setPrefixedStyle(this.el,"transform",s); +!function(t){function e(i){if(r[i])return r[i].exports;var s=r[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var r={};return e.m=t,e.c=r,e.p="build/",e(0)}([function(t,e,r){t.exports=r(48)},function(t,e,r){r(57),r(58),t.exports=r(53).Symbol},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(20),n=i(s),o=r(21),a=i(o),p=r(22),u=i(p),l=r(16),h=(i(l),r(9)),c=i(h),f=r(19),d=i(f),_=r(13),y=i(_),m=function(t){function e(){var r,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n["default"](this,e);var s=a["default"](this,t.call(this,i));return null==s._props.name&&s._setSelfName(),r=s,a["default"](s,r)}return u["default"](e,t),e.prototype._declareDefaults=function(){this._defaults={duration:350,delay:0,repeat:0,speed:1,yoyo:!1,easing:"Ease.Out",name:null,nameBase:"Tween",onProgress:null,onStart:null,onComplete:null,onRepeatStart:null,onRepeatComplete:null,onFirstUpdate:null,onUpdate:null,isChained:!1,onPlaybackStart:null,onPlaybackPause:null,onPlaybackStop:null,onPlaybackComplete:null,callbacksContext:null}},e.prototype.play=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return"play"===this._state&&this._isRunning?this:(this._props.isReversed=!1,this._subPlay(t,"play"),this._setPlaybackState("play"),this)},e.prototype.playBackward=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return"reverse"===this._state&&this._isRunning?this:(this._props.isReversed=!0,this._subPlay(t,"reverse"),this._setPlaybackState("reverse"),this)},e.prototype.pause=function(){return"pause"===this._state||"stop"===this._state?this:(this._removeFromTweener(),this._setPlaybackState("pause"),this)},e.prototype.stop=function(t){if("stop"===this._state)return this;var e=null!=t?t:"reverse"===this._state?1:0;return this.setProgress(e),this.reset(),this},e.prototype.replay=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return this.reset(),this.play(t),this},e.prototype.replayBackward=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return this.reset(),this.playBackward(t),this},e.prototype.setProgress=function(t){var e=this._props;return!e.startTime&&this._setStartTime(),this._playTime=null,0>t&&(t=0),t>1&&(t=1),this._update(e.startTime-e.delay+t*e.repeatTime),this},e.prototype.setSpeed=function(t){return this._props.speed=t,("play"===this._state||"reverse"===this._state)&&this._setResumeTime(this._state),this},e.prototype.reset=function(){return this._removeFromTweener(),this._setPlaybackState("stop"),this._progressTime=0,this._isCompleted=!1,this._isStarted=!1,this._isFirstUpdate=!1,this._wasUknownUpdate=void 0,this._prevTime=void 0,this._prevYoyo=void 0,this._props.startTime=void 0,this._props.isReversed=!1,this},e.prototype._subPlay=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments[1],r=this._props,i=this._state,s=this._prevState,n="pause"===i,o="play"===i||n&&"play"===s,a="reverse"===i||n&&"reverse"===s,p=o&&"reverse"===e||a&&"play"===e;return this._progressTime=this._progressTime>=r.repeatTime?0:this._progressTime,p&&(this._progressTime=r.repeatTime-this._progressTime),this._setResumeTime(e,t),c["default"].add(this),this},e.prototype._setResumeTime=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];this._resumeTime=performance.now();var r=this._resumeTime-Math.abs(e)-this._progressTime;this._setStartTime(r,!1),null!=this._prevTime&&(this._prevTime="play"===t?this._normPrevTimeForward():this._props.endTime-this._progressTime)},e.prototype._normPrevTimeForward=function(){var t=this._props;return t.startTime+this._progressTime-t.delay},e.prototype._setSelfName=function(){var t="_"+this._props.nameBase+"s";c["default"][t]=null==c["default"][t]?1:++c["default"][t],this._props.name=this._props.nameBase+" "+c["default"][t]},e.prototype._setPlaybackState=function(t){this._prevState=this._state,this._state=t;var e="pause"===this._prevState,r="stop"===this._prevState,i="play"===this._prevState,s="reverse"===this._prevState,n=i||s,o=r||e;"play"!==t&&"reverse"!==t||!o||this._playbackStart(),"pause"===t&&n&&this._playbackPause(),"stop"===t&&(n||e)&&this._playbackStop()},e.prototype._vars=function(){return this.progress=0,this._prevTime=void 0,this._progressTime=0,this._negativeShift=0,this._state="stop",this._props.delay<0&&(this._negativeShift=this._props.delay,this._props.delay=0),this._calcDimentions()},e.prototype._calcDimentions=function(){this._props.time=this._props.duration+this._props.delay,this._props.repeatTime=this._props.time*(this._props.repeat+1)},e.prototype._extendDefaults=function(){this._callbackOverrides=this._o.callbackOverrides||{},delete this._o.callbackOverrides,t.prototype._extendDefaults.call(this),this._props.easing=d["default"].parseEasing(this._props.easing)},e.prototype._setStartTime=function(t){var e=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],r=this._props,i=r.shiftTime||0;e&&(this._isCompleted=!1,this._isRepeatCompleted=!1,this._isStarted=!1);var s=null==t?performance.now():t;return r.startTime=s+r.delay+this._negativeShift+i,r.endTime=r.startTime+r.repeatTime-r.delay,this._playTime=null!=this._resumeTime?this._resumeTime:s+i,this._resumeTime=null,this},e.prototype._update=function(t,e,r,i){var s=this._props;null==this._prevTime&&null!=e&&(this._prevTime=e,this._wasUknownUpdate=!0);var n=s.startTime-s.delay;if(s.speed&&this._playTime&&(t=this._playTime+s.speed*(t-this._playTime)),i&&null!=r){var o=this._getPeriod(t),a=!(!s.yoyo||!this._props.repeat||o%2!==1);1===i?r?(this._prevTime=t+1,this._repeatStart(t,a),this._start(t,a)):(this._prevTime=t-1,this._repeatComplete(t,a),this._complete(t,a)):-1===i&&(r?(this._prevTime=t-1,this._repeatComplete(t,a),this._complete(t,a)):this._prevTime>=s.startTime&&this._prevTime<=s.endTime&&(this._prevTime=t+1,this._repeatStart(t,a),this._start(t,a),this._isCompleted=!0)),this._prevTime=void 0}return t>n&&t=t?this._progressTime=0:t>=s.endTime&&(this._progressTime=s.repeatTime+1e-11),s.isReversed&&(t=s.endTime-this._progressTime),null==this._prevTime?(this._prevTime=t,this._wasUknownUpdate=!0,!1):(t>=n&&t<=s.endTime&&this._progress((t-n)/s.repeatTime,t),t>=s.startTime&&t<=s.endTime?this._updateInActiveArea(t):this._isInActiveArea&&this._updateInInactiveArea(t),this._prevTime=t,t>=s.endTime||n>=t)},e.prototype._updateInInactiveArea=function(t){if(this._isInActiveArea){var e=this._props;if(t>e.endTime&&!this._isCompleted){this._progress(1,t);var r=this._getPeriod(e.endTime),i=e.yoyo&&r%2===0;this._setProgress(i?0:1,t,i),this._repeatComplete(t,i),this._complete(t,i)}tthis._prevTime&&(this._isRepeatCompleted=!1),this._repeatComplete(t,l),this._complete(t,l)}if(this._isCompleted=!1,i+s>=e.startTime){this._isInActiveArea=!0,this._isRepeatCompleted=!1,this._isRepeatStart=!1,this._isStarted=!1;var f=(t-e.startTime)%r,d=f/e.duration,_=o>0&&o>p,y=p>o;if(this._onEdge=0,_&&(this._onEdge=1),y&&(this._onEdge=-1),this._wasUknownUpdate&&(t>this._prevTime&&(this._start(t,l),this._repeatStart(t,l),this._firstUpdate(t,l)),t=0&&this._repeatStart(t,l)}t>this._prevTime&&(!this._isStarted&&this._prevTime<=e.startTime&&(this._start(t,l),this._repeatStart(t,l),this._isStarted=!1,this._isRepeatStart=!1),this._firstUpdate(t,l)),y&&(0!==this.progress&&1!==this.progress&&p!=n&&this._repeatStart(t,h),p!==n||this._wasUknownUpdate||(this._complete(t,l),this._repeatComplete(t,l),this._firstUpdate(t,l),this._isCompleted=!1),this._repeatComplete(t,l)),"delay"===p&&(u>o&&this._repeatComplete(t,l),o===u&&o>0&&this._repeatStart(t,l)),t>this._prevTime?(0===d&&this._repeatStart(t,l),t!==e.endTime&&this._setProgress(l?1-d:d,t,l)):(t!==e.endTime&&this._setProgress(l?1-d:d,t,l),0===d&&this._repeatStart(t,l)),t===e.startTime&&this._start(t,l)}else if(this._isInActiveArea){var g="delay"===o?a:o,v=t>this._prevTime;v&&g--,c=e.yoyo&&g%2===1?1:0,tthis._prevTime&&(0!==this.progress||1===c)&&this._repeatComplete(t,1===c),this._isInActiveArea=!1}this._wasUknownUpdate=!1},e.prototype._removeFromTweener=function(){return c["default"].remove(this),this},e.prototype._getPeriod=function(t){var e=this._props,r=e.delay+e.duration,i=e.delay+t-e.startTime,s=i/r,n=t=e.endTime?Math.round(s):Math.floor(s),t>e.endTime?s=Math.round((e.endTime-e.startTime+e.delay)/r):n>0&&nthis._prevTime,r),i.prevEasedProgress=this.easedProgress,i.wasYoyo=r,this},e.prototype._start=function(t,e){if(!this._isStarted){var r=this._props;null!=r.onStart&&"function"==typeof r.onStart&&r.onStart.call(r.callbacksContext||this,t>this._prevTime,e),this._isCompleted=!1,this._isStarted=!0,this._isFirstUpdate=!1}},e.prototype._playbackStart=function(){var t=this._props;null!=t.onPlaybackStart&&"function"==typeof t.onPlaybackStart&&t.onPlaybackStart.call(t.callbacksContext||this)},e.prototype._playbackPause=function(){var t=this._props;null!=t.onPlaybackPause&&"function"==typeof t.onPlaybackPause&&t.onPlaybackPause.call(t.callbacksContext||this)},e.prototype._playbackStop=function(){var t=this._props;null!=t.onPlaybackStop&&"function"==typeof t.onPlaybackStop&&t.onPlaybackStop.call(t.callbacksContext||this)},e.prototype._playbackComplete=function(){var t=this._props;null!=t.onPlaybackComplete&&"function"==typeof t.onPlaybackComplete&&t.onPlaybackComplete.call(t.callbacksContext||this)},e.prototype._complete=function(t,e){if(!this._isCompleted){var r=this._props;null!=r.onComplete&&"function"==typeof r.onComplete&&r.onComplete.call(r.callbacksContext||this,t>this._prevTime,e),this._isCompleted=!0,this._isStarted=!1,this._isFirstUpdate=!1,this._prevYoyo=void 0}},e.prototype._firstUpdate=function(t,e){if(!this._isFirstUpdate){var r=this._props;null!=r.onFirstUpdate&&"function"==typeof r.onFirstUpdate&&(r.onFirstUpdate.tween=this,r.onFirstUpdate.call(r.callbacksContext||this,t>this._prevTime,e)),this._isFirstUpdate=!0}},e.prototype._repeatComplete=function(t,e){if(!this._isRepeatCompleted){var r=this._props;null!=r.onRepeatComplete&&"function"==typeof r.onRepeatComplete&&r.onRepeatComplete.call(r.callbacksContext||this,t>this._prevTime,e),this._isRepeatCompleted=!0}},e.prototype._repeatStart=function(t,e){if(!this._isRepeatStart){var r=this._props;null!=r.onRepeatStart&&"function"==typeof r.onRepeatStart&&r.onRepeatStart.call(r.callbacksContext||this,t>this._prevTime,e),this._isRepeatStart=!0}},e.prototype._progress=function(t,e){var r=this._props;null!=r.onProgress&&"function"==typeof r.onProgress&&r.onProgress.call(r.callbacksContext||this,t,e>this._prevTime)},e.prototype._onTweenerRemove=function(){},e.prototype._onTweenerFinish=function(){this._setPlaybackState("stop"),this._playbackComplete()},e.prototype._setProp=function(e,r){t.prototype._setProp.call(this,e,r),this._calcDimentions()},e.prototype._assignProp=function(e,r){null==r&&(r=this._defaults[e]),"easing"===e&&(r=d["default"].parseEasing(r));var i=this._callbackOverrides[e],s=!r||!r.isMojsCallbackOverride;i&&s&&(r=this._overrideCallback(r,i)),t.prototype._assignProp.call(this,e,r)},e.prototype._overrideCallback=function(t,e){var r=t&&"function"==typeof t,i=function(){r&&t.apply(this,arguments),e.apply(this,arguments)};return i.isMojsCallbackOverride=!0,i},e}(y["default"]);e["default"]=m},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(24),n=i(s),o=r(20),a=i(o),p=r(21),u=i(p),l=r(22),h=i(l),c=r(4),f=(i(c),r(8)),d=i(f),_=r(5),y=i(_),m=r(12),g=i(m),v=r(16),w=i(v),b=function(t){function e(){return a["default"](this,e),u["default"](this,t.apply(this,arguments))}return h["default"](e,t),e.prototype._declareDefaults=function(){this._defaults={count:5,degree:360,radius:{0:50},radiusX:null,radiusY:null,easing:"linear.none",isSwirl:!1}},e.prototype.then=function(t){this._removeTweenProperties(t);var e=this._masterThen(t),r=this._childThen(t,e);return this._setSwirlDuration(e,this._calcPackTime(r)),this.timeline._recalcTotalDuration(),this},e.prototype.tune=function(t){return null==t?this:(this._saveTimelineOptions(t),this.timeline._setProp(this._timelineOptions),this._removeTweenProperties(t),this._tuneNewOptions(t),this.masterSwirl.tune(t),this._tuneSwirls(t),this._recalcModulesTime(),this)},e.prototype._extendDefaults=function(){this._removeTweenProperties(this._o),t.prototype._extendDefaults.call(this)},e.prototype._removeTweenProperties=function(t){for(var e in w["default"].tweenOptionMap)null==this._defaults[e]&&delete t[e]},e.prototype._recalcModulesTime=function(){for(var t=this.masterSwirl._modules,e=this._swirls,r=0,i=0;ii;i++){var s=this._getOptionByIndex(i,t);s.isRunLess=!0;var n=new e(s);this.childModules.push(n),this.timeline.add(n)}return this},t.prototype.run=function(){this.timeline.play()},t}();t.exports=function(t){return function(e){return new c(e,t)}}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(20),n=i(s),o=r(16),a=i(o),p=r(2),u=i(p),l=r(8),h=i(l),c=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return n["default"](this,t),this.o=e,this.o.el?(this._vars(),this._declareDefaults(),this._extendDefaults(),this._parseFrames(),this._frames.length<=2&&a["default"].warn("Spriter: only "+this._frames.length+" frames found"),this._frames.length<1&&a["default"].error("Spriter: there is no frames to animate, aborting"),this._createTween(),this):a["default"].error('No "el" option specified, aborting')}return t.prototype._declareDefaults=function(){this._defaults={duration:500,delay:0,easing:"linear.none",repeat:0,yoyo:!1,isRunLess:!1,isShowEnd:!1,onStart:null,onUpdate:null,onComplete:null}},t.prototype._vars=function(){this._props=a["default"].cloneObj(this.o),this.el=this.o.el,this._frames=[]},t.prototype.run=function(t){return this.timeline.play()},t.prototype._extendDefaults=function(){return a["default"].extend(this._props,this._defaults)},t.prototype._parseFrames=function(){this._frames=Array.prototype.slice.call(this.el.children,0),this._frames.forEach(function(t,e){return t.style.opacity=0}),this._frameStep=1/this._frames.length},t.prototype._createTween=function(){var t=this;this._tween=new u["default"]({duration:this._props.duration,delay:this._props.delay,yoyo:this._props.yoyo,repeat:this._props.repeat,easing:this._props.easing,onStart:function(){return t._props.onStart&&t._props.onStart()},onComplete:function(){return t._props.onComplete&&t._props.onComplete()},onUpdate:function(e){return t._setProgress(e)}}),this.timeline=new h["default"],this.timeline.add(this._tween),this._props.isRunLess||this._startTween()},t.prototype._startTween=function(){var t=this;setTimeout(function(){return t.timeline.play()},1)},t.prototype._setProgress=function(t){var e=Math.floor(t/this._frameStep);if(this._prevFrame!=this._frames[e]){this._prevFrame&&(this._prevFrame.style.opacity=0);var r=1===t&&this._props.isShowEnd?e-1:e;this._frames[r]&&(this._frames[r].style.opacity=1),this._prevFrame=this._frames[e]}this._props.onUpdate&&this._props.onUpdate(t)},t}();e["default"]=c},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(25),n=i(s),o=r(20),a=i(o),p=r(21),u=i(p),l=r(22),h=i(l),c=r(16),f=i(c),d=r(9),_=(i(d),r(2)),y=i(_),m=function(t){function e(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return a["default"](this,e),u["default"](this,t.call(this,r))}return h["default"](e,t),e.prototype.add=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return this._pushTimelineArray(e),this._calcDimentions(),this},e.prototype.append=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i=e,s=Array.isArray(i),o=0,i=s?i:n["default"](i);;){var a;if(s){if(o>=i.length)break;a=i[o++]}else{if(o=i.next(),o.done)break;a=o.value}var p=a;f["default"].isArray(p)?this._appendTimelineArray(p):this._appendTimeline(p,this._timelines.length),this._calcDimentions()}return this},e.prototype.reset=function(){t.prototype.reset.call(this);for(var e=0;ethis._prevTime?-1:1;this._props.yoyo&&r&&(i*=-1);for(var s=this._props.startTime+t*this._props.duration,n=s+i,o=this._timelines.length,a=0;o>a;a++){var p=s>n?a:o-1-a;this._timelines[p]._update(s,n,this._prevYoyo,this._onEdge)}this._prevYoyo=r},e.prototype._recalcDuration=function(t){var e=t._props,r=e.repeatTime/e.speed+(e.shiftTime||0);this._props.duration=Math.max(r,this._props.duration)},e.prototype._recalcTotalDuration=function(){var t=this._timelines.length;for(this._props.duration=0;t--;){var e=this._timelines[t];e._recalcTotalDuration&&e._recalcTotalDuration(),this._recalcDuration(e)}this._calcDimentions()},e.prototype._setStartTime=function(e){var r=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];t.prototype._setStartTime.call(this,e),this._startTimelines(this._props.startTime,r)},e.prototype._startTimelines=function(t){var e=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],r=(this._props,"stop"===this._state);null==t&&(t=this._props.startTime);for(var i=0;i-1,this.isChrome=t.indexOf("Chrome")>-1,this.isOpera=t.toLowerCase().indexOf("op")>-1,this.isChrome&&this.isSafari&&(this.isSafari=!1),t.match(/PhantomJS/gim)&&(this.isSafari=!1),this.isChrome&&this.isOpera&&(this.isChrome=!1),this.is3d=this.checkIf3d(),this.uniqIDs=-1,this.div=document.createElement("div"),document.body.appendChild(this.div)},t.prototype.cloneObj=function(t,e){var r,i,s,n;for(s=Object.keys(t),n={},r=s.length;r--;)i=s[r],null!=e?e[i]||(n[i]=t[i]):n[i]=t[i];return n},t.prototype.extend=function(t,e){var r,i;for(r in e)i=e[r],null==t[r]&&(t[r]=e[r]);return t},t.prototype.getRemBase=function(){var t,e;return t=document.querySelector("html"),e=getComputedStyle(t),this.remBase=parseFloat(e.fontSize)},t.prototype.clamp=function(t,e,r){return e>t?e:t>r?r:t},t.prototype.setPrefixedStyle=function(t,e,r){return"transform"===e&&(t.style[""+this.prefix.css+e]=r),t.style[e]=r},t.prototype.style=function(t,e,r){var i,s,n,o;if("object"==typeof e){for(s=Object.keys(e),n=s.length,o=[];n--;)i=s[n],r=e[i],o.push(this.setPrefixedStyle(t,i,r));return o}return this.setPrefixedStyle(t,e,r)},t.prototype.prepareForLog=function(t){return t=Array.prototype.slice.apply(t),t.unshift("::"),t.unshift(this.logBadgeCss),t.unshift("%cmo·js%c"),t},t.prototype.log=function(){return mojs.isDebug!==!1?console.log.apply(console,this.prepareForLog(arguments)):void 0},t.prototype.warn=function(){return mojs.isDebug!==!1?console.warn.apply(console,this.prepareForLog(arguments)):void 0},t.prototype.error=function(){return mojs.isDebug!==!1?console.error.apply(console,this.prepareForLog(arguments)):void 0},t.prototype.parseUnit=function(t){var e,r,i,s,n,o;return"number"==typeof t?n={unit:"px",isStrict:!1,value:t,string:0===t?""+t:t+"px"}:"string"==typeof t?(s=/px|%|rem|em|ex|cm|ch|mm|in|pt|pc|vh|vw|vmin/gim,o=null!=(i=t.match(s))?i[0]:void 0,r=!0,o||(o="px",r=!1),e=parseFloat(t),n={unit:o,isStrict:r,value:e,string:0===e?""+e:""+e+o}):t},t.prototype.bind=function(t,e){var r,i;return i=function(){var i,s;return i=Array.prototype.slice.call(arguments),s=r.concat(i),t.apply(e,s)},r=Array.prototype.slice.call(arguments,2),i},t.prototype.getRadialPoint=function(t){var e,r,i,s;return null==t&&(t={}),null!=t.radius&&null!=t.angle&&null!=t.center?(r=(t.angle-90)*(Math.PI/180),i=null!=t.radiusX?t.radiusX:t.radius,s=null!=t.radiusY?t.radiusY:t.radius,e={x:t.center.x+Math.cos(r)*i,y:t.center.y+Math.sin(r)*s}):void 0},t.prototype.getPrefix=function(){var t,e,r,i;return r=window.getComputedStyle(document.documentElement,""),i=Array.prototype.slice.call(r).join("").match(/-(moz|webkit|ms)-/),e=(i||""===r.OLink&&["","o"])[1],t="WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1],{dom:t,lowercase:e,css:"-"+e+"-",js:e[0].toUpperCase()+e.substr(1)}},t.prototype.strToArr=function(t){var e;return e=[],"number"!=typeof t||isNaN(t)?(t.trim().split(/\s+/gim).forEach(function(t){return function(r){return e.push(t.parseUnit(t.parseIfRand(r)))}}(this)),e):(e.push(this.parseUnit(t)),e)},t.prototype.calcArrDelta=function(t,e){var r,i,s,n,o;for(r=[],i=s=0,n=t.length;n>s;i=++s)o=t[i],r[i]=this.parseUnit(""+(e[i].value-t[i].value)+e[i].unit);return r},t.prototype.isArray=function(t){return t instanceof Array},t.prototype.normDashArrays=function(t,e){var r,i,s,n,o,a,p,u,l,h;if(r=t.length,i=e.length,r>i)for(p=r-i,h=e.length,n=o=0,u=p;u>=0?u>o:o>u;n=u>=0?++o:--o)s=n+h,e.push(this.parseUnit("0"+t[s].unit));else if(i>r)for(p=i-r,h=t.length,n=a=0,l=p;l>=0?l>a:a>l;n=l>=0?++a:--a)s=n+h,t.push(this.parseUnit("0"+e[s].unit));return[t,e]},t.prototype.makeColorObj=function(t){var e,r,i,s,n,o,a,p,u,l;return"#"===t[0]&&(u=/^#?([a-f\d]{1,2})([a-f\d]{1,2})([a-f\d]{1,2})$/i.exec(t),i={},u&&(o=2===u[1].length?u[1]:u[1]+u[1],s=2===u[2].length?u[2]:u[2]+u[2],r=2===u[3].length?u[3]:u[3]+u[3],i={r:parseInt(o,16),g:parseInt(s,16),b:parseInt(r,16),a:1})),"#"!==t[0]&&(n="r"===t[0]&&"g"===t[1]&&"b"===t[2],n&&(l=t),n||(l=this.shortColors[t]?this.shortColors[t]:(this.div.style.color=t,this.computedStyle(this.div).color)),a="^rgba?\\((\\d{1,3}),\\s?(\\d{1,3}),",p="\\s?(\\d{1,3}),?\\s?(\\d{1}|0?\\.\\d{1,})?\\)$",u=new RegExp(a+p,"gi").exec(l),i={},e=parseFloat(u[4]||1),u&&(i={r:parseInt(u[1],10),g:parseInt(u[2],10),b:parseInt(u[3],10),a:null==e||isNaN(e)?1:e})),i},t.prototype.computedStyle=function(t){return getComputedStyle(t)},t.prototype.capitalize=function(t){if("string"!=typeof t)throw Error("String expected - nothing to capitalize");return t.charAt(0).toUpperCase()+t.substring(1)},t.prototype.parseRand=function(t){var e,r,i;return r=t.split(/rand\(|\,|\)/),i=this.parseUnit(r[2]),e=this.rand(parseFloat(r[1]),parseFloat(r[2])),i.unit&&r[2].match(i.unit)?e+i.unit:e},t.prototype.parseStagger=function(t,e){var r,i,s,n,o,a;return a=t.split(/stagger\(|\)$/)[1].toLowerCase(),s=a.split(/(rand\(.*?\)|[^\(,\s]+)(?=\s*,|\s*$)/gim),a=s.length>3?(r=this.parseUnit(this.parseIfRand(s[1])),s[3]):(r=this.parseUnit(0),s[1]),a=this.parseIfRand(a),o=this.parseUnit(a),i=e*o.value+r.value,n=r.isStrict?r.unit:o.isStrict?o.unit:"",n?""+i+n:i},t.prototype.parseIfStagger=function(t,e){return"string"==typeof t&&t.match(/stagger/g)?this.parseStagger(t,e):t},t.prototype.parseIfRand=function(t){return"string"==typeof t&&t.match(/rand\(/)?this.parseRand(t):t},t.prototype.parseDelta=function(t,e,r){var i,s,n,o,a,p,u,l,h,c;if(l=Object.keys(e)[0],s=e[l],i={start:l},!isNaN(parseFloat(l))||l.match(/rand\(/)||l.match(/stagger\(/))if("strokeDasharray"===t||"strokeDashoffset"===t||"origin"===t){for(h=this.strToArr(l),n=this.strToArr(s),this.normDashArrays(h,n),a=p=0,u=h.length;u>p;a=++p)l=h[a],s=n[a],this.mergeUnits(l,s,t);i={start:h,end:n,delta:this.calcArrDelta(h,n),type:"array"}}else this.callbacksMap[t]||this.tweenOptionMap[t]||(this.unitOptionMap[t]?(s=this.parseUnit(this.parseStringOption(s,r)),l=this.parseUnit(this.parseStringOption(l,r)),this.mergeUnits(l,s,t),i={start:l,end:s,delta:s.value-l.value,type:"unit"}):(s=parseFloat(this.parseStringOption(s,r)),l=parseFloat(this.parseStringOption(l,r)),i={start:l,end:s,delta:s-l,type:"number"}));else{if("strokeLinecap"===t)return this.warn("Sorry, stroke-linecap property is not animatable yet, using the start("+l+") value instead",e),i;c=this.makeColorObj(l),o=this.makeColorObj(s),i={start:c,end:o,type:"color",delta:{r:o.r-c.r,g:o.g-c.g,b:o.b-c.b,a:o.a-c.a}}}return i},t.prototype.mergeUnits=function(t,e,r){return!e.isStrict&&t.isStrict?(e.unit=t.unit,e.string=""+e.value+e.unit):e.isStrict&&!t.isStrict?(t.unit=e.unit,t.string=""+t.value+t.unit):e.isStrict&&t.isStrict&&e.unit!==t.unit?(t.unit=e.unit,t.string=""+t.value+t.unit,this.warn('Two different units were specified on "'+r+'" delta property, mo · js will fallback to end "'+e.unit+'" unit ')):void 0},t.prototype.rand=function(t,e){return Math.random()*(e-t)+t},t.prototype.isDOM=function(t){var e;return null==t?!1:(e="number"==typeof t.nodeType&&"string"==typeof t.nodeName,"object"==typeof t&&e)},t.prototype.getChildElements=function(t){var e,r,i;for(e=t.childNodes,r=[],i=e.length;i--;)1===e[i].nodeType&&r.unshift(e[i]);return r},t.prototype.delta=function(t,e){var r,i,s,n,o;return n=typeof t,o=typeof e,r="string"===n||"number"===n&&!isNaN(t),i="string"===o||"number"===o&&!isNaN(e),r&&i?(s={},s[t]=e,s):void this.error("delta method expects Strings or Numbers at input but got - "+t+", "+e)},t.prototype.getUniqID=function(){return++this.uniqIDs},t.prototype.parsePath=function(t){var e;return"string"==typeof t?"m"===t.charAt(0).toLowerCase()?(e=document.createElementNS(this.NS,"path"),e.setAttributeNS(null,"d",t),e):document.querySelector(t):t.style?t:void 0},t.prototype.closeEnough=function(t,e,r){return Math.abs(t-e)0&&this.createFilter(),this.path=this.getPath(),this.path.getAttribute("d")?(this.len=this.path.getTotalLength(),this.slicedLen=this.len*(this.props.pathEnd-this.props.pathStart),this.startLen=this.props.pathStart*this.len,this.fill=this.props.fill,null!=this.fill&&(this.container=this.parseEl(this.props.fill.container),this.fillRule=this.props.fill.fillRule||"all",this.getScaler(),null!=this.container)?(this.removeEvent(this.container,"onresize",this.getScaler),this.addEvent(this.container,"onresize",this.getScaler)):void 0):(o.error("Path has no coordinates to work with, aborting"),!0)):(o.error('Missed "el" option. It could be a selector, DOMNode or another module.'),!0)},t.prototype.addEvent=function(t,e,r){return t.addEventListener(e,r,!1)},t.prototype.removeEvent=function(t,e,r){return t.removeEventListener(e,r,!1)},t.prototype.createFilter=function(){var t,e;return t=document.createElement("div"),this.filterID="filter-"+o.getUniqID(),t.innerHTML='',e=t.querySelector("#svg-"+this.filterID),this.filter=e.querySelector("#blur"),this.filterOffset=e.querySelector("#blur-offset"),document.body.insertBefore(e,document.body.firstChild),this.el.style.filter="url(#"+this.filterID+")",this.el.style[o.prefix.css+"filter"]="url(#"+this.filterID+")"},t.prototype.parseEl=function(t){return"string"==typeof t?document.querySelector(t):t instanceof HTMLElement?t:null!=t._setProp?(this.isModule=!0,t):void 0},t.prototype.getPath=function(){var t;return t=o.parsePath(this.props.path),t?t:this.props.path.x||this.props.path.y?this.curveToPath({start:{x:0,y:0},shift:{x:this.props.path.x||0,y:this.props.path.y||0},curvature:{x:this.props.curvature.x||this.defaults.curvature.x,y:this.props.curvature.y||this.defaults.curvature.y}}):void 0},t.prototype.getScaler=function(){var t,e,r;switch(this.cSize={width:this.container.offsetWidth||0,height:this.container.offsetHeight||0},r=this.path.getPointAtLength(0),t=this.path.getPointAtLength(this.len),e={},this.scaler={},e.width=t.x>=r.x?t.x-r.x:r.x-t.x,e.height=t.y>=r.y?t.y-r.y:r.y-t.y,this.fillRule){case"all":return this.calcWidth(e),this.calcHeight(e);case"width":return this.calcWidth(e),this.scaler.y=this.scaler.x;case"height":return this.calcHeight(e),this.scaler.x=this.scaler.y}},t.prototype.calcWidth=function(t){return this.scaler.x=this.cSize.width/t.width,!isFinite(this.scaler.x)&&(this.scaler.x=1)},t.prototype.calcHeight=function(t){return this.scaler.y=this.cSize.height/t.height,!isFinite(this.scaler.y)&&(this.scaler.y=1)},t.prototype.run=function(t){var e,r,i;if(t){e=this.history[0];for(r in t)i=t[r],o.callbacksMap[r]||o.tweenOptionMap[r]?(o.warn('the property "'+r+'" property can not be overridden on run yet'),delete t[r]):this.history[0][r]=i;this.tuneOptions(t)}return this.startTween()},t.prototype.createTween=function(){return this.tween=new n({duration:this.props.duration,delay:this.props.delay,yoyo:this.props.yoyo,repeat:this.props.repeat,easing:this.props.easing,onStart:function(t){return function(){var e;return null!=(e=t.props.onStart)?e.apply(t):void 0}}(this),onComplete:function(t){return function(){var e;return t.props.motionBlur&&t.setBlur({blur:{x:0,y:0},offset:{x:0,y:0}}),null!=(e=t.props.onComplete)?e.apply(t):void 0}}(this),onUpdate:function(t){return function(e){return t.setProgress(e)}}(this),onFirstUpdate:function(t){return function(e,r){return e?void 0:t.history.length>1&&t.tuneOptions(t.history[0])}}(this)}),this.timeline=new s,this.timeline.add(this.tween),!this.props.isRunLess&&this.startTween(),this.props.isPresetPosition&&this.setProgress(0,!0)},t.prototype.startTween=function(){return setTimeout(function(t){return function(){var e;return null!=(e=t.timeline)?e.play():void 0}}(this),1)},t.prototype.setProgress=function(t,e){var r,i,s,n;return r=this.startLen+(this.props.isReverse?(1-t)*this.slicedLen:t*this.slicedLen),i=this.path.getPointAtLength(r),s=i.x+this.props.offsetX,n=i.y+this.props.offsetY,this._getCurrentAngle(i,r,t),this._setTransformOrigin(t),this._setTransform(s,n,t,e),this.props.motionBlur&&this.makeMotionBlur(s,n)},t.prototype.setElPosition=function(t,e,r){var i,s,n,a;return n=0!==this.angle?"rotate("+this.angle+"deg)":"",s=this.props.isCompositeLayer&&o.is3d,i=s?"translateZ(0)":"",a="translate("+t+"px,"+e+"px) "+n+" "+i,o.setPrefixedStyle(this.el,"transform",a)},t.prototype.setModulePosition=function(t,e){return this.el._setProp({shiftX:t+"px",shiftY:e+"px",angle:this.angle}),this.el._draw()},t.prototype._getCurrentAngle=function(t,e,r){var i,s,n,a,p;return s="function"==typeof this.props.transformOrigin,this.props.isAngle||null!=this.props.angleOffset||s?(n=this.path.getPointAtLength(e-1),a=t.y-n.y,p=t.x-n.x,i=Math.atan(a/p),!isFinite(i)&&(i=0),this.angle=i*o.RAD_TO_DEG,"function"!=typeof this.props.angleOffset?this.angle+=this.props.angleOffset||0:this.angle=this.props.angleOffset.call(this,this.angle,r)):this.angle=0; -},t.prototype._setTransformOrigin=function(t){var e,r;return this.props.transformOrigin?(e="function"==typeof this.props.transformOrigin,r=e?this.props.transformOrigin(this.angle,t):this.props.transformOrigin,o.setPrefixedStyle(this.el,"transform-origin",r)):void 0},t.prototype.makeMotionBlur=function(t,e){var r,i,s,n,a,p,u;return u=0,a=1,p=1,null==this.prevCoords.x||null==this.prevCoords.y?(this.speedX=0,this.speedY=0):(s=t-this.prevCoords.x,n=e-this.prevCoords.y,s>0&&(a=-1),0>a&&(p=-1),this.speedX=Math.abs(s),this.speedY=Math.abs(n),u=Math.atan(n/s)*(180/Math.PI)+90),r=u-this.angle,i=this.angToCoords(r),this.blurX=o.clamp(this.speedX/16*this.props.motionBlur,0,1),this.blurY=o.clamp(this.speedY/16*this.props.motionBlur,0,1),this.setBlur({blur:{x:3*this.blurX*this.blurAmount*Math.abs(i.x),y:3*this.blurY*this.blurAmount*Math.abs(i.y)},offset:{x:3*a*this.blurX*i.x*this.blurAmount,y:3*p*this.blurY*i.y*this.blurAmount}}),this.prevCoords.x=t,this.prevCoords.y=e},t.prototype.setBlur=function(t){return this.isMotionBlurReset?void 0:(this.filter.setAttribute("stdDeviation",t.blur.x+","+t.blur.y),this.filterOffset.setAttribute("dx",t.offset.x),this.filterOffset.setAttribute("dy",t.offset.y))},t.prototype.extendDefaults=function(t){var e,r,i;r=[];for(e in t)i=t[e],r.push(this[e]=i);return r},t.prototype.extendOptions=function(t){var e,r,i;r=[];for(e in t)i=t[e],r.push(this.props[e]=i);return r},t.prototype.then=function(t){var e,r,i,s,a;s=this.history[this.history.length-1],i={};for(r in s)a=s[r],!o.callbacksMap[r]&&!o.tweenOptionMap[r]||"duration"===r?null==t[r]&&(t[r]=a):null==t[r]&&(t[r]=void 0),o.tweenOptionMap[r]&&(i[r]="duration"!==r?t[r]:null!=t[r]?t[r]:s[r]);return this.history.push(t),e=this,i.onUpdate=function(t){return function(e){return t.setProgress(e)}}(this),i.onStart=function(t){return function(){var e;return null!=(e=t.props.onStart)?e.apply(t):void 0}}(this),i.onComplete=function(t){return function(){var e;return null!=(e=t.props.onComplete)?e.apply(t):void 0}}(this),i.onFirstUpdate=function(){return e.tuneOptions(e.history[this.index])},i.isChained=!t.delay,this.timeline.append(new n(i)),this},t.prototype.tuneOptions=function(t){return this.extendOptions(t),this.postVars()},t.prototype.angToCoords=function(t){var e,r,i;return t%=360,e=(t-90)*Math.PI/180,r=Math.cos(e),i=Math.sin(e),r=0>r?Math.max(r,-.7):Math.min(r,.7),i=0>i?Math.max(i,-.7):Math.min(i,.7),{x:1.428571429*r,y:1.428571429*i}},t}(),t.exports=i},function(t,e,r){var i,s,n,o,a,p;n=r(37),s=r(38),p=r(39),a=r(16),i=function(){function t(){}return t.prototype.bezier=n,t.prototype.PathEasing=s,t.prototype.path=new s("creator").create,t.prototype.inverse=function(t){return 1-t},t.prototype.linear={none:function(t){return t}},t.prototype.ease={"in":n.apply(t,[.42,0,1,1]),out:n.apply(t,[0,0,.58,1]),inout:n.apply(t,[.42,0,.58,1])},t.prototype.quad={"in":function(t){return t*t},out:function(t){return t*(2-t)},inout:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},t.prototype.cubic={"in":function(t){return t*t*t},out:function(t){return--t*t*t+1},inout:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},t.prototype.quart={"in":function(t){return t*t*t*t},out:function(t){return 1- --t*t*t*t},inout:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},t.prototype.quint={"in":function(t){return t*t*t*t*t},out:function(t){return--t*t*t*t*t+1},inout:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},t.prototype.sin={"in":function(t){return 1-Math.cos(t*Math.PI/2)},out:function(t){return Math.sin(t*Math.PI/2)},inout:function(t){return.5*(1-Math.cos(Math.PI*t))}},t.prototype.expo={"in":function(t){return 0===t?0:Math.pow(1024,t-1)},out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},inout:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},t.prototype.circ={"in":function(t){return 1-Math.sqrt(1-t*t)},out:function(t){return Math.sqrt(1- --t*t)},inout:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},t.prototype.back={"in":function(t){var e;return e=1.70158,t*t*((e+1)*t-e)},out:function(t){var e;return e=1.70158,--t*t*((e+1)*t+e)+1},inout:function(t){var e;return e=2.5949095,(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)}},t.prototype.elastic={"in":function(t){var e,r,i;return i=void 0,r=.4,0===t?0:1===t?1:(e=1,i=r/4,-(e*Math.pow(2,10*(t-=1))*Math.sin(2*(t-i)*Math.PI/r)))},out:function(t){var e,r,i;return i=void 0,r=.4,0===t?0:1===t?1:(e=1,i=r/4,e*Math.pow(2,-10*t)*Math.sin(2*(t-i)*Math.PI/r)+1)},inout:function(t){var e,r,i;return i=void 0,r=.4,0===t?0:1===t?1:(e=1,i=r/4,(t*=2)<1?-.5*e*Math.pow(2,10*(t-=1))*Math.sin(2*(t-i)*Math.PI/r):e*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-i)*Math.PI/r)*.5+1)}},t.prototype.bounce={"in":function(t){return 1-o.bounce.out(1-t)},out:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},inout:function(t){return.5>t?.5*o.bounce["in"](2*t):.5*o.bounce.out(2*t-1)+.5}},t.prototype.parseEasing=function(t){var e,r;return null==t&&(t="linear.none"),r=typeof t,"string"===r?"m"===t.charAt(0).toLowerCase()?this.path(t):(t=this._splitEasing(t),e=this[t[0]],e?e[t[1]]:(a.error('Easing with name "'+t[0]+'" was not found, fallback to "linear.none" instead'),this.linear.none)):a.isArray(t)?this.bezier.apply(this,t):t},t.prototype._splitEasing=function(t){var e,r,i;return"function"==typeof t?t:"string"==typeof t&&t.length?(i=t.split("."),e=i[0].toLowerCase()||"linear",r=i[1].toLowerCase()||"none",[e,r]):["linear","none"]},t}(),o=new i,o.mix=p(o),t.exports=o},function(t,e,r){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(15),n=i(s);e["default"]=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":n["default"](e))&&"function"!=typeof e?t:e}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(41),n=i(s),o=r(42),a=i(o),p=r(15),u=i(p);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":u["default"](e)));t.prototype=a["default"](e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(n["default"]?n["default"](t,e):t.__proto__=e)}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(26),n=i(s),o=r(15),a=i(o),p=r(20),u=i(p),l=r(21),h=i(l),c=r(22),f=i(c),d=r(13),_=i(d),y=r(16),m=i(y),g=function(t){function e(){return u["default"](this,e),h["default"](this,t.apply(this,arguments))}return f["default"](e,t),e.prototype._declareDefaults=function(){this._defaults={ns:"http://www.w3.org/2000/svg",ctx:null,shape:"line",ratio:1,radius:50,radiusX:void 0,radiusY:void 0,points:3,x:0,y:0,rx:0,ry:0,angle:0,stroke:"hotpink","stroke-width":2,"stroke-opacity":1,fill:"transparent","fill-opacity":1,"stroke-dasharray":"","stroke-dashoffset":"","stroke-linecap":""},this._drawMap=["stroke","stroke-width","stroke-opacity","stroke-dasharray","fill","stroke-dashoffset","stroke-linecap","fill-opacity","transform"]},e.prototype._vars=function(){if(this._o.ctx&&"svg"===this._o.ctx.tagName)this.ctx=this._o.ctx;else if(!this._o.el)return m["default"].error("You should pass a real context(ctx) to the bit"),!0;this._state={},this._drawMapLength=this._drawMap.length},e.prototype.setAttr=function(t,e){if("object"===("undefined"==typeof t?"undefined":a["default"](t)))for(var r=n["default"](t),i=r.length,s=e||this.el;i--;){var o=r[i],p=t[o];s.setAttribute(o,p)}else this.el.setAttribute(t,e)},e.prototype.setProp=function(t,e){if("object"===("undefined"==typeof t?"undefined":a["default"](t)))for(var r in t){var i=t[r];this._props[r]=i}else this._props[t]=e},e.prototype._render=function(){this.isRendered=!0,null!=this._o.el?(this.el=this._o.el,this.isForeign=!0):(this.el=document.createElementNS(this._props.ns,this._props.shape),!this._o.isDrawLess&&this.draw(),this.ctx.appendChild(this.el))},e.prototype.draw=function(){this._props.length=this.getLength();for(var t=this._drawMapLength;t--;){var e=this._drawMap[t];switch(e){case"stroke-dasharray":case"stroke-dashoffset":this.castStrokeDash(e)}this.setAttrIfChanged(e,this._props[e])}this._state.radius=this._props.radius},e.prototype.castStrokeDash=function(t){var e=this._props;if(m["default"].isArray(e[t])){for(var r="",i=0;i=h?0>a:a>0;r=0>=h?++a:--a)i=_+r*c+d,n=y+r*f+d,s=_+(r-1)*c+d,o=y+(r-1)*f+d,t=r===this._props.points?"M":"L",p+=""+t+i+","+n+" l0, -"+f+" l-"+c+", 0";return this.setAttr({d:p}),e.__super__.draw.apply(this,arguments)}},e}(i),t.exports=s},function(t,e,r){var i,s,n,o=function(t,e){function r(){this.constructor=t}for(var i in e)a.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=r(23)["default"]||r(23),n=r(16),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._declareDefaults=function(){return e.__super__._declareDefaults.apply(this,arguments),this._defaults.shape="path"},e.prototype.draw=function(){return this.drawShape(),e.__super__.draw.apply(this,arguments)},e.prototype.drawShape=function(){var t,e,r,i,s,o,a,p,u,l;for(l=360/this._props.points,this.radialPoints=[],r=i=0,p=this._props.points;p>=0?p>i:i>p;r=p>=0?++i:--i)this.radialPoints.push(n.getRadialPoint({radius:this._props.radius,radiusX:this._props.radiusX,radiusY:this._props.radiusY,angle:r*l,center:{x:parseFloat(this._props.x),y:parseFloat(this._props.y)}}));for(e="",u=this.radialPoints,r=s=0,o=u.length;o>s;r=++s)a=u[r],t=0===r?"M":"L",e+=""+t+a.x.toFixed(4)+","+a.y.toFixed(4)+" ";return this.setAttr({d:e+="z"})},e.prototype.getLength=function(){return this.el.getTotalLength()},e}(i),t.exports=s},function(t,e,r){var i,s,n=function(t,e){function r(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=r(23)["default"]||r(23),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._declareDefaults=function(){return e.__super__._declareDefaults.apply(this,arguments),this._defaults.shape="path"},e.prototype.draw=function(){var t,r,i,s,n,o,a,p,u,l,h;return e.__super__.draw.apply(this,arguments),s=null!=this._props.radiusX?this._props.radiusX:this._props.radius,n=null!=this._props.radiusY?this._props.radiusY:this._props.radius,o=parseInt(this._props.x,10),u=parseInt(this._props.y,10),a=o-s,p=o+s,r="M"+a+","+this._props.y+" L"+p+","+this._props.y,l=u-n,h=u+n,i="M"+this._props.x+","+l+" L"+this._props.x+","+h,t=r+" "+i,this.setAttr({d:t})},e.prototype.getLength=function(){var t,e;return t=null!=this._props.radiusX?this._props.radiusX:this._props.radius,e=null!=this._props.radiusY?this._props.radiusY:this._props.radius,2*(t+e)},e}(i),t.exports=s},function(t,e,r){var i,s,n=function(t,e){function r(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=r(23)["default"]||r(23),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._declareDefaults=function(){return e.__super__._declareDefaults.apply(this,arguments),this._defaults.shape="path",this._defaults.ratio=1.43},e.prototype.draw=function(){var t,r,i,s,n,o,a,p,u,l,h;if(e.__super__.draw.apply(this,arguments),this._props.points){for(s=null!=this._props.radiusX?this._props.radiusX:this._props.radius,n=null!=this._props.radiusY?this._props.radiusY:this._props.radius,a=this._props.x-s,p=this._props.x+s,t="",h=2*n/(this._props.points-1),l=this._props.y-n,r=i=0,o=this._props.points;o>=0?o>i:i>o;r=o>=0?++i:--i)u=""+(r*h+l),t+="M"+a+", "+u+" L"+p+", "+u+" ";return this.setAttr({d:t})}},e.prototype.getLength=function(){return 2*(null!=this._props.radiusX?this._props.radiusX:this._props.radius)},e}(i),t.exports=s},function(t,e,r){(function(e){var i,s,n,o=[].indexOf||function(t){for(var e=0,r=this.length;r>e;e++)if(e in this&&this[e]===t)return e;return-1};n=r(16),i=function(){function t(t){return this.vars(),this.generate}return t.prototype.vars=function(){return this.generate=n.bind(this.generate,this)},t.prototype.generate=function(t,r,i,s){var n,a,p,u,l,h,c,f,d,_,y,m,g,v,w,b,S,x,T,P,M,k,C,E;if(arguments.length<4)return this.error("Bezier function expects 4 arguments");for(S=x=0;4>x;S=++x)if(d=arguments[S],"number"!=typeof d||isNaN(d)||!isFinite(d))return this.error("Bezier function expects 4 arguments");return 0>t||t>1||0>i||i>1?this.error("Bezier x values should be > 0 and < 1"):(u=4,l=.001,c=1e-7,h=10,P=11,T=1/(P-1),v=o.call(e,"Float32Array")>=0,n=function(t,e){return 1-3*e+3*t},a=function(t,e){return 3*e-6*t},p=function(t){return 3*t},y=function(t,e,r){return((n(e,r)*t+a(e,r))*t+p(e))*t},w=function(t,e,r){return 3*n(e,r)*t*t+2*a(e,r)*t+p(e)},k=function(e,r){var s,n;for(S=0;u>S;){if(s=w(r,t,i),0===s)return r;n=y(r,t,i)-e,r-=n/s,++S}return r},m=function(){for(S=0;P>S;)M[S]=y(S*T,t,i),++S},_=function(e,r,s){var n,o,a;for(o=void 0,n=void 0,S=0;;)if(n=r+(s-r)/2,o=y(n,t,i)-e,o>0?s=n:r=n,a=Math.abs(o)>c,!(a&&++S=l?k(e,o):0===a?o:_(e,p,p+T)},C=function(){var e;return e=!0,t!==r||i!==s?m():void 0},M=v?new Float32Array(P):new Array(P),f=!1,g=function(e){return f||C(),t===r&&i===s?e:0===e?0:1===e?1:y(b(e),r,s)},E="bezier("+[t,r,i,s]+")",g.toStr=function(){return E},g)},t.prototype.error=function(t){return n.error(t)},t}(),s=new i,t.exports=s}).call(e,function(){return this}())},function(t,e,r){var i,s;s=r(16),i=function(){function t(t,e){if(this.o=null!=e?e:{},"creator"!==t){if(this.path=s.parsePath(t),null==this.path)return s.error("Error while parsing the path");this._vars(),this.path.setAttribute("d",this._normalizePath(this.path.getAttribute("d"))),this.pathLength=this.path.getTotalLength(),this.sample=s.bind(this.sample,this),this._hardSample=s.bind(this._hardSample,this),this._preSample()}}return t.prototype._vars=function(){return this._precompute=s.clamp(this.o.precompute||1450,100,1e4),this._step=1/this._precompute,this._rect=this.o.rect||100,this._approximateMax=this.o.approximateMax||5,this._eps=this.o.eps||.001,this._boundsPrevProgress=-1},t.prototype._preSample=function(){var t,e,r,i,s,n,o;for(this._samples=[],o=[],t=e=0,n=this._precompute;n>=0?n>=e:e>=n;t=n>=0?++e:--e)s=t*this._step,r=this.pathLength*s,i=this.path.getPointAtLength(r),o.push(this._samples[t]={point:i,length:r,progress:s});return o},t.prototype._findBounds=function(t,e){var r,i,s,n,o,a,p,u,l,h,c,f,d;if(e===this._boundsPrevProgress)return this._prevBounds;for(null==this._boundsStartIndex&&(this._boundsStartIndex=0),a=t.length,this._boundsPrevProgress>e?(p=0,i="reverse"):(p=a,i="forward"),"forward"===i?(f=t[0],s=t[t.length-1]):(f=t[t.length-1],s=t[0]),n=o=h=this._boundsStartIndex,c=p;c>=h?c>o:o>c;n=c>=h?++o:--o){if(d=t[n],l=d.point.x/this._rect,u=e,"reverse"===i&&(r=l,l=u,u=r),!(u>l)){s=d;break}f=d,this._boundsStartIndex=n}return this._boundsPrevProgress=e,this._prevBounds={start:f,end:s}},t.prototype.sample=function(t){var e,r;return t=s.clamp(t,0,1),e=this._findBounds(this._samples,t),r=this._checkIfBoundsCloseEnough(t,e),null!=r?r:this._findApproximate(t,e.start,e.end)},t.prototype._checkIfBoundsCloseEnough=function(t,e){var r,i;return r=void 0,i=this._checkIfPointCloseEnough(t,e.start.point),null!=i?i:this._checkIfPointCloseEnough(t,e.end.point)},t.prototype._checkIfPointCloseEnough=function(t,e){return s.closeEnough(t,e.x/this._rect,this._eps)?this._resolveY(e):void 0},t.prototype._approximate=function(t,e,r){var i,s;return i=e.point.x-t.point.x,s=(r-t.point.x/this._rect)/(i/this._rect),t.length+s*(e.length-t.length)},t.prototype._findApproximate=function(t,e,r,i){var n,o,a,p,u;return null==i&&(i=this._approximateMax),n=this._approximate(e,r,t),p=this.path.getPointAtLength(n),u=p.x/this._rect,s.closeEnough(t,u,this._eps)?this._resolveY(p):--i<1?this._resolveY(p):(a={point:p,length:n},o=u>t?[t,e,a,i]:[t,a,r,i],this._findApproximate.apply(this,o))},t.prototype._resolveY=function(t){return 1-t.y/this._rect},t.prototype._normalizePath=function(t){var e,r,i,s,n,o;return o=/[M|L|H|V|C|S|Q|T|A]/gim,s=t.split(o),s.shift(),e=t.match(o),n=0,s[n]=this._normalizeSegment(s[n]),r=s.length-1,s[r]=this._normalizeSegment(s[r],this._rect||100),i=this._joinNormalizedPath(e,s)},t.prototype._joinNormalizedPath=function(t,e){var r,i,s,n,o,a;for(o="",i=s=0,n=t.length;n>s;i=++s)r=t[i],a=0===i?"":" ",o+=""+a+r+e[i].trim();return o},t.prototype._normalizeSegment=function(t,e){var r,i,s,n,o,a,p,u,l,h;if(null==e&&(e=0),t=t.trim(),o=/(-|\+)?((\d+(\.(\d|\e(-|\+)?)+)?)|(\.?(\d|\e|(\-|\+))+))/gim,a=this._getSegmentPairs(t.match(o)),s=a[a.length-1],h=s[0],p=Number(h),p!==e)for(t="",s[0]=e,r=i=0,n=a.length;n>i;r=++i)u=a[r],l=0===r?"":" ",t+=""+l+u[0]+","+u[1];return t},t.prototype._getSegmentPairs=function(t){var e,r,i,n,o,a;for(t.length%2!==0&&s.error("Failed to parse the path - segment pairs are not even.",t),n=[],e=r=0,i=t.length;i>r;e=r+=2)a=t[e],o=[t[e],t[e+1]],n.push(o);return n},t.prototype.create=function(e,r){var i;return i=new t(e,r),i.sample.path=i.path,i.sample},t}(),t.exports=i},function(t,e,r){var i,s,n,o,a,p,u=[].slice;s=null,a=function(t){return"number"==typeof t.value?t.value:s.parseEasing(t.value)},p=function(t,e){var r;return t.value=a(t),e.value=a(e),r=0,t.toe.to&&(r=1),r},n=function(t,e){var r,i,s,n,o;for(i=0,r=s=0,n=t.length;n>s&&(o=t[r],i=r,!(o.to>e));r=++s);return i},o=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],t.length>1?t=t.sort(p):t[0].value=a(t[0]),function(e){var r,i;return r=n(t,e),-1!==r?(i=t[r].value,r===t.length-1&&e>t[r].to?1:"function"==typeof i?i(e):i):void 0}},i=function(t){return s=t,o},t.exports=i},function(t,e,r){var i,s;!function(){var r;return r=function(){function t(t){this.o=null!=t?t:{},window.isAnyResizeEventInited||(this.vars(),this.redefineProto())}return t.prototype.vars=function(){return window.isAnyResizeEventInited=!0,this.allowedProtos=[HTMLDivElement,HTMLFormElement,HTMLLinkElement,HTMLBodyElement,HTMLParagraphElement,HTMLFieldSetElement,HTMLLegendElement,HTMLLabelElement,HTMLButtonElement,HTMLUListElement,HTMLOListElement,HTMLLIElement,HTMLHeadingElement,HTMLQuoteElement,HTMLPreElement,HTMLBRElement,HTMLFontElement,HTMLHRElement,HTMLModElement,HTMLParamElement,HTMLMapElement,HTMLTableElement,HTMLTableCaptionElement,HTMLImageElement,HTMLTableCellElement,HTMLSelectElement,HTMLInputElement,HTMLTextAreaElement,HTMLAnchorElement,HTMLObjectElement,HTMLTableColElement,HTMLTableSectionElement,HTMLTableRowElement],this.timerElements={img:1,textarea:1,input:1,embed:1,object:1,svg:1,canvas:1,tr:1,tbody:1,thead:1,tfoot:1,a:1,select:1,option:1,optgroup:1,dl:1,dt:1,br:1,basefont:1,font:1,col:1,iframe:1}},t.prototype.redefineProto=function(){var t,e,r,i;return e=this,i=function(){var i,s,n,o;for(n=this.allowedProtos,o=[],t=i=0,s=n.length;s>i;t=++i)r=n[t],null!=r.prototype&&o.push(function(t){var r,i;return r=t.prototype.addEventListener||t.prototype.attachEvent,function(r){var i;return i=function(){var t;return(this!==window||this!==document)&&(t="onresize"===arguments[0]&&!this.isAnyResizeEventInited,t&&e.handleResize({args:arguments,that:this})),r.apply(this,arguments)},t.prototype.addEventListener?t.prototype.addEventListener=i:t.prototype.attachEvent?t.prototype.attachEvent=i:void 0}(r),i=t.prototype.removeEventListener||t.prototype.detachEvent,function(e){var r;return r=function(){return this.isAnyResizeEventInited=!1,this.iframe&&this.removeChild(this.iframe),e.apply(this,arguments)},t.prototype.removeEventListener?t.prototype.removeEventListener=r:t.prototype.detachEvent?t.prototype.detachEvent=wrappedListener:void 0}(i)}(r));return o}.call(this)},t.prototype.handleResize=function(t){var e,r,i,s,n,o,a;return r=t.that,this.timerElements[r.tagName.toLowerCase()]?this.initTimer(r):(i=document.createElement("iframe"),r.appendChild(i),i.style.width="100%",i.style.height="100%",i.style.position="absolute",i.style.zIndex=-999,i.style.opacity=0,i.style.top=0,i.style.left=0,e=window.getComputedStyle?getComputedStyle(r):r.currentStyle,n=""===r.style.position,o="static"===e.position&&n,s=""===e.position&&""===r.style.position,(o||s)&&(r.style.position="relative"),null!=(a=i.contentWindow)&&(a.onresize=function(t){return function(e){return t.dispatchEvent(r)}}(this)),r.iframe=i),r.isAnyResizeEventInited=!0},t.prototype.initTimer=function(t){var e,r;return r=0,e=0,this.interval=setInterval(function(i){return function(){var s,n;return n=t.offsetWidth,s=t.offsetHeight,n!==r||s!==e?(i.dispatchEvent(t),r=n,e=s):void 0}}(this),this.o.interval||62.5)},t.prototype.dispatchEvent=function(t){var e;return document.createEvent?(e=document.createEvent("HTMLEvents"),e.initEvent("onresize",!1,!1),t.dispatchEvent(e)):document.createEventObject?(e=document.createEventObject(),t.fireEvent("onresize",e)):!1},t.prototype.destroy=function(){var t,e,r,i,s,n,o;for(clearInterval(this.interval),this.interval=null,window.isAnyResizeEventInited=!1,e=this,n=this.allowedProtos,o=[],t=r=0,i=n.length;i>r;t=++r)s=n[t],null!=s.prototype&&o.push(function(t){var e;return e=t.prototype.addEventListener||t.prototype.attachEvent,t.prototype.addEventListener?t.prototype.addEventListener=Element.prototype.addEventListener:t.prototype.attachEvent&&(t.prototype.attachEvent=Element.prototype.attachEvent),t.prototype.removeEventListener?t.prototype.removeEventListener=Element.prototype.removeEventListener:t.prototype.detachEvent?t.prototype.detachEvent=Element.prototype.detachEvent:void 0}(s));return o},t}(),i=[],s=function(){return new r}.apply(e,i),!(void 0!==s&&(t.exports=s))}()},function(t,e,r){t.exports={"default":r(47),__esModule:!0}},function(t,e,r){t.exports={"default":r(1),__esModule:!0}},function(t,e,r){r(49),r(50),t.exports=r(51)},function(t,e,r){r(52),t.exports=r(53).Object.keys},function(t,e,r){r(50),r(49),t.exports=r(54)("iterator")},function(t,e,r){r(55),r(56),t.exports=r(53).Symbol},function(t,e,r){r(58),t.exports=r(53).Object.setPrototypeOf},function(t,e,r){var i,s;(function(t){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}var o=r(15),a=n(o),p=r(16),u=n(p),l=r(17),h=n(l),c=r(3),f=n(c),d=r(4),_=n(d),y=r(5),m=n(y),g=r(6),v=n(g),w=r(7),b=n(w),S=r(18),x=n(S),T=r(2),P=n(T),M=r(8),k=n(M),C=r(9),E=n(C),O=r(10),D=n(O),A=r(11),L=n(A),R=r(12),F=n(R),I=r(13),U=n(I),j=r(19),B=n(j),z={revision:"0.229.0",isDebug:!0,helpers:u["default"],Transit:_["default"],Swirl:m["default"],Burst:f["default"],stagger:v["default"],Spriter:b["default"],MotionPath:x["default"],Tween:P["default"],Timeline:k["default"],Tweenable:D["default"],Thenable:L["default"],Tunable:F["default"],Module:U["default"],tweener:E["default"],easing:B["default"],shapesMap:h["default"]};window.mojs=z,z.h=z.helpers,z.delta=z.h.delta,i=[],s=function(){return z}.apply(e,i),!(void 0!==s&&(t.exports=s)),"object"===a["default"](t)&&"object"===a["default"](t.exports)&&(t.exports=z)}).call(e,r(14)(t))},function(t,e,r){r(61);var i=r(62);i.NodeList=i.HTMLCollection=i.Array},function(t,e,r){"use strict";var i=r(59)(!0);r(60)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=i(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){var i=r(65),s=r(66);t.exports=r(53).getIterator=function(t){var e=s(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}},function(t,e,r){var i=r(63);r(64)("keys",function(t){return function(e){return t(i(e))}})},function(t,e,r){var i=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=i)},function(t,e,r){var i=r(67)("wks"),s=r(68),n=r(69).Symbol;t.exports=function(t){return i[t]||(i[t]=n&&n[t]||(n||s)("Symbol."+t))}},function(t,e,r){"use strict";var i=r(57),s=r(69),n=r(70),o=r(71),a=r(72),p=r(73),u=r(74),l=r(67),h=r(75),c=r(68),f=r(54),d=r(76),_=r(77),y=r(78),m=r(79),g=r(65),v=r(80),w=r(81),b=i.getDesc,S=i.setDesc,x=i.create,T=_.get,P=s.Symbol,M=s.JSON,k=M&&M.stringify,C=!1,E=f("_hidden"),O=i.isEnum,D=l("symbol-registry"),A=l("symbols"),L="function"==typeof P,R=Object.prototype,F=o&&u(function(){return 7!=x(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,r){var i=b(R,e);i&&delete R[e],S(t,e,r),i&&t!==R&&S(R,e,i)}:S,I=function(t){var e=A[t]=x(P.prototype);return e._k=t,o&&C&&F(R,t,{configurable:!0,set:function(e){n(this,E)&&n(this[E],t)&&(this[E][t]=!1),F(this,t,w(1,e))}}),e},U=function(t){return"symbol"==typeof t},j=function(t,e,r){return r&&n(A,e)?(r.enumerable?(n(t,E)&&t[E][e]&&(t[E][e]=!1),r=x(r,{enumerable:w(0,!1)})):(n(t,E)||S(t,E,w(1,{})),t[E][e]=!0),F(t,e,r)):S(t,e,r)},B=function(t,e){g(t);for(var r,i=y(e=v(e)),s=0,n=i.length;n>s;)j(t,r=i[s++],e[r]);return t},z=function(t,e){return void 0===e?x(t):B(x(t),e)},N=function(t){var e=O.call(this,t);return e||!n(this,t)||!n(A,t)||n(this,E)&&this[E][t]?e:!0},Y=function(t,e){var r=b(t=v(t),e);return!r||!n(A,e)||n(t,E)&&t[E][e]||(r.enumerable=!0),r},H=function(t){for(var e,r=T(v(t)),i=[],s=0;r.length>s;)n(A,e=r[s++])||e==E||i.push(e);return i},X=function(t){for(var e,r=T(v(t)),i=[],s=0;r.length>s;)n(A,e=r[s++])&&i.push(A[e]);return i},q=function(t){if(void 0!==t&&!U(t)){for(var e,r,i=[t],s=1,n=arguments;n.length>s;)i.push(n[s++]);return e=i[1],"function"==typeof e&&(r=e),(r||!m(e))&&(e=function(t,e){return r&&(e=r.call(this,t,e)),U(e)?void 0:e}),i[1]=e,k.apply(M,i)}},W=u(function(){var t=P();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))});L||(P=function(){if(U(this))throw TypeError("Symbol is not a constructor");return I(c(arguments.length>0?arguments[0]:void 0))},p(P.prototype,"toString",function(){return this._k}),U=function(t){return t instanceof P},i.create=z,i.isEnum=N,i.getDesc=Y,i.setDesc=j,i.setDescs=B,i.getNames=_.get=H,i.getSymbols=X,o&&!r(82)&&p(R,"propertyIsEnumerable",N,!0));var V={"for":function(t){return n(D,t+="")?D[t]:D[t]=P(t)},keyFor:function(t){return d(D,t)},useSetter:function(){ -C=!0},useSimple:function(){C=!1}};i.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var e=f(t);V[t]=L?e:I(e)}),C=!0,a(a.G+a.W,{Symbol:P}),a(a.S,"Symbol",V),a(a.S+a.F*!L,"Object",{create:z,defineProperty:j,defineProperties:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:H,getOwnPropertySymbols:X}),M&&a(a.S+a.F*(!L||W),"JSON",{stringify:q}),h(P,"Symbol"),h(Math,"Math",!0),h(s.JSON,"JSON",!0)},function(t,e,r){},function(t,e,r){var i=Object;t.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},function(t,e,r){var i=r(72);i(i.S,"Object",{setPrototypeOf:r(83).set})},function(t,e,r){var i=r(84),s=r(85);t.exports=function(t){return function(e,r){var n,o,a=String(s(e)),p=i(r),u=a.length;return 0>p||p>=u?t?"":void 0:(n=a.charCodeAt(p),55296>n||n>56319||p+1===u||(o=a.charCodeAt(p+1))<56320||o>57343?t?a.charAt(p):n:t?a.slice(p,p+2):(n-55296<<10)+(o-56320)+65536)}}},function(t,e,r){"use strict";var i=r(82),s=r(72),n=r(73),o=r(86),a=r(70),p=r(62),u=r(87),l=r(75),h=r(57).getProto,c=r(54)("iterator"),f=!([].keys&&"next"in[].keys()),d="@@iterator",_="keys",y="values",m=function(){return this};t.exports=function(t,e,r,g,v,w,b){u(r,e,g);var S,x,T=function(t){if(!f&&t in C)return C[t];switch(t){case _:return function(){return new r(this,t)};case y:return function(){return new r(this,t)}}return function(){return new r(this,t)}},P=e+" Iterator",M=v==y,k=!1,C=t.prototype,E=C[c]||C[d]||v&&C[v],O=E||T(v);if(E){var D=h(O.call(new t));l(D,P,!0),!i&&a(C,d)&&o(D,c,m),M&&E.name!==y&&(k=!0,O=function(){return E.call(this)})}if(i&&!b||!f&&!k&&C[c]||o(C,c,O),p[e]=O,p[P]=m,v)if(S={values:M?O:T(y),keys:w?O:T(_),entries:M?T("entries"):O},b)for(x in S)x in C||n(C,x,S[x]);else s(s.P+s.F*(f||k),e,S);return S}},function(t,e,r){"use strict";var i=r(88),s=r(89),n=r(62),o=r(80);t.exports=r(60)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,s(1)):"keys"==e?s(0,r):"values"==e?s(0,t[r]):s(0,[r,t[r]])},"values"),n.Arguments=n.Array,i("keys"),i("values"),i("entries")},function(t,e,r){t.exports={}},function(t,e,r){var i=r(85);t.exports=function(t){return Object(i(t))}},function(t,e,r){var i=r(72),s=r(53),n=r(74);t.exports=function(t,e){var r=(s.Object||{})[t]||Object[t],o={};o[t]=e(r),i(i.S+i.F*n(function(){r(1)}),"Object",o)}},function(t,e,r){var i=r(90);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var i=r(91),s=r(54)("iterator"),n=r(62);t.exports=r(53).getIteratorMethod=function(t){return void 0!=t?t[s]||t["@@iterator"]||n[i(t)]:void 0}},function(t,e,r){var i=r(69),s="__core-js_shared__",n=i[s]||(i[s]={});t.exports=function(t){return n[t]||(n[t]={})}},function(t,e,r){var i=0,s=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+s).toString(36))}},function(t,e,r){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e,r){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,r){t.exports=!r(74)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var i=r(69),s=r(53),n=r(92),o="prototype",a=function(t,e,r){var p,u,l,h=t&a.F,c=t&a.G,f=t&a.S,d=t&a.P,_=t&a.B,y=t&a.W,m=c?s:s[e]||(s[e]={}),g=c?i:f?i[e]:(i[e]||{})[o];c&&(r=e);for(p in r)u=!h&&g&&p in g,u&&p in m||(l=u?g[p]:r[p],m[p]=c&&"function"!=typeof g[p]?r[p]:_&&u?n(l,i):y&&g[p]==l?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e[o]=t[o],e}(l):d&&"function"==typeof l?n(Function.call,l):l,d&&((m[o]||(m[o]={}))[p]=l))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,t.exports=a},function(t,e,r){t.exports=r(86)},function(t,e,r){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,r){var i=r(57).setDesc,s=r(70),n=r(54)("toStringTag");t.exports=function(t,e,r){t&&!s(t=r?t:t.prototype,n)&&i(t,n,{configurable:!0,value:e})}},function(t,e,r){var i=r(57),s=r(80);t.exports=function(t,e){for(var r,n=s(t),o=i.getKeys(n),a=o.length,p=0;a>p;)if(n[r=o[p++]]===e)return r}},function(t,e,r){var i=r(80),s=r(57).getNames,n={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return s(t)}catch(e){return o.slice()}};t.exports.get=function(t){return o&&"[object Window]"==n.call(t)?a(t):s(i(t))}},function(t,e,r){var i=r(57);t.exports=function(t){var e=i.getKeys(t),r=i.getSymbols;if(r)for(var s,n=r(t),o=i.isEnum,a=0;n.length>a;)o.call(t,s=n[a++])&&e.push(s);return e}},function(t,e,r){var i=r(94);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,r){var i=r(93),s=r(85);t.exports=function(t){return i(s(t))}},function(t,e,r){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){t.exports=!0},function(t,e,r){var i=r(57).getDesc,s=r(90),n=r(65),o=function(t,e){if(n(t),!s(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,s){try{s=r(92)(Function.call,i(Object.prototype,"__proto__").set,2),s(t,[]),e=!(t instanceof Array)}catch(n){e=!0}return function(t,r){return o(t,r),e?t.__proto__=r:s(t,r),t}}({},!1):void 0),check:o}},function(t,e,r){var i=Math.ceil,s=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?s:i)(t)}},function(t,e,r){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var i=r(57),s=r(81);t.exports=r(71)?function(t,e,r){return i.setDesc(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){"use strict";var i=r(57),s=r(81),n=r(75),o={};r(86)(o,r(54)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=i.create(o,{next:s(1,r)}),n(t,e+" Iterator")}},function(t,e,r){t.exports=function(){}},function(t,e,r){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var i=r(94),s=r(54)("toStringTag"),n="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,r,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=(e=Object(t))[s])?r:n?i(e):"Object"==(o=i(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,r){var i=r(95);t.exports=function(t,e,r){if(i(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,s){return t.call(e,r,i,s)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var i=r(94);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,r){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}}]); \ No newline at end of file +},t.prototype._setTransform=function(t,e,r,i){var s;return this.scaler&&(t*=this.scaler.x,e*=this.scaler.y),s=null,i||(s="function"==typeof this.onUpdate?this.onUpdate(r,{x:t,y:e,angle:this.angle}):void 0),this.isModule?this.setModulePosition(t,e):"string"!=typeof s?this.setElPosition(t,e,r):o.setPrefixedStyle(this.el,"transform",s)},t.prototype._setTransformOrigin=function(t){var e,r;return this.props.transformOrigin?(e="function"==typeof this.props.transformOrigin,r=e?this.props.transformOrigin(this.angle,t):this.props.transformOrigin,o.setPrefixedStyle(this.el,"transform-origin",r)):void 0},t.prototype.makeMotionBlur=function(t,e){var r,i,s,n,a,p,u;return u=0,a=1,p=1,null==this.prevCoords.x||null==this.prevCoords.y?(this.speedX=0,this.speedY=0):(s=t-this.prevCoords.x,n=e-this.prevCoords.y,s>0&&(a=-1),0>a&&(p=-1),this.speedX=Math.abs(s),this.speedY=Math.abs(n),u=Math.atan(n/s)*(180/Math.PI)+90),r=u-this.angle,i=this.angToCoords(r),this.blurX=o.clamp(this.speedX/16*this.props.motionBlur,0,1),this.blurY=o.clamp(this.speedY/16*this.props.motionBlur,0,1),this.setBlur({blur:{x:3*this.blurX*this.blurAmount*Math.abs(i.x),y:3*this.blurY*this.blurAmount*Math.abs(i.y)},offset:{x:3*a*this.blurX*i.x*this.blurAmount,y:3*p*this.blurY*i.y*this.blurAmount}}),this.prevCoords.x=t,this.prevCoords.y=e},t.prototype.setBlur=function(t){return this.isMotionBlurReset?void 0:(this.filter.setAttribute("stdDeviation",t.blur.x+","+t.blur.y),this.filterOffset.setAttribute("dx",t.offset.x),this.filterOffset.setAttribute("dy",t.offset.y))},t.prototype.extendDefaults=function(t){var e,r,i;r=[];for(e in t)i=t[e],r.push(this[e]=i);return r},t.prototype.extendOptions=function(t){var e,r,i;r=[];for(e in t)i=t[e],r.push(this.props[e]=i);return r},t.prototype.then=function(t){var e,r,i,s,a;s=this.history[this.history.length-1],i={};for(r in s)a=s[r],!o.callbacksMap[r]&&!o.tweenOptionMap[r]||"duration"===r?null==t[r]&&(t[r]=a):null==t[r]&&(t[r]=void 0),o.tweenOptionMap[r]&&(i[r]="duration"!==r?t[r]:null!=t[r]?t[r]:s[r]);return this.history.push(t),e=this,i.onUpdate=function(t){return function(e){return t.setProgress(e)}}(this),i.onStart=function(t){return function(){var e;return null!=(e=t.props.onStart)?e.apply(t):void 0}}(this),i.onComplete=function(t){return function(){var e;return null!=(e=t.props.onComplete)?e.apply(t):void 0}}(this),i.onFirstUpdate=function(){return e.tuneOptions(e.history[this.index])},i.isChained=!t.delay,this.timeline.append(new n(i)),this},t.prototype.tuneOptions=function(t){return this.extendOptions(t),this.postVars()},t.prototype.angToCoords=function(t){var e,r,i;return t%=360,e=(t-90)*Math.PI/180,r=Math.cos(e),i=Math.sin(e),r=0>r?Math.max(r,-.7):Math.min(r,.7),i=0>i?Math.max(i,-.7):Math.min(i,.7),{x:1.428571429*r,y:1.428571429*i}},t}(),t.exports=i},function(t,e,r){var i,s,n,o,a,p;n=r(35),s=r(36),p=r(37),a=r(16),i=function(){function t(){}return t.prototype.bezier=n,t.prototype.PathEasing=s,t.prototype.path=new s("creator").create,t.prototype.inverse=function(t){return 1-t},t.prototype.linear={none:function(t){return t}},t.prototype.ease={"in":n.apply(t,[.42,0,1,1]),out:n.apply(t,[0,0,.58,1]),inout:n.apply(t,[.42,0,.58,1])},t.prototype.quad={"in":function(t){return t*t},out:function(t){return t*(2-t)},inout:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},t.prototype.cubic={"in":function(t){return t*t*t},out:function(t){return--t*t*t+1},inout:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},t.prototype.quart={"in":function(t){return t*t*t*t},out:function(t){return 1- --t*t*t*t},inout:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},t.prototype.quint={"in":function(t){return t*t*t*t*t},out:function(t){return--t*t*t*t*t+1},inout:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},t.prototype.sin={"in":function(t){return 1-Math.cos(t*Math.PI/2)},out:function(t){return Math.sin(t*Math.PI/2)},inout:function(t){return.5*(1-Math.cos(Math.PI*t))}},t.prototype.expo={"in":function(t){return 0===t?0:Math.pow(1024,t-1)},out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},inout:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},t.prototype.circ={"in":function(t){return 1-Math.sqrt(1-t*t)},out:function(t){return Math.sqrt(1- --t*t)},inout:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},t.prototype.back={"in":function(t){var e;return e=1.70158,t*t*((e+1)*t-e)},out:function(t){var e;return e=1.70158,--t*t*((e+1)*t+e)+1},inout:function(t){var e;return e=2.5949095,(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)}},t.prototype.elastic={"in":function(t){var e,r,i;return i=void 0,r=.4,0===t?0:1===t?1:(e=1,i=r/4,-(e*Math.pow(2,10*(t-=1))*Math.sin(2*(t-i)*Math.PI/r)))},out:function(t){var e,r,i;return i=void 0,r=.4,0===t?0:1===t?1:(e=1,i=r/4,e*Math.pow(2,-10*t)*Math.sin(2*(t-i)*Math.PI/r)+1)},inout:function(t){var e,r,i;return i=void 0,r=.4,0===t?0:1===t?1:(e=1,i=r/4,(t*=2)<1?-.5*e*Math.pow(2,10*(t-=1))*Math.sin(2*(t-i)*Math.PI/r):e*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-i)*Math.PI/r)*.5+1)}},t.prototype.bounce={"in":function(t){return 1-o.bounce.out(1-t)},out:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},inout:function(t){return.5>t?.5*o.bounce["in"](2*t):.5*o.bounce.out(2*t-1)+.5}},t.prototype.parseEasing=function(t){var e,r;return null==t&&(t="linear.none"),r=typeof t,"string"===r?"m"===t.charAt(0).toLowerCase()?this.path(t):(t=this._splitEasing(t),e=this[t[0]],e?e[t[1]]:(a.error('Easing with name "'+t[0]+'" was not found, fallback to "linear.none" instead'),this.linear.none)):a.isArray(t)?this.bezier.apply(this,t):t},t.prototype._splitEasing=function(t){var e,r,i;return"function"==typeof t?t:"string"==typeof t&&t.length?(i=t.split("."),e=i[0].toLowerCase()||"linear",r=i[1].toLowerCase()||"none",[e,r]):["linear","none"]},t}(),o=new i,o.mix=p(o),t.exports=o},function(t,e,r){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(15),n=i(s);e["default"]=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":n["default"](e))&&"function"!=typeof e?t:e}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(41),n=i(s),o=r(42),a=i(o),p=r(15),u=i(p);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":u["default"](e)));t.prototype=a["default"](e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(n["default"]?n["default"](t,e):t.__proto__=e)}},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=r(24),n=i(s),o=r(15),a=i(o),p=r(20),u=i(p),l=r(21),h=i(l),c=r(22),f=i(c),d=r(13),_=i(d),y=r(16),m=i(y),g=function(t){function e(){return u["default"](this,e),h["default"](this,t.apply(this,arguments))}return f["default"](e,t),e.prototype._declareDefaults=function(){this._defaults={ns:"http://www.w3.org/2000/svg",ctx:null,shape:"line",ratio:1,radius:50,radiusX:void 0,radiusY:void 0,points:3,x:0,y:0,rx:0,ry:0,angle:0,stroke:"hotpink","stroke-width":2,"stroke-opacity":1,fill:"transparent","fill-opacity":1,"stroke-dasharray":"","stroke-dashoffset":"","stroke-linecap":""},this._drawMap=["stroke","stroke-width","stroke-opacity","stroke-dasharray","fill","stroke-dashoffset","stroke-linecap","fill-opacity","transform"]},e.prototype._vars=function(){if(this._o.ctx&&"svg"===this._o.ctx.tagName)this.ctx=this._o.ctx;else if(!this._o.el)return m["default"].error("You should pass a real context(ctx) to the bit"),!0;this._state={},this._drawMapLength=this._drawMap.length},e.prototype.setAttr=function(t,e){if("object"===("undefined"==typeof t?"undefined":a["default"](t)))for(var r=n["default"](t),i=r.length,s=e||this.el;i--;){var o=r[i],p=t[o];s.setAttribute(o,p)}else this.el.setAttribute(t,e)},e.prototype.setProp=function(t,e){if("object"===("undefined"==typeof t?"undefined":a["default"](t)))for(var r in t){var i=t[r];this._props[r]=i}else this._props[t]=e},e.prototype._render=function(){this.isRendered=!0,null!=this._o.el?(this.el=this._o.el,this.isForeign=!0):(this.el=document.createElementNS(this._props.ns,this._props.shape),!this._o.isDrawLess&&this.draw(),this.ctx.appendChild(this.el))},e.prototype.draw=function(){this._props.length=this.getLength();for(var t=this._drawMapLength;t--;){var e=this._drawMap[t];switch(e){case"stroke-dasharray":case"stroke-dashoffset":this.castStrokeDash(e)}this.setAttrIfChanged(e,this._props[e])}this._state.radius=this._props.radius},e.prototype.castStrokeDash=function(t){var e=this._props;if(m["default"].isArray(e[t])){for(var r="",i=0;i=h?0>a:a>0;r=0>=h?++a:--a)i=_+r*c+d,n=y+r*f+d,s=_+(r-1)*c+d,o=y+(r-1)*f+d,t=r===this._props.points?"M":"L",p+=""+t+i+","+n+" l0, -"+f+" l-"+c+", 0";return this.setAttr({d:p}),e.__super__.draw.apply(this,arguments)}},e}(i),t.exports=s},function(t,e,r){var i,s,n,o=function(t,e){function r(){this.constructor=t}for(var i in e)a.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=r(23)["default"]||r(23),n=r(16),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._declareDefaults=function(){return e.__super__._declareDefaults.apply(this,arguments),this._defaults.shape="path"},e.prototype.draw=function(){return this.drawShape(),e.__super__.draw.apply(this,arguments)},e.prototype.drawShape=function(){var t,e,r,i,s,o,a,p,u,l;for(l=360/this._props.points,this.radialPoints=[],r=i=0,p=this._props.points;p>=0?p>i:i>p;r=p>=0?++i:--i)this.radialPoints.push(n.getRadialPoint({radius:this._props.radius,radiusX:this._props.radiusX,radiusY:this._props.radiusY,angle:r*l,center:{x:parseFloat(this._props.x),y:parseFloat(this._props.y)}}));for(e="",u=this.radialPoints,r=s=0,o=u.length;o>s;r=++s)a=u[r],t=0===r?"M":"L",e+=""+t+a.x.toFixed(4)+","+a.y.toFixed(4)+" ";return this.setAttr({d:e+="z"})},e.prototype.getLength=function(){return this.el.getTotalLength()},e}(i),t.exports=s},function(t,e,r){var i,s,n=function(t,e){function r(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=r(23)["default"]||r(23),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._declareDefaults=function(){return e.__super__._declareDefaults.apply(this,arguments),this._defaults.shape="path"},e.prototype.draw=function(){var t,r,i,s,n,o,a,p,u,l,h;return e.__super__.draw.apply(this,arguments),s=null!=this._props.radiusX?this._props.radiusX:this._props.radius,n=null!=this._props.radiusY?this._props.radiusY:this._props.radius,o=parseInt(this._props.x,10),u=parseInt(this._props.y,10),a=o-s,p=o+s,r="M"+a+","+this._props.y+" L"+p+","+this._props.y,l=u-n,h=u+n,i="M"+this._props.x+","+l+" L"+this._props.x+","+h,t=r+" "+i,this.setAttr({d:t})},e.prototype.getLength=function(){var t,e;return t=null!=this._props.radiusX?this._props.radiusX:this._props.radius,e=null!=this._props.radiusY?this._props.radiusY:this._props.radius,2*(t+e)},e}(i),t.exports=s},function(t,e,r){var i,s,n=function(t,e){function r(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=r(23)["default"]||r(23),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._declareDefaults=function(){return e.__super__._declareDefaults.apply(this,arguments),this._defaults.shape="path"},e.prototype.draw=function(){var t,r,i,s,n,o,a,p,u,l,h;if(e.__super__.draw.apply(this,arguments),this._props.points){for(s=null!=this._props.radiusX?this._props.radiusX:this._props.radius,n=null!=this._props.radiusY?this._props.radiusY:this._props.radius,a=this._props.x-s,p=this._props.x+s,t="",h=2*n/(this._props.points-1),l=this._props.y-n,r=i=0,o=this._props.points;o>=0?o>i:i>o;r=o>=0?++i:--i)u=""+(r*h+l),t+="M"+a+", "+u+" L"+p+", "+u+" ";return this.setAttr({d:t})}},e.prototype.getLength=function(){return 2*(null!=this._props.radiusX?this._props.radiusX:this._props.radius)},e}(i),t.exports=s},function(t,e,r){(function(e){var i,s,n,o=[].indexOf||function(t){for(var e=0,r=this.length;r>e;e++)if(e in this&&this[e]===t)return e;return-1};n=r(16),i=function(){function t(t){return this.vars(),this.generate}return t.prototype.vars=function(){return this.generate=n.bind(this.generate,this)},t.prototype.generate=function(t,r,i,s){var n,a,p,u,l,h,c,f,d,_,y,m,g,v,w,b,x,S,T,P,M,k,C,E;if(arguments.length<4)return this.error("Bezier function expects 4 arguments");for(x=S=0;4>S;x=++S)if(d=arguments[x],"number"!=typeof d||isNaN(d)||!isFinite(d))return this.error("Bezier function expects 4 arguments");return 0>t||t>1||0>i||i>1?this.error("Bezier x values should be > 0 and < 1"):(u=4,l=.001,c=1e-7,h=10,P=11,T=1/(P-1),v=o.call(e,"Float32Array")>=0,n=function(t,e){return 1-3*e+3*t},a=function(t,e){return 3*e-6*t},p=function(t){return 3*t},y=function(t,e,r){return((n(e,r)*t+a(e,r))*t+p(e))*t},w=function(t,e,r){return 3*n(e,r)*t*t+2*a(e,r)*t+p(e)},k=function(e,r){var s,n;for(x=0;u>x;){if(s=w(r,t,i),0===s)return r;n=y(r,t,i)-e,r-=n/s,++x}return r},m=function(){for(x=0;P>x;)M[x]=y(x*T,t,i),++x},_=function(e,r,s){var n,o,a;for(o=void 0,n=void 0,x=0;;)if(n=r+(s-r)/2,o=y(n,t,i)-e,o>0?s=n:r=n,a=Math.abs(o)>c,!(a&&++x=l?k(e,o):0===a?o:_(e,p,p+T)},C=function(){var e;return e=!0,t!==r||i!==s?m():void 0},M=v?new Float32Array(P):new Array(P),f=!1,g=function(e){return f||C(),t===r&&i===s?e:0===e?0:1===e?1:y(b(e),r,s)},E="bezier("+[t,r,i,s]+")",g.toStr=function(){return E},g)},t.prototype.error=function(t){return n.error(t)},t}(),s=new i,t.exports=s}).call(e,function(){return this}())},function(t,e,r){var i,s;s=r(16),i=function(){function t(t,e){if(this.o=null!=e?e:{},"creator"!==t){if(this.path=s.parsePath(t),null==this.path)return s.error("Error while parsing the path");this._vars(),this.path.setAttribute("d",this._normalizePath(this.path.getAttribute("d"))),this.pathLength=this.path.getTotalLength(),this.sample=s.bind(this.sample,this),this._hardSample=s.bind(this._hardSample,this),this._preSample()}}return t.prototype._vars=function(){return this._precompute=s.clamp(this.o.precompute||1450,100,1e4),this._step=1/this._precompute,this._rect=this.o.rect||100,this._approximateMax=this.o.approximateMax||5,this._eps=this.o.eps||.001,this._boundsPrevProgress=-1},t.prototype._preSample=function(){var t,e,r,i,s,n,o;for(this._samples=[],o=[],t=e=0,n=this._precompute;n>=0?n>=e:e>=n;t=n>=0?++e:--e)s=t*this._step,r=this.pathLength*s,i=this.path.getPointAtLength(r),o.push(this._samples[t]={point:i,length:r,progress:s});return o},t.prototype._findBounds=function(t,e){var r,i,s,n,o,a,p,u,l,h,c,f,d;if(e===this._boundsPrevProgress)return this._prevBounds;for(null==this._boundsStartIndex&&(this._boundsStartIndex=0),a=t.length,this._boundsPrevProgress>e?(p=0,i="reverse"):(p=a,i="forward"),"forward"===i?(f=t[0],s=t[t.length-1]):(f=t[t.length-1],s=t[0]),n=o=h=this._boundsStartIndex,c=p;c>=h?c>o:o>c;n=c>=h?++o:--o){if(d=t[n],l=d.point.x/this._rect,u=e,"reverse"===i&&(r=l,l=u,u=r),!(u>l)){s=d;break}f=d,this._boundsStartIndex=n}return this._boundsPrevProgress=e,this._prevBounds={start:f,end:s}},t.prototype.sample=function(t){var e,r;return t=s.clamp(t,0,1),e=this._findBounds(this._samples,t),r=this._checkIfBoundsCloseEnough(t,e),null!=r?r:this._findApproximate(t,e.start,e.end)},t.prototype._checkIfBoundsCloseEnough=function(t,e){var r,i;return r=void 0,i=this._checkIfPointCloseEnough(t,e.start.point),null!=i?i:this._checkIfPointCloseEnough(t,e.end.point)},t.prototype._checkIfPointCloseEnough=function(t,e){return s.closeEnough(t,e.x/this._rect,this._eps)?this._resolveY(e):void 0},t.prototype._approximate=function(t,e,r){var i,s;return i=e.point.x-t.point.x,s=(r-t.point.x/this._rect)/(i/this._rect),t.length+s*(e.length-t.length)},t.prototype._findApproximate=function(t,e,r,i){var n,o,a,p,u;return null==i&&(i=this._approximateMax),n=this._approximate(e,r,t),p=this.path.getPointAtLength(n),u=p.x/this._rect,s.closeEnough(t,u,this._eps)?this._resolveY(p):--i<1?this._resolveY(p):(a={point:p,length:n},o=u>t?[t,e,a,i]:[t,a,r,i],this._findApproximate.apply(this,o))},t.prototype._resolveY=function(t){return 1-t.y/this._rect},t.prototype._normalizePath=function(t){var e,r,i,s,n,o;return o=/[M|L|H|V|C|S|Q|T|A]/gim,s=t.split(o),s.shift(),e=t.match(o),n=0,s[n]=this._normalizeSegment(s[n]),r=s.length-1,s[r]=this._normalizeSegment(s[r],this._rect||100),i=this._joinNormalizedPath(e,s)},t.prototype._joinNormalizedPath=function(t,e){var r,i,s,n,o,a;for(o="",i=s=0,n=t.length;n>s;i=++s)r=t[i],a=0===i?"":" ",o+=""+a+r+e[i].trim();return o},t.prototype._normalizeSegment=function(t,e){var r,i,s,n,o,a,p,u,l,h;if(null==e&&(e=0),t=t.trim(),o=/(-|\+)?((\d+(\.(\d|\e(-|\+)?)+)?)|(\.?(\d|\e|(\-|\+))+))/gim,a=this._getSegmentPairs(t.match(o)),s=a[a.length-1],h=s[0],p=Number(h),p!==e)for(t="",s[0]=e,r=i=0,n=a.length;n>i;r=++i)u=a[r],l=0===r?"":" ",t+=""+l+u[0]+","+u[1];return t},t.prototype._getSegmentPairs=function(t){var e,r,i,n,o,a;for(t.length%2!==0&&s.error("Failed to parse the path - segment pairs are not even.",t),n=[],e=r=0,i=t.length;i>r;e=r+=2)a=t[e],o=[t[e],t[e+1]],n.push(o);return n},t.prototype.create=function(e,r){var i;return i=new t(e,r),i.sample.path=i.path,i.sample},t}(),t.exports=i},function(t,e,r){var i,s,n,o,a,p,u=[].slice;s=null,a=function(t){return"number"==typeof t.value?t.value:s.parseEasing(t.value)},p=function(t,e){var r;return t.value=a(t),e.value=a(e),r=0,t.toe.to&&(r=1),r},n=function(t,e){var r,i,s,n,o;for(i=0,r=s=0,n=t.length;n>s&&(o=t[r],i=r,!(o.to>e));r=++s);return i},o=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],t.length>1?t=t.sort(p):t[0].value=a(t[0]),function(e){var r,i;return r=n(t,e),-1!==r?(i=t[r].value,r===t.length-1&&e>t[r].to?1:"function"==typeof i?i(e):i):void 0}},i=function(t){return s=t,o},t.exports=i},function(t,e,r){var i,s;!function(){var r;return r=function(){function t(t){this.o=null!=t?t:{},window.isAnyResizeEventInited||(this.vars(),this.redefineProto())}return t.prototype.vars=function(){return window.isAnyResizeEventInited=!0,this.allowedProtos=[HTMLDivElement,HTMLFormElement,HTMLLinkElement,HTMLBodyElement,HTMLParagraphElement,HTMLFieldSetElement,HTMLLegendElement,HTMLLabelElement,HTMLButtonElement,HTMLUListElement,HTMLOListElement,HTMLLIElement,HTMLHeadingElement,HTMLQuoteElement,HTMLPreElement,HTMLBRElement,HTMLFontElement,HTMLHRElement,HTMLModElement,HTMLParamElement,HTMLMapElement,HTMLTableElement,HTMLTableCaptionElement,HTMLImageElement,HTMLTableCellElement,HTMLSelectElement,HTMLInputElement,HTMLTextAreaElement,HTMLAnchorElement,HTMLObjectElement,HTMLTableColElement,HTMLTableSectionElement,HTMLTableRowElement],this.timerElements={img:1,textarea:1,input:1,embed:1,object:1,svg:1,canvas:1,tr:1,tbody:1,thead:1,tfoot:1,a:1,select:1,option:1,optgroup:1,dl:1,dt:1,br:1,basefont:1,font:1,col:1,iframe:1}},t.prototype.redefineProto=function(){var t,e,r,i;return e=this,i=function(){var i,s,n,o;for(n=this.allowedProtos,o=[],t=i=0,s=n.length;s>i;t=++i)r=n[t],null!=r.prototype&&o.push(function(t){var r,i;return r=t.prototype.addEventListener||t.prototype.attachEvent,function(r){var i;return i=function(){var t;return(this!==window||this!==document)&&(t="onresize"===arguments[0]&&!this.isAnyResizeEventInited,t&&e.handleResize({args:arguments,that:this})),r.apply(this,arguments)},t.prototype.addEventListener?t.prototype.addEventListener=i:t.prototype.attachEvent?t.prototype.attachEvent=i:void 0}(r),i=t.prototype.removeEventListener||t.prototype.detachEvent,function(e){var r;return r=function(){return this.isAnyResizeEventInited=!1,this.iframe&&this.removeChild(this.iframe),e.apply(this,arguments)},t.prototype.removeEventListener?t.prototype.removeEventListener=r:t.prototype.detachEvent?t.prototype.detachEvent=wrappedListener:void 0}(i)}(r));return o}.call(this)},t.prototype.handleResize=function(t){var e,r,i,s,n,o,a;return r=t.that,this.timerElements[r.tagName.toLowerCase()]?this.initTimer(r):(i=document.createElement("iframe"),r.appendChild(i),i.style.width="100%",i.style.height="100%",i.style.position="absolute",i.style.zIndex=-999,i.style.opacity=0,i.style.top=0,i.style.left=0,e=window.getComputedStyle?getComputedStyle(r):r.currentStyle,n=""===r.style.position,o="static"===e.position&&n,s=""===e.position&&""===r.style.position,(o||s)&&(r.style.position="relative"),null!=(a=i.contentWindow)&&(a.onresize=function(t){return function(e){return t.dispatchEvent(r)}}(this)),r.iframe=i),r.isAnyResizeEventInited=!0},t.prototype.initTimer=function(t){var e,r;return r=0,e=0,this.interval=setInterval(function(i){return function(){var s,n;return n=t.offsetWidth,s=t.offsetHeight,n!==r||s!==e?(i.dispatchEvent(t),r=n,e=s):void 0}}(this),this.o.interval||62.5)},t.prototype.dispatchEvent=function(t){var e;return document.createEvent?(e=document.createEvent("HTMLEvents"),e.initEvent("onresize",!1,!1),t.dispatchEvent(e)):document.createEventObject?(e=document.createEventObject(),t.fireEvent("onresize",e)):!1},t.prototype.destroy=function(){var t,e,r,i,s,n,o;for(clearInterval(this.interval),this.interval=null,window.isAnyResizeEventInited=!1,e=this,n=this.allowedProtos,o=[],t=r=0,i=n.length;i>r;t=++r)s=n[t],null!=s.prototype&&o.push(function(t){var e;return e=t.prototype.addEventListener||t.prototype.attachEvent,t.prototype.addEventListener?t.prototype.addEventListener=Element.prototype.addEventListener:t.prototype.attachEvent&&(t.prototype.attachEvent=Element.prototype.attachEvent),t.prototype.removeEventListener?t.prototype.removeEventListener=Element.prototype.removeEventListener:t.prototype.detachEvent?t.prototype.detachEvent=Element.prototype.detachEvent:void 0}(s));return o},t}(),i=[],s=function(){return new r}.apply(e,i),!(void 0!==s&&(t.exports=s))}()},function(t,e,r){t.exports={"default":r(45),__esModule:!0}},function(t,e,r){t.exports={"default":r(1),__esModule:!0}},function(t,e,r){t.exports={"default":r(47),__esModule:!0}},function(t,e,r){t.exports={"default":r(46),__esModule:!0}},function(t,e,r){r(49),r(50),t.exports=r(51)},function(t,e,r){r(52),t.exports=r(53).Object.keys},function(t,e,r){r(50),r(49),t.exports=r(54)("iterator")},function(t,e,r){var i=r(55);t.exports=function(t,e){return i.create(t,e)}},function(t,e,r){r(56),t.exports=r(53).Object.setPrototypeOf},function(t,e,r){var i,s;(function(t){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}var o=r(15),a=n(o),p=r(16),u=n(p),l=r(17),h=n(l),c=r(3),f=n(c),d=r(4),_=n(d),y=r(5),m=n(y),g=r(6),v=n(g),w=r(7),b=n(w),x=r(18),S=n(x),T=r(2),P=n(T),M=r(8),k=n(M),C=r(9),E=n(C),O=r(10),D=n(O),A=r(11),L=n(A),R=r(12),F=n(R),I=r(13),U=n(I),j=r(19),B=n(j),z={revision:"0.230.0",isDebug:!0,helpers:u["default"],Transit:_["default"],Swirl:m["default"],Burst:f["default"],stagger:v["default"],Spriter:b["default"],MotionPath:S["default"],Tween:P["default"],Timeline:k["default"],Tweenable:D["default"],Thenable:L["default"],Tunable:F["default"],Module:U["default"],tweener:E["default"],easing:B["default"],shapesMap:h["default"]};window.mojs=z,z.h=z.helpers,z.delta=z.h.delta,i=[],s=function(){return z}.apply(e,i),!(void 0!==s&&(t.exports=s)),"object"===a["default"](t)&&"object"===a["default"](t.exports)&&(t.exports=z)}).call(e,r(14)(t))},function(t,e,r){r(59);var i=r(60);i.NodeList=i.HTMLCollection=i.Array},function(t,e,r){"use strict";var i=r(63)(!0);r(64)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=i(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){var i=r(65),s=r(66);t.exports=r(53).getIterator=function(t){var e=s(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}},function(t,e,r){var i=r(61);r(62)("keys",function(t){return function(e){return t(i(e))}})},function(t,e,r){var i=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=i)},function(t,e,r){var i=r(67)("wks"),s=r(68),n=r(69).Symbol;t.exports=function(t){return i[t]||(i[t]=n&&n[t]||(n||s)("Symbol."+t))}},function(t,e,r){var i=Object;t.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},function(t,e,r){var i=r(70);i(i.S,"Object",{setPrototypeOf:r(71).set})},function(t,e,r){"use strict";var i=r(55),s=r(69),n=r(72),o=r(73),a=r(70),p=r(74),u=r(75),l=r(67),h=r(76),c=r(68),f=r(54),d=r(77),_=r(78),y=r(79),m=r(80),g=r(65),v=r(81),w=r(82),b=i.getDesc,x=i.setDesc,S=i.create,T=_.get,P=s.Symbol,M=s.JSON,k=M&&M.stringify,C=!1,E=f("_hidden"),O=i.isEnum,D=l("symbol-registry"),A=l("symbols"),L="function"==typeof P,R=Object.prototype,F=o&&u(function(){return 7!=S(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a})?function(t,e,r){var i=b(R,e);i&&delete R[e],x(t,e,r),i&&t!==R&&x(R,e,i)}:x,I=function(t){var e=A[t]=S(P.prototype);return e._k=t,o&&C&&F(R,t,{configurable:!0,set:function(e){n(this,E)&&n(this[E],t)&&(this[E][t]=!1),F(this,t,w(1,e))}}),e},U=function(t){return"symbol"==typeof t},j=function(t,e,r){return r&&n(A,e)?(r.enumerable?(n(t,E)&&t[E][e]&&(t[E][e]=!1),r=S(r,{enumerable:w(0,!1)})):(n(t,E)||x(t,E,w(1,{})),t[E][e]=!0),F(t,e,r)):x(t,e,r)},B=function(t,e){g(t);for(var r,i=y(e=v(e)),s=0,n=i.length;n>s;)j(t,r=i[s++],e[r]);return t},z=function(t,e){return void 0===e?S(t):B(S(t),e)},N=function(t){var e=O.call(this,t);return e||!n(this,t)||!n(A,t)||n(this,E)&&this[E][t]?e:!0},Y=function(t,e){var r=b(t=v(t),e);return!r||!n(A,e)||n(t,E)&&t[E][e]||(r.enumerable=!0),r},H=function(t){for(var e,r=T(v(t)),i=[],s=0;r.length>s;)n(A,e=r[s++])||e==E||i.push(e);return i},X=function(t){for(var e,r=T(v(t)),i=[],s=0;r.length>s;)n(A,e=r[s++])&&i.push(A[e]);return i},q=function(t){if(void 0!==t&&!U(t)){for(var e,r,i=[t],s=1,n=arguments;n.length>s;)i.push(n[s++]);return e=i[1],"function"==typeof e&&(r=e), +(r||!m(e))&&(e=function(t,e){return r&&(e=r.call(this,t,e)),U(e)?void 0:e}),i[1]=e,k.apply(M,i)}},W=u(function(){var t=P();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))});L||(P=function(){if(U(this))throw TypeError("Symbol is not a constructor");return I(c(arguments.length>0?arguments[0]:void 0))},p(P.prototype,"toString",function(){return this._k}),U=function(t){return t instanceof P},i.create=z,i.isEnum=N,i.getDesc=Y,i.setDesc=j,i.setDescs=B,i.getNames=_.get=H,i.getSymbols=X,o&&!r(83)&&p(R,"propertyIsEnumerable",N,!0));var V={"for":function(t){return n(D,t+="")?D[t]:D[t]=P(t)},keyFor:function(t){return d(D,t)},useSetter:function(){C=!0},useSimple:function(){C=!1}};i.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var e=f(t);V[t]=L?e:I(e)}),C=!0,a(a.G+a.W,{Symbol:P}),a(a.S,"Symbol",V),a(a.S+a.F*!L,"Object",{create:z,defineProperty:j,defineProperties:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:H,getOwnPropertySymbols:X}),M&&a(a.S+a.F*(!L||W),"JSON",{stringify:q}),h(P,"Symbol"),h(Math,"Math",!0),h(s.JSON,"JSON",!0)},function(t,e,r){},function(t,e,r){"use strict";var i=r(84),s=r(85),n=r(60),o=r(81);t.exports=r(64)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,s(1)):"keys"==e?s(0,r):"values"==e?s(0,t[r]):s(0,[r,t[r]])},"values"),n.Arguments=n.Array,i("keys"),i("values"),i("entries")},function(t,e,r){t.exports={}},function(t,e,r){var i=r(86);t.exports=function(t){return Object(i(t))}},function(t,e,r){var i=r(70),s=r(53),n=r(75);t.exports=function(t,e){var r=(s.Object||{})[t]||Object[t],o={};o[t]=e(r),i(i.S+i.F*n(function(){r(1)}),"Object",o)}},function(t,e,r){var i=r(89),s=r(86);t.exports=function(t){return function(e,r){var n,o,a=String(s(e)),p=i(r),u=a.length;return 0>p||p>=u?t?"":void 0:(n=a.charCodeAt(p),55296>n||n>56319||p+1===u||(o=a.charCodeAt(p+1))<56320||o>57343?t?a.charAt(p):n:t?a.slice(p,p+2):(n-55296<<10)+(o-56320)+65536)}}},function(t,e,r){"use strict";var i=r(83),s=r(70),n=r(74),o=r(90),a=r(72),p=r(60),u=r(91),l=r(76),h=r(55).getProto,c=r(54)("iterator"),f=!([].keys&&"next"in[].keys()),d="@@iterator",_="keys",y="values",m=function(){return this};t.exports=function(t,e,r,g,v,w,b){u(r,e,g);var x,S,T=function(t){if(!f&&t in C)return C[t];switch(t){case _:return function(){return new r(this,t)};case y:return function(){return new r(this,t)}}return function(){return new r(this,t)}},P=e+" Iterator",M=v==y,k=!1,C=t.prototype,E=C[c]||C[d]||v&&C[v],O=E||T(v);if(E){var D=h(O.call(new t));l(D,P,!0),!i&&a(C,d)&&o(D,c,m),M&&E.name!==y&&(k=!0,O=function(){return E.call(this)})}if(i&&!b||!f&&!k&&C[c]||o(C,c,O),p[e]=O,p[P]=m,v)if(x={values:M?O:T(y),keys:w?O:T(_),entries:M?T("entries"):O},b)for(S in x)S in C||n(C,S,x[S]);else s(s.P+s.F*(f||k),e,x);return x}},function(t,e,r){var i=r(87);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var i=r(88),s=r(54)("iterator"),n=r(60);t.exports=r(53).getIteratorMethod=function(t){return void 0!=t?t[s]||t["@@iterator"]||n[i(t)]:void 0}},function(t,e,r){var i=r(69),s="__core-js_shared__",n=i[s]||(i[s]={});t.exports=function(t){return n[t]||(n[t]={})}},function(t,e,r){var i=0,s=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+s).toString(36))}},function(t,e,r){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e,r){var i=r(69),s=r(53),n=r(92),o="prototype",a=function(t,e,r){var p,u,l,h=t&a.F,c=t&a.G,f=t&a.S,d=t&a.P,_=t&a.B,y=t&a.W,m=c?s:s[e]||(s[e]={}),g=c?i:f?i[e]:(i[e]||{})[o];c&&(r=e);for(p in r)u=!h&&g&&p in g,u&&p in m||(l=u?g[p]:r[p],m[p]=c&&"function"!=typeof g[p]?r[p]:_&&u?n(l,i):y&&g[p]==l?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e[o]=t[o],e}(l):d&&"function"==typeof l?n(Function.call,l):l,d&&((m[o]||(m[o]={}))[p]=l))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,t.exports=a},function(t,e,r){var i=r(55).getDesc,s=r(87),n=r(65),o=function(t,e){if(n(t),!s(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,s){try{s=r(92)(Function.call,i(Object.prototype,"__proto__").set,2),s(t,[]),e=!(t instanceof Array)}catch(n){e=!0}return function(t,r){return o(t,r),e?t.__proto__=r:s(t,r),t}}({},!1):void 0),check:o}},function(t,e,r){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,r){t.exports=!r(75)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){t.exports=r(90)},function(t,e,r){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,r){var i=r(55).setDesc,s=r(72),n=r(54)("toStringTag");t.exports=function(t,e,r){t&&!s(t=r?t:t.prototype,n)&&i(t,n,{configurable:!0,value:e})}},function(t,e,r){var i=r(55),s=r(81);t.exports=function(t,e){for(var r,n=s(t),o=i.getKeys(n),a=o.length,p=0;a>p;)if(n[r=o[p++]]===e)return r}},function(t,e,r){var i=r(81),s=r(55).getNames,n={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return s(t)}catch(e){return o.slice()}};t.exports.get=function(t){return o&&"[object Window]"==n.call(t)?a(t):s(i(t))}},function(t,e,r){var i=r(55);t.exports=function(t){var e=i.getKeys(t),r=i.getSymbols;if(r)for(var s,n=r(t),o=i.isEnum,a=0;n.length>a;)o.call(t,s=n[a++])&&e.push(s);return e}},function(t,e,r){var i=r(93);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,r){var i=r(94),s=r(86);t.exports=function(t){return i(s(t))}},function(t,e,r){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){t.exports=!0},function(t,e,r){t.exports=function(){}},function(t,e,r){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var i=r(93),s=r(54)("toStringTag"),n="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,r,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=(e=Object(t))[s])?r:n?i(e):"Object"==(o=i(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,r){var i=Math.ceil,s=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?s:i)(t)}},function(t,e,r){var i=r(55),s=r(82);t.exports=r(73)?function(t,e,r){return i.setDesc(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){"use strict";var i=r(55),s=r(82),n=r(76),o={};r(90)(o,r(54)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=i.create(o,{next:s(1,r)}),n(t,e+" Iterator")}},function(t,e,r){var i=r(95);t.exports=function(t,e,r){if(i(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,s){return t.call(e,r,i,s)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,r){var i=r(93);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}}]); \ No newline at end of file diff --git a/index.html b/index.html index 7733f2c30..6cb67d5ef 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,9 @@ body, html { height: 100%; } + /*div { + outline: 1px solid red; + }*/ .el { background: cyan; position: absolute; diff --git a/js/h.coffee b/js/h.coffee index 1b4d8953c..9995f7fc5 100644 --- a/js/h.coffee +++ b/js/h.coffee @@ -377,7 +377,7 @@ class Helpers b: endColorObj.b - startColorObj.b a: endColorObj.a - startColorObj.a # color strokeDasharray/strokeDashoffset - else if key is 'strokeDasharray' or key is 'strokeDashoffset' + else if key is 'strokeDasharray' or key is 'strokeDashoffset' or key is 'origin' startArr = @strToArr start endArr = @strToArr end @normDashArrays startArr, endArr diff --git a/js/module.babel.js b/js/module.babel.js index 8a2a4c1e1..739eb4fdd 100644 --- a/js/module.babel.js +++ b/js/module.babel.js @@ -10,8 +10,9 @@ class Module { // map of props that should be // parsed to arrays of values this._arrayPropertyMap = { + strokeDashoffset: 1, strokeDasharray: 1, - strokeDashoffset: 1 + origin: 1 } this._skipPropsDelta = { @@ -300,6 +301,7 @@ class Module { _calcCurrentProps ( p ) { for (var key in this._deltas) { var value = this._deltas[key]; + // this._o.isIt && console.log(value) if ( value.type === 'array' ) { var arr; // if prop property is array - reuse it else - create an array @@ -307,12 +309,19 @@ class Module { arr = this._props[key]; arr.length = 0; } else { arr = []; } + for ( var i = 0; i < value.delta.length; i++ ) { var item = value.delta[i], dash = value.start[i].value + p * item.value; - arr.push({ value: dash, unit: item.unit }); + arr.push({ + string: `${dash}${item.unit}`, + value: dash, + unit: item.unit, + }); } + this._props[key] = arr; + } else if ( value.type === 'number' ) { this._props[key] = value.start + value.delta * p; } else if ( value.type === 'unit' ) { diff --git a/js/mojs.babel.js b/js/mojs.babel.js index 17ceb060f..99d2b924b 100644 --- a/js/mojs.babel.js +++ b/js/mojs.babel.js @@ -17,7 +17,7 @@ import tweener from './tween/tweener'; import easing from './easing/easing'; var mojs = { - revision: '0.229.0', isDebug: true, helpers: h, + revision: '0.230.0', isDebug: true, helpers: h, Transit, Swirl, Burst, stagger, Spriter, MotionPath, Tween, Timeline, Tweenable, Thenable, Tunable, Module, tweener, easing, shapesMap @@ -41,15 +41,22 @@ mojs.delta = mojs.h.delta; // let tr = new mojs.Transit({ // left: '50%', top: '50%', +// isIt: 1, +// shape: 'zigzag', +// stroke: 'white', +// // origin: '50% 50%', +// origin: { '50% 50%': '100% 100%' }, // duration: 2000, -// radius: 50, -// radiusY: { 0: 20 } -// }).then({ -// radiusX: 100, -// radiusY: 120, -// }).then({ -// radiusY: 100 -// });; +// angle: { 0: 200 } +// }) +// .then({ +// origin: '50% 50%', +// // radiusX: 100, +// // radiusY: 120, +// }) +// // .then({ +// // radiusY: 100 +// // });; // let mojsPlayer = new MojsPlayer({ // add: tr diff --git a/js/shapes/equal.coffee b/js/shapes/equal.coffee index 35dbd2040..cd0af9488 100644 --- a/js/shapes/equal.coffee +++ b/js/shapes/equal.coffee @@ -9,7 +9,7 @@ class Equal extends Bit _declareDefaults:-> super this._defaults.shape = 'path' - this._defaults.ratio = 1.43 + # this._defaults.ratio = 1.43 draw:-> super return if !@_props.points diff --git a/js/shapes/rect.coffee b/js/shapes/rect.coffee index 62f35bac3..36ac65037 100644 --- a/js/shapes/rect.coffee +++ b/js/shapes/rect.coffee @@ -9,7 +9,7 @@ class Rect extends Bit _declareDefaults:-> super this._defaults.shape = 'rect' - this._defaults.ratio = 1.43 + # this._defaults.ratio = 1.43 draw:-> super radiusX = if @_props.radiusX? then @_props.radiusX else @_props.radius diff --git a/js/shapes/zigzag.coffee b/js/shapes/zigzag.coffee index 9971a2466..71f05dbe6 100644 --- a/js/shapes/zigzag.coffee +++ b/js/shapes/zigzag.coffee @@ -7,14 +7,15 @@ class Zigzag extends Bit _declareDefaults:-> super @_defaults.shape = 'path'; - @_defaults.ratio = 1.43; + # @_defaults.ratio = 1.43; draw:-> return if !@_props.points radiusX = if @_props.radiusX? then @_props.radiusX else @_props.radius radiusY = if @_props.radiusY? then @_props.radiusY else @_props.radius points = ''; stepX = 2*radiusX/@_props.points stepY = 2*radiusY/@_props.points; strokeWidth = @_props['stroke-width'] - xStart = @_props.x - radiusX; yStart = @_props.y - radiusY + xStart = @_props.x - radiusX - strokeWidth + yStart = @_props.y - radiusY - strokeWidth for i in [@_props.points...0] iX = xStart + i*stepX + strokeWidth; iY = yStart + i*stepY + strokeWidth iX2 = xStart + (i-1)*stepX + strokeWidth diff --git a/js/transit.babel.js b/js/transit.babel.js index 52d8cc652..285a06844 100644 --- a/js/transit.babel.js +++ b/js/transit.babel.js @@ -51,10 +51,6 @@ class Transit extends Tunable { x: 0, // ∆ :: Units :: Possible values: [ number, string ] y: 0, - // ∆ :: Units :: Possible values: [ number, string ] - rx: 0, - // ∆ :: Units :: Possible values: [ number, string ] - ry: 0, // ∆ :: Possible values: [ number ] angle: 0, // ∆ :: Possible values: [ number ] @@ -63,8 +59,14 @@ class Transit extends Tunable { scaleX: null, // ∆ :: Possible values: [ number ] Fallbacks to `scale`. scaleY: null, + // ∆ :: Possible values: [ number, string ] + origin: '50% 50%', // ∆ :: Possible values: [ 0..1 ] opacity: 1, + // ∆ :: Units :: Possible values: [ number, string ] + rx: 0, + // ∆ :: Units :: Possible values: [ number, string ] + ry: 0, // ∆ :: Possible values: [ number ] points: 3, // ∆ :: Possible values: [ number ] @@ -226,9 +228,15 @@ class Transit extends Tunable { if ( isTranslate || isScale || isRotate ) { var transform = this._fillTransform(), style = this.el.style; - style["#{h.prefix.css}#{'transform'}"] = transform; + style[`${ h.prefix.css }transform`] = transform; style['transform'] = transform; - // h.setPrefixedStyle(this.el, 'transform', this._fillTransform()); + } + + if ( this._isPropChanged('origin') || this._deltas[ 'origin' ] ) { + var origin = this._fillOrigin(), + style = this.el.style; + style[`${ h.prefix.css }transform-origin`] = origin; + style['transform-origin'] = origin; } } } @@ -291,7 +299,7 @@ class Transit extends Tunable { radius = this._calcMaxShapeRadius(), dStroke = this._deltas['strokeWidth'], stroke = dStroke != null ? Math.max(Math.abs(dStroke.start), Math.abs(dStroke.end)) : this._props.strokeWidth; - p.size = 2 * radius + 2 * stroke; + p.size = 2 * radius + stroke; this._increaseSizeWithEasing(); this._increaseSizeWithBitRatio(); return p.center = p.size / 2; @@ -304,6 +312,7 @@ class Transit extends Tunable { var p = this._props, easing = this._o.easing, isStringEasing = easing && typeof easing === 'string'; + switch ( isStringEasing && easing.toLowerCase() ) { case 'elastic.out': case 'elastic.inout': @@ -320,7 +329,7 @@ class Transit extends Tunable { */ _increaseSizeWithBitRatio () { var p = this._props; - p.size *= this.bit._props.ratio; + // p.size *= this.bit._props.ratio; p.size += 2 * p.sizeGap; } /* @@ -415,7 +424,7 @@ class Transit extends Tunable { */ _transformTweenOptions () { this._applyCallbackOverrides( this._o ); } /* - Method to create transform string; + Method to create transform string. @private @returns {String} Transform string. */ @@ -427,6 +436,19 @@ class Transit extends Tunable { return `scale(${scale}) translate(${p.x}, ${p.y}) rotate(${p.angle}deg)`; } + /* + Method to create transform-origin string. + @private + @returns {String} Transform string. + */ + _fillOrigin () { + var p = this._props, + str = ''; + for (var i = 0; i < p.origin.length; i++) { + str += `${ p.origin[i].string } `; + } + return str; + } /* Method to hide previousChainModule. @private diff --git a/karma.conf.js b/karma.conf.js index 01ee9953a..05f392596 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -88,8 +88,8 @@ module.exports = function(config) { ], // list of files to exclude exclude: [ - 'build/h.js', - 'spec/h.js', + // 'build/h.js', + // 'spec/h.js', // 'build/transit.js', // 'spec/transit.js', @@ -98,34 +98,34 @@ module.exports = function(config) { // 'build/burst.js', // 'spec/burst.js', - 'build/module.js', - 'spec/module.js', - 'build/tween/tweenable.js', - 'spec/tween/tweenable.js', - 'build/tunable.js', - 'spec/tunable.js', - // 'build/thenable.js', - // 'spec/thenable.js', + // 'build/module.js', + // 'spec/module.js', + // 'build/tween/tweenable.js', + // 'spec/tween/tweenable.js', + // 'build/tunable.js', + // 'spec/tunable.js', + // // 'build/thenable.js', + // // 'spec/thenable.js', - 'build/spriter.js', - 'spec/spriter.js', - 'build/stagger.js', - 'spec/stagger.js', + // 'build/spriter.js', + // 'spec/spriter.js', + // 'build/stagger.js', + // 'spec/stagger.js', - 'build/easing/easing.js', - 'spec/easing/easing.js', + // 'build/easing/easing.js', + // 'spec/easing/easing.js', - 'build/tween/timeline.js', - 'spec/tween/timeline.js', - 'build/tween/tween.js', - 'spec/tween/tween.js', - 'build/tween/tweener.js', - 'spec/tween/tweener.js', + // 'build/tween/timeline.js', + // 'spec/tween/timeline.js', + // 'build/tween/tween.js', + // 'spec/tween/tween.js', + // 'build/tween/tweener.js', + // 'spec/tween/tweener.js', - 'build/motion-path.js', - 'spec/motion-path.js', - 'build/bits/*.js', - 'spec/bits/*.js' + // 'build/motion-path.js', + // 'spec/motion-path.js', + // 'build/bits/*.js', + // 'spec/bits/*.js' ], // preprocess matching files before serving them to the browser diff --git a/lib/h.js b/lib/h.js index e30e891fb..10f729988 100644 --- a/lib/h.js +++ b/lib/h.js @@ -427,7 +427,7 @@ a: endColorObj.a - startColorObj.a } }; - } else if (key === 'strokeDasharray' || key === 'strokeDashoffset') { + } else if (key === 'strokeDasharray' || key === 'strokeDashoffset' || key === 'origin') { startArr = this.strToArr(start); endArr = this.strToArr(end); this.normDashArrays(startArr, endArr); diff --git a/lib/module.js b/lib/module.js index 97d531b1d..a04e7baf1 100644 --- a/lib/module.js +++ b/lib/module.js @@ -29,8 +29,9 @@ var Module = (function () { // map of props that should be // parsed to arrays of values this._arrayPropertyMap = { + strokeDashoffset: 1, strokeDasharray: 1, - strokeDashoffset: 1 + origin: 1 }; this._skipPropsDelta = { @@ -44,11 +45,6 @@ var Module = (function () { this._extendDefaults(); this._vars(); - // COVER - // if ( this._vars() ) { - // this._o.isIt && console.log('RETURN'); - // return ; - // }; this._render(); } @@ -342,6 +338,11 @@ var Module = (function () { }, { key: '_parseProperty', value: function _parseProperty(name, value) { + // parse `HTML` element in `parent` option + if (name === 'parent') { + return _h2['default'].parseEl(value); + } + // parse `stagger`, `rand` and `position` value = this._parsePreArrayProperty(name, value); // parse numeric/percent values for strokeDash.. properties return this._parseStrokeDashOption(name, value); @@ -391,6 +392,7 @@ var Module = (function () { value: function _calcCurrentProps(p) { for (var key in this._deltas) { var value = this._deltas[key]; + // this._o.isIt && console.log(value) if (value.type === 'array') { var arr; // if prop property is array - reuse it else - create an array @@ -400,11 +402,17 @@ var Module = (function () { } else { arr = []; } + for (var i = 0; i < value.delta.length; i++) { var item = value.delta[i], dash = value.start[i].value + p * item.value; - arr.push({ value: dash, unit: item.unit }); + arr.push({ + string: '' + dash + item.unit, + value: dash, + unit: item.unit + }); } + this._props[key] = arr; } else if (value.type === 'number') { this._props[key] = value.start + value.delta * p; diff --git a/lib/mojs.js b/lib/mojs.js index a6e9a2c62..fb75cb116 100644 --- a/lib/mojs.js +++ b/lib/mojs.js @@ -69,7 +69,7 @@ var _easingEasing = require('./easing/easing'); var _easingEasing2 = _interopRequireDefault(_easingEasing); var mojs = { - revision: '0.227.1', isDebug: true, helpers: _h2['default'], + revision: '0.229.0', isDebug: true, helpers: _h2['default'], Transit: _transit2['default'], Swirl: _swirl2['default'], Burst: _burst2['default'], stagger: _stagger2['default'], Spriter: _spriter2['default'], MotionPath: _motionPath2['default'], Tween: _tweenTween2['default'], Timeline: _tweenTimeline2['default'], Tweenable: _tweenTweenable2['default'], Thenable: _thenable2['default'], Tunable: _tunable2['default'], Module: _module3['default'], tweener: _tweenTweener3['default'], easing: _easingEasing2['default'], shapesMap: _shapesShapesMap2['default'] @@ -79,7 +79,6 @@ window.mojs = mojs; // TODO: /* - loosing `parent` option in `then` 'rand' angle flick with `then` not able to `play()` in `onComplete` callback --- @@ -92,47 +91,35 @@ window.mojs = mojs; mojs.h = mojs.helpers; mojs.delta = mojs.h.delta; -var div = document.querySelector('#js-parent'); - -var tr = new mojs.Transit({ parent: div, left: '50%', top: '50%' }).then({ radius: 0 }); - -tr.play(); - -// let tw = new mojs.Tween({ -// duration: 10000, -// // speed: 5, -// onUpdate ( p ) { -// console.log(p); -// }, -// onComplete (isForward) { -// // tw.reset(); -// // tw.setProgress(0); -// // tw.play(); -// // console.log(`COMPLETE: ${isForward}`) -// } -// }); - -// let play = document.querySelector('#js-play'), -// playB = document.querySelector('#js-play-backward'), -// pause = document.querySelector('#js-pause'), -// stop = document.querySelector('#js-stop'), -// reset = document.querySelector('#js-reset'), -// set0 = document.querySelector('#js-set0'); - -// play.addEventListener('click', function () { tw.play(); }); -// playB.addEventListener('click', function () { tw.playBackward(); }); -// pause.addEventListener('click', function () { tw.pause(); }); -// stop.addEventListener('click', function () { tw.stop(); }); -// reset.addEventListener('click', function () { tw.reset(); }); -// set0.addEventListener('click', function () { tw.setProgress(0); }); - -// ### istanbul ignore next ### +var tr = new mojs.Transit({ + left: '50%', top: '50%', + isIt: 1, + shape: 'zigzag', + stroke: 'white', + // origin: '50% 50%', + origin: { '50% 50%': '100% 100%' }, + duration: 2000, + angle: { 0: 200 } +}).then({ + origin: '50% 50%' +}); +// .then({ +// radiusY: 100 +// });; + +// radiusX: 100, +// radiusY: 120, +var mojsPlayer = new MojsPlayer({ + add: tr +}); + +// istanbul ignore next if (typeof define === "function" && define.amd) { define("mojs", [], function () { return mojs; }); } -// ### istanbul ignore next ### +// istanbul ignore next if (typeof module === "object" && typeof module.exports === "object") { module.exports = mojs; } \ No newline at end of file diff --git a/lib/shapes/equal.js b/lib/shapes/equal.js index 73a171047..02309db32 100644 --- a/lib/shapes/equal.js +++ b/lib/shapes/equal.js @@ -17,8 +17,7 @@ Equal.prototype._declareDefaults = function() { Equal.__super__._declareDefaults.apply(this, arguments); - this._defaults.shape = 'path'; - return this._defaults.ratio = 1.43; + return this._defaults.shape = 'path'; }; Equal.prototype.draw = function() { diff --git a/lib/shapes/rect.js b/lib/shapes/rect.js index 88549bd51..2ec7269ca 100644 --- a/lib/shapes/rect.js +++ b/lib/shapes/rect.js @@ -17,8 +17,7 @@ Rect.prototype._declareDefaults = function() { Rect.__super__._declareDefaults.apply(this, arguments); - this._defaults.shape = 'rect'; - return this._defaults.ratio = 1.43; + return this._defaults.shape = 'rect'; }; Rect.prototype.draw = function() { diff --git a/lib/shapes/zigzag.js b/lib/shapes/zigzag.js index dd5964f37..3b0f73a5b 100644 --- a/lib/shapes/zigzag.js +++ b/lib/shapes/zigzag.js @@ -17,8 +17,7 @@ Zigzag.prototype._declareDefaults = function() { Zigzag.__super__._declareDefaults.apply(this, arguments); - this._defaults.shape = 'path'; - return this._defaults.ratio = 1.43; + return this._defaults.shape = 'path'; }; Zigzag.prototype.draw = function() { @@ -32,8 +31,8 @@ stepX = 2 * radiusX / this._props.points; stepY = 2 * radiusY / this._props.points; strokeWidth = this._props['stroke-width']; - xStart = this._props.x - radiusX; - yStart = this._props.y - radiusY; + xStart = this._props.x - radiusX - strokeWidth; + yStart = this._props.y - radiusY - strokeWidth; for (i = _i = _ref = this._props.points; _ref <= 0 ? _i < 0 : _i > 0; i = _ref <= 0 ? ++_i : --_i) { iX = xStart + i * stepX + strokeWidth; iY = yStart + i * stepY + strokeWidth; diff --git a/lib/thenable.js b/lib/thenable.js index 453efa9ca..fc6a350f7 100644 --- a/lib/thenable.js +++ b/lib/thenable.js @@ -89,6 +89,8 @@ var Thenable = (function (_Tweenable) { obj.callbacksContext = this._props.callbacksContext; // set previous module obj.prevChainModule = _h2['default'].getLastItem(this._modules); + // pass wrapper el as parent to all subsequent modules in `then` chain + obj.parent = this.wrapperEl; return obj; } @@ -195,6 +197,11 @@ var Thenable = (function (_Tweenable) { startValue = start.radius; } + var isSubRadius = key === 'scaleX' || key === 'scaleY'; + if (isSubRadius && startValue == null) { + startValue = start.scale; + } + o[key] = this._mergeThenProperty(key, startValue, endValue); // // if one of the properties is array - merge // // with array, - else merge two plain properties diff --git a/lib/transit.js b/lib/transit.js index 66de4f611..9e0c65bde 100644 --- a/lib/transit.js +++ b/lib/transit.js @@ -67,7 +67,7 @@ var Transit = (function (_Tunable) { value: function _declareDefaults() { // DEFAULTS / APIs this._defaults = { - // where to append the module to + // where to append the module to [selector, HTMLElement] parent: document.body, // Possible values: [circle, line, zigzag, rect, polygon, cross, equal ] shape: 'circle', @@ -95,16 +95,22 @@ var Transit = (function (_Tunable) { x: 0, // ∆ :: Units :: Possible values: [ number, string ] y: 0, - // ∆ :: Units :: Possible values: [ number, string ] - rx: 0, - // ∆ :: Units :: Possible values: [ number, string ] - ry: 0, // ∆ :: Possible values: [ number ] angle: 0, // ∆ :: Possible values: [ number ] scale: 1, + // ∆ :: Possible values: [ number ] Fallbacks to `scale`. + scaleX: null, + // ∆ :: Possible values: [ number ] Fallbacks to `scale`. + scaleY: null, + // ∆ :: Possible values: [ number, string ] + origin: '50% 50%', // ∆ :: Possible values: [ 0..1 ] opacity: 1, + // ∆ :: Units :: Possible values: [ number, string ] + rx: 0, + // ∆ :: Units :: Possible values: [ number, string ] + ry: 0, // ∆ :: Possible values: [ number ] points: 3, // ∆ :: Possible values: [ number ] @@ -167,12 +173,25 @@ var Transit = (function (_Tunable) { this.ctx.style.height = '100%'; this.ctx.style.left = '0'; this.ctx.style.top = '0'; + this.el = document.createElement('div'); this.el.appendChild(this.ctx); + this._createBit(); this._calcSize(); - // console.log(this._props.parent) - (this._props.parent || document.body).appendChild(this.el); + + // create stacking context wrapper for all elements in `then` chain + // if the module is the first one in the chain + if (!this._props.prevChainModule) { + this.wrapperEl = document.createElement('div'); + // h.setPrefixedStyle( this.wrapperEl, 'transform', 'translate(0, 0)' ); + this.wrapperEl.style.opacity = '0.99999'; + this.wrapperEl.appendChild(this.el); + this.wrapperEl.setAttribute('data-name', 'mojs-transit'); + this._props.parent.appendChild(this.wrapperEl); + } else { + this._props.parent.appendChild(this.el); + } } else { this.ctx = this._o.ctx;this._createBit();this._calcSize(); } @@ -263,14 +282,28 @@ var Transit = (function (_Tunable) { if (!this.isForeign) { this._isPropChanged('left') && (this.el.style.left = p.left); this._isPropChanged('top') && (this.el.style.top = p.top); - var isTranslate = this._isPropChanged('x') || this._isPropChanged('y'), - isScaleRotate = this._isPropChanged('scale') || this._isPropChanged('angle'); - if (isTranslate || isScaleRotate) { + + var isX = this._isPropChanged('x'), + isY = this._isPropChanged('y'), + isTranslate = isX || isY, + isScaleX = this._isPropChanged('scaleX'), + isScaleY = this._isPropChanged('scaleY'), + isScale = this._isPropChanged('scale'), + isScale = isScale || isScaleX || isScaleY, + isRotate = this._isPropChanged('angle'); + + if (isTranslate || isScale || isRotate) { var transform = this._fillTransform(), style = this.el.style; - style["#{h.prefix.css}#{'transform'}"] = transform; + style[h.prefix.css + 'transform'] = transform; style['transform'] = transform; - // h.setPrefixedStyle(this.el, 'transform', this._fillTransform()); + } + + if (this._isPropChanged('origin') || this._deltas['origin']) { + var origin = this._fillOrigin(), + style = this.el.style; + style[h.prefix.css + 'transform-origin'] = origin; + style['transform-origin'] = origin; } } } @@ -356,7 +389,7 @@ var Transit = (function (_Tunable) { radius = this._calcMaxShapeRadius(), dStroke = this._deltas['strokeWidth'], stroke = dStroke != null ? Math.max(Math.abs(dStroke.start), Math.abs(dStroke.end)) : this._props.strokeWidth; - p.size = 2 * radius + 2 * stroke; + p.size = 2 * radius + stroke; this._increaseSizeWithEasing(); this._increaseSizeWithBitRatio(); return p.center = p.size / 2; @@ -372,6 +405,7 @@ var Transit = (function (_Tunable) { var p = this._props, easing = this._o.easing, isStringEasing = easing && typeof easing === 'string'; + switch (isStringEasing && easing.toLowerCase()) { case 'elastic.out': case 'elastic.inout': @@ -391,7 +425,7 @@ var Transit = (function (_Tunable) { key: '_increaseSizeWithBitRatio', value: function _increaseSizeWithBitRatio() { var p = this._props; - p.size *= this.bit._props.ratio; + // p.size *= this.bit._props.ratio; p.size += 2 * p.sizeGap; } @@ -513,15 +547,35 @@ var Transit = (function (_Tunable) { } /* - Method to create transform string; + Method to create transform string. @private @returns {String} Transform string. */ }, { key: '_fillTransform', value: function _fillTransform() { - var p = this._props; - return 'scale(' + p.scale + ') translate(' + p.x + ', ' + p.y + ') rotate(' + p.angle + 'deg)'; + var p = this._props, + scaleX = p.scaleX != null ? p.scaleX : p.scale, + scaleY = p.scaleY != null ? p.scaleY : p.scale, + scale = scaleX + ', ' + scaleY; + + return 'scale(' + scale + ') translate(' + p.x + ', ' + p.y + ') rotate(' + p.angle + 'deg)'; + } + + /* + Method to create transform-origin string. + @private + @returns {String} Transform string. + */ + }, { + key: '_fillOrigin', + value: function _fillOrigin() { + var p = this._props, + str = ''; + for (var i = 0; i < p.origin.length; i++) { + str += p.origin[i].string + ' '; + } + return str; } /* diff --git a/package.json b/package.json index 3b260ecd0..dfc070242 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mo-js", "description": "motion graphics toolbelt for the web", - "version": "0.229.0", + "version": "0.230.0", "license": "MIT", "private": false, "scripts": { diff --git a/spec/h.coffee b/spec/h.coffee index 5be8c5f35..c79853c82 100644 --- a/spec/h.coffee +++ b/spec/h.coffee @@ -290,6 +290,28 @@ describe 'Helpers ->', -> expect(delta.start[1].unit) .toBe '%' expect(delta.end[1].value) .toBe 0 expect(delta.end[1].unit) .toBe '%' + it 'should calculate array delta', -> + delta = h.parseDelta 'strokeDashoffset', { '200 100%': '300' } + expect(delta.type) .toBe 'array' + expect(delta.start[0].value) .toBe 200 + expect(delta.start[0].unit) .toBe 'px' + expect(delta.end[0].value) .toBe 300 + expect(delta.end[0].unit) .toBe 'px' + expect(delta.start[1].value) .toBe 100 + expect(delta.start[1].unit) .toBe '%' + expect(delta.end[1].value) .toBe 0 + expect(delta.end[1].unit) .toBe '%' + it 'should calculate array delta', -> + delta = h.parseDelta 'origin', { '200 100%': '300' } + expect(delta.type) .toBe 'array' + expect(delta.start[0].value) .toBe 200 + expect(delta.start[0].unit) .toBe 'px' + expect(delta.end[0].value) .toBe 300 + expect(delta.end[0].unit) .toBe 'px' + expect(delta.start[1].value) .toBe 100 + expect(delta.start[1].unit) .toBe '%' + expect(delta.end[1].value) .toBe 0 + expect(delta.end[1].unit) .toBe '%' describe 'unit values ->', -> it 'should calculate unit delta', -> diff --git a/spec/h.js b/spec/h.js index d0e111766..7beb7daa6 100644 --- a/spec/h.js +++ b/spec/h.js @@ -378,7 +378,7 @@ }); }); describe('array values ->', function() { - return it('should calculate array delta', function() { + it('should calculate array delta', function() { var delta; delta = h.parseDelta('strokeDasharray', { '200 100%': '300' @@ -393,6 +393,36 @@ expect(delta.end[1].value).toBe(0); return expect(delta.end[1].unit).toBe('%'); }); + it('should calculate array delta', function() { + var delta; + delta = h.parseDelta('strokeDashoffset', { + '200 100%': '300' + }); + expect(delta.type).toBe('array'); + expect(delta.start[0].value).toBe(200); + expect(delta.start[0].unit).toBe('px'); + expect(delta.end[0].value).toBe(300); + expect(delta.end[0].unit).toBe('px'); + expect(delta.start[1].value).toBe(100); + expect(delta.start[1].unit).toBe('%'); + expect(delta.end[1].value).toBe(0); + return expect(delta.end[1].unit).toBe('%'); + }); + return it('should calculate array delta', function() { + var delta; + delta = h.parseDelta('origin', { + '200 100%': '300' + }); + expect(delta.type).toBe('array'); + expect(delta.start[0].value).toBe(200); + expect(delta.start[0].unit).toBe('px'); + expect(delta.end[0].value).toBe(300); + expect(delta.end[0].unit).toBe('px'); + expect(delta.start[1].value).toBe(100); + expect(delta.start[1].unit).toBe('%'); + expect(delta.end[1].value).toBe(0); + return expect(delta.end[1].unit).toBe('%'); + }); }); describe('unit values ->', function() { return it('should calculate unit delta', function() { diff --git a/spec/module.coffee b/spec/module.coffee index f910439e8..567ec5120 100644 --- a/spec/module.coffee +++ b/spec/module.coffee @@ -44,6 +44,7 @@ describe 'module class ->', -> md = new Module expect(md._arrayPropertyMap['strokeDasharray']).toBe 1 expect(md._arrayPropertyMap['strokeDashoffset']).toBe 1 + expect(md._arrayPropertyMap['origin']).toBe 1 it 'should create _arrayPropertyMap', -> md = new Module expect(md._skipPropsDelta.callbacksContext).toBe 1 diff --git a/spec/module.js b/spec/module.js index b8e5def32..4e0e599bd 100644 --- a/spec/module.js +++ b/spec/module.js @@ -55,7 +55,8 @@ var md; md = new Module; expect(md._arrayPropertyMap['strokeDasharray']).toBe(1); - return expect(md._arrayPropertyMap['strokeDashoffset']).toBe(1); + expect(md._arrayPropertyMap['strokeDashoffset']).toBe(1); + return expect(md._arrayPropertyMap['origin']).toBe(1); }); it('should create _arrayPropertyMap', function() { var md; diff --git a/spec/shapes/equal.coffee b/spec/shapes/equal.coffee index 96ff0860f..618bb87fb 100644 --- a/spec/shapes/equal.coffee +++ b/spec/shapes/equal.coffee @@ -10,9 +10,9 @@ describe 'Equal ->', -> it 'have shape of path', -> equal = new Equal ctx: svg expect(equal._defaults.shape).toBe 'path' - it 'have ratio of 1.43', -> - equal = new Equal ctx: svg - expect(equal._defaults.ratio).toBe 1.43 + # it 'have ratio of 1.43', -> + # equal = new Equal ctx: svg + # expect(equal._defaults.ratio).toBe 1.43 describe 'methods ->', -> describe 'draw method ->', -> it 'should define points', -> diff --git a/spec/shapes/equal.js b/spec/shapes/equal.js index 96ed92514..49aec277a 100644 --- a/spec/shapes/equal.js +++ b/spec/shapes/equal.js @@ -24,13 +24,6 @@ }); return expect(equal._defaults.shape).toBe('path'); }); - it('have ratio of 1.43', function() { - var equal; - equal = new Equal({ - ctx: svg - }); - return expect(equal._defaults.ratio).toBe(1.43); - }); describe('methods ->', function() { return describe('draw method ->', function() { it('should define points', function() { diff --git a/spec/shapes/rect.coffee b/spec/shapes/rect.coffee index ead53e267..05c2fe69c 100644 --- a/spec/shapes/rect.coffee +++ b/spec/shapes/rect.coffee @@ -10,8 +10,8 @@ describe 'Rect ->', -> describe 'defaults ->', -> it 'should have shape of "rect"', -> expect(rect._defaults.shape).toBe 'rect' - it 'should have ratio of 1.43', -> - expect(rect._defaults.ratio).toBe 1.43 + # it 'should have ratio of 1.43', -> + # expect(rect._defaults.ratio).toBe 1.43 describe 'draw ->', -> it 'should add properties to el', -> svg = document.createElementNS?(ns, "svg") diff --git a/spec/shapes/rect.js b/spec/shapes/rect.js index e45858b3c..146f197aa 100644 --- a/spec/shapes/rect.js +++ b/spec/shapes/rect.js @@ -18,12 +18,9 @@ return expect(rect instanceof Bit).toBe(true); }); describe('defaults ->', function() { - it('should have shape of "rect"', function() { + return it('should have shape of "rect"', function() { return expect(rect._defaults.shape).toBe('rect'); }); - return it('should have ratio of 1.43', function() { - return expect(rect._defaults.ratio).toBe(1.43); - }); }); describe('draw ->', function() { it('should add properties to el', function() { diff --git a/spec/shapes/zigzag.coffee b/spec/shapes/zigzag.coffee index 2b93a2766..6821a4c0a 100644 --- a/spec/shapes/zigzag.coffee +++ b/spec/shapes/zigzag.coffee @@ -11,9 +11,9 @@ describe 'Zigzag ->', -> it 'should add itself to context', -> line = new Zigzag ctx: svg expect(svg.firstChild).toBeDefined() - it 'should have ratio of 1.43', -> - line = new Zigzag ctx: svg - expect(line._defaults.ratio).toBe 1.43 + # it 'should have ratio of 1.43', -> + # line = new Zigzag ctx: svg + # expect(line._defaults.ratio).toBe 1.43 describe 'methods ->', -> describe 'draw method ->', -> it 'should add properties to el', -> diff --git a/spec/shapes/zigzag.js b/spec/shapes/zigzag.js index bcbbd7565..a0525e05d 100644 --- a/spec/shapes/zigzag.js +++ b/spec/shapes/zigzag.js @@ -26,13 +26,6 @@ }); return expect(svg.firstChild).toBeDefined(); }); - it('should have ratio of 1.43', function() { - var line; - line = new Zigzag({ - ctx: svg - }); - return expect(line._defaults.ratio).toBe(1.43); - }); describe('methods ->', function() { return describe('draw method ->', function() { it('should add properties to el', function() { diff --git a/spec/transit.coffee b/spec/transit.coffee index f37b408e4..839997299 100644 --- a/spec/transit.coffee +++ b/spec/transit.coffee @@ -47,12 +47,13 @@ describe 'Transit ->', -> expect(byte._defaults.top).toBe 0 expect(byte._defaults.x).toBe 0 expect(byte._defaults.y).toBe 0 - expect(byte._defaults.rx).toBe 0 - expect(byte._defaults.ry).toBe 0 expect(byte._defaults.angle).toBe 0 expect(byte._defaults.scale).toBe 1 expect(byte._defaults.scaleX).toBe null expect(byte._defaults.scaleY).toBe null + expect(byte._defaults.origin).toBe '50% 50%' + expect(byte._defaults.rx).toBe 0 + expect(byte._defaults.ry).toBe 0 expect(byte._defaults.opacity).toBe 1 expect(byte._defaults.points).toBe 3 expect(byte._defaults.duration).toBe 400 @@ -244,38 +245,38 @@ describe 'Transit ->', -> byte = new Byte radius: { 25: -100 } strokeWidth: { 6: 4 } - expect(byte._props.size).toBe(212) + expect(byte._props.size).toBe(206) it 'should calculate size el size based on radiusX/Y', -> byte = new Byte radius: { 25: -100 } radiusX: 200 strokeWidth: { 6: 4 } - expect(byte._props.size).toBe(412) + expect(byte._props.size).toBe(406) it 'should calculate size el size based on radiusX/Y', -> byte = new Byte radius: { 25: -100 } radiusX: 200 radiusY: 300 strokeWidth: { 6: 4 } - expect(byte._props.size).toBe(612) + expect(byte._props.size).toBe(606) it 'should calculate size el size based on radiusX/Y', -> byte = new Byte radius: { 25: -100 } radiusY: 30 strokeWidth: { 6: 4 } - expect(byte._props.size).toBe(212) + expect(byte._props.size).toBe(206) it 'should calculate size el size based on radiusX/Y', -> byte = new Byte radius: 50 radiusY: 30 strokeWidth: { 6: 4 } - expect(byte._props.size).toBe(112) + expect(byte._props.size).toBe(106) it 'should have sizeGap option', -> byte = new Byte radius: { 25: -100 } strokeWidth: { 6: 4 } sizeGap: 40 - expect(byte._props.size).toBe(292) + expect(byte._props.size).toBe(286) it 'should calculate size el size depending on shape\'s ratio', -> byte = new Byte radius: { 25: -100 } @@ -283,7 +284,7 @@ describe 'Transit ->', -> shape: 'rect' svg = document.createElementNS ns, 'svg' rect = new Rect ctx: svg - expect(byte._props.size).toBe(212*rect._props.ratio) + expect(byte._props.size).toBe(206) it 'should not calculate size el size if size was passed', -> byte = new Byte radius: 100 @@ -301,33 +302,34 @@ describe 'Transit ->', -> byte = new Byte radius: { 25: -100 } strokeWidth: { 4: 6 } - expect(byte._props.size) .toBe(212) - expect(byte._props.center) .toBe(106) + expect(byte._props.size) .toBe(206) + expect(byte._props.center) .toBe(103) it 'should increase size if elastic.out/inout easing', -> byte = new Byte radius: { 25: -100 } strokeWidth: { 4: 6 } easing: 'Elastic.Out' - expect(byte._props.size) .toBe(212*1.25) + expect(byte._props.size) .toBe(206*1.25) expect(byte._props.center) .toBe(byte._props.size/2) byte = new Byte radius: { 25: -100 } strokeWidth: { 4: 6 } easing: 'Elastic.InOut' - expect(byte._props.size) .toBe(212*1.25) + expect(byte._props.size) .toBe(206*1.25) expect(byte._props.center) .toBe(byte._props.size/2) it 'should increase size if back.out/inout easing', -> byte = new Byte + isIt: 1 radius: { 25: -100 } - strokeWidth: { 4: 6 } + strokeWidth: { 4: 6 } easing: 'back.Out' - expect(byte._props.size) .toBe(212*1.1) + expect(byte._props.size) .toBe(206*1.1) expect(byte._props.center) .toBe(byte._props.size/2) byte = new Byte radius: { 25: -100 } strokeWidth: { 4: 6 } easing: 'Back.InOut' - expect(byte._props.size) .toBe(212*1.1) + expect(byte._props.size) .toBe(206*1.1) expect(byte._props.center) .toBe(byte._props.size/2) describe 'el creation ->', -> @@ -371,13 +373,13 @@ describe 'Transit ->', -> x: 10 y: 20 expect(byte.el.style.position) .toBe 'absolute' - expect(byte.el.style.width) .toBe '54px' - expect(byte.el.style.height) .toBe '54px' + expect(byte.el.style.width) .toBe '52px' + expect(byte.el.style.height) .toBe '52px' expect(byte.el.style.display) .toBe 'none' - expect(byte.el.style['margin-left']) .toBe '-27px' - expect(byte.el.style['margin-top']) .toBe '-27px' - expect(byte.el.style['marginLeft']) .toBe '-27px' - expect(byte.el.style['marginTop']) .toBe '-27px' + expect(byte.el.style['margin-left']) .toBe '-26px' + expect(byte.el.style['margin-top']) .toBe '-26px' + expect(byte.el.style['marginLeft']) .toBe '-26px' + expect(byte.el.style['marginTop']) .toBe '-26px' #expect(byte.el.style['backface-visibility']).toBe 'hidden' #expect(byte.el.style["#{h.prefix.css}backface-visibility"]).toBe 'hidden' expect(byte._isShown).toBe false @@ -393,10 +395,10 @@ describe 'Transit ->', -> expect(byte.el.style.position) .not.toBe 'absolute' expect(byte.el.style.width) .not.toBe '54px' expect(byte.el.style.height) .not.toBe '54px' - expect(byte.el.style['margin-left']) .not.toBe '-27px' - expect(byte.el.style['margin-top']) .not.toBe '-27px' - expect(byte.el.style['marginLeft']) .not.toBe '-27px' - expect(byte.el.style['marginTop']) .not.toBe '-27px' + expect(byte.el.style['margin-left']) .not.toBe '-26px' + expect(byte.el.style['margin-top']) .not.toBe '-26px' + expect(byte.el.style['marginLeft']) .not.toBe '-26px' + expect(byte.el.style['marginTop']) .not.toBe '-26px' # expect(byte.el.style['backface-visibility']).not.toBe 'hidden' # prefixedProp = "#{h.prefix.css}backface-visibility" # expect(byte.el.style[prefixedProp]).not.toBe 'hidden' @@ -417,12 +419,12 @@ describe 'Transit ->', -> byte._render() h.remBase = 16 expect(byte.el.style.position) .toBe 'absolute' - expect(byte.el.style.width) .toBe '54px' - expect(byte.el.style.height) .toBe '54px' - expect(byte.el.style['margin-left']) .toBe '-27px' - expect(byte.el.style['margin-top']) .toBe '-27px' - expect(byte.el.style['marginLeft']) .toBe '-27px' - expect(byte.el.style['marginTop']) .toBe '-27px' + expect(byte.el.style.width) .toBe '52px' + expect(byte.el.style.height) .toBe '52px' + expect(byte.el.style['margin-left']) .toBe '-26px' + expect(byte.el.style['margin-top']) .toBe '-26px' + expect(byte.el.style['marginLeft']) .toBe '-26px' + expect(byte.el.style['marginTop']) .toBe '-26px' #expect(byte.el.style['backface-visibility']).toBe 'hidden' #expect(byte.el.style["#{h.prefix.css}backface-visibility"]).toBe 'hidden' it 'should create bit', -> @@ -782,6 +784,38 @@ describe 'Transit ->', -> isTr2 = tr is 'scale(3, 3) translate(0px, 0px) rotate(0deg)' expect(isTr or isTr2).toBe true + it 'should set `transform-origin` if `origin`', -> + byte = new Byte origin: '50% 30%' + byte._drawEl() + prop = 'transform-origin' + style = byte.el.style + tr = style[ prop ] or style["#{mojs.h.prefix.css}#{prop}"] + expect(tr).toBe '50% 30% ' + + it 'should set `transform-origin` if `origin` changed', -> + byte = new Byte origin: '50% 30%' + spyOn(byte, '_fillOrigin').and.callThrough() + byte._props.origin = byte._parseStrokeDashOption( 'origin', '50% 40%'); + byte._drawEl() + prop = 'transform-origin' + style = byte.el.style + tr = style[ prop ] or style["#{mojs.h.prefix.css}#{prop}"] + expect(tr).toBe '50% 40% ' + expect(byte._fillOrigin).toHaveBeenCalled() + + it 'should not set `transform-origin` if `origin`', -> + byte = new Byte origin: '50% 30%' + byte._draw() + spyOn(byte, '_fillOrigin').and.callThrough() + byte._draw() + expect(byte._fillOrigin).not.toHaveBeenCalled() + + it 'should set `transform-origin` if `origin` in `_deltas`', -> + byte = new Byte origin: { '50% 30%': '50% 0'} + spyOn(byte, '_fillOrigin').and.callThrough() + byte._drawEl() + byte._drawEl() + expect(byte._fillOrigin.calls.count()).toBe 2 describe '_isPropChanged method ->', -> it 'should return bool showing if prop was changed after the last set', -> @@ -1077,6 +1111,20 @@ describe 'Transit ->', -> expect(tr._fillTransform()) .toBe 'scale(2, 3) translate(100px, 100px) rotate(50deg)' + describe '_fillOrigin method ->', -> + it 'return tranform-origin string of the el', -> + tr = new Transit x: 100, y: 100, origin: '50% 30%' + expect(tr._fillOrigin()).toBe '50% 30% ' + + it 'return tranform-origin string of the el with delta', -> + tr = new Transit + x: 100, y: 100, + easing: 'liner.none', + origin: { '0% 0%' : '50% 200%' } + tr.setProgress 0 + tr.setProgress .5 + expect(tr._fillOrigin()).toBe '25% 100% ' + describe '_hidePrevChainModule method ->', -> it 'should hide prevChainModule', -> module = { _hide: -> } diff --git a/spec/transit.js b/spec/transit.js index ba1315f76..36a269335 100644 --- a/spec/transit.js +++ b/spec/transit.js @@ -70,12 +70,13 @@ expect(byte._defaults.top).toBe(0); expect(byte._defaults.x).toBe(0); expect(byte._defaults.y).toBe(0); - expect(byte._defaults.rx).toBe(0); - expect(byte._defaults.ry).toBe(0); expect(byte._defaults.angle).toBe(0); expect(byte._defaults.scale).toBe(1); expect(byte._defaults.scaleX).toBe(null); expect(byte._defaults.scaleY).toBe(null); + expect(byte._defaults.origin).toBe('50% 50%'); + expect(byte._defaults.rx).toBe(0); + expect(byte._defaults.ry).toBe(0); expect(byte._defaults.opacity).toBe(1); expect(byte._defaults.points).toBe(3); expect(byte._defaults.duration).toBe(400); @@ -338,7 +339,7 @@ 6: 4 } }); - return expect(byte._props.size).toBe(212); + return expect(byte._props.size).toBe(206); }); it('should calculate size el size based on radiusX/Y', function() { var byte; @@ -351,7 +352,7 @@ 6: 4 } }); - return expect(byte._props.size).toBe(412); + return expect(byte._props.size).toBe(406); }); it('should calculate size el size based on radiusX/Y', function() { var byte; @@ -365,7 +366,7 @@ 6: 4 } }); - return expect(byte._props.size).toBe(612); + return expect(byte._props.size).toBe(606); }); it('should calculate size el size based on radiusX/Y', function() { var byte; @@ -378,7 +379,7 @@ 6: 4 } }); - return expect(byte._props.size).toBe(212); + return expect(byte._props.size).toBe(206); }); it('should calculate size el size based on radiusX/Y', function() { var byte; @@ -389,7 +390,7 @@ 6: 4 } }); - return expect(byte._props.size).toBe(112); + return expect(byte._props.size).toBe(106); }); it('should have sizeGap option', function() { var byte; @@ -402,7 +403,7 @@ }, sizeGap: 40 }); - return expect(byte._props.size).toBe(292); + return expect(byte._props.size).toBe(286); }); it('should calculate size el size depending on shape\'s ratio', function() { var byte, rect; @@ -419,7 +420,7 @@ rect = new Rect({ ctx: svg }); - return expect(byte._props.size).toBe(212 * rect._props.ratio); + return expect(byte._props.size).toBe(206); }); it('should not calculate size el size if size was passed', function() { var byte; @@ -450,8 +451,8 @@ 4: 6 } }); - expect(byte._props.size).toBe(212); - return expect(byte._props.center).toBe(106); + expect(byte._props.size).toBe(206); + return expect(byte._props.center).toBe(103); }); it('should increase size if elastic.out/inout easing', function() { var byte; @@ -464,7 +465,7 @@ }, easing: 'Elastic.Out' }); - expect(byte._props.size).toBe(212 * 1.25); + expect(byte._props.size).toBe(206 * 1.25); expect(byte._props.center).toBe(byte._props.size / 2); byte = new Byte({ radius: { @@ -475,12 +476,13 @@ }, easing: 'Elastic.InOut' }); - expect(byte._props.size).toBe(212 * 1.25); + expect(byte._props.size).toBe(206 * 1.25); return expect(byte._props.center).toBe(byte._props.size / 2); }); return it('should increase size if back.out/inout easing', function() { var byte; byte = new Byte({ + isIt: 1, radius: { 25: -100 }, @@ -489,7 +491,7 @@ }, easing: 'back.Out' }); - expect(byte._props.size).toBe(212 * 1.1); + expect(byte._props.size).toBe(206 * 1.1); expect(byte._props.center).toBe(byte._props.size / 2); byte = new Byte({ radius: { @@ -500,7 +502,7 @@ }, easing: 'Back.InOut' }); - expect(byte._props.size).toBe(212 * 1.1); + expect(byte._props.size).toBe(206 * 1.1); return expect(byte._props.center).toBe(byte._props.size / 2); }); }); @@ -567,13 +569,13 @@ y: 20 }); expect(byte.el.style.position).toBe('absolute'); - expect(byte.el.style.width).toBe('54px'); - expect(byte.el.style.height).toBe('54px'); + expect(byte.el.style.width).toBe('52px'); + expect(byte.el.style.height).toBe('52px'); expect(byte.el.style.display).toBe('none'); - expect(byte.el.style['margin-left']).toBe('-27px'); - expect(byte.el.style['margin-top']).toBe('-27px'); - expect(byte.el.style['marginLeft']).toBe('-27px'); - expect(byte.el.style['marginTop']).toBe('-27px'); + expect(byte.el.style['margin-left']).toBe('-26px'); + expect(byte.el.style['margin-top']).toBe('-26px'); + expect(byte.el.style['marginLeft']).toBe('-26px'); + expect(byte.el.style['marginTop']).toBe('-26px'); return expect(byte._isShown).toBe(false); }); it('should skip props if foreign context', function() { @@ -590,10 +592,10 @@ expect(byte.el.style.position).not.toBe('absolute'); expect(byte.el.style.width).not.toBe('54px'); expect(byte.el.style.height).not.toBe('54px'); - expect(byte.el.style['margin-left']).not.toBe('-27px'); - expect(byte.el.style['margin-top']).not.toBe('-27px'); - expect(byte.el.style['marginLeft']).not.toBe('-27px'); - expect(byte.el.style['marginTop']).not.toBe('-27px'); + expect(byte.el.style['margin-left']).not.toBe('-26px'); + expect(byte.el.style['margin-top']).not.toBe('-26px'); + expect(byte.el.style['marginLeft']).not.toBe('-26px'); + expect(byte.el.style['marginTop']).not.toBe('-26px'); return expect(byte._isShown).toBe(false); }); it('should set display: block if isShowStart was passed', function() { @@ -617,12 +619,12 @@ byte._render(); h.remBase = 16; expect(byte.el.style.position).toBe('absolute'); - expect(byte.el.style.width).toBe('54px'); - expect(byte.el.style.height).toBe('54px'); - expect(byte.el.style['margin-left']).toBe('-27px'); - expect(byte.el.style['margin-top']).toBe('-27px'); - expect(byte.el.style['marginLeft']).toBe('-27px'); - return expect(byte.el.style['marginTop']).toBe('-27px'); + expect(byte.el.style.width).toBe('52px'); + expect(byte.el.style.height).toBe('52px'); + expect(byte.el.style['margin-left']).toBe('-26px'); + expect(byte.el.style['margin-top']).toBe('-26px'); + expect(byte.el.style['marginLeft']).toBe('-26px'); + return expect(byte.el.style['marginTop']).toBe('-26px'); }); it('should create bit', function() { var byte; @@ -1172,7 +1174,7 @@ isTr2 = tr === 'scale(1, 1) translate(0px, 4px) rotate(0deg)'; return expect(isTr || isTr2).toBe(true); }); - return it('should set transform if x changed #3', function() { + it('should set transform if x changed #3', function() { var byte, isTr, isTr2, style, tr; byte = new Byte({ radius: 25, @@ -1191,6 +1193,53 @@ isTr2 = tr === 'scale(3, 3) translate(0px, 0px) rotate(0deg)'; return expect(isTr || isTr2).toBe(true); }); + it('should set `transform-origin` if `origin`', function() { + var byte, prop, style, tr; + byte = new Byte({ + origin: '50% 30%' + }); + byte._drawEl(); + prop = 'transform-origin'; + style = byte.el.style; + tr = style[prop] || style["" + mojs.h.prefix.css + prop]; + return expect(tr).toBe('50% 30% '); + }); + it('should set `transform-origin` if `origin` changed', function() { + var byte, prop, style, tr; + byte = new Byte({ + origin: '50% 30%' + }); + spyOn(byte, '_fillOrigin').and.callThrough(); + byte._props.origin = byte._parseStrokeDashOption('origin', '50% 40%'); + byte._drawEl(); + prop = 'transform-origin'; + style = byte.el.style; + tr = style[prop] || style["" + mojs.h.prefix.css + prop]; + expect(tr).toBe('50% 40% '); + return expect(byte._fillOrigin).toHaveBeenCalled(); + }); + it('should not set `transform-origin` if `origin`', function() { + var byte; + byte = new Byte({ + origin: '50% 30%' + }); + byte._draw(); + spyOn(byte, '_fillOrigin').and.callThrough(); + byte._draw(); + return expect(byte._fillOrigin).not.toHaveBeenCalled(); + }); + return it('should set `transform-origin` if `origin` in `_deltas`', function() { + var byte; + byte = new Byte({ + origin: { + '50% 30%': '50% 0' + } + }); + spyOn(byte, '_fillOrigin').and.callThrough(); + byte._drawEl(); + byte._drawEl(); + return expect(byte._fillOrigin.calls.count()).toBe(2); + }); }); describe('_isPropChanged method ->', function() { it('should return bool showing if prop was changed after the last set', function() { @@ -1745,6 +1794,31 @@ return expect(tr._fillTransform()).toBe('scale(2, 3) translate(100px, 100px) rotate(50deg)'); }); }); + describe('_fillOrigin method ->', function() { + it('return tranform-origin string of the el', function() { + var tr; + tr = new Transit({ + x: 100, + y: 100, + origin: '50% 30%' + }); + return expect(tr._fillOrigin()).toBe('50% 30% '); + }); + return it('return tranform-origin string of the el with delta', function() { + var tr; + tr = new Transit({ + x: 100, + y: 100, + easing: 'liner.none', + origin: { + '0% 0%': '50% 200%' + } + }); + tr.setProgress(0); + tr.setProgress(.5); + return expect(tr._fillOrigin()).toBe('25% 100% '); + }); + }); describe('_hidePrevChainModule method ->', function() { it('should hide prevChainModule', function() { var module, tr;