PageSourceSearch

https://spyra.com/cdn/shopifycloud/checkout-web/assets/c1/hooks-useSuppressShopPayModalOnLoad.DhsBcoYZ.js

js spyra.com collected 2026-09-29 15:30:44 UTC 2,604 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-PhoneNumberFormatter.6-emdPAH.js","exports-getCountryCallingCode.B1Uy0QN5.js"])))=>i.map(i=>d[i]);
2import{_ as O}from"./app.Ct1TLWkJ.js";import{N as k,A as v,h as w,q as _,T as E,r as R,f as V}from"./esnext-vendor.7EcvH7tF.js";import{aY as A,Q as B,a2 as L,eI as T,mk as j,f0 as K,k9 as $,ml as M}from"./utilities-previous.DaWdZv41.js";import{ik as x}from"./hydrate.__QOXNN3.js";let b=null,P=null;function G(e,r="",o,c){const[a,u]=k(({formatter:n,regionCode:s,phoneNumber:g},h)=>{switch(h.type){case"reset":return h.state;case"formatter":{const{PhoneNumberFormatter:m}=h,I=new m(s);return C(g,s,I,o)}case"phone":return C(h.phoneNumber,s,n)}},{phoneNumber:r,regionCode:e,loading:!0},({regionCode:n,phoneNumber:s})=>F(s,n,c,o));let{phoneNumber:p,regionCode:l,formatter:t}=a;const f=a.loading,i=v(r),d=v(e);if(i.current!==r||d.current!==e){const n=d.current!==e,s=/^\+\d/.test(r),g=!n&&s;i.current=r,d.current=e;const m=F(r,g?l??e:e,a.formatter);p=m.phoneNumber,l=m.regionCode,t=m.formatter,u({type:"reset",state:m})}w(()=>{let n=!0;return(async function(){if(t)return;const s=await D();n&&u({type:"formatter",PhoneNumberFormatter:s})})(),()=>{n=!1}},[t]);const N=_(n=>{t&&!/^\+\d/.test(n)&&t.updateRegionCode(e),u({type:"phone",phoneNumber:n})},[t,e]),y=_(n=>{t!=null&&(t.updateRegionCode(n),u({type:"phone",phoneNumber:`+${t.countryCode}${t.getNationalNumber(p)}`}))},[t,p]),S=E(()=>t==null?"+1":`+${t.getCountryCodeFromRegionCode(l??d.current)}`,[t,l]);return{loading:f,formattedNumber:p,formattedNumberValueObject:a.phoneNumberValueObject,regionCode:l,prefix:S,setPhoneNumber:N,selectCountry:y}}function D(){return P||(P=(async()=>{const{default:e}=await R(()=>O(()=>import("./component-PhoneNumberFormatter.6-emdPAH.js"),__vite__mapDeps([0,1])));return b=e,b})(),P)}function C(e,r,o,c){if(o==null)return{phoneNumber:e,phoneNumberValueObject:{value:e},regionCode:r,loading:!0};const a=o.format(e||(c?`+${o.countryCode}`:""));return{formatter:o,phoneNumber:a,phoneNumberValueObject:{value:a},regionCode:o?.regionCode,loading:!1}}function F(e,r,o,c){let a;return o?(o.updateRegionCode(r),a=o):a=b?new b(r):void 0,C(e,r,a,c)}function Q(){const{checkoutProtocolPresentedSignal:e}=A(),{checkout:r,router:o}=B(),{allViolations:c}=L(),a=T();return V(()=>{const u=o.currentUrl.value,l=u.searchParams.get(j)==="false",t=u.searchParams.get(K),f=r.latestReceipt.value,i=f?x(f):!1,N=c.value?.some(S=>$.has(S.code)),y=()=>a&&!e.value;return!!(t&&t!==M.PromptAllowed&&!l||u.searchParams.get("storefront_wallet")||N||y()||i)})}export{Q as a,G 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.