PageSourceSearch

https://tecbuy.com/cdn/shopifycloud/checkout-web/assets/c1/d56ce0bb.da_BF-XL.js

js tecbuy.com collected 2026-10-08 11:03:01 UTC 7,986 bytes, 1 lines download raw bytes

1import{u as e,w as a,g as t,q as s,h as l,o as n,m as o,k as i,p as r,L as c,s as p,S as d}from"./2c1ab0fe.Bf8FS-kA.js";import{c as u,c2 as m,a6 as b,c3 as v,aQ as h,z as f}from"./4b4bc88f.C6QXxWcp.js";import{S as y,cl as _,I as P,cm as j,cn as S,X as g,bg as w,b as A,f as k,L,j as C,B as E,aH as N,a1 as z,H,M as x,a as M,co as Y,cp as B,r as q,s as I}from"./164ad2e3.BPEX42uv.js";import{A as R}from"./d4ea2faa.D788KbGc.js";import{T as W}from"./7b0c98ea.DpTJ94IC.js";import{S as T,d as X}from"./e3e348f2.B6iohKT0.js";import{c as F}from"./31cc568e.95lmLO5k.js";import{e as O}from"./c6c0cbda.BXj5YQC9.js";import{s as V}from"./dffdfb34.BRT241wm.js";import"./app.YmvH25zM.js";import"./d0bb51ec.3dWJ276v.js";import"./f67abd2c.DVYhtaBv.js";import"./60a453ce.Boic_DNC.js";import"./e12db40c.2vh-yzuN.js";import"./9dba8418.bYtorePf.js";import"./71ae3d5c.D57ySY2w.js";import"./3ca8ef7e.BS-l2zDp.js";import"./1f5e7811.Dor9SUuC.js";import"./2fdb3dd3.XqxrAL2n.js";import"./22345fd4.BoFvu5gm.js";import"./0e67bd3b.DmiPwvo_.js";import"./74835653.CoZYi26f.js";import"./2495faa4.1SnUZiCo.js";import"./a9fa9fda.BdhYcFOq.js";import"./ca3e798e.Dc6mNaNz.js";import"./47b970b2.BE-srlol.js";import"./064f6ac1.CjuMIPLF.js";import"./efa0389a.BZyYBSt1.js";import"./4b1c22b7.BRxY0LFs.js";import"./17425706.B-zCsrR4.js";import"./55098bf1.Bnc0Yrr2.js";import"./cb5cf153.BwijbKWu.js";import"./cb38e5c2.BLx6hoEY.js";import"./78ab3dd0.CCnSg37g.js";import"./ed9f2238.hc0X2InV.js";import"./6fb6f9d8.BB_H_Bk-.js";import"./1444e6bd.KejVbUCp.js";import"./0b8657b8.DD4TEsqt.js";import"./a422df8c.DsXWNeDU.js";import"./79974aab.D-fRdmAW.js";import"./d22d2b80.BtsULFzN.js";import"./f49d4216.D1vUwDVr.js";function J({body:a}){return e(j,{children:e(P,{dangerouslySetInnerHTML:{__html:a.value??""},scrollableContent:"all"})})}function Q({body:t,loading:s,error:l}){const{i18n:n}=u();return e(a,{when:l,fallback:e(a,{when:s,fallback:e(J,{body:t}),children:e(y,{gap:"base",children:[e(_,{lines:2,lastLineSize:"large"}),e(_,{lines:3,lastLineSize:"small"}),e(_,{lines:2,lastLineSize:"base"}),e(_,{size:"extraLarge",lastLineSize:"large",lines:1}),e(_,{lines:7,lastLineSize:"small"}),e(_,{lines:3,lastLineSize:"base"})]})}),children:n.translate("bad_request.title")})}const U="JtAjb",D="otCH1";function G({id:i,canConfirm:r,onConfirm:c,onHide:p,onShow:d}){const{i18n:b,shop:v,checkout:{negotiator:h}}=u(),{checkoutProtocolModalEventSignal:f}=h.context,_=b.translate("payment.purchase_options_cancellation_policy_label"),P=v.merchantPolicies.find(({handle:e})=>e===T),j={handle:T,shopId:v.id,shopName:v.name,squareLogo:v.brandSettings?.squareLogo,name:_,url:P?.url??""},M=m(S,{defaultPolicy:j,policies:[j]}),Y=t(!1),B=s(()=>{Y.current&&"applePaySubscriptionConsent"===f.value&&(f.value="none"),Y.current=!1},[f]);l(()=>B,[B]);const q=n(!1),I=n(!1),R=t(null),O=g(),V=w(q.value,"slow"),J=q.value||I.value,G=!q.value||I.value,K=s(e=>{R.current=e,e&&(e.dataset.inertSupported=String("inert"in e))},[]),Z=b.translate("wallets.continue_with",{walletName:b.translate("brand.apple_pay")}),$=q.value?F(_):b.translate("payment.purchase_options_subscription_confirmation_title"),ee=s(()=>{M.show(),q.value=!0},[M,q]),ae=s(()=>{M.hide(),q.value=!1},[M,q]),te=s(()=>{I.value=!0,M.hide(),B(),p()},[I,M,B,p]),se=s(()=>{q.value=!1,I.value=!1,Y.current=!0,f.value="applePaySubscriptionConsent",d()},[q,I,f,d]);return e(x,{id:i,heading:e(y,{direction:"inline",alignItems:"center",gap:"base",children:[e(a,{when:q,children:e(N,{type:"button",padding:"small-400",borderRadius:"base",accessibilityLabel:b.translate("account_management.back"),onClick:ae,children:e(z,{type:"arrow-left",size:"base"})})}),e(H,{level:1,autoFocus:!0,children:$},q.value?"policy":"consent")]}),accessibilityLabel:$,onShow:se,onHide:te,actionLayout:"stacked",primaryAction:e(E,{variant:"primary",type:"button",inlineSize:"fill",disabled:!r.value,onClick:c,children:Z}),children:e(A,{className:"VqsW7",children:e(W,{contentRef:R,children:e(A,{ref:K,className:"c1X76",padding:"small-200",overflow:"hidden",children:[e(a,{when:()=>O?!q.value:"entered"!==V,children:e(A,{className:o(U,q.value&&D),"data-side":"backward","data-visible":!q.value&&(O||"exit"!==V),position:q.value?"absolute":"relative",inert:J,children:e(k,{children:e(X,{buttonLabel:Z,cancellationPolicyLink:P?e(L,{tone:"monochrome",onClick:ee,children:e(C,{children:_})}):void 0})})})}),e(a,{when:()=>O?q.value:"exited"!==V,children:e(A,{className:o(U,!q.value&&D),"data-side":"forward","data-visible":q.value&&(O||"enter"!==V),position:q.value?"relative":"absolute",inert:G,children:e(Q,{body:M.policyBody,loading:M.loading,error:M.error})})})]})})})})}const K=I("ApplePaySubscriptionConsentModal");function Z({supportedNetworks:m,color:y}){const{acceleratedWalletPaymentMethods:_,applePaySessionHandler:P,inMemoryApplePayParts:{buttonStatus:j,paymentSheetError:S}}=b(),g=i(()=>{const e=P.value;return null==e?.createSession||null==e.showApplePayPaymentSheet?null:{createSession:e.createSession,openApplePayPaymentSheet:e.showApplePayPaymentSheet}}),w=t({status:"rendered"});r(()=>{const e=null!=g.value,a=j.value;e&&"not_rendered"===a.status?c(()=>{j.value=w.current}):e||a!==w.current||c(()=>{j.value={status:"not_rendered"}})}),l(()=>()=>{j.value===w.current&&(j.value={status:"not_rendered"})},[j]);const A=M(),k=t(null),{observability:L,i18n:C,checkout:E}=u(),{wallets:N}=E,z=p(Y()),H=i(()=>v({hasSubscription:h({checkout:E}),isApplePayAvailable:_.value.some(({name:e})=>
1"APPLE_PAY"===e),variant:z.value})),{showOverlay:x,hideOverlay:I}=B(),W=q(void 0,K),T=n(!1),X=s(()=>{T.value=!0,L.log("apple_pay_subscription_consent_modal_opened","Apple Pay subscription consent modal opened")},[T,L]),F=s((e="dismissed")=>{T.value&&(T.value=!1,L.log("apple_pay_subscription_consent_modal_closed","Apple Pay subscription consent modal closed",{reason:e}))},[T,L]),J=()=>{L.log("apple_pay_button_clicked_while_loading","Apple Pay button clicked while already loading the payment sheet. Ignoring click.")},Q=()=>{L.error(new R("Apple Pay button clicked without a ready session handler."))},U=e=>{const a=N.activeSession.value;if("APPLE_PAY"===a?.wallet)return void J();const t=g.value;if(t)try{t.openApplePayPaymentSheet(t.createSession({supportedNetworks:m,...e&&{subscriptionConsent:e}}).session),"explicit_modal"===e&&"APPLE_PAY"===N.activeSession.value?.wallet&&L.log("apple_pay_subscription_consent_session_started","Apple Pay session started after subscription consent")}catch(s){const e={error:s,errorName:s instanceof Error?s.name:"Unknown",errorMessage:s instanceof Error?s.message:String(s),...s instanceof Error&&s.stack&&{errorStack:s.stack}};L.leaveErrorBreadcrumb("Failed to create Apple Pay session",e),S.value={type:"failed_to_create_session"},"APPLE_PAY"===N.activeSession.value?.wallet&&N.clearActiveSession({invokingWallet:"APPLE_PAY"})}else Q()},D=i(()=>"explicit_modal"===H.value),Z=i(()=>T.value&&D.value&&null!=g.value&&null==N.activeSession.value);r(()=>{T.value&&(!D.value||null==g.value||null!=N.activeSession.value)&&(F("invalidated"),I(W))});const $=null!=g.value;return e(d,{children:[e("button",{ref:e=>{k.current=e,A("apple_pay")(e)},className:o(V.ApplePayButton,V[y],O.borderRadius,f({focusRing:"base"})),lang:C.locale,disabled:!$,onClick:()=>{const e=N.activeSession.value;if("APPLE_PAY"===e?.wallet)return void J();const a=H.value;if(D.value)return e?void L.log("apple_pay_subscription_consent_blocked_by_active_wallet","Apple Pay subscription consent blocked by another active wallet.",{activeWallet:e.wallet,requestedWallet:"APPLE_PAY"}):g.value?(k.current?.focus({preventScroll:!0}),void x(W)):void Q();U(a)},type:"button","aria-label":C.translate("brand.apple_pay"),"aria-haspopup":D.value?"dialog":void 0}),e(a,{when:()=>D.value||T.value,children:e(G,{id:W,canConfirm:Z,onShow:X,onHide:F,onConfirm:()=>{Z.value&&(L.log("apple_pay_subscription_consent_confirmed","Apple Pay subscription consent confirmed"),F("confirmed"),I(W),U("explicit_modal"))}})})]})}export{Z as ApplePayButton};

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.