PageSourceSearch

https://www.bagstockdesigns.com/cdn/shopifycloud/checkout-web/assets/c1/hooks-useForceShopPayUrl.BFRInJvm.js

js bagstockdesigns.com collected 2026-09-26 18:22:09 UTC 3,690 bytes, 1 lines download raw bytes

1import{S as m,bf as R,bg as E,bh as C,bi as T,T as f,an as k,bj as A,bk as N,bl as O,bm as I,bn as U}from"./addresses-is-address-empty.Bn2lNY_L.js";import{b8 as V,b9 as x,ba as D,n as w,bb as K,f as _,bc as L,bd as F,be as Y,bf as G}from"./hydrate.DZ4YTm7p.js";import{T as P,h as B,f as J,A as S,p as $,G as j,e as H}from"./esnext-vendor.B9Da21W6.js";import{u as q}from"./AddressPresenter.BIgrto4P.js";const b="placement-reference";function z(){const{router:s}=m(),e=s.currentUrl.value.searchParams.get(b),{supported:n}=D(),l=w(),t=P(()=>{const r=K(l.value);if(!e){const i=R(E.PlacementReference);return n.has(i)?i:void 0}return n.has(e)?e:(console.error(new C(`'${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 B(()=>{t&&T(E.PlacementReference,t)},[t]),t??void 0}function X(){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(b,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:p=>{e.value="",s.value=p,p?e.value=d:l({include:[],silenceViolations:["all"]})}}}function Z(){const{shippingAddress:s,locationAddress:a}=f();return J(()=>{const e=s.value,n=a.value;return L(e,n)})}const Q="ZZ";function oe(){const{smsMarketingPhone:s}=f(),{validatePhoneNumber:a}=q(),{negotiate:e}=_(),n=Z(),{i18n:l,checkout:{wallets:t}}=m(),{marketingPhoneInputError:r}=k(),i=S(!1);$(()=>{const h=s.value,u=n.value,d=r.peek();if(!i.current){i.current=!0;return}const o=a(h,u??Q)?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 W(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)}F(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)||!W(o.target))continue;d=!0;const p=s||(o.localizedMessage??o.nonLocalizedMessage);n.value=p,t.current=a.peek()}d||r()});const i=H(void 0),h=e.value?n:i;return A(a,h,()=>{},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=X(),i=Y().current.token,h=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[y,M]of r.entries())c.searchParams.set(y,M);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"),h(c.searchParams,t),c.toString()},[t,n,l,i,s,d,r,h,u,o])}export{z as a,Z as b,re as c,oe as d,ie as e,ce as f,W as i,X 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.