(function(n,t){if(t===undefined)return console.error("jQuery required for Ladda.jQuery");var i=[];t=t.extend(t,{ladda:function(t){t==="stopAll"&&n.stopAll()}}),t.fn=t.extend(t.fn,{ladda:function(r){var u=i.slice.call(arguments,1);return r==="bind"?(u.unshift(t(this).selector),n.bind.apply(n,u)):t(this).each(function(){var f=t(this),i;r===undefined?f.data("ladda",n.create(this)):(i=f.data("ladda"),i[r].apply(i,u))}),this}})})(this.Ladda,this.jQuery),function(n,t){typeof exports=="object"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.Spinner=t()}(this,function(){"use strict";function i(n,t){var r=document.createElement(n||"div"),i;for(i in t)r[i]=t[i];return r}function t(n){for(var t=1,i=arguments.length;t<i;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var f=["opacity",t,~~(n*100),i,r].join("-"),e=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-e),n),h=u.substring(0,u.indexOf("Animation")).toLowerCase(),c=h&&"-"+h+"-"||"";return l[f]||(o.insertRule("@"+c+"keyframes "+f+"{0%{opacity:"+s+"}"+e+"%{opacity:"+n+"}"+(e+.01)+"%{opacity:1}"+(e+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",o.cssRules.length),l[f]=1),f}function e(n,t){var u=n.style,r,i;for(t=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<c.length;i++)if(r=c[i]+t,u[r]!==undefined)return r;if(u[t]!==undefined)return t}function n(n,t){for(var i in t)n.style[e(n,i)||i]=t[i];return n}function s(n){for(var i,t,r=1;r<arguments.length;r++){i=arguments[r];for(t in i)n[t]===undefined&&(n[t]=i[t])}return n}function h(n,t){return typeof n=="string"?n:n[t%n.length]}function r(n){this.opts=s(n||{},r.defaults,y)}function v(){function u(n,t){return i("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}o.addRule(".spin-vml","behavior:url(#default#VML)"),r.prototype.lines=function(i,r){function s(){return n(u("group",{coordsize:o+" "+o,coordorigin:-e+" "+-e}),{width:o,height:o})}function c(i,f,o){t(a,t(n(s(),{rotation:360/r.lines*i+"deg",left:~~f}),t(n(u("roundrect",{arcsize:r.corners}),{width:e,height:r.width,left:r.radius,top:-r.width>>1,filter:o}),u("fill",{color:h(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var e=r.length+r.width,o=2*e,l=-(r.width+r.length)*2+"px",a=n(s(),{position:"absolute",top:l,left:l}),f;if(r.shadow)for(f=1;f<=r.lines;f++)c(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=r.lines;f++)c(f);return t(i,a)},r.prototype.opacity=function(n,t,i,r){var u=n.firstChild;r=r.shadow&&r.lines||0,u&&t+r<u.childNodes.length&&(u=u.childNodes[t+r],u=u&&u.firstChild,u=u&&u.firstChild,u&&(u.opacity=i))}}var c=["webkit","Moz","ms","O"],l={},u,o=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),y={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"},f;return r.defaults={},s(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=n(i(0,{className:r.className}),{position:r.position,width:0,zIndex:r.zIndex}),p=r.radius+r.length+r.width;if(n(e,{left:r.left,top:r.top}),t&&t.insertBefore(e,t.firstChild||null),e.setAttribute("role","progressbar"),f.lines(e,f.opts),!u){var s=0,l=(r.lines-1)*(1-r.direction)/2,h,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;(function y(){s++;for(var n=0;n<r.lines;n++)h=Math.max(1-(s+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,h,r);f.timeout=f.el&&setTimeout(y,~~(1e3/c))})()}return f},stop:function(){var n=this.el;return n&&(clearTimeout(this.timeout),n.parentNode&&n.parentNode.removeChild(n),this.el=undefined),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var e=0,c=(f.lines-1)*(1-f.direction)/2,o;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:u&&a(f.opacity,f.trail,c+e*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&t(o,n(s("#000","0 0 4px #000"),{top:"2px"})),t(r,t(o,s(h(f.color,e),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(n,t,i){t<n.childNodes.length&&(n.childNodes[t].style.opacity=i)}}),f=n(i("group"),{behavior:"url(#default#VML)"}),!e(f,"transform")&&f.adj?v():u=e(f,"animation"),r}),function(n,t){typeof exports=="object"?module.exports=t(require("spin.js")):typeof define=="function"&&define.amd?define(["spin"],t):n.Ladda=t(n.Spinner)}(this,function(n){"use strict";function i(n){var e,i,r,u,f;if(typeof n=="undefined"){console.warn("Ladda button target must be defined.");return}return/ladda-button/i.test(n.className)||(n.className+=" ladda-button"),n.hasAttribute("data-style")||n.setAttribute("data-style","expand-right"),n.querySelector(".ladda-label")||(e=document.createElement("span"),e.className="ladda-label",h(n,e)),r=n.querySelector(".ladda-spinner"),r||(r=document.createElement("span"),r.className="ladda-spinner"),n.appendChild(r),f={start:function(){return i||(i=o(n)),n.setAttribute("disabled",""),n.setAttribute("data-loading",""),clearTimeout(u),i.spin(r),this.setProgress(0),this},startAfter:function(n){return clearTimeout(u),u=setTimeout(function(){f.start()},n),this},stop:function(){return n.removeAttribute("disabled"),n.removeAttribute("data-loading"),clearTimeout(u),i&&(u=setTimeout(function(){i.stop()},1e3)),this},toggle:function(){return this.isLoading()?this.stop():this.start(),this},setProgress:function(t){t=Math.max(Math.min(t,1),0);var i=n.querySelector(".ladda-progress");t===0&&i&&i.parentNode?i.parentNode.removeChild(i):(i||(i=document.createElement("div"),i.className="ladda-progress",n.appendChild(i)),i.style.width=(t||0)*n.offsetWidth+"px")},enable:function(){return this.stop(),this},disable:function(){return this.stop(),n.setAttribute("disabled",""),this},isLoading:function(){return n.hasAttribute("data-loading")},remove:function(){clearTimeout(u),n.removeAttribute("disabled",""),n.removeAttribute("data-loading",""),i&&(i.stop(),i=null);for(var r=0,e=t.length;r<e;r++)if(f===t[r]){t.splice(r,1);break}}},t.push(f),f}function r(n,t){while(n.parentNode&&n.tagName!==t)n=n.parentNode;return t===n.tagName?n:undefined}function u(n){for(var i,t,u=["input","textarea","select"],f=[],r=0;r<u.length;r++)for(i=n.getElementsByTagName(u[r]),t=0;t<i.length;t++)i[t].hasAttribute("required")&&f.push(i[t]);return f}function f(n,t){var f,e,o;for(t=t||{},f=[],typeof n=="string"?f=s(document.querySelectorAll(n)):typeof n=="object"&&typeof n.nodeName=="string"&&(f=[n]),e=0,o=f.length;e<o;e++)(function(){var n=f[e],o,s;typeof n.addEventListener=="function"&&(o=i(n),s=-1,n.addEventListener("click",function(){var e=!0,h=r(n,"FORM"),f,i;if(typeof h!="undefined")for(f=u(h),i=0;i<f.length;i++)f[i].value.replace(/^\s+|\s+$/g,"")===""&&(e=!1),f[i].type!=="checkbox"&&f[i].type!=="radio"||f[i].checked||(e=!1),f[i].type==="email"&&(e=/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/.test(f[i].value));e&&(o.startAfter(1),typeof t.timeout=="number"&&(clearTimeout(s),s=setTimeout(o.stop,t.timeout)),typeof t.callback=="function"&&t.callback.apply(null,[o]))},!1))})()}function e(){for(var n=0,i=t.length;n<i;n++)t[n].stop()}function o(t){var i=t.offsetHeight,u,f;i===0&&(i=parseFloat(window.getComputedStyle(t).height)),i>32&&(i*=.8),t.hasAttribute("data-spinner-size")&&(i=parseInt(t.getAttribute("data-spinner-size"),10)),t.hasAttribute("data-spinner-color")&&(u=t.getAttribute("data-spinner-color")),t.hasAttribute("data-spinner-lines")&&(f=parseInt(t.getAttribute("data-spinner-lines"),10));var r=i*.2,e=r*.6,o=r<7?2:3;return new n({color:u||"#fff",lines:f||12,radius:r,length:e,width:o,zIndex:"auto",top:"auto",left:"auto",className:""})}function s(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t]);return i}function h(n,t){var i=document.createRange();i.selectNodeContents(n),i.surroundContents(t),n.appendChild(t)}var t=[];return{bind:f,create:i,stopAll:e}})