PageSourceSearch

https://www.mecca.coffee/cdn/shopifycloud/checkout-web/assets/c1/useShopPayButtonClassName.FG1djxr9.js

js mecca.coffee collected 2026-09-26 10:51:57 UTC 2,233 bytes, 1 lines download raw bytes

1import{cx as f,O as S,S as l,dy as y,j6 as P}from"./addresses-is-address-empty.Bn2lNY_L.js";import{T as d,u as C,g as h,q as v}from"./esnext-vendor.B9Da21W6.js";import{S as m}from"./shared-shop-theme.DIHIQUEd.js";import{S as k}from"./hooks-useShowShopPayOptin.Br0M25ky.js";import{b,a as B}from"./hooks-useShouldRevealCustomization.D_kH_Ics.js";import{X as E,u as L}from"./hydrate.DZ4YTm7p.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=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(()=>b({backgroundColor:r,foregroundColor:t}),[r,t]);return g}const T="_8ssCG",w="zS4x6",I="PrlUn",_="SsCEp",x="eEpXo",O="PJvCw",D="aTkbO",u={xsmall:T,small:w,medium:I,large:_,ShopPayLogo:x,ShopLogo:O,inline:D};function j({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 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 y("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=P(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{j as S,$ as a,G as b,M as c,F as d,u as s,q 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.