1import{u as e,S as G,f as u,T as _e,i as p,p as we,q as Pe}from"./esnext-vendor.BDPAaZdq.js";import{cu as te,o as f,am as E,eL as Se,L as Ae,eg as Le,db as Ne,ei as Re,c as A,eM as Ie,cn as Fe,P as V,eo as Me,el as De,cp as Ce,B as ee,em as Be,en as xe,I as Oe,a2 as Te,h as Ee,ep as ze,e8 as Ue,a6 as He,v as Ve,eN as qe,b as Z,V as Ge,X as $e,a3 as re,U as Ke,b3 as Xe,_ as Ye,ab as Je}from"./hydrate.B0xlt2dG.js";import{O as k,Q as ie,P as I,ba as B,dA as Qe,o as ne,dz as We,cF as Ze,bH as je,dB as en,dC as nn,a8 as tn,e2 as on,a7 as sn,aZ as an,a$ as rn,ad as ln,ab as cn,b9 as dn}from"./hooks-useReplaceShopPayInHistory.C8UL-mAH.js";import{C as un}from"./Captcha.DnnR7xVp.js";import{MobileOrderSummary as le}from"./component-MobileOrderSummary.CzliEH0d.js";import{R as w}from"./Rollup.iQVJ47hC.js";import{D as pn,u as mn}from"./StickyPayButton-StickyPayButton.module.C1AAyg_x.js";import{e as hn,u as vn,a as yn,R as bn,c as ce,D as de,b as ue,L as pe,P as gn,d as Cn}from"./components-DeliveryReviewMethods.GbS2m_II.js";import{P as fn}from"./PayButtonSection.BwBoy3DX.js";import{P as me}from"./hooks-useWalletsTimeout.i08rvNYN.js";import{D as he,u as kn,a as _n,S as wn,R as Pn,b as Sn}from"./Middot.BWQejzCr.js";import{M as An,S as Ln,a as j}from"./Section._KuAKpGQ.js";import{S as fe}from"./Section-SectionStyleOverride.CP0VFRId.js";import{u as Nn}from"./PaymentButtons.bhaFVFMx.js";import{u as Rn,S as In}from"./hooks-usePostPurchase.BPY08f0g.js";import{u as Fn}from"./shop-pay-installments-monorail.D0Myc1k_.js";import{h as Mn}from"./helpers-getNormalizedPaymentMethodName.B-mE5wnL.js";import{A as ve}from"./AddressPresenter.B0qw2vWQ.js";import{u as ye}from"./hooks-useSuppressShopPayModalOnLoad.brztd70E.js";import{P as Dn}from"./PaymentLine.BkPc0Zsc.js";import"./app.D1P6yWfp.js";import"./shared-permissions.BaDWlj5_.js";import"./hooks-useShopPayExternalAppContext.DyGXtar4.js";import"./ShopPayCaptcha.CPpzhmEJ.js";import"./PaymentErrorBanner.CHfgrXa-.js";import"./hooks-useGeneralPaymentErrorMessage.Zl8_48Ok.js";import"./TransitionHeight.M5zGQYzu.js";import"./hooks-useShouldRevealCustomization.wOAvQfO_.js";import"./hooks-useShowMobileOrderSummary.DmZ0FrVc.js";import"./styles-floating-layer.module.BOdGEzlq.js";import"./localization-index.Bo8bPuxq.js";import"./helpers-credit-card-disabled.BnSr1GsQ.js";import"./Switch.BG-32C8R.js";import"./addresses-is-address-empty.Ch6V3XcM.js";import"./PayButton-helpers.Dg5kgVMm.js";import"./graphql-PaymentSessionMutation.BhOnX3QJ.js";import"./useShopPayButtonClassName.nv37ytUz.js";import"./hooks-payment-button.DClnUefe.js";import"./EstimatedDeliveryContent.C1e3pn_u.js";import"./utils-useViolationsHandler.Dq-z56H5.js";import"./ShopPayLogo.Cut4IRi6.js";import"./hooks-useShopPayProgressIntercepts.Sxhi7oHx.js";import"./NotFound.DKjZape6.js";import"./money-toShopPayMoneyInput.-nuohgDW.js";import"./redemption-promotions.CgqGtCd-.js";import"./ImpressionEventCapture.iMEQlBKs.js";import"./shipping-methods-consolidated-included.DWdbzJpL.js";import"./utilities-publishMessage.BORnEDuA.js";import"./utilities-stable-ref.Dvd2X3ul.js";import"./hooks-useHasOrdersFromMultipleShops.C_XGQrjx.js";import"./hooks-useWalletsMonorailTrack.CvfUTPBc.js";import"./PaymentIcon.CQXs-ePm.js";function Bn(){const{checkout:n}=k(),o=ie().shippingAddress.value,{value:i}=I().deliveryNext,s=n.proposal.facts.delivery??[],t=s[0],a=I().buyerIdentity.value?.purchasingCompany;if((!s.length||!t?.lines?.length)&&!n.isShippingRequired.value||!t)return null;if(t.pickupAddress)return e(Tn,{address:t.pickupAddress??void 0,locationName:t.pickupAddressName});const r=i?.status==="unavailable"?o:t.deliveryAddress,l=i&&i.status!=="unavailable"?i.lines.find(c=>c.type!=="SUBSCRIPTION"&&c.status==="available"&&!c.methods.some(({methodType:d})=>d==="PICK_UP")):void 0;return e(G,{children:[e(On,{shippingAddress:r??void 0,companyLocationName:a?.location.name}),e(xn,{lines:t.lines,secondaryDeliveryLine:l})]})}function xn({lines:n,secondaryDeliveryLine:o}){const{i18n:i,source:s}=k(),t=n.filter(({deliveryChange:a,isFulfilled:r})=>a!=="REMOVED"&&!r).map(a=>e(pn,{line:a},a.title));return t.length?e(w,{id:"shipping",label:i.translate("shipping.title"),primaryContent:t,secondaryContent:s.type==="paymentCollection"||!o?void 0:e(hn,{line:o})}):null}function On({shippingAddress:n,companyLocationName:o}){const{i18n:i}=k(),s=te(n,{countryFormat:"explicit",displayName:!!o}),t=i.formatName(n?.firstName,n?.lastName,!0)||n?.firstName||n?.lastName,a=i.translate("review.blocks.no_address"),{primaryContent:r,secondaryContent:l}=o?{primaryContent:o,secondaryContent:n?s:a}:{primaryContent:n?t:a,secondaryContent:n?s:void 0},c=r?e(f,{children:r}):void 0;let d;return n&&s==null?d=e(E,{}):n&&l?d=e(f,{type:"address",children:l}):l&&(d=e(f,{children:l})),e(w,{id:"address",label:i.translate("review.blocks.shipping_address_title"),primaryContent:c,secondaryContent:d})}function Tn({address:n,locationName:o}){const{i18n:i}=k(),s=te(n,{hiddenFields:["postalCode","countryCode","phone"]});return!o||!s?null:e(w,{id:"delivery",label:i.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:o}),primaryContent:e(f,{children:s})})}function M({accessibilityLabel:n,children:o,href:i}){const{checkout:{identity:s}}=k(),{onClick:t}=Se(),a=En({href:i,identity:s,amazonPayCheckoutAsGuest:t});return e(Ae,{href:i?`/${i}`:"/",onClick:a,accessibilityLabel:n,children:o})}function En({href:n,identity:o,amazonPayCheckoutAsGuest:i}){if(n==="#contact"&&o.current.value==="amazonPay")return()=>i?.()}const zn=["firstName","lastName"];function Un({hiddenFields:n,...o}){return{...o,hiddenFields:[...new Set([...n??[],...zn])]}}function ke({showAdressReviewItemAction:n=!0,reviewItemLabel:o,addressPresenterProps:i}){const{i18n:s,checkout:t}=k(),a=I(),r=a.deliveryNext,l=t.proposal.facts.delivery??[],c=a.shippingAddress,d=B("shippingAddress"),v=u(()=>l.length>0?l[0].deliveryAddress:c.value),m=u(()=>Qe(r.value)),{shippingAddress:h,billingAddress:L}=ie(),y=u(()=>r.value?.status==="unavailable"?h.value:v.value),{selectedPickupPoint:b}=Le(),_=u(()=>!t.isShippingRequired.value),g=u(()=>_.value?L.value:y.value),C=Ne(),S=I().buyerIdentity.value?.purchasingCompany?.location,z=Re(),U=vn({address:g}).value,P=g.value,x=U??{hiddenFields:["phone"],multiline:!1,...i},H=Un(x),O=!!(S&&(P==null||ne(P)||!z.value)),R=()=>
1{if(P==null||ne(P)||O)return;const oe=x.hiddenFields??[],se=oe.includes("firstName")?void 0:P.firstName,ae=oe.includes("lastName")?void 0:P.lastName;return s.formatName(se,ae,!0)||se||ae},$=()=>O?S?.name:R(),K=te(b?.pickupLocation.address,{hiddenFields:["countryCode"]}),X=()=>b?.pickupLocation.name,Y=_.value?s.translate("review.blocks.billing_address_title"):s.translate("review.blocks.shipping_address_title"),q=_.value?s.translate("review.blocks.change_billing_address_link_label"):s.translate("review.blocks.change_shipping_address_link_label"),J=e(M,{href:"#deliveryAddress",accessibilityLabel:q,children:s.translate("review.blocks.change_link_label")}),Q=s.translate("review.blocks.no_address"),F=s.translate("pickup_point.title").toLowerCase(),W=C?.taxId.value;let T=$(),D=e(Hn,{address:P,hasCompanyLocation:!!S,noAddressLabel:Q,secondaryAddressPresentationProps:H,vatNumber:W});return d.value?(T=e(E,{}),D=void 0):m.value&&(T=X(),D=e(Vn,{formattedAddress:K,pickupPoint:b,pickupPointLabel:F})),e(w,{label:o||Y,primaryAction:n?J:void 0,primaryContent:T,secondaryContent:D})}function Hn({address:n,hasCompanyLocation:o,noAddressLabel:i,secondaryAddressPresentationProps:s,vatNumber:t}){return n==null||ne(n)?e(A,{children:[e(f,{color:"subdued",children:i}),t&&e(he,{vatNumber:t})]}):o?e(A,{children:e(ve,{...s,address:n})}):e(A,{children:[e(ve,{...s,address:n}),t&&e(he,{vatNumber:t})]})}function Vn({formattedAddress:n,pickupPoint:o,pickupPointLabel:i}){if(!o)return null;const s=`${o.pickupLocation.carrierName} ${i}`;return e(A,{children:[n?e(f,{type:"address",children:n}):null,e(f,{color:"subdued",size:"small",children:s})]})}function qn({purchasingCompany:n}){const{i18n:o}=k(),{secondary:i}=Ie({address:n.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:n.location.name});if(!We(n))return null;const s=o.translate("review.blocks.company_location"),t=e(M,{href:"#billingAddress",accessibilityLabel:o.translate("review.blocks.change_company_location_link_label"),children:o.translate("review.blocks.change_link_label")}),a=n.location.shippingAddress?i:o.translate("review.blocks.no_address"),r=e(f,{children:n.location.name});return e(w,{label:s,primaryAction:t,primaryContent:r,secondaryContent:e(f,{children:a})})}function Gn({companyName:n}){const{i18n:o,checkout:i}=k(),{value:s}=I().contactInfo,t=B("contactInfo").value,a=i.proposal.facts.contactMethod,{geolocation:r}=Fe(),l=I().buyerIdentity.value?.purchasingCompany;yn(t);const{email:c,phone:d}=s??{},{email:v,phoneNumber:m}=a??{},{formattedNumber:h}=ye(r.country.code,m??void 0),{formattedNumber:L}=ye(r.country.code,d),y=t&&(c??d)==null,b=v||h||c||L,_=o.translate("customer_account.rollup_label");if(!b&&!t)return null;const g=n?_:o.translate("review.blocks.contact_method_title"),N=y?e(E,{}):l?e(bn,{contactInfo:b}):e(V,{lineClamp:1,children:e(f,{dir:"ltr",children:b})}),S=y||l?void 0:e(M,{href:"#contact",accessibilityLabel:o.translate("review.blocks.change_contact_method_link_label"),children:o.translate("review.blocks.change_link_label")});return e(w,{id:"contact",label:g,primaryAction:S,primaryContent:N})}function $n(){const{i18n:n}=k(),o=I(),{value:i}=o.deliveryNext,s=B("deliveryNext").value,t=Ze(i),a=Me(),r=De().value,l=Ce(),c=_e(()=>{if(!(!i||i.status==="unavailable"))return t?.find(({methodType:R})=>R==="PICK_UP")?.pickupLocation},[i,t]),d=c?.address,v=c?.name,m=!!t?.some(({methodType:R})=>R==="PICK_UP"),h=kn({deliveryLines:!s&&i?.status==="filled"?i.lines:void 0}),L=()=>m?n.translate("review.blocks.change_delivery_method_link_label"):n.translate("review.blocks.change_shipping_method_link_label"),y=m?n.translate("local_pickup.title"):n.translate("shipping.title");if(s&&!i)return e(w,{label:y,primaryContent:e(E,{})});const b=r||s?null:e(M,{href:"#shippingMethod",accessibilityLabel:L(),children:n.translate("review.blocks.change_link_label")}),_=h?e(wn,{summary:h}):void 0,g=h?e(_n,{summary:h}):void 0,S=e(w,{label:y,primaryAction:b,primaryContent:_??(m?e(pe,{pickupLocationName:v}):e(de,{})),secondaryContent:g??(m?e(ue,{address:d,pickupLocationName:v}):e(ce,{}))}),z=e(f,{color:"subdued",children:n.translate("review.blocks.no_address")}
1),U=d?e(ee,{maxInlineSize:"300px",children:e(pe,{pickupLocationName:v})}):z,P=d?e(ee,{maxInlineSize:"300px",children:e(ue,{address:d,pickupLocationName:v})}):void 0,x=e(M,{href:"#deliveryAddress",accessibilityLabel:n.translate("review.blocks.change_delivery_method_link_label"),children:n.translate("review.blocks.change_link_label")}),H=n.translate("review.blocks.pickup_items_at",{count:a.value.PICK_UP||0}),O=r||s?null:e(M,{href:"#shippingMethod",accessibilityLabel:n.translate("review.blocks.change_shipping_method_link_label"),children:n.translate("review.blocks.change_link_label")});return e(p,{when:l,fallback:S,children:[e(w,{label:H,primaryAction:x,primaryContent:U,secondaryContent:P}),e(p,{when:()=>a.value.SHIPPING,children:R=>e(ke,{reviewItemLabel:n.translate("review.blocks.ship_items_to",{count:R}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(w,{label:n.translate("shipping.title"),primaryAction:O,primaryContent:_??e(de,{}),secondaryContent:g??e(ce,{})})]})}function be(){const{i18n:n}=k(),{acceptPaymentVaulting:o,paymentLines:i}=ie(),s=B("paymentLines"),t=B("shippingAddress"),a=je(),r=Be(),l=xe(r.value),c=u(()=>!s.value&&i.value!=null&&!t.value),d=u(()=>{const C=i.value;return C?en(nn(C,a.value)):[]}),v=u(()=>!!i.value?.some(C=>C.method.type==="direct")),m=u(()=>!i.value?.some(N=>N.method.type==="deferred")),h=u(()=>!!(o.value&&v.value)),L=n.translate("payment.title"),y=e(we,{each:d,children:C=>e(Dn,{paymentLine:C,showCardBrandLabel:!0})}),b=c.value?e(M,{href:"#payment",accessibilityLabel:n.translate("review.blocks.change_payment_method_link_label"),children:e(f,{children:n.translate("review.blocks.change_link_label")})}):void 0,_=e(p,{when:c,fallback:e(E,{}),children:e(A,{gap:"small-400",children:y})});let g;return(m.value||h.value)&&(g=e(ee,{padding:"small-500 none none none",children:e(p,{when:c,fallback:e(E,{}),children:e(A,{gap:"small-400",children:[e(p,{when:m,children:e(V,{children:l})}),e(p,{when:h,children:e(A,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(Oe,{type:"check",size:"small"}),e(V,{children:n.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(w,{id:"payment",label:L,primaryAction:b,primaryContent:_,secondaryContent:g})}const Kn="#";function ge(){const{i18n:n}=k(),o=I().purchaseOrderNumber,i=u(()=>o.value?.trim()?`${Kn}${o.value}`:void 0),s=n.translate("review.blocks.no_purchase_order_number_long"),t=i.value,a=t?e(gn,{children:t}):void 0,r=t?void 0:e(V,{children:s}),l=e(M,{accessibilityLabel:n.translate("review.blocks.change_purchase_order_number_label"),href:"#payment",children:e(f,{children:n.translate("review.blocks.change_link_label")})}),c=n.translate("review.blocks.purchase_order_number_title");return e(w,{id:"purchaseOrder",label:c,primaryAction:l,primaryContent:a,secondaryContent:r})}function Xt(){Rn({stage:In.Complete,id:"Review"});const{checkout:n,i18n:o,shop:i,source:s}=k(),t=i.hasFlagEnabled(tn),a=n.configuration.visibility.showAside,{main:{spacing:r}}=Te(),{progress:l}=Ee(),c=Pe(()=>l("one-page-review-submit"),[l]),d=mn(c),v=Mn("review.review_notice_html",o),m=I(),h=m.deliveryNext,L=m.paymentLines,y=on(),b=B("total"),_=B("paymentLines"),g=n.proposal.facts.delivery??[],C=ze(),N=m.buyerIdentity,S=sn(),z=Nn(),U=Ce(),P=n.configuration.showContactInformation,x=Ue(),H=u(()=>an(h.value)||g.length>0&&g.every(D=>D.pickupAddress!==null)),O=u(()=>n.isShippingRequired.value&&!H.value),R=u(()=>N.value?.purchasingCompany?n.isShippingRequired.value&&!C.value:n.isShippingRequired.value),$=u(()=>!!(y.value&&y.value.amount>0)||L.value?.lines.some(D=>D.cost?.amount)),K=u(()=>!!(b.value||_.value||!y.value||$.value)),X=Fn(),Y=u(()=>N.value?.purchasingCompany?X.value:!0),q=rn(s),J=ln(),Q=He({base:!0,medium:!1}),F=J.value?Q??!1:!0,W=Ve("Checkout::Dynamic::Render","ORDER_SUMMARY4"),T=e(j,{condition:!F&&!t,hideDivider:!0,children:[e(An,{condition:F&&!t,hideDivider:t?!0:void 0,children:[e(A,{gap:"small-400",children:[e(p,{when:()=>q,children:[e(qe,{}),e(Z,{blockSize:"base"})]}),e(Pn,{}),e(p,{when:()=>v,children:e(V,{type:"small",color:"subdued",children:e(Sn,{})})})]}),e(Z,{blockSize:"large-200"}),e(Yn,{renderAsCard:t,children:e(Xn,{buyerIdentity:N,isOrderEditSession:q,showContactInformation:P,showPayment:K,showShippingAddress:O,showAddressReviewItemAction:Y,showDeliveryMethod:R,isSplitShipAndPickup:U})})]}),t&&e(Ln,{spacing:F?cn(r):"large-400"}),e(p,{when:S,children:e(j,{condition:F&&!t,children:[e(me,{placement:"default"}),e(Z,{blockSize:"base"})]})}),e(j,{condition:F&&!t,hideDivider:!0,children:e(Ge,{section:"review",children:e($e,{section:"review",children:e(A,{gap:"base",children:[t?e(fe,{target:"card",children:e(re,{accessibilityRole:"presentation",display:a?"@media (inline-size >= medium) none, auto":void 0,children:e(le,{})})}):e(le,{}),e(A,{gap:"large-200",children:[e(p,{when:z,children:e(un,{})}),e(p,{when:S,children:e(me,{placement:"above-pay-button"})}),e(fn,{buttonHidden:x}),e(p,{when:()=>F,children:e(Ke,{customizations:W,gap:"large-200"})})]})]})})})})]});return e(Ye,{onSubmit:d,children:t?e(Xe,{children:e(re,{accessibilityRole:"presentation",containerName:"s-shell-section",children:T})}):T})}function Xn({buyerIdentity:n,isOrderEditSession:o,showContactInformation:i,showPayment:s,showShippingAddress:t,showAddressReviewItemAction:a,showDeliveryMethod:r,isSplitShipAndPickup:l}){const c=u(()=>n.value?.purchasingCompany?.company?.name),d=u(()=>!!n.value?.purchasingCompany),v=u(()=>t.value&&!l.value),m=u(()=>t.value?void 0:n.value?.purchasingCompany);return e(G,{children:[i&&e(Gn,{companyName:c.value}),o?e(G,{children:[e(Bn,{}),e(p,{when:s,children:e(be,{})}),e(p,{when:d,children:e(ge,{})})]}):e(G,{children:[e(p,{when:v,children:e(ke,{showAdressReviewItemAction:a.value})}),e(p,{when:r,children:e($n,{})}),e(p,{when:m,children:h=>e(qn,{purchasingCompany:h})}),e(p,{when:s,children:e(be,{})}),e(p,{when:d,children:e(ge,{})})]})]})}function Yn({children:n,renderAsCard:o=!1}){const{i18n:i}=k(),s=dn(),t=i.translate("review.block_title"),a=e(Cn,{accessibilityLabel:t,renderAsCard:o,children:n}),r=e(p,{when:()=>!s.value,fallback:a,children:e(Je,{children:a})});return o?e(fe,{target:"edgeToEdgeCard",children:r}):r}export{Yn as ReviewItems,Xt 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.