PageSourceSearch

https://store.flycatcher.toys/cdn/shopifycloud/checkout-web/assets/c1/ReviewBlock.D5T7Eq27.js

js flycatcher.toys collected 2026-09-24 10:33:22 UTC 13,841 bytes, 1 lines download raw bytes

1import{f as o,u as e,i as b,S as E,s as Re,k as De,h as Fe}from"./esnext-vendor.D7ldIee_.js";import{bV as Be,ds as Ee,a4 as Me,dJ as ie,dK as T,l as x,L as Oe,dz as Te,dL as xe,dM as Ue,cl as He,al as N,k as U,aE as j,dN as $e,P as V,dO as Ge,ce as Ve,dP as We,cW as J,dQ as ze,dR as je,I as Ke,b as K,dS as qe,dT as Je,cg as Ye,bI as Z,n as Qe,dU as ee,$ as Xe,a9 as Ze}from"./hydrate.ByRIsqvd.js";import{dY as en,cv as nn,aa as M,$ as P,N as _,b2 as H,dZ as tn,d_ as sn,bb as R,d$ as an,O as se,l as q,dD as on,_ as rn,e0 as ln,e1 as cn,dg as dn,af as un,ba as pn}from"./addresses-is-address-empty.-MuOhIyI.js";import{B as hn}from"./BillingAddressSelector.CyVrY0kP.js";import{D as ne,u as ae,S as oe,a as re,R as vn,b as mn}from"./Middot.BwhErQgI.js";import{u as yn,P as gn,a as fn,R as bn,L as le,D as ce,b as de,c as ue,d as kn}from"./components-DeliveryReviewMethods.DfeDSZLJ.js";import{S as Cn}from"./Section-SectionStyleOverride.Dli5IR65.js";import{h as Ln}from"./localization-index.DBksi22x.js";import{R as I,P as _n}from"./PaymentLine.DhO8cHCS.js";import{a as wn}from"./models-ShopPayBuyerDetails.model.CahX79UU.js";import{c as Pn}from"./hooks-useCanChangeCompanyLocation.Bk004VMP.js";import{u as te}from"./hooks-useUnauthenticatedErrorModal.CzvtLqeY.js";import"./app.A60-IfPs.js";import"./constants.DowbVE6J.js";import"./hooks-useReplaceShopPayInHistory.Cz4PqGkk.js";import"./Choice.Dywz6_Fr.js";import"./Checkbox.Cby2hWUV.js";import"./BillingAddressForm.DHpCPcqC.js";import"./hooks-useSuppressShopPayModalOnLoad.CI5bzdLE.js";import"./PhoneField.BapDvZfY.js";import"./Popover.BNecjV8x.js";import"./EstimatedDeliveryContent.P3UYo-F2.js";import"./ShippingMethodRateLabel.DfFHFGoZ.js";import"./shipping-methods-consolidated-included.CmQthVU7.js";import"./PaymentIcon.Ddd-WnG2.js";import"./Theme-ThemeOverride.4AonMthy.js";import"./shop-pay-normalizeBuyerDetails.BcEhgoK7.js";import"./context-CheckoutSheetProtocolClient.CNLSBD5p.js";function An(){const{hasViolations:i,violations:t}=Be(nn);return Ee().value&&i&&!en(t)}function Sn(){const i=M();return o(()=>{const{plan:t}=i.value;return t.greenPath.some(({id:n})=>n==="payment")})}function pe(){const i=P().buyerIdentity,{source:t}=_(),n=Me(),a=ie();return o(()=>{const s=i.value?.purchasingCompany,l=n.value;if(s){if(a.value)return"/information";if(l)return l}if(!H(t))return"/information"})}function In({showLoading:i,displayBillingAddress:t}){const n=P().buyerIdentity,{source:a,shop:{customerAccountLocationsUrl:s}}=_(),l=M(),d=ie(),r=tn();return o(()=>{const c=n.value?.purchasingCompany,y=a.type==="draftOrder",p=T(l.value.plan,"/information"),v=sn(c);return i.value?!1:c&&(v||d.value)&&s&&!H(a)&&!y?!0:!r.value&&!t.value?!1:!!p})}function D({accessibilityLabel:i,href:t}){const{i18n:n}=_(),a=n.translate("review.blocks.change_link_label");return e(Oe,{href:t,accessibilityLabel:i,children:e(x,{children:a})})}const Nn=["firstName","lastName"];function Rn({hiddenFields:i,...t}){return{...t,hiddenFields:[...new Set([...i??[],...Nn])]}}function he({withWrappedAddress:i=!1,label:t}){const{i18n:n,source:a,checkout:s}=_(),l=P(),d=l.deliveryNext,r=R("deliveryNext"),c=s.proposal.facts.delivery??[],y=o(()=>an(d.value)),p=l.shippingAddress,v=R("shippingAddress"),m=o(()=>c.length>0?c[0].deliveryAddress:p.value),{shippingAddress:h,billingAddress:C}=se(),A=o(()=>d.value?.status==="unavailable"?h.value:m.value),{selectedPickupPoint:g}=wn(),w=l.billingAddress,L=o(()=>w.value??C.value),u=P().buyerIdentity.value?.purchasingCompany,f=Te(),k=o(()=>v.value&&m.value==null),F=o(()=>H(a)?!xe({checkout:s}):!s.isShippingRequired.value),B=o(()=>F.value?L.value:A.value),O=Ue(),Y=yn({address:B}).value,S=B.value,ve=u&&F.value?n.translate("review.blocks.company_location"):n.translate("review.blocks.billing_address_title"),me=F.value?ve:n.translate("review.blocks.shipping_address_title"),ye=F.value?n.translate("review.blocks.change_billing_address_link_label"):n.translate("review.blocks.change_shipping_address_link_label"),$=u?.location;let G;if(Y)G=Y;else if(i)G={hiddenFields:["phone"],multiline:!0};else{const X=S?.countryCode??g?.pickupLocation.address.countryCode;G=X&&$e.includes(X)?{hiddenFields:["phone"],multiline:!1}:{hiddenFields:["firstName","lastName","phone"],multiline:!1}}const ge={...Rn(G),multiline:!1},Q=!!($&&(r.value||S==null||q(S)||!O.value)),fe=Q?$?.name:(()=>
1{if(!(S==null||q(S)||Q))return n.formatName(S.firstName,S.lastName,!0)||S.firstName||S.lastName})(),be=He(g?.pickupLocation.address,{hiddenFields:["countryCode"]}),ke=g?.pickupLocation.name,Ce=n.translate("review.blocks.no_address"),Le=n.translate("pickup_point.title").toLowerCase(),_e=$?s.isShippingRequired.value:!0,we=f?.taxId.value,Pe=In({showLoading:k,displayBillingAddress:F}),Ae=pe(),Se=e(D,{href:Ae.value,accessibilityLabel:ye}),Ie=t??me,Ne=Pe.value?Se:void 0;let W=fe,z=e(Dn,{address:S,addressDetailsPresentationProps:ge,companyLocationName:$?.name,deliveryNextLoading:r.value,isOnetimeShippingAddress:O.value,noAddressLabel:Ce,showAddress:_e,vatNumber:we});return k.value?(W=e(N,{}),z=void 0):y.value&&(W=ke,z=e(Fn,{formattedAddress:be,pickupPoint:g,pickupPointLabel:Le})),e(I,{label:Ie,primaryAction:Ne,primaryContent:W,secondaryContent:z})}function Dn({address:i,addressDetailsPresentationProps:t,companyLocationName:n,deliveryNextLoading:a,isOnetimeShippingAddress:s,noAddressLabel:l,showAddress:d,vatNumber:r}){return a&&n?e(N,{}):i==null||q(i)?!d&&!r?null:e(U,{children:[d&&e(x,{size:"small",color:"subdued",children:l}),r&&e(ne,{vatNumber:r})]}):n&&!s?d?e(U,{children:e(j,{textColor:"subdued",textSize:"small",...t,address:i})}):null:e(U,{children:[e(j,{...t,address:i}),r&&e(ne,{vatNumber:r})]})}function Fn({formattedAddress:i,pickupPoint:t,pickupPointLabel:n}){if(!t)return null;const a=`${t.pickupLocation.carrierName} ${n}`;return e(U,{children:[i?e(x,{type:"address",children:i}):null,e(x,{color:"subdued",size:"small",children:a})]})}const Bn="#";function En(){const{i18n:i}=_(),{purchaseOrderNumber:t}=P(),n=R("purchaseOrderNumber"),a=o(()=>n.value&&t.value===void 0),s=i.translate("review.blocks.no_purchase_order_number_long"),l=o(()=>{const c=t.value;return c!==void 0&&c.trim()!==""?`${Bn}${c}`:void 0}),d=i.translate("review.blocks.purchase_order_number_title"),r=()=>e(D,{href:"/payment",accessibilityLabel:i.translate("review.blocks.change_purchase_order_number_label")});return e(b,{when:()=>!a.value,fallback:e(I,{label:d,primaryContent:e(N,{})}),children:e(b,{when:l,fallback:e(I,{label:d,primaryAction:r(),secondaryContent:e(V,{children:s})}),children:c=>e(I,{label:d,primaryAction:r(),primaryContent:e(gn,{children:c})})})})}function Mn(){const{i18n:i}=_(),t=pe(),a=P().buyerIdentity.value?.purchasingCompany?.location,s=Pn();if(!a)return null;const l=i.translate("company_location.location_title"),d=s.value?e(D,{href:t.value,accessibilityLabel:i.translate("contact.change_company_location_link_label")}):void 0,r=e(x,{children:a.name}),c=a.shippingAddress?e(j,{hiddenFields:Ge,address:a.shippingAddress}):e(x,{children:i.translate("review.blocks.no_address")});return e(I,{label:l,primaryAction:d,primaryContent:r,secondaryContent:c})}function On(){const{i18n:i,checkout:t}=_(),{contactInfo:n}=P(),a=R("contactInfo"),{geolocation:s}=Ve(),{buyerIdentity:l}=P(),d=M();fn(a.value);const r=t.proposal.facts.contactMethod?.phoneNumber,{formattedNumber:c}=te(s.country.code,r??void 0),{formattedNumber:y}=te(s.country.code,n.value?.phone),p=o(()=>a.value&&(n.value?.email??n.value?.phone)==null),v=o(()=>!p.value&&T(d.value.plan,"/information")&&!l.value?.purchasingCompany),m=o(()=>{const g=t.proposal.facts.contactMethod?.email,w=c===""?void 0:c,L=n.value?.email;return g||w||L||(y===""?void 0:y)}),h=i.translate("review.blocks.contact_method_title"),C=v.value?e(D,{href:"/information",accessibilityLabel:i.translate("review.blocks.change_contact_method_link_label")}):void 0;return e(I,{label:h,primaryAction:C,primaryContent:e(b,{when:()=>!p.value,fallback:e(N,{}),children:()=>e(bn,{contactInfo:m.value})})})}function Tn(){const{checkout:i,i18n:t,source:n}=_(),a=M(),s=P().deliveryNext,l=R("deliveryNext"),d=n.type==="draftOrder",r=o(()=>on(s.value)),c=We(),y=ae({deliveryLines:s.value?.status==="filled"?s.value.lines:void 0}),p=o(()=>J({checkout:i,source:n})),v=o(()=>p.value?.pickupAddress?p.value.pickupAddress:!s.value||s.value.status==="unavailable"?void 0:r.value?.map(O=>O.pickupLocation?.address).filter(O=>O!==void 0)?.[0]),m=o(()=>{if(!(!s.value||s.value.status==="unavailable"))return p.value?p.value.pickupAddressName:r.value?.find(({methodType:B})=>B==="PICK_UP")?.pickupLocation?.name}),h=o(()=>!!(r.value?.some(({methodType:B})=>B==="PICK_UP")||p.value?.pickupAddress)),C=o(()=>h.value?"/information":"/shipping"),A=o(()=>!c.value&&!d&&(!H(n)&&T(a.value.plan,C.value)||H(n)&&h.value)),g=o(()=>h.value?t.translate("review.blocks.change_delivery_method_link_label"):t.translate("review.blocks.change_shipping_method_link_label")),w=A.value?e(D,{href:C.value,accessibilityLabel:g.value}):void 0,L=t.translate("shipping.title"),u=t.translate("delivery_options.pickup"),f=h.value?u:L,k=e(xn,{showSkeleton:l.value&&!s.value,splitShippingRollupSummary:y,isLocalPickupSelected:h.value,pickupLocationName:m.value}),F=e(Un,{showSkeleton:l.value&&!s.value,splitShippingRollupSummary:y,isLocalPickupSelected:h.value,pickupAddress:v.value,pickupLocationName:m.value});return e(I,{label:f,primaryAction:w,primaryContent:k,secondaryContent:F})}function xn({showSkeleton:i,splitShippingRollupSummary:t,isLocalPickupSelected:n,pickupLocationName:a}){return i?e(N,{}):t?e(oe,{summary:t}):n?e(le,{pickupLocationName:a}):e(ce,{})}function Un({showSkeleton:i,splitShippingRollupSummary:t,isLocalPickupSelected:n,pickupAddress:a,pickupLocationName:s}){return i?e(N,{}):t?e(re,{summary:t}):n?e(de,{address:a,pickupLocationName:s}):e(ue,{})}function Hn(){const{i18n:i}=_(),{acceptPaymentVaulting:t,paymentLines:n}=se(),a=R("paymentLines"),s=R("shippingAddress"),l=M(),d=ze(),r=je(d.value),
1c=rn(),y=o(()=>{const u=n.value;return u?ln(cn(u,c.value)).map((f,k)=>({key:`${f.method.type}-${k+1}`,line:f})):[]}),p=o(()=>n.value?.some(u=>u.method.type==="direct")),v=o(()=>!a.value&&n.value!=null&&!s.value),m=o(()=>!n.value?.some(f=>f.method.type==="deferred")),h=o(()=>!!(t.value&&p.value)),A=o(()=>T(l.value.plan,"/payment")&&v.value).value?e(D,{href:"/payment",accessibilityLabel:i.translate("review.blocks.change_payment_method_link_label")}):void 0,g=i.translate("payment.title"),w=e(b,{when:v,fallback:e(N,{}),children:e(Re,{each:y,getKey:u=>u.key,children:({line:u})=>e(E,{children:[e(_n,{paymentLine:u,showCardBrandLabel:!0}),e(K,{blockSize:"small-400"})]})})});let L;return(m.value||h.value)&&(L=v.value?e(E,{children:[e(b,{when:m,children:e(V,{children:r})}),e(b,{when:h,children:e(U,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(Ke,{type:"check",size:"small"}),e(V,{children:i.translate("review.blocks.payment_method_saved_company_location")})]})})]}):e(N,{})),e(I,{label:g,primaryAction:A,primaryContent:w,secondaryContent:L})}function $n(){const{checkout:i,i18n:t,source:n}=_(),{deliveryNext:a}=P(),s=qe(),l=M(),{value:d}=a,r=R("deliveryNext").value,c=ae({deliveryLines:d?.status==="filled"?d.lines:void 0}),p=dn(d).find(({method:k})=>k.methodType==="PICK_UP"),v=T(l.value.plan,"/information")?e(D,{href:"/information",accessibilityLabel:t.translate("review.blocks.change_shipping_address_link_label")}):void 0,m=T(l.value.plan,"/shipping")?e(D,{href:"/shipping",accessibilityLabel:t.translate("review.blocks.change_shipping_method_link_label")}):void 0,h=c?e(oe,{summary:c}):void 0,C=c?e(re,{summary:c}):void 0,A=p?.method.pickupLocation?.address,g=J({checkout:i,source:n})?.pickupAddressName??p?.method.pickupLocation?.name,w=e(le,{pickupLocationName:g}),L=e(de,{address:A,pickupLocationName:g});let u,f;return r?(u=e(N,{}),f=e(N,{})):(u=h??e(ce,{}),f=C??e(ue,{})),e(E,{children:[e(I,{label:t.translate("review.blocks.pickup_items_at",{count:s.value.PICK_UP||0}),primaryAction:v,primaryContent:w,secondaryContent:L}),e(b,{when:()=>s.value.SHIPPING,children:k=>e(E,{children:[e(he,{label:t.translate("review.blocks.ship_items_to",{count:k})}),e(I,{label:t.translate("shipping.title"),primaryAction:m,primaryContent:u,secondaryContent:f})]})})]})}function Gn(){const i=Je(),{checkout:t,router:n,source:a}=_();return o(()=>{const s=J({checkout:t,source:a}),l=s&&s.lines.length===0;return(n.currentUrlMatches("/payment")||n.currentUrlMatches("/review"))&&!i.value&&!l&&t.isShippingRequired.value})}function ft({showPayment:i,showAddress:t=!0}){const{i18n:n,shop:a}=_(),s=M(),l=a.hasFlagEnabled(un),{buyerIdentity:d}=P(),r=o(()=>s.value?.currentPage?.id==="review"),c=pn(),y=o(()=>!r.value||!c.value),p=o(()=>{if(y.value)return r.value?Z:ee}),v=o(()=>r.value&&!c.value?n.translate("review.review_title"):n.translate("review.title")),[m,h]=De(!1),C=An(),A=Gn(),g=Ye();Fe(()=>{!m&&C&&h(!0)},[C,m]);const w=Sn(),L=o(()=>d.value?.purchasingCompany!==void 0&&w.value),u=e(E,{children:[t&&e(he,{withWrappedAddress:r.value}),!t&&e(b,{when:()=>d.value?.purchasingCompany,children:e(Mn,{})}),e(b,{when:A,children:e(Tn,{})})]}),f=e(kn,{accessibilityLabel:n.translate("review.block_title"),renderAsCard:l,children:[e(On,{}),e(b,{when:g,fallback:u,children:e($n,{})}),i?e(Hn,{}):null,e(b,{when:()=>L.value&&r.value,children:e(En,{})})]}),k=e(b,{when:y,fallback:f,children:e(Ze,{children:f})});return e(Xe,{accessibilityLabel:p.value===void 0?v.value:void 0,accessibilityLabelledBy:p.value,children:[e(b,{when:r,children:e(E,{children:[e(vn,{id:Z}),Ln("review.review_notice_html",n)?e(V,{children:e(mn,{})}):null,e(K,{blockSize:"large-200"})]})}),e(b,{when:()=>!r.value,children:e(Qe,{id:ee,visibility:"hidden",children:v.value})}),l?e(Cn,{target:"edgeToEdgeCard",children:k}):k,m&&e(E,{children:[e(K,{blockSize:"base"}),e(hn,{})]})]})}export{ft as default};

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.