PageSourceSearch

https://shop.lospoblanos.com/cdn/shopifycloud/checkout-web/assets/c1/hooks-useForceShopPayUrl.z4AJBm7B.js

js lospoblanos.com collected 2026-09-24 18:03:40 UTC 3,690 bytes, 1 lines download raw bytes

1import{T as m,bi as C,bj as E,bk as T,bl as b,W as f,aq as k,bm as A,bn as N,bo as O,bp as I,bq as U}from"./addresses-is-address-empty.ZJ1ThpFy.js";import{aY as V,aZ as x,a_ as D,o as w,a$ as K,f as _,b0 as L,b1 as Y,b2 as F,b3 as G}from"./hydrate.Tsur0pib.js";import{T as P,h as $,f as q,A as S,p as B,G as J,e as j}from"./esnext-vendor.BBoIVOQW.js";import{u as H}from"./AddressPresenter.Ce4uWLSc.js";const y="placement-reference";function Z(){const{router:s}=m(),e=s.currentUrl.value.searchParams.get(y),{supported:n}=D(),l=w(),t=P(()=>{const r=K(l.value);if(!e){const i=C(E.PlacementReference);return n.has(i)?i:void 0}return n.has(e)?e:(console.error(new T(`'${e}' is not a valid placement reference, falling back to '${r}'. Please see https://shopify.dev/apps/checkout/test-ui-extensions#dynamic-extension-points`)),r)},[e,n,l.value]);return $(()=>{t&&b(E.PlacementReference,t)},[t]),t??void 0}function z(){const s=V(),a=Z(),e=s.workspace?.root?.url||s.workspace?.queryUrl;return P(()=>{const n=new URLSearchParams;return e&&n.set(x,e),a&&n.set(y,a),n},[e,a])}function re(){const{acceptSmsMarketing:s,phone:a,smsMarketingPhone:e,shippingAddress:n}=f(),{negotiate:l}=_(),t=n.fields.phone.value,r=e.value,{checkout:i}=m(),u=(i.proposal.negotiated.fields.availableDeliveryAddresses.value??[]).length===0?t:"",d=r||a.value||u||"";return{handleSmsMarketingConsent:h=>{e.value="",s.value=h,h?e.value=d:l({include:[],silenceViolations:["all"]})}}}function W(){const{shippingAddress:s,locationAddress:a}=f();return q(()=>{const e=s.value,n=a.value;return L(e,n)})}const X="ZZ";function oe(){const{smsMarketingPhone:s}=f(),{validatePhoneNumber:a}=H(),{negotiate:e}=_(),n=W(),{i18n:l,checkout:{wallets:t}}=m(),{marketingPhoneInputError:r}=k(),i=S(!1);B(()=>{const p=s.value,u=n.value,d=r.peek();if(!i.current){i.current=!0;return}const o=a(p,u??X)?void 0:l.translate("field_errors.address_phone_blank");o?d||(r.value=o):r.value=void 0,!o&&!t.activeSession.value&&J(()=>{e({include:[],silenceViolations:["all"]})})})}function Q(s){return s?.includes("marketingConsent")===!0||s?.includes("messagingMarketingConsent")===!0}const ee=new Set(["BUYER_IDENTITY_MARKETING_CONSENT_PHONE_NUMBER_DOES_NOT_MATCH_EXPECTED_PATTERN"]);function ie(s){const{smsMarketingPhone:a,acceptSmsMarketing:e}=f(),{marketingPhoneInputError:n}=k(),{checkout:{wallets:l}}=m(),t=S();function r(){t.current!==void 0&&t.current===a.peek()&&(n.value=void 0,t.current=void 0)}Y(u=>{if(u.type==="success"){r();return}if(u.type!=="error")return;let d=!1;for(const o of u.violations){if(o.__typename!=="UnprocessableTermViolation"||!ee.has(o.code)||!Q(o.target))continue;d=!0;const h=s||(o.localizedMessage??o.nonLocalizedMessage);n.value=h,t.current=a.peek()}d||r()});const i=j(void 0),p=e.value?n:i;return A(a,p,()=>{},N.InvalidOptInPhone,()=>!!l.activeSession.value),O(a,n)}function ce(s){const{checkout:a,router:e}=m(),{origin:n,prefix:l,searchParams:t}=e.currentUrl.value,r=z(),i=F().current.token,p=G(),u=t.get("shop_client_uuid")??t.get("client_uuid"),d=a.checkpointToken.value,o=a.configuration.renderContextToken.token.value;return P(()=>{const g=t.get("channel"),v=t.get("preview_theme_id"),c=new URL(`${n}${l}`);c.searchParams.set("payment","shop_pay");for(const[M,R]of r.entries())c.searchParams.set(M,R);return i&&c.searchParams.set(I,i),s&&c.searchParams.set("redirect_source",s),d&&c.searchParams.set(U,d),g&&c.searchParams.set("channel",g),v&&c.searchParams.set("preview_theme_id",v),u&&c.searchParams.set("shop_client_uuid",u),o?c.searchParams.set("rctx",o):c.searchParams.delete("rctx"),p(c.searchParams,t),c.toString()},[t,n,l,i,s,d,r,p,u,o])}export{Z as a,W as b,re as c,oe as d,ie as e,ce as f,Q as i,z 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.