PageSourceSearch

https://maisonlprn.com/cdn/shopifycloud/checkout-web/assets/c1/7fd9930c.xcSdfvu9.js

js maisonlprn.com collected 2026-10-09 22:45:03 UTC 7,140 bytes, 1 lines download raw bytes

1import{C as e,g as n,h as a,u as t,L as l,q as o,T as i,S as c}from"./2c1ab0fe.qpvfywqb.js";import{r,f as s,s as d,bm as m,b as p,ab as h,S as u,B as _,a1 as g,d as b,M as f,bY as y}from"./164ad2e3.DcJn775M.js";import{Q as w,C as x}from"./3e6029dd.CzD4uDEq.js";import"./app.DH8n-1bp.js";import{bx as k,e as S,y as M,by as v}from"./4b4bc88f.DkycdxSK.js";import"./d0bb51ec.CWfbNPnY.js";import"./f67abd2c.CNaB0QaR.js";import"./e12db40c.DhbHW8sF.js";import"./9dba8418.4R19B40l.js";import"./60a453ce.DBFo6PRx.js";var z="var(--_1cm3fw00)";const C=d("Countdown");function I({duration:o=0,defaultValue:i=o,label:c,onEnd:d}){const m=r(void 0,C),[p]=e(()=>Date.now()+i),[h,u]=e(()=>Math.max(i,0)),_=n(d),g=n(!1);_.current=d,a(()=>{let e;const n=()=>{const a=Math.max(p-Date.now(),0);u(a),0!==a?e=setTimeout(n,a%1e3||1e3):g.current||(g.current=!0,_.current?.())};return n(),()=>clearTimeout(e)},[p]);const b=o>0?Math.min(Math.max((o-h)/o*100,0),100):0;return t("div",{role:c?"timer":void 0,"aria-labelledby":c?m:void 0,className:"_1cm3fw02 _1cm3fw01 _1fragem6t _1fragemzf _1fragem82",children:[t("div",{"aria-hidden":!0,className:"_1cm3fw04 _1cm3fw03 _1fragemup _1fragemv4 _1fragemzf _1fragem32",style:l({[z]:`${b}%`}),children:t("div",{className:"_1cm3fw06 _1cm3fw05 _1fragem4q"})}),c&&t(s,{id:m,accessibilityVisibility:"hidden",type:"small",textAlign:"center",color:"subdued",children:c(h)})]})}function E(e,n){return k(e)||/Shop App\/[^/]+\/iOS\//.test(e.userAgent)||null!=n&&"WEB"!==n}const R=new Set(["alipay","bancontact","blik","eps","ideal","klarna","mobilepay","multibanco","paypal","przelewy24","satispay","sofort","swish","twint","usdc","wechatpay"]);function D(e){return e.toLowerCase().replace(/[\s_-]+/gu,"")}const T=e=>{const n=Math.floor(e/36e5),a=String(Math.floor(e%36e5/6e4)).padStart(2,"0"),t=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return n>0?`${n}:${a}:${t}`:`${a}:${t}`},q={bogus_app_coin:"/cdn/shopifycloud/checkout-web/assets/c1/assets/bogus.Dgqxw51f.svg",pix:"/cdn/shopifycloud/checkout-web/assets/c1/assets/pix.D3fYfWH5.svg",blik:"/cdn/shopifycloud/checkout-web/assets/c1/assets/blik.DVGmDGpj.svg",swish:"/cdn/shopifycloud/checkout-web/assets/c1/assets/swish.Bmk5gRpD.svg"},j=["wechat_pay","paynow"];function A({challengeType:l,challengeData:r,receipt:d,paymentMethod:k,onModalRender:z,challengeExpiresAt:C}){const A=((e,n)=>null!=n?Math.max(n-Date.now(),0):e&&y(e)&&e.timeout?.millisecondsRemaining||0)(d,C),[O,N]=e(!1),[L,$]=e(),[Q]=e(A),{i18n:B,client:V,embed:W}=S(),F=function(e){const{paymentMethod:n}=e,{userEvents:a,shop:{id:t},source:l}=S(),c=o(e=>a.monorailEvent({schemaId:"checkout_buyer_action_required_events/1.0",payload:{eventTriggerReason:e,paymentMethodDisplayName:n.name,checkoutSessionIdentifier:l.checkoutSessionIdentifier||"",shopId:parseInt(M(t),10)}}),[n.name,t,l.checkoutSessionIdentifier,a]);return i(()=>({onModalRendered:()=>c("modal_rendered"),onModalTimeout:()=>c("buyer_action_timeout"),onModalExit:()=>c("buyer_closes_modal"),onCopiedToClipboard:()=>c("buyer_copies_to_clipboard"),onChallengeRendered:e=>{switch(e){case"QR_CODE":c("qr_code_rendered");break;case"EXTERNAL":c("external_action_rendered")}}}),[c])}({paymentMethod:k}),G=n(null);i(()=>{O&&z&&setTimeout(()=>{z()},1e3)},[O,z]);const J=o(()=>d?(F.onModalTimeout(),N(!1),null):null,[d,F]);let X,Y;a(()=>{l&&r&&Q&&($(JSON.parse(r)),N(!0))},[l,r,Q]);let H,P,K=!1;switch(l){case"QR_CODE":if(X=B.translate("payment_challenge_modal.qr_code.instructions",{paymentMethod:k.name}),L){const e=JSON.parse(L.data);Y=e?.mobile_app_universal_url,H=e?.instruction,K=j.includes(e?.instruction),"wechat_pay"===e?.instruction?("string"==typeof e.cancellation_url&&e.cancellation_url.startsWith("https://")&&"string"==typeof e.cancellation_auth_token&&e.cancellation_auth_token&&(P={url:e.cancellation_url,token:e.cancellation_auth_token}),X=E(V,W?.platform)?B.translate("payment_challenge_modal.qr_code.wechat_instructions_mobile"):B.translate("payment_challenge_modal.qr_code.wechat_instructions")):"paynow"===e?.instruction&&(X=E(V,W?.platform)?B.translate("payment_challenge_modal.qr_code.paynow_instructions_mobile"):B.translate("payment_challenge_modal.qr_code.paynow_instructions"))}break;case"EXTERNAL":X=B.translate("payment_challenge_modal.external.instructions",{paymentMethod:k.name});break;default:X=B.translate("payment_challenge_modal.instructions",{paymentMethod:k.name})}a(()=>{O&&L&&F.onModalRendered()},[O,L,F]),a(()=>{L&&F.onChallengeRendered(l)},[F,L,l]);const U=B.translate("payment_challenge_modal.copy_text",{paymentMethod:k.name}),Z=B.translate("payment_challenge_modal.open_app_text",{paymentMethod:k.name}),ee=Y?Z:U,ne=B.translate("payment_challenge_modal.header",{paymentMethod:k.name}),ae=B.translate("payment_challenge_modal.close"),te=(e=>{const n=v(e);return n?q[n]:null})(k),le="QR_CODE"===l?function(e){for(const n of e){if("string"!=typeof n||""===n)continue;const e=D(n);if(R.has(e))return`https://cdn.shopify.com/static/retail/lpm-icons/png/square-icons/${e}.png`}}([H,...k.paymentBrands??[]]):void 0;return d&&t(f,{open:O,blocking:!0,accessibilityLabel:ne,size:"base",children:[P&&t(m,{children:t("form",{ref:G,action:P.url,method:"POST",hidden:!0,children:t("input",{type:"hidden",name:"cancellation_auth_token",value:P.token})})}),t(p,{children:[t(h,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"large-300",alignItems:"center",alignContent:"center",children:[t(s,{size:"large",textAlign:"start",children:ne}),t(u,{gap:"small-400",alignItems:"end",children:t(_,{onClick:()=>(F.onModalExit(),void(G.current?G.current.submit():window.location.reload())),variant:"plain",tone:"monochrome",inlineAlignment:"end",accessibilityLabel:ae,children:t(g,{type:"x"})})})]}),t(p,{children:[t(b,{blockSize:"base"}),te&&!le&&t(c,{children:[t(u,{gap:"large-300",alignItems:"center",children:t("img",{src:te,alt:k.name})}),t(b,{blockSize:"small-400"})]}),t(u,{gap:"large-300",alignItems:"center",children:t(s,{size:"base",textAlign:"center",textWrap:"pretty",children:X})}),"QR_CODE"===l&&L&&t(c,{children:[t(b,{blockSize:"base"}),t(u,{gap:"base",alignItems:"center",children:[t(u,{gap:"base",maxInlineSize:"150px",minInlineSize:"150px",alignItems:"center",children:t(w,{content:L?.code,size:"fill",logo:le},le)}),!K&&t(c,{children:[t(b,{blockSize:"large-200"}),t(u,{gap:"base",alignItems:"center",maxInlineSize:"400px",minInlineSize:"@media (inline-size >= extraSmall) 400px, 100%",children:t(_,{commandFor:"qr-code-challenge-data-code",command:Y?void 0:"--copy",inlineSize:"fill",inlineAlignment:"center",onClick:()=>{Y&&(window.open(Y,"_blank"),F.onChallengeRendered("QR_CODE"))},children:ee})}),!Y&&t(x,{text:L?.code,id:"qr-code-challenge-data-code",onCopy:()=>F.onCopiedToClipboard()})]})]})]}),t(b,{blockSize:"large-200"}),t(u,{alignItems:"center",children:t(p,{maxInlineSize:"150px",minInlineSize:"150px",children:t(I,{duration:Q,defaultValue:A,label:e=>B.translate("payment_challenge_modal.timer_message",{timeLeft:T(e)}),onEnd:J})})}),t(b,{blockSize:"large-200"})]})]})]})}export{q as SUPPORTED_PAYMENT_METHOD_BRAND_ICONS,A as default};

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.