PageSourceSearch

https://shop.mindful.org/cdn/shopifycloud/checkout-web/assets/c1/BillingAddressSelector.CyVrY0kP.js

js mindful.org collected 2026-09-24 08:33:30 UTC 3,196 bytes, 1 lines download raw bytes

1import{u as e,T as _,q as E,h as R,i as U}from"./esnext-vendor.D7ldIee_.js";import{k as A,l as g,aE as $,aF as H,aG as M,aH as V,aI as q,n as w,P as z,$ as G}from"./hydrate.ByRIsqvd.js";import{C,a as W}from"./Choice.Dywz6_Fr.js";import{B as F}from"./BillingAddressForm.DHpCPcqC.js";import{N as O,$ as j,b0 as J,O as K,b1 as Q,b2 as N,b3 as X}from"./addresses-is-address-empty.-MuOhIyI.js";function Y(){const{i18n:a,checkout:i}=O(),t=i.addressManager.billing.value.suggestedAddress.value,d=t.address,n=t.type,h={hiddenFields:["phone","company","firstName","lastName"],multiline:!1},u=(()=>{if(n==="billing-fact")return a.translate("payment.use_order_billing_address_label");if(n==="billing")return a.translate("payment.use_location_billing_address_label");if(n==="shipping")return a.translate("payment.use_location_shipping_address_label")})();return!d||!n||!u?null:e(C,{value:n,children:e(A,{children:[e(g,{type:"strong",children:u}),e(g,{color:"subdued",children:e($,{...h,address:d})})]})})}const Z="billing_address_selector";function te({renderFormOnly:a=!1}={}){const{i18n:i,source:t,checkout:d}=O(),n=j(),h=n.deliveryNext.value,u=J(h),P=H(),{billingAddress:s,shippingAddress:m,billingAddressOption:r}=K(),T=m.value,o=d.proposal.facts.billingAddress,b=d.configuration.layout.isOnePage.value,p=M(),S=V(),f=n.buyerIdentity.value?.purchasingCompany,c=n.buyerIdentity.value?.customerProfile,x=c&&!Q(c)&&c.billingAddresses.length===0&&c.shippingAddresses.length===0,I=(!c||x)&&T.oneTimeUse,y=_(()=>({firstName:void 0,lastName:void 0,address1:void 0,address2:void 0,company:void 0,city:void 0,postalCode:void 0,phone:void 0,zoneCode:void 0,name:void 0,countryCode:s.fields.countryCode.peek()}),[s.fields.countryCode]),v=_(()=>m.fields.countryCode.peek(),[m.fields.countryCode]),L=E(([l])=>{l&&(r.value=l,N(t)?l==="custom"?s.value=y:l==="shipping"?s.value=p.value:l==="billing-fact"&&o&&(s.value=o):l==="custom"&&f?s.value=X({countryCode:v}):l==="custom"?s.fields.countryCode.value=v:l==="shipping"&&(s.value=p.value,S()))},[r,t,f,o,s,y,p,v,S]),B=i.translate("payment.billing_address_title");q(),R(()=>{N(t)&&P.value==="form"?s.value=y:r.value==="shipping"?s.value=p.value:r.value==="billing-fact"&&o&&(s.value=o)},[]);const k=r.value,D=_(()=>[k],[k]);return e(G,{accessibilityRole:"group",accessibilityLabelledBy:b?void 0:"billingAddress",accessibilityLabel:b?B:void 0,children:e(A,{gap:"base",children:[b?null:e(A,{gap:"small-400",children:[e(w,{id:"billingAddress",children:B}),I?null:e(z,{color:"subdued",children:u?i.translate("payment.billing_address_description_no_shipping_address"):i.translate("payment.billing_address_description")})]}),e(U,{when:()=>!a&&P.value!=="form",fallback:e(F,{}),children:e(W,{name:Z,values:D,onChange:L,variant:"block",children:[f?e(Y,{}):e(C,{value:"shipping",accessibilityLabel:i.translate("payment.same_billing_address_label"),children:e(g,{type:"strong",children:i.translate("payment.same_billing_address_label")})}),e(C,{value:"custom",selectedContent:e(F,{}),accessibilityLabel:i.translate("payment.different_billing_address_label"),children:e(g,{type:"strong",children:i.translate("payment.different_billing_address_label")})})]})})]})})}export{te as B};

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.