/*! stripe-js 31-05-2018 */ (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q={}.hasOwnProperty,r=function(a,b){function c(){this.constructor=a}for(var d in b)q.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};if(n="https://js.stripe.com",g="https://js.stripe.com",h=!!/stripe\.com$/.test("undefined"!=typeof window&&null!==window?window.location.host:void 0),f="console"in window&&"warn"in window.console,e=function(){var a;return(null!=(a=window.performance)&&"function"==typeof a.now?a.now():void 0)||("function"==typeof Date.now?Date.now():void 0)||+new Date},m=e(),k={},!h&&"querySelectorAll"in document&&f&&(l=document.querySelectorAll('script[src^="'+n+'"]'),l.length||console.warn("It looks like Stripe.js is not being loaded from https://js.stripe.com. Stripe does not support serving Stripe.js from your own domain.")),a=function(){function a(){if(a.StripeV3)return a.StripeV3.apply(a,arguments)}return a.version=2,a.endpoint="https://api.stripe.com/v1",a.StripeV3=null,a.setPublishableKey=function(b){return a.key=b,a.utils.validateProtocol(a.key)},a._language="en-US",a.setLanguage=function(b){return a._language=b},a._allowedCustomHeaders=["X-Stripe-Livemode","Authorization"],a._customHeaders={},a._setCustomHeader=function(a,b){var c,d,e,f,g;for(d=!1,g=this._allowedCustomHeaders,e=0,f=g.length;e0&&(d.amount=g)),b._fields&&b.createToken)return b.createToken(f);d[c.tokenName]=a.token.formatData(b,c.whitelistedAttrs),d.time_on_page=Math.round(e()-m);try{i=Object.keys(k),i.length>0&&(d.pasted_fields=i.sort().join(","))}catch(j){h=j}return d=a.utils.addAdditionalParams(d),a.token.create(d,f)},c.getToken=function(b,c){return a.token.get(b,c)},c.validateCardNumber=function(a){return a=(a+"").replace(/\s+|-/g,""),a.length>=10&&a.length<=16&&c.luhnCheck(a)},c.validateCVC=function(b){return b=a.utils.trim(b),/^\d+$/.test(b)&&b.length>=3&&b.length<=4},c.validateExpiry=function(b,c){var d,e,f,g;if(null!=c)f=a.utils.trim(b),c=a.utils.trim(c);else{try{g=a.utils.parseExpString(b),f=g[0],c=g[1]}catch(h){return!1}f+="",c+=""}return!!/^\d+$/.test(f)&&(!!/^\d+$/.test(c)&&(1<=f&&f<=12&&(2===c.length&&(c=c<70?"20"+c:"19"+c),4===c.length&&(e=new Date(c,f),d=new Date,e.setMonth(e.getMonth()-1),e.setMonth(e.getMonth()+1,1),e>d))))},c.luhnCheck=function(a){var b,c,d,e,f,g;for(d=!0,e=0,c=(a+"").split("").reverse(),f=0,g=c.length;f9&&(b-=9),e+=b;return e%10===0},c.cardType=function(a){return c.cardTypes[a.slice(0,2)]||"Unknown"},c.cardBrand=function(a){return c.cardType(a)},c.cardTypes=function(){var a,b,c,d;for(b={},a=c=40;c<=49;a=++c)b[a]="Visa";for(a=d=50;d<=59;a=++d)b[a]="MasterCard";return b[34]=b[37]="American Express",b[60]=b[62]=b[64]=b[65]="Discover",b[35]="JCB",b[30]=b[36]=b[38]=b[39]="Diners Club",b}(),c}(this.Stripe.token),this.Stripe.bankAccount=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return r(c,b),c.tokenName="bank_account",c.whitelistedAttrs=["country","currency","routing_number","account_number","name","account_holder_type","account_holder_name"],c.createToken=function(b,d,e){return null==d&&(d={}),a.token.validate(b,"bank account"),"function"==typeof d&&(e=d,d={}),d[c.tokenName]=a.token.formatData(b,c.whitelistedAttrs),a.token.create(d,e)},c.getToken=function(b,c){return a.token.get(b,c)},c.validateRoutingNumber=function(b,d){switch(b=a.utils.trim(b),d){case"US":return/^\d+$/.test(b)&&9===b.length&&c.routingChecksum(b);case"CA":return/\d{5}\-\d{3}/.test(b)&&9===b.length;default:return!0}},c.validateAccountNumber=function(b,c){switch(b=a.utils.trim(b),c){case"US":return/^\d+$/.test(b)&&b.length>=1&&b.length<=17;default:return!0}},c.routingChecksum=function(a){var b,c,d,e,f,g;for(d=0,b=(a+"").split(""),g=[0,3,6],e=0,f=g.length;e=400&&g<500?(a._clearPoll(b),"function"==typeof f?f(g,h):void 0):200===g&&e(b,h)?(a._clearPoll(b),"function"==typeof f?f(g,h):void 0):(200===g&&d(b,h)&&"function"==typeof f&&f(g,h),500===g&&2*a._activePolls[b].interval<=a._maxPollInterval?a._activePolls[b].interval*=2:g>=200&&g<500&&(a._activePolls[b].interval=a._defaultPollInterval),i=setTimeout(function(){return a._poll(b,c,d,e,f)},a._activePolls[b].interval),a._activePolls[b].timeoutId=i)})},a._cancelPoll=function(b){var c;if(c=a._activePolls[b],null==c)throw new Error("You are not polling "+b+".");null!=c.timeoutId&&clearTimeout(c.timeoutId),a._clearPoll(b)},a}(),this.Stripe.bitcoinReceiver=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return r(c,b),c._whitelistedAttrs=["amount","currency","email","description"],c.createReceiver=function(b,c){var d;return a.token.validate(b,"bitcoin_receiver data"),d=a.token.formatData(b,this._whitelistedAttrs),d.key=a.key||a.publishableKey,a.utils.validateKey(d.key),a.request({url:""+a.endpoint+"/bitcoin/receivers",data:d,method:"POST",success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred while creating a Bitcoin address. Please try again."),timeout:4e4})},c.getReceiver=function(b,c){var d;if(!b)throw new Error("receiver id required");return d=a.key||a.publishableKey,a.utils.validateKey(d),a.request({url:""+a.endpoint+"/bitcoin/receivers/"+b,data:{key:d},success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred loading data from Stripe. Please try again."),timeout:4e4})},c.pollReceiver=function(a,b){return this._initPoll(a),this._poll(a,function(a){return function(b,c){return a.getReceiver(b,c)}}(this),function(a,b){return!1},function(a,b){return b.filled},b)},c.cancelReceiverPoll=function(a){return c._cancelPoll(a)},c}(this.Stripe._poller),this.Stripe.source=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return r(c,b),c.stripeAccount=null,c.create=function(b,c){var d,e;return a.token.validate(b,"source data"),d=a.token.formatData(b,this._whitelistedAttrs),d.key=a.key||a.publishableKey,a.utils.validateKey(d.key),d=a.utils.addAdditionalParams(d),e={url:""+a.endpoint+"/sources",data:d,method:"POST",success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred while creating a Source. Please try again."),timeout:4e4,headers:a.source.stripeAccount?{"Stripe-Account":a.source.stripeAccount}:{}},a._language&&(e.headers["Accept-Language"]=a._language),a.request(e)},c.createThreeDSecure=function(a,b){var c,d,e,f;return c={type:"card",currency:a.currency},(null!=(e=a.three_d_secure)?e.card:void 0)&&(c.card={number:a.three_d_secure.card.number,cvc:a.three_d_secure.card.cvc,exp_month:a.three_d_secure.card.exp_month,exp_year:a.three_d_secure.card.exp_year}),(null!=(f=a.owner)?f.address:void 0)&&(c.owner||(c.owner={}),(d=c.owner).address||(d.address=a.owner.address)),this.create(c,function(c){return function(d,e){var f;return 200===d?(f={type:"three_d_secure",amount:a.amount,currency:e.currency,three_d_secure:{card:e.id},redirect:{return_url:a.redirect.return_url}},c.create(f,b)):[d,e]}}(this))},c.get=function(b,c,d){var e,f;if(!b)throw new Error("sourceId required");if(!c)throw new Error("clientSecret required");return e=a.key||a.publishableKey,a.utils.validateKey(e),f={},f.key=e,f.client_secret=c,a.request({url:""+a.endpoint+"/sources/"+b,data:f,success:function(a,b){return"function"==typeof d?d(b,a):void 0},complete:a.complete(d,"A network error has occurred loading data from Stripe. Please try again."),timeout:4e4,headers:a.source.stripeAccount?{"Stripe-Account":a.source.stripeAccount}:{}})},c.poll=function(a,b,c){return this._initPoll(a),this._poll(a,function(a){return function(c,d){return a.get(c,b,d)}}(this),function(a){return function(b,c){return a._activePolls[b].source_status!==c.status&&(a._activePolls[b].source_status=c.status,!0)}}(this),function(a,b){return!1},c)},c.cancelPoll=function(a){return this._cancelPoll(a)},c}(this.Stripe._poller),this.Stripe.threeDSecure=function(){function b(){}return b.create=function(b,c){var d;if("object"!=typeof b)throw new Error("params must be an object.");if("function"!=typeof c)throw new Error("callback must be a function.");return b.key||(b.key=a.key||a.publishableKey),b.return_url||(b.return_url="_callback"),a.utils.validateKey(b.key),d={url:""+a.endpoint+"/3d_secure",data:b,method:"POST",headers:{},success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred, and you have not been charged. Please try again."),timeout:4e4,tokenType:"three_d_secure"},a._language&&(d.headers["Accept-Language"]=a._language),a.request(d),null},b.createIframe=function(b,c,d){var e,f;if(f=null,!a.validator.isUrl(b))throw new Error("redirectUrl must be a valid URL.");if(!a.validator.isElementOrId(c))throw new Error("parentElement must be a DOM Element, or the ID of a DOM element.");if("function"!=typeof d)throw new Error("callback must be a function.");return e=function(b,c){var e,g;try{g=a.JSON.parse(b)}catch(h){throw e=h,a.reportError("InvalidJSON-3DSecureCallback"),new Error("Stripe.js received invalid JSON")}return f.destroy(),d(g)},f=new a.easyXDM.Socket({swf:""+a._iframeBaseUrl+"/v2/stripexdm.swf",remote:b,onMessage:e,container:c}),null},b}(),this.Stripe.applePay=function(){function b(){}return b.stripeAccount=null,b._isOverHTTPS=function(){return"https:"===window.location.protocol},b.checkAvailability=function(b){var c,d,e,f;if(null==b)throw new Error("This function executes asynchronously; please pass it a callback function.");return this._isOverHTTPS()?(d=/^pk_test_/.test(a.key||a.publishableKey))?void b(null!=(e=window.ApplePaySession)?e.canMakePayments():void 0):(null!=(f=window.ApplePaySession)?f.canMakePayments():void 0)?(c=this.stripeAccount?"merchant."+window.location.hostname+"."+this.stripeAccount+".stripe":"merchant."+window.location.hostname+".stripe",ApplePaySession.canMakePaymentsWithActiveCard(c).then(function(a){return b(a)})):void b(!1):(console.warn("To use Apple Pay, you must serve your page over HTTPS."),void b(!1))},b.buildSession=function(b,c,d){return new a.ApplePaySession(b,c,d)},b.createToken=function(b,c){var d,e,f;return d={apple_pay:!0,pk_token:a.JSON.stringify(b.token.paymentData),pk_token_transaction_id:b.token.transactionIdentifier,pk_token_payment_network:b.token.paymentMethod.network,pk_token_instrument_name:b.token.paymentMethod.displayName},null!=b.billingContact&&(d.card={name:[b.billingContact.givenName,b.billingContact.familyName].join(" ").trim(),address_line1:null!=(e=b.billingContact.addressLines)?e[0]:void 0,address_line2:null!=(f=b.billingContact.addressLines)?f[1]:void 0,address_city:b.billingContact.locality,address_state:b.billingContact.administrativeArea,address_zip:b.billingContact.postalCode,address_country:b.billingContact.countryCode}),a.token.create(d,c)},b}(),d=["createToken","getToken","cardType","validateExpiry","validateCVC","validateCardNumber"],o=0,p=d.length;o