!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function d(a,b){var d,c=document.createElement(a||"div");for(d in b)c[d]=b[d];return c}function e(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function g(a,d,e,g){var h=["opacity",d,~~(100*a),e,g].join("-"),i=.01+100*(e/g),j=Math.max(1-(1-a)/d*(100-i),a),k=c.substring(0,c.indexOf("Animation")).toLowerCase(),l=k&&"-"+k+"-"||"";return b[h]||(f.insertRule("@"+l+"keyframes "+h+"{"+"0%{opacity:"+j+"}"+i+"%{opacity:"+a+"}"+(i+.01)+"%{opacity:1}"+(i+d)%100+"%{opacity:"+a+"}"+"100%{opacity:"+j+"}"+"}",f.cssRules.length),b[h]=1),h}function h(b,c){var e,f,d=b.style;for(c=c.charAt(0).toUpperCase()+c.slice(1),f=0;f',b)}f.addRule(".spin-vml","behavior:url(#default#VML)"),n.prototype.lines=function(b,c){function g(){return i(a("group",{coordsize:f+" "+f,coordorigin:-d+" "+-d}),{width:f,height:f})}function m(b,f,h){e(j,e(i(g(),{rotation:360/c.lines*b+"deg",left:~~f}),e(i(a("roundrect",{arcsize:c.corners}),{width:d,height:c.width,left:c.radius,top:-c.width>>1,filter:h}),a("fill",{color:l(c.color,b),opacity:c.opacity}),a("stroke",{opacity:0}))))}var k,d=c.length+c.width,f=2*d,h=2*-(c.width+c.length)+"px",j=i(g(),{position:"absolute",top:h,left:h});if(c.shadow)for(k=1;k<=c.lines;k++)m(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(k=1;k<=c.lines;k++)m(k);return e(b,j)},n.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var j,f=0,h=(b.lines-1)*(1-b.direction)/2;f