1import{cx as f,N as S,Q as l,b4 as P,iW as y}from"./utilities-previous.C42MP_Mw.js";import{T as d,u as C,g as h,q as v}from"./esnext-vendor.7EcvH7tF.js";import{S as m}from"./addresses-is-address-empty.c1RwzK2R.js";import{S as b}from"./hooks-useShowShopPayOptin.DLrhKtTG.js";import{b as k,a as B}from"./hooks-useShouldRevealCustomization.vFBBGO5a.js";import{_ as E,u as L}from"./hydrate.DbBIWEk-.js";const U=/\S+@\S+\.\S{2,}/;function z(t,o){if(!f(t))return o}function Q(t,o){return U.test(t)?void 0:o}const c=new S(0,0,100);function M({foregroundColor:t,backgroundColor:o,section:e="main"}){const n=E(),{colors:s}=L(),a=n[e];let r=c;if(o===void 0){const p=a.colorScheme;r=p?s.schemes?.[p]?.base?.background??c:c}else r=o;const{isValidContrast:g}=d(()=>k({backgroundColor:r,foregroundColor:t}),[r,t]);return g}const T="_8ssCG",_="zS4x6",w="PrlUn",I="SsCEp",x="eEpXo",D="PJvCw",O="aTkbO",u={xsmall:T,small:_,medium:w,large:I,ShopPayLogo:x,ShopLogo:D,inline:O};function $({accessibilityVisibility:t="visible",color:o="white",inline:e,size:n="medium"}){const s=o==="branded"?m.toRgb():o,a=t==="hidden";return C(b,{className:h(u.ShopLogo,u[n],{[u.inline]:e}),style:{fill:s},"aria-hidden":a||void 0,"aria-label":a?void 0:"Shop",role:a?void 0:"img"})}function q(){const{observability:t,source:o,shopPay:e}=l();return{openModal:v(s=>{e.user.isUnauthenticatedUser.value?e.session.unstable_setUnauthenticatedErrorModal(s):t.error(new P("Cannot open an unauthenticated error modal outside of the unauthenticated flow",{groupingHash:"ShopPayError::UnauthenticatedErrorModal"}),{severity:"error",metadata:{source:{type:o.type},checkout:{token:o.checkoutSessionIdentifier||o.sourceId},event:{modalType:s.type,shopPayFlow:e.user.flow.value}}})},[t,o,e])}}const A="_0mzUL",i={Button:A,"Button--dark":"_6W0f3","Button--contrast":"aFsKX","Button--progressing":"XVUQD"};function F({progressing:t=!1}={}){const o=M({foregroundColor:m}),e=B(),n=l().shopPay.app.config,s=y(n,e);return d(()=>h(i.Button,{[i["Button--contrast"]]:!o&&!s,[i["Button--dark"]]:s,[i["Button--progressing"]]:t}),[s,o,t])}function G(){const{shopPay:t}=l(),o=t.session.isInternalProgressing.value;return F({progressing:o})}export{$ as S,Q as a,G as b,M as c,F as d,u as s,q as u,z as v};
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.