1import{u as e,S as V,f as u,T as fe,i as p,s as ke,q as Ce}from"./esnext-vendor.DQ9BNaJe.js";import{ce as Z,l as f,ai as O,dV as _e,L as we,dy as Pe,dM as Ae,k as S,dW as Se,c7 as Le,P as H,dS as Re,dP as Ne,c9 as he,B as Y,dQ as Ie,dR as Me,I as Fe,f as De,dT as Be,dn as xe,dq as Oe,$ as Te,q as ze,dX as Ee,b as X,M as Ue,N as He,U as qe,Q as Ve,a7 as Ge}from"./hydrate.D4A9Cb0p.js";import{C as $e}from"./Captcha.C1WT1fRD.js";import{MobileOrderSummary as Ke}from"./component-MobileOrderSummary.CQ7izdnq.js";import{R as _,P as Qe}from"./PaymentLine.DHHGwgI-.js";import{T as k,W as ee,a5 as N,bg as D,dQ as We,t as j,dP as Xe,du as Je,a4 as Ye,dR as je,dS as Ze,bf as en,dT as nn,al as tn,b7 as on,b9 as sn,ar as an,be as rn}from"./addresses-is-address-empty.BB1pvxM5.js";import{D as ln,u as cn}from"./StickyPayButton-StickyPayButton.module.CmczG1QP.js";import{e as dn,u as un,a as pn,R as mn,c as oe,D as se,b as ae,L as re,P as hn,d as vn}from"./components-DeliveryReviewMethods.B4LuniKd.js";import{P as yn}from"./PayButtonSection.DeN06Xm4.js";import{P as le}from"./hooks-useWalletsTimeout.BeFlWkI9.js";import{D as ce,u as bn,a as gn,S as fn,R as kn,b as Cn}from"./Middot.Do_JMCQw.js";import{M as J,a as _n}from"./Section.CF4eMCLG.js";import{u as wn}from"./PaymentButtons.cmCJwI80.js";import{u as Pn,S as An}from"./Page.B9MyjEfr.js";import{A as de}from"./AddressPresenter.B3e4WG12.js";import{b as Sn}from"./utilities-previous.DZk5oM9s.js";import{u as ue}from"./hooks-useSuppressShopPayModalOnLoad.CwJgxtUb.js";import"./app.B3Jiyyyv.js";import"./shared-permissions.g_hGDKr0.js";import"./hooks-useShopPayExternalAppContext.xiQcN-hk.js";import"./ShopPayCaptcha.CvCnZWWm.js";import"./PaymentErrorBanner.VkG56uoV.js";import"./hooks-useGeneralPaymentErrorMessage.Dm3PRuw1.js";import"./TransitionHeight.EYTEkufm.js";import"./hooks-useShouldRevealCustomization.Cb4-X8Fo.js";import"./styles-floating-layer.module.BkVfnQWO.js";import"./shop-pay-installments-types.BePBAMcY.js";import"./localization-index.Cz2QAhoe.js";import"./PaymentIcon.D0Z6Se8T.js";import"./Theme-ThemeOverride.C9ATh16e.js";import"./Switch.CnCpdlLG.js";import"./shared-negotiation-input-redeemable.Co2wDVqa.js";import"./PayButton-helpers.C2T9gxby.js";import"./graphql-PaymentSessionMutation.CSqu0oVn.js";import"./helpers-credit-card-disabled.BQ6Iyzpd.js";import"./useShopPayButtonClassName.BXi9zWEB.js";import"./shared-shop-theme.DkQ4xpRa.js";import"./hooks-useShowShopPayOptin.BFq7voDt.js";import"./hooks-payment-button.CaKmk3ou.js";import"./ShippingMethodRateLabel.DlhiaZvZ.js";import"./EstimatedDeliveryContent.DMqgKF-R.js";import"./hooks-useShopPayProgressIntercepts.Bk0aPlkl.js";import"./utils-useViolationsHandler.Zh98fKCP.js";import"./ShopPayLogo.DScRW63P.js";import"./NotFound.CvcYWO3y.js";import"./payment-usePaymentExemptionReason.BcS5fKkI.js";import"./ImpressionEventCapture.C-19abdk.js";import"./shipping-methods-consolidated-included.BboFi_am.js";import"./negotiated-findSelectedDeliveryMethod.CuanKoea.js";import"./cross-border-hooks.DsyMg8eX.js";import"./amazon-pay-useAmazonPayPaymentLine.CsQac3SS.js";function Ln(){const{checkout:n}=k(),o=ee().shippingAddress.value,{value:t}=N().deliveryNext,i=n.proposal.facts.delivery??[],s=i[0],a=N().buyerIdentity.value?.purchasingCompany;if((!i.length||!s?.lines?.length)&&!n.isShippingRequired.value||!s)return null;if(s.pickupAddress)return e(In,{address:s.pickupAddress??void 0,locationName:s.pickupAddressName});const r=t?.status==="unavailable"?o:s.deliveryAddress,l=t&&t.status!=="unavailable"?t.lines.find(c=>c.type!=="SUBSCRIPTION"&&c.status==="available"&&!c.methods.some(({methodType:d})=>d==="PICK_UP")):void 0;return e(V,{children:[e(Nn,{shippingAddress:r??void 0,companyLocationName:a?.location.name}),e(Rn,{lines:s.lines,secondaryDeliveryLine:l})]})}function Rn({lines:n,secondaryDeliveryLine:o}){const{i18n:t,source:i}=k(),s=n.filter(({deliveryChange:a,isFulfilled:r})=>a!=="REMOVED"&&!r).map(a=>e(ln,{line:a},a.title));return s.length?e(_,{id:"shipping",label:t.translate("shipping.title"),primaryContent:s,secondaryContent:i.type==="paymentCollection"||!o?void 0:e(dn,{line:o})}):null}function Nn({shippingAddress:n,companyLocationName:o}){const{i18n:t}=k(),i=Z(n,{countryFormat:"explicit",displayName:!!o}),s=t.formatName(n?.firstName,n?.lastName,!0)||n?.firstName||n?.lastName,a=t.translate("review.blocks.no_address"),{primaryContent:r,secondaryContent:l}=o?{primaryContent:o,secondaryContent:n?i:a}:{primaryContent:n?s:a,secondaryContent:n?i:void 0},c=r?e(f,{children:r}):void 0;let d;return n&&i==null?d=e(O,{}):n&&l?d=e(f,{type:"address",children:l}):l&&(d=e(f,{children:l})),e(_,{id:"address",label:t.translate("review.blocks.shipping_address_title"),primaryContent:c,secondaryContent:d})}function In({address:n,locationName:o}){const{i18n:t}=k(),i=Z(n,{hiddenFields:["postalCode","countryCode","phone"]});return!o||!i?null:e(_,{id:"delivery",label:t.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:o}),primaryContent:e(f,{children:i})})}function I({accessibilityLabel:n,children:o,href:t}){const{checkout:{identity:i}}=k(),{onClick:s}=_e(),a=Mn({href:t,identity:i,amazonPayCheckoutAsGuest:s});return e(we,{href:t?`/${t}`:"/",onClick:a,accessibilityLabel:n,children:o})}function Mn({href:n,identity:o,amazonPayCheckoutAsGuest:t}){if(n==="#contact"&&o.current.value==="amazonPay")return()=>t?.()}
1const Fn=["firstName","lastName"];function Dn({hiddenFields:n,...o}){return{...o,hiddenFields:[...new Set([...n??[],...Fn])]}}function ve({showAdressReviewItemAction:n=!0,reviewItemLabel:o,addressPresenterProps:t}){const{i18n:i,checkout:s}=k(),a=N(),r=a.deliveryNext,l=s.proposal.facts.delivery??[],c=a.shippingAddress,d=D("shippingAddress"),m=u(()=>l.length>0?l[0].deliveryAddress:c.value),h=u(()=>We(r.value)),{shippingAddress:v,billingAddress:A}=ee(),w=u(()=>r.value?.status==="unavailable"?v.value:m.value),{selectedPickupPoint:y}=Sn(),b=u(()=>!s.isShippingRequired.value),C=u(()=>b.value?A.value:w.value),g=Pe(),L=N().buyerIdentity.value?.purchasingCompany?.location,T=Ae(),z=un({address:C}).value,P=C.value,B=z??{hiddenFields:["phone"],multiline:!1,...t},E=Dn(B),x=!!(L&&(P==null||j(P)||!T.value)),R=()=>{if(P==null||j(P)||x)return;const ne=B.hiddenFields??[],te=ne.includes("firstName")?void 0:P.firstName,ie=ne.includes("lastName")?void 0:P.lastName;return i.formatName(te,ie,!0)||te||ie},q=()=>x?L?.name:R(),G=Z(y?.pickupLocation.address,{hiddenFields:["countryCode"]}),$=()=>y?.pickupLocation.name,F=b.value?i.translate("review.blocks.billing_address_title"):i.translate("review.blocks.shipping_address_title"),K=b.value?i.translate("review.blocks.change_billing_address_link_label"):i.translate("review.blocks.change_shipping_address_link_label"),U=e(I,{href:"#deliveryAddress",accessibilityLabel:K,children:i.translate("review.blocks.change_link_label")}),ye=i.translate("review.blocks.no_address"),be=i.translate("pickup_point.title").toLowerCase(),ge=g?.taxId.value;let Q=q(),W=e(Bn,{address:P,hasCompanyLocation:!!L,noAddressLabel:ye,secondaryAddressPresentationProps:E,vatNumber:ge});return d.value?(Q=e(O,{}),W=void 0):h.value&&(Q=$(),W=e(xn,{formattedAddress:G,pickupPoint:y,pickupPointLabel:be})),e(_,{label:o||F,primaryAction:n?U:void 0,primaryContent:Q,secondaryContent:W})}function Bn({address:n,hasCompanyLocation:o,noAddressLabel:t,secondaryAddressPresentationProps:i,vatNumber:s}){return n==null||j(n)?e(S,{children:[e(f,{color:"subdued",children:t}),s&&e(ce,{vatNumber:s})]}):o?e(S,{children:e(de,{...i,address:n})}):e(S,{children:[e(de,{...i,address:n}),s&&e(ce,{vatNumber:s})]})}function xn({formattedAddress:n,pickupPoint:o,pickupPointLabel:t}){if(!o)return null;const i=`${o.pickupLocation.carrierName} ${t}`;return e(S,{children:[n?e(f,{type:"address",children:n}):null,e(f,{color:"subdued",size:"small",children:i})]})}function On({purchasingCompany:n}){const{i18n:o}=k(),{secondary:t}=Se({address:n.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:n.location.name});if(!Xe(n))return null;const i=o.translate("review.blocks.company_location"),s=e(I,{href:"#billingAddress",accessibilityLabel:o.translate("review.blocks.change_company_location_link_label"),children:o.translate("review.blocks.change_link_label")}),a=n.location.shippingAddress?t:o.translate("review.blocks.no_address"),r=e(f,{children:n.location.name});return e(_,{label:i,primaryAction:s,primaryContent:r,secondaryContent:e(f,{children:a})})}function Tn({companyName:n}){const{i18n:o,checkout:t}=k(),{value:i}=N().contactInfo,s=D("contactInfo").value,a=t.proposal.facts.contactMethod,{geolocation:r}=Le(),l=N().buyerIdentity.value?.purchasingCompany;pn(s);const{email:c,phone:d}=i??{},{email:m,phoneNumber:h}=a??{},{formattedNumber:v}=ue(r.country.code,h??void 0),{formattedNumber:A}=ue(r.country.code,d),w=s&&(c??d)==null,y=m||v||c||A,b=o.translate("customer_account.rollup_label");if(!y&&!s)return null;const C=n?b:o.translate("review.blocks.contact_method_title"),M=w?e(O,{}):l?e(mn,{contactInfo:y}):e(H,{lineClamp:1,children:e(f,{dir:"ltr",children:y})}),L=w||l?void 0:e(I,{href:"#contact",accessibilityLabel:o.translate("review.blocks.change_contact_method_link_label"),children:o.translate("review.blocks.change_link_label")});return e(_,{id:"contact",label:C,primaryAction:L,primaryContent:M})}function zn(){const{i18n:n}=k(),o=N(),{value:t}=o.deliveryNext,i=D("deliveryNext").value,s=Je(t),a=Re(),r=Ne().value,l=he(),c=fe(()=>{if(!(!t||t.status==="unavailable"))return s?.find(({methodType:R})=>R==="PICK_UP")?.pickupLocation},[t,s]),d=c?.address,m=c?.name,h=!!s?.some(({methodType:R})=>R==="PICK_UP"),v=bn({deliveryLines:!i&&t?.status==="filled"?t.lines:void 0}),A=()=>h?n.translate("review.blocks.change_delivery_method_link_label"):n.translate("review.blocks.change_shipping_method_link_label"),w=h?n.translate("local_pickup.title"):n.translate("shipping.title");if(i&&!t)return e(_,{label:w,primaryContent:e(O,{})});const y=r||i?null:e(I,{href:"#shippingMethod",accessibilityLabel:A(),children:n.translate("review.blocks.change_link_label")}),b=v?e(fn,{summary:v}):void 0,C=v?e(gn,{summary:v}):void 0,L=e(_,{label:w,primaryAction:y,primaryContent:b??(h?e(re,{pickupLocationName:m}):e(se,{})),secondaryContent:C??(h?e(ae,{address:d,pickupLocationName:m}):e(oe,{}))}),T=e(f,{color:"subdued",children:n.translate("review.blocks.no_address")}
1),z=d?e(Y,{maxInlineSize:"300px",children:e(re,{pickupLocationName:m})}):T,P=d?e(Y,{maxInlineSize:"300px",children:e(ae,{address:d,pickupLocationName:m})}):void 0,B=e(I,{href:"#deliveryAddress",accessibilityLabel:n.translate("review.blocks.change_delivery_method_link_label"),children:n.translate("review.blocks.change_link_label")}),E=n.translate("review.blocks.pickup_items_at",{count:a.value.PICK_UP||0}),x=r||i?null:e(I,{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:L,children:[e(_,{label:E,primaryAction:B,primaryContent:z,secondaryContent:P}),e(p,{when:()=>a.value.SHIPPING,children:R=>e(ve,{reviewItemLabel:n.translate("review.blocks.ship_items_to",{count:R}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(_,{label:n.translate("shipping.title"),primaryAction:x,primaryContent:b??e(se,{}),secondaryContent:C??e(oe,{})})]})}function pe(){const{i18n:n}=k(),{acceptPaymentVaulting:o,paymentLines:t}=ee(),i=D("paymentLines"),s=D("shippingAddress"),a=Ye(),r=Ie(),l=Me(r.value),c=u(()=>!i.value&&t.value!=null&&!s.value),d=u(()=>{const g=t.value;return g?je(Ze(g,a.value)):[]}),m=u(()=>!!t.value?.some(g=>g.method.type==="direct")),h=u(()=>!t.value?.some(M=>M.method.type==="deferred")),v=u(()=>!!(o.value&&m.value)),A=n.translate("payment.title"),w=e(ke,{each:d,children:g=>e(Qe,{paymentLine:g,showCardBrandLabel:!0})}),y=c.value?e(I,{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,b=e(p,{when:c,fallback:e(O,{}),children:e(S,{gap:"small-400",children:w})});let C;return(h.value||v.value)&&(C=e(Y,{padding:"small-500 none none none",children:e(p,{when:c,fallback:e(O,{}),children:e(S,{gap:"small-400",children:[e(p,{when:h,children:e(H,{children:l})}),e(p,{when:v,children:e(S,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(Fe,{type:"check",size:"small"}),e(H,{children:n.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(_,{id:"payment",label:A,primaryAction:y,primaryContent:b,secondaryContent:C})}const En="#";function me(){const{i18n:n}=k(),o=N().purchaseOrderNumber,t=u(()=>o.value?.trim()?`${En}${o.value}`:void 0),i=n.translate("review.blocks.no_purchase_order_number_long"),s=t.value,a=s?e(hn,{children:s}):void 0,r=s?void 0:e(H,{children:i}),l=e(I,{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(_,{id:"purchaseOrder",label:c,primaryAction:l,primaryContent:a,secondaryContent:r})}function Et(){Pn({stage:An.Complete,id:"Review"});const{checkout:n,i18n:o,source:t}=k(),{progress:i}=De(),s=Ce(()=>i("one-page-review-submit"),[i]),a=cn(s),r=en("review.review_notice_html",o),l=N(),c=l.deliveryNext,d=l.paymentLines,m=nn(),h=D("total"),v=D("paymentLines"),A=n.proposal.facts.delivery??[],w=Be(),y=l.buyerIdentity,b=tn(),C=wn(),g=he(),M=n.configuration.showContactInformation,L=xe(),T=u(()=>on(c.value)||A.length>0&&A.every(U=>U.pickupAddress!==null)),z=u(()=>n.isShippingRequired.value&&!T.value),P=u(()=>y.value?.purchasingCompany?n.isShippingRequired.value&&!w.value:n.isShippingRequired.value),B=u(()=>!!(m.value&&m.value.amount>0)||d.value?.lines.some(U=>U.cost?.amount)),E=u(()=>!!(h.value||v.value||!m.value||B.value)),x=Oe(),R=u(()=>y.value?.purchasingCompany?x.value:!0),q=sn(t),G=an(),$=Te({base:!0,medium:!1}),F=G.value?$??!1:!0,K=ze("Checkout::Dynamic::Render","ORDER_SUMMARY4");return e(Ve,{onSubmit:a,children:e(J,{condition:!F,hideDivider:!0,children:[e(_n,{condition:F,children:[e(S,{gap:"small-400",children:[e(p,{when:()=>q,children:[e(Ee,{}),e(X,{blockSize:"base"})]}),e(kn,{}),e(p,{when:()=>r,children:e(H,{type:"small",color:"subdued",children:e(Cn,{})})})]}),e(X,{blockSize:"large-200"}),e(Hn,{children:e(Un,{buyerIdentity:y,isOrderEditSession:q,showContactInformation:M,showPayment:E,showShippingAddress:z,showAddressReviewItemAction:R,showDeliveryMethod:P,isSplitShipAndPickup:g})})]}),e(p,{when:b,children:e(J,{condition:F,children:[e(le,{placement:"default"}),e(X,{blockSize:"base"})]})}),e(J,{condition:F,hideDivider:!0,children:e(Ue,{section:"review",children:e(He,{section:"review",children:e(S,{gap:"base",children:[e(Ke,{}),e(S,{gap:"large-200",children:[e(p,{when:C,children:e($e,{})}),e(p,{when:b,children:e(le,{placement:"above-pay-button"})}),e(yn,{buttonHidden:L}),e(p,{when:()=>F,children:e(qe,{customizations:K,gap:"large-200"})})]})]})})})})]})})}function Un({buyerIdentity:n,isOrderEditSession:o,showContactInformation:t,showPayment:i,showShippingAddress:s,showAddressReviewItemAction:a,showDeliveryMethod:r,isSplitShipAndPickup:l}){const c=u(()=>n.value?.purchasingCompany?.company?.name),d=u(()=>!!n.value?.purchasingCompany),m=u(()=>s.value&&!l.value),h=u(()=>s.value?void 0:n.value?.purchasingCompany);return e(V,{children:[t&&e(Tn,{companyName:c.value}),o?e(V,{children:[e(Ln,{}),e(p,{when:i,children:e(pe,{})}),e(p,{when:d,children:e(me,{})})]}):e(V,{children:[e(p,{when:m,children:e(ve,{showAdressReviewItemAction:a.value})}),e(p,{when:r,children:e(zn,{})}),e(p,{when:h,children:v=>e(On,{purchasingCompany:v})}),e(p,{when:i,children:e(pe,{})}),e(p,{when:d,children:e(me,{})})]})]})}function Hn({children:n}){const{i18n:o}=k(),t=rn(),i=o.translate("review.block_title"),s=e(vn,{accessibilityLabel:i,children:n});return e(p,{when:()=>!t.value,fallback:s,children:e(Ge,{children:s})})}export{Hn as ReviewItems,Et 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.