PageSourceSearch

https://www.misfitsmarket.com/assets/OrderDetails-DpvB-9i9.js

js misfitsmarket.com collected 2026-09-24 17:21:53 UTC 23,876 bytes, 2 lines download raw bytes

1import{aN as Ne,j as e,G as Te,aE as $e,B as te,O as ye,P as m,bk as Ee,r as u,k as Pe,c8 as Le,c9 as Be,t as ae,g as ke,U as _e,X as qe,x as ze,y as We,p as J,ca as Ye,cb as Ke,cc as Ue,cd as He,ce as Ve,c as ve,aZ as Qe,A as G,f as X,cf as Ge,cg as Je,l as Xe,n as Ce,b_ as Q,ch as Ze,b3 as es,bd as ss,c0 as ts,ci as as,E as is,cj as rs,ck as ns,L as ds,C as ge,z as be,a2 as ls}from"./index-CVUXbWDK.js";import{O as re,F as cs,a as os}from"./FeesModal-Dq943GR1.js";import{S as xs}from"./Stepper-BS2PZr_i.js";import{B as ms}from"./BuyItAgainCTA-DQosHnGr.js";import{D as ps}from"./DriverTipsAlert-shekvOFS.js";import{C as hs,S as us,a as fs}from"./index-DMc4EdnI.js";import{C as js}from"./CancelOrderModal-yyOwEEuf.js";import{B as gs}from"./Breadcrumbs-CcG9y1mh.js";import"./subscriptionData-Bb_0JLP1.js";import"./Select-BdXY5WkV.js";import"./BackButton-Biq-2jqL.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new r.Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="659bb649-b6f8-424b-967e-d531e4f766c6",r._sentryDebugIdIdentifier="sentry-dbid-659bb649-b6f8-424b-967e-d531e4f766c6")}catch{}})();(function(){var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r._sentryModuleMetadata=r._sentryModuleMetadata||{},(function(){var i,t=new r.Error().stack,c=r._sentryModuleMetadata[t]||{},o={"_sentryBundlerPluginAppKey:mm-sentry-boysenberry":!0},n={};for(i in c)c.hasOwnProperty(i)&&(n[i]=c[i]);for(i in o)o.hasOwnProperty(i)&&(n[i]=o[i]);r._sentryModuleMetadata[t]=n})()})();function Fe({cancelOrderInfoModal:r,setCancelOrderInfoModal:i}){const{accountHelp:t}=Ne(),c=()=>{ye(i)};return e.jsx(Te,{open:r,onClose:c,children:e.jsxs("div",{className:"text-center md:p-40",children:[e.jsx("div",{className:"mx-auto mb-10 w-[75px]",children:e.jsx($e,{})}),e.jsx("h2",{className:"text-heading-sm mb-20",children:"We're packing your box!"}),e.jsxs("div",{className:"mx-auto max-w-[400px]",children:[e.jsx("p",{className:"pb-30 font-grotesk-bold",children:"Which means your order is no longer eligible for cancellation."}),e.jsxs("p",{children:["You can read more about how to manage your account"," ",e.jsx("a",{className:"link",target:"_blank",rel:"noopener noreferrer",href:t,children:"here"}),"."]})]}),e.jsx("div",{className:"text-body-sm mx-auto mt-25 mb-15 md:w-[380px]",children:e.jsx(te,{size:"md",onClick:c,children:"Close"})})]})})}Fe.propTypes={cancelOrderInfoModal:m.bool.isRequired,setCancelOrderInfoModal:m.func.isRequired};const ne="flex items-center gap-10 rounded-full bg-white px-15 py-10 font-grotesk-bold";function de({boxNumber:r,chargeID:i,displayCancelOrder:t,displayReportIssue:c,orderID:o}){const n=Ee(),{customerCare:a,faqs:C,helpCenter:F}=Ne(),[b,w]=u.useState(!1),N=()=>{w(!0),ae("late cancel start click",{pathname:n.pathname})},s=(d,f)=>{var S;window.isNativeApp&&(d.preventDefault(),(S=window.ReactNativeWebView)==null||S.postMessage(JSON.stringify({navigate:"OrderLink",url:f})))};return e.jsxs("div",{className:"mt-20 rounded-md bg-off-white px-20 py-15",children:[e.jsx("p",{className:"mb-15 font-grotesk-bold",children:"Need Help?"}),e.jsxs("div",{className:"mx-auto flex w-full flex-wrap items-center gap-10 text-center",children:[c&&e.jsxs(Pe,{className:ne,to:`/account/orders/details/${o}/${r}/report`,children:[e.jsx(Le,{}),"Report Issue"]}),t&&e.jsxs("button",{type:"button",className:ne,onClick:N,children:[e.jsx(hs,{}),"Cancel Order"]}),e.jsxs("a",{className:ne,href:a,onClick:d=>s(d,a),target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Be,{}),"Contact Us"]}),e.jsx("a",{className:"link mx-10",href:C,onClick:d=>s(d,C),target:"_blank",rel:"noopener noreferrer",children:"FAQs"}),e.jsx("a",{className:"link mx-10",href:F,onClick:d=>s(d,F),target:"_blank",rel:"noopener noreferrer",children:"Help Center"})]}),t&&e.jsx(js,{cancelOrderModal:b,setCancelOrderModal:w,chargeID:i})]})}de.propTypes={boxNumber:m.number.isRequired,chargeID:m.number.isRequired,displayCancelOrder:m.bool,displayReportIssue:m.bool,orderID:m.number.isRequired};de.defaultProps={displayCancelOrder:!0,displayReportIssue:!0};function we({boxNumber:r,cancelledOrder:i,isImperfectLegacy:t,multiShip:c,openProductModal:o,order:n,shipment:a}){var _,q,T,se,z;const{data:C={}}=ke(),{featureCanLateCancel:F}=C.featureFlags??{},b=_e(),w=qe.useMediaQuery({maxWidth:(_=b==null?void 0:b.screens)==null?void 0:_.md}),[N,s]=u.useState(!1),{customerDrinksOrderFeedback:d={},customerOrderFeedback:f={}}=a,{chargeID:S,subtotal:R,tipAmount:W,total:O}=n.charge??{},{subtotal:$,total:M}=n.drinksCharge??{},{tipAmountRefunded:E}=n.refundHistory,P=R+(n.hasDrinks?$:0),D=O+(n.hasDrinks?M:0),{shippingStatus:h}=ze(a.shippingStatus),L=We(a.shippingStatus,a.deliverDate),y=h==="Scheduled",k=h==="Shipped",g=h==="Delivered",v=h==="Confirmed",I=h==="Processing",A=h==="Canceled",j=[{id:1,name:"Confirmed",status:y?"upcoming":"done",subtext:(q=a==null?void 0:a.createdAt)!=null&&q.date?`${y?"Est ":""}${J(a.createdAt.date)}`:""},{id:2,name:"Processing",status:I||k||g?"done":"upcoming",subtext:""},{id:3,name:"Shipped",status:k||g?"done":"upcoming",subtext:""},{id:4,name:"Delivered",status:g?"done":k&&"in progress"||"upcoming",subtext:a!=null&&a.deliverDate?`${g?"":"Est "}${J(a.deliverDate)}`:""}],p=Ye(f,d),Y=Ke(f,d),Z=Ue(f,d),B=He(f,d),ee=(v||y)&&!i&&F,K=((T=a==null?void 0:a.createdAt)==null?void 0:T.date)&&Ve(a.createdAt.date)&&a.items.length>0&&!y&&!v&&!A&&!t,U=()=>{s(!0),ae("late cancel ineligible info click")};return e.jsxs("div",{className:"mt-30",children:[e.jsxs("div",{className:ve("mb-20",{"items-center justify-between md:grid md:grid-cols-[1fr_200px]":t}),children:[e.jsx("div",{className:"flex-row-reverse items-center justify-end gap-10 md:flex",children:e.jsxs("span",{className:"mt-5 md:mt-0",children:[e.jsx("h3",{className:"text-body-lg font-grotesk-bold",children:h}),c&&e.jsxs("p",{className:"text-body-md font-grotesk-bold",children:["Box ",r]})]})}),t&&e.jsx("div",{className:"mt-20 md:mt-0 md:w-[200px]",children:e.jsx(te,{as:"link",id:"orderDetailsTrack",size:"md",to:`/account/orders/details/${n.id}/${a.shipmentNumber}/track`,onClick:()=>ae("order track click"),children:"Track My Order"})})]}),!i&&e.jsxs(e.Fragment,{children:[!t&&e.jsxs("div",{className:"flex flex-col items-stretch gap-20 lg:grid lg:grid-cols-[1fr_200px] lg:gap-50",children:[e.jsx("div",{className:"text-body-sm",children:e.jsx(xs,{orientation:w?"vertical":"horizontal",steps:j,containerWidth:w?"260px":"100%"})}),!y&&e.jsx("div",{className:"text-body-sm",children:a.hasDrinks?e.jsx(te,{...!window.isNativeApp&&{as:"a"},to:a.trackingUrl,id:"wineOrderDetailsTrack",size:"md",target:"_blank",rel:"noopener noreferrer",onClick:()=>{var l;window.isNativeApp&&((l=window.ReactNativeWebView)==null||l.postMessage(JSON.stringify({navigate:"Tracking",url:a.trackingUrl})))},children:"Track"}):e.jsx(te,{as:"link",id:"orderDetailsTrack",size:"md",to:`/account/orders/details/${n.id}/${a.shipmentNumber}/track`,onClick:()=>ae("order track click"),children:"Track My Order"})})]}),I&&e.jsxs("button",{type:"button",className:"text-body-sm mt-10 flex items-center",onClick:U,children:["Order not eligible for cancellation"," ",e.jsx(Qe,{width:18,className:"ml-10 text-black"})]})]}),e.jsx(de,{displayReportIssue:K,displayCancelOrder:ee,orderID:n.id,chargeID:S,boxNumber:r}),p&&e.jsx("div",{className:"mt-30",children:e.jsxs(G,{variant:"success",children:[Y&&e.jsx("span",{className:"block font-grotesk-bold",children:"Item Issue Submitted"}),Z&&e.jsxs("span",{className:"block font-grotesk-bold",children:["Delivery Issue Submitted #",n.id]}),B&&e.jsx("span",{className:"block font-grotesk-bold",children:'"Other" Issue Submitted'}),e.jsx("span",{children:"Our Customer Care team will help resolve your issue(s) via email."})]})}),!L&&r===1&&e.jsx(ps,{tipAmount:W,chargeID:S,tipAmountRefunded:E,orderTotal:D,orderSubtotal:P}),e.jsxs("div",{className:"mt-30",children:[i?e.jsx(G,{variant:"error",children:"You will not be charged."}):e.jsxs(e.Fragment,{children:[a.hasRefundsApplied&&e.jsx(G,{variant:"error",children:"Refunds have been applied"}),a.hasOOSItems&&e.jsx(G,{variant:"error",children:"You were not charged for any out of stock item(s)"})]}),e.jsx(X,{}),n.productID===6?a.items.length>0&&e.jsxs("div",{children:[C.marketplaceOpen&&!window.isNativeApp&&e.jsxs(e.Fragment,{children:[e.jsx(ms,{}),e.jsx(X,{})]}
1),a.items.map(l=>e.jsxs("div",{role:"button",tabIndex:"0",onClick:()=>o(l),onKeyDown:()=>o(l),className:"w-full",children:[e.jsx(re,{item:l,cancelled:A,totalLoyaltyPointsRefunded:0,refundedCredits:Je(l,f),issueReported:Ge(l,f,d),isImperfectLegacy:t}),e.jsx(X,{})]},l.id)),a.hasDrinks&&e.jsxs("div",{className:"text-body-xs my-20",children:[e.jsx("p",{children:"You must be 21+ to purchase this item. Valid ID required at delivery. Wine is sold and ships separately and does not apply to your grocery order."}),e.jsx("p",{children:"All wine orders are reviewed, accepted, and fulfilled by Hemispheres, LLC, 8418 S Lac Jac, Parlier, CA 93648."})]})]}):e.jsxs("div",{children:[e.jsxs("p",{className:"text-body-sm font-grotesk-bold",children:["Your ",n.productID===5?"Madness":"Mischief"," box"]}),((se=a.items)==null?void 0:se.length)>0?a.items.map(l=>e.jsx("div",{role:"button",tabIndex:"0",onClick:()=>o(l),onKeyDown:()=>o(l),className:"w-full",children:e.jsx(re,{item:l.model,isImperfectLegacy:t,baseBox:!0})},l.id)):e.jsxs("p",{className:"text-body-sm",children:["A mixed variety of ",n.productID===5?"14":"12"," types of produce."]}),((z=n==null?void 0:n.addons)==null?void 0:z.length)>0&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-[55px] font-grotesk-bold",children:"Marketplace picks"}),n.addons.map(l=>e.jsx("div",{role:"button",tabIndex:"0",onClick:()=>o(l),onKeyDown:()=>o(l),className:"w-full",children:e.jsx(re,{item:l.model,isImperfectLegacy:t})},l.id))]})]})]}),e.jsx(Fe,{cancelOrderInfoModal:N,setCancelOrderInfoModal:s})]},a.shipmentID)}we.propTypes={boxNumber:m.number.isRequired,cancelledOrder:m.bool.isRequired,isImperfectLegacy:m.bool.isRequired,multiShip:m.bool.isRequired,openProductModal:m.func.isRequired,order:m.shape({}).isRequired,shipment:m.shape({}).isRequired};const x="text-body-md grid grid-cols-2 justify-between";function Se({featureCanAddDriverTips:r,isImperfectLegacy:i,order:t}){var ue,fe;const{isMisfitsTheme:c}=Xe(),{data:o={}}=Ce(),{last4:n}=(o==null?void 0:o.billing)??{},[a,C]=u.useState(!1),[F,b]=u.useState(!1),[w,N]=u.useState(!1),[s,d]=u.useState(!1),{creditsForLoyaltyRefunds:f,tipAmountRefunded:S,totalRefund:R,totalStoreCreditFromAutomatedRefunds:W}=t.refundHistory??{},{basebox:O,coldKeeperFee:$}=t.charge??{},{alcoholDiscountAmount:M,alcoholDiscountPercentage:E,alcoholFeeWaived:P,alcoholServiceFee:D,coldKeeperFee:h,coldKeeperFeeWaived:L,creditCardAmountRefunded:y,credits:k,creditsRefunded:g,discountAmount:v,discountCode:I,driverTip:A,ebtSnapRefunded:j,ebtSnapUsed:p,frozenFee:Y,frozenFeeWaived:Z,loyaltyPointsDiscount:B,loyaltyPointsEarned:ee,loyaltyPointsRefunded:K,nonSnapEligibleTotal:U,operationsFee:_,refundToOriginalPaymentMethod:q,shippingFee:T,shippingFeeWaived:se,snapEligibleTotal:z,subtotal:l,total:H,totalSavings:le,totalTaxes:ce}=t.receipt??{},oe=t!=null&&t.id?t.shipments.length>0&&t.shipments[0].shippingStatus==="CANCELLED"||t.drinksShipments.length>0&&t.drinksShipments[0].shippingStatus==="CANCELLED":!1,xe=parseFloat(R)+W+f,De=!oe&&(parseFloat(q)>0||parseFloat(g)>0||K>0),Ie=v>0&&I&&I!=="",Oe=((ue=t.shipments[0])==null?void 0:ue.carrier)==="dbi",Re=p>0&&H>0,ie=p>0;u.useEffect(()=>{var je;if((je=t==null?void 0:t.shipments)!=null&&je.length){const Ae=t.shipments.flatMap(V=>V.items);C(Ae.some(V=>V==null?void 0:V.coldPacked))}},[t==null?void 0:t.shipments]);const me=t.hasDrinks,pe=a&&!i&&!Oe,he=_>0,Me=p>0?(parseFloat(H)+(p??0)).toFixed(2):parseFloat(H).toFixed(2);return e.jsxs("div",{id:"orderDetails",children:[e.jsxs("div",{className:"grid gap-10",children:[ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:x,"data-testid":"order-summary-snap-eligible-items-total",children:[e.jsx("p",{children:"SNAP-Eligible Items"}),e.jsxs("p",{className:"text-right",children:["$",z==null?void 0:z.toFixed(2)]})]}),e.jsxs("div",{className:x,"data-testid":"order-summary-non-snap-eligible-items",children:[e.jsx("p",{children:"Non-SNAP-Eligible Items"}),e.jsxs("p",{className:"text-right",children:["$",U==null?void 0:U.toFixed(2)]})]})]}),!ie&&t.productID===6&&e.jsxs("div",{className:x,children:[e.jsx("p",{children:"Subtotal"}),e.jsxs("p",{className:"text-right",id:"subtotal",children:["$",l]})]}),!ie&&t.productID!==6&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:x,children:[e.jsx("p",{children:"Base box"}),e.jsxs("p",{children:["$",O==null?void 0:O.toFixed(2)]})]}),l>0&&e.jsxs("div",{className:x,children:[e.jsx("p",{children:"Marketplace subtotal"}),e.jsxs("p",{className:"text-right",id:"subtotal",children:["$",l]})]})]}),t.shipments.length>0&&e.jsxs("div",{className:x,children:[e.jsx("p",{children:"Shipping"}),e.jsx("p",{className:"text-right",id:"shipping",children:T>0&&!se?`$${T==null?void 0:T.toFixed(2)}`:e.jsx("span",{className:"text-brand-primary font-grotesk-bold",children:"FREE"})})]}),he&&e.jsxs("div",{className:x,"data-testid":"operations-fee",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("p",{children:"Operations Fee"}),e.jsx("button",{"aria-label":"Operations fee information",onClick:()=>N(!0),type:"button",children:e.jsx(Q,{className:"mb-[2px]",width:18})})]}),e.jsxs("p",{className:"text-right",children:["$",_.toFixed(2)]})]}),(Y>0||Z)&&e.jsxs("div",{className:x,"data-testid":"frozen-fee",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("p",{children:"Frozen Packaging"}),e.jsx("button",{"aria-label":"Frozen Packaging fee information",onClick:()=>d(!0),type:"button",children:e.jsx(Q,{className:"mb-[2px]",width:18})})]}),e.jsx("p",{className:"text-right",children:Z?e.jsx("span",{className:"text-brand-primary font-grotesk-bold",children:"WAIVED"}):`$${Y.toFixed(2)}`}),e.jsx(Ze,{open:s,handleClose:()=>d(!1),frozenFee:Y})]}),pe&&e.jsxs("div",{className:x,"data-testid":"cold-pack-fee",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("p",{children:"Cold Pack Fee"}),e.jsx("button",{"aria-label":"Cold pack fee information",onClick:()=>N(!0),type:"button",children:e.jsx(Q,{className:"mb-[2px]",width:18})})]}),e.jsx("p",{className:"text-right",children:L?e.jsx("span",{className:"text-brand-primary font-grotesk-bold",children:"WAIVED"}):`$${(fe=h||$)==null?void 0:fe.toFixed(2)}`})]}),me&&e.jsxs("div",{className:x,"data-testid":"alcohol-service-fee",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("p",{children:"Alcohol Service Fee"}),e.jsx("button",{"aria-label":"Alcohol service fee information",onClick:()=>N(!0),type:"button",children:e.jsx(Q,{className:"mb-[2px]",width:18})})]}),e.jsx("p",{className:"text-right",id:"alcoholServiceFee",children:P?e.jsx("span",{className:"text-brand-primary font-grotesk-bold",children:"WAIVED"}):`$${D==null?void 0:D.toFixed(2)}`})]}),r&&e.jsxs("div",{className:x,children:[e.jsxs("div",{className:"flex gap-5",children:[e.jsxs("p",{children:[S>0?"Updated ":"","Driver Tip"]}),e.jsx("button",{type:"button",onClick:()=>b(!F),children:e.jsx(Q,{className:"-mt-[4px] w-[18px] text-black"})})]}),e.jsxs("p",{className:"text-right",id:"driverTip",children:["$",(A||0).toFixed(2)]})]}),Ie&&e.jsxs("div",{className:x,children:[e.jsxs("p",{children:["Discount ",e.jsxs("span",{className:"text-brand-primary",children:["(",I,")"]})]}),e.jsxs("p",{className:"text-right",children:["-$",v==null?void 0:v.toFixed(2)]})]}),B>0&&e.jsxs("div",{className:x,children:[e.jsx("p",{children:"Misfits Perks"}),e.jsxs("p",{className:"text-right",children:["- $",B==null?void 0:B.toFixed(2)]})]}),M>0&&e.jsxs("div",{className:x,children:[e.jsxs("p",{className:"flex",children:["Alcohol Savings (-",E,"%)"]}),e.jsxs("p",{className:"text-right",children:["-$",M.toFixed(2)]})]}),ce!=null&&e.jsxs("div",{className:x,"data-testid":"tax",children:[e.jsx("p",{children:"Tax"}),e.jsxs("p",{className:"text-right",id:"tax",children:["$",ce]})]}),k>0&&e.jsxs("div",{className:ve(x,"text-brand-primary"),children:[e.jsx("p",{children:"Credits"}),e.jsxs("p",{className:"text-right",id:"credits",children:["- $",k==null?void 0:k.toFixed(2)]})]})]}),e.jsx(X,{}),e.jsxs("div",{className:"text-body-md grid grid-cols-2 justify-between","data-testid":"order-summary-total",children:[e.jsxs("p",{className:"font-grotesk-bold",children:["Total ",oe&&xe>0&&"Charged"]}),e.jsxs("p",{className:"text-right font-grotesk-bold",id:"total",children:["$",Me]})]}),Re&&e.jsxs("div",{"data-testid":"order-summary-payment-split",className:"flex flex-col gap-10",children:[e.jsx("p",{className:"mt-20 font-grotesk-bold",children:"Your Payment Split"}),p>0&&e.jsxs("div",{className:x,children:[e.jsx("p",{children:"EBT Payment"}),e.jsxs("p",{className:"text-right",children:["$",p.toFixed(2)]})]}),j>0&&e.jsxs("div",{className:"text-body-md grid grid-cols-2 justify-between bg-malt p-5 if:bg-off-white",children:[e.jsx("p",{children:"Refunded to EBT Card"}),e.jsxs("p",{className:"text-right text-error",children:["$",j.toFixed(2)]})]}),H>0&&e.jsxs("div",{className:x,children:[e.jsxs("p",{children:["Credit Card",n?` *${n}`:""," Payment"]}),e.jsxs("p",{className:"text-right",children:["$",parseFloat(H).toFixed(2)]})]}),y>0&&e.jsxs("div",{className:"text-body-md grid grid-cols-2 justify-between bg-malt p-5 if:bg-off-white",children:[e.jsx("p",{children:"Refunded to Credit Card"}),e.jsxs("p",{className:"text-right text-error",children:["$",y.toFixed(2)]})]})]}),De&&e.jsxs("div",{className:"bg-malt-off-white my-15 rounded-md p-10",children:[parseFloat(g)>0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("p",{children:"Refunded to credit balance"}),e.jsxs("p",{className:"text-right text-error",children:["$",g]})]}),parseFloat(q)>0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("p",{children:"Refunded to original payment method"}),e.jsxs("p",{"data-testid":"cc-refund",className:"text-right text-error",children:["$",q]})]}),K>0&&e.jsxs("div",{className:"flex justify-between","data-testid":"loyalty-points-refund",children:[e.jsx("p",{children:"Refunded to Misfits Perks"}),e.jsxs("p",{className:"text-right text-error",children:[K," pts"]})]})]}),i?e.jsx("div",{className:"mt-20",children:e.jsxs(G,{children:['For detailed pricing, look for your order 
1confirmation email ("Your order is confirmed!") and reach out to'," ",e.jsx("a",{className:"link",href:c?es.customerCare:ss.customerCare,target:"_blank",rel:"noopener noreferrer",children:"Customer Care"})," ","if you have any questions. All future orders will include itemized prices per usual."]})}):e.jsxs(e.Fragment,{children:[e.jsx(X,{}),e.jsxs("div",{className:"mx-auto flex flex-col items-center justify-center gap-10 md:w-[400px] md:flex-row md:gap-40",children:[le>0&&xe===0&&e.jsxs("div",{className:"text-body-xs flex items-center gap-10",children:[e.jsx(us,{isMisfits:c}),e.jsxs("p",{className:"font-grotesk-bold",children:["You're saving"," ",e.jsxs("span",{className:"text-brand-primary",children:["$",parseFloat(le).toFixed(2)]})]})]}),ee>0&&e.jsxs("div",{className:"text-body-xs flex items-center gap-10",children:[e.jsx(fs,{isMisfits:c}),e.jsxs("p",{className:"font-grotesk-bold",id:"loyaltyPointsTxt",children:["You're earning"," ",e.jsxs("span",{className:"text-brand-primary",children:[ee," Points"]})]})]})]})]}),e.jsx(ts,{open:F,setOpen:b}),e.jsx(cs,{alcoholServiceFee:{display:me,fee:D,waived:P},coldPackFee:{display:pe,fee:h||$,proteinMinimum:void 0,waived:L},handleClose:()=>N(!1),open:w,operationsFee:{display:he,fee:_}})]})}Se.propTypes={featureCanAddDriverTips:m.bool.isRequired,isImperfectLegacy:m.bool.isRequired,order:m.shape({}).isRequired};const bs=[{id:1,title:"My Orders",url:"/account/orders"}],Ns=r=>{const i=r.drinksShipments[0]||{};return i.hasDrinks=!0,i.itemCount=r.drinksBundles.concat(r.drinksItems).length??0,i.items=r.drinksBundles.concat(r.drinksItems)??[],i.customerDrinksOrderFeedback=r.customerDrinksOrderFeedback,i.shipmentID=i.drinksOrderID,i.createdAt={date:r.createdOn},i};function Ms(){var g,v,I,A;const{id:r}=as(),i=is(),{data:t={}}=ke(),{data:c={}}=Ce(),{data:o={},isLoading:n}=rs({orderID:r}),{featureCanAddDriverTips:a}=t.featureFlags??{},{firstName:C,lastName:F}=(c==null?void 0:c.shippingAddr)??{},{expMonth:b,expYear:w,last4:N}=(c==null?void 0:c.billing)??{},s=(o==null?void 0:o.orderInfo)??{},d=(g=s==null?void 0:s.shipAddr)==null?void 0:g.split("  "),[f,S]=u.useState([]),[R,W]=u.useState(!1),[O,$]=u.useState(!1),[M,E]=u.useState(!1),[P,D]=u.useState({}),h=(s==null?void 0:s.source)==="imperfect",L=j=>{ls(E),D(j)},y=()=>{ye(E),D({})},k=()=>O?"You will not be charged":`Charged ${J(s.createdOn)}`;return u.useEffect(()=>{if(s.shipments||s.drinksShipments){W(s.shipments.length+s.drinksShipments.length>1),$(s.shipments.length>0&&s.shipments[0].shippingStatus==="CANCELLED"||s.drinksShipments.length>0&&s.drinksShipments[0].shippingStatus==="CANCELLED");const j=s.shipments.map(p=>({...p,items:ns(p.items||[])}));if(s.hasDrinks){const p=Ns(s);j.push(p)}S(j)}},[s]),u.useEffect(()=>{!n&&!(s!=null&&s.shipments)&&i("/account/orders")},[n]),!s.shopOrderNum&&!c.id||n||!(s!=null&&s.shipments)?e.jsx("div",{className:"flex h-[300px] items-center justify-center",children:e.jsx(ds,{width:"60px"})}):e.jsxs("section",{children:[e.jsx(gs,{breadcrumbs:bs}),e.jsxs(ge,{marginClasses:"-mx-20 mt-20 rounded-none! md:mx-0 md:rounded-lg!",children:[e.jsx("div",{className:"text-body-sm -mx-20 -mt-30 block rounded-tl-lg rounded-tr-lg bg-off-white px-20 py-5 lg:-mx-30 lg:-mt-30 lg:px-30 if:bg-oat",children:e.jsxs("p",{children:["Order #",s.shopOrderNum,R&&e.jsxs("span",{className:"text-body-sm",children:[" ","| ",e.jsx("span",{className:"font-grotesk-bold",children:"This order shipped in multiple boxes."})]})]})}),e.jsxs("div",{children:[R&&e.jsxs("h3",{className:"text-body-lg mt-30 font-grotesk-bold",children:[J(s.shipments[0].deliverDate)," Order"]}),f.map((j,p)=>e.jsx(we,{shipment:j,order:s,boxNumber:p+1,openProductModal:L,cancelledOrder:O,multiShip:R,isImperfectLegacy:h},j.shipmentID))]}),e.jsx(Se,{order:s,isImperfectLegacy:h,featureCanAddDriverTips:a})]}),e.jsx(ge,{marginClasses:"mt-20 text-body-sm -mx-20 md:mx-0 rounded-none! md:rounded-lg!",children:e.jsxs("div",{className:"grid-cols-2 justify-between md:grid",children:[e.jsxs("div",{className:"mb-20",children:[e.jsx("p",{className:"mb-5 font-grotesk-bold",children:"Shipping Address"}),e.jsxs("div",{children:[e.jsxs("p",{children:[C," ",F]}),e.jsx("p",{children:d==null?void 0:d[0]}),e.jsx("p",{children:d==null?void 0:d[1]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-5 font-grotesk-bold",children:"Payment Method"}),e.jsxs("div",{className:"gap-30 md:flex",children:[e.jsxs("div",{children:[e.jsx("p",{children:"Credit Card"}),e.jsxs("p",{children:["Card: **** **** **** ",N]}),e.jsxs("p",{className:"mb-10",children:["Expires on ",b,"/",w]}),!h&&e.jsx(be,{variant:"dark",children:k().toUpperCase()})]}),((v=s==null?void 0:s.charge)==null?void 0:v.ebtLast4)&&e.jsxs("div",{className:"mt-15 md:mt-0","data-testid":"ebt-charge-tag",children:[e.jsx("p",{children:"EBT"}),e.jsxs("p",{className:"mb-10",children:["Card: **** **** **** ",(I=s==null?void 0:s.charge)==null?void 0:I.ebtLast4]}),((A=s==null?void 0:s.charge)==null?void 0:A.ebtChargeDate)&&e.jsxs(be,{variant:"dark",children:["CHARGED"," ",e.jsx("span",{className:"uppercase",children:J(s.charge.ebtChargeDate).toUpperCase()})]})]})]})]})]})}),M&&e.jsx(os,{item:P,closeProductModal:y,productModal:M})]})}export{Ms as Component};
2//# sourceMappingURL=OrderDetails-DpvB-9i9.js.map

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.