PageSourceSearch

https://shop.asmonaco.com/cdn/shopifycloud/checkout-web/assets/c1/…ks-useShouldRevealCustomization.C_GYHzzt.js

js asmonaco.com collected 2026-09-24 08:45:37 UTC 1,643 bytes, 1 lines download raw bytes

1import{N as h,dr as m}from"./addresses-is-address-empty.-MuOhIyI.js";import{l as g,f as C}from"./esnext-vendor.D7ldIee_.js";import{_ as b}from"./hydrate.ByRIsqvd.js";const P="context";function x(){const{mobileCheckoutSdk:e}=h();if(!e.enabled)return!1;const r=e.config?.colorScheme,o=!!(typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)")?.matches);return r==="DARK"||e.variant.isStandard()&&r==="AUTOMATIC"&&o}const k=e=>({backgroundColor:r,foregroundColor:o})=>{const t=f(r),a=f(o),n=Math.max(t,a),c=Math.min(t,a),s=(n+.05)/(c+.05);return{isValidContrast:s>=e,ratio:Math.round(s*100)/100}},A=k(3.06),p=(e,r,o)=>{const t=a=>{const n=a/255;return n<=.04045?n/12.92:((n+.055)/1.055)**2.4};return .2126*t(e)+.7152*t(r)+.0722*t(o)};function f(e){const[r,o,t]=e.toRgbTuple();return p(r,o,t)}const v=.179,l=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/,$=e=>{const r=e.match(l);if(!r)return e;const[,o,t,a,n]=r;return n===void 0?`rgb(${o}, ${t}, ${a})`:`rgba(${o}, ${t}, ${a}, ${n})`},w=(e,r)=>{const o=e.match(l);if(!o)return!1;const t=o[4]===void 0?1:parseFloat(o[4]),a=r?.match(l),n=c=>{const s=parseInt(o[c],10),u=a?parseInt(a[c],10):255;return s*t+u*(1-t)};return p(n(1),n(2),n(3))<v};function E(e,r){const o=r?.lazyReveal??!1,t=b(),a=h().checkout.configuration.layout.isOnePage.value,n=g(e);return C(()=>!a&&t?.orderSummary?.defaultState==="EXPANDED"?!0:n.value.some(s=>{if(s.kind==="customField")return m(s).required.value;const u=m(s),i=u.behaviors.value,d=i.blockProgress&&u.capabilities.blockProgress;return o?i.alwaysReveal&&!d:!!(d||i.alwaysReveal)}))}export{l as R,x as a,A as b,w as i,$ as n,P as s,E as u};

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.