kute.js/demo/src/kute-extra.min.js
thednp e5456b86e9 Changes:
* added a more consistent Typescript generate tsconfig.json
* in regards to Typescript, all internals/externals well defined
2021-11-13 18:51:59 +02:00

3 lines
55 KiB
JavaScript

// KUTE.js Extra v2.1.3 | thednp © 2021 | MIT-License
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).KUTE=e()}(this,(function(){"use strict";var t=function(t,e,n,r,a){var i=this;this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by;var o=function(t){return i.sampleCurveY(i.solveCurveX(t))};return Object.defineProperty(o,"name",{writable:!0}),o.name=a||"cubic-bezier("+[t,e,n,r]+")",o};t.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},t.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},t.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},t.prototype.solveCurveX=function(t){var e,n,r,a,i,o,s=1e-5;for(r=t,o=0;o<32;o+=1){if(a=this.sampleCurveX(r)-t,Math.abs(a)<s)return r;if(i=this.sampleCurveDerivativeX(r),Math.abs(i)<s)break;r-=a/i}if((r=t)<(e=0))return e;if(r>(n=1))return n;for(;e<n;){if(a=this.sampleCurveX(r),Math.abs(a-t)<s)return r;t>a?e=r:n=r,r=.5*(n-e)+e}return r};var e={},n=[],r="undefined"!=typeof global?global:"undefined"!=typeof window?window.self:{},a={},i={},o="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):"undefined"!=typeof Date&&Date.now?Date.now:function(){return(new Date).getTime()},s={};s.now=o;var u=0,c=function(t){for(var e=0;e<n.length;)n[e].update(t)?e+=1:n.splice(e,1);u=requestAnimationFrame(c)};function l(){setTimeout((function(){!n.length&&u&&(cancelAnimationFrame(u),u=null,Object.keys(i).forEach((function(t){"function"==typeof i[t]?e[t]&&delete e[t]:Object.keys(i[t]).forEach((function(t){e[t]&&delete e[t]}))})),Object.keys(a).forEach((function(t){e[t]&&delete e[t]})))}),64)}var p={Tick:u,Ticker:c,Tweens:n,Time:s};Object.keys(p).forEach((function(t){e[t]||(e[t]="Time"===t?s.now:p[t])})),r._KUTE=e;var h={},f={},d={duration:700,delay:0,easing:"linear"},v={},g={},m={},y={},b={},w={supportedProperties:h,defaultValues:f,defaultOptions:d,prepareProperty:v,prepareStart:g,crossCheck:m,onStart:i,onComplete:y,linkProperty:b},E={};function x(t){return n.push(t)}function S(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}function k(){var t=this;Object.keys(b).forEach((function(n){var r=b[n],a=h[n];Object.keys(r).forEach((function(n){"function"==typeof r[n]&&Object.keys(t.valuesEnd).some((function(e){return a&&a.includes(e)||"attr"===e&&Object.keys(t.valuesEnd[e]).some((function(t){return a&&a.includes(t)}))}))?e[n]||(e[n]=r[n]):Object.keys(t.valuesEnd).forEach((function(a){var i=t.valuesEnd[a];i instanceof Object&&Object.keys(i).forEach((function(t){"function"==typeof r[t]?e[t]||(e[t]=r[t]):Object.keys(r[n]).forEach((function(n){r[t]&&"function"==typeof r[t][n]&&(e[n]||(e[n]=r[t][n]))}))}))}))}))}))}var T={add:x,remove:S,getAll:function(){return n},removeAll:function(){n.length=0},stop:l,linkInterpolation:k};function O(t){if(!t.style)return!1;var e=t.style.cssText.replace(/\s/g,"").split(";"),n={},r=["translate3d","translate","scale3d","skew"];return e.forEach((function(t){/transform/i.test(t)&&t.split(":")[1].split(")").forEach((function(t){var e=t.split("("),a=e[0],i=e[1];/matrix/.test(a)||(n[a]=r.includes(a)?i.split(","):i)}))})),n}function M(t,e){var n=t.style,r=getComputedStyle(t)||t.currentStyle,a=n[e]&&!/auto|initial|none|unset/.test(n[e])?n[e]:r[e],i=f[e];return"transform"!==e&&(e in r||e in n)&&(i=a),i}function C(t,e){var n=this,r="start"===e?this.valuesStart:this.valuesEnd;Object.keys(v).forEach((function(e){var a=v[e],i=h[e];Object.keys(a).forEach((function(e){var o={};Object.keys(t).forEach((function(s){f[s]&&a[s]?r[s]=a[s].call(n,s,t[s]):!f[e]&&"transform"===e&&i.includes(s)?o[s]=t[s]:f[s]||"transform"!==s?!f[e]&&i&&i.includes(s)&&(r[s]=a[e].call(n,s,t[s])):r[s]=t[s]})),Object.keys(o).length&&(r[e]=a[e].call(n,e,o))}))}))}function _(){var t=this,e={},n=O(this.element);Object.keys(this.valuesStart).forEach((function(n){Object.keys(g).forEach((function(r){var a=g[r];Object.keys(a).forEach((function(i){(i===n&&a[n]||h[r]&&h[r].includes(n))&&(e[n]=a[i].call(t,n,t.valuesStart[n]))}))}))})),Object.keys(n).forEach((function(r){r in t.valuesStart||(e[r]=n[r]||f[r])})),this.valuesStart={},C.call(this,e,"start")}var j={getInlineStyle:O,getStyleForProperty:M,getStartValues:_,prepareObject:C},I={},A={linear:new t(0,0,1,1,"linear"),easingSinusoidalIn:new t(.47,0,.745,.715,"easingSinusoidalIn"),easingSinusoidalOut:new t(.39,.575,.565,1,"easingSinusoidalOut"),easingSinusoidalInOut:new t(.445,.05,.55,.95,"easingSinusoidalInOut"),easingQuadraticIn:new t(.55,.085,.68,.53,"easingQuadraticIn"),easingQuadraticOut:new t(.25,.46,.45,.94,"easingQuadraticOut"),easingQuadraticInOut:new t(.455,.03,.515,.955,"easingQuadraticInOut"),easingCubicIn:new t(.55,.055,.675,.19,"easingCubicIn"),easingCubicOut:new t(.215,.61,.355,1,"easingCubicOut"),easingCubicInOut:new t(.645,.045,.355,1,"easingCubicInOut"),easingQuarticIn:new t(.895,.03,.685,.22,"easingQuarticIn"),easingQuarticOut:new t(.165,.84,.44,1,"easingQuarticOut"),easingQuarticInOut:new t(.77,0,.175,1,"easingQuarticInOut"),easingQuinticIn:new t(.755,.05,.855,.06,"easingQuinticIn"),easingQuinticOut:new t(.23,1,.32,1,"easingQuinticOut"),easingQuinticInOut:new t(.86,0,.07,1,"easingQuinticInOut"),easingExponentialIn:new t(.95,.05,.795,.035,"easingExponentialIn"),easingExponentialOut:new t(.19,1,.22,1,"easingExponentialOut"),easingExponentialInOut:new t(1,0,0,1,"easingExponentialInOut"),easingCircularIn:new t(.6,.04,.98,.335,"easingCircularIn"),easingCircularOut:new t(.075,.82,.165,1,"easingCircularOut"),easingCircularInOut:new t(.785,.135,.15,.86,"easingCircularInOut"),easingBackIn:new t(.6,-.28,.735,.045,"easingBackIn"),easingBackOut:new t(.175,.885,.32,1.275,"easingBackOut"),easingBackInOut:new t(.68,-.55,.265,1.55,"easingBackInOut")};function P(t,e){try{var n,r;return e?(r=t instanceof Array&&t.every((function(t){return t instanceof Element})),n=t instanceof HTMLCollection||t instanceof NodeList||r?t:document.querySelectorAll(t)):n=t instanceof Element||t===window?t:document.querySelector(t),n}catch(e){throw TypeError("KUTE.js - Element(s) not found: "+t+".")}}function L(){var t=this;Object.keys(i).forEach((function(e){"function"==typeof i[e]?i[e].call(t,e):Object.keys(i[e]).forEach((function(n){i[e][n].call(t,n)}))})),k.call(this)}I.processEasing=function(e){if("function"==typeof e)return e;if("function"==typeof A[e])return A[e];if(/bezier/.test(e)){var n=e.replace(/bezier|\s|\(|\)/g,"").split(",");return new t(1*n[0],1*n[1],1*n[2],1*n[3])}return A.linear};var V=function(t,n,r,a){var o=this;this.element=t,this.playing=!1,this._startTime=null,this._startFired=!1,this.valuesEnd=r,this.valuesStart=n;var s=a||{};this._resetStart=s.resetStart||0,this._easing="function"==typeof s.easing?s.easing:I.processEasing(s.easing),this._duration=s.duration||d.duration,this._delay=s.delay||d.delay,Object.keys(s).forEach((function(t){var e="_"+t;e in o||(o[e]=s[t])}));var u=this._easing.name;return i[u]||(i[u]=function(t){e[t]||t!==this._easing.name||(e[t]=this._easing)}),this};V.prototype.start=function(t){return x(this),this.playing=!0,this._startTime=void 0!==t?t:e.Time(),this._startTime+=this._delay,this._startFired||(this._onStart&&this._onStart.call(this),L.call(this),this._startFired=!0),u||c(),this},V.prototype.stop=function(){return this.playing&&(S(this),this.playing=!1,this._onStop&&this._onStop.call(this),this.close()),this},V.prototype.close=function(){var t=this;Object.keys(y).forEach((function(e){Object.keys(y[e]).forEach((function(n){y[e][n].call(t,n)}))})),this._startFired=!1,l.call(this)},V.prototype.chain=function(t){return this._chain=[],this._chain=t.length?t:this._chain.concat(t),this},V.prototype.stopChainedTweens=function(){this._chain&&this._chain.length&&this._chain.forEach((function(t){return t.stop()}))},V.prototype.update=function(t){var n,r=this,a=void 0!==t?t:e.Time();if(a<this._startTime&&this.playing)return!0;n=(a-this._startTime)/this._duration,n=0===this._duration||n>1?1:n;var i=this._easing(n);return Object.keys(this.valuesEnd).forEach((function(t){e[t](r.element,r.valuesStart[t],r.valuesEnd[t],i)})),this._onUpdate&&this._onUpdate.call(this),1!==n||(this._onComplete&&this._onComplete.call(this),this.playing=!1,this.close(),void 0!==this._chain&&this._chain.length&&this._chain.map((function(t){return t.start()})),!1)},I.tween=V,d.repeat=0,d.repeatDelay=0,d.yoyo=!1,d.resetStart=!1;var N=function(t){function n(){for(var e=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];t.apply(this,n),this.valuesStart={},this.valuesEnd={};var a=n[1],i=n[2];C.call(this,i,"end"),this._resetStart?this.valuesStart=a:C.call(this,a,"start"),this._resetStart||Object.keys(m).forEach((function(t){Object.keys(m[t]).forEach((function(n){m[t][n].call(e,n)}))})),this.paused=!1,this._pauseTime=null;var o=n[3];return this._repeat=o.repeat||d.repeat,this._repeatDelay=o.repeatDelay||d.repeatDelay,this._repeatOption=this._repeat,this.valuesRepeat={},this._yoyo=o.yoyo||d.yoyo,this._reversed=!1,this}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.start=function(e){var n=this;return this._resetStart&&(this.valuesStart=this._resetStart,_.call(this),Object.keys(m).forEach((function(t){Object.keys(m[t]).forEach((function(e){m[t][e].call(n,e)}))}))),this.paused=!1,this._yoyo&&Object.keys(this.valuesEnd).forEach((function(t){n.valuesRepeat[t]=n.valuesStart[t]})),t.prototype.start.call(this,e),this},n.prototype.stop=function(){return t.prototype.stop.call(this),!this.paused&&this.playing&&(this.paused=!1,this.stopChainedTweens()),this},n.prototype.close=function(){return t.prototype.close.call(this),this._repeatOption>0&&(this._repeat=this._repeatOption),this._yoyo&&!0===this._reversed&&(this.reverse(),this._reversed=!1),this},n.prototype.resume=function(){return this.paused&&this.playing&&(this.paused=!1,void 0!==this._onResume&&this._onResume.call(this),L.call(this),this._startTime+=e.Time()-this._pauseTime,x(this),u||c()),this},n.prototype.pause=function(){return!this.paused&&this.playing&&(S(this),this.paused=!0,this._pauseTime=e.Time(),void 0!==this._onPause&&this._onPause.call(this)),this},n.prototype.reverse=function(){var t=this;Object.keys(this.valuesEnd).forEach((function(e){var n=t.valuesRepeat[e];t.valuesRepeat[e]=t.valuesEnd[e],t.valuesEnd[e]=n,t.valuesStart[e]=t.valuesRepeat[e]}))},n.prototype.update=function(t){var n,r=this,a=void 0!==t?t:e.Time();if(a<this._startTime&&this.playing)return!0;n=(a-this._startTime)/this._duration,n=0===this._duration||n>1?1:n;var i=this._easing(n);return Object.keys(this.valuesEnd).forEach((function(t){e[t](r.element,r.valuesStart[t],r.valuesEnd[t],i)})),this._onUpdate&&this._onUpdate.call(this),1!==n||(this._repeat>0?(Number.isFinite(this._repeat)&&(this._repeat-=1),this._startTime=a,Number.isFinite(this._repeat)&&this._yoyo&&!this._reversed&&(this._startTime+=this._repeatDelay),this._yoyo&&(this._reversed=!this._reversed,this.reverse()),!0):(this._onComplete&&this._onComplete.call(this),this.playing=!1,this.close(),void 0!==this._chain&&this._chain.length&&this._chain.forEach((function(t){return t.start()})),!1))},n}(V);I.tween=N;var R=function(t){function e(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.apply(this,e),this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.on=function(t,e){["start","stop","update","complete","pause","resume"].indexOf(t)>-1&&(this["_on"+(t.charAt(0).toUpperCase()+t.slice(1))]=e)},e.prototype.option=function(t,e){this["_"+t]=e},e}(N);I.tween=R;var U=function(t,e,n,r){var a=this;this.tweens=[],"offset"in d||(d.offset=0);var i=r||{};i.delay=i.delay||d.delay;var o=[];return Array.from(t).forEach((function(t,r){var s=I.tween;if(o[r]=i||{},o[r].delay=r>0?i.delay+(i.offset||d.offset):i.delay,!(t instanceof Element))throw Error("KUTE.js - "+t+" not instanceof [Element]");a.tweens.push(new s(t,e,n,o[r]))})),this.length=this.tweens.length,this};U.prototype.start=function(t){var n=void 0===t?e.Time():t;return this.tweens.map((function(t){return t.start(n)})),this},U.prototype.stop=function(){return this.tweens.map((function(t){return t.stop()})),this},U.prototype.pause=function(t){var n=void 0===t?e.Time():t;return this.tweens.map((function(t){return t.pause(n)})),this},U.prototype.resume=function(t){var n=void 0===t?e.Time():t;return this.tweens.map((function(t){return t.resume(n)})),this},U.prototype.chain=function(t){var e=this.tweens[this.length-1];if(t instanceof U)e.chain(t.tweens);else{if(!(t instanceof I.tween))throw new TypeError("KUTE.js - invalid chain value");e.chain(t)}return this},U.prototype.playing=function(){return this.tweens.some((function(t){return t.playing}))},U.prototype.removeTweens=function(){this.tweens=[]},U.prototype.getMaxDuration=function(){var t=[];return this.tweens.forEach((function(e){t.push(e._duration+e._delay+e._repeat*e._repeatDelay)})),Math.max(t)};var q=function(t,e){var n;if(this.element=P(t),this.element.tween=e,this.element.tween.toolbar=this.element,this.element.toolbar=this,n=this.element.parentNode.getElementsByTagName("OUTPUT"),this.element.output=n[0],!(this.element instanceof HTMLInputElement))throw TypeError("Target element is not [HTMLInputElement]");if("range"!==this.element.type)throw TypeError("Target element is not a range input");if(!(e instanceof I.tween))throw TypeError("tween parameter is not ["+I.tween+"]");this.element.setAttribute("value",0),this.element.setAttribute("min",0),this.element.setAttribute("max",1),this.element.setAttribute("step",1e-4),this.element.tween._onUpdate=this.updateBar,this.element.addEventListener("mousedown",this.downAction,!1)};q.prototype.updateBar=function(){var t,n=this.toolbar.output;(t=this.paused?this.toolbar.value:(e.Time()-this._startTime)/this._duration)>.9999&&(t=1),t<.01&&(t=0);var r=this._reversed?1-t:t;this.toolbar.value=r,n&&(n.value=(1e4*r>>0)/100+"%")},q.prototype.toggleEvents=function(t){this.element[t+"EventListener"]("mousemove",this.moveAction,!1),this.element[t+"EventListener"]("mouseup",this.upAction,!1)},q.prototype.updateTween=function(){var t=(this.tween._reversed?1-this.value:this.value)*this.tween._duration-1e-4;this.tween._startTime=0,this.tween.update(t)},q.prototype.moveAction=function(){this.toolbar.updateTween.call(this)},q.prototype.downAction=function(){this.tween.playing||this.tween.start(),this.tween.paused||(this.tween.pause(),this.toolbar.toggleEvents("add"),e.Tick=cancelAnimationFrame(e.Ticker))},q.prototype.upAction=function(){this.tween.paused&&(this.tween.paused&&this.tween.resume(),this.tween._startTime=e.Time()-(this.tween._reversed?1-this.value:this.value)*this.tween._duration,this.toolbar.toggleEvents("remove"),e.Tick=requestAnimationFrame(e.Ticker))};var F=function(t){try{if(t.component in h)throw Error("KUTE.js - "+t.component+" already registered");if(t.property in f)throw Error("KUTE.js - "+t.property+" already registered");this.setComponent(t)}catch(t){throw Error(t)}};F.prototype.setComponent=function(t){var e=this,n=t.component,r={prepareProperty:v,prepareStart:g,onStart:i,onComplete:y,crossCheck:m},o=t.category,s=t.property,u=t.properties&&t.properties.length||t.subProperties&&t.subProperties.length;return h[n]=t.properties||t.subProperties||t.property,"defaultValue"in t?(f[s]=t.defaultValue,e.supports=s+" property"):t.defaultValues&&(Object.keys(t.defaultValues).forEach((function(e){f[e]=t.defaultValues[e]})),e.supports=(u||s)+" "+(s||o)+" properties"),t.defaultOptions&&Object.keys(t.defaultOptions).forEach((function(e){d[e]=t.defaultOptions[e]})),t.functions&&Object.keys(r).forEach((function(e){e in t.functions&&("function"==typeof t.functions[e]?(r[e][n]||(r[e][n]={}),r[e][n][o||s]||(r[e][n][o||s]=t.functions[e])):Object.keys(t.functions[e]).forEach((function(a){r[e][n]||(r[e][n]={}),r[e][n][a]||(r[e][n][a]=t.functions[e][a])})))})),t.Interpolate&&(Object.keys(t.Interpolate).forEach((function(e){var n=t.Interpolate[e];"function"!=typeof n||a[e]?Object.keys(n).forEach((function(t){"function"!=typeof n[t]||a[e]||(a[e]=n[t])})):a[e]=n})),b[n]=t.Interpolate),t.Util&&Object.keys(t.Util).forEach((function(e){E[e]||(E[e]=t.Util[e])})),e};var D=function(t){function e(){for(var e,n=[],r=arguments.length;r--;)n[r]=arguments[r];t.apply(this,n),(e=this).setComponent.apply(e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setComponent=function(e){t.prototype.setComponent.call(this,e);var n=this,r={prepareProperty:v,prepareStart:g,onStart:i,onComplete:y,crossCheck:m},o=e.category,s=e.property,u=e.properties&&e.properties.length||e.subProperties&&e.subProperties.length;return"defaultValue"in e?(n.supports=s+" property",n.defaultValue=(""+e.defaultValue).length?"YES":"not set or incorrect"):e.defaultValues&&(n.supports=(u||s)+" "+(s||o)+" properties",n.defaultValues=Object.keys(e.defaultValues).length===u?"YES":"Not set or incomplete"),e.defaultOptions&&(n.extends=[],Object.keys(e.defaultOptions).forEach((function(t){n.extends.push(t)})),n.extends.length?n.extends="with <"+n.extends.join(", ")+"> new option(s)":delete n.extends),e.functions&&(n.interface=[],n.render=[],n.warning=[],Object.keys(r).forEach((function(t){t in e.functions?("prepareProperty"===t&&n.interface.push("fromTo()"),"prepareStart"===t&&n.interface.push("to()"),"onStart"===t&&(n.render="can render update")):("prepareProperty"===t&&n.warning.push("fromTo()"),"prepareStart"===t&&n.warning.push("to()"),"onStart"===t&&(n.render="no function to render update"))})),n.interface.length?n.interface=(o||s)+" can use ["+n.interface.join(", ")+"] method(s)":delete n.uses,n.warning.length?n.warning=(o||s)+" can't use ["+n.warning.join(", ")+"] method(s) because values aren't processed":delete n.warning),e.Interpolate?(n.uses=[],n.adds=[],Object.keys(e.Interpolate).forEach((function(t){var r=e.Interpolate[t];"function"==typeof r?(a[t]||n.adds.push(""+t),n.uses.push(""+t)):Object.keys(r).forEach((function(e){"function"!=typeof r[e]||a[t]||n.adds.push(""+e),n.uses.push(""+e)}))})),n.uses.length?n.uses="["+n.uses.join(", ")+"] interpolation function(s)":delete n.uses,n.adds.length?n.adds="new ["+n.adds.join(", ")+"] interpolation function(s)":delete n.adds):n.critical="For "+(s||o)+" no interpolation function[s] is set",e.Util&&(n.hasUtil=Object.keys(e.Util).join(",")),n},e}(F);function H(t,e,n){return+t+(e-t)*n}function B(t,e){for(var n,r=parseInt(t,10)||0,a=["px","%","deg","rad","em","rem","vh","vw"],i=0;i<a.length;i+=1)if("string"==typeof t&&t.includes(a[i])){n=a[i];break}return void 0===n&&(n=e?"deg":"px"),{v:r,u:n}}var Q={prepareStart:function(t){return M(this.element,t)||f[t]},prepareProperty:function(t,e){if(e instanceof Array){var n=B(e[0]).v,r=B(e[1]).v;return[Number.isNaN(1*n)?50:n,Number.isNaN(1*r)?50:r]}var a=e.replace(/top|left/g,0).replace(/right|bottom/g,100).replace(/center|middle/g,50);return[B((a=2===(a=a.split(/(,|\s)/g)).length?a:[a[0],50])[0]).v,B(a[1]).v]},onStart:function(t){this.valuesEnd[t]&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=(100*H(n[0],r[0],a)>>0)/100+"% "+(100*H(n[1],r[1],a)>>0)/100+"%"})}},z={component:"backgroundPositionProp",property:"backgroundPosition",defaultValue:[50,50],Interpolate:{numbers:H},functions:Q,Util:{trueDimension:B}};function X(t,e,n,r){return+t+(e-t)*r+n}function Y(t){t in this.valuesEnd&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=X(n.v,r.v,r.u,a)})}var W={};["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"].forEach((function(t){W[t]=Y}));var $=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],G={};$.forEach((function(t){G[t]=0}));var Z={};$.forEach((function(t){Z[t]=Y}));var K={component:"borderRadiusProperties",category:"borderRadius",properties:$,defaultValues:G,Interpolate:{units:X},functions:{prepareStart:function(t){return M(this.element,t)||f[t]},prepareProperty:function(t,e){return B(e)},onStart:Z},Util:{trueDimension:B}};function J(t){t in this.valuesEnd&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=(a>.99||a<.01?(10*H(n,r,a)>>0)/10:H(n,r,a)>>0)+"px"})}var tt={};["top","left","width","height"].forEach((function(t){tt[t]=J}));var et=["top","left","width","height","right","bottom","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","margin","marginTop","marginBottom","marginLeft","marginRight","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","outlineWidth"],nt={};et.forEach((function(t){nt[t]=0}));var rt={};et.forEach((function(t){rt[t]=J}));var at={component:"boxModelProperties",category:"boxModel",properties:et,defaultValues:nt,Interpolate:{numbers:H},functions:{prepareStart:function(t){return M(this.element,t)||f[t]},prepareProperty:function(t,e){var n=B(e),r="height"===t?"offsetHeight":"offsetWidth";return"%"===n.u?n.v*this.element[r]/100:n.v},onStart:rt}};var it={prepareStart:function(t){var e=M(this.element,t),n=M(this.element,"width"),r=M(this.element,"height");return/rect/.test(e)?e:[0,n,r,0]},prepareProperty:function(t,e){if(e instanceof Array)return e.map((function(t){return B(t)}));var n=e.replace(/rect|\(|\)/g,"");return(n=/,/g.test(n)?n.split(","):n.split(/\s/)).map((function(t){return B(t)}))},onStart:function(t){this.valuesEnd[t]&&!e[t]&&(e[t]=function(t,e,n,r){for(var a=0,i=[];a<4;a+=1){var o=e[a].v,s=n[a].v,u=n[a].u||"px";i[a]=(100*H(o,s,r)>>0)/100+u}t.style.clip="rect("+i+")"})}},ot={component:"clipProperty",property:"clip",defaultValue:[0,0,0,0],Interpolate:{numbers:H},functions:it,Util:{trueDimension:B}};function st(t){var e;if(/rgb|rgba/.test(t)){var n=t.replace(/\s|\)/,"").split("(")[1].split(","),r=n[3]?n[3]:null;r||(e={r:parseInt(n[0],10),g:parseInt(n[1],10),b:parseInt(n[2],10)}),e={r:parseInt(n[0],10),g:parseInt(n[1],10),b:parseInt(n[2],10),a:parseFloat(r)}}if(/^#/.test(t)){var a=function(t){var e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,n,r){return e+e+n+n+r+r})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}(t);e={r:a.r,g:a.g,b:a.b}}if(/transparent|none|initial|inherit/.test(t)&&(e={r:0,g:0,b:0,a:0}),!/^#|^rgb/.test(t)){var i=document.getElementsByTagName("head")[0];i.style.color=t;var o=getComputedStyle(i,null).color;o=/rgb/.test(o)?o.replace(/[^\d,]/g,"").split(","):[0,0,0],i.style.color="",e={r:parseInt(o[0],10),g:parseInt(o[1],10),b:parseInt(o[2],10)}}return e}function ut(t,e,n){var r={},a=",";return Object.keys(e).forEach((function(a){"a"!==a?r[a]=H(t[a],e[a],n)>>0||0:t[a]&&e[a]&&(r[a]=(100*H(t[a],e[a],n)>>0)/100)})),r.a?"rgba("+r.r+a+r.g+a+r.b+a+r.a+")":"rgb("+r.r+a+r.g+a+r.b+")"}function ct(t){this.valuesEnd[t]&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=ut(n,r,a)})}var lt={};["color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"].forEach((function(t){lt[t]=ct}));var pt=["color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],ht={};pt.forEach((function(t){ht[t]="#000"}));var ft={};pt.forEach((function(t){ft[t]=ct}));var dt={component:"colorProperties",category:"colors",properties:pt,defaultValues:ht,Interpolate:{numbers:H,colors:ut},functions:{prepareStart:function(t){return M(this.element,t)||f[t]},prepareProperty:function(t,e){return st(e)},onStart:ft},Util:{trueColor:st}};function vt(t,e,n){for(var r=[],a=0;a<3;a+=1)r[a]=(100*H(t[a],e[a],n)>>0)/100+"px";return"drop-shadow("+r.concat(ut(t[3],e[3],n)).join(" ")+")"}function gt(t){return t.replace("-r","R").replace("-s","S")}function mt(t){var e;3===t.length?e=[t[0],t[1],0,t[2]]:4===t.length&&(e=[t[0],t[1],t[2],t[3]]);for(var n=0;n<3;n+=1)e[n]=parseFloat(e[n]);return e[3]=st(e[3]),e}function yt(t){var e={},n=t.match(/(([a-z].*?)\(.*?\))(?=\s([a-z].*?)\(.*?\)|\s*$)/g),r="none"!==t?n:"none";if(r instanceof Array)for(var a=0,i=r.length;a<i;a+=1){var o=r[a].trim().split(/\((.+)/),s=gt(o[0]);if("dropShadow"===s){var u=o[1].match(/(([a-z].*?)\(.*?\))(?=\s(.*?))/)[0],c=o[1].replace(u,"").split(/\s/).map(parseFloat);e[s]=c.filter((function(t){return!Number.isNaN(t)})).concat(u)}else e[s]=o[1].replace(/'|"|\)/g,"")}return e}var bt={prepareStart:function(t,e){var n,r=yt(M(this.element,t));return Object.keys(e).forEach((function(e){n=gt(e),r[n]||(r[n]=f[t][e])})),r},prepareProperty:function(t,e){var n,r={};return Object.keys(e).forEach((function(t){n=gt(t),/hue/.test(t)?r[n]=parseFloat(e[t]):/drop/.test(t)?r[n]=mt(e[t]):r[t]="url"===t?e[t]:parseFloat(e[t])})),r},onStart:function(t){this.valuesEnd[t]&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=(r.url?"url("+r.url+")":"")+(n.opacity||r.opacity?"opacity("+(100*H(n.opacity,r.opacity,a)>>0)/100+"%)":"")+(n.blur||r.blur?"blur("+(100*H(n.blur,r.blur,a)>>0)/100+"em)":"")+(n.saturate||r.saturate?"saturate("+(100*H(n.saturate,r.saturate,a)>>0)/100+"%)":"")+(n.invert||r.invert?"invert("+(100*H(n.invert,r.invert,a)>>0)/100+"%)":"")+(n.grayscale||r.grayscale?"grayscale("+(100*H(n.grayscale,r.grayscale,a)>>0)/100+"%)":"")+(n.hueRotate||r.hueRotate?"hue-rotate("+(100*H(n.hueRotate,r.hueRotate,a)>>0)/100+"deg)":"")+(n.sepia||r.sepia?"sepia("+(100*H(n.sepia,r.sepia,a)>>0)/100+"%)":"")+(n.brightness||r.brightness?"brightness("+(100*H(n.brightness,r.brightness,a)>>0)/100+"%)":"")+(n.contrast||r.contrast?"contrast("+(100*H(n.contrast,r.contrast,a)>>0)/100+"%)":"")+(n.dropShadow||r.dropShadow?vt(n.dropShadow,r.dropShadow,a):"")})},crossCheck:function(t){var e=this;this.valuesEnd[t]&&Object.keys(this.valuesStart[t]).forEach((function(n){e.valuesEnd[t][n]||(e.valuesEnd[t][n]=e.valuesStart[t][n])}))}},wt={component:"filterEffects",property:"filter",defaultValue:{opacity:100,blur:0,saturate:100,grayscale:0,brightness:100,contrast:100,sepia:0,invert:0,hueRotate:0,dropShadow:[0,0,0,{r:0,g:0,b:0}],url:""},Interpolate:{opacity:H,blur:H,saturate:H,grayscale:H,brightness:H,contrast:H,sepia:H,invert:H,hueRotate:H,dropShadow:{numbers:H,colors:ut,dropShadow:vt}},functions:bt,Util:{parseDropShadow:mt,parseFilterString:yt,replaceDashNamespace:gt,trueColor:st}},Et={},xt="htmlAttributes",St=["fill","stroke","stop-color"];function kt(t){return t.replace(/[A-Z]/g,"-$&").toLowerCase()}var Tt={prepareStart:function(t,e){var n=this,r={};return Object.keys(e).forEach((function(t){var e=kt(t).replace(/_+[a-z]+/,""),a=n.element.getAttribute(e);r[e]=St.includes(e)?a||"rgba(0,0,0,0)":a||(/opacity/i.test(t)?1:0)})),r},prepareProperty:function(t,e){var n=this,r={};return Object.keys(e).forEach((function(a){var o=kt(a),s=/(%|[a-z]+)$/,u=n.element.getAttribute(o.replace(/_+[a-z]+/,""));if(St.includes(o))i.htmlAttributes[o]=function(e){n.valuesEnd[t]&&n.valuesEnd[t][e]&&!(e in Et)&&(Et[e]=function(t,e,n,r,a){t.setAttribute(e,ut(n,r,a))})},r[o]=st(e[a])||f.htmlAttributes[a];else if(null!==u&&s.test(u)){var c=B(u).u||B(e[a]).u,l=/%/.test(c)?"_percent":"_"+c;i.htmlAttributes[o+l]=function(e){n.valuesEnd[t]&&n.valuesEnd[t][e]&&!(e in Et)&&(Et[e]=function(t,e,n,r,a){var i=e.replace(l,"");t.setAttribute(i,(1e3*H(n.v,r.v,a)>>0)/1e3+r.u)})},r[o+l]=B(e[a])}else s.test(e[a])&&null!==u&&(null===u||s.test(u))||(i.htmlAttributes[o]=function(e){n.valuesEnd[t]&&n.valuesEnd[t][e]&&!(e in Et)&&(Et[e]=function(t,e,n,r,a){t.setAttribute(e,(1e3*H(n,r,a)>>0)/1e3)})},r[o]=parseFloat(e[a]))})),r},onStart:{attr:function(t){!e[t]&&this.valuesEnd[t]&&(e[t]=function(t,n,r,a){Object.keys(r).forEach((function(i){e.attributes[i](t,i,n[i],r[i],a)}))})},attributes:function(t){!e[t]&&this.valuesEnd.attr&&(e[t]=Et)}}},Ot={component:xt,property:"attr",subProperties:["fill","stroke","stop-color","fill-opacity","stroke-opacity"],defaultValue:{fill:"rgb(0,0,0)",stroke:"rgb(0,0,0)","stop-color":"rgb(0,0,0)",opacity:1,"stroke-opacity":1,"fill-opacity":1},Interpolate:{numbers:H,colors:ut},functions:Tt,Util:{replaceUppercase:kt,trueColor:st,trueDimension:B}};var Mt={prepareStart:function(t){return M(this.element,t)},prepareProperty:function(t,e){return parseFloat(e)},onStart:function(t){t in this.valuesEnd&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=(1e3*H(n,r,a)>>0)/1e3})}},Ct={component:"opacityProperty",property:"opacity",defaultValue:1,Interpolate:{numbers:H},functions:Mt};function _t(t,e){return parseFloat(t)/100*e}function jt(t){return 2*t.getAttribute("width")+2*t.getAttribute("height")}function It(t){var e=t.getAttribute("points").split(" "),n=0;if(e.length>1){var r=function(t){var e=t.split(",");return 2!==e.length||Number.isNaN(1*e[0])||Number.isNaN(1*e[1])?0:[parseFloat(e[0]),parseFloat(e[1])]},a=function(t,e){return void 0!==t&&void 0!==e?Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)):0};if(e.length>2)for(var i=0;i<e.length-1;i+=1)n+=a(r(e[i]),r(e[i+1]));n+="polygon"===t.tagName?a(r(e[0]),r(e[e.length-1])):0}return n}function At(t){var e=t.getAttribute("x1"),n=t.getAttribute("x2"),r=t.getAttribute("y1"),a=t.getAttribute("y2");return Math.sqrt(Math.pow(n-e,2)+Math.pow(a-r,2))}function Pt(t){var e=t.getAttribute("r");return 2*Math.PI*e}function Lt(t){var e=2*t.getAttribute("rx"),n=2*t.getAttribute("ry");return Math.sqrt(.5*(e*e+n*n))*(2*Math.PI)/2}function Vt(t){return"rect"===t.tagName?jt(t):"circle"===t.tagName?Pt(t):"ellipse"===t.tagName?Lt(t):["polygon","polyline"].includes(t.tagName)?It(t):"line"===t.tagName?At(t):0}function Nt(t,e){var n,r,a,i,o=/path|glyph/.test(t.tagName)?t.getTotalLength():Vt(t);if(e instanceof Object)return e;if("string"==typeof e){var s=e.split(/,|\s/);n=/%/.test(s[0])?_t(s[0].trim(),o):parseFloat(s[0]),r=/%/.test(s[1])?_t(s[1].trim(),o):parseFloat(s[1])}else void 0===e&&(i=parseFloat(M(t,"stroke-dashoffset")),a=M(t,"stroke-dasharray").split(","),n=0-i,r=parseFloat(a[0])+n||o);return{s:n,e:r,l:o}}var Rt={prepareStart:function(){return Nt(this.element)},prepareProperty:function(t,e){return Nt(this.element,e)},onStart:function(t){t in this.valuesEnd&&!e[t]&&(e[t]=function(t,e,n,r){var a=(100*e.l>>0)/100,i=0-(100*H(e.s,n.s,r)>>0)/100,o=(100*H(e.e,n.e,r)>>0)/100+i;t.style.strokeDashoffset=i+"px",t.style.strokeDasharray=(100*(o<1?0:o)>>0)/100+"px, "+a+"px"})}},Ut={component:"svgDraw",property:"draw",defaultValue:"0% 0%",Interpolate:{numbers:H},functions:Rt,Util:{getRectLength:jt,getPolyLength:It,getLineLength:At,getCircleLength:Pt,getEllipseLength:Lt,getTotalLength:Vt,resetDraw:function(t){t.style.strokeDashoffset="",t.style.strokeDasharray=""},getDraw:Nt,percent:_t}};function qt(t){return t.map((function(t){return Array.isArray(t)?qt(t):Number.isNaN(+t)?t:+t}))}var Ft=4;function Dt(t,e){var n=Number.isNaN(+e)?Ft:+e;return n?t.map((function(t){return t.map((function(t){var e=+t,r=Math.pow(10,n);return e?e%1==0?e:Math.round(e*r)/r:t}))})):qt(t)}var Ht={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Bt(t){var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;if("m"===n&&r.length>2&&(t.segments.push([e,r[0],r[1]]),r=r.slice(2),n="l",e="m"===e?"l":"L"),"r"===n)t.segments.push([e].concat(r));else for(;r.length>=Ht[n]&&(t.segments.push([e].concat(r.splice(0,Ht[n]))),Ht[n]););}var Qt="Invalid path value";function zt(t){var e=t.pathValue.charCodeAt(t.index);return 48===e?(t.param=0,void(t.index+=1)):49===e?(t.param=1,void(t.index+=1)):void(t.err=Qt+": invalid Arc flag "+e)}function Xt(t){return t>=48&&t<=57}function Yt(t){var e,n=t.index,r=t.max,a=n,i=!1,o=!1,s=!1,u=!1;if(a>=r)t.err=Qt+": missing param "+t.pathValue[a];else if(43!==(e=t.pathValue.charCodeAt(a))&&45!==e||(e=(a+=1)<r?t.pathValue.charCodeAt(a):0),Xt(e)||46===e){if(46!==e){if(i=48===e,e=(a+=1)<r?t.pathValue.charCodeAt(a):0,i&&a<r&&e&&Xt(e))return void(t.err=Qt+": "+t.pathValue[n]+" illegal number");for(;a<r&&Xt(t.pathValue.charCodeAt(a));)a+=1,o=!0;e=a<r?t.pathValue.charCodeAt(a):0}if(46===e){for(u=!0,a+=1;Xt(t.pathValue.charCodeAt(a));)a+=1,s=!0;e=a<r?t.pathValue.charCodeAt(a):0}if(101===e||69===e){if(u&&!o&&!s)return void(t.err=Qt+": "+t.pathValue[a]+" invalid float exponent");if(43!==(e=(a+=1)<r?t.pathValue.charCodeAt(a):0)&&45!==e||(a+=1),!(a<r&&Xt(t.pathValue.charCodeAt(a))))return void(t.err=Qt+": "+t.pathValue[a]+" invalid float exponent");for(;a<r&&Xt(t.pathValue.charCodeAt(a));)a+=1}t.index=a,t.param=+t.pathValue.slice(n,a)}else t.err=Qt+" at index "+a+": "+t.pathValue[a]+" is not a number"}function Wt(t){for(;t.index<t.max&&(10===(e=t.pathValue.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0);)t.index+=1;var e}function $t(t){return t>=48&&t<=57||43===t||45===t||46===t}function Gt(t){var e=t.max,n=t.pathValue.charCodeAt(t.index),r=Ht[t.pathValue[t.index].toLowerCase()];if(t.segmentStart=t.index,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0;default:return!1}}(n))if(t.index+=1,Wt(t),t.data=[],r){for(;;){for(var a=r;a>0;a-=1){if(97!=(32|n)||3!==a&&4!==a?Yt(t):zt(t),t.err.length)return;t.data.push(t.param),Wt(t),t.index<e&&44===t.pathValue.charCodeAt(t.index)&&(t.index+=1,Wt(t))}if(t.index>=t.max)break;if(!$t(t.pathValue.charCodeAt(t.index)))break}Bt(t)}else Bt(t);else t.err=Qt+": "+t.pathValue[t.index]+" not a path command"}function Zt(t){this.segments=[],this.pathValue=t,this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}function Kt(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return Ht[e]===t.length-1&&/[achlmrqstvz]/g.test(e)}))}function Jt(t,e){if(Kt(t))return qt(t);var n=new Zt(t);for(Wt(n);n.index<n.max&&!n.err.length;)Gt(n);return n.err.length?n.segments=[]:n.segments.length&&("mM".indexOf(n.segments[0][0])<0?(n.err=Qt+": missing M/m",n.segments=[]):n.segments[0][0]="M"),Dt(n.segments,e)}function te(t,e){if(function(t){return Kt(t)&&t.every((function(t){return t[0]===t[0].toUpperCase()}))}(t))return qt(t);var n=Jt(t,e),r=n.length,a=[],i=0,o=0,s=0,u=0,c=0;"M"===n[0][0]&&(s=i=+n[0][1],u=o=+n[0][2],c+=1,a.push(["M",i,o]));for(var l=c;l<r;l+=1){var p=n[l],h=p[0],f=h.toUpperCase(),d=[],v=[];if(a.push(d),h!==f)switch(d[0]=f,f){case"A":v=p.slice(1,-2).concat([+p[6]+i,+p[7]+o]);for(var g=0;g<v.length;g+=1)d.push(v[g]);break;case"V":d[1]=+p[1]+o;break;case"H":d[1]=+p[1]+i;break;default:"M"===f&&(s=+p[1]+i,u=+p[2]+o);for(var m=1;m<p.length;m+=1)d.push(+p[m]+(m%2?i:o))}else for(var y=0;y<p.length;y+=1)d.push(p[y]);var b=d.length;switch(f){case"Z":i=s,o=u;break;case"H":i=+d[1];break;case"V":o=+d[1];break;default:i=+d[b-2],o=+d[b-1],"M"===f&&(s=i,u=o)}}return Dt(a,e)}function ee(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],a=n;r.length;)e[n]="A",t.splice(a+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}function ne(t,e,n){var r=t[0],a=t.slice(1),i=t;if("TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null),"H"===r)i=["L",t[1],e.y1];else if("V"===r)i=["L",e.x1,t[1]];else if("S"===r){var o=function(t,e,n,r,a){return"CS".indexOf(a)>-1?{x1:2*t-n,y1:2*e-r}:{x1:t,y1:e}}(e.x1,e.y1,e.x2,e.y2,n),s=o.x1,u=o.y1;e.x1=s,e.y1=u,i=["C",s,u].concat(a)}else if("T"===r){var c=function(t,e,n,r,a){return"QT".indexOf(a)>-1?{qx:2*t-n,qy:2*e-r}:{qx:t,qy:e}}(e.x1,e.y1,e.qx,e.qy,n),l=c.qx,p=c.qy;e.qx=l,e.qy=p,i=["Q",l,p].concat(a)}else if("Q"===r){var h=a[0],f=a[1];e.qx=h,e.qy=f}return i}function re(t,e){if(function(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return Ht[e]===t.length-1&&/[ACLMQZ]/.test(t[0])}))}(t))return qt(t);for(var n,r,a=te(t,e),i={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},o=[],s=a.length,u="",c=0;c<s;c+=1){var l=a[c][0];o[c]=l,c&&(u=o[c-1]),a[c]=ne(a[c],i,u),r=(n=a[c]).length,i.x1=+n[r-2],i.y1=+n[r-1],i.x2=+n[r-4]||i.x1,i.y2=+n[r-3]||i.y1}return Dt(a,e)}function ae(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function ie(t,e,n,r,a,i,o,s,u,c){var l,p,h,f,d,v=120*Math.PI/180,g=Math.PI/180*(a||0),m=[],y=t,b=s,w=e,E=u,x=n,S=r;if(c){p=c[0],h=c[1],f=c[2],d=c[3]}else{y=(l=ae(y,w,-g)).x,w=l.y;var k=(y-(b=(l=ae(b,E,-g)).x))/2,T=(w-(E=l.y))/2,O=k*k/(x*S)+Math.pow(T,2)/Math.pow(S,2);O>1&&(x*=O=Math.sqrt(O),S*=O);var M=Math.pow(x,2),C=Math.pow(S,2),_=(i===o?-1:1)*Math.sqrt(Math.abs((M*C-M*T*T-C*k*k)/(M*T*T+C*k*k)));f=_*x*T/S+(y+b)/2,d=_*-S*k/x+(w+E)/2,p=Math.asin(((w-d)/S*Math.pow(10,9)>>0)/Math.pow(10,9)),h=Math.asin(((E-d)/S*Math.pow(10,9)>>0)/Math.pow(10,9)),p=y<f?Math.PI-p:p,h=b<f?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),o&&p>h&&(p-=2*Math.PI),!o&&h>p&&(h-=2*Math.PI)}var j=h-p;if(Math.abs(j)>v){var I=h,A=b,P=E;h=p+v*(o&&h>p?1:-1),b=f+x*Math.cos(h),E=d+S*Math.sin(h),m=ie(b,E,x,S,a,0,o,A,P,[h,I,f,d])}j=h-p;var L=Math.cos(p),V=Math.sin(p),N=Math.cos(h),R=Math.sin(h),U=Math.tan(j/4),q=4/3*x*U,F=4/3*S*U,D=[y,w],H=[y+q*V,w-F*L],B=[b+q*R,E-F*N],Q=[b,E];return H[0]=2*D[0]-H[0],H[1]=2*D[1]-H[1],c?[H,B,Q].concat(m):(m=[H,B,Q].concat(m).join().split(",")).map((function(t,e){return e%2?ae(m[e-1],t,g).y:ae(t,m[e+1],g).x}))}function oe(t,e,n,r,a,i){var o=1/3,s=2/3;return[o*t+s*n,o*e+s*r,o*a+s*n,o*i+s*r,a,i]}function se(t,e,n,r,a,i,o,s,u){var c=1-u;return{x:Math.pow(c,3)*t+c*c*3*u*n+3*c*u*u*a+Math.pow(u,3)*o,y:Math.pow(c,3)*e+c*c*3*u*r+3*c*u*u*i+Math.pow(u,3)*s}}function ue(t,e,n){var r=t[0],a=t[1];return[r+(e[0]-r)*n,a+(e[1]-a)*n]}function ce(t,e,n,r){var a=.5,i=[t,e],o=[n,r],s=ue(i,o,a),u=ue(o,s,a),c=ue(s,u,a),l=ue(u,c,a),p=ue(c,l,a),h=se.apply(0,i.concat(s,c,p,a)),f=se.apply(0,p.concat(l,u,o,0));return[h.x,h.y,f.x,f.y,n,r]}function le(t,e){"TQ".indexOf(t[0])<0&&(e.qx=null,e.qy=null);var n=t.slice(1),r=n[0],a=n[1];switch(t[0]){case"M":return e.x=r,e.y=a,t;case"A":return["C"].concat(ie.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"Q":return e.qx=r,e.qy=a,["C"].concat(oe.apply(0,[e.x1,e.y1].concat(t.slice(1))));case"L":return["C"].concat(ce(e.x1,e.y1,t[1],t[2]));case"Z":return["C"].concat(ce(e.x1,e.y1,e.x,e.y))}return t}function pe(t,e){if(function(t){return Kt(t)&&t.slice(1).every((function(t){return"C"===t[0]}))}(t))return qt(t);for(var n,r,a=re(t,e),i={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},o=[],s="",u=a.length,c=0;c<u;c+=1)a[c]&&(s=a[c][0]),o[c]=s,a[c]=le(a[c],i),ee(a,o,c),u=a.length,r=(n=a[c]).length,i.x1=+n[r-2],i.y1=+n[r-1],i.x2=+n[r-4]||i.x1,i.y2=+n[r-3]||i.y1;return Dt(a,e)}function he(t){return t.map((function(t){return t[0].concat(t.slice(1).join(" "))})).join("")}function fe(t){var e=t.slice(1).map((function(e,n,r){return n?r[n-1].slice(-2).concat(e.slice(1)):t[0].slice(1).concat(e.slice(1))})).map((function(t){return t.map((function(e,n){return t[t.length-n-2*(1-n%2)]}))})).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map((function(t){return["C"].concat(t.slice(2))})))}function de(t,e,n,r,a,i,o,s){return 3*((s-e)*(n+a)-(o-t)*(r+i)+r*(t-a)-n*(e-i)+s*(a+t/3)-o*(i+e/3))/20}function ve(t,e){return function(t,e){var n=0,r=0,a=0,i=0,o=0;return pe(t,e).map((function(t){var e;switch(t[0]){case"M":case"Z":return a="M"===t[0]?t[1]:a,i="M"===t[0]?t[2]:i,n=a,r=i,0;default:return o=de.apply(0,[n,r].concat(t.slice(1))),e=t.slice(-2),n=e[0],r=e[1],o}})).reduce((function(t,e){return t+e}),0)}(pe(t,e))>=0}function ge(t,e){var n=e||.5,r=t.slice(0,2),a=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),s=ue(r,a,n),u=ue(a,i,n),c=ue(i,o,n),l=ue(s,u,n),p=ue(u,c,n),h=ue(l,p,n);return[["C"].concat(s,l,h),["C"].concat(p,c,o)]}function me(t,e,n,r,a){return a*(a*(-3*t+9*e-9*n+3*r)+6*t-12*e+6*n)-3*t+3*e}function ye(t,e,n,r,a,i,o,s,u){var c;(null===u||Number.isNaN(+u))&&(c=1),c>1&&(c=1),c<0&&(c=0);var l=c/2,p=0,h=0,f=0,d=0,v=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];return[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816].forEach((function(u,c){h=me(t,n,a,o,p=l*u+l),f=me(e,r,i,s,p),d+=v[c]*Math.sqrt(h*h+f*f)})),l*d}function be(t){return pe((e=he(te(t)),he(te(e,0)).replace(/(m|M)/g,"|$1").split("|").map((function(t){return t.trim()})).filter((function(t){return t})))[0]).map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),a=e?ye.apply(0,r):0;return{s:t,ss:e?a?ge(r):[t,t]:[t],l:a}}));var e}function we(t,e,n){var r=be(t),a=be(e),i=r.length,o=a.length,s=r.filter((function(t){return t.l})).length,u=a.filter((function(t){return t.l})).length,c=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,l=a.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,p=n||Math.max(i,o),h=[c,l],f=[p-i,p-o],d=0,v=[r,a].map((function(t,e){return t.l===p?t.map((function(t){return t.s})):t.map((function(t,n){return d=n&&f[e]&&t.l>=h[e],f[e]-=d?1:0,d?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:we(v[0],v[1],p)}function Ee(t){var e=t.length,n=e-1;return t.map((function(r,a){return t.map((function(r,i){var o,s=a+i;return 0===i||t[s]&&"M"===t[s][0]?(o=t[s],["M"].concat(o.slice(-2))):(s>=e&&(s-=n),t[s])}))}))}function xe(t,e){var n=t.length-1,r=[],a=0,i=Ee(t);return i.forEach((function(i,o){t.slice(1).forEach((function(r,i){a+=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}(t[(o+i)%n].slice(-2),e[i%n].slice(-2))})),r[o]=a,a=0})),i[r.indexOf(Math.min.apply(null,r))]}var Se={prepareStart:function(){return this.element.getAttribute("d")},prepareProperty:function(t,e){var n={},r=new RegExp("\\n","ig"),a=null;return e instanceof SVGElement?a=e:/^\.|^#/.test(e)&&(a=P(e)),"object"==typeof e&&e.curve?e:(a&&/path|glyph/.test(a.tagName)?n.original=a.getAttribute("d").replace(r,""):a||"string"!=typeof e||(n.original=e.replace(r,"")),n)},onStart:function(t){!e[t]&&this.valuesEnd[t]&&(e[t]=function(t,e,n,r){for(var a=[],i=e.curve,o=n.curve,s=0,u=o.length;s<u;s+=1){a.push([i[s][0]]);for(var c=1,l=i[s].length;c<l;c+=1)a[s].push((1e3*H(i[s][c],o[s][c],r)>>0)/1e3)}t.setAttribute("d",1===r?n.original:he(a))})},crossCheck:function(t){if(this.valuesEnd[t]){var e=this.valuesStart[t].curve,n=this.valuesEnd[t].curve;if(!e||!n||e&&n&&"M"===e[0][0]&&e.length!==n.length){var r=we(this.valuesStart[t].original,this.valuesEnd[t].original),a=ve(r[0])!==ve(r[1])?fe(r[0]):qt(r[0]);this.valuesStart[t].curve=a,this.valuesEnd[t].curve=xe(r[1],a)}}}},ke={component:"svgCubicMorph",property:"path",defaultValue:[],Interpolate:{numbers:H,pathToString:he},functions:Se,Util:{pathToCurve:pe,pathToAbsolute:te,pathToString:he,parsePathString:Jt,getRotatedCurve:xe,getRotations:Ee,equalizeSegments:we,reverseCurve:fe,clonePath:qt,getDrawDirection:ve,splitCubic:ge,getCurveArray:be}};function Te(t,e){var n=e.x,r=e.width;return/[a-z]/i.test(t)&&!/px/.test(t)?t.replace(/top|left/,0).replace(/right|bottom/,100).replace(/center|middle/,50):/%/.test(t)?n+parseFloat(t)*r/100:parseFloat(t)}function Oe(t){var e={},n=t&&/\)/.test(t)?t.substring(0,t.length-1).split(/\)\s|\)/):"none";if(n instanceof Array)for(var r=0,a=n.length;r<a;r+=1){var i=n[r].trim().split("("),o=i[0],s=i[1];e[o]=s}return e}function Me(t,e){var n,r={},a=this.element.getBBox(),i=a.x+a.width/2,o=a.y+a.height/2,s=this._transformOrigin;return(s=void 0!==s?s instanceof Array?s:s.split(/\s/):[i,o])[0]="number"==typeof s[0]?s[0]:Te(s[0],a),s[1]="number"==typeof s[1]?s[1]:Te(s[1],a),r.origin=s,Object.keys(e).forEach((function(t){var a;"rotate"===t?"number"==typeof e[t]?r[t]=e[t]:e[t]instanceof Array?(a=e[t],r[t]=a[0]):r[t]=1*e[t].split(/\s/)[0]:"translate"===t?(n=e[t]instanceof Array?e[t]:/,|\s/.test(e[t])?e[t].split(","):[e[t],0],r[t]=[1*n[0]||0,1*n[1]||0]):/skew/.test(t)?r[t]=1*e[t]||0:"scale"===t&&(r[t]=parseFloat(e[t])||1)})),r}var Ce={prepareStart:function(t,e){var n={},r=Oe(this.element.getAttribute("transform"));return Object.keys(e).forEach((function(t){var e="scale"===t?1:0;n[t]=t in r?r[t]:e})),n},prepareProperty:function(t,e){return Me.call(this,t,e)},onStart:function(t){!e[t]&&this.valuesEnd[t]&&(e[t]=function(t,e,n,r){var a=0,i=0,o=Math.PI/180,s="scale"in n?H(e.scale,n.scale,r):1,u="rotate"in n?H(e.rotate,n.rotate,r):0,c=Math.sin(u*o),l=Math.cos(u*o),p="skewX"in n?H(e.skewX,n.skewX,r):0,h="skewY"in n?H(e.skewY,n.skewY,r):0,f=u||p||h||1!==s||0;a-=f?n.origin[0]:0,i-=f?n.origin[1]:0,a*=s,i*=s,i+=h?a*Math.tan(h*o):0;var d=l*(a+=p?i*Math.tan(p*o):0)-c*i;i=u?c*a+l*i:i,a=u?d:a,a+="translate"in n?H(e.translate[0],n.translate[0],r):0,i+="translate"in n?H(e.translate[1],n.translate[1],r):0,a+=f?n.origin[0]:0,i+=f?n.origin[1]:0,t.setAttribute("transform",(a||i?"translate("+(1e3*a>>0)/1e3+(i?","+(1e3*i>>0)/1e3:"")+")":"")+(u?"rotate("+(1e3*u>>0)/1e3+")":"")+(p?"skewX("+(1e3*p>>0)/1e3+")":"")+(h?"skewY("+(1e3*h>>0)/1e3+")":"")+(1!==s?"scale("+(1e3*s>>0)/1e3+")":""))})},crossCheck:function(t){if(this._resetStart&&this.valuesEnd[t]){var e=this.valuesStart[t],n=this.valuesEnd[t],r=Me.call(this,t,Oe(this.element.getAttribute("transform")));Object.keys(r).forEach((function(t){e[t]=r[t]}));var a=this.element.ownerSVGElement,i=a.createSVGTransformFromMatrix(a.createSVGMatrix().translate(-e.origin[0],-e.origin[1]).translate("translate"in e?e.translate[0]:0,"translate"in e?e.translate[1]:0).rotate(e.rotate||0).skewX(e.skewX||0).skewY(e.skewY||0).scale(e.scale||1).translate(+e.origin[0],+e.origin[1]));e.translate=[i.matrix.e,i.matrix.f],Object.keys(e).forEach((function(t){t in n&&"origin"!==t||(n[t]=e[t])}))}}},_e={component:"svgTransformProperty",property:"svgTransform",defaultOptions:{transformOrigin:"50% 50%"},defaultValue:{translate:0,rotate:0,skewX:0,skewY:0,scale:1},Interpolate:{numbers:H},functions:Ce,Util:{parseStringOrigin:Te,parseTransformString:Oe,parseTransformSVG:Me}},je=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t=!0}});document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t,e)}),e)}catch(t){throw Error("Passive events are not supported")}return t}(),Ie="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],Ae="ontouchstart"in window||navigator.msMaxTouchPoints||!1?"touchstart":"mousewheel",Pe=navigator&&/(EDGE|Mac)/i.test(navigator.userAgent)?document.body:document.documentElement,Le=!!je&&{passive:!1};function Ve(t){this.scrolling&&t.preventDefault()}function Ne(){var t=this.element;return t===Pe?{el:document,st:document.body}:{el:t,st:t}}function Re(t,e){e[t](Ie[0],Ve,Le),e[t](Ae,Ve,Le)}function Ue(){var t=Ne.call(this);"scroll"in this.valuesEnd&&!t.el.scrolling&&(t.el.scrolling=1,Re("addEventListener",t.el),t.st.style.pointerEvents="none")}function qe(){var t=Ne.call(this);"scroll"in this.valuesEnd&&t.el.scrolling&&(t.el.scrolling=0,Re("removeEventListener",t.el),t.st.style.pointerEvents="")}var Fe={prepareStart:function(){return this.element=!("scroll"in this.valuesEnd)||this.element&&this.element!==window?this.element:Pe,this.element===Pe?window.pageYOffset||Pe.scrollTop:this.element.scrollTop},prepareProperty:function(t,e){return parseInt(e,10)},onStart:function(t){t in this.valuesEnd&&!e[t]&&(this.element=!("scroll"in this.valuesEnd)||this.element&&this.element!==window?this.element:Pe,Ue.call(this),e[t]=function(t,e,n,r){t.scrollTop=H(e,n,r)>>0})},onComplete:function(){qe.call(this)}},De={component:"scrollProperty",property:"scroll",defaultValue:0,Interpolate:{numbers:H},functions:Fe,Util:{preventScroll:Ve,scrollIn:Ue,scrollOut:qe,getScrollTargets:Ne,toggleScrollEvents:Re,supportPassive:je}};function He(t){this.valuesEnd[t]&&!e[t]&&(e[t]=function(e,n,r,a){for(var i=[],o="textShadow"===t?3:4,s=3===o?n[3]:n[4],u=3===o?r[3]:r[4],c=!!(n[5]&&"none"!==n[5]||r[5]&&"none"!==r[5])&&" inset",l=0;l<o;l+=1)i.push((1e3*H(n[l],r[l],a)>>0)/1e3+"px");e.style[t]=c?ut(s,u,a)+i.join(" ")+c:ut(s,u,a)+i.join(" ")})}var Be={};["boxShadow","textShadow"].forEach((function(t){Be[t]=He}));var Qe=["boxShadow","textShadow"];function ze(t,e){var n;3===t.length?n=[t[0],t[1],0,0,t[2],"none"]:4===t.length?n=/inset|none/.test(t[3])?[t[0],t[1],0,0,t[2],t[3]]:[t[0],t[1],t[2],0,t[3],"none"]:5===t.length?n=/inset|none/.test(t[4])?[t[0],t[1],t[2],0,t[3],t[4]]:[t[0],t[1],t[2],t[3],t[4],"none"]:6===t.length&&(n=t);for(var r=0;r<4;r+=1)n[r]=parseFloat(n[r]);return n[4]=st(n[4]),n="boxShadow"===e?n:n.filter((function(t,e){return[0,1,2,4].includes(e)})),n}var Xe={};Qe.forEach((function(t){Xe[t]=He}));var Ye={component:"shadowProperties",properties:Qe,defaultValues:{boxShadow:"0px 0px 0px 0px rgb(0,0,0)",textShadow:"0px 0px 0px rgb(0,0,0)"},Interpolate:{numbers:H,colors:ut},functions:{prepareStart:function(t){var e=M(this.element,t);return/^none$|^initial$|^inherit$|^inset$/.test(e)?f[t]:e},prepareProperty:function(t,e){var n=e;if("string"==typeof n){var r="none",a=n.match(/(\s?(?:#(?:[\da-f]{3}){1,2}|rgba?\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))\s?)/gi);r=/inset/.test(n)?"inset":r,n=ze(n=(n=/inset/.test(n)?n.replace(/(\s+inset|inset+\s)/g,""):n).replace(a[0],"").split(" ").concat([a[0].replace(/\s/g,"")],[r]),t)}else n instanceof Array&&(n=ze(n,t));return n},onStart:Xe},Util:{processShadowArray:ze,trueColor:st}},We={};function $e(t){this.valuesEnd[t]&&!e[t]&&(e[t]=function(e,n,r,a){e.style[t]=X(n.v,r.v,r.u,a)})}["fontSize","lineHeight","letterSpacing","wordSpacing"].forEach((function(t){We[t]=$e}));var Ge=["fontSize","lineHeight","letterSpacing","wordSpacing"],Ze={};Ge.forEach((function(t){Ze[t]=$e}));var Ke={component:"textProperties",category:"textProperties",properties:Ge,defaultValues:{fontSize:0,lineHeight:0,letterSpacing:0,wordSpacing:0},Interpolate:{units:X},functions:{prepareStart:function(t){return M(this.element,t)||f[t]},prepareProperty:function(t,e){return B(e)},onStart:Ze},Util:{trueDimension:B}},Je=String("abcdefghijklmnopqrstuvwxyz").split(""),tn=String("abcdefghijklmnopqrstuvwxyz").toUpperCase().split(""),en=String("~!@#$%^&*()_+{}[];'<>,./?=-").split(""),nn=String("0123456789").split(""),rn=Je.concat(tn,nn),an=rn.concat(en),on={alpha:Je,upper:tn,symbols:en,numeric:nn,alphanumeric:rn,all:an},sn={text:function(t){if(!e[t]&&this.valuesEnd[t]){var n=this._textChars,r=on[d.textChars];n in on?r=on[n]:n&&n.length&&(r=n),e[t]=function(t,e,n,a){var i="",o="",s=""===n?" ":n,u=e.substring(0),c=n.substring(0),l=r[Math.random()*r.length>>0];" "===e?(o=c.substring(Math.min(a*c.length,c.length)>>0,0),t.innerHTML=a<1?o+l:s):" "===n?(i=u.substring(0,Math.min((1-a)*u.length,u.length)>>0),t.innerHTML=a<1?i+l:s):(i=u.substring(u.length,Math.min(a*u.length,u.length)>>0),o=c.substring(0,Math.min(a*c.length,c.length)>>0),t.innerHTML=a<1?o+l+i:s)}}},number:function(t){t in this.valuesEnd&&!e[t]&&(e[t]=function(t,e,n,r){t.innerHTML=H(e,n,r)>>0})}};function un(t,e){var n,r;if("string"==typeof t)return(r=document.createElement("SPAN")).innerHTML=t,r.className=e,r;if(!t.children.length||t.children.length&&t.children[0].className!==e){var a=t.innerHTML;(n=document.createElement("SPAN")).className=e,n.innerHTML=a,t.appendChild(n),t.innerHTML=n.outerHTML}else t.children.length&&t.children[0].className===e&&(n=t.children[0]);return n}function cn(t,e){var n=[],r=t.children.length;if(r){for(var a,i=[],o=t.innerHTML,s=0,u=void 0,c=void 0,l=void 0;s<r;s+=1)c=(u=t.children[s]).outerHTML,""!==(a=o.split(c))[0]?(l=un(a[0],e),i.push(l),o=o.replace(a[0],"")):""!==a[1]&&(l=un(a[1].split("<")[0],e),i.push(l),o=o.replace(a[0].split("<")[0],"")),u.classList.contains(e)||u.classList.add(e),i.push(u),o=o.replace(c,"");if(""!==o){var p=un(o,e);i.push(p)}n=n.concat(i)}else n=n.concat([un(t,e)]);return n}function ln(t,e,n){for(var r=[],a=0,i=e.length;a<i;a+=1)r[a]=(1e3*(t[a]+(e[a]-t[a])*n)>>0)/1e3;return r}var pn="undefined"!=typeof DOMMatrix?DOMMatrix:null,hn="transformMatrix";var fn={BackgroundPosition:z,BorderRadius:K,BoxModel:at,ClipProperty:ot,ColorProperties:dt,FilterEffects:wt,HTMLAttributes:Ot,OpacityProperty:Ct,SVGDraw:Ut,SVGCubicMorph:ke,SVGTransform:_e,ScrollProperty:De,ShadowProperties:Ye,TextProperties:Ke,TextWriteProperties:{component:"textWriteProperties",category:"textWrite",properties:["text","number"],defaultValues:{text:" ",number:"0"},defaultOptions:{textChars:"alpha"},Interpolate:{numbers:H},functions:{prepareStart:function(){return this.element.innerHTML},prepareProperty:function(t,e){return"number"===t?parseFloat(e):""===e?" ":e},onStart:sn},Util:{charSet:on,createTextTweens:function(t,e,n){if(t.playing)return!1;var r=n||{};r.duration=1e3,"auto"===n.duration?r.duration="auto":Number.isFinite(1*n.duration)&&(r.duration=1*n.duration);var a=I.tween,i=function(t,e){var n=cn(t,"text-part"),r=cn(un(e),"text-part");return t.innerHTML="",t.innerHTML+=n.map((function(t){return t.className+=" oldText",t.outerHTML})).join(""),t.innerHTML+=r.map((function(t){return t.className+=" newText",t.outerHTML.replace(t.innerHTML,"")})).join(""),[n,r]}(t,e),o=i[0],s=i[1],u=[].slice.call(t.getElementsByClassName("oldText")).reverse(),c=[].slice.call(t.getElementsByClassName("newText")),l=[],p=0;return(l=(l=l.concat(u.map((function(t,e){return r.duration="auto"===r.duration?75*o[e].innerHTML.length:r.duration,r.delay=p,r.onComplete=null,p+=r.duration,new a(t,{text:t.innerHTML},{text:""},r)})))).concat(c.map((function(n,i){return r.duration="auto"===r.duration?75*s[i].innerHTML.length:r.duration,r.delay=p,r.onComplete=i===s.length-1?function(){t.innerHTML=e,t.playing=!1}:null,p+=r.duration,new a(n,{text:""},{text:s[i].innerHTML},r)})))).start=function(){t.playing||(l.forEach((function(t){return t.start()})),t.playing=!0)},l}}},MatrixTransform:{component:hn,property:"transform",defaultValue:{perspective:400,translate3d:[0,0,0],translateX:0,translateY:0,translateZ:0,rotate3d:[0,0,0],rotateX:0,rotateY:0,rotateZ:0,skew:[0,0],skewX:0,skewY:0,scale3d:[1,1,1],scaleX:1,scaleY:1,scaleZ:1},functions:{prepareStart:function(t,e){var n={},r=this.element.transformMatrix;return r?Object.keys(r).forEach((function(t){n[t]=r[t]})):Object.keys(e).forEach((function(t){n[t]="perspective"===t?e[t]:f.transform[t]})),n},prepareProperty:function(t,e){if("object"==typeof e&&!e.length){var n,r={},a={},i={},o={},s={},u=[{translate3d:a},{rotate3d:i},{skew:s},{scale3d:o}];return Object.keys(e).forEach((function(t){if(/3d/.test(t)&&"object"==typeof e[t]&&e[t].length)n=e[t].map((function(e){return"scale3d"===t?parseFloat(e):parseInt(e,10)})),r[t]="scale3d"===t?[n[0]||1,n[1]||1,n[2]||1]:[n[0]||0,n[1]||0,n[2]||0];else if(/[XYZ]/.test(t)){var u={};/translate/.test(t)?u=a:/rotate/.test(t)?u=i:/scale/.test(t)?u=o:/skew/.test(t)&&(u=s),u[t.replace(/translate|rotate|scale|skew/,"").toLowerCase()]=/scale/.test(t)?parseFloat(e[t]):parseInt(e[t],10)}else"skew"===t?(n=e[t].map((function(t){return parseInt(t,10)||0})),r[t]=[n[0]||0,n[1]||0]):r[t]=parseInt(e[t],10)})),u.forEach((function(t){var e=Object.keys(t)[0],n=t[e];Object.keys(n).length&&!r[e]&&(r[e]="scale3d"===e?[n.x||1,n.y||1,n.z||1]:"skew"===e?[n.x||0,n.y||0]:[n.x||0,n.y||0,n.z||0])})),r}throw Error('KUTE.js - "'+e+'" is not valid/supported transform function')},onStart:{transform:function(t){pn&&this.valuesEnd[t]&&!e[t]&&(e[t]=function(e,n,r,a){var i=new pn,o={};Object.keys(r).forEach((function(t){o[t]="perspective"===t?H(n[t],r[t],a):ln(n[t],r[t],a)})),o.perspective&&(i.m34=-1/o.perspective),i=o.translate3d?i.translate(o.translate3d[0],o.translate3d[1],o.translate3d[2]):i,i=o.rotate3d?i.rotate(o.rotate3d[0],o.rotate3d[1],o.rotate3d[2]):i,o.skew&&(i=o.skew[0]?i.skewX(o.skew[0]):i,i=o.skew[1]?i.skewY(o.skew[1]):i),i=o.scale3d?i.scale(o.scale3d[0],o.scale3d[1],o.scale3d[2]):i,e.style[t]=i.toString()})},CSS3Matrix:function(t){pn&&this.valuesEnd.transform&&(e[t]||(e[t]=pn))}},onComplete:function(t){var e=this;this.valuesEnd[t]&&(this.element.transformMatrix={},Object.keys(this.valuesEnd[t]).forEach((function(n){e.element.transformMatrix[n]=e.valuesEnd[t][n]})))},crossCheck:function(t){this.valuesEnd[t]&&this.valuesEnd[t].perspective&&!this.valuesStart[t].perspective&&(this.valuesStart[t].perspective=this.valuesEnd[t].perspective)}},Interpolate:{perspective:H,translate3d:ln,rotate3d:ln,skew:ln,scale3d:ln}}};Object.keys(fn).forEach((function(t){var e=fn[t];fn[t]=new D(e)}));return{Animation:D,Components:fn,Tween:R,fromTo:function(t,e,n,r){var a=r||{};return new(0,I.tween)(P(t),e,n,a)},to:function(t,e,n){var r=n||{},a=I.tween;return r.resetStart=e,new a(P(t),e,e,r)},TweenCollection:U,ProgressBar:q,allFromTo:function(t,e,n,r){var a=r||{};return new U(P(t,!0),e,n,a)},allTo:function(t,e,n){var r=n||{};return n.resetStart=e,new U(P(t,!0),e,e,r)},Objects:w,Util:E,Easing:A,CubicBezier:t,Render:p,Interpolate:a,Process:j,Internals:T,Selector:P,Version:"2.1.3"}}));