1(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{registerExpressPaymentMethod:()=>c,registerPaymentMethod:()=>a});const o=window.wc.wcBlocksRegistry,n=window.wc.wcSettings,r=window.wcStripe.blocksUtils,s=()=>(window._wcStripeExpressCheckout||(window._wcStripeExpressCheckout={paymentMethods:{},promise:null}),window._wcStripeExpressCheckout),i=(e,t,o)=>({cart:i})=>{const a="function"==typeof e?e():e;return!!t.includes(a)&&(e=>{const t=s();if(t.promise)return t.promise;let o=e.cartTotals.currency_code?.toLowerCase();(!o||o?.length<3)&&(o=(0,n.getSetting)("stripeGeneralData")?.currency?.toLowerCase());const i=parseInt(e.cartTotals.total_price);return t.promise=new Promise(e=>{r.initStripe.then(n=>{let r={mode:"payment",currency:o};0>=i&&(r={...r,mode:"setup"}),["payment","subscription"].includes(r.mode)&&(r.amount=i);const s=n.elements(r).create("expressCheckout",{paymentMethods:t.paymentMethods}),a=document.createElement("div");a.style.display="none",document.body.appendChild(a),s.on("ready",({availablePaymentMethods:t})=>{s.unmount(),a.remove(),e(null!=t?t:{})}),s.on("loaderror",()=>{a.remove(),e({})}),s.mount(a)})}),t.promise})(i).then(e=>{var t;return null!==(t=e[o])&&void 0!==t&&t})},a=({activeMethod:e,availabilityKey:t,context:n,sections:r,...a})=>{const c=s();Object.assign(c.paymentMethods,e),(0,o.registerPaymentMethod)({...a,canMakePayment:i(n,r,t)})},c=({activeMethod:e,availabilityKey:t,context:n,sections:r,...a})=>{const c=s();Object.assign(c.paymentMethods,e),(0,o.registerExpressPaymentMethod)({...a,canMakePayment:i(n,r,t)})};(this.wcStripe=this.wcStripe||{}).blocksExpressCheckout=t})(); 2//# sourceMappingURL=blocks-express-checkout.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.