1import{u as e,S as a,k as n,T as i,w as r,H as t,q as s}from"./2c1ab0fe.RaLGJvq2.js";import{cz as l,i as o,E as c,L as d,dg as p,el as u,S as m,eM as h,ct as v,f as b,eq as y,en as f,cv as g,b as _,eo as k,ep as w,a0 as C,k as j,r as A,er as N,ec as L,o as P,n as I,eN as S,d as R,ae as D,af as x,h as z,U as B,bc as F,ah as M,an as E}from"./164ad2e3.bPUx3Fg0.js";import{a as O,b3 as q,dw as U,bF as K,D as T,cy as G,bp as $,dx as H,dy as V,a4 as Y,dS as J,a3 as Q,aK as W,C as X,a8 as Z,a6 as ee,b2 as ae}from"./f67abd2c.BTHhdhoM.js";import{C as ne}from"./b3389d5c.DmJnEFPk.js";import{R as ie,P as re}from"./e77f7fe0.D6YnMnfe.js";import{D as te,u as se}from"./0e9ee714.DoQfy74A.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.CKw3gzR-.js";import{P as he}from"./fc21c11a.DD7sCios.js";import{P as ve}from"./e3e348f2.C3lLf8U0.js";import{D as be,u as ye,a as fe,S as ge,R as _e,b as ke}from"./910cd6e2.Dn0QzaOB.js";import{a as we,L as Ce,R as je}from"./03fde911.Ceb7NQ1e.js";import{M as Ae,S as Ne,a as Le}from"./dfca5da5.DfW8DdKj.js";import{S as Pe}from"./79974aab.BHkkF4M9.js";import{MobileOrderSummary as Ie}from"./d2e6a587.db9Bozth.js";import{u as Se}from"./e129c76e.Dm8G_PlY.js";import{u as Re,S as De}from"./71ae3d5c.CamNwqhE.js";import{h as xe,u as ze}from"./17425706.BWBJtbgF.js";import{A as Be}from"./4b1c22b7.DKftNOPJ.js";import{d as Fe}from"./24773686.DFsBOEme.js";import{u as Me}from"./160e80e7.CAka1iBR.js";import{a as Ee}from"./22345fd4.BOPeNj8v.js";import"./d0bb51ec.BIqtCEEY.js";import"./app.CPIYcwpp.js";import"./60a453ce.BHWO3gHr.js";import"./e12db40c.CeuzD2R-.js";import"./9dba8418.DCzpk36x.js";import"./598fef4e.Ct7NLKKD.js";import"./39921a74.CWJtrhCc.js";import"./ccdf3592.BeoyWjXk.js";import"./d25d1b95.Ctc7RP1h.js";import"./6f2620f5.bY_JOuNn.js";import"./71b60e0a.DfPLdYsH.js";import"./1f5e7811.CGsiidGr.js";import"./ec391382.Djhp_AZL.js";import"./347b440c.Ct28yEbl.js";import"./9ce08e25.CMzOvpmI.js";import"./7a8217fd.BsB9ld7l.js";import"./8599b02a.DeY28qKv.js";import"./e477f96c.DTK36FZy.js";import"./1ed8f5e3.op0FxzbZ.js";import"./7ee73f43.BsQDhajw.js";import"./cb5cf153.CVsZHWNg.js";import"./cb38e5c2.Dby2tR8W.js";import"./0c0ad074.CafdwvoO.js";import"./bf513f9c.mwf0ps-z.js";import"./87bfafec.CxwEzGHg.js";import"./434e3b0a.B1BBnK_d.js";import"./55098bf1.lh4L-ucv.js";import"./181d38d3.Ztafxyj4.js";import"./792bb671.B3OvVnSg.js";import"./dae24aab.CZ5rWyZM.js";import"./2495faa4.DD6nJl2C.js";import"./7b0c98ea.C5VPaglw.js";import"./945a08d6.DvcgDfRg.js";import"./78ab3dd0.DVuP3OIA.js";import"./d4ea2faa.CUbB3413.js";import"./fe885b80.i76WZfHf.js";import"./f78726c8.DrWBqMbh.js";function Oe(){const{checkout:n}=O(),i=n.negotiator.parts.shippingAddress.value,{value:r}=n.negotiator.current.fields.deliveryNext,t=n.proposal.facts.delivery??[],s=t[0],l=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany;if(!(t.length&&s?.lines?.length||n.isShippingRequired.value))return null;if(!s)return null;if(s.pickupAddress)return e(Ke,{address:s.pickupAddress??void 0,locationName:s.pickupAddressName});const o="unavailable"===r?.status?i: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:n}){const{i18n:i,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(ie,{id:"shipping",label:i.translate("shipping.title"),primaryContent:t,secondaryContent:"paymentCollection"!==r.type&&n?e(le,{line:n}):void 0}):null}function Ue({shippingAddress:a,companyLocationName:n}){const{i18n:i}=O(),r=l(a,{countryFormat:"explicit",displayName:Boolean(n)}),t=i.formatName(a?.firstName,a?.lastName,!0)||a?.firstName||a?.lastName,s=i.translate("review.blocks.no_address"),{primaryContent:d,secondaryContent:p}=n?{primaryContent:n,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(ie,{id:"address",label:i.translate("review.blocks.shipping_address_title"),primaryContent:u,secondaryContent:m})}function Ke({address:a,locationName:n}){const{i18n:i}=O(),r=l(a,{hiddenFields:["postalCode","countryCode","phone"]});return n&&r?e(ie,{id:"delivery",label:i.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:n}),primaryContent:e(o,{children:r})}):null}function Te({accessibilityLabel:a,children:n,href:i}){const{checkout:{identity:r}}=O(),{onClick:t}=Fe(),s=function({href:e,identity:a,amazonPayCheckoutAsGuest:n}){return"#contact"!==e||"amazonPay"!==a.current.value?void 0:()=>n?.()}({href:i,identity:r,amazonPayCheckoutAsGuest:t});return e(d,{href:i?`/${i}`:"/",onClick:s,accessibilityLabel:a,children:n})}const Ge=["firstName","lastName"];function $e({showAdressReviewItemAction:a=!0,reviewItemLabel:i,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=q("shippingAddress"),v=n(()=>d.length>0?d[0].deliveryAddress:m.value),b=n(()=>U(o.value)),{shippingAddress:y,billingAddress:f}=s.negotiator.parts,g=n(()=>"unavailable"===o.value?.status?y.value:v.value),{selectedPickupPoint:_}=Me(),k=n(()=>!s.isShippingRequired.value),w=n(()=>k.value?f.value:g.value),C=p(),j=s.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,A=j?.location,N=u(),L=oe({address:w}).value,P=w.value,I=L??{hiddenFields:["phone"],multiline:!1,...r},S=function({hiddenFields:e,...a}){return{...a,hiddenFields:[...new Set([...e??[],...Ge])]}}
1(I),R=Boolean(A&&(null==P||K(P)||!N.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(Te,{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 T=R?A?.name:(()=>{if(null==P||K(P)||R)return;const e=I.hiddenFields??[],a=e.includes("firstName")?void 0:P.firstName,n=e.includes("lastName")?void 0:P.lastName;return t.formatName(a,n,!0)||a||n})(),G=e(He,{address:P,hasCompanyLocation:Boolean(A),noAddressLabel:F,secondaryAddressPresentationProps:S,vatNumber:E});return h.value?(T=e(c,{}),G=void 0):b.value&&(T=_?.pickupLocation.name,G=e(Ve,{formattedAddress:D,pickupPoint:_,pickupPointLabel:M})),e(ie,{label:i||x,primaryAction:a?B:void 0,primaryContent:T,secondaryContent:G})}function He({address:a,hasCompanyLocation:n,noAddressLabel:i,secondaryAddressPresentationProps:r,vatNumber:t}
1){return null==a||K(a)?e(m,{children:[e(o,{color:"subdued",children:i}),t&&e(be,{vatNumber:t})]}):e(m,n?{children:e(Be,{...r,address:a})}:{children:[e(Be,{...r,address:a}),t&&e(be,{vatNumber:t})]})}function Ve({formattedAddress:a,pickupPoint:n,pickupPointLabel:i}){if(!n)return null;const r=`${n.pickupLocation.carrierName} ${i}`;return e(m,{children:[a?e(o,{type:"address",children:a}):null,e(o,{color:"subdued",size:"small",children:r})]})}function Ye({purchasingCompany:a}){const{i18n:n}=O(),{secondary:i}=h({address:a.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:a.location.name});if(!T(a))return null;const r=n.translate("review.blocks.company_location"),t=e(Te,{href:"#billingAddress",accessibilityLabel:n.translate("review.blocks.change_company_location_link_label"),children:n.translate("review.blocks.change_link_label")}),s=a.location.shippingAddress?i:n.translate("review.blocks.no_address"),l=e(o,{children:a.location.name});return e(ie,{label:r,primaryAction:t,primaryContent:l,secondaryContent:e(o,{children:s})})}function Je({companyName:a}){const{i18n:n,checkout:i}=O(),{value:r}=i.negotiator.current.fields.contactInfo,t=q("contactInfo").value,s=i.proposal.facts.contactMethod,{geolocation:l}=v(),d=i.negotiator.current.fields.buyerIdentity.value?.purchasingCompany;ce(t);const{email:p,phone:u}=r??{},{email:m,phoneNumber:h}=s??{},{formattedNumber:y}=Ee(l.country.code,h??void 0),{formattedNumber:f}=Ee(l.country.code,u),g=t&&null==(p??u),_=m||y||p||f,k=n.translate("customer_account.rollup_label");if(!_&&!t)return null;const w=a?k:n.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(Te,{href:"#contact",accessibilityLabel:n.translate("review.blocks.change_contact_method_link_label"),children:n.translate("review.blocks.change_link_label")});return e(ie,{id:"contact",label:w,primaryAction:A,primaryContent:j})}function Qe(){const{i18n:a,checkout:{negotiator:n}}=O(),{value:t}=n.current.fields.deliveryNext,s=q("deliveryNext").value,l=G(t),d=y(),p=f().value,u=g(),m=i(()=>{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(ie,{label:w,primaryContent:e(c,{})});const C=p||s?null:e(Te,{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,N=e(ie,{label:w,primaryAction:C,primaryContent:j??(b?e(Ce,{pickupLocationName:v}):e(ue,{})),secondaryContent:A??(b?e(we,{address:h,pickupLocationName:v}):e(pe,{}))}),L=e(o,{color:"subdued",children:a.translate("review.blocks.no_address")}),P=h?e(_,{maxInlineSize:"300px",children:e(Ce,{pickupLocationName:v})}):L,I=h?e(_,{maxInlineSize:"300px",children:e(we,{address:h,pickupLocationName:v})}):void 0,S=e(Te,{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(Te,{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:N,children:[e(ie,{label:R,primaryAction:S,primaryContent:P,secondaryContent:I}),e(r,{when:()=>d.value.SHIPPING,children:n=>e($e,{reviewItemLabel:a.translate("review.blocks.ship_items_to",{count:n}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(ie,{label:a.translate("shipping.title"),primaryAction:D,primaryContent:j??e(ue,{}),secondaryContent:A??e(pe,{})})]})}function We(){const{i18n:a,checkout:{negotiator:i}}=O(),{acceptPaymentVaulting:s,paymentLines:l}=i.parts,d=q("paymentLines"),p=q("shippingAddress"),u=$(),h=k(),v=w(h.value),y=n(()=>!d.value&&null!=l.value&&!p.value),f=n(()=>{const e=l.value;return e?H(V(e,u.value)):[]}),g=n(()=>Boolean(l.value?.some(e=>"direct"===e.method.type))),j=n(()=>{const e=l.value?.some(e=>"deferred"===e.method.type);return!e}),A=n(()=>Boolean(s.value&&g.value)),N=a.translate("payment.title"),L=e(t,{each:f,children:a=>e(re,{paymentLine:a,showCardBrandLabel:!0})}),P=y.value?e(Te,{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:L})});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: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(ie,{id:"payment",label:N,primaryAction:P,primaryContent:I,secondaryContent:S})}function Xe(){const{i18n:a,checkout:{negotiator:i}}=O(),r=i.current.fields.purchaseOrderNumber,t=n(()=>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(Te,{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(ie,{id:"purchaseOrder",label:u,primaryAction:p,primaryContent:c,secondaryContent:d})}function Ze(){Re({stage:De.Complete,id:"Review"});const{checkout:a,i18n:i,shop:t,source:l}=O(),o=t.hasFlagEnabled(Y),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",i),y=a.negotiator.current.fields.deliveryNext,f=a.negotiator.current.fields.paymentLines,_=J(),k=q("total"),w=q("paymentLines"),C=a.proposal.facts.delivery??[],E=N(),U=a.negotiator.current.fields.buyerIdentity,K=Q(),T=Se(),G=g(),$=a.configuration.showContactInformation,H=L(),V=n(()=>W(y.value)||C.length>0&&C.every(e=>null!==e.pickupAddress)),ae=n(()=>a.isShippingRequired.value&&!V.value),ie=n(()=>U.value?.purchasingCompany?a.isShippingRequired.value&&!E.value:a.isShippingRequired.value),re=n(()=>Boolean(_.value&&_.value.amount>0)||f.value?.lines.some(e=>e.cost?.amount)),te=n(()=>Boolean(k.value||w.value||!_.value||re.value)),le=ze(),oe=n(()=>!U.value?.purchasingCompany||le.value),ce=X(l),de=Z(),pe=P({base:!0,medium:!1}),ue=!de.value||(pe??!1),me=I("Checkout::Dynamic::Render","ORDER_SUMMARY4"),be=e(Le,{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(aa,{renderAsCard:o,children:e(ea,{buyerIdentity:U,isOrderEditSession:ce,showContactInformation:$,showPayment:te,showShippingAddress:ae,showAddressReviewItemAction:oe,showDeliveryMethod:ie,isSplitShipAndPickup:G})})]}),o&&e(Ne,{spacing:ue?ee(d):"large-400"}),e(r,{when:K,children:e(Le,{condition:ue&&!o,children:[e(ve,{placement:"default"}),e(R,{blockSize:"base"})]})}),e(Le,{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:T,children:e(ne,{})}),e(r,{when:K,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 ea({buyerIdentity:i,isOrderEditSession:t,showContactInformation:s,showPayment:l,showShippingAddress:o,showAddressReviewItemAction:c,showDeliveryMethod:d,isSplitShipAndPickup:p}){const u=n(()=>i.value?.purchasingCompany?.company?.name),m=n(()=>Boolean(i.value?.purchasingCompany)),h=n(()=>o.value&&!p.value),v=n(()=>o.value?void 0:i.value?.purchasingCompany);return e(a,{children:[s&&e(Je,{companyName:u.value}),e(a,t?{children:[e(Oe,{}),e(r,{when:l,children:e(We,{})}),e(r,{when:m,children:e(Xe,{})})]}:{children:[e(r,{when:h,children:e($e,{showAdressReviewItemAction:c.value})}),e(r,{when:d,children:e(Qe,{})}),e(r,{when:v,children:a=>e(Ye,{purchasingCompany:a})}),e(r,{when:l,children:e(We,{})}),e(r,{when:m,children:e(Xe,{})})]})]})}function aa({children:a,renderAsCard:n=!1}){const{i18n:i}=O(),t=ae(),s=i.translate("review.block_title"),l=e(je,{accessibilityLabel:s,renderAsCard:n,children:a}),o=e(r,{when:()=>!t.value,fallback:l,children:e(E,{children:l})});return n?e(Pe,{target:"edgeToEdgeCard",children:o}):o}export{aa as ReviewItems,Ze 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.