PageSourceSearch

https://store.wirelesstag.net/cdn/shopifycloud/checkout-web/assets/c1/hooks-useForceShopPayUrl.MIxsBkT_.js

js wirelesstag.net collected 2026-09-24 11:52:57 UTC 3,636 bytes, 1 lines download raw bytes

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