1import{u as e,S as a,k as i,T as n,z as r,J as t,q as s}from"./2c1ab0fe.qpvfywqb.js";import{cJ as l,j as o,G as c,L as d,dm as p,er as u,S as m,eS as h,cD as v,f as b,ew as y,et as f,cF as g,b as _,eu as k,ev as w,a1 as C,l as j,v as A,ex as L,ei as N,p as P,o as I,eT as S,d as R,af as D,ag as x,i as z,U as B,bi as F,ai as M,ao as E}from"./164ad2e3.DcJn775M.js";import{e as O,bf as T,du as q,bz as U,K as G,cH as K,bD as $,dv as H,dw as J,ac as V,dZ as X,ab as W,aX as Y,J as Z,al as Q,aj as ee,be as ae}from"./4b4bc88f.DkycdxSK.js";import{C as ie}from"./b3389d5c.AQoeX8aG.js";import{R as ne,P as re}from"./e77f7fe0.Bl46DOUC.js";import{D as te,u as se}from"./0e9ee714.Cnsf3p8Q.js";import{c as le,u as oe,a as ce,R as de,b as pe,D as ue,P as me}from"./60575ca1.DccN8mN8.js";import{P as he}from"./fc21c11a.CvREKW2p.js";import{P as ve}from"./e3e348f2.qdNJPs68.js";import{D as be,u as ye,a as fe,S as ge,R as _e,b as ke}from"./910cd6e2.D9laAOO_.js";import{a as we,L as Ce,R as je}from"./03fde911.DIt7XTZh.js";import{M as Ae,S as Le,a as Ne}from"./dfca5da5.cHkNyCYM.js";import{S as Pe}from"./79974aab.Cl0DLekt.js";import{MobileOrderSummary as Ie}from"./d2e6a587.D5dE5VhU.js";import{u as Se}from"./e129c76e.83DznIAr.js";import{u as Re,S as De}from"./71ae3d5c.ChDO3fdz.js";import{h as xe,u as ze}from"./17425706.DtdfKQJ3.js";import{A as Be,a as Fe}from"./4b1c22b7.zkM5jsqa.js";import{d as Me}from"./24773686.NjNSWG1C.js";import{u as Ee}from"./160e80e7.D73xYRbj.js";import{a as Oe}from"./22345fd4.Bc95vVsB.js";import"./d0bb51ec.CWfbNPnY.js";import"./app.DH8n-1bp.js";import"./f67abd2c.CNaB0QaR.js";import"./e12db40c.DhbHW8sF.js";import"./9dba8418.4R19B40l.js";import"./60a453ce.DBFo6PRx.js";import"./598fef4e.C71uub5O.js";import"./39921a74.C0GzP1-7.js";import"./7a8217fd.BSo0j5mC.js";import"./8599b02a.D6crYzGJ.js";import"./ccdf3592.DmQuNZVR.js";import"./71b60e0a.DfPLdYsH.js";import"./1f5e7811.DBGnR3_R.js";import"./ec391382.CmRYZq9D.js";import"./347b440c.xpK15B3S.js";import"./9ce08e25.dSvNrRyM.js";import"./e477f96c.Bg2MTFPd.js";import"./1ed8f5e3.DIMgWfc5.js";import"./7ee73f43.DRXbjRuN.js";import"./cb5cf153.CNHN3NCG.js";import"./cb38e5c2.k1ouuKLe.js";import"./0c0ad074.BuZ9_cdp.js";import"./434e3b0a.oup8Ur0H.js";import"./bf513f9c.DfVLzm1y.js";import"./87bfafec.CxwEzGHg.js";import"./051149c8.lHD9iIAq.js";import"./55098bf1.CjSE9kMx.js";import"./181d38d3.C21ZO0gV.js";import"./792bb671.B3OvVnSg.js";import"./dae24aab.LuzlJRmB.js";import"./2495faa4.DgGNI16D.js";import"./7b0c98ea.B8saOsP6.js";import"./945a08d6.DPoKhjkl.js";import"./78ab3dd0.DsAxQUAi.js";import"./d4ea2faa.Bh5JwQU0.js";import"./fe885b80.BxcRVx2R.js";import"./f78726c8.CFtLd10H.js";function Te(){const{checkout:i}=O(),n=i.negotiator.parts.shippingAddress.value,{value:r}=i.negotiator.current.fields.deliveryNext,t=i.proposal.facts.delivery??[],s=t[0],l=i.negotiator.current.fields.buyerIdentity.value?.purchasingCompany;if(!(t.length&&s?.lines?.length||i.isShippingRequired.value))return null;if(!s)return null;if(s.pickupAddress)return e(Ge,{address:s.pickupAddress??void 0,locationName:s.pickupAddressName});const o="unavailable"===r?.status?n:s.deliveryAddress,c=r&&"unavailable"!==r.status?r.lines.find(e=>"SUBSCRIPTION"!==e.type&&"available"===e.status&&!e.methods.some(({methodType:e})=>"PICK_UP"===e)):void 0;return e(a,{children:[e(Ue,{shippingAddress:o??void 0,companyLocationName:l?.location.name}),e(qe,{lines:s.lines,secondaryDeliveryLine:c})]})}function qe({lines:a,secondaryDeliveryLine:i}){const{i18n:n,source:r}=O(),t=a.filter(({deliveryChange:e,isFulfilled:a})=>"REMOVED"!==e&&!a).map(a=>e(te,{line:a},a.title));return t.length?e(ne,{id:"shipping",label:n.translate("shipping.title"),primaryContent:t,secondaryContent:"paymentCollection"!==r.type&&i?e(le,{line:i}):void 0}):null}function Ue({shippingAddress:a,companyLocationName:i}){const{i18n:n}=O(),r=l(a,{countryFormat:"explicit",displayName:Boolean(i)}),t=n.formatName(a?.firstName,a?.lastName,!0)||a?.firstName||a?.lastName,s=n.translate("review.blocks.no_address"),{primaryContent:d,secondaryContent:p}=i?{primaryContent:i,secondaryContent:a?r:s}:{primaryContent:a?t:s,secondaryContent:a?r:void 0},u=d?e(o,{children:d}):void 0;let m;return a&&null==r?m=e(c,{}):a&&p?m=e(o,{type:"address",children:p}):p&&(m=e(o,{children:p})),e(ne,{id:"address",label:n.translate("review.blocks.shipping_address_title"),primaryContent:u,secondaryContent:m})}function Ge({address:a,locationName:i}){const{i18n:n}=O(),r=l(a,{hiddenFields:["postalCode","countryCode","phone"]});return i&&r?e(ne,{id:"delivery",label:n.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:i}),primaryContent:e(o,{children:r})}):null}function Ke({accessibilityLabel:a,children:i,href:n}){const{checkout:{identity:r}}=O(),{onClick:t}=Me(),s=function({href:e,identity:a,amazonPayCheckoutAsGuest:i}){return"#contact"!==e||"amazonPay"!==a.current.value?void 0:()=>i?.()}({href:n,identity:r,amazonPayCheckoutAsGuest:t});return e(d,{href:n?`/${n}`:"/",onClick:s,accessibilityLabel:a,children:i})}const $e=["firstName","lastName"];function He({showAdressReviewItemAction:a=!0,reviewItemLabel:n,addressPresenterProps:r}){const{i18n:t,checkout:s}=O(),o=s.negotiator.current.fields.deliveryNext,[d]=s.proposal.facts.delivery??[],m=s.negotiator.current.fields.shippingAddress,h=T("shippingAddress"),v=i(()=>d?d.deliveryAddress:m.value),b=i(()=>q(o.value)),{shippingAddress:y,billingAddress:f}=s.negotiator.parts,g=i(()=>"unavailable"===o.value?.status?y.value:v.value),{selectedPickupPoint:_}=Ee(),k=i(()=>!s.isShippingRequired.value),w=i(()=>k.value?f.value:g.value),C=p(),j=s.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,A=j?.location,L=u(),N=oe({address:w}).value,P=w.value,I=N??{hiddenFields:["phone"],multiline:!1,...r},S=function({hiddenFields:e,...a}){return{...a,hiddenFields:[...new Set([...e??[],...$e])]}}
1(I),R=Boolean(A&&(null==P||U(P)||!L.value)),D=l(_?.pickupLocation.address,{hiddenFields:["countryCode"]}),x=k.value?t.translate("review.blocks.billing_address_title"):t.translate("review.blocks.shipping_address_title"),z=k.value?t.translate("review.blocks.change_billing_address_link_label"):t.translate("review.blocks.change_shipping_address_link_label"),B=e(Ke,{href:"#deliveryAddress",accessibilityLabel:z,children:t.translate("review.blocks.change_link_label")}),F=t.translate("review.blocks.no_address"),M=t.translate("pickup_point.title").toLowerCase(),E=C?.taxId.value;let G=R?A?.name:(()=>{if(null==P||U(P)||R)return;const e=I.hiddenFields??[],a=e.includes("firstName")?void 0:P.firstName,i=e.includes("lastName")?void 0:P.lastName;return t.formatName(a,i,!0)||a||i})(),K=e(Je,{address:P,hasCompanyLocation:Boolean(A),noAddressLabel:F,secondaryAddressPresentationProps:S,vatNumber:E});return h.value?(G=e(c,{}),K=void 0):b.value&&(G=_?.pickupLocation.name,K=e(Ve,{formattedAddress:D,pickupPoint:_,pickupPointLabel:M})),e(ne,{label:n||x,primaryAction:a?B:void 0,primaryContent:G,secondaryContent:K})}function Je({address:a,hasCompanyLocation:i,noAddressLabel:n,secondaryAddressPresentationProps:r,vatNumber:t}
1){return null==a||U(a)?e(m,{children:[e(o,{color:"subdued",children:n}),t&&e(be,{vatNumber:t})]}):e(m,i?{children:e(Be,{...r,address:a})}:{children:[e(Be,{...r,address:a}),t&&e(be,{vatNumber:t})]})}function Ve({formattedAddress:a,pickupPoint:i,pickupPointLabel:n}){if(!i)return null;const r=`${i.pickupLocation.carrierName} ${n}`;return e(m,{children:[a?e(o,{type:"address",children:a}):null,e(o,{color:"subdued",size:"small",children:r})]})}function Xe({purchasingCompany:a}){const{i18n:i}=O(),{secondary:n}=h({address:a.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:a.location.name});if(!G(a))return null;const r=i.translate("review.blocks.company_location"),t=e(Ke,{href:"#billingAddress",accessibilityLabel:i.translate("review.blocks.change_company_location_link_label"),children:i.translate("review.blocks.change_link_label")}),s=a.location.shippingAddress?n:i.translate("review.blocks.no_address"),l=e(o,{children:a.location.name});return e(ne,{label:r,primaryAction:t,primaryContent:l,secondaryContent:e(o,{children:s})})}function We({companyName:a}){const{i18n:i,checkout:n}=O(),{value:r}=n.negotiator.current.fields.contactInfo,t=T("contactInfo").value,s=n.proposal.facts.contactMethod,{geolocation:l}=v(),d=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany;ce(t);const{email:p,phone:u}=r??{},{email:m,phoneNumber:h}=s??{},{formattedNumber:y}=Oe(l.country.code,h??void 0),{formattedNumber:f}=Oe(l.country.code,u),g=t&&null==(p??u),_=m||y||p||f,k=i.translate("customer_account.rollup_label");if(!_&&!t)return null;const w=a?k:i.translate("review.blocks.contact_method_title"),C=d?e(de,{contactInfo:_}):e(b,{lineClamp:1,children:e(o,{dir:"ltr",children:_})}),j=g?e(c,{}):C,A=g||d?void 0:e(Ke,{href:"#contact",accessibilityLabel:i.translate("review.blocks.change_contact_method_link_label"),children:i.translate("review.blocks.change_link_label")});return e(ne,{id:"contact",label:w,primaryAction:A,primaryContent:j})}function Ye(){const{i18n:a,checkout:{negotiator:i}}=O(),{value:t}=i.current.fields.deliveryNext,s=T("deliveryNext").value,l=n(()=>K(t),[t]),d=y(),p=f().value,u=g(),m=n(()=>{if(t&&"unavailable"!==t.status)return l?.find(({methodType:e})=>"PICK_UP"===e)?.pickupLocation},[t,l]),h=m?.address,v=m?.name,b=Boolean(l?.some(({methodType:e})=>"PICK_UP"===e)),k=ye({deliveryLines:s||"filled"!==t?.status?void 0:t.lines}),w=b?a.translate("local_pickup.title"):a.translate("shipping.title");if(s&&!t)return e(ne,{label:w,primaryContent:e(c,{})});const C=p||s?null:e(Ke,{href:"#shippingMethod",accessibilityLabel:b?a.translate("review.blocks.change_delivery_method_link_label"):a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")}),j=k?e(ge,{summary:k}):void 0,A=k?e(fe,{summary:k}):void 0,L=e(ne,{label:w,primaryAction:C,primaryContent:j??(b?e(Ce,{pickupLocationName:v}):e(ue,{})),secondaryContent:A??(b?e(we,{address:h,pickupLocationName:v}):e(pe,{}))}),N=e(o,{color:"subdued",children:a.translate("review.blocks.no_address")}),P=h?e(_,{maxInlineSize:"300px",children:e(Ce,{pickupLocationName:v})}):N,I=h?e(_,{maxInlineSize:"300px",children:e(we,{address:h,pickupLocationName:v})}):void 0,S=e(Ke,{href:"#deliveryAddress",accessibilityLabel:a.translate("review.blocks.change_delivery_method_link_label"),children:a.translate("review.blocks.change_link_label")}),R=a.translate("review.blocks.pickup_items_at",{count:d.value.PICK_UP||0}),D=p||s?null:e(Ke,{href:"#shippingMethod",accessibilityLabel:a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")});return e(r,{when:u,fallback:L,children:[e(ne,{label:R,primaryAction:S,primaryContent:P,secondaryContent:I}),e(r,{when:()=>d.value.SHIPPING,children:i=>e(He,{reviewItemLabel:a.translate("review.blocks.ship_items_to",{count:i}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(ne,{label:a.translate("shipping.title"),primaryAction:D,primaryContent:j??e(ue,{}),secondaryContent:A??e(pe,{})})]})}function Ze(){const{i18n:a,checkout:{negotiator:n}}=O(),{acceptPaymentVaulting:s,paymentLines:l}=n.parts,d=T("paymentLines"),p=T("shippingAddress"),u=$(),h=k(),v=w(h.value),y=i(()=>!d.value&&null!=l.value&&!p.value),f=i(()=>{const e=l.value;return e?H(J(e,u.value)):[]}),g=i(()=>Boolean(l.value?.some(e=>"direct"===e.method.type))),j=i(()=>{const e=l.value?.some(e=>"deferred"===e.method.type);return!e}),A=i(()=>Boolean(s.value&&g.value)),L=a.translate("payment.title"),N=e(t,{each:f,children:a=>e(re,{paymentLine:a,showCardBrandLabel:!0})}),P=y.value?e(Ke,{href:"#payment",accessibilityLabel:a.translate("review.blocks.change_payment_method_link_label"),children:e(o,{children:a.translate("review.blocks.change_link_label")})}):void 0,I=e(r,{when:y,fallback:e(c,{}),children:e(m,{gap:"small-400",children:N})});let S;return(j.value||A.value)&&(S=e(_,{padding:"small-500 none none none",children:e(r,{when:y,fallback:e(c,{}),children:e(m,{gap:"small-400",children:[e(r,{when:j,children:e(b,{children:e(Fe,{groups:v??[]})})}),e(r,{when:A,children:e(m,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(C,{type:"check",size:"small"}
1),e(b,{children:a.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(ne,{id:"payment",label:L,primaryAction:P,primaryContent:I,secondaryContent:S})}function Qe(){const{i18n:a,checkout:{negotiator:n}}=O(),r=n.current.fields.purchaseOrderNumber,t=i(()=>r.value?.trim()?`#${r.value}`:void 0),s=a.translate("review.blocks.no_purchase_order_number_long"),l=t.value,c=l?e(me,{children:l}):void 0,d=l?void 0:e(b,{children:s}),p=e(Ke,{accessibilityLabel:a.translate("review.blocks.change_purchase_order_number_label"),href:"#payment",children:e(o,{children:a.translate("review.blocks.change_link_label")})}),u=a.translate("review.blocks.purchase_order_number_title");return e(ne,{id:"purchaseOrder",label:u,primaryAction:p,primaryContent:c,secondaryContent:d})}function ea(){Re({stage:De.Complete,id:"Review"});const{checkout:a,i18n:n,shop:t,source:l}=O(),o=t.hasFlagEnabled(V),c=a.configuration.visibility.showAside,{main:{spacing:d}}=j(),{progress:p}=A(),u=s(()=>p("one-page-review-submit"),[p]),h=se(u),v=xe("review.review_notice_html",n),y=a.negotiator.current.fields.deliveryNext,f=a.negotiator.current.fields.paymentLines,_=X(),k=T("total"),w=T("paymentLines"),C=a.proposal.facts.delivery??[],E=L(),q=a.negotiator.current.fields.buyerIdentity,U=W(),G=Se(),K=g(),$=a.configuration.showContactInformation,H=N(),J=i(()=>Y(y.value)||C.length>0&&C.every(e=>null!==e.pickupAddress)),ae=i(()=>a.isShippingRequired.value&&!J.value),ne=i(()=>q.value?.purchasingCompany?a.isShippingRequired.value&&!E.value:a.isShippingRequired.value),re=i(()=>Boolean(_.value&&_.value.amount>0)||f.value?.lines.some(e=>e.cost?.amount)),te=i(()=>Boolean(k.value||w.value||!_.value||re.value)),le=ze(),oe=i(()=>!q.value?.purchasingCompany||le.value),ce=Z(l),de=Q(),pe=P({base:!0,medium:!1}),ue=!de.value||(pe??!1),me=I("Checkout::Dynamic::Render","ORDER_SUMMARY4"),be=e(Ne,{condition:!ue&&!o,hideDivider:!0,children:[e(Ae,{condition:ue&&!o,hideDivider:!!o||void 0,children:[e(m,{gap:"small-400",children:[e(r,{when:()=>ce,children:[e(S,{}),e(R,{blockSize:"base"})]}),e(_e,{}),e(r,{when:()=>v,children:e(b,{type:"small",color:"subdued",children:e(ke,{})})})]}),e(R,{blockSize:"large-200"}),e(ia,{renderAsCard:o,children:e(aa,{buyerIdentity:q,isOrderEditSession:ce,showContactInformation:$,showPayment:te,showShippingAddress:ae,showAddressReviewItemAction:oe,showDeliveryMethod:ne,isSplitShipAndPickup:K})})]}),o&&e(Le,{spacing:ue?ee(d):"large-400"}),e(r,{when:U,children:e(Ne,{condition:ue&&!o,children:[e(ve,{placement:"default"}),e(R,{blockSize:"base"})]})}),e(Ne,{condition:ue&&!o,hideDivider:!0,children:e(D,{section:"review",children:e(x,{section:"review",children:e(m,{gap:"base",children:[o?e(Pe,{target:"card",children:e(z,{accessibilityRole:"presentation",display:c?"@media (inline-size >= medium) none, auto":void 0,children:e(Ie,{})})}):e(Ie,{}),e(m,{gap:"large-200",children:[e(r,{when:G,children:e(ie,{})}),e(r,{when:U,children:e(ve,{placement:"above-pay-button"})}),e(he,{buttonHidden:H}),e(r,{when:()=>ue,children:e(B,{customizations:me,gap:"large-200"})})]})]})})})})]});return e(M,{onSubmit:h,children:o?e(F,{children:e(z,{accessibilityRole:"presentation",containerName:"s-shell-section",children:be})}):be})}function aa({buyerIdentity:n,isOrderEditSession:t,showContactInformation:s,showPayment:l,showShippingAddress:o,showAddressReviewItemAction:c,showDeliveryMethod:d,isSplitShipAndPickup:p}){const u=i(()=>n.value?.purchasingCompany?.company?.name),m=i(()=>Boolean(n.value?.purchasingCompany)),h=i(()=>o.value&&!p.value),v=i(()=>o.value?void 0:n.value?.purchasingCompany);return e(a,{children:[s&&e(We,{companyName:u.value}),e(a,t?{children:[e(Te,{}),e(r,{when:l,children:e(Ze,{})}),e(r,{when:m,children:e(Qe,{})})]}:{children:[e(r,{when:h,children:e(He,{showAdressReviewItemAction:c.value})}),e(r,{when:d,children:e(Ye,{})}),e(r,{when:v,children:a=>e(Xe,{purchasingCompany:a})}),e(r,{when:l,children:e(Ze,{})}),e(r,{when:m,children:e(Qe,{})})]})]})}function ia({children:a,renderAsCard:i=!1}){const{i18n:n}=O(),t=ae(),s=n.translate("review.block_title"),l=e(je,{accessibilityLabel:s,renderAsCard:i,children:a}),o=e(r,{when:()=>!t.value,fallback:l,children:e(E,{children:l})});return i?e(Pe,{target:"edgeToEdgeCard",children:o}):o}export{ia as ReviewItems,ea 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.