PageSourceSearch

https://spleash.com/cdn/shopifycloud/checkout-web/assets/c1/web-mcp-pickup-locality.BK1LUBih.js

js spleash.com collected 2026-09-30 16:11:21 UTC 2,609 bytes, 1 lines download raw bytes

1import{a as m,G as l}from"./hydrate.B0xlt2dG.js";import{D as y,E as f,A as C,G as k,H as P}from"./hooks-useReplaceShopPayInHistory.C8UL-mAH.js";import{n as a}from"./web-mcp-runtime.IXKgLCgF.js";import{g as h}from"./FormLayout.CMVyKzjL.js";import"./esnext-vendor.BDPAaZdq.js";import"./app.D1P6yWfp.js";import"./helpers-getNormalizedPaymentMethodName.B-mE5wnL.js";import"./shared-permissions.BaDWlj5_.js";import"./hooks-useShopPayExternalAppContext.DyGXtar4.js";import"./checkout-updaters-helpers.BAeH3ddd.js";import"./helpers-credit-card-disabled.BnSr1GsQ.js";import"./helpers-derivations.DLW2fhKL.js";import"./graphql-PaymentSessionMutation.BhOnX3QJ.js";import"./context-browser.Dp9ku7jw.js";import"./PayButton-helpers.Dg5kgVMm.js";import"./helpers-setAddressErrors.BA8OjimY.js";import"./utilities-stable-ref.Dvd2X3ul.js";import"./addresses-is-address-empty.Ch6V3XcM.js";import"./shared-receipt-mapper-load-recovery.C9sfUBl4.js";import"./shared-receipt-eager-mappers.CpLC5HH7.js";import"./shared-report-graphql-error.d-L7q9TK.js";import"./shop-pay-normalizeBuyerDetails.ThnUnxcv.js";import"./redemption-promotions.CgqGtCd-.js";import"./amazon-pay-useAmazonPayPaymentLine.BXwZMsYY.js";function W(o){return{resolvePickupLocality:t=>L(t,o),announcePickupLocality:t=>A(t,o)}}async function L(o,t){const i=await h(t);return g(o,i.current.call,t)}async function g(o,t,{shop:i,source:n,i18n:d}){const p=C(),s={locale:d.locale,requestToken:p,shopId:k(i.id),sourceId:n.sourceId||"",checkoutSessionIdentifier:n.checkoutSessionIdentifier||""},{data:u}=await t.search(o.postal_code,{...s,countryCode:o.address_country,location:void 0},l),c=(await Promise.all(u.slice(0,5).map(e=>t.fetchAddress(e.addressId,{...s,completionService:e.completionService,extendedFields:!1})))).filter(e=>e.countryCode===o.address_country&&a(e.postalCode)===a(o.postal_code)&&(!o.address_region||e.zoneCode===o.address_region)&&e.coordinates&&Number.isFinite(e.coordinates.latitude)&&Number.isFinite(e.coordinates.longitude)&&Math.abs(e.coordinates.latitude)<=90&&Math.abs(e.coordinates.longitude)<=180);if(new Set(c.map(({coordinates:e})=>JSON.stringify(e))).size!==1)return;const r=c[0];return P({countryCode:r.countryCode,zoneCode:r.zoneCode,postalCode:r.postalCode,city:r.city,coordinates:r.coordinates})}function A(o,t){const i=y(o.countryCode?t.checkout.address.countryDetails.get(o.countryCode):void 0,t.i18n);m({content:f(o,i,["company","firstName","lastName","phone","countryCode","zoneCode"]),role:"status"})}export{A as announcePickupLocality,W as createPickupLocalityServices,L as lookupPickupLocality,g as resolvePickupLocality};

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.