1import{cE as f,P as S,T as l,dn as P,i_ as y}from"./addresses-is-address-empty.BB1pvxM5.js";import{T as d,u as C,g as h,q as v}from"./esnext-vendor.DQ9BNaJe.js";import{S as m}from"./shared-shop-theme.DkQ4xpRa.js";import{S as k}from"./hooks-useShowShopPayOptin.BFq7voDt.js";import{b,a as E}from"./hooks-useShouldRevealCustomization.Cb4-X8Fo.js";import{Y as B,u as L}from"./hydrate.D4A9Cb0p.js";const U=/\S+@\S+\.\S{2,}/;function W(t,o){if(!f(t))return o}function $(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=B(),{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(()=>b({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 q({accessibilityVisibility:t="visible",color:o="white",inline:e,size:n="medium"}){const s=o==="branded"?m.toRgb():o,a=t==="hidden";return C(k,{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 G(){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=E(),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 J(){const{shopPay:t}=l(),o=t.session.isInternalProgressing.value;return F({progressing:o})}export{q as S,$ as a,J as b,M as c,F as d,u as s,G as u,W 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.