PageSourceSearch

https://doctorpile.com/assets/cart-B-gSur3z.js

js doctorpile.com collected 2026-09-28 12:12:46 UTC 3,704 bytes, 1 lines download raw bytes

1import{d,aj as x,j as e,as as u,B as n,ak as h,L as m}from"./index-xiHmsbwW.js";import{B as j,S as p}from"./Section-D-jqfQ8n.js";import{C as r}from"./card-D-F8_TGl.js";import{I as c}from"./indian-rupee-DrB8Xh6k.js";import{P as f,T as N}from"./trash-2-cejitHE0.js";import"./chevron-right-C8VU1lGd.js";const b=[["path",{d:"M5 12h14",key:"1ays0h"}]],g=d("minus",b);function z(){const{items:t,subtotal:l,setQty:a,remove:o}=x();return e.jsxs(e.Fragment,{children:[e.jsx(j,{items:[{label:"Home",to:"/"},{label:"Products",to:"/products"},{label:"Cart"}]}),e.jsx(p,{children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Your Cart"}),t.length===0?e.jsxs(r,{className:"p-10 text-center",children:[e.jsx(u,{className:"size-10 text-muted-foreground mx-auto mb-3"}),e.jsx("p",{className:"text-muted-foreground",children:"Your cart is empty."}),e.jsx(n,{asChild:!0,className:"mt-5",children:e.jsx("a",{href:h,className:"block",children:"Browse Products"})})]}):e.jsxs("div",{className:"grid md:grid-cols-[1.5fr_1fr] gap-6",children:[e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsxs(r,{className:"p-4 flex items-center gap-4",children:[e.jsx("div",{className:"size-20 shrink-0 rounded-lg bg-surface flex items-center justify-center p-2 border",children:e.jsx("img",{src:s.image,alt:s.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx(m,{to:"/products/$slug",params:{slug:s.slug},className:"font-semibold hover:text-primary line-clamp-2",children:s.name}),e.jsxs("div",{className:"mt-1 text-sm text-primary font-bold flex items-center",children:[e.jsx(c,{className:"size-3.5"}),s.price.toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex items-center gap-1 border rounded-md",children:[e.jsx("button",{className:"p-1.5 hover:bg-surface",onClick:()=>a(s.slug,s.quantity-1),"aria-label":"Decrease",children:e.jsx(g,{className:"size-3.5"})}),e.jsx("span",{className:"min-w-6 text-center text-sm font-semibold",children:s.quantity}),e.jsx("button",{className:"p-1.5 hover:bg-surface",onClick:()=>a(s.slug,s.quantity+1),"aria-label":"Increase",children:e.jsx(f,{className:"size-3.5"})})]}),e.jsx("button",{onClick:()=>o(s.slug),className:"p-2 rounded-md text-muted-foreground hover:text-destructive hover:bg-surface","aria-label":"Remove",children:e.jsx(N,{className:"size-4"})})]},s.slug))}),e.jsxs(r,{className:"p-6 h-fit sticky top-28",children:[e.jsx("h3",{className:"font-bold text-lg",children:"Order Summary"}),e.jsxs("div",{className:"mt-4 space-y-2 text-sm",children:[e.jsx(i,{label:"Subtotal",value:l}),e.jsx(i,{label:"Shipping",value:0,note:"Calculated after checkout"})]}),e.jsxs("div",{className:"mt-4 pt-4 border-t flex items-center justify-between",children:[e.jsx("span",{className:"font-semibold",children:"Total"}),e.jsxs("span",{className:"text-2xl font-bold text-primary flex items-center",children:[e.jsx(c,{className:"size-5"}),l.toLocaleString("en-IN")]})]}),e.jsx(n,{asChild:!0,size:"lg",className:"w-full mt-5 bg-accent text-accent-foreground",children:e.jsx(m,{to:"/checkout",children:"Proceed to Checkout"})}),e.jsx("p",{className:"mt-3 text-xs text-muted-foreground text-center",children:"Secure payment via Cashfree"})]})]})]})})]})}function i({label:t,value:l,note:a}){return e.jsxs("div",{className:"flex justify-between items-baseline",children:[e.jsxs("span",{className:"text-muted-foreground",children:[t," ",a&&e.jsxs("span",{className:"text-xs",children:["(",a,")"]})]}),e.jsxs("span",{className:"font-medium flex items-center",children:[e.jsx(c,{className:"size-3.5"}),l.toLocaleString("en-IN")]})]})}export{z as component};

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.