1import{u as e,S as a,f as n,T as i,i as s,p as r,q as t}from"./2c1ab0fe.D_oO1jU7.js";import{cp as l,n as o,ad as c,eK as d,L as p,ef as u,d8 as m,eh as h,c as v,eL as b,ci as y,P as f,en as _,ek as g,ck as k,B as w,el as C,em as A,I as j,Z as N,h as L,eo as P,e7 as I,a1 as S,p as R,eM as D,b as x,N as z,O as B,_ as F,U as M,aX as O,R as E,a6 as K}from"./164ad2e3.DgUUtBtV.js";import{O as U,Q as q,P as T,bb as $,dD as G,o as H,dC as Q,cH as V,bJ as X,dE as Y,dF as J,a9 as W,e5 as Z,a8 as ee,a_ as ae,b0 as ne,ae as ie,ac as se,ba as re}from"./4c290a1e.D9lE9kmU.js";import{C as te}from"./a535174a.D9-hmEEh.js";import{R as le}from"./6720fa5f.gZhcGybT.js";import{D as oe,u as ce}from"./0e9ee714.DqBmP7tY.js";import{e as de,u as pe,a as ue,R as me,c as he,D as ve,b as be,L as ye,P as fe,d as _e}from"./60575ca1.B_YWwvX-.js";import{P as ge}from"./fc21c11a.Oq7eYqe8.js";import{P as ke}from"./e3e348f2.sbssU431.js";import{D as we,u as Ce,a as Ae,S as je,R as Ne,b as Le}from"./910cd6e2.IzGgJ-IA.js";import{M as Pe,S as Ie,a as Se}from"./dfca5da5.H1thSL3M.js";import{S as Re}from"./79974aab.B4rWj4Zf.js";import{MobileOrderSummary as De}from"./d2e6a587.DdUzoAUU.js";import{u as xe}from"./4ea44c06.D08Q9XyC.js";import{u as ze,S as Be}from"./ca5e9c49.BL-l7mUG.js";import{u as Fe}from"./f1968089.4OkuMKtQ.js";import{h as Me}from"./65f3d4da.8ZfwXSRH.js";import{A as Oe}from"./53bbdad9.Bipg1_Lt.js";import{u as Ee}from"./29034f35.BY8rOPhQ.js";import{P as Ke}from"./e77f7fe0.B5ukwIHt.js";import"./app.bDJ3v-8C.js";import"./60a453ce.BIyixFcg.js";import"./0a7dffce.BMM606kb.js";import"./bb728e1c.BObJOhlA.js";import"./5fd968f2.DTvmd-mL.js";import"./01973ac7.BVhNP6nv.js";import"./58314944.QVtJf4c2.js";import"./31cc568e.CsDC1k63.js";import"./8599b02a.yKiXuwTF.js";import"./39921a74.bStpjMMs.js";import"./5587f402.B4N8qnlk.js";import"./ccdf3592.Jq-5VsnW.js";import"./e477f96c.dvrL9dgG.js";import"./0c0ad074.C7YXa-mF.js";import"./945a08d6.DUn1GrN-.js";import"./ec391382.Cpl2aZVN.js";import"./347b440c.oWH9qB5Z.js";import"./d5d34b3b.HJgnljYP.js";import"./1ed8f5e3.Oin1LrS4.js";import"./7ee73f43.CQB45vvk.js";import"./cb5cf153.Cf9Ss23E.js";import"./bff2ff9b.DxpvVf7S.js";import"./7a8217fd.BlWFPiiA.js";import"./aea3fb03.BGfdKdPP.js";import"./87bfafec.DaEgHDYY.js";import"./55098bf1.CrP8QF43.js";import"./181d38d3.Bsy-Yqp4.js";import"./7b0c98ea.0CGJF8wQ.js";import"./f78726c8.K7FaLIh2.js";import"./ed9f2238.C-XxbQrN.js";import"./598fef4e.DSM2KxPW.js";function Ue(){const{checkout:n}=U(),i=q().shippingAddress.value,{value:s}=T().deliveryNext,r=n.proposal.facts.delivery??[],t=r[0],l=T().buyerIdentity.value?.purchasingCompany;if(!(r.length&&t?.lines?.length||n.isShippingRequired.value))return null;if(!t)return null;if(t.pickupAddress)return e($e,{address:t.pickupAddress??void 0,locationName:t.pickupAddressName});const o="unavailable"===s?.status?i:t.deliveryAddress,c=s&&"unavailable"!==s.status?s.lines.find((e=>"SUBSCRIPTION"!==e.type&&"available"===e.status&&!e.methods.some((({methodType:e})=>"PICK_UP"===e)))):void 0;return e(a,{children:[e(Te,{shippingAddress:o??void 0,companyLocationName:l?.location.name}),e(qe,{lines:t.lines,secondaryDeliveryLine:c})]})}function qe({lines:a,secondaryDeliveryLine:n}){const{i18n:i,source:s}=U(),r=a.filter((({deliveryChange:e,isFulfilled:a})=>"REMOVED"!==e&&!a)).map((a=>e(oe,{line:a},a.title)));return r.length?e(le,{id:"shipping",label:i.translate("shipping.title"),primaryContent:r,secondaryContent:"paymentCollection"!==s.type&&n?e(de,{line:n}):void 0}):null}function Te({shippingAddress:a,companyLocationName:n}){const{i18n:i}=U(),s=l(a,{countryFormat:"explicit",displayName:Boolean(n)}),r=i.formatName(a?.firstName,a?.lastName,!0)||a?.firstName||a?.lastName,t=i.translate("review.blocks.no_address"),{primaryContent:d,secondaryContent:p}=n?{primaryContent:n,secondaryContent:a?s:t}:{primaryContent:a?r:t,secondaryContent:a?s:void 0},u=d?e(o,{children:d}):void 0;let m;return a&&null==s?m=e(c,{}):a&&p?m=e(o,{type:"address",children:p}):p&&(m=e(o,{children:p})),e(le,{id:"address",label:i.translate("review.blocks.shipping_address_title"),primaryContent:u,secondaryContent:m})}function $e({address:a,locationName:n}){const{i18n:i}=U(),s=l(a,{hiddenFields:["postalCode","countryCode","phone"]});return n&&s?e(le,{id:"delivery",label:i.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:n}),primaryContent:e(o,{children:s})}):null}function Ge({accessibilityLabel:a,children:n,href:i}){const{checkout:{identity:s}}=U(),{onClick:r}=d(),t=function({href:e,identity:a,amazonPayCheckoutAsGuest:n}){return"#contact"!==e||"amazonPay"!==a.current.value?void 0:()=>n?.()}({href:i,identity:s,amazonPayCheckoutAsGuest:r});return e(p,{href:i?`/${i}`:"/",onClick:t,accessibilityLabel:a,children:n})}const He=["firstName","lastName"];function Qe({showAdressReviewItemAction:a=!0,reviewItemLabel:i,addressPresenterProps:s}){const{i18n:r,checkout:t}=U(),o=T(),d=o.deliveryNext,p=t.proposal.facts.delivery??[],v=o.shippingAddress,b=$("shippingAddress"),y=n((()=>p.length>0?p[0].deliveryAddress:v.value)),f=n((()=>G(d.value))),{shippingAddress:_,billingAddress:g}=q(),k=n((()=>"unavailable"===d.value?.status?_.value:y.value)),{selectedPickupPoint:w}=u(),C=n((()=>!t.isShippingRequired.value)),A=n((()=>C.value?g.value:k.value)),j=m(),N=T().buyerIdentity.value?.purchasingCompany,L=N?.location,P=h(),I=pe({address:A}).value,S=A.value,R=I??{hiddenFields:["phone"],multiline:!1,...s},D=function({hiddenFields:e,...a}){return{...a,hiddenFields:[...new Set([...e??[],...He])]}}(R),x=Boolean(L&&(null==S||H(S)||!P.value)),z=l(w?.pickupLocation.address,{hiddenFields:["countryCode"]}),B=C.value?r.translate("review.blocks.billing_address_title"):r.translate("review.blocks.shipping_address_title"),F=C.value?r.translate("review.blocks.change_billing_address_link_label"):r.translate("review.blocks.change_shipping_address_link_label"),M=e(Ge,{href:"#deliveryAddress",accessibilityLabel:F,children:r.translate("review.blocks.change_link_label")}),O=r.translate("review.blocks.no_address"),E=r.translate("pickup_point.title").toLowerCase(),K=j?.taxId.value;let Q=x?L?.name:(()=>
1{if(null==S||H(S)||x)return;const e=R.hiddenFields??[],a=e.includes("firstName")?void 0:S.firstName,n=e.includes("lastName")?void 0:S.lastName;return r.formatName(a,n,!0)||a||n})(),V=e(Ve,{address:S,hasCompanyLocation:Boolean(L),noAddressLabel:O,secondaryAddressPresentationProps:D,vatNumber:K});return b.value?(Q=e(c,{}),V=void 0):f.value&&(Q=w?.pickupLocation.name,V=e(Xe,{formattedAddress:z,pickupPoint:w,pickupPointLabel:E})),e(le,{label:i||B,primaryAction:a?M:void 0,primaryContent:Q,secondaryContent:V})}function Ve({address:a,hasCompanyLocation:n,noAddressLabel:i,secondaryAddressPresentationProps:s,vatNumber:r}){return null==a||H(a)?e(v,{children:[e(o,{color:"subdued",children:i}),r&&e(we,{vatNumber:r})]}):e(v,n?{children:e(Oe,{...s,address:a})}:{children:[e(Oe,{...s,address:a}),r&&e(we,{vatNumber:r})]})}function Xe({formattedAddress:a,pickupPoint:n,pickupPointLabel:i}){if(!n)return null;const s=`${n.pickupLocation.carrierName} ${i}`;return e(v,{children:[a?e(o,{type:"address",children:a}):null,e(o,{color:"subdued",size:"small",children:s})]})}function Ye({purchasingCompany:a}){const{i18n:n}=U(),{secondary:i}=b({address:a.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:a.location.name});if(!Q(a))return null;const s=n.translate("review.blocks.company_location"),r=e(Ge,{href:"#billingAddress",accessibilityLabel:n.translate("review.blocks.change_company_location_link_label"),children:n.translate("review.blocks.change_link_label")}),t=a.location.shippingAddress?i:n.translate("review.blocks.no_address"),l=e(o,{children:a.location.name});return e(le,{label:s,primaryAction:r,primaryContent:l,secondaryContent:e(o,{children:t})})}function Je({companyName:a}){const{i18n:n,checkout:i}=U(),{value:s}=T().contactInfo,r=$("contactInfo").value,t=i.proposal.facts.contactMethod,{geolocation:l}=y(),d=T().buyerIdentity.value?.purchasingCompany;ue(r);const{email:p,phone:u}=s??{},{email:m,phoneNumber:h}=t??{},{formattedNumber:v}=Ee(l.country.code,h??void 0),{formattedNumber:b}=Ee(l.country.code,u),_=r&&null==(p??u),g=m||v||p||b,k=n.translate("customer_account.rollup_label");if(!g&&!r)return null;const w=a?k:n.translate("review.blocks.contact_method_title"),C=d?e(me,{contactInfo:g}):e(f,{lineClamp:1,children:e(o,{dir:"ltr",children:g})}),A=_?e(c,{}):C,j=_||d?void 0:e(Ge,{href:"#contact",accessibilityLabel:n.translate("review.blocks.change_contact_method_link_label"),children:n.translate("review.blocks.change_link_label")});return e(le,{id:"contact",label:w,primaryAction:j,primaryContent:A})}function We(){const{i18n:a}=U(),n=T(),{value:r}=n.deliveryNext,t=$("deliveryNext").value,l=V(r),d=_(),p=g().value,u=k(),m=i((()=>{if(r&&"unavailable"!==r.status)return l?.find((({methodType:e})=>"PICK_UP"===e))?.pickupLocation}),[r,l]),h=m?.address,v=m?.name,b=Boolean(l?.some((({methodType:e})=>"PICK_UP"===e))),y=Ce({deliveryLines:t||"filled"!==r?.status?void 0:r.lines}),f=b?a.translate("local_pickup.title"):a.translate("shipping.title");if(t&&!r)return e(le,{label:f,primaryContent:e(c,{})});const C=p||t?null:e(Ge,{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")}),A=y?e(je,{summary:y}):void 0,j=y?e(Ae,{summary:y}):void 0,N=e(le,{label:f,primaryAction:C,primaryContent:A??(b?e(ye,{pickupLocationName:v}):e(ve,{})),secondaryContent:j??(b?e(be,{address:h,pickupLocationName:v}):e(he,{}))}),L=e(o,{color:"subdued",children:a.translate("review.blocks.no_address")}),P=h?e(w,{maxInlineSize:"300px",children:e(ye,{pickupLocationName:v})}):L,I=h?e(w,{maxInlineSize:"300px",children:e(be,{address:h,pickupLocationName:v})}):void 0,S=e(Ge,{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||t?null:e(Ge,{href:"#shippingMethod",accessibilityLabel:a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")});return e(s,{when:u,fallback:N,children:[e(le,{label:R,primaryAction:S,primaryContent:P,secondaryContent:I}),e(s,{when:()=>d.value.SHIPPING,children:n=>e(Qe,{reviewItemLabel:a.translate("review.blocks.ship_items_to",{count:n}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(le,{label:a.translate("shipping.title"),primaryAction:D,primaryContent:A??e(ve,{}),secondaryContent:j??e(he,{})})]})}function Ze(){const{i18n:a}=U(),{acceptPaymentVaulting:i,paymentLines:t}=q(),l=$("paymentLines"),d=$("shippingAddress"),p=X(),u=C(),m=A(u.value),h=n((()=>!l.value&&null!=t.value&&!d.value)),b=n((()=>{const e=t.value;return e?Y(J(e,p.value)):[]})),y=n((()=>Boolean(t.value?.some((e=>"direct"===e.method.type))))),_=n((()=>{const e=t.value?.some((e=>"deferred"===e.method.type));return!e})),g=n((()=>Boolean(i.value&&y.value))),k=a.translate("payment.title"),N=e(r,{each:b,children:a=>e(Ke,{paymentLine:a,showCardBrandLabel:!0})}),L=h.value?e(Ge,{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,P=e(s,{when:h,fallback:e(c,{}),children:e(v,{gap:"small-400",children:N})});let I;return(_.value||g.value)&&(I=e(w,{padding:"small-500 none none none",children:e(s,{when:h,fallback:e(c,{}),children:e(v,{gap:"small-400",children:[e(s,{when:_,children:e(f,{children:m})}),e(s,{when:g,children:e(v,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(j,{type:"check",size:"small"}
1),e(f,{children:a.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(le,{id:"payment",label:k,primaryAction:L,primaryContent:P,secondaryContent:I})}function ea(){const{i18n:a}=U(),i=T().purchaseOrderNumber,s=n((()=>i.value?.trim()?`#${i.value}`:void 0)),r=a.translate("review.blocks.no_purchase_order_number_long"),t=s.value,l=t?e(fe,{children:t}):void 0,c=t?void 0:e(f,{children:r}),d=e(Ge,{accessibilityLabel:a.translate("review.blocks.change_purchase_order_number_label"),href:"#payment",children:e(o,{children:a.translate("review.blocks.change_link_label")})}),p=a.translate("review.blocks.purchase_order_number_title");return e(le,{id:"purchaseOrder",label:p,primaryAction:d,primaryContent:l,secondaryContent:c})}function aa(){ze({stage:Be.Complete,id:"Review"});const{checkout:a,i18n:i,shop:r,source:l}=U(),o=r.hasFlagEnabled(W),c=a.configuration.visibility.showAside,{main:{spacing:d}}=N(),{progress:p}=L(),u=t((()=>p("one-page-review-submit")),[p]),m=ce(u),h=Me("review.review_notice_html",i),b=T(),y=b.deliveryNext,_=b.paymentLines,g=Z(),w=$("total"),C=$("paymentLines"),A=a.proposal.facts.delivery??[],j=P(),K=b.buyerIdentity,q=ee(),G=xe(),H=k(),Q=a.configuration.showContactInformation,V=I(),X=n((()=>ae(y.value)||A.length>0&&A.every((e=>null!==e.pickupAddress)))),Y=n((()=>a.isShippingRequired.value&&!X.value)),J=n((()=>K.value?.purchasingCompany?a.isShippingRequired.value&&!j.value:a.isShippingRequired.value)),re=n((()=>Boolean(g.value&&g.value.amount>0)||_.value?.lines.some((e=>e.cost?.amount)))),le=n((()=>Boolean(w.value||C.value||!g.value||re.value))),oe=Fe(),de=n((()=>!K.value?.purchasingCompany||oe.value)),pe=ne(l),ue=ie(),me=S({base:!0,medium:!1}),he=!ue.value||(me??!1),ve=R("Checkout::Dynamic::Render","ORDER_SUMMARY4"),be=e(Se,{condition:!he&&!o,hideDivider:!0,children:[e(Pe,{condition:he&&!o,hideDivider:!!o||void 0,children:[e(v,{gap:"small-400",children:[e(s,{when:()=>pe,children:[e(D,{}),e(x,{blockSize:"base"})]}),e(Ne,{}),e(s,{when:()=>h,children:e(f,{type:"small",color:"subdued",children:e(Le,{})})})]}),e(x,{blockSize:"large-200"}),e(ia,{renderAsCard:o,children:e(na,{buyerIdentity:K,isOrderEditSession:pe,showContactInformation:Q,showPayment:le,showShippingAddress:Y,showAddressReviewItemAction:de,showDeliveryMethod:J,isSplitShipAndPickup:H})})]}),o&&e(Ie,{spacing:he?se(d):"large-400"}),e(s,{when:q,children:e(Se,{condition:he&&!o,children:[e(ke,{placement:"default"}),e(x,{blockSize:"base"})]})}),e(Se,{condition:he&&!o,hideDivider:!0,children:e(z,{section:"review",children:e(B,{section:"review",children:e(v,{gap:"base",children:[o?e(Re,{target:"card",children:e(F,{accessibilityRole:"presentation",display:c?"@media (inline-size >= medium) none, auto":void 0,children:e(De,{})})}):e(De,{}),e(v,{gap:"large-200",children:[e(s,{when:G,children:e(te,{})}),e(s,{when:q,children:e(ke,{placement:"above-pay-button"})}),e(ge,{buttonHidden:V}),e(s,{when:()=>he,children:e(M,{customizations:ve,gap:"large-200"})})]})]})})})})]});return e(E,{onSubmit:m,children:o?e(O,{children:e(F,{accessibilityRole:"presentation",containerName:"s-shell-section",children:be})}):be})}function na({buyerIdentity:i,isOrderEditSession:r,showContactInformation:t,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:[t&&e(Je,{companyName:u.value}),e(a,r?{children:[e(Ue,{}),e(s,{when:l,children:e(Ze,{})}),e(s,{when:m,children:e(ea,{})})]}:{children:[e(s,{when:h,children:e(Qe,{showAdressReviewItemAction:c.value})}),e(s,{when:d,children:e(We,{})}),e(s,{when:v,children:a=>e(Ye,{purchasingCompany:a})}),e(s,{when:l,children:e(Ze,{})}),e(s,{when:m,children:e(ea,{})})]})]})}function ia({children:a,renderAsCard:n=!1}){const{i18n:i}=U(),r=re(),t=i.translate("review.block_title"),l=e(_e,{accessibilityLabel:t,renderAsCard:n,children:a}),o=e(s,{when:()=>!r.value,fallback:l,children:e(K,{children:l})});return n?e(Re,{target:"edgeToEdgeCard",children:o}):o}export{ia as ReviewItems,aa 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.