1/*! For license information please see 9066.01e333e0.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9066],{1680(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},2313(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},5196(e,s,t){t.d(s,{gX:()=>r,ag:()=>i});const a=t.p+"static/media/no-image.f3304f94cebd58816f43.jpg",r=a,i=function(e){let{width:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"object"!==typeof e)return"";const t=function(e){let{width:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&"object"===typeof e&&(e=e.defaultImage||e.image||e.picture||""),!e||"string"!==typeof e)return"";if(e.startsWith("http"))return e.includes("res.cloudinary.com")&&e.includes("/upload/")?((e,s)=>{const t=s?"f_auto,q_auto,w_".concat(s):"f_auto,q_auto";return e.replace("/upload/","/upload/".concat(t,"/"))})(e,s):e;const t=e.replace(/^\//,"");return t.startsWith("uploads/")?"".concat("https://www.bagchee.com/api","/").concat(t):/^[a-f0-9]+-/i.test(t)?"".concat("https://www.bagchee.com/assets/images/sliders","/").concat(t):""}(e,{width:s});if(t)return t;const a=e.isbn13||e.isbn10;return a?"https://books.google.com/books/content?vid=ISBN".concat(a,"&printsec=frontcover&img=1&zoom=1"):""}},5527(e,s,t){t.r(s),t.d(s,{default:()=>f});var a=t(9379),r=t(5043),i=t(7874),n=t(5692),l=t(8326),c=t(2313),d=t(6376),o=t(1680),p=t(8006),x=t(7095),m=t(9350),h=t(416),g=t(2339),u=t(3046),b=t(5196),y=t(579);const f=()=>{var e,s,t,f,j,v,N,w;const k=(0,i.zy)(),{formatPrice:A,symbols:C,currency:_}=((0,i.Zp)(),(0,r.useContext)(h.d)),S=null===(e=k.state)||void 0===e?void 0:e.orderDetails,z=(null===(s=k.state)||void 0===s?void 0:s.bankDetails)||null,F=(null===(t=k.state)||void 0===t?void 0:t.paymentConfirmed)||!1,[P,M]=(0,r.useState)(null);(0,r.useEffect)(()=>{u.A.get("".concat("https://www.bagchee.com/api","/settings/public")).then(e=>{var s;null!==(s=e.data)&&void 0!==s&&s.status&&M(e.data.data)}).catch(()=>{})},[]);const D=(null===S||void 0===S?void 0:S.shipping_details)||{},O=S&&(0,a.A)((0,a.A)({},S),{},{orderNumber:S.orderNumber||S.order_number||"",shippingFirstName:S.shippingFirstName||D.first_name||D.firstName||"",shippingLastName:S.shippingLastName||D.last_name||D.lastName||"",shippingAddress1:S.shippingAddress1||D.address_1||D.address1||D.address||"",shippingAddress2:S.shippingAddress2||D.address_2||D.address2||"",shippingCompany:S.shippingCompany||D.company||"",shippingCity:S.shippingCity||D.city||"",shippingState:S.shippingState||D.state_region||D.state||"",shippingPostcode:S.shippingPostcode||D.postcode||D.pincode||"",shippingCountry:S.shippingCountry||D.country||"",shippingPhone:S.shippingPhone||D.phone||"",paymentType:S.paymentType||S.payment_type||"",shippingCost:Number(null!==(f=null!==(j=S.shippingCost)&&void 0!==j?j:S.shipping_cost)&&void 0!==f?f:0),total:Number(null!==(v=S.total)&&void 0!==v?v:0),items:S.items||S.products||[]}),T=((null===O||void 0===O?void 0:O.status)||"").toLowerCase(),L="approval pending"===T,I="payment pending"===T&&(()=>{const e=((null===O||void 0===O?void 0:O.paymentType)||(null===O||void 0===O?void 0:O.payment_type)||"").toLowerCase();return e.includes("wire")||e.includes("bank transfer")})(),V=((null===O||void 0===O?void 0:O.paymentType)||(null===O||void 0===O?void 0:O.payment_type)||"").toLowerCase().includes("purchase order"),E=((null===O||void 0===O?void 0:O.currency)||_||"USD").toUpperCase(),B=z&&z[E.toLowerCase()]||null;if(!O)return(0,y.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-cream-50",children:(0,y.jsxs)("div",{className:"text-center p-8 bg-white border rounded-xl shadow-sm",children:[(0,y.jsx)("p",{className:"text-gray-500 mb-4 font-montserrat",children:"No order details found."}),(0,y.jsx)(i.N_,{to:"/",className:"text-primary font-bold hover:underline",children:"Back to Home"})]})});return(0,y.jsx)("div",{className:"min-h-screen bg-[#FDFCF8] py-12 px-4 font-body",children:(0,y.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,y.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-bold uppercase tracking-widest text-gray-400 mb-8 font-montserrat",children:[(0,y.jsx)(i.N_,{to:"/",children:(0,y.jsx)("span",{children:"Home"})}),(0,y.jsx)(l.A,{size:10}),(0,y.jsx)("span",{className:"text-text-main",children:"Order Receipt"})]}),(0,y.jsxs)("div",{className:"grid lg:grid-cols-3 gap-8",children:[(0,y.jsx)("div",{className:"lg:col-span-2 space-y-6",children:(0,y.jsxs)("div",{className:"bg-white border border-gray-200 rounded-xl p-8 shadow-sm animate-fadeIn",children:[(0,y.jsxs)("div",{className:"flex items-center gap-4 mb-8",children:[(0,y.jsx)("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center",children:(0,y.jsx)(o.A,{className:"text-primary w-8 h-8"})}),(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"text-[10px] font-black text-primary uppercase tracking-[0.2em]",children:L?"Order Received!":V||F?"Order Confirmed!":"Order Receipt Generated"}),(0,y.jsx)("h1",{className:"text-3xl font-display font-bold text-text-main",children:L||F?"Thank You, ".concat(O.shippingFirstName||"Customer","!"):"Review Your Order, ".concat(O.shippingFirstName||"Customer","!")})]})]}),L&&(0,y.jsxs)("div",{className:"mb-6 p-5 bg-blue-50 border border-blue-200 rounded-xl",children:[(0,y.jsx)("p",{className:"text-sm font-bold text-blue-800 mb-1 uppercase tracking-wide",children:"Payment Pending Review"}),(0,y.jsxs)("p",{className:"text-sm text-blue-700 leading-relaxed",children:["Our team will review your order within ",(0,y.jsx)("strong",{children:"2\u201312 hours"}),". Once approved, you will receive a secure payment link via email to complete the purchase."]})]}),I&&(0,y.jsxs)("div",{className:"mb-6 p-5 bg-amber-50 border border-amber-200 rounded-xl",children:[(0,y.jsx)("p",{className:"text-sm font-bold text-amber-800 mb-3 uppercase tracking-wide",children:"Wire Transfer Instructions"}),(0,y.jsxs)("p",{className:"text-sm text-amber-700 mb-4",children:["Please transfer the total amount to the bank account below. Use your order number",(0,y.jsxs)("strong",{children:[" ",O.orderNumber]})," as the payment reference."]}),B&&(B.name||B.iban)?(0,y.jsxs)("div",{className:"space-y-2 text-sm font-body",children:[B.owner&&(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsx)("span",{className:"font-bold text-amber-900 w-36 shrink-0",children:"Beneficiary:"}),(0,y.jsx)("span",{className:"text-amber-800",children:B.owner})]}),B.name&&(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsx)("span",{className:"font-bold text-amber-900 w-36 shrink-0",children:"Bank Name:"}),(0,y.jsx)("span",{className:"text-amber-800",children:B.name})]}),B.iban&&(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsx)("span",{className:"font-bold text-amber-900 w-36 shrink-0",children:"Account / IBAN:"}),(0,y.jsx)("span",{className:"text-amber-800 font-mono",children:B.iban})]}),B.bic&&(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsx)("span",{className:"font-bold text-amber-900 w-36 shrink-0",children:"Swift / BIC:"}),(0,y.jsx)("span",{className:"text-amber-800 font-mono",children:B.bic})]}),(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsx)("span",{className:"font-bold text-amber-900 w-36 shrink-0",children:"Currency:"}),(0,y.jsx)("span",{className:"text-amber-800",children:E})]})]}):(0,y.jsx)("p",{className:"text-sm text-amber-700",children:"Bank details will be sent to your email shortly."})]}),V&&(0,y.jsxs)("div",{className:"mb-6 p-5 bg-blue-50 border border-blue-200 rounded-xl",children:[(0,y.jsx)("p",{className:"text-sm font-bold text-blue-800 mb-1 uppercase tracking-wide",children:"Purchase Order"}),(0,y.jsx)("p",{className:"text-sm text-blue-700 leading-relaxed",children:"Due. Net 30. Please Pay within 30 days when this invoice is issued."})]}),(0,y.jsxs)("div",{className:"space-y-8",children:[(0,y.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 p-5 bg-gray-50 rounded-xl border border-gray-100",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Order ID"}),(0,y.jsxs)("p",{className:"text-sm font-bold text-text-main",children:["#",O.orderNumber]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Date"}),(0,y.jsx)("p",{className:"text-sm font-bold text-text-main",children:(new Date).toLocaleDateString()})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Status"}),(0,y.jsx)("p",{className:"text-[10px] font-black bg-accent/20 text-orange-600 px-2 py-0.5 rounded-full inline-block",children:"PENDING PAYMENT"})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"text-[10px] font-bold text-gray-400 uppercase",children:"Total Amount"}),(0,y.jsx)("p",{className:"text-sm font-black text-primary",children:A(O.total)})]})]}),(0,y.jsxs)("div",{className:"grid md:grid-cols-2 gap-8 pt-4",children:[(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsxs)("h4",{className:"text-xs font-black text-gray-400 uppercase tracking-widest flex items-center gap-2",children:[(0,y.jsx)(p.A,{size:14})," Shipping Address"]}),(0,y.jsxs)("p",{className:"text-sm text-gray-600 leading-relaxed bg-white border border-gray-50 p-4 rounded-lg shadow-sm",children:[(0,y.jsxs)("span",{className:"font-bold text-text-main block mb-1",children:[O.shippingFirstName," ",O.shippingLastName]}),O.shippingCompany&&(0,y.jsx)("span",{className:"block text-gray-500 text-xs mb-0.5",children:O.shippingCompany}),O.shippingAddress1,(0,y.jsx)("br",{}),O.shippingAddress2&&(0,y.jsxs)(y.Fragment,{children:[O.shippingAddress2,(0,y.jsx)("br",{})]}),O.shippingCity,", ",O.shippingState," ",O.shippingPostcode,(0,y.jsx)("br",{}),O.shippingCountry&&(0,y.jsxs)(y.Fragment,{children:[O.shippingCountry,(0,y.jsx)("br",{})]}),(0,y.jsx)("span",{className:"text-xs font-medium text-gray-400",children:O.shippingPhone})]})]}),(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsxs)("h4",{className:"text-xs font-black text-gray-400 uppercase tracking-widest flex items-center gap-2",children:[(0,y.jsx)(d.A,{size:14})," Payment Method"]}),(0,y.jsxs)("div",{className:"p-4 bg-white border border-gray-50 rounded-lg shadow-sm",children:[(0,y.jsx)("p",{className:"text-sm font-bold text-text-main",children:O.paymentType}),(0,y.jsx)("p",{className:"text-[10px] text-green-600 font-bold mt-1 uppercase italic tracking-tighter",children:"Secure Transaction"})]})]})]})]}),(0,y.jsxs)("div",{className:"mt-12 flex flex-col sm:flex-row gap-4",children:[L&&(0,y.jsxs)(i.N_,{to:"/account/orders",className:"flex-1 bg-primary text-white py-4 rounded-lg font-black text-xs uppercase tracking-[0.2em] hover:bg-primary-dark transition-all shadow-xl flex items-center justify-center gap-3 active:scale-95",children:["View My Orders ",(0,y.jsx)(n.A,{size:16})]}),I&&(0,y.jsxs)(i.N_,{to:"/account/orders",className:"flex-1 bg-primary text-white py-4 rounded-lg font-black text-xs uppercase tracking-[0.2em] hover:bg-primary-dark transition-all shadow-xl flex items-center justify-center gap-3 active:scale-95",children:["View My Orders ",(0,y.jsx)(n.A,{size:16})]}),(V||!L&&!I)&&(0,y.jsxs)(i.N_,{to:"/account/orders",className:"flex-1 bg-text-main text-white py-4 rounded-lg font-black text-xs uppercase tracking-[0.2em] hover:bg-black transition-all shadow-xl flex items-center justify-center gap-3 active:scale-95",children:["View My Orders ",(0,y.jsx)(n.A,{size:16})]})]})]})}),(0,y.jsxs)("div",{className:"lg:col-span-1 space-y-6",children:[(null===P||void 0===P?void 0:P.orderAcceptedPromo)&&(0,y.jsxs)("div",{className:"bg-primary/5 border-2 border-dashed border-primary/20 rounded-xl p-6 relative overflow-hidden animate-fadeIn",children:[(0,y.jsxs)("div",{className:"relative z-10",children:[(0,y.jsx)("h3",{className:"text-primary font-display font-bold text-base mb-1",children:"Exclusive Discount!"}),(0,y.jsx)("p",{className:"text-[11px] text-gray-600 mb-4 leading-relaxed",children:(null===P||void 0===P?void 0:P.promoMessage)||"Thank you for choosing us. Use this code for 10% OFF on your next purchase."}),(0,y.jsxs)("div",{className:"flex items-center gap-2",children:[(0,y.jsx)("div",{className:"flex-1 bg-white border border-primary/30 px-3 py-2 rounded-lg font-display font-bold text-primary text-base tracking-widest shadow-sm text-center",children:(null===P||void 0===P?void 0:P.promoCode)||"SAVE10"}),(0,y.jsx)("button",{onClick:()=>{return e=(null===P||void 0===P?void 0:P.promoCode)||"SAVE10",navigator.clipboard.writeText(e),void g.Ay.success("Coupon copied!");var e},className:"p-2.5 bg-primary text-white rounded-lg hover:bg-primary-dark transition-colors shrink-0",children:(0,y.jsx)(c.A,{size:18})})]})]}),(0,y.jsx)(m.A,{className:"absolute -right-6 -bottom-6 w-24 h-24 text-primary/5 -rotate-12"})]}),(0,y.jsxs)("div",{className:"bg-white border border-gray-200 rounded-xl shadow-sm sticky top-24 overflow-hidden",children:[(0,y.jsxs)("div",{className:"bg-gray-50 px-5 py-4 border-b border-gray-100 flex items-center justify-between font-montserrat",children:[(0,y.jsxs)("h3",{className:"font-bold text-xs text-text-main flex items-center gap-2 uppercase tracking-widest",children:[(0,y.jsx)(x.A,{size:16,className:"text-primary"})," Your Order"]}),(0,y.jsx)("span",{className:"bg-text-main text-white text-[9px] font-bold px-2 py-0.5 rounded-full",children:null===(N=O.items)||void 0===N?void 0:N.length})]}),(0,y.jsxs)("div",{className:"p-5",children:[(0,y.jsx)("div",{className:"space-y-4 max-h-[350px] overflow-y-auto pr-2 custom-scrollbar",children:null===(w=O.items)||void 0===w?void 0:w.map((e,s)=>{var t,a,r;return(0,y.jsxs)("div",{className:"flex gap-4 group",children:[(0,y.jsx)("div",{className:"w-14 h-18 bg-gray-50 border border-gray-100 rounded overflow-hidden shrink-0",children:(0,y.jsx)("img",{src:(r=e.image||(null===(t=e.product)||void 0===t?void 0:t.defaultImage)||(null===(a=e.product_id)||void 0===a?void 0:a.default_image),r?r.startsWith("http")?r:"".concat("https://www.bagchee.com/api").concat(r):b.gX),className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110",alt:"product"})}),(0,y.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,y.jsx)("h4",{className:"text-xs font-bold text-text-main line-clamp-2 group-hover:text-primary transition-colors leading-snug",children:e.name}),(0,y.jsxs)("p",{className:"text-[10px] text-gray-400 mt-1 uppercase font-bold tracking-tighter",children:["Quantity: ",e.quantity]}),(0,y.jsxs)("p",{className:"text-sm font-black text-text-main mt-1",children:[" ",C[O.currency]||C[_],Number(e.price).toLocaleStr
2ing("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})]})]},s)})}),(0,y.jsxs)("div",{className:"mt-6 pt-6 border-t border-gray-100 space-y-3 font-montserrat",children:[(0,y.jsxs)("div",{className:"flex justify-between text-[11px] font-bold text-gray-400 uppercase tracking-widest",children:[(0,y.jsx)("span",{children:"Subtotal"}),(0,y.jsxs)("span",{className:"text-text-main",children:[C[O.currency]||C[_],(O.total-O.shippingCost).toLocaleString(void 0,{minimumFractionDigits:2})]})," "]}),(0,y.jsxs)("div",{className:"flex justify-between text-[11px] font-bold text-gray-400 uppercase tracking-widest",children:[(0,y.jsx)("span",{children:"Shipping"}),(0,y.jsx)("span",{className:"text-text-main",children:0===O.shippingCost?"FREE":"".concat(C[O.currency]||C[_]).concat(O.shippingCost.toFixed(2))})]}),(0,y.jsxs)("div",{className:"flex justify-between items-center pt-4 border-t border-gray-200",children:[(0,y.jsx)("span",{className:"text-sm font-black text-text-main uppercase tracking-[0.1em]",children:"Total Pay"}),(0,y.jsxs)("div",{className:"text-right leading-none",children:[(0,y.jsxs)("span",{className:"text-2xl font-black text-primary",children:[C[O.currency]||C[_],O.total.toLocaleString("en-US",{minimumFractionDigits:2})]}),(0,y.jsxs)("p",{className:"text-[8px] text-gray-400 font-bold uppercase tracking-widest mt-1",children:[O.currency," "]})]})]})]})]})]})]})]})]})})}},6376(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},7095(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]])},9350(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]])}}]); 3//# sourceMappingURL=9066.01e333e0.chunk.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.