function formsbyairScrollTo(n,t){var r=document.getElementsByClassName("tingle-modal")[0].scrollTop,e=n-r,i=0,u=20,f=function(){i+=u;var n=Math.formsbyairEaseInOutQuad(i,r,e,t);document.getElementsByClassName("tingle-modal")[0].scrollTop=n;i<t&&setTimeout(f,u)};f()}!function(n,t){"object"==typeof module&&module.exports?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Spinner=t()}(this,function(){"use strict";function i(n,t){var i,r=document.createElement(n||"div");for(i in t)r[i]=t[i];return r}function t(n){for(var t=1,i=arguments.length;i>t;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var e=["opacity",t,~~(100*n),i,r].join("-"),o=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-o),n),h=u.substring(0,u.indexOf("Animation")).toLowerCase(),c=h&&"-"+h+"-"||"";return l[e]||(f.insertRule("@"+c+"keyframes "+e+"{0%{opacity:"+s+"}"+o+"%{opacity:"+n+"}"+(o+.01)+"%{opacity:1}"+(o+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",f.cssRules.length),l[e]=1),e}function o(n,t){var r,i,u=n.style;if(t=t.charAt(0).toUpperCase()+t.slice(1),void 0!==u[t])return t;for(i=0;i<c.length;i++)if(r=c[i]+t,void 0!==u[r])return r}function n(n,t){for(var i in t)n.style[o(n,i)||i]=t[i];return n}function s(n){for(var r,i,t=1;t<arguments.length;t++){r=arguments[t];for(i in r)void 0===n[i]&&(n[i]=r[i])}return n}function h(n,t){return"string"==typeof n?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)}f.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.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:o}),u("fill",{color:h(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var f,e=r.scale*(r.length+r.width),o=2*r.scale*e,l=-(r.width+r.length)*r.scale*2+"px",a=n(s(),{position:"absolute",top:l,left:l});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 u,f,c=["webkit","Moz","ms","O"],l={},y={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"},e;return(r.defaults={},s(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=i(null,{className:r.className});if(n(e,{position:r.position,width:0,zIndex:r.zIndex,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,h=0,l=(r.lines-1)*(1-r.direction)/2,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;!function y(){h++;for(var n=0;n<r.lines;n++)s=Math.max(1-(h+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,s,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=void 0),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var o,e=0,c=(f.lines-1)*(1-f.direction)/2;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.scale*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)}}),"undefined"!=typeof document)&&(f=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),e=n(i("group"),{behavior:"url(#default#VML)"}),!o(e,"transform")&&e.adj?v():u=o(e,"animation")),r});!function(n,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():n.tingle=t()}(this,function(){function n(n){this.opts=l({},{onClose:null,onOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:"Close"},n);this.init()}function i(){this.modal.classList.contains("tingle-modal--visible")&&(this.isOverflow()?this.modal.classList.add("tingle-modal--overflow"):this.modal.classList.remove("tingle-modal--overflow"),!this.isOverflow()&&this.opts.stickyFooter?this.setStickyFooter(!1):this.isOverflow()&&this.opts.stickyFooter&&(r.call(this),this.setStickyFooter(!0)))}function r(){this.modalBoxFooter&&(this.modalBoxFooter.style.width=this.modalBox.clientWidth+"px",this.modalBoxFooter.style.left=this.modalBox.offsetLeft+"px")}function u(){this.modal=document.createElement("div");this.modal.classList.add("tingle-modal");this.modal.style.display="none";this.opts.cssClass.forEach(function(n){"string"==typeof n&&this.modal.classList.add(n)},this);this.modalCloseBtn=document.createElement("button");this.modalCloseBtn.classList.add("tingle-modal__close");this.modalCloseBtnIcon=document.createElement("span");this.modalCloseBtnIcon.classList.add("tingle-modal__closeIcon");this.modalCloseBtnIcon.innerHTML="×";this.modalCloseBtnLabel=document.createElement("span");this.modalCloseBtnLabel.classList.add("tingle-modal__closeLabel");this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel;this.modalCloseBtn.appendChild(this.modalCloseBtnIcon);this.modalCloseBtn.appendChild(this.modalCloseBtnLabel);this.modalBox=document.createElement("div");this.modalBox.classList.add("tingle-modal-box");this.modalBoxContent=document.createElement("div");this.modalBoxContent.classList.add("tingle-modal-box__content");this.modalBox.appendChild(this.modalBoxContent);this.modal.appendChild(this.modalCloseBtn);this.modal.appendChild(this.modalBox)}function f(){this.modalBoxFooter=document.createElement("div");this.modalBoxFooter.classList.add("tingle-modal-box__footer");this.modalBox.appendChild(this.modalBoxFooter)}function e(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:s.bind(this),resize:i.bind(this),keyboardNav:o.bind(this)};this.modalCloseBtn.addEventListener("click",this._events.clickCloseBtn);this.modal.addEventListener("mousedown",this._events.clickOverlay);window.addEventListener("resize",this._events.resize);document.addEventListener("keydown",this._events.keyboardNav)}function o(n){27===n.which&&this.isOpen()&&this.close()}function s(n){!h(n.target,"tingle-modal")&&n.clientX<this.modal.clientWidth&&this.close()}function h(n,t){for(;(n=n.parentElement)&&!n.classList.contains(t););return n}function c(){this.modalCloseBtn.removeEventListener("click",this._events.clickCloseBtn);this.modal.removeEventListener("mousedown",this._events.clickOverlay);window.removeEventListener("resize",this._events.resize);document.removeEventListener("keydown",this._events.keyboardNav)}function l(){for(var t,n=1;n<arguments.length;n++)for(t in arguments[n])arguments[n].hasOwnProperty(t)&&(arguments[0][t]=arguments[n][t]);return arguments[0]}function a(){var n,i=document.createElement("tingle-test-transition"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(n in t)if(void 0!==i.style[n])return t[n]}var t=a();return n.prototype.init=function(){this.modal||(u.call(this),e.call(this),document.body.insertBefore(this.modal,document.body.firstChild),this.opts.footer&&this.addFooter())},n.prototype.destroy=function(){null!==this.modal&&(c.call(this),this.modal.parentNode.removeChild(this.modal),this.modal=null)},n.prototype.open=function(){this.modal.style.removeProperty?this.modal.style.removeProperty("display"):this.modal.style.removeAttribute("display");document.body.classList.add("tingle-enabled");this.setStickyFooter(this.opts.stickyFooter);this.modal.classList.add("tingle-modal--visible");var n=this;t&&this.modal.addEventListener(t,function i(){"function"==typeof n.opts.onOpen&&n.opts.onOpen.call(n);n.modal.removeEventListener(t,i,!1)},!1);i.call(this)},n.prototype.isOpen=function(){return!!this.modal.classList.contains("tingle-modal--visible")},n.prototype.close=function(){var i,n;("function"!=typeof this.opts.beforeClose||(i=this.opts.beforeClose.call(this),i))&&(document.body.classList.remove("tingle-enabled"),this.modal.classList.remove("tingle-modal--visible"),n=this,t&&this.modal.addEventListener(t,function i(){n.modal.removeEventListener(t,i,!1);n.modal.style.display="none";"function"==typeof n.opts.onClose&&n.opts.onClose.call(this)},!1))},n.prototype.setContent=function(n){"string"==typeof n?this.modalBoxContent.innerHTML=n:(this.modalBoxContent.innerHTML="",this.modalBoxContent.appendChild(n))},n.prototype.getContent=function(){return this.modalBoxContent},n.prototype.addFooter=function(){f.call(this)},n.prototype.setFooterContent=function(n){this.modalBoxFooter.innerHTML=n},n.prototype.getFooterContent=function(){return this.modalBoxFooter},n.prototype.setStickyFooter=function(n){this.isOverflow()||(n=!1);n?this.modalBox.contains(this.modalBoxFooter)&&(this.modalBox.removeChild(this.modalBoxFooter),this.modal.appendChild(this.modalBoxFooter),this.modalBoxFooter.classList.add("tingle-modal-box__footer--sticky"),r.call(this),this.modalBoxContent.style["padding-bottom"]=this.modalBoxFooter.clientHeight+20+"px"):this.modalBoxFooter&&(this.modalBox.contains(this.modalBoxFooter)||(this.modal.removeChild(this.modalBoxFooter),this.modalBox.appendChild(this.modalBoxFooter),this.modalBoxFooter.style.width="auto",this.modalBoxFooter.style.left="",this.modalBoxContent.style["padding-bottom"]="",this.modalBoxFooter.classList.remove("tingle-modal-box__footer--sticky")))},n.prototype.addFooterBtn=function(n,t,i){var r=document.createElement("button");return r.innerHTML=n,r.addEventListener("click",i),"string"==typeof t&&t.length&&t.split(" ").forEach(function(n){r.classList.add(n)}),this.modalBoxFooter.appendChild(r),r},n.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")},n.prototype.isOverflow=function(){var n=window.innerHeight,t=this.modalBox.clientHeight;return t>=n},{modal:n}});window.addEventListener("message",function(n){window.formsbyairSpinner&&(window.formsbyairSpinner.stop(),window.formsbyairSpinner=undefined);switch(n.data[0]){case"formsbyair":document.getElementById("formsbyair").height=n.data[1];break;case"formsbyair-scroll-to":formsbyairScrollTo(n.data[1]+4,500);break;case"formsbyair-scroll-up":n.data[2]<document.getElementsByClassName("tingle-modal")[0].scrollTop+window.innerHeight||(n.data[2]-n.data[1]<window.innerHeight?formsbyairScrollTo(n.data[2]-window.innerHeight,250):formsbyairScrollTo(n.data[1],500));break;case"formsbyair-dirty":window.formsbyairDirty=n.data[1];break;case"formsbyair-close":window.formsbyairDirty=!1;window.formsbyairModal.close();n.data[1]&&location.reload()}},!1);formsbyairDirtyListener=function(n){if(window.formsbyairDirty)return n.returnValue="Changes that you have made may not be saved.","Changes that you have made may not be saved."};formsbyair=function(n){window.outerWidth>1024?(window.formsbyairSpinner=(new Spinner).spin(),window.formsbyairModal=new tingle.modal({beforeClose:function(){return window.formsbyairDirty&&!confirm("Changes that you have made may not be saved.")?!1:(document.getElementsByClassName("tingle-modal-box")[0].innerHTML="",!0)},onClose:function(){window.removeEventListener("beforeunload",formsbyairDirtyListener);window.formsbyairModal.destroy()}}),window.formsbyairModal.setContent('<iframe id="formsbyair" src="'+n+'?embed=1&returnonsubmit=1" scrolling="no" width="100%" frameborder="0" marginheight="0" marginwidth="0"><\/iframe>'),window.formsbyairModal.open(),document.getElementsByClassName("tingle-modal-box")[0].appendChild(window.formsbyairSpinner.el),window.addEventListener("beforeunload",formsbyairDirtyListener)):window.location=n+"?returnonsubmit=1&returnurl="+window.location.href};Math.formsbyairEaseInOutQuad=function(n,t,i,r){return(n/=r/2,n<1)?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t)}