!function(){function e(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return r[t](i,i.exports,e),i.exports}var t,n,r={723:function(e,t,n){"use strict";function r(e){l.length||(a(),!0),l[l.length]=e}function o(){for(;p1024){for(var t=0,n=l.length-p;t0&&void 0!==arguments[0]?arguments[0]:{};if((null==r||null===(e=r.allowedCardBrands)||void 0===e?void 0:e.length)&&(null==r||null===(t=r.disallowedCardBrands)||void 0===t?void 0:t.length))throw new s.No("You cannot specify both disallowedCardBrands and allowedCardBrands. Please specify only one of those parameters.");if((null==r||null===(n=r.disallowedCardBrands)||void 0===n?void 0:n.length)===i.R5.length)throw new s.No("You cannot block all available card brands.")},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=e.layout;if(!o||"string"==typeof o)return[];var a=(0,c.mC)({layout:t?i.Ee:i.xl}),s=(0,c.Gu)(a,{layout:o},n),u=s.warnings,l=o,p=l.type;return"accordion"!==p&&(o.hasOwnProperty("spacedAccordionItems")&&(u=[].concat((0,r.Z)(u),["options.layout.spacedAccordionItems is only supported with the 'accordion' layout type."])),o.hasOwnProperty("radios")&&(u=[].concat((0,r.Z)(u),["options.layout.radios is only supported with the 'accordion' layout type."]))),u},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.wallets;if(!n||"string"==typeof n)return[];var r=(0,c.mC)({wallets:i.n4}),o=(0,c.Gu)(r,{wallets:n},t),a=o.warnings;return a},b=function(e){var t=e.fields,n=e.validation;if(n)for(var r in n)if(!t||!t[r]||"always"!==t[r])throw new s.No("You cannot specify validation.".concat(r," without setting fields.").concat(r," to always."))},w=function(e){var t,n;if((null===(t=e.defaultValues)||void 0===t?void 0:t.phone)&&"always"!==(null===(n=e.fields)||void 0===n?void 0:n.phone))throw new s.No("You cannot specify defaultValues.phone without setting fields.phone to always.")},k=function(e){var t,n,r,o,i;if(((null===(t=e.defaultValues)||void 0===t?void 0:t.firstName)||(null===(n=e.defaultValues)||void 0===n?void 0:n.lastName))&&(null===(r=e.display)||void 0===r?void 0:r.name)!==l.ZV)throw new s.No("You cannot specify defaultValues.firstName or defaultValues.lastName without setting display.name to split.");if((null===(o=e.display)||void 0===o?void 0:o.name)===l.ZV&&(null===(i=e.defaultValues)||void 0===i?void 0:i.name))throw new s.No("You cannot specify defaultValues.name when you have display.name set to split.")},E=function(e){var t=e.contacts,n=e.fields,r=e.validation;if(t){var o,i=(0,u.cx)(t,(function(e){return e.hasOwnProperty("phone")}));if(-1!==i)if("always"!==(null==n?void 0:n.phone)||"always"!==(null==r||null===(o=r.phone)||void 0===o?void 0:o.required))throw new s.No("You cannot specify contacts[".concat(i,"].phone without\n setting fields.phone to 'always' and validation.phone.required to 'always'.\n Phone options should only be 'always' when absolutely necessary."))}},S=function(e){if(!e)return{allowedCountries:null,warnings:[]};var t=[],n=[];return e.forEach((function(e){if("string"==typeof e){var r=d[e.toUpperCase()]||null;null!==r?t.push(r):n.push('invalid country code "'.concat(e,'"; "').concat(e,'" is not a valid 2-letter country code'))}else n.push('invalid value provided for country code "'.concat(e,'"; expected "string" but received "').concat(typeof e,'"'))})),{allowedCountries:t,warnings:n}}},3852:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(7904),o=function(){var e=[];return{addEventListener:function(t,n,r,o){t.addEventListener(n,r,o),e.push([t,n,r,o])},removeEventListener:function(t,n,o,i){t.removeEventListener(n,o,i),e=e.filter((function(e){return function(e,t){var n=(0,r.Z)(e,4),o=n[0],i=n[1],a=n[2],c=n[3],s=(0,r.Z)(t,4),u=s[0],l=s[1],p=s[2],d=s[3];return u!==o||l!==i||p!==a||!0===("object"==typeof c&&c?c.capture:c)!=(!0===("object"==typeof d&&d?d.capture:d))}([t,n,o,i],e)}))}}}},1849:function(e,t,n){"use strict";n.d(t,{U:function(){return o},d:function(){return i}});var r=n(6589),o=function(e){return new r.J((function(t){var n=setTimeout((function(){t({type:"error",error:{code:"redirect_error",message:"Failed to redirect to ".concat(e)},locale:"en"})}),6e4);window.addEventListener("pagehide",(function(){clearTimeout(n)})),window.top.location.href=e}))},i=function(e,t,n){e.report("redirect_error",{initiator:t,error:n.error})}},6977:function(e,t,n){"use strict";n.d(t,{G2:function(){return d},LD:function(){return i},O3:function(){return l},PA:function(){return c},QS:function(){return a},RY:function(){return u},e3:function(){return s},mD:function(){return p}});var r=n(8489),o=n(1873),i=(n(276),"webauthn"),a="spc",c=function(e,t){switch(e.type){case"object":return{paymentIntent:e.object};case"error":var n=t?{payment_intent:t}:{};return{error:(0,r.Z)((0,r.Z)({},n),e.error)};default:return(0,o.Rz)(e)}},s=function(e,t){switch(e.type){case"error":return{error:(0,r.Z)((0,r.Z)({},t?{setup_intent:t}:{}),e.error)};case"object":return{setupIntent:e.object};default:return(0,o.Rz)(e)}},u=function(e){var t=e.trim().match(/^((seti|pi)_[^_]+)_secret_[^-]+$/);return t?"pi"===t[2]?{id:t[1],clientSecret:t[0],type:"PAYMENT_INTENT"}:{id:t[1],clientSecret:t[0],type:"SETUP_INTENT"}:null},l=function(e){return"payment_intent"===e.object?{id:e.id,clientSecret:e.client_secret,type:"PAYMENT_INTENT"}:{id:e.id,clientSecret:e.client_secret,type:"SETUP_INTENT"}},p=function(e){return"requires_source_action"===e||"requires_action"===e},d=function(e){return"requires_source_action"===e.status||"requires_action"===e.status?e.next_action:null}},2141:function(e,t,n){"use strict";n.d(t,{J$:function(){return r.J}});var r=n(4832)},4832:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r={AE:"AE",AT:"AT",AU:"AU",BE:"BE",BG:"BG",BR:"BR",CA:"CA",CH:"CH",CI:"CI",CR:"CR",CY:"CY",CZ:"CZ",DE:"DE",DK:"DK",DO:"DO",EE:"EE",ES:"ES",FI:"FI",FR:"FR",GB:"GB",GI:"GI",GR:"GR",GT:"GT",HK:"HK",HR:"HR",HU:"HU",ID:"ID",IE:"IE",IN:"IN",IT:"IT",JP:"JP",LI:"LI",LT:"LT",LU:"LU",LV:"LV",MT:"MT",MX:"MX",MY:"MY",NL:"NL",NO:"NO",NZ:"NZ",PE:"PE",PH:"PH",PL:"PL",PT:"PT",RO:"RO",SE:"SE",SG:"SG",SI:"SI",SK:"SK",SN:"SN",TH:"TH",TT:"TT",US:"US",UY:"UY"},o=Object.keys(r)},4659:function(e,t,n){"use strict";n.d(t,{Lv:function(){return i},M4:function(){return r},MJ:function(){return o},uN:function(){return a}});var r={checkout_beta_2:"checkout_beta_2",checkout_beta_3:"checkout_beta_3",checkout_beta_4:"checkout_beta_4",checkout_beta_testcards:"checkout_beta_testcards",payment_intent_beta_1:"payment_intent_beta_1",payment_intent_beta_2:"payment_intent_beta_2",payment_intent_beta_3:"payment_intent_beta_3",google_pay_beta_1:"google_pay_beta_1",acss_debit_beta_1:"acss_debit_beta_1",acss_debit_beta_2:"acss_debit_beta_2",afterpay_clearpay_setup_intents_beta:"afterpay_clearpay_setup_intents_beta",bacs_debit_beta:"bacs_debit_beta",fpx_bank_beta_1:"fpx_bank_beta_1",ideal_pm_beta_1:"ideal_pm_beta_1",line_items_beta_1:"line_items_beta_1",meta_pay_beta_1:"meta_pay_beta_1",mobilepay_pm_beta_1:"mobilepay_pm_beta_1",oxxo_pm_beta_1:"oxxo_pm_beta_1",paypal_pm_beta_1:"paypal_pm_beta_1",revolut_pay_pm_beta_1:"revolut_pay_pm_beta_1",sepa_pm_beta_1:"sepa_pm_beta_1",tax_product_beta_1:"tax_product_beta_1",wechat_pay_pm_beta_1:"wechat_pay_pm_beta_1",wechat_pay_pm_beta_2:"wechat_pay_pm_beta_2",checkout_beta_locales:"checkout_beta_locales",stripe_js_beta_locales:"stripe_js_beta_locales",upi_beta_1:"upi_beta_1",issuing_elements_1:"issuing_elements_1",issuing_elements_2:"issuing_elements_2",return_intents_beta_1:"return_intents_beta_1",netbanking_beta_1:"netbanking_beta_1",netbanking_bank_beta_1:"netbanking_bank_beta_1",instant_debits_beta_1:"instant_debits_beta_1",link_beta_1:"link_beta_1",link_beta_2:"link_beta_2",link_beta_3:"link_beta_3",link_default_integration_beta_1:"link_default_integration_beta_1",link_default_integration_beta_2:"link_default_integration_beta_2",link_suggest_email_domain_correction_1:"link_suggest_email_domain_correction_1",payment_element_beta_1:"payment_element_beta_1",elements_customers_beta_1:"elements_customers_beta_1",card_country_event_beta_1:"card_country_event_beta_1",id_bank_transfer_beta_1:"id_bank_transfer_beta_1",id_bank_transfer_beta_2:"id_bank_transfer_beta_2",us_bank_account_beta_2:"us_bank_account_beta_2",cup_apple_pay_beta_1:"cup_apple_pay_beta_1",nz_bank_account_beta_1:"nz_bank_account_beta_1",payment_element_apple_pay_beta_1:"payment_element_apple_pay_beta_1",link_autofill_modal_beta_1:"link_autofill_modal_beta_1",shipping_address_element_beta_1:"shipping_address_element_beta_1",process_order_beta_1:"process_order_beta_1",server_side_confirmation_beta_1:"server_side_confirmation_beta_1",cart_beta_1:"cart_beta_1",pay_by_bank_beta_1:"pay_by_bank_beta_1",blocked_card_brands_beta_1:"blocked_card_brands_beta_1",ume_beta_1:"ume_beta_1",ume_beta_2:"ume_beta_2",ume_beta_3:"ume_beta_3",networks_change_1:"networks_change_1",express_checkout_element_beta_1:"express_checkout_element_beta_1",pay_button_element_beta_1:"pay_button_element_beta_1",merchant_ui_elements_session_beta_1:"merchant_ui_elements_session_beta_1",link_in_card_element_beta_1:"link_in_card_element_beta_1",link_in_card_element_returning_user_beta_1:"link_in_card_element_returning_user_beta_1",payment_element_vertical_layout_beta_1:"payment_element_vertical_layout_beta_1",elements_enable_deferred_intent_beta_1:"elements_enable_deferred_intent_beta_1",enable_stripe_update_api_key_beta_0:"enable_stripe_update_api_key_beta_0",zip_beta_1:"zip_beta_1",cartes_bancaires_apple_pay_beta_1:"cartes_bancaires_apple_pay_beta_1",link_in_passthrough_mode_beta_1:"link_in_passthrough_mode_beta_1",payment_request_button_two_button_beta_1:"payment_request_button_two_button_beta_1"},o=Object.freeze({netbankingBank:"netbanking_bank_beta_1",shippingAddress:["shipping_address_element_beta_1","link_beta_1","link_beta_2","link_beta_3"],cart:"cart_beta_1",unifiedMessage:["ume_beta_1","ume_beta_2"],paymentMethodMessaging:["ume_beta_1","ume_beta_2","ume_beta_3"],expressCheckout:"express_checkout_element_beta_1",payButton:"pay_button_element_beta_1"}),i=Object.keys(r),a=function(e,t){return Array.isArray(t)?t.some((function(t){return e.indexOf(t)>-1})):(null==e?void 0:e.indexOf(t))>-1}},8846:function(e,t,n){"use strict";n.d(t,{u:function(){return u}});var r=n(3696),o=n(6617),i=n(1873),a=n(4659),c=window.location.hash.substring(1).split("?")[0],s=(0,i.ld)((0,i.mC)({betas:(0,i.Wc)((0,i.CT)(i.kw.apply(void 0,(0,r.Z)(a.Lv))),(function(){return[]}))}),(0,o.vB)(c),"internal"),u="valid"===s.type?s.value.betas:[]},7792:function(e,t,n){"use strict";n.d(t,{Lv:function(){return o.Lv},M4:function(){return o.M4},MJ:function(){return o.MJ},P3:function(){return a.P3},dZ:function(){return i.d},jk:function(){return a.jk},uN:function(){return o.uN},ub:function(){return r.u}});var r=n(8846),o=n(4659),i=n(7450),a=n(6608)},7450:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(4659),o=function(e){var t=[],n=[];if(e&&e.forEach((function(e){r.Lv.indexOf(e)>-1?t.push(r.M4[e]):n.push(e)})),n.length>0){var o="The following betas are unrecognized for Stripe() parameter:\n\n- ".concat(n.join("\n- "),"\n\n They are either invalid or expired betas, please remove these beta flags to prevent future integration issues.");return{validBetas:t,betaWarning:o}}return{validBetas:t}}},6608:function(e,t,n){"use strict";n.d(t,{P3:function(){return i},jk:function(){return a}});var r,o=n(4659),i=["en-GB","fr-CA"],a=(r=i,function(e,t){return(0,o.uN)(t,o.M4.stripe_js_beta_locales)||-1===r.indexOf(e)?e:"auto"})},4071:function(e,t,n){"use strict";n.d(t,{Ah:function(){return h},Bh:function(){return m},D$:function(){return P},D1:function(){return b},G9:function(){return k},Gx:function(){return M},JC:function(){return N},JW:function(){return f},NK:function(){return T},P0:function(){return d},PB:function(){return C},Wt:function(){return E},ZR:function(){return I},cE:function(){return A},fL:function(){return R},j3:function(){return S},q$:function(){return y},s$:function(){return g},sV:function(){return v},tS:function(){return _},x5:function(){return j},xz:function(){return w}});var r=function(e){return/Edge\//i.test(e)},o=function(e){return/Edg\//i.test(e)},i=function(e){return/(MSIE ([0-9]{1,}[.0-9]{0,})|Trident\/)/i.test(e)},a=function(e){return/SamsungBrowser/.test(e)},c=function(e){return/iPad|iPhone/i.test(e)&&!i(e)},s=function(e){return/Opera Mini/i.test(e)},u=function(e){return/^((?!chrome|android).)*safari/i.test(e)&&!a(e)},l=function(e){return/Android/i.test(e)&&!i(e)},p=window.navigator.userAgent,d=(window.navigator.platform,r(p)),m=o(p),f=(/Edge\/((1[0-6]\.)|0\.)/i.test(p),i(p)),_=function(e){return/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(e)}(p),h=c(p),y=(function(e){/iPad/i.test(e)&&i(e)}(p),function(e){return c(e)||l(e)}(p)),v=l(p),g=(function(e){/Android 4\./i.test(e)&&!/Chrome/i.test(e)&&l(e)}(p),u(p)),b=(function(e){u(e)&&c(e)}(p),function(e){return/Firefox\//i.test(e)}(p)),w=(function(e){/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(e)}(p),a(p)),k=function(e){return/Chrome\//i.test(e)}(p),E=(function(e){/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(e)}(p),function(e){/Chrome\/(7[4-9]|[8-9]\d+|[1-9]\d{2,})/i.test(e)}(p),function(e){return/AppleWebKit/i.test(e)&&!/Chrome/i.test(e)&&!r(e)&&!i(e)}(p)),S=function(e){return/Chrome/i.test(e)&&!r(e)}(p),C=(function(e){/CriOS/i.test(e)}(p),function(e){/FxiOS/i.test(e)}(p),function(e){return/EdgiOS/i.test(e)}(p)),P=function(e){return/\belectron\b/i.test(e)}(p),A=s(p),I=function(e){return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}(p),N=function(e){return/Safari Line/i.test(e)}(p),T=function(e){return/Pinterest\/iOS/i.test(e)}(p),M=g&&"download"in document.createElement("a"),R=!!window.navigator.brave&&"function"==typeof window.navigator.brave.isBrave,O=window.navigator&&"standalone"in window.navigator&&window.navigator.standalone,j=function(e){return/(iPhone|iPod|iPad).*AppleWebKit((?!.*Safari)|(.*\([^)]*like[^)]*Safari[^)]*\)))/i.test(e)}(p)||function(e){return l(e)&&/wv|Version\/\d+\.\d+/.test(e)&&!s(e)}(p)||function(e){return/FBAN/.test(e)||/FBAV/.test(e)}(p)||O;k&&function(e){/\bWindows\b/i.test(e)||(/\bAndroid\b/i.test(e)||(/\biPhone|iPad\b/i.test(e)||(/\bMac OS\b/i.test(e)||(/\bCrOS\b/i.test(e)||/\bLinux\b/i.test(e)))))}(p)},9294:function(e,t,n){"use strict";n.d(t,{Ah:function(){return r.Ah},Bh:function(){return r.Bh},D$:function(){return r.D$},D1:function(){return r.D1},G9:function(){return r.G9},Gx:function(){return r.Gx},JC:function(){return r.JC},JW:function(){return r.JW},NK:function(){return r.NK},P0:function(){return r.P0},PB:function(){return r.PB},UT:function(){return i.U},Wt:function(){return r.Wt},ZR:function(){return r.ZR},cE:function(){return r.cE},fL:function(){return r.fL},gG:function(){return o.g},j3:function(){return r.j3},q$:function(){return r.q$},s$:function(){return r.s$},sV:function(){return r.sV},tS:function(){return r.tS},x5:function(){return r.x5},xz:function(){return r.xz}});var r=n(4071),o=n(9949),i=n(5395)},5395:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});var r=function(){return(window.navigator.languages||[])[0]||window.navigator.userLanguage||window.navigator.language||""}},9949:function(e,t,n){"use strict";n.d(t,{g:function(){return o}});var r=n(9294),o=function(){return!(r.x5||r.D$||r.ZR||r.fL||r.NK||r.JC||r.PB||r.cE||window.crossOriginIsolated)}},2024:function(e,t,n){"use strict";n.d(t,{CE:function(){return h},G:function(){return i},PM:function(){return w},Q8:function(){return m},TS:function(){return b},VO:function(){return l},Xy:function(){return u},cx:function(){return c},dq:function(){return p},ei:function(){return _},l2:function(){return f},qk:function(){return d},sE:function(){return a}});var r=n(9043),o=n(6589),i=function(e,t){for(var n=-1,r=null==e?0:e.length;++n0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",a=i(n);if("string"==typeof e&&/^[0-9.]+px$/.test(e)){var c=parseFloat(e.toString().replace(/[^0-9.]/g,""));return"".concat(c+a,"px")}var s,u=parseFloat(e.toString().replace(/[^0-9.]/g,"")),l=parseFloat(o.replace(/[^0-9.]/g,"")),p=parseFloat(t.toString().replace(/[^0-9.]/g,""));if("string"==typeof t&&/^(\d+|\d*\.\d+)px$/.test(t))s=p;else if("string"==typeof t&&/^(\d+|\d*\.\d+)em$/.test(t))s=p*l;else if("string"==typeof t&&/^(\d+|\d*\.\d+)%$/.test(t))s=p/100*l;else{if("string"!=typeof t||!/^[\d.]+$/.test(t)&&!/^\d*\.(px|em|%)$/.test(t))return"100%";s=l}var d=u*s+a,m="".concat(d,"px");return/^[0-9.]+px$/.test(m)?m:"100%"}},133:function(e,t,n){"use strict";n.d(t,{W3:function(){return u},dh:function(){return c},gl:function(){return s}});var r=n(4245),o=n(2024),i=n(8357),a=function(){return Array.prototype.slice.call(document.querySelectorAll("a[href], area[href], input:not([disabled]),\n select:not([disabled]), textarea:not([disabled]), button:not([disabled]),\n object, embed, *[tabindex], *[contenteditable]")).filter((function(e){var t=e.getAttribute("tabindex"),n=!t||parseInt(t,10)>=0,r=e.getBoundingClientRect(),o=(0,i.D)(e),a=r.width>0&&r.height>0&&o&&"hidden"!==o.getPropertyValue("visibility");return n&&a}))},c=function(e,t){var n=a();return n[(0,o.cx)(n,(function(t){return t===e||e.contains(t)}))+("previous"===t?-1:1)]},s=function(e,t){return e.then((function(){return(0,o.qk)(t,(function(e){var t=e.element,n=e.tabIndex;""===n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",n)}))}))},u=function(e){var t=[],n=(0,o.qk)(document.querySelectorAll("*"),(function(n){var r=n.getAttribute("tabindex")||"";e!==n&&(n.tabIndex=-1),t.push({element:n,tabIndex:r})})),i=(0,r.$M)((function(){s(n,t)}));return{lockedPromise:n,lockedElements:t,restoreFocus:i}}},7855:function(e,t,n){"use strict";n(6617),n(3534)},8357:function(e,t,n){"use strict";n.d(t,{D:function(){return r}});var r=function(e,t){return e?window.getComputedStyle(e,t):null}},3534:function(e,t,n){"use strict";n.d(t,{Hb:function(){return l},Ql:function(){return d},SV:function(){return u},Xq:function(){return p},d3:function(){return h},mb:function(){return a},qW:function(){return _},yq:function(){return c}});var r=n(7904),o=n(8812),i=n(4245),a=function(e,t){var n={},o={};e.className.split(/\s+/).forEach((function(e){e&&(n[e]=!0)})),t.forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],a=t[1];i.split(/\s+/).forEach((function(e){e&&(o[e]=o[e]||a,n[e]=o[e])}))})),e.className=Object.keys(n).filter((function(e){return n[e]})).join(" ")},c=function(e,t){e.style.cssText=Object.keys(t).map((function(e){return"".concat(e,": ").concat(t[e]," !important;")})).join(" ")},s={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block",visibility:"hidden",position:"fixed",height:"1px","pointer-events":"none","user-select":"none"},u=function(e){c(e,s)},l=function(e){try{return window.parent.frames[e]}catch(e){return null}},p=function(){if(!document.body)throw new o.No("Stripe.js requires that your page has a element.");return document.body},d=function(e){return setTimeout(e,16)},m=function(e,t){return!!e.documentElement&&e.documentElement.contains(t)},f="isConnected"in window.Node.prototype?function(e,t){return t.isConnected&&t.ownerDocument===e}:m,_=function(e,t){return!m(e,t)&&f(e,t)},h=function(e,t){if(window.IntersectionObserver)if(0===e.clientHeight){var n=(0,i.$M)(t);if(window.ResizeObserver){var r=new ResizeObserver((function(t){t.forEach((function(t){0!==t.contentRect.height&&(r.unobserve(e),n())}))}));r.observe(e)}else{var o=new IntersectionObserver((function(t){t.forEach((function(t){t.intersectionRatio>0&&(o.unobserve(e),n())}))}),{root:document.documentElement});o.observe(e)}}else t()}},1002:function(e,t,n){"use strict";n.d(t,{BO:function(){return u.BO},Dx:function(){return i.D},Hb:function(){return a.Hb},MV:function(){return s.M},Ql:function(){return a.Ql},SV:function(){return a.SV},Tf:function(){return r.Tf},W3:function(){return o.W3},Xq:function(){return a.Xq},a0:function(){return c.a},d3:function(){return a.d3},dh:function(){return o.dh},gl:function(){return o.gl},mb:function(){return a.mb},qW:function(){return a.qW},w3:function(){return l.x},xc:function(){return u.xc},xz:function(){return u.xz},yq:function(){return a.yq}});var r=n(9608),o=n(133),i=(n(7855),n(8357)),a=n(3534),c=n(877),s=n(3765),u=n(5784),l=n(2723);n(4544)},877:function(e,t,n){"use strict";n.d(t,{a:function(){return o}});var r=["button","checkbox","file","hidden","image","submit","radio","reset"],o=function(e){var t=e.tagName;if(e.isContentEditable||"TEXTAREA"===t)return!0;if("INPUT"!==t)return!1;var n=e.getAttribute("type");return-1===r.indexOf(n)}},4544:function(){"use strict"},3765:function(e,t,n){"use strict";n.d(t,{M:function(){return i}});var r=n(4245),o=n(3534),i=function(){var e=(0,o.Xq)(),t=e.style.overflow;e.style.overflow="hidden";var n={passive:!1},i=function(e){return e.preventDefault()},a=function(){};return window.addEventListener("touchmove",a,n),e.addEventListener("touchstart",a,n),e.addEventListener("touchmove",i,n),(0,r.$M)((function(){e.style.overflow=t||"",window.removeEventListener("touchmove",a,n),e.removeEventListener("touchstart",a,n),e.removeEventListener("touchmove",i,n)}))}},5784:function(e,t,n){"use strict";n.d(t,{BO:function(){return i},xc:function(){return a},xz:function(){return r}});var r=function(){var e=document.querySelectorAll("meta[name=viewport][content]"),t=e[e.length-1];return t&&t instanceof HTMLMetaElement?t.content:""},o=function(e){return r().match(e)},i=function(e){o("width=device-width")||e('Elements requires "width=device-width" be set in your page\'s viewport meta tag.\n For more information: https://stripe.com/docs/js/appendix/viewport_meta_requirements')},a=function(e){o("minimum-scale=1")||e('The Financial Connections authentication flow requires "minimum-scale=1" to be set in your page\'s viewport meta tag.')}},2723:function(e,t,n){"use strict";n.d(t,{x:function(){return o}});var r=n(6589),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requiredStableFrames,o=void 0===n?3:n,a=t.timeout,c=void 0===a?5e3:a,s=t.isStable,u=void 0===s?i:s;return new r.J((function(t){var n=setTimeout(t,c),r=0,i=e.getBoundingClientRect();!function a(){requestAnimationFrame((function(){var c=e.getBoundingClientRect();u(i,c)?r++:r=0,r===o?(clearTimeout(n),t(e)):(i=c,a())}))}()}))},i=function(e,t){return e.height===t.height&&e.width===t.width}},4086:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(7853),o=n(1020),i=n(8992),a=function(e){function t(e,o){var i;return(0,r.Z)(this,t),(i=n.call(this)).name="FetchError",i.type="fetch_error",i.message="Error fetching ".concat(o),i.requestUrl=o,"string"==typeof e?i.message+=": ".concat(e):(i.originalError=e,i.message+=": ".concat(e.message)),i}(0,o.Z)(t,e);var n=(0,i.Z)(t);return t}((0,n(4909).Z)(Error))},3973:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var r=n(7853),o=n(6148),i=n(1020),a=n(8992),c=function(e){function t(e){var i;return(0,r.Z)(this,t),i=n.call(this,e),window.__stripeElementsController&&window.__stripeElementsController.reportIntegrationError(e),i.name="IntegrationError",Object.defineProperty((0,o.Z)(i),"message",{value:i.message,enumerable:!0}),i}(0,i.Z)(t,e);var n=(0,a.Z)(t);return t}((0,n(4909).Z)(Error))},8102:function(e,t,n){"use strict";var r=n(7853),o=n(1020),i=n(8992);Error},51:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});var r=n(7853),o=n(1020),i=n(8992),a=function(e){function t(e){var o;return(0,r.Z)(this,t),(o=n.call(this,e)).name="NetworkError",o.type="network_error",o.requestUrl=e,o}(0,o.Z)(t,e);var n=(0,i.Z)(t);return t}((0,n(4909).Z)(Error))},8812:function(e,t,n){"use strict";n.d(t,{F7:function(){return i.F},No:function(){return o.N},kp:function(){return r.k}});var r=n(4086),o=n(3973),i=(n(8102),n(51))},9439:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(8489),o=n(6617),i=n(6589),a=n(8812),c=function(e){var t=e.data,n=e.contentType,r=void 0===n?"application/x-www-form-urlencoded":n,i=e.method,a=e.url,c="";return t&&"application/x-www-form-urlencoded"===r?c=(0,o.qC)(t):t&&"application/json"===r&&(c=JSON.stringify(t)),{requestUrl:"GET"===i&&c?"".concat(a,"?").concat(c):a,requestData:"GET"===i?"":c,contentType:r}},s=function(e){return new i.J((function(t,n){var o=e.method,s=e.headers,u=e.withCredentials,p=c(e),d=p.requestUrl,m=p.requestData,f=p.contentType,_=new XMLHttpRequest;u&&(_.withCredentials=u),_.open(o,d,!0),_.setRequestHeader("Accept","application/json"),_.setRequestHeader("Content-Type",f),_.json=function(){return new i.J((function(e,t){try{e(JSON.parse(_.responseText))}catch(e){t(new a.kp(e,d))}}))},s&&Object.keys(s).forEach((function(e){var t=s[e];"string"==typeof t&&_.setRequestHeader(e,t)})),_.onreadystatechange=function(){4===_.readyState&&(_.onreadystatechange=function(){},0===_.status?u?n(new a.F7(d)):l((0,r.Z)((0,r.Z)({},e),{},{withCredentials:!0})).then(t,n):t(_))};try{_.send(m)}catch(e){n(new a.kp(e,d))}}))},u=function e(t){return new i.J((function(n,o){var s=t.method,u=t.headers,l=void 0===u?{}:u,p=t.keepalive,d=t.withCredentials,m=t.priority,f=void 0===m?"auto":m,_=c(t),h=_.requestUrl,y=_.requestData,v={Accept:"application/json","Content-Type":_.contentType};l&&Object.keys(l).forEach((function(e){var t=l[e];"string"==typeof t&&(v[e]=t)})),window.fetch(h,{method:s,keepalive:p,headers:v,body:y||void 0,mode:"cors",credentials:d?"include":"omit",priority:f}).then((function(c){if(0===c.status){if(!d)return e((0,r.Z)((0,r.Z)({},t),{},{withCredentials:!0})).then(n,o);o(new a.F7(h))}return c.text().then((function(e){n({responseURL:c.url,status:c.status,json:function(){return i.J.resolve(JSON.parse(e))},getResponseHeader:function(e){return c.headers.get(e)||""},responseText:e})}))})).catch((function(e){o(new a.kp(e,h))}))}))},l=function(e){return"function"==typeof window.fetch?u(e):s(e)}},2445:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r={CARD_ELEMENT:"CARD_ELEMENT",CONTROLLER:"CONTROLLER",METRICS_CONTROLLER:"METRICS_CONTROLLER",PAYMENT_REQUEST_ELEMENT:"PAYMENT_REQUEST_ELEMENT",PAYMENT_REQUEST_BROWSER:"PAYMENT_REQUEST_BROWSER",PAYMENT_REQUEST_GOOGLE_PAY:"PAYMENT_REQUEST_GOOGLE_PAY",IBAN_ELEMENT:"IBAN_ELEMENT",IDEAL_BANK_ELEMENT:"IDEAL_BANK_ELEMENT",P24_BANK_ELEMENT:"P24_BANK_ELEMENT",AUTHORIZE_WITH_URL:"AUTHORIZE_WITH_URL",STRIPE_3DS2_CHALLENGE:"STRIPE_3DS2_CHALLENGE",STRIPE_3DS2_FINGERPRINT:"STRIPE_3DS2_FINGERPRINT",AU_BANK_ACCOUNT_ELEMENT:"AU_BANK_ACCOUNT_ELEMENT",FPX_BANK_ELEMENT:"FPX_BANK_ELEMENT",LIGHTBOX_APP:"LIGHTBOX_APP",ISSUING_CARD_NUMBER_DISPLAY_ELEMENT:"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT",ISSUING_CARD_COPY_BUTTON_ELEMENT:"ISSUING_CARD_COPY_BUTTON_ELEMENT",ISSUING_CARD_CVC_DISPLAY_ELEMENT:"ISSUING_CARD_CVC_DISPLAY_ELEMENT",ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT:"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT",ISSUING_CARD_PIN_DISPLAY_ELEMENT:"ISSUING_CARD_PIN_DISPLAY_ELEMENT",EPS_BANK_ELEMENT:"EPS_BANK_ELEMENT",HCAPTCHA_APP:"HCAPTCHA_APP",NETBANKING_BANK_ELEMENT:"NETBANKING_BANK_ELEMENT",AFFIRM_MESSAGE_ELEMENT:"AFFIRM_MESSAGE_ELEMENT",AFFIRM_MESSAGE_MODAL_ELEMENT:"AFFIRM_MESSAGE_MODAL_ELEMENT",AFTERPAY_MESSAGE_MODAL_ELEMENT:"AFTERPAY_MESSAGE_MODAL_ELEMENT",PAYMENT_METHOD_MESSAGING_LEGACY_MODAL_ELEMENT:"PAYMENT_METHOD_MESSAGING_LEGACY_MODAL_ELEMENT",PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT:"PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT",AUTOCOMPLETE_SUGGESTIONS_ELEMENT:"AUTOCOMPLETE_SUGGESTIONS_ELEMENT",ACH_BANK_SEARCH_RESULTS_ELEMENT:"ACH_BANK_SEARCH_RESULTS_ELEMENT",INSTANT_DEBITS_APP:"INSTANT_DEBITS_APP",LINK_AUTHENTICATION_ELEMENT:"LINK_AUTHENTICATION_ELEMENT",PAYMENT_ELEMENT:"PAYMENT_ELEMENT",LINKED_ACCOUNTS_INNER:"LINKED_ACCOUNTS_INNER",WECHAT_PAY_INNER:"WECHAT_PAY_INNER",PAYNOW_INNER:"PAYNOW_INNER",BLIK_INNER:"BLIK_INNER",PIX_INNER:"PIX_INNER",PROMPTPAY_INNER:"PROMPTPAY_INNER",ADDRESS_ELEMENT:"ADDRESS_ELEMENT",LINK_AUTOFILL_MODAL:"LINK_AUTOFILL_MODAL",LINK_INFO_MODAL:"LINK_INFO_MODAL",GOOGLE_MAPS_APP:"GOOGLE_MAPS_APP",LOADER_UI_APP:"LOADER_UI_APP",CART_ELEMENT:"CART_ELEMENT",BACS_MANDATE_CONFIRMATION_APP:"BACS_MANDATE_CONFIRMATION_APP",BACS_CONFIRMATION_INNER:"BACS_CONFIRMATION_INNER",META_PAY_INNER:"META_PAY_INNER",EXPRESS_CHECKOUT_ELEMENT:"EXPRESS_CHECKOUT_ELEMENT",BUY_BUTTON_APP:"BUY_BUTTON_APP",LINK_BUTTON_FOR_CARD_ELEMENT:"LINK_BUTTON_FOR_CARD_ELEMENT",PAYMENT_METHOD_MESSAGING_ELEMENT:"PAYMENT_METHOD_MESSAGING_ELEMENT"}},262:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r=n(9294),o=n(97),i=function(e){var t={frameborder:"0",allowTransparency:"true",scrolling:"no",role:"presentation"},n=!r.D1;if(n&&(t.allow="payment *"),"STRIPE_3DS2_CHALLENGE"===e){var i="publickey-credentials-get ".concat((0,o.x)());t.allow=n?"payment *; ".concat(i):i}if("PAYMENT_REQUEST_GOOGLE_PAY"===e){t.sandbox=["allow-scripts","allow-forms","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin"].join(" "),t.referrerpolicy="origin"}return t}},4044:function(e,t,n){"use strict";n.d(t,{D:function(){return i}});var r=n(1873),o=n(97),i=function(e){switch(e){case"CARD_ELEMENT":return(0,o.x)("elements-inner-card-e13c22424784c133ecaf081c49247ff4.html");case"CONTROLLER":return(0,o.x)("controller-595895b9badd881c0a1aa12e1c1a823b.html");case"METRICS_CONTROLLER":return(0,o.x)("m-outer-93afeeb17bc37e711759584dbfc50d47.html");case"PAYMENT_REQUEST_ELEMENT":return(0,o.x)("elements-inner-payment-request-5ed1a4cabea10b4a3e2ea468d2ea39df.html");case"PAYMENT_REQUEST_BROWSER":return(0,o.x)("payment-request-inner-browser-ff078f662f20947c6a24a53ff7640fba.html");case"PAYMENT_REQUEST_GOOGLE_PAY":return(0,o.x)("payment-request-inner-google-pay-af38f455184a2c7affd797a0acda3899.html");case"IBAN_ELEMENT":return(0,o.x)("elements-inner-iban-f6e3c11d6ce696380828c5ed1603a4a6.html");case"IDEAL_BANK_ELEMENT":return(0,o.x)("elements-inner-ideal-bank-2a3ab69bebc8ab41b7b341248ac6bb71.html");case"P24_BANK_ELEMENT":return(0,o.x)("elements-inner-p24-bank-bc457dcbd782eb4ec4453f7f55c07538.html");case"AUTHORIZE_WITH_URL":return(0,o.x)("authorize-with-url-inner-23bb866df37067e8a892f3dac8450a4a.html");case"STRIPE_3DS2_CHALLENGE":return(0,o.x)("three-ds-2-challenge-a17238bc9e1c42c3c969d985f52e783a.html");case"STRIPE_3DS2_FINGERPRINT":return(0,o.x)("three-ds-2-fingerprint-058cc8dd029e198f0b2b5827b517f9e1.html");case"AU_BANK_ACCOUNT_ELEMENT":return(0,o.x)("elements-inner-au-bank-account-786aaae84188598b93fc5f501a95a385.html");case"FPX_BANK_ELEMENT":return(0,o.x)("elements-inner-fpx-bank-4944a21f55e442d76eae0adad5f0cda8.html");case"LIGHTBOX_APP":return(0,o.x)("lightbox-inner-18403b31e72d923d1b1e0cc1daab1dba.html");case"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-number-display-5954d27443ff18d88a9e16a2f8d2833e.html");case"ISSUING_CARD_COPY_BUTTON_ELEMENT":return(0,o.x)("elements-inner-issuing-card-copy-button-c99d97228a639a1ec9884d27ea7422f6.html");case"ISSUING_CARD_CVC_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-cvc-display-b85f9c6cba072ddfcf8615e9880d170e.html");case"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-expiry-display-844666d3ec2a7d0c181bcdbce5049397.html");case"ISSUING_CARD_PIN_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-pin-display-01e59a5990db007611c6c30a580ed28e.html");case"EPS_BANK_ELEMENT":return(0,o.x)("elements-inner-eps-bank-f4f322021187a591e1091a3dd0695a37.html");case"HCAPTCHA_APP":return(0,o.x)("hcaptcha-inner-59650d45fa4f335e96fb9a8069b192db.html");case"NETBANKING_BANK_ELEMENT":return(0,o.x)("elements-inner-netbanking-bank-af9df5908f0564726c9330c081452e98.html");case"AFFIRM_MESSAGE_ELEMENT":return(0,o.x)("elements-inner-affirm-message-128e81fdc7b6a71bcb4f3f1ade5b1c34.html");case"AFFIRM_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-affirm-message-modal-4ebe4348366d4f71f127d6e54a37ba1a.html");case"AFTERPAY_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-afterpay-message-modal-571998d8abd637ee0246653669fa2f22.html");case"PAYMENT_METHOD_MESSAGING_LEGACY_MODAL_ELEMENT":return(0,o.x)("elements-inner-payment-method-messaging-legacy-modal-9dee99192d3132809e23fa3e07bd68e4.html");case"PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT":return(0,o.x)("elements-inner-payment-method-messaging-modal-c45469bdad84a9a604694a34b9ae6a23.html");case"META_PAY_INNER":return(0,o.x)("meta-pay-inner-8fd6583ac91f30577b3e220f145b1cc3.html");case"INSTANT_DEBITS_APP":return(0,o.x)("instant-debits-app-a90a5cfe41e15bcb358873b26e15d91e.html");case"LINK_AUTHENTICATION_ELEMENT":return(0,o.x)("elements-inner-authentication-049932e5dd4f7fb7d147b79012ffe752.html");case"PAYMENT_ELEMENT":return(0,o.x)("elements-inner-payment-17df81d8bf130ff67232e74837e58317.html");case"LINKED_ACCOUNTS_INNER":return(0,o.x)("linked-accounts-inner-d2d098bb5f5c159b0d1ead3d38b0860c.html");case"WECHAT_PAY_INNER":case"PAYNOW_INNER":case"PIX_INNER":case"PROMPTPAY_INNER":case"BACS_CONFIRMATION_INNER":return(0,o.x)("");case"BLIK_INNER":return(0,o.x)("blik-inner-ea0214e556666ca0c772dcc652eb549b.html");case"ADDRESS_ELEMENT":return(0,o.x)("elements-inner-address-84b9fc8ff7b59b05b8519d26e72f13af.html");case"LINK_AUTOFILL_MODAL":return(0,o.x)("link-autofill-modal-inner-4cb44a653021c1c04b5f1c69863da3a1.html");case"GOOGLE_MAPS_APP":return(0,o.x)("google-maps-inner-ceaa35c6c1b03a9a0172da0ea93b16b9.html");case"AUTOCOMPLETE_SUGGESTIONS_ELEMENT":return(0,o.x)("elements-inner-autocomplete-suggestions-26e9600c19d946c6554c14809308a0c8.html");case"ACH_BANK_SEARCH_RESULTS_ELEMENT":return(0,o.x)("elements-inner-ach-bank-search-results-45599ae53048934392e8008d0a06f123.html");case"LINK_INFO_MODAL":return(0,o.x)("elements-inner-link-info-modal-02d2acd014ed2266f802ff67b1c50c59.html");case"LOADER_UI_APP":return(0,o.x)("elements-inner-loader-ui-3a3b355a214916472350c08e384f3c5c.html");case"CART_ELEMENT":return(0,o.x)("elements-inner-cart-31116b0fa2777c9bc18cc2fffd1fe101.html");case"BACS_MANDATE_CONFIRMATION_APP":return(0,o.x)("bacs-mandate-confirmation-inner-840aec2f665c6fa3c491b98392024313.html");case"EXPRESS_CHECKOUT_ELEMENT":return(0,o.x)("elements-inner-express-checkout-d519070f48ffd87d9076eccdd1232664.html");case"BUY_BUTTON_APP":return(0,o.x)("buy-button-app.html");case"LINK_BUTTON_FOR_CARD_ELEMENT":return(0,o.x)("elements-inner-link-button-for-card-7bc49654e74cdad32f208a7195d82eda.html");case"PAYMENT_METHOD_MESSAGING_ELEMENT":return(0,o.x)("elements-inner-payment-method-messaging-c53e39145f327bb39bf13efbf5df9334.html");default:return(0,r.Rz)(e)}}},97:function(e,t,n){"use strict";n.d(t,{x:function(){return r}});var r=function(e){return"".concat("https://js.stripe.com/v3/").concat(e||"")}},755:function(e,t,n){"use strict";n.d(t,{$G:function(){return a.$},NC:function(){return o.N},i7:function(){return r.i},jr:function(){return c.j},oi:function(){return a.o},xS:function(){return i.x}});var r=n(262),o=n(2445),i=n(97),a=n(5311),c=n(6810)},5311:function(e,t,n){"use strict";n.d(t,{$:function(){return c},o:function(){return a}});var r=n(8489),o=(n(1873),n(276)),i=n(1002),a=function(e){var t,n=e.controllerId,a=e.frameId,c=e.targetOrigin,s=e.type,u=c;if("controller"===s?t=(0,i.Hb)(a):"group"===s?t=(0,i.Hb)(n):"outer"===s||"hosted"===s?t=window.frames[a]:"inner"===s&&(u=u||"*",t=window.parent),u=u||o.jQ,t&&"function"==typeof t.postMessage){var l=e.message.delegate?{targetOrigin:u,delegate:e.message.delegate}:u;t.postMessage(JSON.stringify((0,r.Z)((0,r.Z)({},e),{},{__stripeJsV3:!0})),l)}},c=function(e){try{var t="string"==typeof e?JSON.parse(e):e;return t.__stripeJsV3?t:null}catch(e){return null}}},6810:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});n(276);var r=function(e){return e}},3048:function(e,t,n){"use strict";n(9294),n(4245)},8148:function(e,t,n){"use strict";n.d(t,{i3:function(){return r},pM:function(){return o}});var r=function(e){return e.replace(/_./g,(function(e){return e[1].toUpperCase()}))},o=function(e){var t=e.trim().toLowerCase();return t?"".concat(t[0].toUpperCase()).concat(t.substring(1).replace(/ +./g,(function(e){return" ".concat(e.slice(-1).toUpperCase())}))):""}},9617:function(e,t,n){"use strict";n.d(t,{$M:function(){return a},AO:function(){return i},HP:function(){return o}});var r=n(8812),o=(n(6589),function(e){var t={},n={};return function(r){var o="_".concat(r);if("string"==typeof r&&void 0!==t[o])return t[o];if("number"==typeof r&&void 0!==n[o])return n[o];var i=e(r);return"string"==typeof r&&(t[o]=i),"number"==typeof r&&(n[o]=i),i}}),i=function(e,t){var n=!1;return function(){if(n)throw new r.No(t);n=!0;try{return e.apply(void 0,arguments).then((function(e){return n=!1,e}),(function(e){throw n=!1,e}))}catch(e){throw n=!1,e}}},a=function(e){var t=e;return function(){t&&(t.apply(void 0,arguments),t=null)}}},6940:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var r=n(6589),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new r.J((function(t){return setTimeout(t,e)}))}},4245:function(e,t,n){"use strict";n.d(t,{$M:function(){return r.$M},AO:function(){return r.AO},HP:function(){return r.HP},_v:function(){return i._},i3:function(){return a.i3},pM:function(){return a.pM},tN:function(){return o.t}});var r=n(9617),o=(n(807),n(6103)),i=(n(9220),n(6940)),a=n(8148);n(3048)},807:function(e,t,n){"use strict";n(6589)},6103:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(6589),o=function(e,t){return e.reduce((function(e,n){return e.then((function(e){return"SATISFIED"===e.type?e:n().then((function(e){return t(e)?{type:"SATISFIED",value:e}:{type:"UNSATISFIED"}}))}))}),r.J.resolve({type:"UNSATISFIED"}))}},9220:function(e,t,n){"use strict";n(6589)},9803:function(e,t,n){"use strict";n.d(t,{T:function(){return i},V:function(){return a}});var r="00".concat(Math.floor(1e3*Math.random())).slice(-3),o=0,i=function(e){return"".concat(e).concat(r).concat(o++)},a=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"00000000-0000-4000-8000-000000000000".replace(/[08]/g,e)}},7412:function(e,t,n){"use strict";n.d(t,{To:function(){return r.T},Vj:function(){return r.V}});var r=n(9803)},9620:function(e,t,n){"use strict";n.d(t,{Kl:function(){return r.Kl},Tj:function(){return o.T},lO:function(){return r.lO},pF:function(){return r.pF}});var r=n(1834),o=n(7049)},1834:function(e,t,n){"use strict";n.d(t,{Kl:function(){return o},lO:function(){return i},pF:function(){return a}});var r=n(8812),o={live:"live",test:"test",unknown:"unknown"},i=function(e){return e?/^pk_test_/.test(e)?o.test:/^pk_live_/.test(e)?o.live:o.unknown:o.unknown},a=function(e){if(e===o.unknown)throw new r.No("It looks like you're using an older Stripe key. In order to use this API, you'll need to use a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys")}},7049:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var r=n(8812),o="publishable",i="secret",a="ephemeral",c="restricted",s="unknown",u=function(e){switch(e.split("_",1)[0]){case"pk":return o;case"sk":return i;case"ek":return a;case"rk":return c;default:return s}},l=function(e){if(""===e)throw new r.No("Please call Stripe() with your publishable key. You used an empty string.");switch(u(e)){case i:throw new r.No("You should not use your secret key with Stripe.js.\n Please pass a publishable key instead.");case a:throw new r.No("You should not use an ephemeral key with Stripe.js.\n Please pass a publishable key instead.");case c:throw new r.No("You should not use a restricted key with Stripe.js.\n Please pass a publishable key instead.")}}},3840:function(e,t,n){"use strict";n.d(t,{GS:function(){return r.GS},ZX:function(){return r.ZX},_b:function(){return r._b},ke:function(){return r.ke}});var r=n(4123)},4123:function(e,t,n){"use strict";n.d(t,{GS:function(){return a},ZX:function(){return u},_b:function(){return c},ke:function(){return s}});var r,o=n(6222),i=n(276),a={alipay:"alipay",affirm:"affirm",afterpay_clearpay:"afterpay_clearpay",au_becs_debit:"au_becs_debit",acss_debit:"acss_debit",bacs_debit:"bacs_debit",bancontact:"bancontact",blik:"blik",boleto:"boleto",card:"card",cashapp:"cashapp",customer_balance:"customer_balance",eps:"eps",fpx:"fpx",giropay:"giropay",grabpay:"grabpay",ideal:"ideal",klarna:"klarna",konbini:"konbini",mobilepay:"mobilepay",nz_bank_account:"nz_bank_account",oxxo:"oxxo",p24:"p24",pay_by_bank:"pay_by_bank",paypal:"paypal",sepa_debit:"sepa_debit",sofort:"sofort",three_d_secure:"three_d_secure",upi:"upi",us_bank_account:"us_bank_account",wechat_pay:"wechat_pay",paynow:"paynow",pix:"pix",promptpay:"promptpay",revolut_pay:"revolut_pay",netbanking:"netbanking",id_bank_transfer:"id_bank_transfer",link:"link",apple_pay:"apple_pay",google_pay:"google_pay",meta_pay:"meta_pay",zip:"zip"},c=(r={},(0,o.Z)(r,i.Yj.auBankAccount,a.au_becs_debit),(0,o.Z)(r,i.Yj.card,a.card),(0,o.Z)(r,i.Yj.cardNumber,a.card),(0,o.Z)(r,i.Yj.cardExpiry,a.card),(0,o.Z)(r,i.Yj.cardCvc,a.card),(0,o.Z)(r,i.Yj.postalCode,a.card),(0,o.Z)(r,i.Yj.iban,a.sepa_debit),(0,o.Z)(r,i.Yj.idealBank,a.ideal),(0,o.Z)(r,i.Yj.fpxBank,a.fpx),(0,o.Z)(r,i.Yj.p24Bank,a.p24),(0,o.Z)(r,i.Yj.netbankingBank,a.netbanking),(0,o.Z)(r,i.Yj.epsBank,a.eps),r),s=function(e){return-1===i.sL.indexOf(e)},u=function(e,t){return null!=t?t:s(e)?null:c[e]||null}},6589:function(e,t,n){"use strict";n.d(t,{J:function(){return r.J}});var r=n(7802)},7802:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(1803),o=n.n(r),i=(n(8029),window.Promise?Promise:o())},3110:function(e){e.exports=function(e){var t=e.split("").map((function(e){return e.charCodeAt(0)})).reduce((function(e,t){return(e<<5)-e+t&(e<<5)-e+t}),0).toString();return"_".concat(t.replace(/[-.]/g,"_"))}},3423:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var r="7a884f0061"},9792:function(e,t,n){"use strict";n.d(t,{E:function(){return s}});var r=n(7853),o=n(4531),i=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()},a=i(),c=window.performance&&window.performance.now?function(){return window.performance.now()}:function(){return i()-a},s=function(){function e(t){(0,r.Z)(this,e),this.timestampValue=null!=t?t:c()}return(0,o.Z)(e,[{key:"getAsPosixTime",value:function(){return i()-this.getElapsedTime()}},{key:"getElapsedTime",value:function(e){return Math.round((e?e.timestampValue:c())-this.timestampValue)}},{key:"valueOf",value:function(){return Math.round(this.timestampValue)}}],[{key:"fromPosixTime",value:function(t){return new e(t-i()+c())}}]),e}()},1216:function(e,t,n){"use strict";var r=(0,n(6617).Ds)("https://payments.stripe.com");r&&r.origin},7600:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o=function(e){var t={};return e.replace(/\+/g," ").split("&").forEach((function(e){var n,o=e.split("="),i=decodeURIComponent(o[0]),a=t,c=0,s=i.split("]["),u=s.length-1;if(/\[/.test(s[0])&&/\]$/.test(s[u])?(s[u]=s[u].replace(/\]$/,""),u=(s=s.shift().split("[").concat(s)).length-1):u=0,!(s.indexOf("__proto__")>=0))if(2===o.length)if(n=decodeURIComponent(o[1]),u)for(;c<=u;c++){if(i=""===s[c]?a.length:s[c],!r(a,i)&&a[i])return;a[i]=c1&&void 0!==arguments[1]?arguments[1]:"absurd";throw new Error(e)}},9605:function(e,t,n){"use strict";n.d(t,{IN:function(){return i},MO:function(){return p},oQ:function(){return l},rX:function(){return a}});var r=n(7974),o={_componentName:r.Z_,_implementation:(0,r.mC)({_frame:(0,r.mC)({id:r.Z_})})},i=(0,r.mC)(o),a=function(e){var t=(0,r.ld)(i,e,"");return"error"===t.type?null:t.value},c={clientSecret:(0,r.jt)((0,r.mC)({id:r.Z_,clientSecret:r.Z_,type:r.Z_}))},s=(0,r.mC)(c),u={_elements:(0,r.CT)(i),_id:r.Z_,_commonOptions:s},l=(0,r.mC)(u),p=function(e){var t=(0,r.ld)(l,e,"");return"error"===t.type?null:t.value}},1873:function(e,t,n){"use strict";n.d(t,{$3:function(){return a.$3},AG:function(){return a.AG},Ao:function(){return a.Ao},Bi:function(){return a.Bi},CT:function(){return a.CT},Ec:function(){return a.Ec},Fy:function(){return a.Fy},Gu:function(){return a.Gu},HM:function(){return a.HM},IN:function(){return o.IN},Kr:function(){return a.Kr},M2:function(){return a.M2},M4:function(){return a.M4},MO:function(){return o.MO},MZ:function(){return a.MZ},NM:function(){return a.NM},NQ:function(){return a.NQ},O:function(){return a.O},RH:function(){return a.RH},Rx:function(){return a.Rx},Ry:function(){return a.Ry},Rz:function(){return r.R},Wc:function(){return a.Wc},Xg:function(){return a.Xg},Z_:function(){return a.Z_},cV:function(){return a.cV},ci:function(){return a.ci},gy:function(){return a.gy},hN:function(){return a.hN},ig:function(){return a.ig},jt:function(){return a.jt},kG:function(){return i.k},kw:function(){return a.kw},ld:function(){return a.ld},mC:function(){return a.mC},n2:function(){return a.n2},oQ:function(){return o.oQ},or:function(){return a.or},p3:function(){return a.p3},rS:function(){return a.rS},rX:function(){return o.rX},ui:function(){return a.ui},uw:function(){return a.uw},x4:function(){return a.x4},xe:function(){return a.xe},yv:function(){return a.yv},z$:function(){return a.z$},zS:function(){return a.zS}});var r=n(2580),o=n(9605),i=n(9096),a=n(7974)},9096:function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:[];return{type:"valid",value:e,warnings:t}},f=function(e){return{error:e,errorType:"full",type:"error"}},_=function(e,t,n){var r=new a.No(d(e,t,n));return f(r)},h=function(e,t,n){return{expected:e,actual:String(t),options:n,errorType:"mismatch",type:"error"}},y=function(e,t){return(0,i.Z)((0,i.Z)({},e),{},{path:[].concat((0,o.Z)(e.path),[t])})},v=function(e){return function(t,n){return void 0===t?m(t):e(t,n)}},g=function(e){return function(t,n){return null===t?m(t):e(t,n)}},b=function(e,t){return function(n,r){var o=function(e){var t=e.options.path.join(".")||"value";return{error:"".concat(t," should be ").concat(e.expected),actual:"".concat(t," as ").concat(e.actual)}},i=function(e,t,n){return f(new a.No("Invalid value for ".concat(e,": ").concat(t,". You specified ").concat(n,".")))},c=e(n,r),s=t(n,r);if("error"===c.type&&"error"===s.type){if("mismatch"===c.errorType&&"mismatch"===s.errorType){var u=o(c),l=u.error,p=u.actual,d=o(s),m=d.error,_=d.actual;return i(r.label,l===m?l:"".concat(l," or ").concat(m),p===_?p:"".concat(p," and ").concat(_))}if("mismatch"===c.errorType){var h=o(c),y=h.error,v=h.actual;return i(r.label,y,v)}if("mismatch"===s.errorType){var g=o(s),b=g.error,w=g.actual;return i(r.label,b,w)}return f(c.error)}return"valid"===c.type?c:s}},w=function(e,t){return function(n,r){return n instanceof e?m(n):h("a ".concat(t," instance"),n,r)}},k=function(e,t){return function(n,r){var o=(0,c.sE)(e,(function(e){return e===n}));if(void 0===o){var i=t?"a recognized string.":"one of the following strings: ".concat(e.join(", "));return h(i,n,r)}return m(o)}},E=function(e){return function(t,n){return"string"==typeof t&&0===t.indexOf(e)?m(t):h("a string starting with ".concat(e),t,n)}},S=function(e,t){return function(n,r){return"string"==typeof n&&n.length>=e&&n.length<=t?m(n):h(e===t?"a string of ".concat(e," characters"):"a string with ".concat(e," to ").concat(t," characters"),n,r)}},C=function(){for(var e=arguments.length,t=new Array(e),n=0;n=e&&i<=t?m(i):h("a number from ".concat(e," to ").concat(t),n,r)}},x=function(e){return function(t,n){var r=T(t,n);if("error"===r.type)return r;var o=Number(r.value);return"string"==typeof t&&o>e?m(o):h("a number greater than ".concat(e),t,n)}},L=function(e){return function(t,n){var r=T(t,n);if("error"===r.type)return r;var o=Number(r.value);return"string"==typeof t&&o>=e?m(o):h("a number greater than or equal to ".concat(e),t,n)}},B=function(e,t){return function(n,r){return"number"==typeof n&&n>=e&&n<=t?m(n):h("a number from ".concat(e," to ").concat(t),n,r)}},D=function(e){return function(t,n){return"number"==typeof t&&t>e?m(t):h("a number greater than ".concat(e),t,n)}},q=function(e){return function(t,n){return"number"==typeof t&&t>=e?m(t):h("a number greater than or equal to ".concat(e),t,n)}},F=function(e,t){return function(n,r){return n===e?m(e):h(t||String(e),n,r)}},U=function(e){return function(t,n){return"number"==typeof t&&t===parseInt(t,10)&&(!e||t>=0)?m(t):h(e?"a positive amount in the currency's subunit":"an amount in the currency's subunit",t,n)}},G=function(e,t){return U(!1)(e,t)},H=function(e,t){return U(!0)(e,t)},Y=function(e,t){if(e&&"object"==typeof e){var n=e;if("function"==typeof n.getTime&&n.getTime()>=Date.now()-1e3)return m(n)}return h("a future Date",e,t)},K=function(e,t){return e&&"object"==typeof e?m(e):h("an object",e,t)},z=function(e){return function(t,n){return Array.isArray(t)?t.map((function(t,r){return e(t,y(n,String(r)))})).reduce((function(e,t){return"error"===e.type?e:"error"===t.type?t:m([].concat((0,o.Z)(e.value),[t.value]),[].concat((0,o.Z)(e.warnings),(0,o.Z)(t.warnings)))}),m([])):h("array",t,n)}},J=function(e,t){return function(n,r){var o=z(e)(n,r);return"error"===o.type?o:o.value.length"))})),a.substring(0,1e3)),inPromise:n,apiMethodName:r}),e},Z=function(e,t,n){return function(r){try{return e.call(this,r)}catch(e){return j(e,t||this&&this._controller,!1,n)}}},x=function(e,t,n){return function(r,o){try{return e.call(this,r,o)}catch(e){return j(e,t||this&&this._controller,!1,n)}}},L=function(e,t,n){return function(){var r=this;try{return e.call(this).catch((function(e){return j(e,t||r&&r._controller,!0,n)}))}catch(e){return j(e,t||this&&this._controller,!1,n)}}},B=function(e,t,n){return function(r){var o=this;try{return e.call(this,r).catch((function(e){return j(e,t||o&&o._controller,!0,n)}))}catch(e){return j(e,t||this&&this._controller,!1,n)}}},D=function(e,t,n){return function(r,o){var i=this;try{return e.call(this,r,o).catch((function(e){return j(e,t||i&&i._controller,!0,n)}))}catch(e){return j(e,t||this&&this._controller,!1,n)}}},q=function(e,t,n){return function(r,o,i){var a=this;try{return e.call(this,r,o,i).catch((function(e){return j(e,t||a&&a._controller,!0,n)}))}catch(e){return j(e,t||this&&this._controller,!1,n)}}},F=n(9083),U=function(e,t){var n,r="string"==typeof(n=e)&&(0,A.sE)(Object.keys(F.YA),(function(e){return e===n}))||null;if(!r||!function(e,t){var n=P.MJ[e];return!n||(0,P.uN)(t,n)}(r,t)){var o="string"==typeof e?e:typeof e;throw new I.No("A valid Element name must be provided. Valid Elements are:\n ".concat(Object.keys(F.YA).filter((function(e){return!F.YA[e].beta})).join(", "),"; you passed: ").concat(o,"."))}},G=function e(){var t=this;(0,p.Z)(this,e),this._emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0},this._off=function(e,n){if(n){for(var r,o=t._callbacks[e],i=0;i=0},J=function(){return Object.keys(K)},W="40px",V={invalid_coupon_code:"invalid_coupon_code",expired_coupon_code:"expired_coupon_code",invalid_payer_zip:"invalid_payer_zip"},X=(0,u.Z)({success:"success",fail:"fail",invalid_shipping_address:"invalid_shipping_address"},V),Q=(0,u.Z)({fail:"fail",invalid_payer_name:"invalid_payer_name",invalid_payer_email:"invalid_payer_email",invalid_payer_phone:"invalid_payer_phone",invalid_shipping_address:"invalid_shipping_address"},V),$={shipping:"shipping",delivery:"delivery",pickup:"pickup"},ee=(0,u.Z)({success:"success"},Q),te={merchantCapabilities:["supports3DS"],displayItems:[]},ne=(0,b.mC)({amount:b.MZ,label:b.Z_,pending:(0,b.jt)(b.Xg)}),re=(0,b.mC)({amount:b.Bi,label:b.Z_,pending:(0,b.jt)(b.Xg)}),oe=(0,b.mC)({amount:b.Bi,label:b.Z_,pending:(0,b.jt)(b.Xg),id:(0,b.Wc)(b.Z_,(function(){return(0,w.To)("shippingOption")})),detail:(0,b.Wc)(b.Z_,(function(){return""}))}),ie=(0,b.mC)({major:b.Rx,minor:b.Rx}),ae=b.kw.apply(void 0,(0,l.Z)(Object.keys($))),ce=(0,b.mC)({origin:b.Z_,name:b.Z_}),se=(0,b.ci)({__merchantDetails:(0,b.jt)(ce),__supportsCouponCode:(0,b.jt)(b.Xg),__couponCode:(0,b.jt)(b.Z_),country:(0,b.jt)(b.hN),currency:(0,b.jt)(b.cV),displayItems:(0,b.jt)((0,b.CT)(re)),shippingOptions:(0,b.jt)((0,b.uw)("id")((0,b.CT)(oe))),total:(0,b.jt)(ne),blockedCardBrands:(0,b.jt)((0,b.CT)(b.kw.apply(void 0,(0,l.Z)(T.iw))))}),ue=Object.keys(V),le=(0,b.mC)({displayItems:(0,b.jt)((0,b.CT)(re)),shippingOptions:(0,b.jt)((0,b.uw)("id")((0,b.CT)(oe))),total:(0,b.jt)(ne),status:function(e,t){if(-1!==ue.indexOf(e))return b.kw.apply(void 0,(0,l.Z)(ue))(e,t);var n=Object.keys(X).filter((function(e){return-1===ue.indexOf(e)}));return b.kw.apply(void 0,(0,l.Z)(n))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t)},errorMessage:(0,b.jt)(b.Z_)}),pe=function(e,t){if(-1!==ue.indexOf(e))return b.kw.apply(void 0,(0,l.Z)(ue))(e,t);var n=Object.keys(ee).filter((function(e){return-1===ue.indexOf(e)}));return b.kw.apply(void 0,(0,l.Z)(n))(e,t)},de=function(e){var t=[];return window.ApplePaySession?(z(e,K.applePay)&&t.push("APPLE_PAY"),z(e,K.link)&&t.push("LINK"),t):(z(e,K.link)&&t.push("LINK"),z(e,K.googlePay)&&(t.push("GOOGLE_PAY"),E.sV&&t.push("BROWSER")),z(e,K.browserCard)&&-1===t.indexOf("BROWSER")&&t.push("BROWSER"),t)},me=function(){try{return window.location.origin===window.top.location.origin}catch(e){return!1}},fe=(0,Y.HP)((function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)})),_e=function(e){if(!window.ApplePaySession)return!1;try{return window.ApplePaySession.supportsVersion(e)}catch(e){return!1}},he=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,i=arguments.length>5?arguments[5]:void 0;if("https:"!==window.location.protocol)return H.J.resolve(!1);var a=Math.max(2,o);if(window.ApplePaySession){if(me()){if(window.ApplePaySession.supportsVersion(a)){var c=t?[e,t]:[e],s="merchant.".concat(c.join("."),".stripe");if(i)return fe(s).then((function(o){if(r("pr.apple_pay.can_make_payment_native_response",{available:o}),n&&!o&&window.console){var i=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("Either you do not have a card saved to your Wallet or the current domain (".concat(e,") ").concat(i,"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return o}));var u=window.ApplePaySession.canMakePayments();if(n&&!u&&window.console){var l=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("The current domain (".concat(e,") ").concat(l,"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return H.J.resolve(u)}return n&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version ".concat(a,".")),H.J.resolve(!1)}return H.J.resolve(!1)}return H.J.resolve(!1)},ye=(o={},(0,m.Z)(o,T.rM.VISA,"visa"),(0,m.Z)(o,T.rM.MASTERCARD,"masterCard"),(0,m.Z)(o,T.rM.AMEX,"amex"),(0,m.Z)(o,T.rM.DISCOVER,"discover"),(0,m.Z)(o,T.rM.JCB,"jcb"),(0,m.Z)(o,T.rM.UNIONPAY,"chinaUnionPay"),(0,m.Z)(o,T.rM.DINERS,null),(0,m.Z)(o,"MAESTRO","maestro"),(0,m.Z)(o,"CARTES_BANCAIRES","cartesBancaires"),o),ve=(i={},(0,m.Z)(i,T.rM.VISA,"VISA"),(0,m.Z)(i,T.rM.MASTERCARD,"MASTERCARD"),(0,m.Z)(i,T.rM.AMEX,"AMEX"),(0,m.Z)(i,T.rM.DISCOVER,"DISCOVER"),(0,m.Z)(i,T.rM.JCB,"JCB"),(0,m.Z)(i,T.rM.DINERS,null),["AT","AU","BE","CA","CH","DE","DK","EE","ES","FI","FR","GB","GR","HK","IE","IT","JP","LT","LU","LV","MX","NL","NO","NZ","PL","PT","SE","SG","US"]),ge=function(e,t,n){var r=[];return-1!==ve.indexOf(e)&&r.push(T.rM.AMEX),"US"===e||t?r.push.apply(r,[T.rM.DISCOVER,T.rM.DINERS,T.rM.JCB]):"GB"!==e&&"CA"!==e&&"JP"!==e||r.push.apply(r,[T.rM.DISCOVER,T.rM.DINERS]),r.push.apply(r,[T.rM.MASTERCARD,T.rM.VISA]),r.filter((function(e){return-1===n.indexOf(e)}))},be=function(e,t,n){return ge(e,t,n).reduce((function(e,t){var n=ye[t];return n&&e.push(n),e}),[])},we=n(6241),ke=function(e,t){return{amount:(0,we.Fe)(e.amount,t.currency),label:e.label,type:e.pending?"pending":"final"}},Ee=function(e,t,n){return new window.ApplePayError(e,t,n)},Se=function(e){return function(t){return t[e]&&"string"==typeof t[e]?t[e].toUpperCase():null}},Ce=(a={},(0,m.Z)(a,ee.success,0),(0,m.Z)(a,ee.fail,1),(0,m.Z)(a,ee.invalid_payer_name,2),(0,m.Z)(a,ee.invalid_shipping_address,3),(0,m.Z)(a,ee.invalid_payer_phone,4),(0,m.Z)(a,ee.invalid_payer_email,4),(0,m.Z)(a,ee.invalid_coupon_code,1),(0,m.Z)(a,ee.expired_coupon_code,1),(0,m.Z)(a,ee.invalid_payer_zip,2),a),Pe=(c={},(0,m.Z)(c,ee.success,(function(){return null})),(0,m.Z)(c,ee.fail,(function(){return null})),(0,m.Z)(c,ee.invalid_payer_name,(function(){return Ee("billingContactInvalid","name")})),(0,m.Z)(c,ee.invalid_shipping_address,(function(){return Ee("shippingContactInvalid","postalAddress")})),(0,m.Z)(c,ee.invalid_payer_phone,(function(){return Ee("shippingContactInvalid","phoneNumber")})),(0,m.Z)(c,ee.invalid_payer_email,(function(e){return Ee("shippingContactInvalid","emailAddress",e)})),(0,m.Z)(c,ee.invalid_payer_zip,(function(e){return Ee("billingContactInvalid","postalCode",e)})),(0,m.Z)(c,ee.invalid_coupon_code,(function(e){return Ee(_e(12)?"couponCodeInvalid":"unknown",void 0,e)})),(0,m.Z)(c,ee.expired_coupon_code,(function(e){return Ee(_e(12)?"couponCodeInvalid":"unknown",void 0,e)})),c),Ae=(s={},(0,m.Z)(s,$.pickup,"storePickup"),(0,m.Z)(s,$.shipping,"shipping"),(0,m.Z)(s,$.delivery,"delivery"),s),Ie={total:function(e){return ke(e.total,e)},lineItems:function(e){return e.displayItems?e.displayItems.map((function(t){return ke(t,e)})):[]},shippingMethods:function(e){return e.shippingOptions?e.shippingOptions.map((function(t){return function(e,t){return{amount:(0,we.Fe)(e.amount,t.currency),label:e.label,detail:e.detail,identifier:e.id}}(t,e)})):[]},applicationData:function(e){return e.applicationData||null},supportsCouponCode:function(e){return e.__supportsCouponCode||!1},couponCode:function(e){return e.__supportsCouponCode?e.__couponCode:""}},Ne={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=Ae[t];if(void 0!==n)return n;throw new I.No("Invalid value for shippingType: ".concat(t))},requiredBillingContactFields:function(e){return e.requestPayerName?["postalAddress"]:null},requiredShippingContactFields:function(e){var t=[];return e.requestShipping&&t.push("postalAddress"),e.requestPayerEmail&&t.push("email"),e.requestPayerPhone&&t.push("phone"),t.length?t:null},countryCode:Se("country"),currencyCode:Se("currency"),merchantCapabilities:function(e){var t=e.merchantCapabilities||te.merchantCapabilities;return e.__betas&&(0,P.uN)(e.__betas,"cup_apple_pay_beta_1")&&t.push("supportsEMV"),t},supportedNetworks:function(e){var t=be(e.country,e.jcbEnabled||!1,e.blockedCardBrands||[]);return _e(4)&&-1===(e.blockedCardBrands||[]).indexOf("mastercard")&&t.push("maestro"),e.__betas&&(0,P.uN)(e.__betas,"cup_apple_pay_beta_1")&&-1===(e.blockedCardBrands||[]).indexOf("unionpay")&&t.push("chinaUnionPay"),_e(4)&&e.__betas&&(0,P.uN)(e.__betas,"cartes_bancaires_apple_pay_beta_1")&&"eur"===e.currency&&t.unshift("cartesBancaires"),t}},Te={status:function(e){var t=Ce[e.status];return _e(3)&&t>1?1:t},error:function(e){return _e(3)?Pe[e.status](e.errorMessage):null}},Me=(0,u.Z)((0,u.Z)({},Ie),Ne),Re=(0,u.Z)((0,u.Z)({},Ie),Te),Oe=function(e){return Object.keys(Re).reduce((function(t,n){var r=(0,Re[n])(e);return null!==r?(0,u.Z)((0,u.Z)({},t),{},(0,m.Z)({},n,r)):t}),{})},je=function(e){return"string"==typeof e?e:null},Ze=function(e){return e?je(e.phoneNumber):null},xe=function(e){return e?je(e.emailAddress):null},Le=function(e){return e?[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" "):null},Be=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,i=e.locality,a=e.phoneNumber,c=je(n);return{addressLine:Array.isArray(t)?t.reduce((function(e,t){return"string"==typeof t?[].concat((0,l.Z)(e),[t]):e}),[]):[],country:c?c.toUpperCase():"",postalCode:je(r)||"",recipient:Le(e)||"",region:je(o)||"",city:je(i)||"",phone:je(a)||"",sortingCode:"",dependentLocality:"",organization:""}},De=function(e,t){var n=e.identifier,r=e.label;return t.filter((function(e){return e.id===n&&e.label===r}))[0]},qe=function(e,t){var n=e.shippingContact,r=e.shippingMethod,o=e.billingContact;return{shippingOption:r&&t.shippingOptions&&t.shippingOptions.length?De(r,t.shippingOptions):null,shippingAddress:n?Be(n):null,payerEmail:xe(n),payerPhone:Ze(n),payerName:Le(o),walletName:"applePay",methodName:"apple-pay"}},Fe=n(9620),Ue={austria:"AT",sterreich:"AT",csterreich:"AT",au:"AU",australia:"AU",belgium:"BE",br:"BR",brasil:"BR",brazil:"BR",ca:"CA",canada:"CA",ch:"CH",schweiz:"CH",switzerland:"CH",china:"CN",cn:"CN",czechrepublic:"CZ",eskrepublika:"CZ",cz:"CZ",de:"DE",deu:"DE",deutschland:"DE",dk:"DK",germany:"DE",danmark:"DK",denmark:"DK",egypt:"EG",es:"ES",espaa:"ES",espanya:"ES",spain:"ES",finland:"FI",suomi:"FI",fi:"FI",fr:"FR",hk:"HK",hongkong:"HK",hungary:"HU",hu:"HU",england:"GB",gb:"GB",gbr:"GB",uk:"GB",unitedkingdom:"GB",greatbritain:"GB",scotland:"GB",wales:"GB",in:"IN",ire:"IE",israel:"IL",it:"IT",italy:"IT",italia:"IT",italie:"IT",japan:"JP",jp:"JP",lv:"LV",latvia:"LV",latvija:"LV",lietuva:"LT",lt:"LT",luxembourg:"LU",mexico:"MX",mx:"MX",my:"MY",netherlands:"NL",thenetherlands:"NL",nederland:"NL",nederlands:"NL",nl:"NL",norway:"NO",no:"NO",nz:"NZ",pl:"PL",poland:"PL",polska:"PL",pr:"PR",pt:"PT",ro:"RO",russia:"RU",saintpierreandmiquelon:"PM",saudiarabia:"SA",se:"SE",sg:"SG",slovakia:"SK",svk:"SK",southafrica:"ZA",sweden:"SE",sverige:"SE",singapore:"SG",taiwan:"TW",turkey:"TR",uae:"AE",ukraine:"UA",us:"US",usa:"US",unitedstatesofamerica:"US",unitedstates:"US",estadosunidos:"US"},Ge=function(e,t){if(e.country&&"string"==typeof e.country){var n,r=e.country.toLowerCase().replace(/[^a-z]+/g,"");return e.countryCode?"string"==typeof e.countryCode&&(n=e.countryCode.toUpperCase()):(n=Ue[r])||t(),(0,u.Z)((0,u.Z)({},e),{},{countryCode:n})}return e},He=function(e){var t=e.recurringPaymentRequest,n=e.currency,r=e.pending,o=e.defaultBillingAgreement,i=void 0===o?"":o,a=e.warn;if(t){var c=t.paymentDescription,s=t.managementURL,l=t.regularBilling,p=t.billingAgreement;return function(){var e=window.navigator.userAgent,t=/iPad|iPhone/i.test(e),n=/^((?!chrome|android).)*safari/i.test(e)&&!/SamsungBrowser/.test(e);if(t){var r=window.navigator.userAgent.match(/OS (\d+)_(\d+)(_\d+)? like Mac OS X/)||[],o=parseInt(r[1],10),i=parseInt(r[2],10);return 16===o&&i<2}if(n){var a=e.match(/Version\/(\d+)\.(\d+)(\.\d+)?/)||[],c=parseInt(a[1],10),s=parseInt(a[2],10);return 16===c&&s<2}return!1}()&&!p&&(a("You did not specify a `billingAgreement` as part of your `applePay.recurringPaymentRequest`, and you are on Safari 16.0 or 16.1. Due to a bug in Safari 16.0-16.1, we autofilled a default billing agreement for you. This will not cause problems with your Stripe integration, but you may wish to customize this text by specifying your own `billingAgreement` text."),p=i),{paymentDescription:c,regularBilling:(0,u.Z)((0,u.Z)({},l),{},{paymentTiming:"recurring",type:r?"pending":"final",amount:(0,we.Fe)(l.amount,n)}),billingAgreement:p,managementURL:s}}},Ye=function(e,t){return e&&"object"==typeof e?t(e):null},Ke=function(){function e(t){var n=this;(0,p.Z)(this,e),this._wasCompleted=!1,this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){return he(window.location.hostname,n._authentication.accountId,(0,Fe.lO)(n._authentication.apiKey)===Fe.Kl.test,n._report,n._minimumVersion,!0).then((function(e){return{available:e}}))},this.update=function(e){n._initialPaymentRequest=(0,A.PM)(n._paymentRequestOptions,e),n._initializeSessionState()},this.show=function(){var e;n._wasCompleted&&n._report("pr.show_called_after_completion"),n._initializeSessionState();try{e=new window.ApplePaySession(n._minimumVersion,function(e){var t=(0,u.Z)((0,u.Z)({},te),e);return Object.keys(Me).reduce((function(e,n){var r=(0,Me[n])(t);return null!==r?(0,u.Z)((0,u.Z)({},e),{},(0,m.Z)({},n,r)):e}),{})}(n._paymentRequestOptions))}catch(e){throw"Must create a new ApplePaySession from a user gesture handler."===e.message?new I.No("show() must be called from a user gesture handler (such as a click handler, after the user clicks a button)."):e}n._privateSession=e,n._setupSession(e,n._usesButtonElement()),e.begin(),n._isShowing=!0},this.abort=function(){n._privateSession&&n._privateSession.abort()},this._warn=function(){},this._report=function(e,t){n._controller.report(e,(0,u.Z)((0,u.Z)({},t),{},{backingLibrary:"APPLE_PAY",usesButtonElement:n._usesButtonElement()}))},this._validateMerchant=function(e,t){return function(r){n._controller.action.createApplePaySession({data:{validation_url:r.validationURL,domain_name:window.location.hostname,display_name:n._paymentRequestOptions.total.label},usesButtonElement:t}).then((function(t){if(n._isShowing)switch(t.type){case"object":e.completeMerchantValidation(JSON.parse(t.object.session));break;case"error":n._handleValidationError(e)(t.error);break;default:(0,b.Rz)(t)}}),n._handleValidationError(e))}},this._handleValidationError=function(e){return function(t){n._report("error.pr.apple_pay.session_creation_failed",{error:t}),e.abort();var r=t.message;"string"==typeof r&&n._controller.warn(r)}},this._paymentAuthorized=function(e){return function(t){var r=t.payment,o=n._usesButtonElement()?T.Yj.paymentRequestButton:null;n._controller.action.tokenizeWithData({type:"apple_pay",elementName:o,tokenData:(0,u.Z)((0,u.Z)({},r),{},{billingContact:Ye(r.billingContact,n._normalizeContact)}),mids:n._mids}).then((function(t){if("error"===t.type)_e(14)?e.abort():e.completePayment(window.ApplePaySession.STATUS_FAILURE),n._report("error.pr.create_token_failed",{error:t.error}),n._onEvent({type:"__private_do_not_use_error",payload:{error:t.error}});else{var o=Ye(r.shippingContact,n._normalizeContact),i=Ye(r.billingContact,n._normalizeContact);o&&n._paymentRequestOptions.requestShipping&&!o.countryCode&&e.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var a=qe({shippingContact:o,billingContact:i},n._paymentRequestOptions);n._onToken(e)((0,u.Z)((0,u.Z)({},a),{},{shippingOption:n._privateShippingOption,token:t.object}))}}))}},this._normalizeContact=function(e){return Ge(e,(function(){n._report("warn.pr.apple_pay.missing_country_code",{country:e.country})}))},this._onToken=function(e){return function(t){n._onEvent({type:"paymentresponse",payload:(0,u.Z)((0,u.Z)({},t),{},{complete:Z(n._completePayment(e))})})}},this._completePayment=function(e){return function(t,r){"success"===t&&(n._wasCompleted=!0),n._paymentRequestOptions=(0,A.PM)(n._paymentRequestOptions,{status:t,errorMessage:r});var o=Oe(n._paymentRequestOptions),i=o.status,a=o.error;n._isShowing&&(a?e.completePayment({status:i,errors:[a]}):i!==window.ApplePaySession.STATUS_FAILURE?e.completePayment(i):_e(14)?e.abort():e.completePayment(i)),(0===i||1===i&&null==a)&&(n._isShowing=!1,n._onEvent&&n._onEvent({type:"close"}))}},this._paymentMethodSelected=function(e){return function(t){n._onEvent({type:"__private_do_not_use_billingaddresschange",payload:{billingAddress:t.paymentMethod.billingContact?Be(n._normalizeContact(t.paymentMethod.billingContact)):{addressLine:[],country:"",postalCode:"",recipient:"",region:"",city:"",phone:"",sortingCode:"",dependentLocality:"",organization:""},updateWith:Z(n._completePaymentMethodSelection(e))}})}},this._shippingContactSelected=function(e){return function(t){n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:Be(n._normalizeContact(t.shippingContact)),updateWith:Z(n._completeShippingContactSelection(e))}})}},this._completePaymentMethodSelection=function(e){return function(t){n._paymentRequestOptions=(0,A.PM)(n._paymentRequestOptions,t);var r=Oe(n._paymentRequestOptions),o=r.total,i={newLineItems:r.lineItems,newTotal:o};e.completePaymentMethodSelection(i)}},this._completeShippingContactSelection=function(e){return function(t){var r;n._paymentRequestOptions=(0,A.PM)(n._paymentRequestOptions,t),(null===(r=n._paymentRequestOptions.shippingOptions)||void 0===r?void 0:r.length)&&(n._privateShippingOption=n._paymentRequestOptions.shippingOptions[0]);var o=Oe(n._paymentRequestOptions),i=o.status,a=o.shippingMethods,c=o.total,s=o.lineItems,u=o.error;if(u)e.completeShippingContactSelection({newTotal:c,newLineItems:s,newShippingMethods:a,errors:[u]});else if(_e(14)&&1===i){var l=Ee("shippingContactInvalid","postalAddress");e.completeShippingContactSelection({newTotal:c,newLineItems:s,newShippingMethods:a,errors:[l]})}else e.completeShippingContactSelection(i,a,c,s)}},this._shippingMethodSelected=function(e){return function(t){if(n._paymentRequestOptions.shippingOptions){var r=De(t.shippingMethod,n._paymentRequestOptions.shippingOptions);n._privateShippingOption=r,n._onEvent({type:"shippingoptionchange",payload:{shippingOption:r,updateWith:Z(n._completeShippingMethodSelection(e))}})}}},this._completeShippingMethodSelection=function(e){return function(t){n._paymentRequestOptions=(0,A.PM)(n._paymentRequestOptions,t);var r=Oe(n._paymentRequestOptions),o=r.status,i=r.total,a=r.lineItems;e.completeShippingMethodSelection(o,i,a)}},this._couponCodeChanged=function(e){return function(t){var r=t.couponCode;n._onEvent({type:"__private_do_not_use_couponcodechange",payload:{couponCode:r,updateWith:Z(n._completeCouponCodeChange(e))}})}},this._completeCouponCodeChange=function(e){return function(t){n._paymentRequestOptions=(0,A.PM)(n._paymentRequestOptions,t);var r=Oe(n._paymentRequestOptions),o=r.total,i=r.lineItems,a=r.error;e.completeCouponCodeChange({newTotal:o,newLineItems:i,errors:a?[a]:void 0})}};var r=t.controller,o=t.authentication,i=t.mids,a=t.options,c=t.usesButtonElement,s=t.listenerRegistry;this._controller=r,this._authentication=o,this._mids=i,this._minimumVersion=a.__minApplePayVersion||2,this._usesButtonElement=c,this._listenerRegistry=s,this._initialPaymentRequest=a,this._isShowing=!1,this._initializeSessionState()}return(0,d.Z)(e,[{key:"_initializeSessionState",value:function(){var e=btoa(this._authentication.accountId?"".concat(this._authentication.apiKey,":").concat(this._authentication.accountId):this._authentication.apiKey);this._paymentRequestOptions=(0,u.Z)((0,u.Z)((0,u.Z)({},te),this._initialPaymentRequest),{},{status:ee.success,applicationData:e}),this._privateSession=null,this._privateShippingOption=null;var t=this._paymentRequestOptions.shippingOptions;(null==t?void 0:t.length)&&(this._privateShippingOption=t[0])}},{key:"_setupSession",value:function(e,t){var n=this;this._listenerRegistry.addEventListener(e,"validatemerchant",Z(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",Z(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",Z((function(){n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})}))),this._listenerRegistry.addEventListener(e,"paymentmethodselected",Z(this._paymentMethodSelected(e))),this._listenerRegistry.addEventListener(e,"shippingcontactselected",Z(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",Z(this._shippingMethodSelected(e))),this._listenerRegistry.addEventListener(e,"couponcodechanged",Z(this._couponCodeChanged(e)))}}]),e}(),ze=Ke,Je=n(755),We={display:"block",position:"fixed","z-index":"2147483647",background:"rgba(40,40,40,0)",transition:"background 400ms ease","will-change":"background",top:"0",left:"0",right:"0",bottom:"0",margin:"0",padding:"0"},Ve=(0,u.Z)((0,u.Z)({},We),{},{background:"rgba(40,40,40,0.75)"}),Xe=function e(t){var n=this,r=t.lockScrolling,o=t.lockFocus,i=t.lockFocusOn,a=t.listenerRegistry;(0,p.Z)(this,e),this.domElement=document.createElement("div"),this._runOnHide=[],this.mount=function(){var e=(0,k.Xq)();n.domElement.style.display="none",e.contains(n.domElement)||e.insertBefore(n.domElement,e.firstChild)},this.show=function(){if((0,k.yq)(n.domElement,We),n._lockScrolling){var e=(0,k.MV)();n._runOnHide.push(e)}if(n._lockFocus){var t=(0,k.W3)(n._lockFocusOn).restoreFocus;n._runOnHide.push(t)}},this.fadeIn=function(){setTimeout((function(){(0,k.yq)(n.domElement,Ve)}))},this.fadeOut=function(){return new H.J((function(e){(0,k.yq)(n.domElement,We),setTimeout(e,500),n._listenerRegistry.addEventListener(n.domElement,"transitionend",e)})).then((function(){for(n.domElement.style.display="none";n._runOnHide.length;){var e;null===(e=n._runOnHide.pop())||void 0===e||e()}}))},this.unmount=function(){var e=(0,k.Xq)();e.contains(n.domElement)&&e.removeChild(n.domElement)},this._lockScrolling=!!r,this._lockFocus=!!o,this._lockFocusOn=i||null,this._listenerRegistry=a},Qe=null;var $e=function(e){return"https:"===window.location.protocol&&(!(!E.Wt&&!E.j3)&&(!E.Bh&&(!(!e.isCheckout&&!window.PaymentRequest)&&!(!e.isCheckout&&E.sV))))},et=function e(t){var n=this;(0,p.Z)(this,e),this._mids=null,this._frame=null,this._initFrame=function(e){var t=n._controller.createHiddenFrame(Je.NC.PAYMENT_REQUEST_GOOGLE_PAY,{authentication:n._authentication,mids:n._mids,origin:n._origin});t.send({action:"stripe-pr-initialize",payload:{data:e}}),n._initFrameEventHandlers(t),n._frame=t},this._initFrameEventHandlers=function(e){e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._backdrop.fadeOut().then((function(){n._backdrop.unmount()})),n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.errorMessage,errorCode:e.errorCode}})})),e._on("pr-callback",(function(t){var r=t.event,o=t.options,i=t.nonce;switch(r){case"paymentresponse":n._handlePaymentResponse(e,o,i);break;case"shippingaddresschange":n._handleShippingAddressChange(e,o,i);break;case"shippingoptionchange":n._handleShippingOptionChange(e,o,i);break;default:throw new Error("Unexpected event name: ".concat(r))}}))},this._handlePaymentResponse=function(e,t,r){n._onEvent({type:"paymentresponse",payload:(0,u.Z)((0,u.Z)({},t),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:r,data:{status:t}}})}})})},this._handleShippingAddressChange=function(e,t,r){n._onEvent({type:"shippingaddresschange",payload:(0,u.Z)((0,u.Z)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:r,data:t}})}})})},this._handleShippingOptionChange=function(e,t,r){n._onEvent({type:"shippingoptionchange",payload:(0,u.Z)((0,u.Z)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:r,data:t}})}})})},this._destroy=function(){n._frame&&(n._frame.destroy(),n._frame=null)},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){if(!$e({isCheckout:n._isCheckout}))return H.J.resolve({available:!1});if(!n._frame)throw new Error("Frame not initialized.");var e,t=n._frame;return(e=function(){return t.action.checkCanMakePayment().then((function(e){return!0===e.available}))},null!==Qe?H.J.resolve(Qe):e().then((function(e){return Qe=e}))).then((function(e){return{available:e}}))},this.show=function(){n._frame&&(n._frame.send({delegate:"payment",action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement(),stripeJsId:n._controller._stripeJsId,mids:n._controller.mids()}}}),n._backdrop.mount(),n._backdrop.show(),n._backdrop.fadeIn())},this.update=function(e){n._frame&&n._frame.send({action:"stripe-pr-update",payload:{data:e}})},this.abort=function(){n._frame&&n._frame.send({action:"stripe-pr-abort",payload:{}})},this._controller=t.controller,this._authentication=t.authentication,this._mids=t.mids,this._origin=t.origin,this._usesButtonElement=t.usesButtonElement,this._backdrop=new Xe({lockScrolling:!1,lockFocus:!0,lockFocusOn:null,listenerRegistry:t.listenerRegistry}),this._isCheckout=!!t.options.__isCheckout,$e({isCheckout:this._isCheckout})&&this._controller&&(this._controller.action.fetchLocale({locale:"auto"}),this._initFrame(t.options))},tt=function(){if(!window.PaymentRequest)return null;if(/CriOS\/59/.test(navigator.userAgent))return null;if(/.*\(.*; wv\).*Chrome\/(?:53|54)\.\d.*/g.test(navigator.userAgent))return null;if(E.xz)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return H.J.resolve(!1)}),e}(),nt=null,rt=function e(t){var n=this;(0,p.Z)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){return(e=n._prFrame,(0,Fe.lO)(n._authentication.apiKey),Fe.Kl.test,"https:"!==window.location.protocol?H.J.resolve(!1):null!==nt?H.J.resolve(nt):tt&&e?e.action.checkCanMakePayment().then((function(e){var t=e.available;return nt=!0===t})):H.J.resolve(!1)).then((function(e){return{available:e}}));var e},this.update=function(e){var t=n._prFrame;t&&t.send({action:"stripe-pr-update",payload:{data:e}})},this.show=function(){if(!n._prFrame)throw new I.No("Payment Request is not available in this browser.");n._prFrame.send({delegate:"payment",action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement(),stripeJsId:n._controller._stripeJsId,mids:n._controller.mids()}}})},this.abort=function(){n._prFrame&&n._prFrame.send({action:"stripe-pr-abort",payload:{}})},this._setupPrFrame=function(e,t){e.send({action:"stripe-pr-initialize",payload:{data:t}}),e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.message||"",errorCode:e.code||""}})})),e._on("pr-callback",(function(t){var r=t.event,o=t.nonce,i=t.options;switch(r){case"token":n._onEvent({type:"paymentresponse",payload:(0,u.Z)((0,u.Z)({},i),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{data:{status:t},nonce:o}})}})});break;case"shippingaddresschange":n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:i.shippingAddress,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;case"shippingoptionchange":n._onEvent({type:"shippingoptionchange",payload:{shippingOption:i.shippingOption,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;default:throw new Error("Unexpected event from PaymentRequest inner: ".concat(r))}}))};var r=t.authentication,o=t.controller,i=t.mids,a=t.origin,c=t.usesButtonElement,s=t.options;if(this._authentication=r,this._controller=o,this._usesButtonElement=c,tt&&"https:"===window.location.protocol){this._controller.action.fetchLocale({locale:"auto"});var l=this._controller.createHiddenFrame(Je.NC.PAYMENT_REQUEST_BROWSER,{authentication:r,mids:i,origin:a});this._setupPrFrame(l,s),this._prFrame=l}else this._prFrame=null},ot=n(7904),it=n(1164),at=function(e){for(var t="",n=0;n1&&void 0!==arguments[1]&&arguments[1];n.heartbeatTimeout&&clearTimeout(n.heartbeatTimeout),n.runOnDisconnect.push((function(){n.heartbeatTimeout&&clearTimeout(n.heartbeatTimeout)})),n.heartbeatTimeout=setTimeout((function(){r?(n.disconnect(),n.onDisconnect()):n.setNextHeartbeatTimeout(e.HEARTBEAT_TIMEOUT,!0)}),t)};var r=t.target,o=t.targetOrigin,i=t.isOpener,a="function"==typeof r?r:function(){return r};if(this.transport=this.setupTransport(a,o),this.targetIsMerchant=dt(o),this.isMerchant=dt(window.location.origin),i){this.isTargetReadyForMessages=!1;var c=setInterval((function(){var e;(null===(e=a())||void 0===e?void 0:e.closed)&&(n.onClose(),n.disconnect())}),100);this.runOnDisconnect.push((function(){return clearInterval(c)})),this.runOnDisconnect.push((function(){var e;return null===(e=a())||void 0===e?void 0:e.close()}))}else this.isTargetReadyForMessages=!0,this.postMessage({type:"ready_for_messages",__private:!0});this.sendRecurringHeartbeat(),this.setNextHeartbeatTimeout(e.INITIAL_HEARTBEAT_TIMEOUT)}return(0,d.Z)(e,[{key:"allowMessage",value:function(e){return!this.targetIsMerchant&&!this.isMerchant||function(e){return-1!==lt.indexOf(e)}(e.type)}},{key:"sanitizeMessage",value:function(e){return this.targetIsMerchant||this.isMerchant?(0,A.l2)(e,(function(e){return"string"!=typeof e?e:function(e){if("string"!=typeof e)return!1;var t=e.replace(/[\s-]+/g,"").match(/\d{13,}/g);return!!t&&t.some((function(e){return st.test(e)&&function(e){for(var t="0".charCodeAt(0),n=e.length%2,r=0,o=e.length-1;o>=0;--o){var i=o%2===n,a=e.charCodeAt(o)-t;i&&(a*=2),a>9&&(a-=9),r+=a}return r%10==0}(e)}))}(e)?"":e})):e}},{key:"setupTransport",value:function(e,t){var n=this,r=new pt(e,t);return r.listen((function(e){n.allowMessage(e)&&("__private"in e?n.handlePrivateMessage(e):n.handleMessage(e))})),this.runOnDisconnect.push((function(){return r.stopAllListeners()})),r}},{key:"handlePrivateMessage",value:function(t){var n=this;switch(t.type){case"ready_for_messages":this.isTargetReadyForMessages=!0,this.messageQueue.forEach((function(e){n.postMessage(e)})),this.messageQueue.length=0;break;case"heartbeat":this.setNextHeartbeatTimeout(e.HEARTBEAT_TIMEOUT);break;default:(0,b.Rz)(t)}}},{key:"handleMessage",value:function(e){var t,n,r=this,o=e.nonce;switch(e.mode){case"request":var i;null===(i=this.callbacks[e.type])||void 0===i||i.forEach((function(t){(function(e){try{return H.J.resolve(e())}catch(e){return H.J.reject(e)}})((function(){return t(e.req)})).then((function(t){r.postMessage({mode:"response",type:e.type,nonce:o,res:t})}),(function(t){r.postMessage({mode:"error",type:e.type,nonce:o,error:t})}))}));break;case"response":null===(t=this.deferredMessageResponses[o])||void 0===t||t.resolve(e.res);break;case"error":null===(n=this.deferredMessageResponses[o])||void 0===n||n.reject(e.error);break;default:(0,b.Rz)(e)}}},{key:"disconnect",value:function(){this.runOnDisconnect.forEach((function(e){return e()})),this.runOnDisconnect.length=0,this.isDisconnected=!0}},{key:"sendRecurringHeartbeat",value:function(){var t=this;!function n(){t.isDisconnected||(t.isTargetReadyForMessages&&t.postMessage({type:"heartbeat",__private:!0}),setTimeout(n,e.HEARTBEAT_INTERVAL))}()}},{key:"postMessage",value:function(e){if(!this.isDisconnected&&this.allowMessage(e)){var t=this.sanitizeMessage(e);this.isTargetReadyForMessages?this.transport.postMessage(t):this.messageQueue.push(t)}}}]),e}();mt.HEARTBEAT_INTERVAL=1e3,mt.INITIAL_HEARTBEAT_TIMEOUT=7500,mt.HEARTBEAT_TIMEOUT=2500;var ft,_t,ht=function(e,t,n){var r,o,i,a,c,s,u,l,p=(r={outerHeight:window.outerHeight,outerWidth:window.outerWidth,screenY:window.screenY,screenX:window.screenX,popupHeight:t,popupWidth:n,availTop:window.screen.availTop||0},o=r.outerHeight,i=r.outerWidth,a=r.screenY,c=r.screenX,s=r.popupHeight,u=r.popupWidth,{top:(l=r.availTop)<0?l+o/2+(Math.abs(l)+a)-s/2:o/2+a-s/2,left:i/2+c-u/2}),d=function(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(e[t])})).join()}({toolbar:"no",directories:"no",status:"no",scrollbars:"no",resizable:"no",copyhistory:"no",height:t,width:n,top:p.top,left:p.left});return window.open(e,"Link",d)},yt=function(e){var t=e.stripeJsId,n=e.publishableKey,r=e.path,o=e.onClose,i=e.onDisconnect,a=e.height,c=e.width,s=e.handleOwnFocus,u=void 0!==s&&s,l=function(e){var t=e.popupRootUrl,n=e.stripeJsRootUrl,r=e.version,o=e.path,i=e.publishableKey,a=e.stripeJsId,c=e.openedAt,s=(0,S.P$)(t);if(!s)throw new Error('Invalid popup root URL: "'.concat(t,'"'));var u=(0,S.qC)({key:ct(i),id:a,openedAt:c});if(t===n){var l=r&&"unknown"!==r?"link-popup-".concat(r,".html#"):"link-popup.html#";return{url:"".concat(t).concat(l).concat(o,"?").concat(u),origin:s}}var p=r&&"unknown"!==r?"".concat(r,"/#"):"#";return{url:"".concat(t).concat(p).concat(o,"?").concat(u),origin:s}}({popupRootUrl:"https://checkout.link.co/",stripeJsRootUrl:T.Xk,version:T.XK,path:r,publishableKey:n,stripeJsId:t,openedAt:Date.now()}),p=l.url,d=l.origin,m=null,f=new mt({target:function(){return m},targetOrigin:d,isOpener:!0});return f.onDisconnect=i,f.onClose=function(){u||window.focus(),o()},(m=ht(p,a,c))?{messenger:f,close:function(){var e;return null===(e=m)||void 0===e?void 0:e.close()},focus:function(){var e;return null===(e=m)||void 0===e?void 0:e.focus()}}:null},vt=function(){return(E.Wt||E.j3)&&(0,E.gG)()},gt=function(){function e(t){var n=this;(0,p.Z)(this,e),this.blockReopenOnShow=!1,this.popup=null,this.isDuringSuccessCushion=!1,this.handleGetInitialState=function(e,t){return function(){var r=Date.now();return n.controller.report("pr.link.popup_load",{duration:r-t}),n.getControllerData(e).then((function(e){var t=e.locale,r=e.linkConfigResult;if("error"===r.type||null==r.object.link_settings)throw new Error("Invalid LinkConfig result");var o=r.object.link_settings,i=o.merchant_info,a={businessName:i.business_name,country:i.country},c=o.customer_info;return{publishableKey:n.authentication.apiKey,stripeAccount:n.authentication.accountId,merchantInfo:a,customerInfo:c,integrationType:"prb",elementComponentName:"paymentRequestButton",paymentRequestOptions:n.paymentRequestOptions,locale:t,stripeJsId:n.controller._stripeJsId,mids:n.controller.mids(),referrer:window.location.href.toString(),elementsSessionId:null,elementsAssignmentId:null}}))}},this.getControllerData=function(e){return H.J.all([n.controller.action.resolveLocale({locale:e||"auto"}),n.controller.action.retrieveLinkConfig(),n.controller.action.checkForLinkClientSecret()]).then((function(e){var t=(0,ot.Z)(e,3);return{locale:t[0],linkConfigResult:t[1],hasClientSecret:t[2]}}))},this.handleShippingOptionChange=function(e){var t=e.shippingOption;return new H.J((function(e){n.onEvent({type:"shippingoptionchange",payload:{shippingOption:t,updateWith:e}})}))},this.handleShippingAddressChange=function(e){var t=e.shippingAddress;return new H.J((function(e){n.onEvent({type:"shippingaddresschange",payload:{shippingAddress:t,updateWith:e}})}))},this.handlePaymentData=function(e){var t=e.token,r=e.payerName,o=e.payerEmail,i=e.payerPhone,a=e.shippingAddress,c=e.shippingOption;return n.blockReopenOnShow=!0,new H.J((function(e){n.onEvent({type:"paymentresponse",payload:{token:t,payerName:r,payerEmail:o,payerPhone:i,shippingOption:c,shippingAddress:a,walletName:"link",methodName:"link",complete:function(t,r){var o;("success"!==t?n.blockReopenOnShow=!1:(n.isDuringSuccessCushion=!0,setTimeout((function(){n.isDuringSuccessCushion=!1}),2e3)),E.q$&&"success"===t)&&(null===(o=n.popup)||void 0===o||o.close(),n.popup=null);e({status:t,errorMessage:r})}}})}))},this.handleLogOutInElements=function(){return n.controller.action.logOutOfLinkInElements()},this.setEventHandler=function(e){n._onEvent=e},this.show=function(e){var t=e.locale;if(!n.isDuringSuccessCushion){if(n.popup){if(!E.q$)return void n.popup.focus();if(n.blockReopenOnShow)return;n.popup.close()}var r=Date.now(),o=yt({stripeJsId:n.controller._stripeJsId,publishableKey:n.authentication.apiKey,path:"/pay",height:708,width:500,onDisconnect:function(){n.popup===o&&(n.onEvent({type:"close"}),n.popup=null)},onClose:function(){n.popup===o&&(n.onEvent({type:"close"}),n.popup=null)}});n.popup=o,n.popup?(n.popup.messenger.on("get_initial_state",n.handleGetInitialState(t,r)),n.popup.messenger.on("link_prb_payment_data",n.handlePaymentData),n.popup.messenger.on("link_prb_shipping_option_change",n.handleShippingOptionChange),n.popup.messenger.on("link_prb_shipping_address_change",n.handleShippingAddressChange),n.popup.messenger.on("log_out_in_elements",n.handleLogOutInElements)):n.controller.report("pr.link.popup_blocked")}},this.update=function(e){e.__merchantDetails;var t=(0,f.Z)(e,["__merchantDetails"]);n.paymentRequestOptions=(0,A.PM)(n.paymentRequestOptions,t)},this.abort=function(){n.popup&&(n.popup.close(),n.popup=null)},this.canMakePayment=function(e){return vt()&&function(e){return!(e.blockedCardBrands&&e.blockedCardBrands.length||e.__isCheckout&&!e.__linkOnly)}(n.paymentRequestOptions)?n.getControllerData(e.locale).then((function(t){var r,o=t.locale,i=t.linkConfigResult,a=t.hasClientSecret;if(-1!==it.ud.indexOf(o))return{available:!1};if("error"===i.type)return{available:!1};var c=i.object,s=null===(r=c.experiments)||void 0===r?void 0:r.experiment_assignments;return c.link_available.payment_request_button&&null!=c.link_settings||e.useCheckoutAvailabilityCheck?e.useCheckoutAvailabilityCheck&&!c.link_available.checkout?{available:!1}:e.skipEnrollmentCheck?{available:!0,linkExperimentAssignments:s}:(a&&n.controller.report("pr.link.has_client_secret"),{available:a,linkExperimentAssignments:s}):{available:!1}})).then((function(e){return n.controller.report("pr.link.can_make_payment_native_response",{available:e.available}),e})):H.J.resolve({available:!1})},this.controller=t.controller,this.authentication=t.authentication,this.paymentRequestOptions=t.options,this.controller._controllerFrame._on("elements-link-login",this.abort),vt()&&this.controller.action.retrieveLinkConfig()}return(0,d.Z)(e,[{key:"onEvent",value:function(e){if(!this._onEvent)throw new Error("Event handler has not been initialized");this._onEvent(e)}}]),e}(),bt=gt,wt=n(9792),kt=!1,Et=function(e){function t(e){var r;(0,p.Z)(this,t),(r=n.call(this))._usedByButtonElement=null,r._showCalledByButtonElement=!1,r._isShowing=!1,r._backingLibraries={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null,LINK:null},r._activeBackingLibraryName=null,r._buttonTypeName=null,r._activeBackingLibrary=null,r._secondaryActiveBackingLibraryName=null,r._secondaryButtonTypeName=null,r._secondaryActiveBackingLibrary=null,r._lastClickedButtonPosition=null,r._canMakePaymentAvailability={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null,LINK:null},r._canMakePaymentResolved=!1,r._validateUserOn=function(e){"string"==typeof e&&("source"===e&&r._hasRegisteredListener("paymentmethod")||"paymentmethod"===e&&r._hasRegisteredListener("source"))&&(r._report("pr.double_callback_registration"),r._controller.warn("Do not register event listeners for both `source` or `paymentmethod`. Only one of them will succeed."))},r._report=function(e,t){var n="secondary"===r._lastClickedButtonPosition?r._secondaryActiveBackingLibrary:r._activeBackingLibraryName;r._controller.report(e,(0,u.Z)((0,u.Z)({},t),{},{activeBackingLibrary:n,primaryBackingLibrary:r._activeBackingLibraryName,secondaryBackingLibrary:r._secondaryActiveBackingLibraryName,usesButtonElement:r._usedByButtonElement||!1,element:r._usedByButtonElement?"paymentRequestButton":null,requestShipping:r._initialOptions?r._initialOptions.requestShipping||!1:null}))},r._warn=function(e){r._controller.warn(e)},r._resetHttpsWarning=function(){kt=!1},r._registerElement=function(){r._usedByButtonElement=!0},r._elementShow=function(){r._showCalledByButtonElement=!0,r.show()},r._updateLocale=function(e){r._locale=e},r._updateLastClickedButtonPosition=function(e){e&&(r._lastClickedButtonPosition=e)},r._initBackingLibraries=function(e){r._queryStrategy.forEach((function(t){var n={controller:r._controller,authentication:r._authentication,mids:r._mids,origin:window.location.origin,options:e,usesButtonElement:function(){return!0===r._usedByButtonElement},listenerRegistry:r._listenerRegistry};switch(t){case"APPLE_PAY":r._backingLibraries.APPLE_PAY=new ze(n),r._backingLibraries.APPLE_PAY.setEventHandler(r._handleInternalEvent);break;case"GOOGLE_PAY":r._backingLibraries.GOOGLE_PAY=new et(n),r._backingLibraries.GOOGLE_PAY.setEventHandler(r._handleInternalEvent);break;case"LINK":r._backingLibraries.LINK=new bt(n),r._backingLibraries.LINK.setEventHandler(r._handleInternalEvent);break;case"BROWSER":r._backingLibraries.BROWSER=new rt(n),r._backingLibraries.BROWSER.setEventHandler(r._handleInternalEvent);break;default:(0,b.Rz)(t)}}))},r._handleInternalEvent=function(e){switch(e.type){case"paymentresponse":r._emitPaymentResponse(e.payload);break;case"error":r._emit("__private_do_not_use_error"),r._report("error.pr.internal_error",{error:e.payload});break;case"close":r._isShowing=!1;break;default:r._emitExternalEvent(e)}},r._emitExternalEvent=function(e){switch(e.type){case"cancel":r._emit("cancel");break;case"__private_do_not_use_billingaddresschange":case"__private_do_not_use_couponcodechange":var t=e.type,n=e.payload,o=null,i=!1,a=!1,c=function(e){if(a&&i)return r._report("pr.update_with_called_after_timeout",{event:t}),void r._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(i)return r._report("pr.update_with_double_call",{event:t}),void r._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");o&&clearTimeout(o),i=!0,r._report("pr.update_with",{event:t});var c=(0,b.Gu)(le,e||{},"".concat(t," callback")),s=c.value;c.warnings.forEach((function(e){return r._controller.warn(e)}));var u=s;u.total&&(r._reportOnlyTotal=u.total),n.updateWith(u)};if(r._hasRegisteredListener(e.type)){o=setTimeout((function(){a=!0,r._report("pr.update_with_timed_out",{event:t}),r._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'.concat(e.type,'" events, then you must call event.updateWith in the "').concat(e.type,'" handler within 30 seconds.')),c({status:"fail"})}),29900);try{r._emit(t,(0,u.Z)((0,u.Z)({},n),{},{updateWith:c}))}catch(t){throw r._report("pr.user_callback_error",{event:e.type,activeBackingLibrary:r._activeBackingLibraryName,errorMessage:"string"==typeof(null==t?void 0:t.message)?t.message:"Unknown error occured: ".concat(t)}),t}}else c({status:"success"});break;case"shippingoptionchange":case"shippingaddresschange":var s=e.type,l=e.payload,p=null,d=!1,m=!1,_=function(t){if(m&&d)return r._report("pr.update_with_called_after_timeout",{event:s}),void r._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(d)return r._report("pr.update_with_double_call",{event:s}),void r._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");p&&clearTimeout(p),d=!0,r._report("pr.update_with",{event:s});var n=(0,b.Gu)(le,t||{},"".concat(s," callback")),o=n.value;n.warnings.forEach((function(e){return r._controller.warn(e)}));var i=o,a=!1;if(r._initialOptions.__isCheckout&&"APPLE_PAY"===r._activeBackingLibraryName&&o.shippingOptions&&1===o.shippingOptions.length&&0===o.shippingOptions[0].amount){o.shippingOptions;i=(0,f.Z)(o,["shippingOptions"]),a=!0}var c=o.shippingOptions||r._initialOptions.shippingOptions;if(!(a||"shippingaddresschange"!==e.type||o.status!==ee.success||c&&c.length))throw new I.No("When requesting shipping information, you must specify shippingOptions once a shipping address is selected.\nEither provide shippingOptions in stripe.paymentRequest(...) or listen for the shippingaddresschange event and provide shippingOptions to the updateWith callback there.");i.total&&(r._reportOnlyTotal=i.total),l.updateWith(i)};if(r._hasRegisteredListener(e.type)){p=setTimeout((function(){m=!0,r._report("pr.update_with_timed_out",{event:s}),r._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'.concat(e.type,'" events, then you must call event.updateWith in the "').concat(e.type,'" handler within 30 seconds.')),_({status:"fail"})}),29900);try{r._emit(s,(0,u.Z)((0,u.Z)({},l),{},{updateWith:_}))}catch(t){throw r._report("pr.user_callback_error",{event:e.type,activeBackingLibrary:r._activeBackingLibraryName,errorMessage:"string"==typeof(null==t?void 0:t.message)?t.message:"Unknown error occured: ".concat(t)}),t}}else _({status:"success"});break;case"token":case"source":case"paymentmethod":var h=e.type,y=e.payload,v=null,g=!1,w=!1,k=function(e,t){if(g&&w)return r._report("pr.complete_called_after_timeout"),void r._controller.warn("Call to complete() was ignored because it has already timed out. Please ensure that complete is called within 30 seconds.");if(w)return r._report("pr.complete_double_call"),void r._controller.warn("Call to complete() was ignored because it has already been called. Do not call complete more than once.");v&&clearTimeout(v),w=!0;var n=(0,b.Gu)(pe,e,"status for PaymentRequest completion"),o=n.value;if(n.warnings.forEach((function(e){return r._controller.warn(e)})),r._initialOptions.__isCheckout&&t&&"success"!==o){var i=(0,b.Gu)(b.Z_,t,"error message for PaymentRequest completion"),a=i.value;i.warnings.forEach((function(e){return r._controller.warn(e)})),y.complete(o,a)}else y.complete(o)};v=setTimeout((function(){g=!0,r._report("pr.complete_timed_out"),r._controller.warn('Timed out waiting for a call to complete(). Once you have processed the payment in the "'.concat(e.type,'" handler, you must call event.complete within 30 seconds.')),k("fail")}),29900);try{r._emit(h,(0,u.Z)((0,u.Z)({},y),{},{complete:k}))}catch(e){throw r._report("pr.user_callback_error",{event:h,activeBackingLibrary:r._activeBackingLibraryName,errorMessage:"string"==typeof(null==e?void 0:e.message)?e.message:"Unknown error occured: ".concat(e)}),e}break;case"__private_do_not_use_error":r._emit("__private_do_not_use_error",e.payload.error);break;default:(0,b.Rz)(e)}},r._logExperimentExposure=function(e){r._controller.report("experiment_exposure",{experiment_name:e})},r._maybeEmitPaymentResponse=function(e){r._isShowing&&r._emitExternalEvent(e)},r._emitPaymentResponse=function(e){var t,n="other";r._initialOptions.__isCheckout?n="checkout":r._initialOptions.__isPaymentElement&&(n="payment_element"),r._report("pr.payment_authorized",{product:n,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency});var o=e.token,i=(0,f.Z)(e,["token"]),a=i.payerEmail,c=i.payerPhone,s=i.complete,l=r._showCalledByButtonElement?T.Yj.paymentRequestButton:null;r._hasRegisteredListener("token")&&("googlePay"===i.walletName&&r._controller.action.removeElementsExperimentId({experimentKey:T.D3.elements_session}),r._maybeEmitPaymentResponse({type:"token",payload:e})),r._hasRegisteredListener("paymentmethod")?r._controller.action.createPaymentMethodWithData({elementName:l,type:"card",paymentMethodData:{card:{token:o.id},billing_details:{email:r._initialOptions.__billingDetailsEmailOverride||a,phone:c}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?s("invalid_payer_email"):(r._report("fatal.pr.token_to_payment_method_failed",{error:e.error,token:o.id}),s("fail")):r._maybeEmitPaymentResponse({type:"paymentmethod",payload:(0,u.Z)((0,u.Z)({},i),{},{paymentMethod:e.object})})})):r._hasRegisteredListener("source")&&r._controller.action.createSourceWithData({elementName:l,type:"card",sourceData:{token:o.id,owner:{email:r._initialOptions.__billingDetailsEmailOverride||a,phone:c}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?s("invalid_payer_email"):(r._report("fatal.pr.token_to_source_failed",{error:e.error,token:o.id}),s("fail")):r._maybeEmitPaymentResponse({type:"source",payload:(0,u.Z)((0,u.Z)({},i),{},{source:e.object})})}))},r._canMakePaymentForBackingLibrary=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipEnrollmentCheck:!1,useCheckoutAvailabilityCheck:!1},n=r._backingLibraries[e];if(!n){var o="Unexpectedly calling canMakePayment on uninitialized backing library ".concat(e);throw new Error(o)}return H.J.race([new H.J((function(e){return setTimeout(e,1e4)})).then((function(){return{available:!1}})),n.canMakePayment({skipEnrollmentCheck:t.skipEnrollmentCheck,useCheckoutAvailabilityCheck:t.useCheckoutAvailabilityCheck,locale:r._locale})]).then((function(t){var n=t.available,o="LINK"===e&&t.linkExperimentAssignments?t.linkExperimentAssignments:null;return r._canMakePaymentAvailability=(0,u.Z)((0,u.Z)({},r._canMakePaymentAvailability),{},(0,m.Z)({},e,n)),{backingLibraryName:e,available:n,linkExperimentAssignments:o}}))},r._isGooglePayOnAndroid=function(){var e=r._initialOptions.wallets,t=e&&-1===e.indexOf("googlePay"),n=!!r._canMakePaymentAvailability.BROWSER;return E.sV&&!t&&n},r._constructCanMakePaymentResponse=function(){var e=r._isGooglePayOnAndroid();return{applePay:!!r._canMakePaymentAvailability.APPLE_PAY,googlePay:!!r._canMakePaymentAvailability.GOOGLE_PAY||e,link:!!r._canMakePaymentAvailability.LINK}},r.canMakePayment=Z((function(){r._report("pr.can_make_payment"),r._controller.action.cmpStatusChange({cmpTriggered:!0});var e=!r._initialOptions.__isCheckout;if(r._canMakePaymentResolved){var t,n=null!==r._activeBackingLibrary?r._constructCanMakePaymentResponse():null;return r._report("pr.can_make_payment_response",{response:n,cached:!0,activeBackingLibrary:r._activeBackingLibrary,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency}),H.J.resolve(n)}if("https:"!==window.location.protocol)return kt||(r._controller.warn("If you are testing Apple Pay or Google Pay, you must serve this page over HTTPS as it will not work over HTTP. Please read https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites for more details."),kt=!0),r._canMakePaymentResolved=!0,r._controller.deferredCanMakePaymentResponse.resolve(null),H.J.resolve(null);var o=r._queryStrategy.map((function(e){return function(){return r._canMakePaymentForBackingLibrary(e)}})),i=[];if(-1!==r._queryStrategy.indexOf("LINK"))if(r._initialOptions.__linkOnly&&r._initialOptions.__isCheckout){o=[function(){return r._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0,useCheckoutAvailabilityCheck:!0})}]}else[o,i].forEach((function(e){return e.push((function(){return r._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0,useCheckoutAvailabilityCheck:!1})}))}));var a=new wt.E,c=(0,Y.tN)(o,(function(e){var t=e.backingLibraryName,n=e.available;return n&&(r._activeBackingLibraryName=t,r._activeBackingLibrary=r._backingLibraries[t],r._buttonTypeName=r._activeBackingLibraryName,r._isGooglePayOnAndroid()&&(r._buttonTypeName="GOOGLE_PAY")),n})),s=e?(0,Y.tN)(i,(function(e){e.backingLibraryName;return e.available})):null;return e?H.J.all([c,s]).then((function(e){var t,n=new wt.E,o=e[0],i=e[1];r._canMakePaymentResolved=!0,"SATISFIED"===o.type&&-1!==["APPLE_PAY","GOOGLE_PAY","BROWSER"].indexOf(o.value.backingLibraryName)&&"SATISFIED"===(null==i?void 0:i.type)&&(r._secondaryActiveBackingLibraryName=i.value.backingLibraryName,r._secondaryActiveBackingLibrary=r._backingLibraries[i.value.backingLibraryName],r._secondaryButtonTypeName=r._secondaryActiveBackingLibraryName);var c=null;return"SATISFIED"===o.type&&(c=r._constructCanMakePaymentResponse()),r._report("pr.can_make_payment_response",{response:c,cached:!1,duration:a.getElapsedTime(n),activeBackingLibrary:r._activeBackingLibrary,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency}),r._controller.deferredCanMakePaymentResponse.resolve(c),c})):c.then((function(e){var t,n=new wt.E;r._canMakePaymentResolved=!0;var o=null;return"SATISFIED"===e.type&&(o=r._constructCanMakePaymentResponse()),r._report("pr.can_make_payment_response",{response:o,cached:!1,duration:a.getElapsedTime(n),activeBackingLibrary:r._activeBackingLibrary,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency}),r._controller.deferredCanMakePaymentResponse.resolve(o),o}))})),r.update=Z((function(e){if(r._isShowing)throw r._report("pr.update_called_while_showing"),new I.No("You cannot update Payment Request options while the payment sheet is showing.");r._privateForcedUpdate(e)})),r._privateForcedUpdate=function(e){var t,n=(0,b.Gu)(se,e,"PaymentRequest update()"),o=n.value,i=n.warnings;r._report("pr.update"),i.forEach((function(e){return r._warn(e)})),o.shippingOptions&&!(null===(t=r._initialOptions)||void 0===t?void 0:t.requestShipping)&&r._report("pr.update_shipping_options_without_shipping"),o.total&&(r._reportOnlyTotal=o.total),o.currency&&(r._reportOnlyCurrency=o.currency),(0,A.VO)(r._backingLibraries).forEach((function(e){e&&e.update(o)}))},r.show=Z((function(){var e;if(r._usedByButtonElement&&!r._showCalledByButtonElement&&(r._report("pr.show_called_with_button"),r._warn("Do not call show() yourself if you are using the paymentRequestButton Element. The Element handles showing the payment sheet.")),!r._canMakePaymentResolved)throw r._report("pr.show_called_before_can_make_payment"),new I.No("You must first check the Payment Request API's availability using paymentRequest.canMakePayment() before calling show().");if(!r._activeBackingLibrary)throw r._report("pr.show_called_with_can_make_payment_false"),new I.No("Payment Request is not available in this browser.");"LINK"!==r._activeBackingLibraryName||r._initialOptions.__linkOnly||(r._usedByButtonElement||r._report("pr.show_called_with_link_custom_button"),!r._showCalledByButtonElement&&r._usedByButtonElement&&r._report("pr.show_called_with_link_hybrid_button"));var t=null;if("secondary"===r._lastClickedButtonPosition){if(!r._secondaryActiveBackingLibrary)throw Error('The relevant backing library for position "'.concat(r._lastClickedButtonPosition,'" was unavailable.'));t=r._secondaryActiveBackingLibrary}else t=r._activeBackingLibrary;var n=r._showCalledByButtonElement?"pr.show_from_element":"pr.show_from_custom";r._report(n),r._report("pr.show",{amount:null===(e=r._reportOnlyTotal)||void 0===e?void 0:e.amount,currency:r._reportOnlyCurrency,listeners:Object.keys(r._callbacks).sort()}),r._isShowing=!0,t.show({locale:r._locale})})),r.abort=Z((function(){if(r._activeBackingLibrary){var e=r._activeBackingLibrary;r._report("pr.abort"),e.abort()}})),r.isShowing=function(){return r._isShowing},r._controller=e.controller,r._authentication=e.authentication,r._mids=e.mids,r._listenerRegistry=e.listenerRegistry;var o=(0,b.Gu)((e.betas,(0,b.mC)({displayItems:(0,b.jt)((0,b.CT)(re)),shippingOptions:(0,b.jt)((0,b.uw)("id")((0,b.CT)(oe))),wallets:(0,b.jt)((0,b.CT)(b.kw.apply(void 0,(0,l.Z)(J())))),disableWallets:(0,b.jt)((0,b.CT)(b.kw.apply(void 0,(0,l.Z)(J())))),blockedCardBrands:(0,b.jt)((0,b.CT)(b.kw.apply(void 0,(0,l.Z)(T.iw)))),total:ne,requestShipping:(0,b.jt)(b.Xg),requestPayerName:(0,b.jt)(b.Xg),requestPayerEmail:(0,b.jt)(b.Xg),requestPayerPhone:(0,b.jt)(b.Xg),shippingType:(0,b.jt)(ae),currency:b.cV,country:b.hN,jcbEnabled:(0,b.jt)(b.Xg),__billingDetailsEmailOverride:(0,b.jt)(b.Z_),__minApplePayVersion:(0,b.jt)(b.Rx),__minGooglePayVersion:(0,b.jt)(ie),__merchantDetails:(0,b.jt)(ce),__linkOnly:(0,b.jt)(b.Xg),__isCheckout:(0,b.jt)(b.Xg),__isHostedInvoicePage:(0,b.jt)(b.Xg),__checkoutSessionId:(0,b.jt)(b.Z_),__isPaymentElement:(0,b.jt)(b.Xg),__isExpressCheckoutElement:(0,b.jt)(b.Xg),__betas:(0,b.jt)((0,b.CT)(b.z$.apply(void 0,(0,l.Z)(P.Lv)))),__supportsCouponCode:(0,b.jt)(b.Xg),__couponCode:(0,b.jt)(b.Z_)})),e.rawOptions||{},"paymentRequest()"),i=o.value,a=o.warnings;if(r._report("pr.options",{options:(0,A.ei)(i,["country","currency","jcbEnabled","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","disableWallets","wallets","blockedCardBrands"])}),a.forEach((function(e){return r._warn(e)})),i.__billingDetailsEmailOverride&&i.requestPayerEmail)throw new I.No("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");var c=J(),s=i.disableWallets,d=s?c.filter((function(e){return-1===s.indexOf(e)})):i.wallets;return e.queryStrategyOverride?r._queryStrategy=e.queryStrategyOverride:i.__linkOnly?r._queryStrategy=["LINK"]:r._queryStrategy=de(d||c),r._report("pr.query_strategy",{queryStrategy:r._queryStrategy}),r._initialOptions=(0,u.Z)((0,u.Z)({},i),{},{__betas:e.betas,wallets:d}),r._reportOnlyCurrency=i.currency,r._reportOnlyTotal=i.total,r._initBackingLibraries(r._initialOptions),r}(0,v.Z)(t,e);var n=(0,g.Z)(t);return t}(G),St=Et,Ct={base:(0,b.jt)(b.Ry),complete:(0,b.jt)(b.Ry),empty:(0,b.jt)(b.Ry),invalid:(0,b.jt)(b.Ry),paymentRequestButton:(0,b.jt)(b.Ry)},Pt={classes:(0,b.jt)((0,b.mC)({base:(0,b.jt)(b.Z_),complete:(0,b.jt)(b.Z_),empty:(0,b.jt)(b.Z_),focus:(0,b.jt)(b.Z_),invalid:(0,b.jt)(b.Z_),webkitAutofill:(0,b.jt)(b.Z_)})),hidePostalCode:(0,b.jt)(b.Xg),hideIcon:(0,b.jt)(b.Xg),disableLink:(0,b.jt)(b.Xg),showIcon:(0,b.jt)(b.Xg),disableMultipleButtons:(0,b.jt)(b.Xg),style:(0,b.jt)((0,b.mC)(Ct)),iconStyle:(0,b.jt)((0,b.kw)("solid","default")),value:(0,b.jt)((0,b.or)(b.Z_,b.Ry)),__privateCvcOptional:(0,b.jt)(b.Xg),__privateValue:(0,b.jt)((0,b.or)(b.Z_,b.Ry)),__privateEmitIbanValue:(0,b.jt)(b.Xg),error:(0,b.jt)((0,b.mC)({type:b.Z_,code:(0,b.jt)(b.Z_),decline_code:(0,b.jt)(b.Z_),param:(0,b.jt)(b.Z_)})),locale:(0,b.yv)("elements()"),fonts:(0,b.yv)("elements()"),placeholder:(0,b.jt)(b.Z_),disabled:(0,b.jt)(b.Xg),placeholderCountry:(0,b.jt)(b.Z_),paymentRequest:(0,b.jt)((0,b.n2)(St,"stripe.paymentRequest(...)")),supportedCountries:(0,b.jt)((0,b.CT)(b.Z_)),accountHolderType:(0,b.jt)((0,b.kw)("individual","company")),issuingCard:(0,b.jt)(b.Z_),ephemeralKeySecret:(0,b.jt)(b.Z_),nonce:(0,b.jt)(b.Z_),toCopy:(0,b.jt)((0,b.kw)("number","cvc","expiry","pin"))},At=(0,b.mC)(Pt),It=(ft={},(0,m.Z)(ft,T.Yj.card,Je.NC.CARD_ELEMENT),(0,m.Z)(ft,T.Yj.cardNumber,Je.NC.CARD_ELEMENT),(0,m.Z)(ft,T.Yj.cardExpiry,Je.NC.CARD_ELEMENT),(0,m.Z)(ft,T.Yj.cardCvc,Je.NC.CARD_ELEMENT),(0,m.Z)(ft,T.Yj.postalCode,Je.NC.CARD_ELEMENT),(0,m.Z)(ft,T.Yj.paymentRequestButton,Je.NC.PAYMENT_REQUEST_ELEMENT),(0,m.Z)(ft,T.Yj.iban,Je.NC.IBAN_ELEMENT),(0,m.Z)(ft,T.Yj.idealBank,Je.NC.IDEAL_BANK_ELEMENT),(0,m.Z)(ft,T.Yj.p24Bank,Je.NC.P24_BANK_ELEMENT),(0,m.Z)(ft,T.Yj.auBankAccount,Je.NC.AU_BANK_ACCOUNT_ELEMENT),(0,m.Z)(ft,T.Yj.fpxBank,Je.NC.FPX_BANK_ELEMENT),(0,m.Z)(ft,T.Yj.issuingCardNumberDisplay,Je.NC.ISSUING_CARD_NUMBER_DISPLAY_ELEMENT),(0,m.Z)(ft,T.Yj.issuingCardCopyButton,Je.NC.ISSUING_CARD_COPY_BUTTON_ELEMENT),(0,m.Z)(ft,T.Yj.issuingCardCvcDisplay,Je.NC.ISSUING_CARD_CVC_DISPLAY_ELEMENT),(0,m.Z)(ft,T.Yj.issuingCardExpiryDisplay,Je.NC.ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT),(0,m.Z)(ft,T.Yj.issuingCardPinDisplay,Je.NC.ISSUING_CARD_PIN_DISPLAY_ELEMENT),(0,m.Z)(ft,T.Yj.epsBank,Je.NC.EPS_BANK_ELEMENT),(0,m.Z)(ft,T.Yj.netbankingBank,Je.NC.NETBANKING_BANK_ELEMENT),(0,m.Z)(ft,T.Yj.afterpayClearpayMessageModal,Je.NC.AFTERPAY_MESSAGE_MODAL_ELEMENT),(0,m.Z)(ft,T.Yj.autocompleteSuggestions,Je.NC.AUTOCOMPLETE_SUGGESTIONS_ELEMENT),(0,m.Z)(ft,T.Yj.achBankSearchResults,Je.NC.ACH_BANK_SEARCH_RESULTS_ELEMENT),ft),Nt=n(9144),Tt=function(e){var t=(0,k.Dx)(e,null);return!!t&&"rtl"===t.getPropertyValue("direction")},Mt=function(){document.activeElement&&document.activeElement.blur&&document.activeElement.blur()},Rt=n(7030),Ot=function(e){var t=document.createElement("input");return t.className=e,t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label"," "),t.setAttribute("autocomplete","false"),t.maxLength=1,t.disabled=!0,(0,k.yq)(t,Nt.ZS),t},jt=function(e){var t=getComputedStyle(e);return"0px"!==t.borderBottomWidth||"none"!==t.boxShadow||"rgba(0, 0, 0, 0)"!==t.backgroundColor||"none"!==t.backgroundImage},Zt={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},xt=function(e){var t=e.name,n=e.value,r=e.expiresIn,o=e.path,i=e.domain,a=e.protocol,c=e.sameSite,s=void 0===c?"Lax":c,u=new Date,l=r||31536e6;u.setTime(u.getTime()+l);var p=o||"/",d=(n||"").replace(/[^!#-+\--:<-[\]-~]/g,encodeURIComponent),m="".concat(encodeURIComponent(t),"=").concat(d,";expires=").concat(u.toGMTString(),";path=").concat(p,";SameSite=").concat(s);return i&&(m+=";domain=".concat(i)),"https:"===a&&(m+=";secure"),document.cookie=m,m},Lt=function(e){var t=(0,A.sE)(document.cookie.split("; "),(function(t){var n=t.indexOf("=");try{return decodeURIComponent(t.substr(0,n))===e}catch(e){return!1}}));if(!t)return null;var n=t.indexOf("=");try{return decodeURIComponent(t.substr(n+1))}catch(e){return null}},Bt=n(3110),Dt=n.n(Bt),qt=T.Xk.replace(/\/$/,""),Ft="_1776170249",Ut="__1104211103",Gt=function(e){var t,n=(t={},(0,m.Z)(t,Ft,!0),(0,m.Z)(t,Ut,!1),t);try{var r=(0,S.vB)(e.slice(e.indexOf("?")+1));Object.keys(r).forEach((function(e){var t=Dt()(e),o=r[e];switch(t){case Ft:"false"===o&&(n[t]=!1);break;case Ut:"true"===o&&(n[t]=!0)}}))}catch(e){}return n}(function(e){try{if(e.currentScript)return e.currentScript.src;var t=e.querySelectorAll('script[src^="'.concat(qt,'"]')),n=(0,A.sE)(t,(function(e){var t=(e.getAttribute("src")||"").split("?")[0];return new RegExp("^".concat(qt,"/?$")).test(t)}));return n&&n.getAttribute("src")||""}catch(e){return""}}(document)),Ht=Gt[Ft],Yt=Gt[Ut],Kt=n(3852),zt=n(3538),Jt=n(4044),Wt=function(e){function t(e){var r,o=e.type,i=e.controllerId,a=e.listenerRegistry,c=e.betas,s=e.appParams;return(0,p.Z)(this,t),(r=n.call(this))._sendFAReq=function(e){var t=(0,w.To)(e.tag);return new H.J((function(n,o){r._requests[t]={resolve:n,reject:o},r._send({message:{action:"stripe-frame-action",payload:{nonce:t,faReq:e}},type:"outer",frameId:r.id,controllerId:r._controllerId})}))},r.action={perform3DS2Challenge:function(e){return r._sendFAReq({tag:"PERFORM_3DS2_CHALLENGE",value:e})},perform3DS2Fingerprint:function(e){return r._sendFAReq({tag:"PERFORM_3DS2_FINGERPRINT",value:e})},performOneClickWebauthnAuthentication:function(e){return r._sendFAReq({tag:"PERFORM_ONE_CLICK_WEBAUTHN_AUTHENTICATION",value:e})},show3DS2Spinner:function(e){return r._sendFAReq({tag:"SHOW_3DS2_SPINNER",value:e})},checkCanMakePayment:function(e){return r._sendFAReq({tag:"CHECK_CAN_MAKE_PAYMENT",value:e})},closeLightboxFrame:function(e){return r._sendFAReq({tag:"CLOSE_LIGHTBOX_FRAME",value:e})},openLightboxFrame:function(e){return r._sendFAReq({tag:"OPEN_LIGHTBOX_FRAME",value:e})},setFocusTarget:function(e){return r._sendFAReq({tag:"SET_FOCUS_TARGET",value:e})}},r.type=o,r.loaded=!1,r._controllerId=i,r._persistentMessages=[],r._queuedMessages=[],r._requests={},r._listenerRegistry=a,r.id=r._generateId(),r._iframe=r._createIFrame(o,c,s),r._on("load",(function(){r.loaded=!0,r._ensureMounted(),r.loaded&&(r._persistentMessages.forEach((function(e){return r._send(e)})),r._queuedMessages.forEach((function(e){return r._send(e)})),r._queuedMessages=[])})),r._on("title",(function(e){var t=e.title;r._iframe.setAttribute("title",t)})),r}(0,v.Z)(t,e);var n=(0,g.Z)(t);return(0,d.Z)(t,[{key:"_generateId",value:function(){return(0,w.To)("__privateStripeFrame")}},{key:"send",value:function(e){this._send({message:e,type:"outer",frameId:this.id,controllerId:this._controllerId})}},{key:"sendPersistent",value:function(e){this._ensureMounted();var t={message:e,type:"outer",frameId:this.id,controllerId:this._controllerId};this._persistentMessages=[].concat((0,l.Z)(this._persistentMessages),[t]),this.loaded&&(0,Je.oi)(t)}},{key:"resolve",value:function(e,t){this._requests[e]&&this._requests[e].resolve(t)}},{key:"reject",value:function(e,t){this._requests[e]&&this._requests[e].reject(t)}},{key:"_send",value:function(e){this._ensureMounted(),this.loaded?(0,Je.oi)(e):this._queuedMessages=[].concat((0,l.Z)(this._queuedMessages),[e])}},{key:"appendTo",value:function(e){this._emit("mount",{anchor:e}),e.appendChild(this._iframe)}},{key:"prependTo",value:function(e,t){this._emit("mount",{anchor:e,parent:t}),t.insertBefore(this._iframe,e)}},{key:"unmount",value:function(){this.loaded=!1,this._emit("unload")}},{key:"destroy",value:function(){this.unmount();var e=this._iframe.parentElement;e&&e.removeChild(this._iframe),this._emit("destroy")}},{key:"_ensureMounted",value:function(){this._isMounted()||this.unmount()}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._iframe)}},{key:"_createIFrame",value:function(e,t,n){var r=window.location.href.toString(),o="string"==typeof n?n:(0,S.qC)((0,u.Z)((0,u.Z)({},n||{}),{},{referrer:r,controllerId:this._controllerId})),i=document.createElement("iframe");i.setAttribute("name",this.id);var a=(0,Je.i7)(e);return Object.keys(a).forEach((function(e){i.setAttribute(e,a[e])})),(null==n?void 0:n.allowCamera)&&i.setAttribute("allow","camera"),i.src="".concat((0,Jt.D)(e)).concat(o?"#":"").concat(o),i}}]),t}(G),Vt=Wt,Xt=function(e){function t(e){var r;if((0,p.Z)(this,t),(r=n.call(this,e)).autoload=e.autoload||!1,"complete"===document.readyState)r._ensureMounted();else{var o=r._ensureMounted.bind((0,y.Z)(r));r._listenerRegistry.addEventListener(document,"DOMContentLoaded",o),r._listenerRegistry.addEventListener(window,"load",o),setTimeout(o,5e3)}return r}(0,v.Z)(t,e);var n=(0,g.Z)(t);return(0,d.Z)(t,[{key:"_ensureMounted",value:function(){r((0,zt.Z)(t.prototype),"_ensureMounted",this).call(this),this._isMounted()||this._autoMount()}},{key:"_autoMount",value:function(){var e=document.body;if(e){var t=document.querySelector("#stripe-hidden-frames-container")||e;this.appendTo(t)}else if("complete"===document.readyState||"interactive"===document.readyState)throw new I.No("Stripe.js requires that your page has a element.");this.autoload&&(this.loaded=!0)}},{key:"_createIFrame",value:function(e,n,o){var i=r((0,zt.Z)(t.prototype),"_createIFrame",this).call(this,e,n,o);return i.setAttribute("aria-hidden","true"),i.setAttribute("tabIndex","-1"),(0,k.SV)(i),i}}]),t}(Vt),Qt=Xt,$t=function(e){function t(){return(0,p.Z)(this,t),n.apply(this,arguments)}(0,v.Z)(t,e);var n=(0,g.Z)(t);return(0,d.Z)(t,[{key:"_generateId",value:function(){return this._controllerId}}]),t}(Qt),en=$t,tn="__privateStripeMetricsController",nn="merchant",rn="session",on="NA",an=function(e){return 42===e.length},cn=function(e,t,n){return n?!e||!an(e)&&an(t)?t:e:(0,w.Vj)()},sn=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,p.Z)(this,e),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(e){return function(n){var r=n.data,o=n.origin;if((0,S.Qg)(o)&&"string"==typeof r)try{var i=JSON.parse(r),a=i.originatingScript,c=i.payload;if("m2"===a){var s=c.guid,u=c.muid,l=c.sid;t._guid=s,t._muid=t._getID(nn,u),t._sid=t._getID(rn,l),e()}}catch(e){}}},n.checkoutIds){var r=n.checkoutIds,o=r.muid,i=r.sid;this._guid=on,this._muid=o,this._sid=i,this._doNotPersist="NA"!==o&&"NA"!==i}else this._guid=on,this._muid=this._getID(nn),this._sid=this._getID(rn),this._doNotPersist=!1;this._listenerRegistry=(0,Kt.E)(),this._idsPromise=new H.J((function(e){t._establishMessageChannel(e)})),this._id=(0,w.To)(tn),Ht&&(this._controllerFrame=new en({type:Je.NC.METRICS_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}),this._startIntervalCheck(),setTimeout(this._testLatency.bind(this),2e3+500*Math.random()))}return(0,d.Z)(e,[{key:"ids",value:function(){return{guid:this._guid,muid:this._muid,sid:this._sid}}},{key:"idsPromise",value:function(){var e=this;return this._idsPromise.then((function(){return e.ids()}))}},{key:"_establishMessageChannel",value:function(e){if(!Ht)return this._guid=(0,w.Vj)(),void e();this._listenerRegistry.addEventListener(window,"message",this._handleMessage(e))}},{key:"_startIntervalCheck",value:function(){var e=this,t=window.location.href;setInterval((function(){var n=window.location.href;n!==t&&(e.send((function(e){return{action:"ping",payload:{sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),t=n)}),5e3)}},{key:"report",value:function(e,t){this.send((function(n){return{action:"track",payload:{sid:n.sid,muid:n.muid,url:document.location.href,source:e,data:t,version:6}}}))}},{key:"send",value:function(e){var t=this;this._idsPromise.then((function(){try{t._controllerFrame&&t._controllerFrame.send(e(t.ids()))}catch(e){}}))}},{key:"_testLatency",value:function(){var e=this,t=new Date;this._listenerRegistry.addEventListener(document,"mousemove",(function n(){try{var r=new Date;e._latencies.push(r-t),e._latencies.length>=10&&(e.report("mouse-timings-10",e._latencies),e._listenerRegistry.removeEventListener(document,"mousemove",n)),t=r}catch(e){}}))}},{key:"_extractMetaReferrerPolicy",value:function(){var e=document.querySelector("meta[name=referrer]");return null!=e&&e instanceof HTMLMetaElement?e.content.toLowerCase():null}},{key:"_extractUrl",value:function(e){var t=document.location.href;switch(e){case"origin":case"strict-origin":case"origin-when-cross-origin":case"strict-origin-when-cross-origin":return document.location.origin;case"unsafe-url":return t.split("#")[0];default:return t}}},{key:"_buildFrameQueryString",value:function(){var e=this._extractMetaReferrerPolicy(),t=this._extractUrl(e),n={url:t,title:document.title,referrer:document.referrer,muid:this._muid,sid:this._sid,version:6,preview:(0,S.Qg)(t)};return null!=e&&(n.metaReferrerPolicy=e),Object.keys(n).map((function(e){return null!=n[e]?"".concat(e,"=").concat(encodeURIComponent(n[e].toString())):null})).join("&")}},{key:"_getID",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:on;switch(e){case nn:if(this._doNotPersist)return cn(this._muid,t,Ht);try{var n="__stripe_mid",r=cn(Lt(n),t,Ht);return an(r)&&xt({name:n,value:r,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict"}),r}catch(e){return on}case rn:if(this._doNotPersist)return cn(this._sid,t,Ht);try{var o="__stripe_sid",i=cn(Lt(o),t,Ht);return an(i)&&xt({name:o,value:i,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict",expiresIn:18e5}),i}catch(e){return on}default:throw new Error("Invalid ID type specified: ".concat(e))}}}]),e}(),un=null,ln=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un=new sn(e)},pn=!1,dn=function(){var e=un;e&&(pn||(pn=!0,e.send((function(e){return{action:"ping",payload:{v2:2,sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),e.send((function(t){return{action:"track",payload:{sid:t.sid,muid:t.muid,url:document.location.href,source:"mouse-timings-10-v2",data:e._latencies,version:6}}}))))},mn=["test_id"],fn=function(e){switch(e.type){case"object":return mn.push(e.object.id),{issuingCard:e.object};case"error":return{error:e.error};default:return(0,b.Rz)(e)}},_n=function(e){switch(e.type){case"object":return{nonce:e.object.public_nonce};case"error":return{error:e.error};default:return(0,b.Rz)(e)}},hn=function(e){return Math.round(parseFloat(e.replace("px","")))||0},yn=function(e,t){if(!e)return{source:"frame",outerHeight:Math.max(28,t.clientHeight),innerHeight:t.clientHeight,outerBorderRadius:0,outerPadding:null,hasInputBoxStyles:!1};var n,r,o,i,a,c,s,u,l,p,d,m=(r=t,o=(n=e).getBoundingClientRect(),i=r.getBoundingClientRect(),a=getComputedStyle(n),c=a.borderTopWidth,s=a.borderBottomWidth,u=a.borderLeftWidth,l=a.borderRightWidth,{top:i.top-o.top-hn(c),bottom:o.bottom-i.bottom-hn(s),left:i.left-o.left-hn(u),right:o.right-i.right-hn(l)}),f=t.clientHeight,_=2*Math.min(m.top,m.bottom)+f;return{source:"wrapper",outerHeight:Math.min(_,e.clientHeight),innerHeight:t.clientHeight,outerBorderRadius:(p=e,d=getComputedStyle(p),-1!==d.borderRadius.indexOf(" ")?0:hn(d.borderRadius)),outerPadding:m,hasInputBoxStyles:jt(e)}},vn=function(e){return new H.J((function(t){(0,k.d3)(e,(function(){(0,k.w3)(e).then((function(){var n;try{n=function(e){for(var t=e.parentElement,n=0,r=null,o=e.clientHeight,i=e.clientWidth,a=3*o,c=1.5*i;n<4&&null!==t;){var s=t,u=s.clientHeight,l=s.clientWidth;if(u>a||l>c)return 0===n?t:r;if(jt(t))return t;u>o&&(r=t,a=u),l>i&&(r=t,c=l),n+=1,t=t.parentElement}return r}(e)}catch(e){n=null}t(yn(n,e))}))}))}))},gn={margin:"0","user-select":"none",transform:"translate(0)","color-scheme":"only light",display:"block",position:"absolute",top:"50%",right:"0",height:"0",width:"0",padding:"0",border:"none",overflow:"hidden",opacity:"1",visibility:"visible"},bn=function(e){var t=e.parent,n=e.frame,r=e.locale,o=void 0===r?"en":r,i=e.controller,a=e.style,c=e.iconStyle,s=e.disabled,l=e.onSubmit,p=e.onLoad,d=e.onError,m=null,f=(0,it.Nj)(o),_=!1,h="",y=(0,Jt.D)("LINK_BUTTON_FOR_CARD_ELEMENT"),v=document.createElement("iframe");v.setAttribute("frameborder","0"),v.setAttribute("allowTransparency","true"),v.setAttribute("scrolling","no"),(0,k.yq)(v,gn),v.src="".concat(y,"#").concat((0,S.qC)({locale:f,style:a,iconStyle:c,disabled:s}));var g=function(e){var t,r,o=e.data,a=e.origin;if(e.source===v.contentWindow&&a===T.jQ&&-1!==(null===(t=o.action)||void 0===t?void 0:t.indexOf("card-element-link")))switch(o.action){case"card-element-link-load":_=!0,m&&(E(m),m=null),C(),p();break;case"card-element-link-measurements":n.send({action:"stripe-link-in-card-measurements",payload:o.payload});break;case"card-element-link-focus":n.send({action:"stripe-user-link-in-card-focus",payload:{isFocused:o.payload.isFocused}});break;case"card-element-link-click":n.send({action:"stripe-user-link-in-card-click",payload:{locale:f||"en",type:o.payload.type,isSecureClick:o.payload.isSecureClick,publishableKey:i._apiKey,stripeAccount:null!==(r=i._stripeAccount)&&void 0!==r?r:null,stripeJsId:i._stripeJsId,mids:i.mids()}});break;case"card-element-link-update-styles":(0,k.yq)(v,(0,u.Z)((0,u.Z)({},gn),o.payload));break;case"card-element-link-error":d(o.payload.reason||"");break;case"card-element-link-report":i.report(o.payload.event,(0,u.Z)({},o.payload.data));break;case"card-element-link-submit":l()}},b=function(e){var t;null==v||null===(t=v.contentWindow)||void 0===t||t.postMessage(e,T.jQ)},w=function(e){var t=e.isOpen;b({action:"card-element-link-popup-toggled",payload:{isOpen:t}})},E=function(e){_?(b({action:"card-element-link-user-update",payload:e}),e.locale&&(f=(0,it.Nj)(e.locale))):m=(0,u.Z)((0,u.Z)({},m),e)},C=(0,Y.$M)((function(){vn(t).then((function(e){"frame"===e.source&&i.report("link_in_card.outer_wrapper_not_found"),b({action:"card-element-link-outer-measurements",payload:e})}))})),P=function(){b({action:"card-element-link-payment-error"})},A=function(){b({action:"card-element-link-focus-button"})};return n._on("outer-link-card-popup-toggled",w),n._on("outer-link-card-user-update",E),n._on("outer-link-card-payment-error",P),v.addEventListener("focus",A,!1),window.addEventListener("message",g,!1),null==t||t.appendChild(v),i.report("link_in_card.mount_link_frame"),{unmount:function(){b({action:"card-element-link-unmount",payload:{}}),n._off("outer-link-card-popup-toggled",w),n._off("outer-link-card-user-update",E),n._off("outer-link-card-payment-error",P),v.removeEventListener("focus",A,!1),window.removeEventListener("message",g,!1),null==t||t.removeChild(v),i.report("link_in_card.unmount_link_frame")},updateButton:function(e){h=e,b({action:"card-element-link-state-change",payload:{nextLinkState:e}})},hasLoaded:function(){return _},getActiveButton:function(){return h},setLinkToken:function(e){b({action:"card-element-link-token-received",payload:{token:e}})},setFocusable:function(e){v.setAttribute("tabIndex",e?"0":"-1")},updateUserOptions:E,updateCardPaymentError:P}},wn={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},kn="#faffbd",En=function(e){return parseFloat(e.toFixed(1))},Sn=function(e){return/^\d+(\.\d*)?px$/.test(e)},Cn=function(){function e(t){var n=this;(0,p.Z)(this,e),this.focus=function(){if(n._isIssuingDisplayElement())throw new I.No("Cannot call focus() on an ".concat(n._componentName," Element."));document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),n._fakeInput.focus()},this._formSubmit=function(){for(var e=n._component.parentElement;e&&"FORM"!==e.nodeName;)e=e.parentElement;if(e){var t=document.createEvent("Event");t.initEvent("submit",!0,!0),e.dispatchEvent(t)}},this._unmountLinkButtonFrame=function(){n._linkButtonFrame&&((0,k.yq)(n._fakeInput,Nt.ZS),n._restrictFocusToCardOnly(),n._linkButtonFrame.unmount(),n._linkButtonFrame=void 0)},this._isActiveLinkButton=function(e){var t;return(null===(t=n._linkButtonFrame)||void 0===t?void 0:t.getActiveButton())===e},this._restrictFocusToLinkFrameOnly=function(){var e;n._fakeInput.setAttribute("tabIndex","-1"),null===(e=n._linkButtonFrame)||void 0===e||e.setFocusable(!0)},this._restrictFocusToCardOnly=function(){var e;n._fakeInput.removeAttribute("tabIndex"),null===(e=n._linkButtonFrame)||void 0===e||e.setFocusable(!1)},this._allowFrameAndCardFocus=function(){var e;n._fakeInput.removeAttribute("tabIndex"),null===(e=n._linkButtonFrame)||void 0===e||e.setFocusable(!0)},this._handleLinkStateChangeFocusBehavior=function(e){switch(n._frame._iframe.removeAttribute("tabIndex"),e?(0,k.yq)(n._fakeInput,(0,u.Z)((0,u.Z)({},Nt.ZS),{},{"z-index":"-1"})):(0,k.yq)(n._fakeInput,Nt.ZS),e){case"link-manage":n._frame._iframe.setAttribute("tabIndex","-1"),n._restrictFocusToLinkFrameOnly();break;case"link-pay":n._focused?n._restrictFocusToLinkFrameOnly():n._restrictFocusToCardOnly();break;case"link-save":n._focused?n._restrictFocusToLinkFrameOnly():n._allowFrameAndCardFocus();break;default:n._restrictFocusToCardOnly()}};var r=t.options,o=t.component,i=t.listenerRegistry,a=t.elementTimings,c=t.emitEvent,s=t.getParent,l=t.hasRegisteredListener,d=(0,A.CE)(r,["loader","appearance","clientSecret"]),m=d.controller,f=d.componentName,_=d.publicOptions,h=d.betas;this._componentName=f,this._component=o,this._controller=m,this._listenerRegistry=i,this._emitEvent=c,this._getParent=s,this._hasRegisteredListener=l;var y=(0,b.Gu)(At,_||{},"create()"),v=y.value;y.warnings.forEach((function(e){return n._controller.warn(e)}));var g,w=v.paymentRequest,E=v.classes,S=v.issuingCard,C="paymentRequestButton"===this._componentName;if(C){if(!w)throw new I.No("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=w;var P=d.locale;this._paymentRequest._registerElement(),this._paymentRequest._updateLocale(P)}if(this._isIssuingDisplayElement()){var N=0===(h||[]).length;if(!S)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(N){if(!("nonce"in v)||!("ephemeralKeySecret"in v))throw new Error("You must set the nonce and ephemeralKeySecret options to use this Element.")}else if(g=S,-1===mn.indexOf(g))throw new Error("Issuing card ".concat(S," has not been retrieved."))}this._createElement(d,v,a),this._classes=wn,this._computeCustomClasses(E||{}),this._lastBackgroundColor="",this._focused=!1,this._empty=!C,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._lastSubmittedAt=null}return(0,d.Z)(e,[{key:"update",value:function(e){var t=this,n=(0,b.Gu)(At,e||{},"element.update()"),r=n.value;if(n.warnings.forEach((function(e){return t._controller.warn(e)})),r){var o={style:r.style,iconStyle:r.iconStyle,disabled:r.disabled};this._linkButtonFrame?this._linkButtonFrame.updateUserOptions(o):this._queuedLinkButtonFrameUpdates=(0,u.Z)((0,u.Z)({},this._queuedLinkButtonFrameUpdates),o);var i=r.classes,a=(0,f.Z)(r,["classes"]);i&&(this._removeClasses(),this._computeCustomClasses(i),this._updateClasses()),this._updateFrameHeight(r),Object.keys(a).length&&(this._frame.update(a),this._secondaryFrame&&this._secondaryFrame.update(a))}}},{key:"blur",value:function(){if(this._isIssuingDisplayElement())throw new I.No("Cannot call blur() on an ".concat(this._componentName," Element."));this._frame.blur(),this._fakeInput.blur()}},{key:"clear",value:function(){this._frame.clear()}},{key:"unmount",value:function(){var e=this._getParent(),t=this._label;e&&(this._listenerRegistry.removeEventListener(e,"click",this.focus),this._removeClasses()),t&&(this._listenerRegistry.removeEventListener(t,"click",this.focus),this._label=null),this._secondaryFrame&&(this._secondaryFrame.unmount(),this._listenerRegistry.removeEventListener(window,"click",this._handleOutsideClick)),this._unmountLinkButtonFrame(),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){if((0,k.qW)(document,this._component)){this._controller.report("user_error.shadow_dom_mount",{element:this._componentName});var e=function(){throw new I.No("Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.")};"test"===this._controller.keyMode()?e():setTimeout(e,0)}if(this._paymentRequest){if(!this._paymentRequest._canMakePaymentResolved)throw new I.No("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new I.No("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new wt.E,this._findPossibleLabel(),this._updateClasses()}},{key:"_isIssuingDisplayElement",value:function(){return"issuingCardNumberDisplay"===this._componentName||"issuingCardCvcDisplay"===this._componentName||"issuingCardExpiryDisplay"===this._componentName||"issuingCardPinDisplay"===this._componentName}},{key:"_updateClasses",value:function(){var e=this._getParent();e&&(0,k.mb)(e,[[this._classes.base,!0],[this._classes.empty,this._empty],[this._classes.focus,this._focused],[this._classes.invalid,this._invalid],[this._classes.complete,this._complete],[this._classes.webkitAutofill,this._autofilled]])}},{key:"_removeClasses",value:function(){var e=this._getParent();e&&(0,k.mb)(e,[[this._classes.base,!1],[this._classes.empty,!1],[this._classes.focus,!1],[this._classes.invalid,!1],[this._classes.complete,!1],[this._classes.webkitAutofill,!1]])}},{key:"_findPossibleLabel",value:function(){var e=this._getParent();if(e){var t,n=e.getAttribute("id");if(n&&(t=document.querySelector("label[for='".concat(n,"']"))),t)this._listenerRegistry.addEventListener(e,"click",this.focus);else for(t=t||e.parentElement;t&&"LABEL"!==t.nodeName;)t=t.parentElement;t?(this._label=t,this._listenerRegistry.addEventListener(t,"click",this.focus)):this._listenerRegistry.addEventListener(e,"click",this.focus)}}},{key:"_computeCustomClasses",value:function(e){var t={};return Object.keys(e).forEach((function(n){if(!wn[n])throw new I.No("".concat(n," is not a customizable class name.\nYou can customize: ").concat(Object.keys(wn).join(", ")));var r=e[n]||wn[n];t[n]=r.replace(/\./g," ")})),this._classes=(0,u.Z)((0,u.Z)({},this._classes),t),this}},{key:"_setupEvents",value:function(e,t,n){var r,o=this,i=e.stripeJsLoadTimestamp,a=(e.stripeCreateTimestamp,e.groupCreateTimestamp),c=e.createTimestamp,s=null,p=!1,d={stripeJsLoad:i.getAsPosixTime(),stripeCreate:c.getAsPosixTime(),groupCreate:a.getAsPosixTime(),create:c.getAsPosixTime()};if(this._controller.deferredCanMakePaymentResponse.promise.then((function(e){o._frame.send({action:"stripe-can-make-payment-response",payload:e})})),this._frame._on("outer-link-card-user-update",(function(e){var t=e.locale;!o._linkButtonFrame&&t&&(o._queuedLinkButtonFrameUpdates=(0,u.Z)((0,u.Z)({},o._queuedLinkButtonFrameUpdates),{},{locale:t}))})),this._frame._on("outer-link-card-token",(function(e){var t,n=e.token;(null===(t=o._linkButtonFrame)||void 0===t?void 0:t.hasLoaded())?o._linkButtonFrame.setLinkToken(n):s=n})),this._frame._on("outer-link-card-payment-error",(function(){var e;(null===(e=o._linkButtonFrame)||void 0===e?void 0:e.hasLoaded())?o._linkButtonFrame.updateCardPaymentError():p=!0})),this._frame._on("outer-link-card-button",(function(e){var t,n=e.nextLinkState;(null===(t=o._linkButtonFrame)||void 0===t?void 0:t.hasLoaded())?(o._linkButtonFrame.updateButton(n),o._handleLinkStateChangeFocusBehavior(n)):r=n})),this._frame._on("outer-link-card-mount",(function(){var e,i,a,c,u;o._linkButtonFrame=bn({frame:o._frame,parent:o._component,locale:(null===(e=o._queuedLinkButtonFrameUpdates)||void 0===e?void 0:e.locale)||t.locale,controller:o._controller,style:(null===(i=o._queuedLinkButtonFrameUpdates)||void 0===i?void 0:i.style)||(null==n?void 0:n.style),iconStyle:(null===(a=o._queuedLinkButtonFrameUpdates)||void 0===a?void 0:a.iconStyle)||(null==n?void 0:n.iconStyle),disabled:null!=(null===(c=o._queuedLinkButtonFrameUpdates)||void 0===c?void 0:c.disabled)?null===(u=o._queuedLinkButtonFrameUpdates)||void 0===u?void 0:u.disabled:null==n?void 0:n.disabled,onSubmit:function(){o._frame._emit("submit")},onLoad:function(){var e,t,n;r&&(null===(e=o._linkButtonFrame)||void 0===e||e.updateButton(r),o._handleLinkStateChangeFocusBehavior(r),r="");s&&(null===(t=o._linkButtonFrame)||void 0===t||t.setLinkToken(s),s=null);p&&(null===(n=o._linkButtonFrame)||void 0===n||n.updateCardPaymentError(),p=!1)},onError:function(e){o._frame.send({action:"stripe-link-in-card-eject",payload:{reason:e}}),o._unmountLinkButtonFrame()}})})),this._frame._on("outer-link-card-unmount",(function(){return o._unmountLinkButtonFrame()})),this._frame._on("load",(function(e){var t=e.source,n=o._getParent(),r=Tt(n),i=o._paymentRequest?o._paymentRequest._buttonTypeName:null,a=o._paymentRequest?o._paymentRequest._secondaryButtonTypeName:null;o._mountTimestamp&&(d.mount=o._mountTimestamp.getAsPosixTime());var c={timestamps:d,matchFrame:t===o._frame._iframe.contentWindow,rtl:r,paymentRequestButtonType:i,secondaryPaymentRequestButtonType:a},s=function(e,t){o._frame.send({action:"stripe-user-mount",payload:(0,u.Z)((0,u.Z)({},c),{},{linkExperimentAssignments:e,arb_id:t})})};-1!==[i,a].indexOf("LINK")?o._controller.action.retrieveLinkConfig().then((function(e){var t,n,r,o;"object"===e.type&&(t=null===(r=e.object.experiments)||void 0===r?void 0:r.experiment_assignments,n=null===(o=e.object.experiments)||void 0===o?void 0:o.arb_id);s(t,n)})):s()})),this._secondaryFrame){var m=this._secondaryFrame;m._on("load",(function(e){var t=e.source;o._mountTimestamp&&(d.mount=o._mountTimestamp.getAsPosixTime()),m.send({action:"stripe-user-mount",payload:{timestamps:d,matchFrame:t===m._iframe.contentWindow,rtl:!1,paymentRequestButtonType:null}})}))}this._frame._on("redirectfocus",(function(e){var t=e.focusDirection,n=(0,k.dh)(o._component,t);n&&n.focus()})),this._frame._on("focus",(function(){(o._isActiveLinkButton("link-pay")||o._isActiveLinkButton("link-save"))&&o._restrictFocusToLinkFrameOnly(),o._focused=!0,o._updateClasses()})),this._frame._on("blur",(function(){o._isActiveLinkButton("link-pay")?o._restrictFocusToCardOnly():o._isActiveLinkButton("link-save")&&o._allowFrameAndCardFocus(),o._focused=!1,o._updateClasses(),o._lastSubmittedAt&&"paymentRequestButton"===o._componentName&&(o._controller.report("payment_request_button.sheet_visible",{latency:o._lastSubmittedAt.getElapsedTime()}),o._lastSubmittedAt=null)})),this._frame._on("submit",(function(e){if("paymentRequestButton"===o._componentName){o._lastSubmittedAt=new wt.E;var t=!1,n=!1;dn(),o._emitEvent("click",{preventDefault:function(){o._controller.report("payment_request_button.default_prevented"),t&&o._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),n=!0}}),!n&&o._paymentRequest&&(o._paymentRequest._updateLastClickedButtonPosition(null==e?void 0:e.buttonPosition),o._paymentRequest._elementShow(),t=!0)}else o._emitEvent("submit"),o._formSubmit()})),["ready","focus","blur","escape","click"].forEach((function(e){o._frame._on(e,(function(){o._emitEvent(e)}))})),this._frame._on("change",(function(e){dn();var t={},n=F._0[o._componentName]||[];["error","value","empty","complete"].concat((0,l.Z)(n)).forEach((function(n){return t[n]=e[n]})),o._emitEvent("change",t),o._empty=t.empty,o._invalid=!!t.error,o._complete=t.complete,o._updateClasses()})),this._frame._on("__privateIntegrationError",(function(e){var t=e.message;o._emitEvent("__privateIntegrationError",{message:t})})),this._frame._on("networkschange-start",(function(){o._hasRegisteredListener("networkschange")&&o._controller.action.isCardMetadataRequired({groupId:t.groupId}).then((function(e){return e&&o._emitNetworksChangeEvent(null,!0),o._controller.action.retrieveCardNetworks({groupId:t.groupId})})).then((function(e){e&&o._emitNetworksChangeEvent(e,!1)}))})),this._frame._on("dimensions",(function(e){if("paymentRequestButton"!==o._componentName){var t=o._getParent();if(t){var n=(0,k.Dx)(t,null);if(n){var r=parseFloat(n.getPropertyValue("height")),i=e.height;if("border-box"===n.getPropertyValue("box-sizing")){var a=parseFloat(n.getPropertyValue("padding-top")),c=parseFloat(n.getPropertyValue("padding-bottom"));r=r-parseFloat(n.getPropertyValue("border-top"))-parseFloat(n.getPropertyValue("border-bottom"))-a-c}var s=En(r),u=En(i);0!==r&&s1&&void 0!==arguments[1]&&arguments[1],n=e.style;if("paymentRequestButton"===this._componentName){var r=n&&n.paymentRequestButton||{},o=r.height,i="string"==typeof o?o:void 0;(t||i)&&(this._frame.updateStyle({height:i||this._lastHeight||W,minHeight:"auto"}),this._lastHeight=i||this._lastHeight)}else{var a=n&&n.base||{},c=a.lineHeight,s=a.fontSize,u=a.padding,l="string"!=typeof c||isNaN(parseFloat(c))?void 0:c,p="string"==typeof s?s:void 0,d="string"==typeof u?u:void 0;if(p&&!Sn(p)&&this._controller.warn("The fontSize style you specified (".concat(p,") is not in px. We do not recommend using relative css units, as they will be calculated relative to our iframe's styles rather than your site's.")),t||l||p){var m=-1===T.T2.indexOf(this._componentName)?void 0:d||this._lastPadding,f=(0,k.Tf)(l||this._lastHeight,p||this._lastFontSize,m);this._frame.updateStyle({height:f}),this._lastFontSize=p||this._lastFontSize,this._lastHeight=l||this._lastHeight,this._lastPadding=m}}}},{key:"_createElement",value:function(e,t,n){var r=this,o=(e.controller,e.publicOptions,e.componentName),i=e.groupId,a=(0,f.Z)(e,["controller","publicOptions","componentName","groupId"]),c=(t.classes,t.paymentRequest,(0,f.Z)(t,["classes","paymentRequest"])),s=this._component,l=Ot(Rt.Kb);(0,k.yq)(s,Zt);var p=Tt(document.body),d=It[o],m=(0,u.Z)((0,u.Z)((0,u.Z)({},a),c),{},{rtl:p}),_=this._controller.createElementFrame(d,o,i,m);if(_._on("load",(function(){l.disabled=!1})),this._listenerRegistry.addEventListener(l,"focus",(function(){_.focus()})),_.appendTo(s),F._y[o]){var h=F._y[o].secondary,y=this._controller.createSecondaryElementFrame(d,h,o,i,m);y&&y.on&&y.on("height-change",(function(e){y.updateStyle({height:"".concat(e.height,"px")})})),this._secondaryFrame=y,y.appendTo(s),this._listenerRegistry.addEventListener(window,"click",(function(){return r._handleOutsideClick()}))}if(s.appendChild(l),E.Ah&&o!==T.Yj.paymentRequestButton){var v=function(){var e=Ot(Rt.tk);return e.setAttribute("tabindex","-1"),e}();s.appendChild(v)}this._frame=_,this._fakeInput=l,this._setupEvents(n,e,t),this._updateFrameHeight(t,!0)}}]),e}(),Pn=Cn,An={amount:b.Rx,currency:(0,b.kw)("USD"),logoColor:(0,b.jt)((0,b.kw)("primary","black","white")),fontColor:(0,b.jt)(b.Z_),fontSize:(0,b.jt)(b.Z_),textAlign:(0,b.jt)(b.Z_),stripeMerchantId:(0,b.jt)(b.Z_)},In=(0,b.mC)(An),Nn=function(e){var t=!1;window.Promise||(t=!0,window.Promise=H.J);var n=e();return t&&window.Promise===H.J&&delete window.Promise,n},Tn=function(){return Nn((function(){return n.e(1).then(n.bind(n,6167))}))},Mn=function(e){var t,r=e.options,o=(0,f.Z)(e,["options"]),i=e.emitEvent,a=e.listenerRegistry,c=r.controller,s=r.componentName,p=r.publicOptions,d=r.groupId,m=new wt.E,_=function(e){var t=(0,b.Gu)(In,e||{},"create()"),n=t.value,r=t.warnings;if(!Math.floor(n.amount)===n.amount)throw new I.No("'Amount' must be a whole integer number that represents the lowest denomination (cents).");return r.forEach((function(e){return c.warn(e)})),n},h=_(p),y=function(e,n){return e.apply(void 0,[t].concat((0,l.Z)(n)))},v=[],g=function(e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o-1&&r.keyMode()===Fe.Kl.unknown)throw new I.No("It looks like you're using an older Stripe key. The Address Element is only available for use with a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys");var s=ar(c,i||{},"elements.create('".concat(c,"')"),!1,t.betas);s.warnings.forEach((function(e){return r.warn(e)}));var l=["payment","linkAuthentication"].indexOf(o)>-1,p="payment"===t.componentName&&(s.value.parsedIntentSecret||null);if(l&&!t.clientSecret&&!t.deferredIntent&&!p)throw new I.No("In order to create a ".concat(t.componentName,' element, you must pass a valid PaymentIntent or SetupIntent client secret when creating the Elements group.\n\n e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})'));var d=Br((0,u.Z)((0,u.Z)({},n),{},{options:(0,u.Z)((0,u.Z)({},a),{},{controller:r,componentName:c,publicOptions:s.value})})),m=d.update,_=(0,f.Z)(d,["update"]);return(0,u.Z)({update:function(e){var n=ar(c,e||{},"".concat(c,".update()"),!0,t.betas);n.warnings.forEach((function(e){return r.warn(e)})),m(n.value)}},_)},qr=function(e){var t,r=e.emitEvent,o=e.options,i=o.controller,a=o.locale,c=o.publicOptions,s=a?(0,it.jR)(a):"en",p=new wt.E,d=function(e){var t=(0,b.Gu)(Ln,e||{},"create()"),n=t.value;return t.warnings.forEach((function(e){return i.warn(e)})),n},m=d(c),f=function(e,n){return e.apply(void 0,[t].concat((0,l.Z)(n)))},_=[],h=function(e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},o=n.reason,i=void 0===o?"fail":o,a="invalid_shipping_address"===i?new window.ApplePayError("shippingContactInvalid"):new window.ApplePayError("unknown");e.completePayment({status:No,errors:[a]}),t.action.expressCheckoutConfirmEnd({groupId:r})},billingDetails:f,shippingAddress:p?{name:null!==(c=To(u))&&void 0!==c?c:"",address:p}:void 0,shippingRate:_};t.action.setExpressCheckoutConfirmData({groupId:r,shippingContact:{name:To(u),address:l,phone:null},paymentMethodData:{type:C.GS.card,card:{token:o.object.id},billing_details:{email:null==u?void 0:u.emailAddress,phone:null==u?void 0:u.phoneNumber}}}).then((function(){return n.confirm(h)}))}))})))};return{shouldShowButton:function(e){return t.action.shouldShowEceButton({groupId:r,shouldShowButton:e,button:"applePay"})},clickHandler:function(e,n){var o,c,p,d=window.ApplePaySession;if(!d)return t.warn("User clicked on the Apple Pay button, but window.ApplePaySession does not exist."),void t.report("ece.apple_pay.missing_window_session");var m=(null===(o=n.business)||void 0===o?void 0:o.name)||e.businessName,f=e.currency,_=e.pending;a.total=e.amount,a.businessName=m,a.currency=f,a.pending=_,a.shippingRates=n.shippingRates,a.selectedShippingRate=null===(c=n.shippingRates)||void 0===c?void 0:c[0].id,a.allowedShippingCountries=n.allowedShippingCountries,a.lineItems=null===(p=n.lineItems)||void 0===p?void 0:p.map((function(e){var t=e.amount,n=e.name;return Oo(t,n,f,_)})),function(e){var t=e.amount,n=e.billingAddressRequired,r=e.businessName,o=e.merchantCountry,i=e.currency,a=e.emailRequired,c=e.lineItems,s=e.pending,u=e.phoneNumberRequired,p=e.shippingAddressRequired,d=e.shippingRates,m=e.applePay,f=e.defaultBillingAgreement,_=e.warn,h=e.localizeString,y=e.betas,v=[].concat((0,l.Z)(a?["email"]:[]),(0,l.Z)(u?["phone"]:[]),(0,l.Z)(p?["postalAddress"]:[])),g=n?["postalAddress"]:[],b=null==d?void 0:d.map((function(e){return Zo(h,e,i)}));return H.J.all(null!=b?b:[]).then((function(e){var n=null==c?void 0:c.map((function(e){var t=e.amount,n=e.name;return Oo(t,n,i,s)})),a=(m||{recurringPaymentRequest:void 0}).recurringPaymentRequest,u=["supports3DS"];return(0,P.uN)(y,"cup_apple_pay_beta_1")&&u.push("supportsEMV"),{countryCode:o,currencyCode:i.toUpperCase(),lineItems:n,merchantCapabilities:u,requiredBillingContactFields:g,requiredShippingContactFields:v,shippingMethods:e.length?e:void 0,supportedNetworks:jo(o,y,i),total:Oo(t,r,i,s),recurringPaymentRequest:He({recurringPaymentRequest:a,currency:i,pending:s,defaultBillingAgreement:f,warn:_})}}))}((0,u.Z)((0,u.Z)((0,u.Z)({},e),n),{},{businessName:m,warn:t.warn,localizeString:function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})},betas:i})).then((function(e){var n;a.isUsingRecurringPaymentRequest=!!e.recurringPaymentRequest,a.recurringPaymentRequestBillingAgreement=null===(n=e.recurringPaymentRequest)||void 0===n?void 0:n.billingAgreement;var o=new d(4,e);a.privateSession=o,s(o,m),o.begin(),a.isPaymentSheetShowing=!0,t.action.expressCheckoutSheetOpened({groupId:r,paymentMethodType:"apple_pay"}),t.report("ece.sheet_visible",{payment_method:"apple_pay"})}))},canMakePayments:function(e){var n=window.location.hostname,r=t.getCredentials().stripeAccount,o=t.keyMode()===Fe.Kl.test;return he(n,r,o,t.report,4,e)},completePayment:function(e){if(e){var n,o=new window.ApplePayError("unknown");null===(n=a.privateSession)||void 0===n||n.completePayment({status:No,errors:[o]}),t.action.expressCheckoutConfirmEnd({groupId:r})}else{var i;null===(i=a.privateSession)||void 0===i||i.completePayment({status:Io}),c()}}}},Do=function(e){return e.map((function(e){return{label:e.name,amount:e.amount}}))},qo=function(e,t){return e.map((function(e){return Ao(e.deliveryEstimate||{},t).then((function(t){return{amount:e.amount,label:e.displayName,detail:t||"",id:e.id}}))}))},Fo=function(e){var t=e.controller,n=e.eventHandlers,r=e.groupId,o={shippingRates:void 0,allowedShippingCountries:void 0,pending:!1,confirmResolve:null},i=function(e){return(null==e?void 0:e.toUpperCase())||""},a=function(e){var a=e.token,c=e.payerName,s=e.payerEmail,u=e.payerPhone,l=e.shippingAddress,p=e.shippingOption,d=e.paymentDetailsId,m=e.clientSecret,f=i(null==l?void 0:l.country)||void 0,_={name:(null==l?void 0:l.recipient)||void 0,address:{line1:(null==l?void 0:l.addressLine[0])||void 0,line2:(null==l?void 0:l.addressLine[1])||void 0,city:(null==l?void 0:l.city)||void 0,state:(null==l?void 0:l.region)||void 0,postal_code:(null==l?void 0:l.postalCode)||void 0,country:f},phone:(null==l?void 0:l.phone)||void 0},h=i(a.card.address_country),y={line1:a.card.address_line1||void 0,line2:a.card.address_line2||void 0,city:a.card.address_city||void 0,state:a.card.address_state||void 0,postal_code:a.card.address_zip||void 0,country:h||void 0},v=y||s||u?{name:c||void 0,email:s||void 0,phone:u||void 0,address:y}:void 0,g=(0,A.sE)(o.shippingRates||[],(function(e){return e.id===(null==p?void 0:p.id)}));return new H.J((function(e){var i,a={paymentMethodType:"link",paymentFailed:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.reason,i=void 0===o?"fail":o;t.action.expressCheckoutConfirmEnd({groupId:r}),e({status:i})},billingDetails:v,shippingAddress:l?{name:null!==(i=l.recipient)&&void 0!==i?i:void 0,address:{line1:l.addressLine[0],line2:l.addressLine[1],city:l.city,state:l.region,postal_code:l.postalCode,country:f}}:void 0,shippingRate:g};t.action.expressCheckoutConfirmStart({groupId:r,paymentMethodType:"link"}).then((function(){return t.action.setExpressCheckoutLinkPaymentMethodData({groupId:r,clientSecret:m,paymentDetailsId:d})})).then((function(){return t.action.setExpressCheckoutConfirmData({groupId:r,shippingContact:_,paymentMethodData:{type:C.GS.link,billing_details:v}})})).then((function(){return n.confirm(a)})),o.confirmResolve=e}))},c=function(e,n){var r=e.amount&&{total:{amount:e.amount,label:"Total"}},i=e.lineItems&&{displayItems:e.lineItems&&Do(e.lineItems)};e.shippingRates?H.J.all(qo(e.shippingRates,(function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})}))).then((function(t){o.shippingRates=e.shippingRates,n((0,u.Z)((0,u.Z)((0,u.Z)({},r),i),{},{shippingOptions:t,status:"success"}))})):n((0,u.Z)((0,u.Z)((0,u.Z)({},r),i),{},{status:"success"}))},s=function(e){var t=e.shippingAddress;return new H.J((function(e){var r=i(null==t?void 0:t.country),a={city:t.city,state:t.dependentLocality,postal_code:t.postalCode,country:r};if(o.allowedShippingCountries&&o.allowedShippingCountries.length&&-1===o.allowedShippingCountries.indexOf(a.country))e({status:"invalid_shipping_address"});else{var s={paymentMethodType:"link",name:t.recipient,address:a,resolve:function(t){return c(t,e)},reject:function(){e({status:"invalid_shipping_address"})}};n.shippingAddressChange(s)}}))},l=function(e){var r=e.shippingOption;return new H.J((function(e){var i=(0,A.sE)(o.shippingRates||[],(function(e){return e.id===r.id}));if(!i)return(0,b.Rz)(r,"User selected a new shipping method within the Link popup, but it was not one of the shipping rates the merchant passed in."),void t.report("ece.link.errors.unexpected_shipping_rate");var a={paymentMethodType:"link",shippingRate:i,resolve:function(t){return c(t,e)},reject:function(){e({status:"fail"})}};n.shippingRateChange(a)}))},p=function(){o.pending=!1,t.action.expressCheckoutSheetClosed({groupId:r}),t.action.expressCheckoutConfirmEnd({groupId:r})},d=function(){p(),n.cancel({paymentMethodType:"link"})};return{clickHandler:function(e,n){var i=yt({stripeJsId:t._stripeJsId,publishableKey:t._apiKey,path:"/pay",height:708,width:500,onDisconnect:function(){d()},onClose:function(){o.pending&&d()}});i?(t.action.expressCheckoutSheetOpened({groupId:r,paymentMethodType:"link"}),t.report("ece.sheet_visible",{payment_method:"link"}),o.pending=!0,i.messenger.on("get_initial_state",function(e,n){return function(){var r,i={publishableKey:t._apiKey,stripeAccount:t._stripeAccount,merchantInfo:{businessName:(null===(r=n.business)||void 0===r?void 0:r.name)||e.businessName,country:e.merchantCountry},customerInfo:{country:e.customerCountry},locale:e.locale,integrationType:"express_checkout",stripeJsId:t._stripeJsId,mids:t.mids(),referrer:window.location.href.toString(),elementsSessionId:null,elementsAssignmentId:null};return o.shippingRates=n.shippingRates,o.allowedShippingCountries=n.allowedShippingCountries,i.paymentRequestOptions={__isExpressCheckoutElement:!0,country:e.merchantCountry,currency:e.currency,requestPayerEmail:n.emailRequired,requestPayerName:n.billingAddressRequired,requestPayerPhone:n.phoneNumberRequired,requestShipping:n.shippingAddressRequired,displayItems:n.lineItems&&Do(n.lineItems),total:{amount:e.amount,label:"Total"}},o.shippingRates?H.J.all(qo(o.shippingRates,(function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})}))).then((function(e){return i.paymentRequestOptions.shippingOptions=e,i})):i}}(e,n)),i.messenger.on("link_pbe_payment_data",a),i.messenger.on("link_prb_shipping_address_change",s),i.messenger.on("link_prb_shipping_option_change",l)):t.report("ece.link.errors.popup_blocked")},completePayment:function(e){e?(o.confirmResolve({status:"fail"}),t.action.expressCheckoutConfirmEnd({groupId:r})):(o.confirmResolve({status:"success"}),p())}}},Uo=function(e){var t,n,r,o=e.component,i=e.elementTimings,a=e.getParent,c=e.emitEvent,s=e.options,l=e.selfDestruct,p=e.hasRegisteredListener,d=e.listenerRegistry,m=s.controller,f=s.groupId,_=s.publicOptions,h=s.betas,y=null,v={runOnUnmount:[],updateRequest:{isCalled:!1,inMerchantEventHandler:!1}},g=function(e){var t=e.controller,n=e.componentName,r=e.groupId,o=e.fonts,i=e.wait,a=e.publicOptions,c=e.controllingElement,s={fonts:o,wait:i,rtl:Tt(document.body),publicOptions:a,controllingElement:c};return t.createElementFrame(Je.NC.EXPRESS_CHECKOUT_ELEMENT,n,r,s)}(s);(0,k.yq)(o,(0,u.Z)((0,u.Z)({},wo),{},{margin:"-4px 0",transition:"height .35s ease"})),g.appendTo(o),g.updateStyle(ko),g._on("set_styles",(function(e){g.updateStyle(e)})),g._on("redirectfocus",(function(e){var t,n=e.focusDirection;null===(t=(0,k.dh)(o,n))||void 0===t||t.focus()})),g._on("load",(function(){if(!s.deferredIntent)throw new I.No("In order to use the Express Checkout Element, you must specify a `mode` on stripe.elements() instead of `clientSecret`.");g.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:i.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:i.stripeCreateTimestamp.getAsPosixTime(),groupCreate:i.groupCreateTimestamp.getAsPosixTime(),create:i.createTimestamp.getAsPosixTime(),mount:y?y.getAsPosixTime():0},rtl:Tt(a())}})})),g._on("update-start",(function(){v.updateRequest.inMerchantEventHandler&&(v.updateRequest.isCalled=!0)})),g._on("update-end",(function(){var e,t;null===(e=(t=v.updateRequest).resolve)||void 0===e||e.call(t),v.updateRequest.isCalled=!1}));var w=function(e){new H.J((function(e){v.updateRequest.isCalled?v.updateRequest.resolve=e:e()})).then((function(){return s.controller.action.getElementsSessionAmountModeCurrency({groupId:f})})).then((function(t){var n=t.amount,r=t.mode,o=t.currency;v.amount=n,e(n,o,r)}))},E=function(e,t){var n=t.paymentMethodType,r=!("nonce"in t),o="ece.".concat("shippingaddresschange"===e?"shipping_address_change":"shipping_rate_change");if(m.report(o,{payment_method:n}),p(e)){var i;i=r?function(){t.reject(),v.updateRequest.inMerchantEventHandler=!1}:function(){g.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce}}),v.updateRequest.inMerchantEventHandler=!1};var a=So({controller:m,eventName:e,time:19900,timeLabel:"20 seconds",reject:function(){m.report("".concat(o,".reject"),{payment_method:n}),i()},resolve:function(i){w((function(a,c,s){v.lastCurrency&&c!==v.lastCurrency&&Co();var l=function(e,t,n){var r=(0,b.Gu)((0,b.jt)((0,b.mC)(_o)),e,"".concat(t," event resolve callback")),o=r.value,i=r.warnings,a=null!=o?o:{};if(n){var c=vo(a);a=c.value,c.warnings.forEach((function(e){return i.push(e)}))}if(o){var s=o.shippingRates;if(s&&!s.length)throw new I.No("You must specify `shippingRates`.")}return{value:a,warnings:i}}(i,e,"setup"===s),p=l.value;l.warnings.forEach((function(e){return m.warn(e)})),m.report("".concat(o,".resolve"),{payment_method:n,hasLineItems:!!p.lineItems,hasShippingRates:!!p.shippingRates}),v.lineItems=p.lineItems||v.lineItems,yo(a,v.lineItems),r?t.resolve((0,u.Z)((0,u.Z)({},p),{},{amount:a})):g.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:(0,u.Z)((0,u.Z)({},p),{},{amount:a})}})})),v.updateRequest.inMerchantEventHandler=!1},canMerchantReject:!0}),s=a.resolve,l=a.reject;return v.updateRequest.inMerchantEventHandler=!0,void c(e,(0,u.Z)((0,u.Z)({},"name"in t?{name:t.name,address:t.address}:{shippingRate:t.shippingRate}),{},{reject:l,resolve:s}))}w((function(e,n){v.lastCurrency&&n!==v.lastCurrency&&Co(),r?t.resolve({amount:e}):g.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:{amount:e}}})}))},S=function(e){c("cancel");var t=e.paymentMethodType;m.report("ece.cancel",{payment_method:t})},C=function(e){var t=e.paymentMethodType,n=e.billingDetails,r=e.shippingAddress,o=e.shippingRate;if(m.report("ece.confirm",{payment_method:t}),!p("confirm"))throw new I.No("Unhandled expressCheckout Element confirm event. Make sure to register a confirm handler.");c("confirm",{paymentMethodType:t,billingDetails:n,shippingAddress:r,shippingRate:o,paymentFailed:function(n){var r=function(e){var t=(0,b.Gu)((0,b.jt)((0,b.mC)(ho)),e,"confirm event paymentFailed callback"),n=t.value;return{value:null!=n?n:{},warnings:t.warnings}}(n),o=r.value;r.warnings.forEach((function(e){return m.warn(e)})),m.report("ece.confirm.payment_failed",{payment_method:t,reason:o.reason}),m.action.getIsAwaitingConfirmCallback({groupId:f}).then((function(t){if(!t)throw new I.No("Unexpected call to paymentFailed(). Ensure you are either submitting a payment or calling paymentFailed() once per expressCheckout Element confirm event.");!("nonce"in e)?e.paymentFailed(o):g.send({action:"stripe-ece-confirm-payment",payload:{nonce:e.nonce,paymentFailedPayload:o}})}))}})},P=Bo({controller:m,eventHandlers:{cancel:function(e){return S(e)},shippingAddressChange:function(e){return E("shippingaddresschange",e)},shippingRateChange:function(e){return E("shippingratechange",e)},confirm:C},groupId:f,listenerRegistry:d,betas:h}),N=Fo({controller:m,eventHandlers:{cancel:function(e){return S(e)},shippingAddressChange:function(e){return E("shippingaddresschange",e)},shippingRateChange:function(e){return E("shippingratechange",e)},confirm:C},groupId:f});"always"===(null===(t=_.wallets)||void 0===t?void 0:t.applePay)?P.canMakePayments(!1).then((function(e){P.shouldShowButton(e)})):"never"===(null===(n=_.wallets)||void 0===n?void 0:n.applePay)?P.shouldShowButton(!1):P.canMakePayments(!0).then((function(e){P.shouldShowButton(e)})),"never"!==(null===(r=_.wallets)||void 0===r?void 0:r.googlePay)&&"https:"!==window.location.protocol&&(m.action.shouldShowEceButton({groupId:f,button:"googlePay",shouldShowButton:!1}),m.warn("You are testing over HTTP, so Google Pay will not appear. You must use HTTPS in order to use Google Pay.")),g._on("ece-outer-pm-complete-payment",(function(e){"apple_pay"===e.paymentMethodType?P.completePayment(e.isError):"link"===e.paymentMethodType&&N.completePayment(e.isError)})),g._on("cancel",(function(e){S(e)})),g._on("click",(function(e){var t=e.paymentMethodType,n="apple_pay"===t,r="link"===t,o="click";if(m.report("ece.click",{payment_method:t}),p(o)){var i=function(){v.updateRequest.inMerchantEventHandler=!1};n||r||(i=function(){g.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce}})},v.updateRequest.inMerchantEventHandler=!1);var a=So({controller:s.controller,eventName:o,time:800,timeLabel:"1 second",reject:i,resolve:function(o){w((function(i,a,c){var s;v.lastCurrency=a;var l=function(e,t,n){var r,o=(0,b.Gu)((0,b.jt)((0,b.mC)(fo)),e,"click event resolve callback"),i=o.value,a=o.warnings,c={};if(i){var s=(0,qn.Jo)(null==i?void 0:i.allowedShippingCountries);c=(0,u.Z)((0,u.Z)({},i),{},{allowedShippingCountries:s.allowedCountries||void 0}),s.warnings.forEach((function(e){return a.push(e)}))}if(t){var l=vo(c);c=l.value,l.warnings.forEach((function(e){return a.push(e)}))}var p=_e(14)&&n;if((null===(r=c.applePay)||void 0===r?void 0:r.recurringPaymentRequest)&&!p&&a.push("`applePay.recurringPaymentRequest` is only supported with Apple Pay in Safari 16.0+ and iOS 16.0+."),i){var d=i.shippingAddressRequired,m=i.shippingRates;if(d&&(!m||!m.length))throw new I.No("When `shippingAddressRequired` is true, you must specify `shippingRates`.")}return{value:c,warnings:a}}(o,"setup"===c,n),p=l.value;l.warnings.forEach((function(e){return m.warn(e)})),m.report("ece.click.options",(0,u.Z)((0,u.Z)({},(0,A.ei)(p,["allowedShippingCountries","business","billingAddressRequired","emailRequired","phoneNumberRequired","shippingAddressRequired"])),{},{usesApplePayRecurringPayment:!!(null===(s=p.applePay)||void 0===s?void 0:s.recurringPaymentRequest),hasLineItems:!!p.lineItems,hasShippingRates:!!p.shippingRates,payment_method:t})),v.lineItems=p.lineItems||v.lineItems,yo(i,v.lineItems),n?P.clickHandler((0,u.Z)((0,u.Z)({},e),{},{amount:i,currency:a}),p):r?N.clickHandler((0,u.Z)((0,u.Z)({},e),{},{amount:i,currency:a}),p):g.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,clickPayload:(0,u.Z)((0,u.Z)({},p),{},{amount:i})}})})),v.updateRequest.inMerchantEventHandler=!1},canMerchantReject:!1}).resolve;return v.updateRequest.inMerchantEventHandler=!0,void c(o,{paymentMethodType:t,resolve:a})}w((function(t,o){v.lastCurrency=o,n?P.clickHandler((0,u.Z)((0,u.Z)({},e),{},{amount:t,currency:o}),Eo):r?N.clickHandler((0,u.Z)((0,u.Z)({},e),{},{amount:t,currency:o}),Eo):g.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,clickPayload:{amount:t}}})}))})),g._on("shippingaddresschange",(function(e){return E("shippingaddresschange",e)})),g._on("shippingratechange",(function(e){return E("shippingratechange",e)})),g._on("confirm",C);return g._on("load-error",(function(e){c("loaderror",{error:e}),l()})),go.forEach((function(e){g._on(e,(function(t){return c(e,t)}))})),{update:function(e){g.update(e)},focus:function(){Mt(),g.focus(),g.send({action:"stripe-user-focus",payload:{}})},blur:function(){g.blur()},clear:function(){throw new I.No("clear() is not supported by the Express Checkout Element.")},mount:function(){y=new wt.E;var e=a();e&&((0,k.mb)(e,[[bo,!0]]),v.runOnUnmount.push((function(){(0,k.mb)(e,[[bo,!1]])})))},unmount:function(){for(;v.runOnUnmount.length;){var e;null===(e=v.runOnUnmount.pop())||void 0===e||e()}g.unmount()},destroy:function(){s.controller.action.resetExpressCheckoutState({groupId:f})},_frame:g}},Go=function(e){var t=e.options,n=(0,f.Z)(e,["options"]),r=t.controller,o=t.publicOptions,i=(t.componentName,(0,f.Z)(t,["controller","publicOptions","componentName"]));if(r.keyMode()===Fe.Kl.unknown)throw new I.No("It looks like you're using an older Stripe key. The Pay Button Element is only available for use with a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys");var a,c=(a=o||{},(0,b.Gu)((0,b.mC)(so),a,"elements.create('expressCheckout', options)"));"payButton"===e.options.componentName&&c.warnings.push("Pay Button Element is now Express Checkout Element.\nIt is advised to switch to the Express Checkout Element. For more information,\nsee https://stripe.com/docs/elements/express-checkout-element."),c.warnings.forEach((function(e){return r.warn(e)}));var s=Uo((0,u.Z)((0,u.Z)({},n),{},{options:(0,u.Z)((0,u.Z)({},i),{},{controller:r,componentName:"expressCheckout",publicOptions:c.value})})),l=s.update,p=(0,f.Z)(s,["update"]);return(0,u.Z)((0,u.Z)({},p),{},{update:function(e){var t=function(e){return(0,b.Gu)((0,b.mC)(co),e,"expressCheckoutElement.update()")}(e||{}),n=t.value;t.warnings.forEach((function(e){return r.warn(e)})),l(n)}})},Ho=function(e,t){var n=function(e){if(!F.YA[e])throw new Error("Unexpected Element type: ".concat(e,"."));return F.YA[e].implementation}(e);switch(n){case"legacy":return new Pn(t);case"affirm_message":return Mn(t);case"afterpay_message":return Zn(t);case"payment_method_messaging":return Fr(t);case"frame":return Dr(t);case"cart":return Qr(t);case"express_checkout":return Go(t);default:return(0,b.Rz)(n,"Unexpected implementation type: ".concat(n,"."))}},Yo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,u.Z)((0,u.Z)((0,u.Z)({},(0,A.ei)(e,["business","fields","readOnly","terms","allowedCardBrands","disallowedCardBrands","blockPoBox","validation","display","layout","paymentMethodOrder","wallets","buttonHeight","accountHolderType","disabled","hideIcon","hidePostalCode","disableMultipleButtons","iconStyle","placeholderCountry","rtl","showIcon","supportedCountries","betas","componentName","groupId","locale","loader","externalPaymentMethodTypes"])),e.autocomplete&&{disableAutocomplete:"disabled"===e.autocomplete.mode}),e.contacts&&{contacts:e.contacts.length})},Ko=function(e){function t(e,r,o){var i,a;(0,p.Z)(this,t),(a=n.call(this)).mount=Z((function(e){var t;if(a._checkDestroyed(),!e)throw new I.No("Missing argument. Make sure to call mount() with a valid DOM element or selector.");if("string"==typeof e){var n=document.querySelectorAll(e);if(n.length>1&&a._controller.warn("The selector you specified (".concat(e,") applies to ").concat(n.length," DOM elements that are currently on the page.\nThe Stripe Element will be mounted to the first one.")),!n.length)throw new I.No("The selector you specified (".concat(e,") applies to no DOM elements that are currently on the page.\nMake sure the element exists on the page before calling mount()."));t=n[0]}else{if(!e.appendChild)throw new I.No("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new I.No("Stripe Elements must be mounted in a DOM element that\ncan contain child nodes. `input` elements are not permitted to have child\nnodes. Try using a `div` element instead.");t.children.length&&t!==document.body&&a._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),a._mountToParent(t)})),a.update=Z((function(e){return a._controller.report("update",{options:Yo(e),element:a._componentName,element_mode:a._componentMode}),a._checkDestroyed(),a._implementation.update(e),(0,y.Z)(a)})),a.focus=Z((function(e){return a._checkDestroyed(),e&&e.preventDefault(),a._implementation.focus(),(0,y.Z)(a)})),a.blur=Z((function(){return a._checkDestroyed(),a._implementation.blur(),(0,y.Z)(a)})),a.clear=Z((function(){return a._checkDestroyed(),a._implementation.clear(),(0,y.Z)(a)})),a.collapse=Z((function(){if(a._checkDestroyed(),!a._implementation.collapse)throw new I.No("Collapse is not supported by the ".concat(a._componentName," Element."));return a._implementation.collapse(),(0,y.Z)(a)})),a.show=Z((function(){if(a._checkDestroyed(),!a._implementation.show)throw new I.No("show() is not supported by the ".concat(a._componentName," Element."));return a._implementation.show(),(0,y.Z)(a)})),a.hide=Z((function(){if(a._checkDestroyed(),!a._implementation.hide)throw new I.No("hide() is not supported by the ".concat(a._componentName," Element."));return a._implementation.hide(),(0,y.Z)(a)})),a.addLineItem=Z((function(e){if(a._checkDestroyed(),a._implementation.addLineItem)return a._implementation.addLineItem(e);throw new I.No("addLineItem() is not supported by the ".concat(a._componentName," Element."))})),a.cancelCheckout=Z((function(e){if(a._checkDestroyed(),!a._implementation.cancelCheckout)throw new I.No("cancelCheckout() is not supported by the ".concat(a._componentName," Element."));return a._implementation.cancelCheckout(e),(0,y.Z)(a)})),a.unmount=Z((function(){return a._checkDestroyed(),a._unmount(),(0,y.Z)(a)})),a.destroy=Z((function(){var e,t;return a._checkDestroyed(),a.unmount(),null===(e=(t=a._implementation).destroy)||void 0===e||e.call(t),a._destroyed=!0,a._emitEvent("destroy"),(0,y.Z)(a)})),a.getValue=Z((function(){a._checkDestroyed();var e=new Set(["address"]);if(a._implementation.getValue&&e.has(a._componentName))return a._implementation.getValue();throw new I.No("getValue is not supported by the ".concat(a._componentName," Element."))})),a._getParent=function(){return a._parent},a._emitEvent=function(e,t){if("loaderror"!==e||a._hasRegisteredListener("loaderror")||a._controller.keyMode()!==Fe.Kl.test||console.error("Unhandled ".concat(a._componentName," Element loaderror"),t),"cart"===a._componentName&&"checkout"===e&&!a._hasRegisteredListener("checkout"))throw new I.No("Unhandled Cart Element checkout event. Make sure to register a checkout handler.");return a._emit(e,(0,u.Z)({elementType:a._componentName},t))},a._cancelCheckout=function(e){"cart"===a._componentName&&a._controller._sendCaReq("cancelCheckout",{errorMessage:e,groupId:a._groupId})};var c=e.controller,s=e.componentName,l=e.groupId,d=e.locale,m=e.betas,f=e.mids;a._controller=c,a._componentName=s,a._componentMode=null===(i=e.publicOptions)||void 0===i?void 0:i.mode,a._destroyed=!1,a._groupId=l,a._mids=f;var _=document.createElement("div");return _.className=F.A2,a._component=_,c.report("create",{options:Yo((0,u.Z)({componentName:s,groupId:l,locale:d,betas:m},e.publicOptions)),element:s,element_mode:a._componentMode}),a._implementation=Ho(a._componentName,{options:e,component:_,listenerRegistry:r,elementTimings:o,emitEvent:a._emitEvent,getParent:a._getParent,hasRegisteredListener:a._hasRegisteredListener,selfDestruct:function(){a.destroy()}}),a}(0,v.Z)(t,e);var n=(0,g.Z)(t);return(0,d.Z)(t,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new I.No("This Element has already been destroyed. Please create a new one.")}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._component)}},{key:"_unmount",value:function(){var e=this._component.parentElement;e&&e.removeChild(this._component),this._controller.report("unmount",{element:this._componentName,element_mode:this._componentMode}),this._implementation.unmount(),this._parent=null}},{key:"_mountToParent",value:function(e){var t=this._component.parentElement,n=this._isMounted();if(e===t){if(n)return;this.unmount(),this._mountTo(e)}else if(t){if(n)throw new I.No("This Element is already mounted. Use `unmount()` to unmount the Element before re-mounting.");this.unmount(),this._mountTo(e)}else this._mountTo(e)}},{key:"_mountTo",value:function(e){for(this._parent=e;e.firstChild&&e!==document.body;)e.removeChild(e.firstChild);e.appendChild(this._component),this._controller.report("mount",{element:this._componentName,element_mode:this._componentMode}),this._implementation.mount()}}]),t}(G),zo=function(e,t){e._controller.report("legacy_private_property_used",{prop:t,componentName:e._componentName})};["_autofilled","_classes","_complete","_empty","_fakeInput","_focused","_frame","_invalid","_lastBackgroundColor","_lastFontSize","_lastHeight","_lastPadding","_lastSubmittedAt","_listenerRegistry","_paymentRequest"].forEach((function(e){Object.defineProperty(Ko.prototype,e,{enumerable:!1,get:function(){return zo(this,e),this._implementation[e]}})}));["_formSubmit","_isIssuingDisplayElement"].forEach((function(e){Object.defineProperty(Ko.prototype,e,{enumerable:!1,writable:!1,value:function(){return zo(this,e),this._implementation[e]()}})}));var Jo=Ko,Wo={mode:(0,b.jt)((0,b.AG)((0,b.kw)("payment","setup","subscription"))),amount:(0,b.jt)((0,b.AG)(b.MZ)),currency:(0,b.jt)((0,b.AG)(b.cV)),payment_method_types:(0,b.jt)((0,b.AG)((0,b.CT)(b.kw.apply(void 0,(0,l.Z)(Object.keys(C.GS)))))),setup_future_usage:(0,b.jt)((0,b.AG)((0,b.kw)("off_session","on_session"))),capture_method:(0,b.jt)((0,b.AG)((0,b.kw)("automatic","manual"))),payment_method_options:(0,b.jt)((0,b.AG)((0,b.mC)({us_bank_account:(0,b.jt)((0,b.mC)({verification_method:(0,b.jt)((0,b.kw)("automatic","instant","instant_or_skip","skip","microdeposits"))}))}))),payment_method_configuration:(0,b.jt)((0,b.AG)(b.Z_))},Vo={customerOptions:(0,b.jt)((0,b.mC)({customer:b.Z_,ephemeralKey:b.Z_}))},Xo=function(e){if(e)return(0,u.Z)((0,u.Z)((0,u.Z)({},e),e.hasOwnProperty("rules")?{rules:""}:null),e.hasOwnProperty("variables")?{variables:""}:null)},Qo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,u.Z)((0,u.Z)((0,u.Z)({},(0,A.ei)(e,["locale","loader","externalPaymentMethodTypes","mode","amount","currency","setup_future_usage","capture_method","payment_method_types"])),e.hasOwnProperty("fonts")?{fonts:""}:null),{},{appearance:Xo(e.appearance)},e.customerOptions?{customerOptions:{customer:e.customerOptions.customer}}:null)},$o=function(e){return"payment"===e.mode&&e.currency&&e.amount?{mode:"payment",currency:e.currency,amount:e.amount,capture_method:e.capture_method,setup_future_usage:e.setup_future_usage,payment_method_types:e.payment_method_types,payment_method_options:e.payment_method_options,payment_method_configuration:e.payment_method_configuration}:"setup"===e.mode?{mode:"setup",currency:e.currency,capture_method:e.capture_method,setup_future_usage:e.setup_future_usage,payment_method_types:e.payment_method_types,payment_method_options:e.payment_method_options}:"subscription"===e.mode&&e.currency&&"number"==typeof e.amount?{mode:"subscription",currency:e.currency,amount:e.amount,payment_method_types:e.payment_method_types,payment_method_options:e.payment_method_options}:void 0},ei=["mode","amount","currency","payment_method_types","capture_method","setup_future_usage","payment_method_options","payment_method_configuration"],ti=function(e,t,n){var r=e.mode,o=e.amount,i=e.currency;if("payment"===r){if((0,b.Gu)((0,b.mC)({amount:b.Rx,currency:b.Z_}),{amount:o,currency:i},"options").value.amount<=0)throw new I.No("Invalid value for ".concat(n,": `amount` must be greater than 0"));var a=e.payment_method_types,c=e.payment_method_configuration;if((null==a?void 0:a.length)&&c)throw new I.No("Invalid value for ".concat(n,": You may only specify one of these parameters: `payment_method_types` or `payment_method_configuration`."))}else if("setup"===r){if(t.amount)throw new I.No("Invalid value for ".concat(n,": `amount` is not applicable when `mode` is `'setup'`"))}else{if(!r&&Object.keys(t).length){var s=Object.keys(t);throw new I.No("Invalid value for ".concat(n,": `").concat(s.join("`, `"),"` ").concat(s.length>1?"are":"is"," only applicable when a `mode` is set."))}if("subscription"===r&&(0,b.Gu)((0,b.mC)({amount:b.Rx,currency:b.Z_}),{amount:o,currency:i},"options").value.amount<0)throw new I.No("Invalid value for ".concat(n,": `amount` must be 0 or greater"))}},ni=function(e){function t(e,r,o,i,a,c){var s;(0,p.Z)(this,t),(s=n.call(this)).getElement=Z((function(e){var t,n=(null!=(t=e)&&t.__elementType&&"string"==typeof t.__elementType&&"function"==typeof t?t.__elementType:null)||e;return U(n,s._betas),(0,A.sE)(s._elements,(function(e){return e._componentName===n}))||null})),s.update=Z((function(e){var t,n=(0,b.Gu)(function(e){return(0,b.mC)((0,u.Z)((0,u.Z)((0,u.Z)({locale:(0,b.jt)(b.Z_),appearance:(0,b.jt)(b.Ry)},Wo),Vo),(0,P.uN)(e,P.M4.elements_enable_deferred_intent_beta_1)?{clientSecret:(0,b.jt)((0,b.AG)(qn.Eu))}:{}))}(s._betas),e||{},"elements.update()"),r=n.value;if(n.warnings.forEach((function(e){return s._controller.warn(e)})),0!==Object.keys(r).length){var o,i=r.customerOptions,a=r.clientSecret,c=r.locale,l=r.appearance,p=(0,P.jk)(c,s._betas);if(p&&(s._controller.action.fetchLocale({locale:p}),s._elements.forEach((function(e){var t,n;t=e._implementation,"function"==typeof(null===(n=t._paymentRequest)||void 0===n?void 0:n._updateLocale)&&e._implementation._paymentRequest._updateLocale(p)}))),(0,P.uN)(s._betas,P.M4.elements_enable_deferred_intent_beta_1))if(!!Object.keys((0,A.ei)(r,["clientSecret"].concat(ei))).length){var d=(0,A.ei)(r,ei),m=(0,A.ei)(s._commonOptions,ei),f=(0,u.Z)((0,u.Z)({},m),d),h=!(0,A.Xy)(f,m);r.clientSecret&&ei.forEach((function(e){f[e]=null})),ti(f,d,"elements.update()"),h&&(o=$o(f))}r.hasOwnProperty("customerOptions")&&(s._customerOptions=i||null),r.hasOwnProperty("appearance")&&(s._commonOptions.appearance=l),r.hasOwnProperty("clientSecret")&&(s._commonOptions.clientSecret=a),p&&(s._commonOptions.locale=p),(0,_.Z)(s._commonOptions,o);var y=(0,A.sE)(s._elements,(function(e){return"expressCheckout"===e._componentName||"payButton"===e._componentName}));null==y||null===(t=y._implementation._frame)||void 0===t||t._emit("update-start"),s._controller.action.updateElementsOptions({clientSecret:a,customerOptions:i,locale:p,appearance:l,groupId:s._id,deferredIntent:o}).then((function(){var e;s._emit("update-end"),null==y||null===(e=y._implementation._frame)||void 0===e||e._emit("update-end")}))}})),s.create=x((function(e,t){var n=new wt.E;!function(e,t,n){if(U(e,n),F.YA[e].unique&&-1!==t.indexOf(e)){if("address"===e)throw new I.No("Can only create one Element of type ".concat(e,". See https://stripe.com/docs/elements/address-element?platform=web#use-address-element-with-other-elements for more information."));throw new I.No("Can only create one Element of type ".concat(e,"."))}var r=F.YA[e].conflict,o=(0,A.dq)(t,r);if(o.length){var i=o[0];throw new I.No("Cannot create an Element of type ".concat(e," after an Element of type ").concat(i," has already been created."))}}(e,s._elements.map((function(e){return e._componentName})),s._betas);var r=(0,u.Z)((0,u.Z)((0,u.Z)({},t),s._commonOptions),{},{componentName:e,groupId:s._id}),o=(r.paymentRequest,(0,f.Z)(r,["paymentRequest"])),i=(E.P0||E.JW)&&(0,S.qC)(o).length>2e3,a=!!s._pendingFonts||i;if("never"!==s._commonOptions.loader&&!s._isLoaderFrameMounted&&ur(e)){var c=function(e){return _t||((_t=e.createHiddenFrame(Je.NC.LOADER_UI_APP,{}))._on("generate-loader-ui",(function(e){_t.send({action:"generate-loader-ui",payload:{data:e}})})),_t._on("get-element-loader-ui",(function(e){_t.send({action:"get-element-loader-ui",payload:{data:e}})})),_t)}(s._controller);c._emit("generate-loader-ui",{rawAppearanceConfig:s._commonOptions.appearance}),s._isLoaderFrameMounted=!0}var p=new Jo((0,u.Z)((0,u.Z)({publicOptions:t},(0,A.CE)(s._commonOptions,ei)||{}),{},{deferredIntent:$o(s._commonOptions),componentName:e,groupId:s._id,fonts:i?null:s._commonOptions.fonts,controller:s._controller,wait:a,mids:s._mids}),s._listenerRegistry,(0,u.Z)((0,u.Z)({},s._timings),{},{createTimestamp:n}));return s._elements=[].concat((0,l.Z)(s._elements),[p]),p._on("destroy",(function(){s._elements=s._elements.filter((function(t){return t._componentName!==e}))})),i&&p._implementation.update({fonts:s._commonOptions.fonts}),p})),s.fetchUpdates=L((function(){if(s._commonOptions.clientSecret)return s._controller.action.fetchUpdates({clientSecret:s._commonOptions.clientSecret,customerOptions:s._customerOptions,locale:s._commonOptions.locale,groupId:s._id}).then((function(e){if("error"===(null==e?void 0:e.type)){var t=e.error,n=t.message,r=t.extra_fields;return(null==r?void 0:r.status)?{error:{message:n,status:r.status}}:{error:{message:n}}}return{}}));throw new I.No('In order to call fetchUpdates, you must pass a valid PaymentIntent or SetupIntent client secret when creating the Elements group.\n\n e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})')}));var d=new wt.E,m=(0,b.Gu)(function(e){var t={locale:(0,b.jt)(b.Z_),fonts:(0,b.jt)((0,b.CT)(b.Ry)),appearance:(0,b.jt)(b.Ry),clientSecret:(0,b.jt)(qn.Eu),loader:(0,b.jt)((0,b.kw)("auto","always","never")),externalPaymentMethodTypes:(0,b.jt)(Dn.iU)},n=(0,u.Z)((0,u.Z)((0,u.Z)({},t),(0,P.uN)(e,P.M4.elements_customers_beta_1)?Vo:{}),(0,P.uN)(e,P.M4.elements_enable_deferred_intent_beta_1)?Wo:{});return(0,b.mC)(n)}(i),c||{},"elements()"),v=m.value;if(m.warnings.forEach((function(t){return e.warn(t)})),(0,P.uN)(i,P.M4.elements_enable_deferred_intent_beta_1)){var g=(0,A.ei)(v,ei);if(ti(g,g,"elements.create()"),Object.keys(g).length&&v.clientSecret)throw new I.No("Invalid options for elements.create(): Expected either mode or clientSecret, but not both.")}(0,k.BO)(e.warn),e.report("elements",{options:Qo(v)}),v.loader||(v.loader="auto");var C=v.fonts,N=void 0===C?[]:C,T=v.locale,M=v.customerOptions,O=void 0===M?null:M,j=(0,f.Z)(v,["fonts","locale","customerOptions"]);s._customerOptions=O;var B=v.appearance?v.appearance:{};s._elements=[],s._id=(0,w.To)("elements"),s._timings=(0,u.Z)((0,u.Z)({},o),{},{groupCreateTimestamp:d}),s._controller=e,s._betas=i,s._listenerRegistry=r,s._mids=a,s._isLoaderFrameMounted=!1;var D=(0,P.jk)(T,i);s._controller.action.fetchLocale({locale:D||"auto"});var q=N.filter((function(e){return!e.cssSrc||"string"!=typeof e.cssSrc})).map((function(e){return(0,u.Z)((0,u.Z)({},e),{},{__resolveFontRelativeTo:window.location.href})})),G=N.map((function(e){return e.cssSrc})).reduce((function(e,t){return"string"==typeof t?[].concat((0,l.Z)(e),[t]):e}),[]).map((function(e){return(0,S.sD)(e)?e:(0,S.v_)(window.location.href,e)}));s._pendingFonts=G.length;var H=(0,P.uN)(i,P.M4.payment_element_beta_1)&&!j.clientSecret,Y=$o(j);return H||e.action.setupStoreForElementsGroup({clientSecret:j.clientSecret,deferredIntent:Y,customerOptions:O,loader:v.loader,locale:T,appearance:B,groupId:s._id,externalPaymentMethodTypes:j.externalPaymentMethodTypes}),s._commonOptions=(0,u.Z)((0,u.Z)({},j),{},{betas:i,appearance:B,locale:D,get fonts(){return q}}),G.forEach((function(e){if("string"==typeof e){var t=new wt.E;R(e).then((function(n){s._controller.report("font.loaded",{load_time:t.getElapsedTime(),font_count:n.length,css_src:e});var r=n.map((function(t){return(0,u.Z)((0,u.Z)({},t),{},{__resolveFontRelativeTo:e})}));s._controller.action.updateCSSFonts({fonts:r,groupId:s._id}),q.push.apply(q,(0,l.Z)(r))})).catch((function(n){s._controller.report("error.font.not_loaded",{load_time:t.getElapsedTime(),message:n&&n.message&&n.message,css_src:e}),s._controller.warn("Failed to load CSS file at ".concat(e,"."))}))}})),s._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){var t;if(s._commonOptions.clientSecret)throw new I.No("It looks like you use client_secret in your Elements integration. \n You cannot use stripe.update() to change publishable key.\n Please follow https://stripe.com/docs/payments/defer-intent-creation to change your Elements integration.");var n=(0,A.ei)(s._commonOptions,ei),r=$o(n),o=(0,A.sE)(s._elements,(function(e){return"payButton"===e._componentName}));null==o||null===(t=o._implementation._frame)||void 0===t||t._emit("update-start"),s._controller.action.updateElementsOptions({locale:void 0,appearance:void 0,groupId:s._id,deferredIntent:r,stripeUserCredentials:e}).then((function(){var e;s._emit("update-end"),null==o||null===(e=o._implementation._frame)||void 0===e||e._emit("update-end")}))})),(0,h.Z)(s,(0,y.Z)(s))}(0,v.Z)(t,e);var n=(0,g.Z)(t);return t}(G),ri=ni,oi=function(e,t,n,r,o,i,a){return new St({controller:e,authentication:t,mids:n,rawOptions:r,betas:o,queryStrategyOverride:i,listenerRegistry:a})},ii=n(1764),ai=(0,b.mC)({name:(0,b.kw)("react-stripe-js","stripe-js","react-stripe-elements"),version:(0,b.AG)(b.Z_),startTime:(0,b.jt)(b.Rx)}),ci=(0,b.ci)({name:(0,b.ui)(1,30),partner_id:(0,b.jt)(b.Z_),version:(0,b.jt)((0,b.ui)(5,15)),url:(0,b.jt)((0,b.ui)(4,60))}),si={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block","user-select":"none",transform:"translate(0)","color-scheme":"only light"},ui=function(e){function t(e){var r;return(0,p.Z)(this,t),r=n.call(this,e),E.s$&&r._listenerRegistry.addEventListener(document,"transitionstart",(function(e){switch(e.propertyName){case"opacity":case"transform":case"visibility":var t=e.target;r._isMounted()&&t.contains(r._iframe)&&r._forceRepaint()}}),{passive:!0}),r}(0,v.Z)(t,e);var n=(0,g.Z)(t);return(0,d.Z)(t,[{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"focus",value:function(){this.loaded&&(E.s$?this._iframe.focus():this.send({action:"stripe-user-focus",payload:{}}))}},{key:"blur",value:function(){this.loaded&&(this._iframe.contentWindow.blur(),this._iframe.blur(),document.activeElement===this._iframe&&(window.focus(),document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()))}},{key:"clear",value:function(){this.send({action:"stripe-user-clear",payload:{}})}},{key:"collapse",value:function(){this.send({action:"stripe-user-collapse",payload:{}})}},{key:"show",value:function(){this.send({action:"stripe-user-show",payload:{}})}},{key:"hide",value:function(){this.send({action:"stripe-user-hide",payload:{}})}},{key:"addLineItem",value:function(e){this.send({action:"stripe-user-add-line-item",payload:e})}},{key:"cancelCheckout",value:function(e){this.send({action:"stripe-user-cancel-checkout",payload:{errorMessage:e}})}},{key:"getValue",value:function(){this.send({action:"stripe-user-get-value",payload:{}})}},{key:"_createIFrame",value:function(e,n,o){var i=r((0,zt.Z)(t.prototype),"_createIFrame",this).call(this,e,n,o);return i.setAttribute("title","Secure payment input frame"),(0,k.yq)(i,si),i}},{key:"_forceRepaint",value:function(){var e=this._iframe,t=e.style.display;e.style.display="none";var n=e.offsetHeight;return e.style.display=t,n}}]),t}(Vt),li={position:"absolute",left:"0",top:"0",height:"100%",width:"100%","color-scheme":"normal"},pi=function(e){function t(e){var o,i,a,c=e.type,s=e.controllerId,u=e.listenerRegistry,l=e.options;return(0,p.Z)(this,t),(a=n.call(this,{type:c,controllerId:s,listenerRegistry:u,appParams:l}))._autoMount=function(){a.appendTo(a._backdrop.domElement),a._backdrop.mount()},a.show=function(){a._backdrop.show(),(0,k.yq)(a._iframe,li),a.isVisible=!0},a.fadeInBackdrop=function(){a._backdrop.fadeIn()},a._backdropFadeoutPromise=null,a.fadeOutBackdrop=function(){return a._backdropFadeoutPromise||(a._backdropFadeoutPromise=a._backdrop.fadeOut()),a._backdropFadeoutPromise.then((function(){a._backdropFadeoutPromise=null}))},a.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=a.fadeOutBackdrop().then((function(){a._backdrop.unmount(),e||r((o=(0,y.Z)(a),(0,zt.Z)(t.prototype)),"destroy",o).call(o)}));return e&&r((i=(0,y.Z)(a),(0,zt.Z)(t.prototype)),"destroy",i).call(i),a.isVisible=!1,n},a._backdrop=new Xe({lockScrolling:!0,lockFocus:!0,lockFocusOn:a._iframe,listenerRegistry:u}),a._autoMount(),a.isVisible=!1,a}(0,v.Z)(t,e);var n=(0,g.Z)(t);return t}(Vt),di=pi,mi={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"},fi=function(e){function t(){return(0,p.Z)(this,t),n.apply(this,arguments)}(0,v.Z)(t,e);var n=(0,g.Z)(t);return(0,d.Z)(t,[{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"_createIFrame",value:function(e,n,o){var i=r((0,zt.Z)(t.prototype),"_createIFrame",this).call(this,e,n,o&&"object"==typeof o?(0,u.Z)((0,u.Z)({},o),{},{isSecondaryFrame:!0}):o);return(0,k.yq)(i,mi),i.style.height="0",i}}]),t}(Vt),_i=fi,hi=!1,yi=function(e){hi||"null"===(null!=e?e:window.origin)&&(hi=!0,console.error("Stripe.js requires 'allow-same-origin' if sandboxed."))},vi=n(6977),gi=n(6042),bi=Er.OV,wi=function(e){var t=e.mode;return!("paymentMethod-from-data"===t.tag&&t.data.acss_debit)},ki=function(e){return null!==e&&"object"==typeof e&&!0===e.skipMandate},Ei=function(e){return null!==e&&"object"==typeof e&&!!e.shouldCreatePaymentMethod},Si=function(e){var t=e.controller,n=e.shouldCreatePaymentMethod,r=e.intentSecret,o=e.mode,i=e.confirmIntentData;return t.action.createAcssDebitSession({intentSecret:r,shouldCreatePaymentMethod:n,confirmIntentData:i,mode:o}).then((function(e){if("error"===e.type)return{type:"error",error:e.error};var n=(0,gi.q)(t,{url:(0,Je.jr)(e.object.url),size:"400x600",locale:e.locale,frameTitle:"acss.dialog_frame_title",useLightboxHostedCloseButton:!1});return new H.J((function(e){n._on("request-close",(function(){(0,gi.G)(n).then((function(){return t.action.localizeError(Er.LR)})).then((function(t){e({type:"error",error:t})}))})),n._on("session-complete",(function(t){var r=t.paymentMethod;(0,gi.G)(n).then((function(){e({type:"success",paymentMethod:r})}))}))}))}))},Ci=function(e,t,n,r,o){var i="confirmAcssDebitPayment",a=C.GS.acss_debit,c=(0,Er.cn)(n,i),s=(0,Er.o1)(a,i,r,c),l=Ei(o);return bi(o,i),ki(o)||!wi(s)?e.action.confirmPaymentIntent((0,u.Z)((0,u.Z)({},s),{},{expectedType:a,options:{handleActions:!1},mids:t})).then(vi.PA):Si({controller:e,shouldCreatePaymentMethod:l,intentSecret:c,mode:"payment",confirmIntentData:s}).then((function(n){switch(n.type){case"error":return{error:n.error};case"success":return e.action.confirmPaymentIntent({mode:{tag:"paymentMethod",paymentMethod:n.paymentMethod,options:s.mode.options||{},intentSecret:c},otherParams:s.otherParams,expectedType:a,options:{handleActions:!1},mids:t}).then(vi.PA);default:return(0,b.Rz)(n.type)}}))},Pi=function(e,t,n,r,o){var i="confirmAcssDebitSetup",a=C.GS.acss_debit,c=(0,Er.jH)(n,i),s=(0,Er.o1)(a,i,r,c),l=Ei(o);return bi(o,i),ki(o)||!wi(s)?e.action.confirmSetupIntent((0,u.Z)((0,u.Z)({},s),{},{expectedType:a,options:{handleActions:!1},mids:t})).then(vi.e3):Si({controller:e,shouldCreatePaymentMethod:l,intentSecret:c,mode:"setup",confirmIntentData:s}).then((function(n){switch(n.type){case"error":return{error:n.error};case"success":return e.action.confirmSetupIntent({mode:{tag:"paymentMethod",paymentMethod:n.paymentMethod,options:s.mode.options||{},intentSecret:c},otherParams:s.otherParams,expectedType:a,options:{handleActions:!1},mids:t}).then(vi.e3);default:return(0,b.Rz)(n.type)}}))},Ai="https://maps.googleapis.com/maps/api/js",Ii=/^https:\/\/maps\.googleapis\.com\/maps\/api\/js\/?(\?.*)?libraries=(.*,)?places((,|&)+.*)?$/;window.noop=function(){};var Ni,Ti,Mi=function(e){switch(e){case"INVALID_REQUEST":case"NOT_FOUND":case"OK":case"OVER_QUERY_LIMIT":case"REQUEST_DENIED":case"UNKNOWN_ERROR":case"ZERO_RESULTS":return e;default:return"UNKNOWN_ERROR"}},Ri="ADDRESS_AUTOCOMPLETE_PREDICTION_RESULTS",Oi="ADDRESS_AUTOCOMPLETE_PLACE_DETAILS",ji=null,Zi=function(e){return null!==ji||(ji=new H.J((function(t,n){if("undefined"!=typeof window)if(window.google&&window.google.maps.places)t(window.google.maps.places);else try{var r=function(){var e=document.querySelectorAll('script[src^="'.concat(Ai,'"]'));for(var t in e)if(Ii.test(e[t].src))return e[t];return null}();r||(r=function(e){var t=document.createElement("script");return t.src="".concat(Ai,"?key=").concat(e,"&libraries=places&callback=noop"),(document.head||document.body).appendChild(t),t}(e)),r.onload=function(){window.google.maps.places?t(window.google.maps.places):n(new Error("Google Maps API not available"))}}catch(e){n(e)}else t(null)}))),ji},xi=function(e,t,n){var r=e.search,o=e.countryRestrictions;var i=function(e){return{predictions:[],status:"error",error:{status:Mi(e),message:"Google Maps returned an API error"}}};void 0===t||Ni?n.send({action:"google-maps-predictions",payload:{data:{tag:Ri,value:i("UNKNOWN_ERROR")}}}):function(e,t){try{t()}catch(t){e.send({action:"google-maps-predictions",payload:{data:{tag:Ri,value:{predictions:[],status:"error",error:{status:"UNKNOWN_ERROR",message:t.message}}}}})}}(n,(function(){var e=t.autocompleteService,a=t.sessionToken;e.getPlacePredictions({input:r,sessionToken:a,componentRestrictions:{country:o}},(function(e,t){var r;switch(t){case google.maps.places.PlacesServiceStatus.OK:r={predictions:e,status:"ok"};break;case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:r={predictions:[],status:"zeroResults"};break;default:r=i(t)}n.send({action:"google-maps-predictions",payload:{data:{tag:Ri,value:r}}})}))}))},Li={attachLinkAccountSessionForPayment:null,attachLinkAccountSessionForSetup:null,authenticate3DS2:null,cancelCardImageVerificationChallenge:null,cancelCheckout:null,cancelPaymentIntentSource:null,cancelSetupIntentSource:null,clearInstantDebitsIncentive:null,completeLinkAccountSessionElements:null,completeWalletConfirm:null,confirmPaymentIntent:null,confirmReturnIntent:null,confirmSetupIntent:null,createAcssDebitSession:null,createApplePaySession:null,createBankPaymentDetails:null,createConsumerPaymentDetails:null,createEphemeralKeyNonce:null,createPaymentMethodWithData:null,createPaymentMethodWithElement:null,createPaymentMethodWithElements:null,createPaymentPage:null,createPaymentPageWithSession:null,createRadarSession:null,createSourceWithData:null,createSourceWithElement:null,confirmInstantDebitsIncentiveForPaymentDetails:null,fetchingWallets:null,shouldShowEceButton:null,expressCheckoutConfirmStart:null,expressCheckoutConfirmEnd:null,expressCheckoutSheetOpened:null,expressCheckoutSheetClosed:null,getElementConfirmingPayment:null,getIsAwaitingConfirmCallback:null,getElementsSessionAmountModeCurrency:null,setExpressCheckoutConfirmData:null,closeECEPaymentSheet:null,fetchLocale:null,fetchUpdates:null,localizeError:null,unsafeLocalizeString:null,loginWithConsumerInfo:null,lookupLocale:null,refreshPaymentIntent:null,refreshSetupIntent:null,retrieveIssuingCard:null,retrieveIssuingCardWithoutNonce:null,retrieveOrder:null,retrievePaymentIntent:null,retrieveSetupIntent:null,retrieveSource:null,rememberLinkLogin:null,forgetLinkLogin:null,removeElementsExperimentId:null,resetExpressCheckoutState:null,fetchCartSession:null,getGoogleMapsPredictions:null,getGoogleMapsDetails:null,initGoogleMapsService:null,setupStoreForElementsGroup:null,showWalletIfNecessary:null,submitOrder:null,tokenizeCvcUpdate:null,tokenizeWithData:null,tokenizeWithElement:null,updateCSSFonts:null,updateElementsOptions:null,updateOrder:null,updatePaymentIntent:null,verifyCardImageVerificationChallenge:null,verifyMicrodepositsForPayment:null,verifyMicrodepositsForSetup:null,retrieveCardNetworks:null,isCardMetadataRequired:null,retrieveLinkConfig:null,checkForLinkClientSecret:null,resolveLocale:null,elementUnmounted:null,logOutOfLinkInElements:null,cmpStatusChange:null,setExpressCheckoutLinkPaymentMethodData:null,updateStripeUserCredentials:null,validateElements:null},Bi=function(e){var t=0,n=[];return{acquire:function(){if(t0&&t1&&void 0!==arguments[1]?arguments[1]:{};n._controllerFrame.send({action:"stripe-controller-report",payload:{event:e,data:t}})},this.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r5&&void 0!==arguments[5]?arguments[5]:0;if(T.kO1)throw new I.No("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(i))throw new I.No("stripe.redirectToCheckout: Invalid value for sessionId. You specified '".concat(i,"'."));if("live"===n&&/^cs_test_/.test(i))throw new I.No("stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.");if("test"===n&&/^cs_live_/.test(i))throw new I.No("stripe.redirectToCheckout: the provided sessionId is for a live mode Checkout Session, whereas Stripe.js was initialized with a test mode publishable key.");return{tag:"session",sessionId:i}}o.sessionId,o.sku,o.plan;var a=o.items,c=o.lineItems,s=o.successUrl,p=o.cancelUrl,d=o.mode,m=(0,f.Z)(o,["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"]);if(!c&&!a)throw new I.No("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!s)throw new I.No("stripe.redirectToCheckout: You must provide successUrl.");return(0,u.Z)({tag:"no-session",items:a,lineItems:c,successUrl:s,cancelUrl:p,mode:d},m)},ds=function(e,t,n){var r=ps(e,t,n);if("no-session"===r.tag){var o=r.successUrl,i=r.cancelUrl;if(!(0,S.sD)(o))throw new I.No("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(i&&!(0,S.sD)(i))throw new I.No("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}return r},ms=function(e,t){return"session"===t.tag||null==e||t.locale||-1===["auto"].concat((0,l.Z)(as)).indexOf(e)?t:(0,u.Z)((0,u.Z)({},t),{},{locale:e})},fs=function(e,t,n){var r=(0,A.sE)(ns,(function(t){return(0,P.uN)(e,t)}));if(t&&t.lineItems&&r)throw new I.No("Prices cannot be used with ".concat(r));if("string"==typeof t&&us.test(t))throw new I.No("stripe.redirectToCheckout: Checkout Session IDs must be passed in as an object with a key of `sessionId` and the Session ID as the value.");switch(r){case"checkout_beta_2":return ls(0,t);case"checkout_beta_3":return ps(e,t,n);default:return ds(e,t,n)}},_s=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";return ms(t,fs(e,n,r))},hs=function(e,t){var n=t;return Boolean(!1)&&window.__STRIPE_CHECKOUT_URL_OVERRIDE__&&(n=t.replace(/^https?:\/\/[^/]+\//,window.__STRIPE_CHECKOUT_URL_OVERRIDE__)),(0,ea.U)(n).then((function(t){return(0,ea.d)(e,"redirectToCheckout",t),{error:t.error}}))},ys=function(e){switch(e.type){case"object":return{token:e.object};case"error":return{error:e.error};default:return(0,b.Rz)(e)}},vs=function(e){return"object"==typeof e&&null!==e?e:{}},gs=function(e){switch(e.type){case"object":return{radarSession:e.object};case"error":return{error:e.error};default:return(0,b.Rz)(e)}},bs="securitypolicyviolation",ws=window,ks=/^require-trusted-types-for/,Es="LOAD_ERROR",Ss="REPORT_ONLY",Cs="BLOCKED",Ps=new wt.E,As=!1,Is=function e(t){var r,o=t.controller,i=t.controllerLoadTimestamp,a=t.stripeCreateTimestamp;if(!As||i){As=!0;var c=i||new wt.E;if("complete"===document.readyState){var s=null,l=null,p=null,d=null;if(window.performance){if(window.performance.timing){var f=window.performance.timing,_=f.fetchStart;s=f.domLoading-_,l=f.domInteractive-_,p=f.domComplete-_}if(window.performance.getEntriesByType){var h=window.performance.getEntriesByType("resource"),y="https://js.stripe.com/v3/".replace(/\/$/,"");d=h.reduce((function(e,t){if(0===t.name.indexOf(y)){var n=t.name.match(/\/([^/#?]*)\/?(?:$|[#?])/);if(n&&n[1]){var r=n[1].replace(/-[0-9a-f]{32}\./,".");return"v3"===r&&(r="stripe.js"),(0,u.Z)((0,u.Z)({},e),{},(0,m.Z)({},r,{transfer_size:t.transferSize,duration:Math.round(t.duration)}))}}return e}),{})}}var v=Math.round(n(8622).x-ii.q),g=a.getElapsedTime(c),b=(null===(r=d)||void 0===r?void 0:r["stripe.js"])?d["stripe.js"].duration+v+g:null;o.report("timings",{element:o.controllerFor(),dom_loading:s,dom_interactive:l,dom_complete:p,match_frame:t.source===o._controllerFrame._iframe.contentWindow,until_first_create:Ps.getElapsedTime(o._createTimestamp),until_first_mount:o._mountTimestamp?Ps.getElapsedTime(o._mountTimestamp):null,until_first_load:Ps.getElapsedTime(c),stripe_create_duration:g,stripe_js_init_duration:v,stripe_js_load_duration:b,resource_timings:d,controller:t.controllerMetrics}),setTimeout((function(){new H.J((function(e){if(ws.trustedTypes&&ws.Promise){var t,r=!1,o=function(e){(ks.test(e.effectiveDirective)||ks.test(e.violatedDirective))&&((0,S.vo)(e.blockedURI)||(0,S.vo)(e.sourceFile))&&(r=!0)},i=function(){return r?Cs:Es};ws.addEventListener(bs,o);try{t=n.e(913).then(n.bind(n,9554)).then((function(e){return(e.loaded&&r?Ss:"ALLOWED")||Es}),i)}catch(e){t=new H.J((function(e){return setTimeout(e,0)})).then(i)}t.then((function(){ws.removeEventListener(bs,o)})),e(t)}else e("NOT_SUPPORTED")})).then((function(e){(function(e){switch(e){case Ss:case Cs:return!0}return!1})(e)&&o.warn("We noticed that you are using Trusted Types. Nothing has broken, but we plan to add dynamic loading to parts of Stripe.js. Please allow scripts from 'https://js.stripe.com' in your default Trusted Types policy. For more information: https://stripe.com/docs/security/guide#content-security-policy")}))}),5e3)}else window.addEventListener("load",(function(){try{e((0,u.Z)((0,u.Z)({},t),{},{controllerLoadTimestamp:c}))}catch(e){}}))}},Ns=(0,b.mC)({apiKey:b.Z_,stripeAccount:(0,b.jt)(b.Z_),locale:(0,b.jt)(b.Z_),apiVersion:(0,b.jt)(b.Z_),__privateApiUrl:(0,b.jt)(b.Z_),__checkout:(0,b.jt)((0,b.mC)({mids:(0,b.mC)({muid:b.Z_,sid:b.Z_})})),__dashboard:(0,b.jt)(b.Ry),__hosted3DS:(0,b.jt)(b.Xg),canCreateRadarSession:(0,b.jt)(b.Xg),betas:(0,b.jt)((0,b.CT)(b.Z_))}),Ts=function(e){return"You have an in-flight ".concat(e,"! Please be sure to disable your form submit button when ").concat(e," is called.")},Ms=function(e){return function(){throw new I.No("You cannot call `stripe.".concat(e,"` without supplying an appropriate beta flag when initializing Stripe.js."))}},Rs=function(e){return function(){throw new I.No("You cannot call `stripe.".concat(e,"` without supplying an Issuing beta flag when initializing Stripe.js."))}},Os=Bi(1),js=function(){function e(t,n){var r=this;(0,p.Z)(this,e),this._listenerRegistry=(0,Kt.E)(),this.elements=Z((function(e){return new ri(r._controller,r._listenerRegistry,{stripeJsLoadTimestamp:Ps,stripeCreateTimestamp:r._controller._createTimestamp},r._betas,r._mids(),(0,u.Z)((0,u.Z)({},r._locale?{locale:r._locale}:{}),e))}),void 0,"elements"),this.createToken=D((function(e,t){var n=r._mids();return"cvc_update"===e?function(e,t,n){var r=(0,b.rX)(t);if(r&&"cardCvc"===r._componentName){var o=r._implementation._frame.id;return e.action.tokenizeCvcUpdate({frameId:o,mids:n}).then(ys)}throw new I.No("You must provide a `cardCvc` Element to create a `cvc_update` token.")}(r._controller,t,n):function(e,t){return function(n,r){var o=(0,b.rX)(n);if(o){var i=o._implementation._frame.id,a=o._componentName,c=vs(r);return e.action.tokenizeWithElement({frameId:i,elementName:a,tokenData:c,mids:t}).then(ys)}if("string"==typeof n){var s=n,u=vs(r);return e.action.tokenizeWithData({elementName:null,type:s,tokenData:u,mids:t}).then(ys)}throw new I.No("You must provide a Stripe Element or a valid token type to create a Token.")}}(r._controller,n)(e,t)}),void 0,"createToken"),this.createSource=D((function(e,t){var n=(0,b.rX)(e),o=Ji(n?t:e),i=o||{type:null,data:{}},a=i.type,c=i.data;if(n){var s=n._implementation._frame.id,u=n._componentName;return!o&&(0,C.ke)(u)?H.J.reject(new I.No("Please provide Source creation parameters to createSource.")):r._controller.action.createSourceWithElement({frameId:s,elementName:u,type:a,sourceData:c,mids:r._mids()}).then(Wi)}return o?a?r._controller.action.createSourceWithData({elementName:null,type:a,sourceData:c,mids:r._mids()}).then(Wi):H.J.reject(new I.No("Please provide a source type to createSource.")):H.J.reject(new I.No("Please provide either an Element or Source creation parameters to createSource."))}),void 0,"createSource"),this.retrieveSource=B((function(e){var t=(0,b.Gu)(Xi,{source:e},"retrieveSource"),n=t.value;return t.warnings.forEach((function(e){return r._controller.warn(e)})),r._controller.action.retrieveSource(n).then(Wi)}),void 0,"retrieveSource"),this.paymentRequest=x((function(e,t){(0,Fe.pF)(r._keyMode);var n=t;return oi(r._controller,{apiKey:r._apiKey,accountId:r._stripeAccount},r._mids(),e,r._betas,n,r._listenerRegistry)}),void 0,"paymentRequest");var o=new wt.E,i=(0,b.Gu)(Ns,t||{},"Stripe()"),a=i.value,c=i.warnings;if(function(e){for(var t=0,n=0;n0){var n=500*Math.pow(2,3-s);a=setTimeout(d,n),s-=1}else i(e,l)}}))}(),function(){clearTimeout(a),c=!1}},m=function(e){var t=e.initialDelay,n=e.pollTimeGap,r=e.checkIntent,o=e.locale,u=e.controller,l=e.intent,p=e.expandParam,d=void 0===p?[]:p,m=e.shouldPoll,f=void 0===m?function(){return!0}:m,_="payment_intent"===l.object?{paymentIntent:l}:{setupIntent:l};return new i.J((function(e){setTimeout((function(){var t=setInterval((function(){if(!f())return e(_),void clearInterval(t);var n;(n={hosted:!1,intentSecret:(0,a.O3)(l),locale:o,expandParam:d},"payment_intent"===l.object?u.action.retrievePaymentIntent(n):u.action.retrieveSetupIntent(n)).then((function(n){_=s(n),n.error?(u.action.localizeError(c.I4).then((function(e){return{error:e}})).then(e),clearInterval(t)):r(n.object)&&(e(_),clearInterval(t))}))}),n)}),t-n)}))}},8147:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(6589),o=n(3849),i=n(755),a=n(9792),c=function(e){return e?"payment_intent"===e.object?e.last_payment_error:e.last_setup_error:null},s=function(e,t,n,s){return new r.J((function(r){var u=new a.E,l=n.createLightboxFrame({type:i.NC.HCAPTCHA_APP,options:{intentId:t.id,clientSecret:t.client_secret,locale:s,sitekey:e.site_key,verifyUrl:e.verification_url,startTime:u.getAsPosixTime()}}),p=function(e){var t=o.I4;return null!=e&&(t=e),n.action.localizeError(t).then((function(e){return{error:e}}))};n.report("intent_confirmation_challenge.start"),l._on("load",(function(){n.report("intent_confirmation_challenge.stripe_js_frame_loaded",{duration_since_start_ms:u.getElapsedTime()}),l.fadeInBackdrop()})),l.show(),l._on("request-cancel",(function(e){l.fadeOutBackdrop(),l.destroy(!0),n.report("intent_confirmation_challenge.cancel"),r(p(c(null==e?void 0:e.intent)))})),l._on("request-close",(function(e){l.fadeOutBackdrop(),l.destroy(!0);var t=null==e?void 0:e.intent;if(t){var i=c(t);i?/Captcha/.test(i.message||"")?(n.report("intent_confirmation_challenge.verification_failed"),r(p(i))):(n.report("intent_confirmation_challenge.success"),r(p(i))):(n.report("intent_confirmation_challenge.success"),function(e,t){"payment_intent"===t.object?e({paymentIntent:t}):e({setupIntent:t})}(r,t))}else n.report("intent_confirmation_challenge.verification_error"),r(p(o.I4))}))}))}},8478:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(6977),o=n(6790),i=n(9294),a=n(6090),c=n(1873),s=function(e){var t=e.controller,n=e.intent,s=e.locale,u=(0,r.G2)(n);if(!u||"cashapp_handle_redirect_or_display_qr_code"!==u.type)throw new Error("Expected next_action.cashapp_handle_redirect_or_display_qr_code");if(!i.q$)return(0,a.Ug)({controller:t,intent:n,locale:s,url:u.cashapp_handle_redirect_or_display_qr_code.hosted_instructions_url,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.cashapp.frame_title"}});switch(n.object){case"payment_intent":return(0,o.k)(n,u.cashapp_handle_redirect_or_display_qr_code.mobile_auth_url,t);case"setup_intent":return(0,o.e)(n,u.cashapp_handle_redirect_or_display_qr_code.mobile_auth_url,t);default:return(0,c.Rz)(n)}}},6090:function(e,t,n){"use strict";n.d(t,{Ug:function(){return p}});var r=n(8489),o=n(508),i=n(6589),a=n(6042),c=n(755),s=n(5326),u=n(9294),l=function(e){return"requires_action"!==e.status&&"requires_source_action"!==e.status},p=function(e){var t=e.controller,n=e.initialDelay,p=void 0===n?5e3:n,d=e.intent,m=e.lightboxOptions,f=e.locale,_=e.pollInterval,h=void 0===_?2e3:_,y=e.url,v=m.size,g=(0,o.Z)(m,["size"]),b=(0,a.q)(t,(0,r.Z)({url:(0,c.jr)(y),size:u.q$?"fullScreen":v||"400x600",locale:f,useLightboxHostedCloseButton:!1},g)),w=!1;return new i.J((function(e){return b._on("load",(function(){b.show(),b.fadeInBackdrop()})),b._once("request-close",(function(){(0,a.G)(b).then((function(){w=!0,"payment_intent"===d.object&&e({paymentIntent:d}),"setup_intent"===d.object&&e({setupIntent:d})}))})),b._on("complete",(function(t){(0,a.G)(b).then((function(){w=!0,e(t)}))})),(0,s.ct)({controller:t,initialDelay:p,pollTimeGap:h,intent:d,checkIntent:l,shouldPoll:function(){return!w},locale:f}).then((function(t){"error"in t&&t.error||w||b.destroy(!0).then((function(){e(t)}))}))}))}},6790:function(e,t,n){"use strict";n.d(t,{e:function(){return a},k:function(){return i}});var r=n(1849),o=n(6977),i=function(e,t,n){return(0,r.U)(t).then((function(t){return(0,r.d)(n,"next_action redirect",t),(0,o.PA)(t,e)}))},a=function(e,t,n){return(0,r.U)(t).then((function(t){return(0,r.d)(n,"next_action redirect",t),(0,o.e3)(t,e)}))}},122:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var r=n(7904),o=n(8489),i=n(1002),a=n(755),c=n(6589),s=n(5326),u=n(9792),l=function(e,t,n,l,p,d){var m=(0,i.xz)(),f=new u.E,_=function(e,t,n,r,i){return e.createLightboxFrame({type:a.NC.AUTHORIZE_WITH_URL,options:(0,o.Z)({url:t,locale:i,intentId:n},r?{source:r}:{})})}(l,e.url,t.id,e.source,p);return _.show(),l.report("authorize_with_url.loading",{viewport:m,intentId:t.id}),_._on("load",(function(){l.report("authorize_with_url.loaded",{loadDuration:f.getElapsedTime(),intentId:t.id}),_.fadeInBackdrop()})),_._on("challenge_complete",(function(){_.fadeOutBackdrop()})),new c.J((function(o){var i=e.source;i&&_._once("cancel",(function(){c.J.all([(0,s.$o)(t,n,l,i,p),_.destroy()]).then((function(e){var t=(0,r.Z)(e,1)[0];return o(t)}))})),_._once("authorize_with_url_done",(function(){var e=_.destroy();(0,s.Eo)(t,n,l,p,d,(function(n,r){e.then((function(){l.report("authorize_with_url.done",{shownDuration:f.getElapsedTime(),success:!("error"in n),intentId:t.id,iterations:r}),o(n)}))}))}))}))}},7193:function(e,t,n){"use strict";n.d(t,{A:function(){return F}});var r=n(7904),o=n(6589),i=n(1873),a=n(9792),c=n(8489),s=n(508),u=n(755),l=function(e,t){var n=t.intentSecret,r=t.controller,i=t.locale,a=t.hosted,c=r.createLightboxFrame({type:u.NC.STRIPE_3DS2_CHALLENGE,options:{intentId:n.id,hosted:a,locale:i}});r.report("3ds2.challenge_frame.loading",{intentId:n.id,hosted:a}),c._on("challenge_complete",(function(){c.fadeOutBackdrop()}));var s=function(e){return new o.J((function(t){e._on("load",(function(){return t(e)}))}))}(c);return s.then((function(){return r.report("3ds2.challenge_frame.loaded",{intentId:n.id,hosted:a})})),a&&(c.show(),c.action.show3DS2Spinner({cardBrand:e.cardBrand})),s},p=function(e,t){var n=t.oneClickAuthnDeviceSupport,r=t.oneClickAuthnOptedOut,i=t.challengeFrame;return new o.J((function(t,o){i.then((function(i){var a=function(){return o(new Error("User canceled"))};i._once("cancel",a),i.isVisible||(i.show(),i.fadeInBackdrop());e.type;var l=e.optimizations,p=(e.oneClickAuthn,(0,s.Z)(e,["type","optimizations","oneClickAuthn"]));i.action.perform3DS2Challenge((0,c.Z)((0,c.Z)({},p),{},{shouldSandbox:l.sandboxChallengeFrame,recordFinalCres:l.recordFinalCres,oneClickAuthnDeviceSupport:n,oneClickAuthnOptedOut:r,oneClickWebauthnEnrollmentAppUrl:(0,u.xS)("one-click-webauthn-enrollment-2b02858ff8e12ce8e3512b8a5f6547a0.html")})).then((function(){i._off("cancel",a),t()}))}))}))},d=n(5326),m=n(6222),f=function(e){if(!e||"object"!=typeof e||!e.type&&!e.code)return e;var t=function(t){return e[t]&&"string"==typeof e[t]?(0,m.Z)({},"".concat(t,"_id"),e[t]):e[t]&&"object"==typeof e[t]&&"string"==typeof e[t].id?(0,m.Z)({},"".concat(t,"_id"),e[t].id):null};return(0,c.Z)((0,c.Z)((0,c.Z)((0,c.Z)({type:e.type,code:e.code,param:e.param},t("payment_intent")),t("setup_intent")),t("payment_method")),t("source"))},_=function(e,t,n){var r=t.intentSecret,o=t.intentType,i=t.controller,a=t.locale;return(0,d.NO)(r,o,i,a,n)},h=function(e,t){var n=t.controller,r=t.intentSecret,o=t.intentType,i=t.locale;return(0,d.$o)(r,o,n,e.threeDS2Source,i,e.threeDS2Intent,e.publishableKey)},y=function(e,t){var n=e.intentSecret,i=e.controller,a=e.hosted,s=t.intent,u=t.challengeFrame,l=t.startTimestamp;return o.J.all([s,u.then((function(e){return e.destroy()}))]).then((function(e){var t=(0,r.Z)(e,1)[0];return i.report("3ds2.done",(0,c.Z)({intentId:n.id,hosted:a,totalDuration:l.getElapsedTime()},t.error?{error:f(t.error),success:!1}:{success:!0})),t}))},v=function(e){var t=e.intentSecret,n=e.controller,r=e.hosted,i=e.locale,a=n.createHiddenFrame(u.NC.STRIPE_3DS2_FINGERPRINT,{intentId:t.id,locale:i,hosted:r});n.report("3ds2.fingerprint_frame.loading",{hosted:r,intentId:t.id});var c=function(e){return new o.J((function(t){e._on("load",(function(){return t(e)}))}))}(a);return c.then((function(){n.report("3ds2.fingerprint_frame.loaded",{hosted:r,intentId:t.id})})),c},g=function(e,t){var n=t.intentSecret,r=t.controller,a=t.hosted;return e.optimizations.skipFingerprint?o.J.resolve({fingerprintAttempted:!1,fingerprintData:null}):""===e.methodUrl?(r.report("3ds2.fingerprint.no_method_url",{hosted:a,intentId:n.id}),o.J.resolve({fingerprintAttempted:!1,fingerprintData:null})):v(t).then((function(t){var n={};switch(e.gateway){case"emvco":n={gateway:e.gateway,threeDS2Source:e.threeDS2Source,merchant:e.merchant,transactionId:e.transactionId,methodUrl:e.methodUrl,shouldSandbox:e.optimizations.sandboxFingerprintFrame};break;case"itmx":n={gateway:e.gateway,threeDS2Source:e.threeDS2Source,merchant:e.merchant,transactionId:e.transactionId,methodUrl:e.methodUrl,shouldSandbox:e.optimizations.sandboxFingerprintFrame,accessToken:e.accessToken};break;default:(0,i.Rz)(e)}return t.action.perform3DS2Fingerprint(n).then((function(e){return t.destroy(),e}))}))},b=n(9294),w=function(){if(void 0===window.PublicKeyCredential||function(){if(!/CrOS/i.test(window.navigator.userAgent))return!1;var e=window.navigator.userAgent.match(/Chrome\/\d+\.\d+\.(\d+)\.(\d+)/)||[],t=Number(e[1]),n=Number(e[2]);return!(4389===t&&n>=82||4430===t&&n>=11||t>=4431)}()||function(){var e=/iPad|iPhone/i.test(window.navigator.userAgent),t=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&!/SamsungBrowser/.test(window.navigator.userAgent);if(!e||t)return!1;var n=window.navigator.userAgent.match(/OS (\d+)_(\d+)(_\d+)? like Mac OS X/)||[],r=parseInt(n[1],10),o=parseInt(n[2],10);return!isNaN(r)&&!isNaN(o)&&(15===r&&o>=4||r>15)}())return o.J.resolve(!1);var e=window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(),t=new o.J((function(e){return setTimeout((function(){return e(!1)}),500)}));return o.J.race([e,t]).catch((function(){return!1}))},k=function(){if(void 0===window.PaymentRequest)return o.J.resolve(!1);if(!/Chrome\/(9[5-9]|[1-9]\d\d)/.test(window.navigator.userAgent))return o.J.resolve(!1);try{var e=[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",credentialIds:[new Uint8Array(1)],challenge:new Uint8Array(1),fallbackUrl:window.location,rpId:"stripe.com",payeeOrigin:"https://stripe.com",instrument:{displayName:"Mock ····1234",icon:'data:image/svg+xml;utf8,'}}}];return new window.PaymentRequest(e,{total:{label:"Total",amount:{currency:"USD",value:"0"}}}).canMakePayment().catch((function(){return!1}))}catch(e){return o.J.resolve(!1)}},E="stripe-js-one-click-authn",S="W",C="S",P="SE/WA",A=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},I=function(e){return atob(e.replace(/-/g,"+").replace(/_/g,"/"))},N=function(e){var t=I(e);return Uint8Array.from(t,(function(e){return e.charCodeAt(0)}))},T=(n(3637),n(3407),n(8037),function(e){return"data:image/svg+xml,".concat(encodeURIComponent(e.replace(/\n/g,"").replace(/\s+/g," ")))}),M=function(e){switch(e){case"visa":return T('\n \n \n \n \n');case"amex":return T('\n \n \n \n \n \n \n \n \n \n');case"mastercard":return T('\n \n \n \n \n \n \n');case"unionpay":case"discover":case"jcb":case"diners":case"unknown":case"elo":return T('');default:return(0,i.Rz)(e)}},R=n(7412),O=n(6977),j=function(e,t,n){var r=e.threeDS2Source,i=e.oneClickAuthn,a=t.controller,s=n.deviceSupport,u=n.startTimestamp,l=o.J.resolve({authenticationAPIParam:null,optedOut:!1});if(!i)return l;var p,d=i.credentials.filter((function(e){return e.type===O.QS}));if(0===d.length)return a.report("one_click_authn.request_spc_authn.empty_credentials_list",{client_id:E,source:r,device_support:s}),l;try{var m=i.merchant.origin;if(!m)return a.report("one_click_authn.request_spc_authn.empty_merchant_origin",{client_id:E,source:r,device_support:s}),l;(p=document.createElement("meta")).name=(0,R.To)("__privateStripeMeta"),p.httpEquiv="origin-trial",p.content="A2ZxBmgWRc3CxEGqZ0aWPMB4MUSx1dSjXn2pGXpMq8NLQh00TMwiKf5A8NEQegaXHfDY7IxdHtYPxI0KRKEWNgQAAAB6eyJvcmlnaW4iOiJodHRwczovL2pzLnN0cmlwZS5jb206NDQzIiwiZmVhdHVyZSI6IlNlY3VyZVBheW1lbnRDb25maXJtYXRpb25PcHRPdXQiLCJleHBpcnkiOjE2Nzg0MDYzOTksImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=",document.head.appendChild(p);var f=new window.PaymentRequest(function(e,t,n){var r=n.authenticationChallenge,o=n.instrument,i=o.cardBrand,a=o.cardName,c=o.cardLast4,s=n.merchant;return[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",rpId:"stripe.com",credentialIds:e.map((function(e){return N(e.id)})),challenge:N(r),timeout:6e4,fallbackUrl:window.location.toString(),instrument:{displayName:"".concat(a," ····").concat(c),icon:M(i)},payeeOrigin:t,payeeName:s.name,showOptOut:!0}}]}(d,m,i),{total:{label:"Total",amount:i.amount}});return a.report("one_click_authn.request_spc_authn.prompted",{client_id:E,source:r,timeToComplete:u.getElapsedTime(),device_support:s}),f.show().then((function(e){var t;return e.complete("success"),a.report("one_click_authn.request_spc_authn.completed",{client_id:E,source:r,timeToComplete:u.getElapsedTime(),device_support:s}),{authenticationAPIParam:{type:O.QS,assertion:(t=e.details,{type:"public-key",id:t.id,raw_id:t.id,response:{authenticator_data:A(t.response.authenticatorData),client_data_json:A(t.response.clientDataJSON),signature:A(t.response.signature)}}),payment_data:{merchant_data:{merchant_origin:m,total:i.amount},network_data:i.authenticationChallenge}},optedOut:!1}})).catch((function(e){if(function(e){return"AbortError"===e.name&&-1!==e.message.indexOf("opted out")}(e))return a.report("one_click_authn.request_spc_authn.opted_out",{client_id:E,source:r,timeToOptedOut:u.getElapsedTime(),device_support:s}),o.J.resolve({authenticationAPIParam:null,optedOut:!0});var t={AbortError:"request_aborted",InvalidStateError:"payment_already_shown",NotSupportedError:"payment_method_not_supported",SecurityError:"security_error"}[e.name]||"unexpected_error";return a.report("one_click_authn.request_spc_authn.error",{reason:t,client_id:E,source:r,timeToError:u.getElapsedTime(),device_support:s,error:(0,c.Z)({name:e.name,message:e.message},e)}),l}))}catch(e){a.report("one_click_authn.request_spc_authn.error",{client_id:E,reason:"unexpected_error",source:r,timeToError:u.getElapsedTime(),device_support:s,error:(0,c.Z)({name:e.name,message:e.message},e)})}return l},Z=function(e,t,n){var r=t.controller,i=n.deviceSupport,a=n.challengeFrame,c=n.startTimestamp,s=e.oneClickAuthn;if(!s)return o.J.resolve(null);var l=function(e){var t=e.spcEligible,n=e.configurationType;return t&&(n===C||n===P)}(i)?O.QS:O.LD,p=s.credentials.filter((function(e){return e.type===l}));return 0===p.length?(r.report("one_click_authn.request_webauthn_authn.empty_credentials_list",{client_id:E,source:e.threeDS2Source,device_support:i}),o.J.resolve(null)):new o.J((function(t,n){a.then((function(r){var o=function(){return n(new Error("User canceled"))};r._once("cancel",o),r.isVisible||(r.show(),r.fadeInBackdrop());var a={amount:s.amount,instrument:s.instrument,merchant:s.merchant,authenticationChallenge:s.authenticationChallenge,layout:s.layout,allowCredentials:p};return r.action.performOneClickWebauthnAuthentication({threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,appUrl:(0,u.xS)("one-click-webauthn-authentication-38ede687c648ca16562202e0d0657022.html"),deviceSupport:i,payload:a,startPosixTime:c.getAsPosixTime()}).then((function(e){r._off("cancel",o),t(e)}))}))}))},x=function(e,t){var n=e.threeDS2Source,r=e.oneClickAuthn,o=t.controller;if(!r)return null;var i=b.s$?"safari":b.D1?"firefox":b.P0||b.Bh?"edge":b.G9?b.sV?"chrome_android":/Chrome\/10[4-9]/.test(window.navigator.userAgent)?"chrome_in_opt_out_trial":/Chrome\/(1[1-9]\d|[2-9]\d{2}|[1-9]\d{3,})/.test(window.navigator.userAgent)?"chrome_with_opt_out":"chrome":null;if(!i)return o.report("one_click_authn.configuration.error",{client_id:E,reason:"browser_not_found",source:n}),null;try{switch(new URLSearchParams(I(r.configuration)).get(i)){case S:return S;case C:return C;case P:return P;default:return null}}catch(e){return o.report("one_click_authn.configuration.error",{client_id:E,reason:"unexpected_error",source:n,error:(0,c.Z)({name:e.name,message:e.message},e)}),null}},L=function(){try{return 0==="https://js.stripe.com/v3/".indexOf(window.top.location.origin)}catch(e){return!1}},B=function(){var e=document.featurePolicy;if(!e)return!1;try{return-1!==e.allowedFeatures().indexOf("publickey-credentials-get")}catch(e){return!1}},D=function(e,t){return o.J.all([k(),w()]).then((function(n){var o=(0,r.Z)(n,2),i=o[0],a=o[1];return{sameOriginFrame:L(),spcEligible:i,webauthnEligible:a,publickeyCredentialsGetAllowed:B(),configurationType:x(e,t)}}))},q=function(e,t,n){var r=n.challengeFrame,o=n.startTimestamp;return D(e,t).then((function(n){return a=(i=n).webauthnEligible,c=i.configurationType,!a||c!==S&&c!==P?function(e){var t=e.spcEligible,n=e.configurationType;return t&&n===C}(n)?j(e,t,{deviceSupport:n,startTimestamp:o}).then((function(e){var t=e.authenticationAPIParam,r=e.optedOut;return{deviceSupport:n,authenticationAPIParam:t,optedOut:r}})):{deviceSupport:n,authenticationAPIParam:null,optedOut:!1}:Z(e,t,{deviceSupport:n,challengeFrame:r,startTimestamp:o}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e,optedOut:!1}}));var i,a,c}))},F=function(e,t,n){var c=new a.E,s=l(e,t);switch(e.type){case"3ds2-challenge":return D(e,t).then((function(r){return p(e,{oneClickAuthnDeviceSupport:r,oneClickAuthnOptedOut:!1,challengeFrame:s}).then((function(){return y(t,{intent:_(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return y(t,{intent:h(e,t),challengeFrame:s,startTimestamp:c})}))}));case"3ds2-fingerprint":return o.J.all([g(e,t),q(e,t,{challengeFrame:s,startTimestamp:c})]).then((function(n){var a=(0,r.Z)(n,2),c=a[0],u=a[1];return function(e,t,n){var r=n.fingerprintResult,o=n.oneClickAuthn,i=t.controller,a=t.hosted,c=t.intentSecret;return i.report("3ds2.authenticate",{hosted:a,intentId:c.id}),i.action.authenticate3DS2({threeDS2Source:e.threeDS2Source,gateway:e.gateway,outerWindowWidth:window.innerWidth,hosted:a,fingerprintResult:r,oneClickAuthnDeviceSupportAPIParam:{hosted:a,same_origin_frame:o.deviceSupport.sameOriginFrame,spc_eligible:o.deviceSupport.spcEligible,webauthn_eligible:o.deviceSupport.webauthnEligible,publickey_credentials_get_allowed:o.deviceSupport.publickeyCredentialsGetAllowed},oneClickAuthnAuthenticationAPIParam:o.authenticationAPIParam,publishableKey:e.publishableKey}).then((function(e){return"error"===e.type?i.report("3ds2.authenticate.error",{error:e.error,hosted:a,intentId:c.id}):i.report("3ds2.authenticate.success",{hosted:a,intentId:c.id}),e}))}(e,t,{fingerprintResult:c,oneClickAuthn:u}).then((function(n){return function(e,t,n){var r=n.authenticateResponse,a=n.oneClickAuthnDeviceSupport,c=n.oneClickAuthnOptedOut,s=n.challengeFrame,u=t.controller,l=t.hosted,d=t.intentSecret;if("error"===r.type)return o.J.resolve();var m,f=r.object,_=f.state,h=f.ares,y=f.creq;if("delegated"===_)return o.J.resolve();if(null===h)return o.J.resolve();if("C"!==h.transStatus||null==y)return u.report("3ds2.frictionless",{hosted:l,intentId:d.id}),o.J.resolve();switch(e.gateway){case"emvco":m={type:"3ds2-challenge",gateway:e.gateway,threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:h.acsURL,acsTransactionId:h.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:y,publishableKey:e.publishableKey};break;case"itmx":var v=r.object.itmx;m={type:"3ds2-challenge",gateway:e.gateway,threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:h.acsURL,acsTransactionId:h.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:y,publishableKey:e.publishableKey,stepUpUrl:null==v?void 0:v.stepUpUrl,accessToken:null==v?void 0:v.accessToken};break;default:(0,i.Rz)(e)}return p(m,{oneClickAuthnDeviceSupport:a,oneClickAuthnOptedOut:c,challengeFrame:s})}(e,t,{authenticateResponse:n,oneClickAuthnDeviceSupport:u.deviceSupport,oneClickAuthnOptedOut:u.optedOut,challengeFrame:s})}))})).then((function(){return y(t,{intent:_(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return y(t,{intent:h(e,t),challengeFrame:s,startTimestamp:c})}));default:return(0,i.Rz)(e)}}},112:function(e,t,n){"use strict";n.d(t,{$j:function(){return h},Qw:function(){return y}});var r=n(508),o=n(8489),i=n(6977),a=n(7792),c=n(2024),s=n(1873),u=n(3849),l=n(8812),p={clientSecret:(0,s.jt)(s.Z_),redirect:(0,s.jt)((0,s.kw)("always","if_required")),confirmParams:(0,s.jt)(s.Ry),handleActions:(0,s.jt)(s.Xg)},d=(0,o.Z)((0,o.Z)({},p),{},{element:(0,s.jt)(s.Ry)}),m=(0,o.Z)((0,o.Z)({},p),{},{elements:(0,s.jt)(s.Ry)}),f={"stripe.confirmPayment()":{link:"https://stripe.com/docs/js/payment_intents/payment_method",action:"Payment"},"stripe.confirmSetup()":{link:"https://stripe.com/docs/js/setup_intents/payment_method",action:"Setup"}},_=function(e,t,n){var r=t.rawSecret,o=t.rawElement,i=t.rawElements,u=t.rawHandleActions,p=t.rawRedirect,d=t.validatedConfirmParams,m=t.elementConfirmingPayment;if((0,a.uN)(e,a.M4.payment_element_beta_1)){var _=(0,s.rX)(o);if(!_)throw new l.No("Invalid value for ".concat(n,": `element` should be a Payment Element. You specified: ").concat(typeof o,"."));return{type:"elements",element:_}}if(function(e,t){var n=e.rawSecret,r=e.rawElements;if(!n&&!r)throw new l.No("".concat(t,": expected either `elements` or `clientSecret`, but got neither."))}({rawElements:i,rawSecret:r},n),p&&!1===u)throw new l.No("".concat(n,": `redirect` not applicable when `handleActions` is false."));if(r&&!i){if((null==d?void 0:d.payment_method)&&(null==d?void 0:d.payment_method_data))throw new l.No("".concat(n,": Expected either `payment_method` or `payment_method_data`, but not both."));return{type:"clientSecret",clientSecret:r}}var h=(0,s.MO)(i);if(!h)throw new l.No("Invalid value for ".concat(n,": elements should be an Elements group. You specified: ").concat(typeof i,"."));var y=(0,c.sE)(h._elements,(function(e){return"payment"===e._componentName})),v=(0,c.sE)(h._elements,(function(e){return"expressCheckout"===e._componentName||"payButton"===e._componentName}));if(!y&&!v)throw new l.No("Invalid value for ".concat(n,": elements should have a mounted Payment Element or Express Checkout Element. ").concat(function(e,t){if(e&&f[t]){var n=f[t],r=n.link,o=n.action;return"It looks like you have other Elements on the page. Refer to ".concat(r," to confirm a ").concat(o," Intent by payment method.")}return""}(!!h._elements.length,n)));if("expressCheckout"===m){if(!v)throw new Error('Element confirming payment is "expressCheckout", but there is no Express Checkout Element mounted on the page.');return{type:"elements",elements:h,clientSecret:r,element:v}}if(!y){if(v)throw new Error('Element confirming payment is "expressCheckout", but '.concat(n,' was not called within the "confirm" event. Please call ').concat(n,' in the "confirm" event (https://stripe.com/docs/js/elements_object/express_checkout_element_confirm_event).'));throw new Error('Element confirming payment is "payment", but there is no PaymentElement mounted on the page.')}return{type:"elements",elements:h,clientSecret:r,element:y}},h=function(e){return(0,a.uN)(e,a.M4.payment_element_beta_1)?d:m},y=function(e){var t,n=e.controller,c=e.mids,p=e.betas,d=e.rawUpdateData,m=e.intentType,f=e.elementConfirmingPayment,y=e.errorMessageMethodName,v=function(e){var t=e.betas,n=e.rawUpdateData,r=e.errorMessageMethodName,o=e.controller,i=e.elementConfirmingPayment,c=(0,s.Gu)((0,s.mC)(h(t)),n,r),u=c.value,p=u.element,d=void 0===p?void 0:p,m=u.elements,f=void 0===m?void 0:m,y=u.confirmParams,v=u.clientSecret,g=u.redirect,b=u.handleActions,w=c.warnings,k=(0,s.Gu)((0,s.jt)((0,s.mC)({return_url:(0,s.jt)(s.Z_),payment_method:(0,s.jt)(s.Z_),payment_method_data:(0,s.jt)(s.Ry),payment_method_options:(0,s.jt)(s.Ry),setup_future_usage:(0,s.NM)("".concat(r,": do not pass setup_future_usage at confirm time. Instead, pass setup_future_usage when the PaymentIntent is created."))})),y,r,{path:["confirmParams"]}).value,E=_(t,{rawSecret:v,rawElement:d,rawElements:f,rawHandleActions:b,rawRedirect:g,validatedConfirmParams:k,elementConfirmingPayment:i},r);if("clientSecret"===E.type&&!(0,a.uN)(t,a.M4.server_side_confirmation_beta_1)&&!(0,a.uN)(t,a.M4.elements_enable_deferred_intent_beta_1))throw new l.No("".concat(r," with a `clientSecret` is not supported yet. Please use the Payment Element."));var S=g||"always",C=(null==k?void 0:k.return_url)||null;return w.forEach((function(e){return o.warn(e)})),{validatedRedirect:S,validatedReturnUrl:C,validatedParams:E,validatedConfirmParams:k,validatedHandleActions:!1!==b,rawConfirmParams:y}}({betas:p,rawUpdateData:d,controller:n,errorMessageMethodName:y,elementConfirmingPayment:f}),g=v.validatedParams,b=v.validatedConfirmParams,w=v.validatedRedirect,k=v.validatedHandleActions,E=v.validatedReturnUrl,S=v.rawConfirmParams,C=null!=S?S:{},P=(C.payment_method,C.payment_method_data,C.payment_method_options,(0,r.Z)(C,["payment_method","payment_method_data","payment_method_options"]));if(t="clientSecret"===g.type?function(e){var t,n=e.validatedParams,r=e.validatedConfirmParams,i=e.validatedHandleActions,a=e.otherParams,c=e.intentType,s=e.mids,l=null!=r?r:{},p=l.payment_method_data,d=l.payment_method,m=l.payment_method_options,f="payment"===c?(0,u.cn)(n.clientSecret,"confirmPayment"):(0,u.jH)(n.clientSecret,"confirmSetup"),_=(0,u.k7)({payment_method:p}),h={};return"none"!==(t=p&&_?{intentSecret:f,tag:"paymentMethod-from-data",type:_,data:p,options:null!=m?m:{}}:d?{intentSecret:f,tag:"paymentMethod",paymentMethod:d,options:null!=m?m:{}}:{intentSecret:f,tag:"none"}).tag&&"paymentMethod"!==t.tag||(h={use_stripe_sdk:!0,mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}}),{mids:s,mode:t,expectedType:_,otherParams:(0,o.Z)((0,o.Z)({},h),a),options:{handleActions:i}}}({validatedParams:g,validatedConfirmParams:b,validatedHandleActions:k,otherParams:P,intentType:m,mids:c}):function(e){var t,n,r,o,a=e.validatedParams,c=e.validatedConfirmParams,s=e.validatedHandleActions,u=e.otherParams,l=e.mids,p=e.elementConfirmingPayment,d=a.clientSecret?(0,i.RY)(a.clientSecret):null;return{mode:{tag:"elements",groupId:null===(t=a.elements)||void 0===t?void 0:t._id,frameId:null===(n=a.element)||void 0===n?void 0:n._implementation._frame.id,elementName:p,data:null!==(r=null==c?void 0:c.payment_method_data)&&void 0!==r?r:{},options:null!==(o=null==c?void 0:c.payment_method_options)&&void 0!==o?o:{},intentSecret:d||void 0},otherParams:u,expectedType:null,mids:l,options:{handleActions:s}}}({validatedParams:g,validatedConfirmParams:b,validatedHandleActions:k,otherParams:P,mids:c,elementConfirmingPayment:f}),"if_required"===w)return{intentMutationRequest:t,redirect:w,returnUrl:null};if("always"===w&&E)return{intentMutationRequest:t,redirect:w,returnUrl:E};throw new l.No("".concat(y,": the `confirmParams.return_url` argument is required unless passing `redirect: 'if_required'`"))}},206:function(e,t,n){"use strict";n.d(t,{Fh:function(){return E},nq:function(){return P},gO:function(){return C}});var r=n(6977),o=n(4245),i=n(7549),a=n(122),c=n(7193),s=n(6589),u=n(6042),l=n(755),p=n(8147),d=n(5326),m=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.interval||1e4,o=n.timeout||3e5,i=(new Date).getTime();return new s.J((function(n){setTimeout((function a(){s.J.resolve(e(t)).catch((function(e){return{error:e}})).then((function(e){if(null==e)if((new Date).getTime()-i>o){n({error:new Error("Polling timed out without a valid response")})}else setTimeout(a,r);else n(e)}))}),r)}))}},f=m((function(e){var t=e.intentSecret,n=e.intentType,r=e.controller,o=e.locale;return s.J.resolve((0,d.NO)(t,n,r,o)).then((function(e){var t=(0,d.yn)(e);return t?"requires_action"===t.status?null:e:"error"in e&&"lock_timeout"===e.error.code?null:e}))})),_=n(6090),h=n(6790),y=n(8478),v=n(1873),g=n(276),b=n(8812),w=n(7792),k=function(e){return["id_bank_account","id_bank_transfer"].indexOf(e.bankTransferType)>-1},E=function(e){switch(e.type){case"error":var t=e.error;if("payment_intent_unexpected_state"===t.code&&"object"==typeof t.payment_intent&&null!=t.payment_intent&&"string"==typeof t.payment_intent.status&&(0,r.mD)(t.payment_intent.status)){var n=t.payment_intent;return{type:"object",locale:e.locale,object:n}}return e;case"object":return e;default:return(0,v.Rz)(e)}},S=function(e,t,o,m,v,E,S){var C=S||(0,r.G2)(t),P=(0,i.l)(C),A=(0,r.O3)(t);if(!P)return s.J.resolve({paymentIntent:t});switch(P.type){case"cardimageverification-challenge":return n.e(428).then(n.bind(n,5798)).then((function(n){return(0,n.performCardImageVerification)(P,t,e,o)}));case"captcha-challenge":return(0,p.z)(P,t,e,o);case"3ds1-modal":return(0,a.s)(P,A,g.kE.PAYMENT_INTENT,e,o,v);case"3ds2-fingerprint":case"3ds2-challenge":return(0,c.A)(P,{intentSecret:A,intentType:g.kE.PAYMENT_INTENT,controller:e,locale:o,hosted:m},v);case"redirect":return(0,h.k)(t,P.redirectUrl,e);case"blik_authorize":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.shouldDisplayInstructionsModal;return new s.J((function(e){var i,a=!1;return o&&((i=t.createLightboxFrame({type:l.NC.BLIK_INNER,options:{locale:r}}))._on("load",(function(){var e,t;null===(e=i)||void 0===e||e.show(),null===(t=i)||void 0===t||t.fadeInBackdrop()})),i._once("request-close",(function(){i&&(0,u.G)(i).then((function(){a=!0,e({paymentIntent:n})}))}))),(0,d.ct)({controller:t,initialDelay:8e3,pollTimeGap:5e3,intent:n,checkIntent:function(e){return"requires_action"!==e.status||"blik_authorize"!==e.next_action.type},locale:r,shouldPoll:function(){return!a}}).then((function(t){var n;(null===(n=i)||void 0===n?void 0:n.isVisible)&&i.destroy(!0),a||e(t)}))}))}({controller:e,intent:t,locale:o,shouldDisplayInstructionsModal:E});case"boleto-display":if(void 0===P.hostedVoucherUrl)throw new b.No("Expect `next_action.boleto_display_details.hosted_voucher_url` of `PaymentIntent` to be not undefined. Please refer to \n\nhttps://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-boleto_display_details-hosted_voucher_url");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"boleto.voucher_frame_title",useLightboxHostedCloseButton:!1});return new s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:o,url:P.hostedVoucherUrl,intent:t});case"konbini-display":if(void 0===P.hostedVoucherUrl)throw new b.No("Expected option `handleActions` to be `false`. The Konbini pilot does not handle the next actions for you automatically yet (e.g. displaying Konbini payment details). Please refer to the Stripe Konbini integration guide for more info: \n\nhttps://stripe.com/docs/payments/konbini");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x900",locale:o,frameTitle:"konbini.voucher_frame_title",useLightboxHostedCloseButton:!1});return new s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:o,url:P.hostedVoucherUrl,intent:t});case"oxxo-display":if(void 0===P.hostedVoucherUrl)throw new b.No("To handle the next actions automatically, set the API version to oxxo_beta=v2. Please refer to the Stripe OXXO integration guide for more info: \n\nhttps://stripe.com/docs/payments/oxxo");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"oxxo.voucher_frame_title",useLightboxHostedCloseButton:!1});return new s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:o,url:P.hostedVoucherUrl,intent:t});case"upi_await_notification":return f({controller:e,intentSecret:A,intentType:g.kE.PAYMENT_INTENT,locale:o});case"wechat_pay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,_.Ug)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.wechat_pay.frame_title"}})}({controller:e,locale:o,url:P.hostedInstructionsUrl,intent:t,intentSecret:A,intentType:g.kE.PAYMENT_INTENT});case"paynow_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,_.Ug)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.paynow.frame_title"}})}({controller:e,locale:o,url:P.hostedInstructionsUrl,intent:t,intentSecret:A,intentType:g.kE.PAYMENT_INTENT});case"pix_display_qr_code":if(void 0===P.hostedInstructionsUrl)throw new b.No("Expect `next_action.pix_display_qr_code.hosted_instructions_url` of `PaymentIntent` to be not undefined. Please refer to \n\nhttps://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-pix_display_qr_code-hosted_instructions_url");return function(e){var t=e.controller,n=e.intent,r=e.intentSecret,o=e.intentType,i=e.locale,a=e.url,c=(0,u.q)(t,{url:(0,l.jr)(a),size:"450x750",locale:i,frameTitle:"pix.instructions_frame_title",useLightboxHostedCloseButton:!1}),p=null;return new s.J((function(e){c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("request-close",(function(){(0,u.G)(c).then((function(){p&&clearTimeout(p),e({paymentIntent:n})}))})),c._on("complete",(function(t){(0,u.G)(c).then((function(){p&&clearTimeout(p),e(t)}))})),p=setTimeout((function n(){(0,d.NO)(r,o,t,i).then((function(t){var r=(0,d.yn)(t);r&&("requires_action"!==r.status?c.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})})):p=setTimeout(n,2e3))}))}),5e3)}))}({controller:e,locale:o,url:P.hostedInstructionsUrl,intent:t,intentSecret:A,intentType:g.kE.PAYMENT_INTENT});case"promptpay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,_.Ug)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.promptpay.frame_title"}})}({controller:e,locale:o,intent:t,intentSecret:A,url:P.hostedInstructionsUrl,intentType:g.kE.PAYMENT_INTENT});case"display_bank_transfer_instructions":return function(e,t){return!!k(e)&&!(0,w.uN)(t||[],w.M4.id_bank_transfer_beta_1)}(P,e._betas)?(0,h.k)(t,P.hostedInstructionsUrl,e):function(e){return!k(e)}(P)?function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"display_bank_transfer_instructions.voucher_frame_title",useLightboxHostedCloseButton:!1});return new s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,url:P.hostedInstructionsUrl,intent:t,locale:o}):s.J.resolve({paymentIntent:t});case"cashapp_handle_redirect_or_display_qr_code":return(0,y.p)({controller:e,locale:o,intent:t});default:return s.J.resolve({paymentIntent:t})}},C=function e(t,n,r,i,a,c){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;if(g.kO1?"properties":"property",": `").concat(v.join("`, `"),"`. Put additional API properties in `params`."));return(0,s.zS)(g)}if(h){var b=h._componentName,w=l._b[b];return(0,s.x4)({type:w,element:h,elements:null,data:f||{}})}if(y)return(0,s.x4)({type:null,element:null,elements:y,data:f||{}});if(f)return(0,s.x4)({type:f.type,element:null,elements:null,data:f})}else if(u&&!n.type){var k=new c.No("element, elements, or params must be provided.");return(0,s.zS)(k)}var E,S=n.type,C=(0,a.Z)(n,["type"]);if(null===e){if("string"!=typeof S)return(0,s.RH)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof S,(0,s.NQ)(r,"type"));E=S}else{if(void 0!==S&&S!==e)return"string"!=typeof S?(0,s.RH)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof S,(0,s.NQ)(r,"type")):(0,s.RH)('"'.concat(S,'"'),'"'.concat(e,'"'),(0,s.NQ)(r,"type"));E=e}var P=C[E],A=(C[E],(0,a.Z)(C,[E].map(i.Z)));if(-1!==["acss_debit","affirm","afterpay_clearpay","alipay","bancontact","cashapp","customer_balance","eps","giropay","grabpay","klarna","konbini","mobilepay","oxxo","p24","paynow","paypal","pix","us_bank_account","wechat_pay","pay_by_bank","paynow","promptpay","revolut_pay","zip"].indexOf(E)&&void 0===P&&(P={}),"object"!=typeof P)return(0,s.RH)("an object or element",typeof n[E],(0,s.NQ)(r,E));if(null===P)return(0,s.RH)("an object or element","null",(0,s.NQ)(r,E));var I=(0,s.rX)(P);if(I){var N=I._componentName;if(l._b[N]!==E){var T=[].concat((0,o.Z)(r.path),[E]).join("."),M=r.label,R=new c.No("Invalid value for ".concat(M,": ").concat(T," was `").concat(N,"` Element, which cannot be used to create ").concat(E," PaymentMethods."));return(0,s.zS)(R)}return(0,s.x4)({type:E,element:I,elements:null,data:A})}return(0,s.x4)({type:E,element:null,elements:null,data:C})}},v=(0,s.Wc)((0,s.mC)({handleActions:(0,s.Wc)(s.Xg,(function(){return!0}))}),(function(){return{handleActions:!0}})),g=function(e){return function(t,n){if("object"!=typeof t)return(0,s.RH)("object",typeof t,n);if(null===t)return(0,s.RH)("object","null",n);var r=t.billing_details,o=(0,a.Z)(t,["billing_details"]);return(0,s.x4)({paymentMethodData:{type:"".concat(e),billing_details:r},otherParams:o})}},b=function(e){return function(t,n){if("object"!=typeof t)return(0,s.RH)("object",typeof t,n);if(null===t)return(0,s.RH)("object","null",n);var o=t.clientSecret,i=t.params,c=(0,a.Z)(t,["clientSecret","params"]),u=(0,s.ld)(e,o,n.label,{path:["clientSecret"]});if("error"===u.type)return u;if("object"!=typeof i)return(0,s.RH)("object",typeof i,(0,s.NQ)(n,"params"));if(null===i)return(0,s.RH)("object","null",(0,s.NQ)(n,"params"));var l=i.payment_method_type,p=i.payment_method_data;return"string"!=typeof l?(0,s.RH)("string",typeof l,(0,s.NQ)((0,s.NQ)(n,"params"),"payment_method_type")):"object"!=typeof p&&void 0!==p?(0,s.RH)("object",typeof p,(0,s.NQ)((0,s.NQ)(n,"params"),"payment_method_data")):(0,s.x4)({clientSecret:u.value,paymentMethodData:(0,r.Z)({type:l},(null==p?void 0:p.billing_details)&&{billing_details:null==p?void 0:p.billing_details}),otherParams:c})}},w=function(e,t){return function(n,i){if(void 0===n)return(0,s.x4)({paymentMethodData:null,paymentMethodOptions:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof n)return(0,s.RH)("object",typeof n,i);if(null===n)return(0,s.RH)("object","null",i);var l=n.source,p=n.source_data,d=n.payment_method_data,m=n.payment_method_options,f=n.payment_method,_=(0,a.Z)(n,["source","source_data","payment_method_data","payment_method_options","payment_method"]);if(null!=p)throw new c.No("".concat(t,": Expected payment_method, or source, not source_data."));if(null!=d)throw new c.No("".concat(t,": Expected payment_method, or source, not payment_method_data."));if(null!=l&&null!=f)throw new c.No("".concat(t,": Expected either payment_method or source, but not both."));if(null===e&&null!=f&&"string"!=typeof f)throw new c.No("".concat(t,": Expected payment_method[type] to be set if payment_method is passed."));if(null!=l){if("string"!=typeof l)return(0,s.RH)("string",typeof l,(0,s.NQ)(i,"source"));if("updatePaymentIntent"===t)throw new c.No("".concat(t,": Expected payment_method, not source to be passed."));return(0,s.x4)({source:l,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:_})}if(null!=f&&"string"!=typeof f&&"object"!=typeof f)return(0,s.RH)("string or object",typeof f,(0,s.NQ)(i,"payment_method"));var h,v=(0,s.ld)((h=e,function(e,t){if(null==e)return(0,s.x4)(null);if("object"!=typeof e)return(0,s.RH)("object",typeof e,t);var n=e.card,o=(0,a.Z)(e,["card"]);if(!n||"object"!=typeof n)return(0,s.x4)(e);var i=n.cvc,c=(0,a.Z)(n,["cvc"]);if(null==i)return(0,s.x4)(e);var l=(0,s.rX)(i),p=l?l._componentName:"";return u.Yj.cardCvc!==p?(0,s.RH)("`".concat(u.Yj.cardCvc,"` Element"),p?"`".concat(p,"` Element"):typeof i,(0,s.NQ)(t,"".concat(h||"card",".cvc"))):(0,s.x4)((0,r.Z)((0,r.Z)({},o),{},{card:(0,r.Z)((0,r.Z)({},c),{},{cvc:l})}))}),m,t,{path:[].concat((0,o.Z)(i.path),["payment_method_options"])});if("error"===v.type)return v;if("string"==typeof f)return(0,s.x4)({source:null,paymentMethodData:null,paymentMethodOptions:v.value,paymentMethod:f,otherParams:_});if("object"==typeof f&&null!==f){var g=(0,s.ld)(y(e),f,t,{path:[].concat((0,o.Z)(i.path),["payment_method"])});if("error"===g.type)return g;var b=g.value;return(0,s.x4)({source:null,paymentMethod:null,paymentMethodOptions:v.value,paymentMethodData:b,otherParams:_})}return(0,s.x4)({source:null,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:_})}},k=function(e,t){if(null===e)return(0,s.RH)("object","null",t);if("object"!=typeof e)return(0,s.RH)("object",typeof e,t);var n=e.type;if("string"!=typeof n)return(0,s.RH)("a string such as 'use_stripe_sdk', 'redirect_to_url'",typeof n,(0,s.NQ)(t,"type"));if("use_stripe_sdk"!==n)return(0,s.RH)("a 3DS2 NextAction type such as 'use_stripe_sdk'",n,(0,s.NQ)(t,"type"));var r=e.use_stripe_sdk;if("object"!=typeof r)return(0,s.RH)("an object",r,(0,s.NQ)(t,"type"));var o=e;return(0,s.x4)(o,[])}},6042:function(e,t,n){"use strict";n.d(t,{G:function(){return i},q:function(){return o}});var r=n(755),o=function(e,t){var n=e.createLightboxFrame({type:r.NC.LIGHTBOX_APP,options:t});return n.show(),n._on("nested-frame-loaded",(function(){n.fadeInBackdrop(),setTimeout((function(){n.action.openLightboxFrame()}),200)})),n},i=function(e){return e.action.closeLightboxFrame(),e.destroy()}},1164:function(e,t,n){"use strict";n.d(t,{vS:function(){return i},ud:function(){return o},Nj:function(){return d},jR:function(){return p}});var r={ar:"ar",bg:"bg",cs:"cs",da:"da",de:"de",el:"el",en:"en","en-GB":"en-GB",es:"es","es-419":"es-419",et:"et",fi:"fi",fil:"fil",fr:"fr","fr-CA":"fr-CA",he:"he",hr:"hr",hu:"hu",id:"id",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",ms:"ms",mt:"mt",nb:"nb",nl:"nl",no:"no",pl:"pl",pt:"pt","pt-BR":"pt-BR",ru:"ru",ro:"ro",sk:"sk",sl:"sl",sv:"sv",th:"th",tr:"tr",vi:"vi",zh:"zh","zh-HK":"zh-HK","zh-TW":"zh-TW"},o=["ar","he"],i="en",a=(Object.keys(r),r),c=n(9294),s=n(7792),u={"es-HN":"es-419","es-MX":"es-419","es-US":"es-419"},l=function(e){try{var t=function(e){var t=e.split("-"),n=t[0],r=null,o=null,i=null;if(t.length>1&&(4===t[1].length?o=t[1]:2===t[1].length||3===t[1].length?r=t[1]:i=t[1]),t.length>2&&(2===t[2].length||3===t[2].length?r=t[2]:i=t[2]),t.length>3&&(i=t[3]),2!==n.length&&3!==n.length)throw new Error("invalid locale ".concat(e));var a=n.toLowerCase(),c=r?r.toUpperCase():null,s=o?"".concat(o[0].toUpperCase()).concat(o.substring(1).toLowerCase()):null;return{locale:a+(s?"-".concat(s):"")+(c?"-".concat(c):"")+(i?"-".concat(i):""),language:a,region:c,script:s,variant:i}}(e),n=t.locale,r=t.language,o=[n];return u[n]&&o.push(u[n]),n!==r&&o.push(r),o.push(i),o}catch(t){return[e,i]}},p=function(e){return function(e){for(var t=l(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}});var o=n(5178)},5178:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,{Z:function(){return r}})},5679:function(e,t,n){"use strict";function r(e,t){return!t||"object"!==(0,o.Z)(t)&&"function"!=typeof t?(0,i.Z)(e):t}n.d(t,{Z:function(){return r}});var o=n(9675),i=n(6148)},9384:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},7904:function(e,t,n){"use strict";function r(e,t){return(0,o.Z)(e)||(0,i.Z)(e,t)||(0,a.Z)(e,t)||(0,c.Z)()}n.d(t,{Z:function(){return r}});var o=n(2781),i=n(7090),a=n(2327),c=n(4501)},3696:function(e,t,n){"use strict";function r(e){return(0,o.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,c.Z)()}n.d(t,{Z:function(){return r}});var o=n(6794),i=n(5253),a=n(2327),c=n(2646)},1352:function(e,t,n){"use strict";function r(e){var t=function(e,t){if("object"!==(0,o.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==(0,o.Z)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,o.Z)(t)?t:String(t)}n.d(t,{Z:function(){return r}});var o=n(9675)},9675:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},2327:function(e,t,n){"use strict";function r(e,t){if(e){if("string"==typeof e)return(0,o.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.Z)(e,t):void 0}}n.d(t,{Z:function(){return r}});var o=n(4400)},4909:function(e,t,n){"use strict";function r(e){var t="function"==typeof Map?new Map:void 0;return r=function(e){function n(){return(0,c.Z)(e,arguments,(0,o.Z)(this).constructor)}if(null===e||!(0,a.Z)(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(n,e)},r(e)}n.d(t,{Z:function(){return r}});var o=n(3538),i=n(9384),a=n(3043),c=n(3009)}},o={};e.m=r,e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.f={},e.e=function(t){return Promise.all(Object.keys(e.f).reduce((function(n,r){return e.f[r](t,n),n}),[]))},e.u=function(e){return"fingerprinted/js/"+{1:"elements-affirm-modal",209:"elements-affirm-message",259:"elements-afterpay-clearpay-modal",404:"orders-outer",428:"payment-intent-outer-actions-cardimageverification",578:"elements-afterpay-clearpay-message",631:"elements-payment-method-messaging",870:"elements-payment-method-messaging-modal",913:"trusted-types-checker"}[e]+"-"+{1:"0d7dc393e2a3cc8231d6c04985a7ba15",209:"02d0930b82b013d72b71a8e5d431d4d1",259:"9e4dac5053110187ee5e74bf8e2ef6f5",404:"d21aeca717506d17b391b5aac91594dd",428:"f5e1764b412971516c452102decd5333",578:"648072a13dd9cc56365470fe2aaba670",631:"b3ed79ae4b3da0ebd84af619554e1c89",870:"aebb371b055f11834c3bd75ade8dd19d",913:"239db17d86d6320632b024ca9e43ba9c"}[e]+".js"},e.miniCssF=function(){},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},n="stripe-js-v3:",e.l=function(r,o,i){if(t[r])t[r].push(o);else{var a,c;if(void 0!==i)for(var s=document.getElementsByTagName("script"),u=0;u