From 188bd1953b4bb44c113f1ed3c018b0d1b1454bc8 Mon Sep 17 00:00:00 2001 From: thednp Date: Fri, 7 Oct 2016 22:59:35 +0300 Subject: [PATCH] Attempting to fix https://github.com/thednp/kute.js/issues/40 --- src/kute-attr.min.js | 4 ++-- src/kute-bezier.min.js | 4 ++-- src/kute-css.min.js | 4 ++-- src/kute-jquery.min.js | 2 +- src/kute-physics.min.js | 4 ++-- src/kute-svg.min.js | 4 ++-- src/kute-text.min.js | 4 ++-- src/kute.min.js | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/kute-attr.min.js b/src/kute-attr.min.js index 940e9ca..26b202e 100644 --- a/src/kute-attr.min.js +++ b/src/kute-attr.min.js @@ -1,2 +1,2 @@ -// KUTE.js v1.5.9 | © dnp_theme | Attributes Plugin | MIT-License -!function(t,e){if("function"==typeof define&&define.amd)define(["./kute.js"],function(t){return e(t),t});else if("object"==typeof module&&"function"==typeof require){var r=require("./kute.js");module.exports=e(r)}else{if("undefined"==typeof t.KUTE)throw new Error("Attributes Plugin requires KUTE.js.");e(r)}}(this,function(t){"use strict";var e,r=window,n=r.KUTE,i=r.dom,u=n.prS,o=n.pp,a=r.Interpolate.unit,f=r.Interpolate.number,s=r.Interpolate.color,c=function(t,e){return t.getAttribute(e)},p=["fill","stroke","stop-color"],l=n.truC,v=n.truD,d=function(t){return t.replace(/[A-Z]/g,"-$&").toLowerCase()};u.attr=function(t,e,r){var n={};for(var i in r){var u=d(i).replace(/_+[a-z]+/,""),o=c(t,u);n[u]=p.indexOf(d(i))!==-1?o||"rgba(0,0,0,0)":o||(/opacity/i.test(i)?1:0)}return n},o.attr=function(t,r,n){"attr"in i||(i.attr=function(t,e,r,n,u){for(var o in n)i.attributes[o](t,o,r[o],n[o],u)},e=i.attributes={});var u,o={};for(u in r){var b=d(u),A=c(n,b.replace(/_+[a-z]+/,""));if(p.indexOf(b)===-1&&(/(%|[a-z]+)$/.test(r[u])||/(%|[a-z]+)$/.test(A))){var m=v(A).u||v(r[u]).u,w=/%/.test(m)?"_percent":"_"+m;u+w in e||(e[u+w]=function(t,e,r,n,i){var u=u||d(e).replace(w,"");t.setAttribute(u,a(r.v,n.v,n.u,i))}),o[u+w]=v(r[u])}else p.indexOf(b)>-1?(u in e||(e[u]=function(t,e,n,i,u){var o=o||d(e);t.setAttribute(o,s(n,i,u,r.keepHex))}),o[u]=l(r[u])):(u in e||(e[u]=function(t,e,r,n,i){var u=u||d(e);t.setAttribute(u,f(r,n,i))}),o[u]=parseFloat(r[u]))}return o}}); \ No newline at end of file +// KUTE.js v1.5.91 | © dnp_theme | Attributes Plugin | MIT-License +!function(t,e){if("function"==typeof define&&define.amd)define(["kute.js"],e);else if("object"==typeof module&&"function"==typeof require)module.exports=e(require("./kute.js"));else{if("undefined"==typeof t.KUTE)throw new Error("Attributes Plugin require KUTE.js.");e(t.KUTE)}}(this,function(t){"use strict";var e,r="undefined"!=typeof global?global:window,n=t,i=r.dom,o=n.prS,u=n.pp,a=r.Interpolate.unit,f=r.Interpolate.number,s=r.Interpolate.color,c=function(t,e){return t.getAttribute(e)},l=["fill","stroke","stop-color"],p=n.truC,d=n.truD,v=function(t){return t.replace(/[A-Z]/g,"-$&").toLowerCase()};o.attr=function(t,e,r){var n={};for(var i in r){var o=v(i).replace(/_+[a-z]+/,""),u=c(t,o);n[o]=l.indexOf(v(i))!==-1?u||"rgba(0,0,0,0)":u||(/opacity/i.test(i)?1:0)}return n},u.attr=function(t,r,n){"attr"in i||(i.attr=function(t,e,r,n,o){for(var u in n)i.attributes[u](t,u,r[u],n[u],o)},e=i.attributes={});var o,u={};for(o in r){var b=v(o),g=c(n,b.replace(/_+[a-z]+/,""));if(l.indexOf(b)===-1&&(/(%|[a-z]+)$/.test(r[o])||/(%|[a-z]+)$/.test(g))){var y=d(g).u||d(r[o]).u,A=/%/.test(y)?"_percent":"_"+y;o+A in e||(e[o+A]=function(t,e,r,n,i){var o=o||v(e).replace(A,"");t.setAttribute(o,a(r.v,n.v,n.u,i))}),u[o+A]=d(r[o])}else l.indexOf(b)>-1?(o in e||(e[o]=function(t,e,n,i,o){var u=u||v(e);t.setAttribute(u,s(n,i,o,r.keepHex))}),u[o]=p(r[o])):(o in e||(e[o]=function(t,e,r,n,i){var o=o||v(e);t.setAttribute(o,f(r,n,i))}),u[o]=parseFloat(r[o]))}return u}}); \ No newline at end of file diff --git a/src/kute-bezier.min.js b/src/kute-bezier.min.js index ea7eeca..e9381ef 100644 --- a/src/kute-bezier.min.js +++ b/src/kute-bezier.min.js @@ -1,2 +1,2 @@ -// KUTE.js v1.5.9 | © dnp_theme | Bezier Plugin | MIT-License -!function(n,e){if("function"==typeof define&&define.amd)define(["./kute.js"],function(n){return e(n),n});else if("object"==typeof module&&"function"==typeof require){var t=require("./kute.js");module.exports=e(t)}else{if("undefined"==typeof n.KUTE)throw new Error("Bezier Easing functions depend on KUTE.js");n.KUTE.Ease=e(t)}}(this,function(n){"use strict";var e=window,t=t||{};t.Bezier=e.Bezier=function(n,e,t,u){return r.pB(n,e,t,u)};var r=t.Bezier.prototype=e.Bezier.prototype;return r.ni=4,r.nms=.001,r.sp=1e-7,r.smi=10,r.ksts=11,r.ksss=1/(r.ksts-1),r.f32as="Float32Array"in e,r.msv=r.f32as?new Float32Array(r.ksts):new Array(r.ksts),r.A=function(n,e){return 1-3*e+3*n},r.B=function(n,e){return 3*e-6*n},r.C=function(n){return 3*n},r.pB=function(n,e,t,u){this._p=!1;var s=this;return function(i){return s._p||r.pc(n,t,e,u),n===e&&t===u?i:0===i?0:1===i?1:r.cB(r.gx(i,n,t),e,u)}},r.cB=function(n,e,t){return((r.A(e,t)*n+r.B(e,t))*n+r.C(e))*n},r.gS=function(n,e,t){return 3*r.A(e,t)*n*n+2*r.B(e,t)*n+r.C(e)},r.bS=function(n,e,t,u,s){var i,a,o=0,c=r.sp,f=r.smi;do a=e+(t-e)/2,i=r.cB(a,u,s)-n,i>0?t=a:e=a;while(Math.abs(i)>c&&++o=r.nms?r.nri(n,o,e,t):0===c?o:r.bS(n,u,f,e,t)},r.pc=function(n,e,t,u){this._p=!0,n==t&&e==u||r.csv(n,e)},e.Ease={},e.Ease.easeIn=function(){return r.pB(.42,0,1,1)},e.Ease.easeOut=function(){return r.pB(0,0,.58,1)},e.Ease.easeInOut=function(){return r.pB(.5,.16,.49,.86)},e.Ease.easeInSine=function(){return r.pB(.47,0,.745,.715)},e.Ease.easeOutSine=function(){return r.pB(.39,.575,.565,1)},e.Ease.easeInOutSine=function(){return r.pB(.445,.05,.55,.95)},e.Ease.easeInQuad=function(){return r.pB(.55,.085,.68,.53)},e.Ease.easeOutQuad=function(){return r.pB(.25,.46,.45,.94)},e.Ease.easeInOutQuad=function(){return r.pB(.455,.03,.515,.955)},e.Ease.easeInCubic=function(){return r.pB(.55,.055,.675,.19)},e.Ease.easeOutCubic=function(){return r.pB(.215,.61,.355,1)},e.Ease.easeInOutCubic=function(){return r.pB(.645,.045,.355,1)},e.Ease.easeInQuart=function(){return r.pB(.895,.03,.685,.22)},e.Ease.easeOutQuart=function(){return r.pB(.165,.84,.44,1)},e.Ease.easeInOutQuart=function(){return r.pB(.77,0,.175,1)},e.Ease.easeInQuint=function(){return r.pB(.755,.05,.855,.06)},e.Ease.easeOutQuint=function(){return r.pB(.23,1,.32,1)},e.Ease.easeInOutQuint=function(){return r.pB(.86,0,.07,1)},e.Ease.easeInExpo=function(){return r.pB(.95,.05,.795,.035)},e.Ease.easeOutExpo=function(){return r.pB(.19,1,.22,1)},e.Ease.easeInOutExpo=function(){return r.pB(1,0,0,1)},e.Ease.easeInCirc=function(){return r.pB(.6,.04,.98,.335)},e.Ease.easeOutCirc=function(){return r.pB(.075,.82,.165,1)},e.Ease.easeInOutCirc=function(){return r.pB(.785,.135,.15,.86)},e.Ease.easeInBack=function(){return r.pB(.6,-.28,.735,.045)},e.Ease.easeOutBack=function(){return r.pB(.175,.885,.32,1.275)},e.Ease.easeInOutBack=function(){return r.pB(.68,-.55,.265,1.55)},e.Ease.slowMo=function(){return r.pB(0,.5,1,.5)},e.Ease.slowMo1=function(){return r.pB(0,.7,1,.3)},e.Ease.slowMo2=function(){return r.pB(0,.9,1,.1)},t}); \ No newline at end of file +// KUTE.js v1.5.91 | © dnp_theme | Bezier Plugin | MIT-License +!function(n,e){if("function"==typeof define&&define.amd)define(["kute.js"],e);else if("object"==typeof module&&"function"==typeof require)module.exports=e(require("./kute.js"));else{if("undefined"==typeof n.KUTE)throw new Error("Bezier Easing functions depend on KUTE.js");n.Ease=e(n.KUTE)}}(this,function(n){"use strict";var e="undefined"!=typeof global?global:window,t={};t.Bezier=e.Bezier=function(n,e,t,u){return r.pB(n,e,t,u)};var r=t.Bezier.prototype=e.Bezier.prototype;return r.ni=4,r.nms=.001,r.sp=1e-7,r.smi=10,r.ksts=11,r.ksss=1/(r.ksts-1),r.f32as="Float32Array"in e,r.msv=r.f32as?new Float32Array(r.ksts):new Array(r.ksts),r.A=function(n,e){return 1-3*e+3*n},r.B=function(n,e){return 3*e-6*n},r.C=function(n){return 3*n},r.pB=function(n,e,t,u){this._p=!1;var s=this;return function(a){return s._p||r.pc(n,t,e,u),n===e&&t===u?a:0===a?0:1===a?1:r.cB(r.gx(a,n,t),e,u)}},r.cB=function(n,e,t){return((r.A(e,t)*n+r.B(e,t))*n+r.C(e))*n},r.gS=function(n,e,t){return 3*r.A(e,t)*n*n+2*r.B(e,t)*n+r.C(e)},r.bS=function(n,e,t,u,s){var a,i,o=0,c=r.sp,f=r.smi;do i=e+(t-e)/2,a=r.cB(i,u,s)-n,a>0?t=i:e=i;while(Math.abs(a)>c&&++o=r.nms?r.nri(n,o,e,t):0===c?o:r.bS(n,u,f,e,t)},r.pc=function(n,e,t,u){this._p=!0,n==t&&e==u||r.csv(n,e)},e.Ease={},e.Ease.easeIn=function(){return r.pB(.42,0,1,1)},e.Ease.easeOut=function(){return r.pB(0,0,.58,1)},e.Ease.easeInOut=function(){return r.pB(.5,.16,.49,.86)},e.Ease.easeInSine=function(){return r.pB(.47,0,.745,.715)},e.Ease.easeOutSine=function(){return r.pB(.39,.575,.565,1)},e.Ease.easeInOutSine=function(){return r.pB(.445,.05,.55,.95)},e.Ease.easeInQuad=function(){return r.pB(.55,.085,.68,.53)},e.Ease.easeOutQuad=function(){return r.pB(.25,.46,.45,.94)},e.Ease.easeInOutQuad=function(){return r.pB(.455,.03,.515,.955)},e.Ease.easeInCubic=function(){return r.pB(.55,.055,.675,.19)},e.Ease.easeOutCubic=function(){return r.pB(.215,.61,.355,1)},e.Ease.easeInOutCubic=function(){return r.pB(.645,.045,.355,1)},e.Ease.easeInQuart=function(){return r.pB(.895,.03,.685,.22)},e.Ease.easeOutQuart=function(){return r.pB(.165,.84,.44,1)},e.Ease.easeInOutQuart=function(){return r.pB(.77,0,.175,1)},e.Ease.easeInQuint=function(){return r.pB(.755,.05,.855,.06)},e.Ease.easeOutQuint=function(){return r.pB(.23,1,.32,1)},e.Ease.easeInOutQuint=function(){return r.pB(.86,0,.07,1)},e.Ease.easeInExpo=function(){return r.pB(.95,.05,.795,.035)},e.Ease.easeOutExpo=function(){return r.pB(.19,1,.22,1)},e.Ease.easeInOutExpo=function(){return r.pB(1,0,0,1)},e.Ease.easeInCirc=function(){return r.pB(.6,.04,.98,.335)},e.Ease.easeOutCirc=function(){return r.pB(.075,.82,.165,1)},e.Ease.easeInOutCirc=function(){return r.pB(.785,.135,.15,.86)},e.Ease.easeInBack=function(){return r.pB(.6,-.28,.735,.045)},e.Ease.easeOutBack=function(){return r.pB(.175,.885,.32,1.275)},e.Ease.easeInOutBack=function(){return r.pB(.68,-.55,.265,1.55)},e.Ease.slowMo=function(){return r.pB(0,.5,1,.5)},e.Ease.slowMo1=function(){return r.pB(0,.7,1,.3)},e.Ease.slowMo2=function(){return r.pB(0,.9,1,.1)},t}); \ No newline at end of file diff --git a/src/kute-css.min.js b/src/kute-css.min.js index cdd89c8..9ae7d8b 100644 --- a/src/kute-css.min.js +++ b/src/kute-css.min.js @@ -1,2 +1,2 @@ -// KUTE.js v1.5.9 | © dnp_theme | CSS Plugin | MIT-License -!function(t,r){if("function"==typeof define&&define.amd)define(["./kute.js"],function(t){return r(t),t});else if("object"==typeof module&&"function"==typeof require){var o=require("./kute.js");module.exports=r(o)}else{if("undefined"==typeof t.KUTE)throw new Error("CSS Plugin require KUTE.js.");r(o)}}(this,function(t){"use strict";for(var r=window,o=r.KUTE,e=r.dom,i=o.pp,n=o.prS,d=o.gCS,u=o.truD,a=o.property("borderRadius"),f=o.property("borderTopLeftRadius"),p=o.property("borderTopRightRadius"),g=o.property("borderBottomLeftRadius"),c=o.property("borderBottomRightRadius"),s=["borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],l=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],b=["right","bottom","minWidth","minHeight","maxWidth","maxHeight","padding","margin","paddingTop","paddingBottom","paddingLeft","paddingRight","marginTop","marginBottom","marginLeft","marginRight","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","outlineWidth"],h=["fontSize","lineHeight","letterSpacing","wordSpacing"],v=["clip"],m=["backgroundPosition"],R=l.concat(b,h),y=s.concat(v,l,b,h,m),T=y.length,x=(r.Interpolate.number,r.Interpolate.unit),B=B||{},L=0;L1?this:this[0],o=this.length>1?"allFromTo":"fromTo";return t[o](i,e,n,r)},e.fn.to=function(e,n){var r=this.length>1?this:this[0],i=this.length>1?"allTo":"to";return t[i](r,e,n)},this}); \ No newline at end of file diff --git a/src/kute-physics.min.js b/src/kute-physics.min.js index a505d97..dc79b7d 100644 --- a/src/kute-physics.min.js +++ b/src/kute-physics.min.js @@ -1,2 +1,2 @@ -// KUTE.js v1.5.9 | © dnp_theme | Physics Plugin | MIT-License -!function(t,n){if("function"==typeof define&&define.amd)define(["./kute.js"],function(t){return n(t),t});else if("object"==typeof module&&"function"==typeof require){var r=require("./kute.js");module.exports=n(r)}else{if("undefined"==typeof t.KUTE)throw new Error("Physics Easing functions for KUTE.js depend on KUTE.js");t.KUTE.Physics=n(r)}}(this,function(t){"use strict";var n=window,r=r||{};r.spring=n.spring=function(t){t=t||{};var n=Math.max(1,(t.frequency||300)/20),r=Math.pow(20,(t.friction||200)/100),e=t.anticipationStrength||0,o=(t.anticipationSize||0)/1e3;return function(t){var u,a,c,p,f,y,s,h;return y=t/(1-o)-o/(1-o),t.001;)a=r.b-r.a,r={a:r.b,b:r.b+a*n,H:r.H*n*n};return r.b}(),function(){var t,e,c,p;for(e=Math.sqrt(2/(o*a*a)),c={a:-e,b:e,H:1},u&&(c.a=0,c.b=2*c.b),r.push(c),t=a,p=[];c.b<1&&c.H>.001;)t=c.b-c.a,c={a:c.b,b:c.b+t*n,H:c.H*i},p.push(r.push(c));return p}(),function(n){var i,o,c;for(o=0,i=r[o];!(n>=i.a&&n<=i.b)&&(o+=1,i=r[o]););return c=i?e.getPointInCurve(i.a,i.b,i.H,n,t,a):u?0:1}};var e=r.gravity.prototype=n.gravity.prototype;e.getPointInCurve=function(t,n,r,i,e,o){var u,a;return o=n-t,a=2/o*i-1-2*t/o,u=a*a*r-r+1,e.initialForce&&(u=1-u),u},r.forceWithGravity=n.forceWithGravity=function(t){var n=t||{};return n.initialForce=!0,r.gravity(n)},r.bezier=n.BezierMultiPoint=function(t){t=t||{};var n=t.points,r=!1,i=[];return function(){var t,r;for(t in n){if(r=parseInt(t),r>=n.length-1)break;o.fn(n[r],n[r+1],i)}return i}(),function(t){return 0===t?0:1===t?1:o.yForX(t,i,r)}};var o=r.bezier.prototype=n.BezierMultiPoint.prototype;return o.fn=function(t,n,r){var i=function(r){return o.Bezier(r,t,t.cp[t.cp.length-1],n.cp[0],n)};return r.push(i)},o.Bezier=function(t,n,r,i,e){return{x:Math.pow(1-t,3)*n.x+3*Math.pow(1-t,2)*t*r.x+3*(1-t)*Math.pow(t,2)*i.x+Math.pow(t,3)*e.x,y:Math.pow(1-t,3)*n.y+3*Math.pow(1-t,2)*t*r.y+3*(1-t)*Math.pow(t,2)*i.y+Math.pow(t,3)*e.y}},o.yForX=function(t,n,r){var i,e,o,u,a,c,p,f,y=0,s=n.length;for(i=null,y;y=e(0).x&&t<=e(1).x&&(i=e),null===i);y++);if(!i)return r?0:1;for(f=1e-4,u=0,c=1,a=(c+u)/2,p=i(a).x,o=0;Math.abs(t-p)>f&&o<100;)t>p?u=a:c=a,a=(c+u)/2,p=i(a).x,o++;return i(a).y},n.Physics={physicsInOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.92-r/1e3,y:0}]},{x:1,y:1,cp:[{x:.08+r/1e3,y:1}]}]})},physicsIn:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.92-r/1e3,y:0}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},physicsOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.08+r/1e3,y:1}]}]})},physicsBackOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.735+r/1e3,y:1.3}]}]})},physicsBackIn:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.28-r/1e3,y:-.6}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},physicsBackInOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.68-r/1e3,y:-.55}]},{x:1,y:1,cp:[{x:.265+r/1e3,y:1.45}]}]})}},r}); \ No newline at end of file +// KUTE.js v1.5.91 | © dnp_theme | Physics Plugin | MIT-License +!function(t,n){if("function"==typeof define&&define.amd)define(["kute.js"],n);else if("object"==typeof module&&"function"==typeof require)module.exports=n(require("./kute.js"));else{if("undefined"==typeof t.KUTE)throw new Error("Physics Easing functions for KUTE.js depend on KUTE.js");t.Physics=n(t.KUTE)}}(this,function(t){"use strict";var n="undefined"!=typeof global?global:window,r={};r.spring=n.spring=function(t){t=t||{};var n=Math.max(1,(t.frequency||300)/20),r=Math.pow(20,(t.friction||200)/100),e=t.anticipationStrength||0,o=(t.anticipationSize||0)/1e3;return function(t){var u,a,c,p,f,y,s,h;return y=t/(1-o)-o/(1-o),t.001;)a=r.b-r.a,r={a:r.b,b:r.b+a*n,H:r.H*n*n};return r.b}(),function(){var t,e,c,p;for(e=Math.sqrt(2/(o*a*a)),c={a:-e,b:e,H:1},u&&(c.a=0,c.b=2*c.b),r.push(c),t=a,p=[];c.b<1&&c.H>.001;)t=c.b-c.a,c={a:c.b,b:c.b+t*n,H:c.H*i},p.push(r.push(c));return p}(),function(n){var i,o,c;for(o=0,i=r[o];!(n>=i.a&&n<=i.b)&&(o+=1,i=r[o]););return c=i?e.getPointInCurve(i.a,i.b,i.H,n,t,a):u?0:1}};var e=r.gravity.prototype=n.gravity.prototype;e.getPointInCurve=function(t,n,r,i,e,o){var u,a;return o=n-t,a=2/o*i-1-2*t/o,u=a*a*r-r+1,e.initialForce&&(u=1-u),u},r.forceWithGravity=n.forceWithGravity=function(t){var n=t||{};return n.initialForce=!0,r.gravity(n)},r.bezier=n.BezierMultiPoint=function(t){t=t||{};var n=t.points,r=!1,i=[];return function(){var t,r;for(t in n){if(r=parseInt(t),r>=n.length-1)break;o.fn(n[r],n[r+1],i)}return i}(),function(t){return 0===t?0:1===t?1:o.yForX(t,i,r)}};var o=r.bezier.prototype=n.BezierMultiPoint.prototype;return o.fn=function(t,n,r){var i=function(r){return o.Bezier(r,t,t.cp[t.cp.length-1],n.cp[0],n)};return r.push(i)},o.Bezier=function(t,n,r,i,e){return{x:Math.pow(1-t,3)*n.x+3*Math.pow(1-t,2)*t*r.x+3*(1-t)*Math.pow(t,2)*i.x+Math.pow(t,3)*e.x,y:Math.pow(1-t,3)*n.y+3*Math.pow(1-t,2)*t*r.y+3*(1-t)*Math.pow(t,2)*i.y+Math.pow(t,3)*e.y}},o.yForX=function(t,n,r){var i,e,o,u,a,c,p,f,y=0,s=n.length;for(i=null,y;y=e(0).x&&t<=e(1).x&&(i=e),null===i);y++);if(!i)return r?0:1;for(f=1e-4,u=0,c=1,a=(c+u)/2,p=i(a).x,o=0;Math.abs(t-p)>f&&o<100;)t>p?u=a:c=a,a=(c+u)/2,p=i(a).x,o++;return i(a).y},n.Physics={physicsInOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.92-r/1e3,y:0}]},{x:1,y:1,cp:[{x:.08+r/1e3,y:1}]}]})},physicsIn:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.92-r/1e3,y:0}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},physicsOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.08+r/1e3,y:1}]}]})},physicsBackOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.735+r/1e3,y:1.3}]}]})},physicsBackIn:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.28-r/1e3,y:-.6}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},physicsBackInOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.68-r/1e3,y:-.55}]},{x:1,y:1,cp:[{x:.265+r/1e3,y:1.45}]}]})}},r}); \ No newline at end of file diff --git a/src/kute-svg.min.js b/src/kute-svg.min.js index 351537d..60349e1 100644 --- a/src/kute-svg.min.js +++ b/src/kute-svg.min.js @@ -1,2 +1,2 @@ -// KUTE.js v1.5.9 | © dnp_theme | SVG Plugin | MIT-License -!function(t,e){if("function"==typeof define&&define.amd)define(["./kute.js"],function(t){return e(t),t});else if("object"==typeof module&&"function"==typeof require){var r=require("./kute.js");module.exports=e(r)}else{if("undefined"==typeof t.KUTE)throw new Error("SVG Plugin require KUTE.js.");t.KUTE.svg=e(r)}}(this,function(t){"use strict";var e,r=window,n=r.KUTE,s=r.dom,a=n.pp,i=n.prS,o=n.gCS,h=null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)&&parseFloat(RegExp.$1),l=["strokeWidth","strokeOpacity","fillOpacity","stopOpacity"],u=["fill","stroke","stopColor"],f=/(m[^(h|v|l)]*|[vhl][^(v|h|l|z)]*)/gim,p="http://www.w3.org/2000/svg",c=r.Interpolate.number,g=r.Interpolate.unit,v=r.Interpolate.array=function(t,e,r,n){var s,a=[];for(s=0;s1){var n=function(t){var e=t.split(",");if(2==e.length&&!isNaN(e[0])&&!isNaN(e[1]))return[parseFloat(e[0]),parseFloat(e[1])]},s=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 a=0;a1){var n=function(t){var e=t.split(",");if(2==e.length&&!isNaN(e[0])&&!isNaN(e[1]))return[parseFloat(e[0]),parseFloat(e[1])]},s=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 a=0;a,./?=-").split(""),p=String("0123456789").split(""),h=o.concat(a,p),l=(h.concat(f),Math.random),c=Math.floor,g=Math.min;return i.text=i.number=function(t,e,n){return t.innerHTML},u.text=function(t,e,n){return"text"in r||(r.text=function(t,e,n,r,i,u){var s=s||"alpha"===u.textChars?o:"upper"===u.textChars?a:"numeric"===u.textChars?p:"alphanumeric"===u.textChars?h:"symbols"===u.textChars?f:u.textChars?u.textChars.split(""):o,m=s.length,x=s[c(l()*m)],b="",d="",C=n.substring(0),y=r.substring(0);b=""!==n?C.substring(C.length,c(g(i*C.length,C.length))):"",d=y.substring(0,c(g(i*y.length,y.length))),t.innerHTML=i<1?d+x+b:r}),e},u.number=function(t,e,n){return"number"in r||(r.number=function(t,e,n,r,i){t.innerHTML=parseInt(s(n,r,i))}),parseInt(e)||0},this}); \ No newline at end of file +// KUTE.js v1.5.91 | © dnp_theme | Text Plugin | MIT-License +!function(t,e){if("function"==typeof define&&define.amd)define(["kute.js"],e);else if("object"==typeof module&&"function"==typeof require)module.exports=e(require("./kute.js"));else{if("undefined"==typeof t.KUTE)throw new Error("Text-Plugin require KUTE.js.");e(t.KUTE)}}(this,function(t){"use strict";var e="undefined"!=typeof global?global:window,n=t,r=e.dom,i=n.prS,u=n.pp,s=e.Interpolate.number,o=String("abcdefghijklmnopqrstuvwxyz").split(""),a=String("abcdefghijklmnopqrstuvwxyz".toUpperCase()).split(""),l=String("~!@#$%^&*()_+{}[];'<>,./?=-").split(""),f=String("0123456789").split(""),p=o.concat(a,f),h=(p.concat(l),Math.random),c=Math.floor,g=Math.min;return i.text=i.number=function(t,e,n){return t.innerHTML},u.text=function(t,e,n){return"text"in r||(r.text=function(t,e,n,r,i,u){var s=s||"alpha"===u.textChars?o:"upper"===u.textChars?a:"numeric"===u.textChars?f:"alphanumeric"===u.textChars?p:"symbols"===u.textChars?l:u.textChars?u.textChars.split(""):o,m=s.length,b=s[c(h()*m)],d="",x="",y=n.substring(0),C=r.substring(0);d=""!==n?y.substring(y.length,c(g(i*y.length,y.length))):"",x=C.substring(0,c(g(i*C.length,C.length))),t.innerHTML=i<1?x+b+d:r}),e},u.number=function(t,e,n){return"number"in r||(r.number=function(t,e,n,r,i){t.innerHTML=parseInt(s(n,r,i))}),parseInt(e)||0},this}); \ No newline at end of file diff --git a/src/kute.min.js b/src/kute.min.js index 17762e7..a13fcf6 100644 --- a/src/kute.min.js +++ b/src/kute.min.js @@ -1,2 +1,2 @@ -// KUTE.js v1.5.9 | © dnp_theme | Core Engine | MIT-License -!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.KUTE=e()}(this,function(){"use strict";for(var t=window,e=e||{},n=t._tweens=[],r=0,i=t.performance,s=(function(){for(var t=document.createElement("div"),e=0,n=["Moz","moz","Webkit","webkit","O","o","Ms","ms"],r=["MozTransform","mozTransform","WebkitTransform","webkitTransform","OTransform","oTransform","MsTransform","msTransform"],e=0,i=n.length;e0)return t._r<9999?t._r--:t._r=9998,t._y&&(t.reversed=!t.reversed,J.call(t)),t._sT=t._y&&!t.reversed?e+t._rD:e,!0;t._cC&&t._cC.call(),et.call(t);for(var s=0,a=t._cT.length;s2?2:r;for(var s=0;s0&&(this._r=this.repeat),this._y&&this.reversed===!0&&(J.call(this),this.reversed=!1),this.playing=!1},et=function(){("scroll"in this._vE||"scrollTop"in this._vE)&&(document.removeEventListener(m,c,!1),document.removeEventListener(w,c,!1),document.body.removeAttribute("data-tweening"))},nt=function(){("scroll"in this._vE||"scrollTop"in this._vE)&&(document.body.getAttribute("data-tweening")||(document.addEventListener(m,c,!1),document.addEventListener(w,c,!1),document.body.setAttribute("data-tweening","scroll")))},rt=function(t){nt.call(this),W(this._el,this._ops),this._rpr&&this.stackTransform(),e.svg&&e.svq(this);for(var n in this._vE)this._vSR[n]=this._vS[n];return d(this),this.playing=!0,this.paused=!1,this._sCF=!1,this._sT=t||i.now(),this._sT+=this._dl,this._sCF||(this._sC&&this._sC.call(),this._sCF=!0),!r&&U(),this},it=function(){return this.paused&&this.playing&&(this.paused=!1,null!==this._rC&&this._rC.call(),this._sT+=i.now()-this._pST,d(this),!r&&U()),this},st=function(e){if("function"==typeof e)return e;if("string"==typeof e){if(/easing|linear/.test(e))return ot[e];if(/bezier/.test(e)){var n=e.replace(/bezier|\s|\(|\)/g,"").split(",");return t.Bezier(1*n[0],1*n[1],1*n[2],1*n[3])}return/physics/.test(e)?t.Physics[e]():t.Ease[e]()}},at={},ot=t.Easing={};ot.linear=function(t){return t},ot.easingSinusoidalIn=function(t){return-Math.cos(t*Math.PI/2)+1},ot.easingSinusoidalOut=function(t){return Math.sin(t*Math.PI/2)},ot.easingSinusoidalInOut=function(t){return-.5*(Math.cos(Math.PI*t)-1)},ot.easingQuadraticIn=function(t){return t*t},ot.easingQuadraticOut=function(t){return t*(2-t)},ot.easingQuadraticInOut=function(t){return t<.5?2*t*t:-1+(4-2*t)*t},ot.easingCubicIn=function(t){return t*t*t},ot.easingCubicOut=function(t){return--t*t*t+1},ot.easingCubicInOut=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},ot.easingQuarticIn=function(t){return t*t*t*t},ot.easingQuarticOut=function(t){return 1- --t*t*t*t},ot.easingQuarticInOut=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},ot.easingQuinticIn=function(t){return t*t*t*t*t},ot.easingQuinticOut=function(t){return 1+--t*t*t*t*t},ot.easingQuinticInOut=function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},ot.easingCircularIn=function(t){return-(Math.sqrt(1-t*t)-1)},ot.easingCircularOut=function(t){return Math.sqrt(1-(t-=1)*t)},ot.easingCircularInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},ot.easingExponentialIn=function(t){return Math.pow(2,10*(t-1))-.001},ot.easingExponentialOut=function(t){return 1-Math.pow(2,-10*t)},ot.easingExponentialInOut=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))},ot.easingBackIn=function(t){var e=1.70158;return t*t*((e+1)*t-e)},ot.easingBackOut=function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},ot.easingBackInOut=function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},ot.easingElasticIn=function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/Math.PI*2,-(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*Math.PI*2/r)))},ot.easingElasticOut=function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/Math.PI*2,n*Math.pow(2,-10*t)*Math.sin((t-e)*Math.PI*2/r)+1)},ot.easingElasticInOut=function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/Math.PI*2,(t*=2)<1?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*Math.PI*2/r)):n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*Math.PI*2/r)*.5+1)},ot.easingBounceIn=function(t){return 1-ot.easingBounceOut(1-t)},ot.easingBounceOut=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},ot.easingBounceInOut=function(t){return t<.5?.5*ot.easingBounceIn(2*t):.5*ot.easingBounceOut(2*t-1)+.5};var ut=t._tween=function(e,n,r,s){this._el=e,this._vSR={},this._vS=n,this._vE=r,this._y=s.yoyo||!1,this.playing=!1,this.reversed=!1,this.paused=!1,this._sT=null,this._pST=null,this._rpr=s.rpr||!1,this._dr=s.duration||700,this._r=s.repeat||0,this._rD=s.repeatDelay||0,this._dl=s.delay||0,this._e=s&&s.easing&&"function"==typeof st(s.easing)?st(s.easing):ot.linear,this._cT=[],this._sCF=!1,this._sC=s.start||null,this._uC=s.update||null,this._cC=s.complete||null,this._pC=s.pause||null,this._rC=s.play||null,this._stC=s.stop||null,this.repeat=this._r,this._ops={},this.start=rt,this.play=this.resume=it;for(var a in s)a in this||/delay|duration|repeat|start|stop|update|complete|pause|play|yoyo|easing/i.test(a)||(this._ops[a]=s[a]);this.pause=function(){return!this.paused&&this.playing&&(g(this),this.paused=!0,this._pST=i.now(),null!==this._pC&&this._pC.call()),this},this.stop=function(){return!this.paused&&this.playing&&(g(this),this.playing=!1,this.paused=!1,et.call(this),null!==this._stC&&this._stC.call(),this.stopChainedTweens(),tt.call(this)),this},this.chain=function(){return this._cT=arguments,this},this.stopChainedTweens=function(){for(var t=0,e=this._cT.length;t0?n.delay+(n.offset||0):n.delay,this.tweens.push(ft(t[i],e,r[i]))},ct=function(t,e,n,r){this.tweens=[];for(var i=[],s=0,a=t.length;s0?r.delay+(r.offset||0):r.delay,this.tweens.push(ht(t[s],e,n,i[s]))},ft=(lt.prototype=ct.prototype={start:function(t){t=t||i.now();for(var e=0,n=this.tweens.length;e0)return t._r<9999?t._r--:t._r=9998,t._y&&(t.reversed=!t.reversed,J.call(t)),t._sT=t._y&&!t.reversed?e+t._rD:e,!0;t._cC&&t._cC.call(),et.call(t);for(var s=0,a=t._cT.length;s2?2:r;for(var s=0;s0&&(this._r=this.repeat),this._y&&this.reversed===!0&&(J.call(this),this.reversed=!1),this.playing=!1},et=function(){("scroll"in this._vE||"scrollTop"in this._vE)&&(document.removeEventListener(m,c,!1),document.removeEventListener(w,c,!1),document.body.removeAttribute("data-tweening"))},nt=function(){("scroll"in this._vE||"scrollTop"in this._vE)&&(document.body.getAttribute("data-tweening")||(document.addEventListener(m,c,!1),document.addEventListener(w,c,!1),document.body.setAttribute("data-tweening","scroll")))},rt=function(t){nt.call(this),W(this._el,this._ops),this._rpr&&this.stackTransform(),e.svg&&e.svq(this);for(var n in this._vE)this._vSR[n]=this._vS[n];return d(this),this.playing=!0,this.paused=!1,this._sCF=!1,this._sT=t||i.now(),this._sT+=this._dl,this._sCF||(this._sC&&this._sC.call(),this._sCF=!0),!r&&U(),this},it=function(){return this.paused&&this.playing&&(this.paused=!1,null!==this._rC&&this._rC.call(),this._sT+=i.now()-this._pST,d(this),!r&&U()),this},st=function(e){if("function"==typeof e)return e;if("string"==typeof e){if(/easing|linear/.test(e))return ot[e];if(/bezier/.test(e)){var n=e.replace(/bezier|\s|\(|\)/g,"").split(",");return t.Bezier(1*n[0],1*n[1],1*n[2],1*n[3])}return/physics/.test(e)?t.Physics[e]():t.Ease[e]()}},at={},ot=t.Easing={};ot.linear=function(t){return t},ot.easingSinusoidalIn=function(t){return-Math.cos(t*Math.PI/2)+1},ot.easingSinusoidalOut=function(t){return Math.sin(t*Math.PI/2)},ot.easingSinusoidalInOut=function(t){return-.5*(Math.cos(Math.PI*t)-1)},ot.easingQuadraticIn=function(t){return t*t},ot.easingQuadraticOut=function(t){return t*(2-t)},ot.easingQuadraticInOut=function(t){return t<.5?2*t*t:-1+(4-2*t)*t},ot.easingCubicIn=function(t){return t*t*t},ot.easingCubicOut=function(t){return--t*t*t+1},ot.easingCubicInOut=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},ot.easingQuarticIn=function(t){return t*t*t*t},ot.easingQuarticOut=function(t){return 1- --t*t*t*t},ot.easingQuarticInOut=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},ot.easingQuinticIn=function(t){return t*t*t*t*t},ot.easingQuinticOut=function(t){return 1+--t*t*t*t*t},ot.easingQuinticInOut=function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},ot.easingCircularIn=function(t){return-(Math.sqrt(1-t*t)-1)},ot.easingCircularOut=function(t){return Math.sqrt(1-(t-=1)*t)},ot.easingCircularInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},ot.easingExponentialIn=function(t){return Math.pow(2,10*(t-1))-.001},ot.easingExponentialOut=function(t){return 1-Math.pow(2,-10*t)},ot.easingExponentialInOut=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))},ot.easingBackIn=function(t){var e=1.70158;return t*t*((e+1)*t-e)},ot.easingBackOut=function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},ot.easingBackInOut=function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},ot.easingElasticIn=function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/Math.PI*2,-(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*Math.PI*2/r)))},ot.easingElasticOut=function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/Math.PI*2,n*Math.pow(2,-10*t)*Math.sin((t-e)*Math.PI*2/r)+1)},ot.easingElasticInOut=function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/Math.PI*2,(t*=2)<1?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*Math.PI*2/r)):n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*Math.PI*2/r)*.5+1)},ot.easingBounceIn=function(t){return 1-ot.easingBounceOut(1-t)},ot.easingBounceOut=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},ot.easingBounceInOut=function(t){return t<.5?.5*ot.easingBounceIn(2*t):.5*ot.easingBounceOut(2*t-1)+.5};var ut=t._tween=function(e,n,r,s){this._el=e,this._vSR={},this._vS=n,this._vE=r,this._y=s.yoyo||!1,this.playing=!1,this.reversed=!1,this.paused=!1,this._sT=null,this._pST=null,this._rpr=s.rpr||!1,this._dr=s.duration||700,this._r=s.repeat||0,this._rD=s.repeatDelay||0,this._dl=s.delay||0,this._e=s&&s.easing&&"function"==typeof st(s.easing)?st(s.easing):ot.linear,this._cT=[],this._sCF=!1,this._sC=s.start||null,this._uC=s.update||null,this._cC=s.complete||null,this._pC=s.pause||null,this._rC=s.play||null,this._stC=s.stop||null,this.repeat=this._r,this._ops={},this.start=rt,this.play=this.resume=it;for(var a in s)a in this||/delay|duration|repeat|start|stop|update|complete|pause|play|yoyo|easing/i.test(a)||(this._ops[a]=s[a]);this.pause=function(){return!this.paused&&this.playing&&(g(this),this.paused=!0,this._pST=i.now(),null!==this._pC&&this._pC.call()),this},this.stop=function(){return!this.paused&&this.playing&&(g(this),this.playing=!1,this.paused=!1,et.call(this),null!==this._stC&&this._stC.call(),this.stopChainedTweens(),tt.call(this)),this},this.chain=function(){return this._cT=arguments,this},this.stopChainedTweens=function(){for(var t=0,e=this._cT.length;t0?n.delay+(n.offset||0):n.delay,this.tweens.push(ft(t[i],e,r[i]))},ct=function(t,e,n,r){this.tweens=[];for(var i=[],s=0,a=t.length;s0?r.delay+(r.offset||0):r.delay,this.tweens.push(ht(t[s],e,n,i[s]))},ft=(lt.prototype=ct.prototype={start:function(t){t=t||i.now();for(var e=0,n=this.tweens.length;e