1import{T as e,s as r,t}from"./2c1ab0fe.GMbxnz74.js";import{S as a,J as s,E as o,aZ as c,T as n,eJ as i,mM as l,e$ as u,kp as m,mN as d}from"./4c290a1e.DMQ9xOwP.js";import{c as f,D as p,b as h}from"./ac5a19ff.BchXgW63.js";import{hG as b}from"./164ad2e3.B4L1MRYB.js";let v=null,A=null;function g({observability:e,url:r}){if(A)return A;const t=r.sandboxAutocomplete(),a={current:null},{promise:s,resolve:c}=function(){let e,r;const t=new Promise((t,a)=>{e=t,r=a});return{get promise(){return t},resolve(r){e(r)},reject(e){r(e)}}}();if(A=s,!v){const r=r=>async s=>{e.leaveErrorBreadcrumb("Autocomplete iframe loaded",{url:t,event:JSON.stringify(s),time:Date.now(),specialId:r?.getAttribute(p)}),a.current=h(r,t,"autocomplete",e,{}),c(a)};v=f({id:"Autocomplete-IFrame",name:"Autocomplete-IFrame",url:t,privileges:["allow-scripts","allow-same-origin"],iframeSpecialId:o(),onLoad:r}),e.leaveErrorBreadcrumb("Autocomplete iframe created",{url:t,specialId:v.getAttribute(p)})}return A}function w(){const{observability:e,url:t}=a();return r(()=>g({observability:e,url:t}),[e,t])}function P(){const{shop:{id:r},source:{sourceId:t,checkoutSessionIdentifier:o}}=a(),c=w();return e(()=>{function e(){return{shopId:s(r),sourceId:t||"",checkoutSessionIdentifier:o||""}}return{search:async(...e)=>(await c()).current.call.search(...e),fetchAddress:async(...e)=>(await c()).current.call.fetchAddress(...e),formatAddress:async r=>(await c()).current.call.formatAddress(r,e()),fetchCountriesWithPhoneNumberPrefix:async r=>(await c()).current.call.fetchCountriesWithPhoneNumberPrefix(r,e())}},[c,r,t,o])}function y(){const r=w();return e(()=>({validation:async(...e)=>(await r()).current.call.validation(...e)}),[r])}function I(){const{checkoutProtocolPresentedSignal:e}=c(),{checkout:r,router:s}=a(),{allViolations:o}=n(),f=i();return t(()=>{const t=s.currentUrl.value,a="false"===t.searchParams.get(l),c=t.searchParams.get(u),n=r.latestReceipt.value,i=!!n&&b(n),p=o.value,h=p?.some(e=>m.has(e.code));return Boolean(c&&c!==d.PromptAllowed&&!a||t.searchParams.get("storefront_wallet")||h||f&&!e.value||i)})}export{I as a,y as b,g,P 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.