PageSourceSearch

https://premiumecom1.lovable.app/assets/products._slug-3uMLNqOL.js

js premiumecom1.lovable.app collected 2026-10-03 03:40:05 UTC 7,531 bytes, 1 lines download raw bytes

1import{R as y,c as v,H as w,I as C,a as _,u as k,b as S,r as P,i as m,j as e,J as B,k as p,B as u,K as z,t as R}from"./index-DSXTHp_n.js";import{u as T}from"./useSuspenseQuery-X5xQVCTL.js";import{t as E,S as h,F as M}from"./Shell-QbME56gH.js";import{P as q}from"./ProductCard-DAnIht7T.js";import{C as F}from"./circle-check-CwQPwabZ.js";import{T as $}from"./truck-D8V3Yvzp.js";import{S as I}from"./shield-check-Dfn0WxTN.js";import{R as Q}from"./rotate-ccw-CQ7LAd6u.js";import{S as Z}from"./shopping-bag-3LK6c8EQ.js";import{Z as A}from"./zap-CWSekyMs.js";import{P as D}from"./phone-BwS-lxI5.js";import"./menu-BfH0X_uj.js";import"./search-Da0PUJez.js";import"./sparkles-SnJ_RHFh.js";import"./package-BS_MjsVs.js";import"./mail-C7uO6qzq.js";import"./map-pin-A-1t5BUb.js";import"./visitor.functions-DjPbm9Q0.js";import"./dialog-DnraRQLC.js";import"./input-CVVKrf1r.js";import"./gift-Bq3VGyL0.js";function ne(){const{slug:x}=y.useParams(),g=v(w),{data:r}=T(C(a=>g({data:{slug:a}}),x)),d=_(),f=k(),o=S();if(P.useEffect(()=>{r?.product&&(m.viewContent({id:r.product.id,name:r.product.title,price:Number(r.product.price)}),E({type:"product_view",path:`/products/${x}`,product_id:r.product.id,meta:{title:r.product.title,price:Number(r.product.price)}}))},[r?.product?.id]),!r.product)return e.jsx(h,{children:e.jsx("div",{className:"container mx-auto p-8 text-center",children:"পণ্য পাওয়া যায়নি"})});const t=r.product,l=B(t.images),s=Number(t.price),i=t.compare_price?Number(t.compare_price):0,c=i>s?Math.round((1-s/i)*100):0,b=(()=>{let a=0;for(let n=0;n<t.id.length;n++)a=a*31+t.id.charCodeAt(n)|0;return 120+Math.abs(a)%1400})();function j(){d.add({id:t.id,sku:t.sku,slug:t.slug,title:t.title_bn??t.title,price:s,image:l}),m.addToCart({id:t.id,name:t.title,price:s,qty:1}),d.setOpen(!0),R.success("কার্টে যোগ হয়েছে")}function N(){d.add({id:t.id,sku:t.sku,slug:t.slug,title:t.title_bn??t.title,price:s,image:l}),m.addToCart({id:t.id,name:t.title,price:s,qty:1}),f({to:"/checkout"})}return e.jsxs(h,{children:[e.jsxs("div",{className:"container mx-auto grid gap-6 px-4 py-6 md:grid-cols-2 md:py-10",children:[e.jsxs("div",{className:"relative aspect-square overflow-hidden rounded-2xl bg-muted",children:[l&&e.jsx("img",{src:l,alt:t.title_bn??t.title,className:"h-full w-full object-cover"}),c>0&&e.jsxs("span",{className:"absolute left-3 top-3 rounded-md bg-flash px-2.5 py-1 text-sm font-bold text-flash-foreground",children:["-",c,"%"]})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-flash/10 px-2.5 py-1 font-bold text-flash",children:[e.jsx(M,{className:"h-3.5 w-3.5"})," ",b,"+ বিক্রি হয়েছে"]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-primary/10 px-2.5 py-1 font-bold text-primary",children:[e.jsx(F,{className:"h-3.5 w-3.5"})," ইন স্টক"]})]}),e.jsx("h1",{className:"text-2xl font-extrabold md:text-3xl",children:t.title_bn??t.title}),e.jsxs("div",{className:"flex items-baseline gap-3",children:[e.jsx("span",{className:"text-3xl font-extrabold text-primary",children:p(s)}),i>0&&e.jsx("span",{className:"text-lg text-muted-foreground line-through",children:p(i)}),c>0&&e.jsxs("span",{className:"rounded-md bg-flash px-2 py-0.5 text-xs font-bold text-flash-foreground",children:["সাশ্রয় ",p(i-s)]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[e.jsxs("div",{className:"flex flex-col items-center gap-1 rounded-lg border border-border p-2 text-center",children:[e.jsx($,{className:"h-5 w-5 text-primary"})," দ্রুত ডেলিভারি"]}),e.jsxs("div",{className:"flex flex-col items-center gap-1 rounded-lg border border-border p-2 text-center",children:[e.jsx(I,{className:"h-5 w-5 text-primary"})," অরিজিনাল গ্যারান্টি"]}),e.jsxs("div",{className:"flex flex-col items-center gap-1 rounded-lg border border-border p-2 text-center",children:[e.jsx(Q,{className:"h-5 w-5 text-primary"})," ৭ দিন রিটার্ন"]})]}),e.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[e.jsxs(u,{onClick:j,size:"lg",variant:"outline",className:"h-14 text-base font-bold",children:[e.jsx(Z,{className:"h-5 w-5"})," কার্টে যোগ"]}),e.jsxs(u,{onClick:N,size:"lg",className:"h-14 text-base font-bold cta-glow animate-pulse",children:[e.jsx(A,{className:"h-5 w-5"})," অর্ডার করুন"]})]}),e.jsxs("a",{href:`tel:${o.contact_phone}`,className:"flex items-center justify-center gap-2 rounded-xl border border-dashed border-primary/40 bg-primary/5 px-4 py-3 text-sm font-semibold text-primary hover:bg-primary/10",children:[e.jsx(D,{className:"h-4 w-4"})," ফোনে অর্ডার করতে কল করুন: ",o.contact_phone]}),o.whatsapp?.enabled&&(o.whatsapp?.number||o.contact_phone)&&e.jsxs("a",{href:z(o.whatsapp?.number||o.contact_phone,`আসসালামু আলাইকুম! আমি "${t.title_bn??t.title}" পণ্যটি সম্পর্কে জানতে চাই।`),target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 rounded-xl px-4 py-3 text-sm font-bold text-white shadow-md transition hover:brightness-110",style:{background:"linear-gradient(135deg, #25D366 0%, #128C7E 100%)"},children:[e.jsx("svg",{viewBox:"0 0 32 32",className:"h-5 w-5 fill-current","aria-hidden":"true",children:e.jsx("path",{d:"M19.11 17.205c-.372 0-1.088 1.39-1.518 1.39-.235 0-.78-.36-1.305-.84-1.515-1.395-1.875-2.835-1.875-2.85 0-.21.435-.51.585-.615.27-.18.39-.345.39-.51 0-.21-.6-1.755-.69-1.92-.12-.225-.42-.21-.66-.21-.225 0-.81.105-1.05.27-.525.36-.81 1.32-.81 2.04 0 1.95 1.5 4.005 3.075 5.4 1.965 1.74 3.6 2.16 4.485 2.16.66 0 1.575-.51 1.8-1.215.105-.345.105-.66.06-.795-.045-.135-.27-.21-.585-.36-.315-.135-.84-.36-1.05-.36zM16.005 4C9.378 4 4 9.378 4 16.005c0 2.13.555 4.155 1.605 5.985L4 28l6.165-1.575c1.755.945 3.735 1.485 5.835 1.485 6.63 0 12.015-5.385 12.015-12.015C28.02 9.378 22.635 4 16.005 4zm0 21.84c-1.95 0-3.78-.555-5.34-1.515l-.375-.225-3.66.93.99-3.555-.24-.39c-1.035-1.65-1.59-3.555-1.59-5.55C5.79 9.93 10.41 5.31 16.005 5.31c5.595 0 10.215 4.62 10.215 10.215 0 5.595-4.62 10.315-10.215 10.315z"})}),"হোয়াটসঅ্যাপে মেসেজ করুন"]})]})]}
1),(t.description_bn||t.description)&&e.jsx("section",{className:"container mx-auto px-4 pb-8",children:e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-border bg-card",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-border bg-gradient-to-r from-primary/10 to-transparent px-5 py-3",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"}),e.jsx("h2",{className:"text-lg font-extrabold",children:"পণ্যের বিবরণ"})]}),e.jsx("div",{className:"prose prose-sm max-w-none whitespace-pre-line p-5 text-[15px] leading-relaxed text-foreground/85",children:t.description_bn??t.description})]})}),r.related.length>0&&e.jsxs("section",{className:"container mx-auto px-4 py-10",children:[e.jsx("h2",{className:"mb-5 text-xl font-extrabold",children:"আপনার পছন্দ হতে পারে"}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:r.related.map(a=>e.jsx(q,{p:a},a.id))})]})]})}export{ne 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.