1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9c7d7fac-9f1f-4d6a-9033-751afc93223b",e._sentryDebugIdIdentifier="sentry-dbid-9c7d7fac-9f1f-4d6a-9033-751afc93223b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6362],{21272:function(e,t,r){r.d(t,{CatalogBrowser:function(){return p}});var a=r(57437),n=r(2265),s=r(27648),l=r(33145),c=r(73247),o=r(28842),i=r(51817),d=r(84226),u=r(96780);let f={name:"Name AâZ",newest:"Newest"};function m(e){return e&&e in f?e:"name"}function h(e){let{product:t}=e,r=(0,u.DV)(t.techniques,t.typeName);return(0,a.jsxs)(s.default,{href:"/products/".concat(t.id),className:"block bg-surface-elevated border border-gray-800 rounded-xl overflow-hidden transition-colors hover:border-gray-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand",children:[(0,a.jsxs)("div",{className:"aspect-square bg-gradient-to-br from-gray-700/50 to-gray-800/50 relative overflow-hidden",children:[t.image?(0,a.jsx)(l.default,{src:t.image,alt:t.name,fill:!0,className:"object-contain p-4",sizes:"(max-width: 640px) 100vw, (max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw"}):(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)("div",{className:"w-24 h-28 bg-white/5 rounded-lg border border-gray-700 flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-10 h-10 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})})}),t.colorCount>1&&(0,a.jsxs)("div",{className:"absolute bottom-3 right-3 bg-surface-base/90 backdrop-blur-sm text-xs text-gray-300 px-2 py-1 rounded-full",children:["+",t.colorCount," colors"]})]}),(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-brand/10 text-brand",children:t.typeName}),r.map((e,t)=>(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-500/10 text-blue-400",children:e},t))]}),(0,a.jsx)("h3",{className:"text-white font-medium mb-2 line-clamp-2",children:t.name}),(0,a.jsx)("div",{className:"flex items-center justify-end",children:(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"No minimums"})})]})]})}function x(){return(0,a.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(12)].map((e,t)=>(0,a.jsxs)("div",{className:"bg-surface-elevated border border-gray-800 rounded-xl overflow-hidden animate-pulse",children:[(0,a.jsx)("div",{className:"aspect-square bg-gray-700/50"}),(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsx)("div",{className:"h-4 bg-gray-700/50 rounded w-16"}),(0,a.jsx)("div",{className:"h-5 bg-gray-700/50 rounded w-3/4"}),(0,a.jsx)("div",{className:"h-4 bg-gray-700/50 rounded w-1/2"})]})]},t))})}function p(e){let{categorySlug:t,categoryName:r,initialProducts:l,initialTotal:u,initialHasMore:p}
1=e,[g,b]=(0,n.useState)(""),[y,v]=(0,n.useState)("name"),[w,j]=(0,n.useState)(""),[N,k]=(0,n.useState)(l),[C,S]=(0,n.useState)(u),[Z,L]=(0,n.useState)(p),[P,E]=(0,n.useState)(!1),[z,M]=(0,n.useState)(!1),[R,q]=(0,n.useState)(null),A=(0,n.useRef)(!1),D=(0,n.useRef)(0),_=(0,n.useCallback)(()=>{var e;let t=new URLSearchParams(window.location.search),r=null!==(e=t.get("q"))&&void 0!==e?e:"",a=m(t.get("sort"));b(r),j(r),v(a)},[]);(0,n.useEffect)(()=>(_(),window.addEventListener("popstate",_),()=>window.removeEventListener("popstate",_)),[_]);let T=(0,n.useCallback)((e,t)=>{let r=new URLSearchParams(window.location.search);e?r.set("q",e):r.delete("q"),"name"!==t?r.set("sort",t):r.delete("sort");let a=r.toString();window.history.replaceState(null,"",a?"".concat(window.location.pathname,"?").concat(a):window.location.pathname)},[]);(0,n.useEffect)(()=>{let e=setTimeout(()=>{w!==g&&(b(w),T(w,y))},300);return()=>clearTimeout(e)},[w,g,y,T]);let U=(0,n.useCallback)(()=>{let e=new URLSearchParams;return e.set("limit","50"),t&&e.set("categorySlug",t),g&&e.set("search",g),"name"!==y&&e.set("sort",y),e.toString()},[t,g,y]);async function B(){if(z||!Z)return;M(!0);let e=D.current;try{let t=await fetch("/api/public/products?".concat(U(),"&offset=").concat(N.length)),r=await t.json();if(e!==D.current)return;r.success&&r.products&&(k(e=>[...e,...r.products]),L(r.hasMore||!1))}catch(e){console.error("Error loading more products:",e)}finally{M(!1)}}return(0,n.useEffect)(()=>{let e=""===g&&"name"===y;if(!A.current&&e)return;A.current=!0,D.current++;let t=!1;return async function(){E(!0),q(null);try{let e=await fetch("/api/public/products?".concat(U())),r=await e.json();if(t)return;r.success?(k(r.products||[]),S(r.total||0),L(r.hasMore||!1)):q("Failed to load products")}catch(e){t||(console.error("Error fetching products:",e),q("Failed to load products"))}finally{t||E(!1)}}(),()=>{t=!0}},[g,y,U]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("section",{className:"py-4 border-y border-gray-800 sticky top-[73px] z-40 bg-surface-base/95 backdrop-blur-md",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"relative flex-1 sm:max-w-md",children:[(0,a.jsx)(c.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,a.jsx)("input",{type:"text","aria-label":r?"Search ".concat(r):"Search all products",placeholder:r?"Search ".concat(r.toLowerCase(),"..."):"Search all products...",value:w,onChange:e=>j(e.target.value),className:"w-full pl-10 pr-4 py-2 bg-surface-elevated border border-gray-800 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-brand transition-colors"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 justify-between sm:justify-end",children:[!P&&(0,a.jsxs)("p",{className:"text-sm text-gray-400",children:[(0,a.jsx)("span",{className:"text-white font-semibold",children:C})," ",1===C?"product":"products"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[(0,a.jsx)(o.Z,{className:"w-4 h-4","aria-hidden":!0}),(0,a.jsx)("span",{className:"sr-only",children:"Sort by"}),(0,a.jsx)("select",{value:y,onChange:e=>{var t;v(t=m(e.target.value)),T(g,t)},className:"bg-surface-elevated border border-gray-800 rounded-lg px-3 py-2 text-sm text-gray-300 focus:outline-none focus:border-brand transition-colors",children:Object.keys(f).map(e=>(0,a.jsx)("option",{value:e,children:f[e]},e))})]})]})]})})}),(0,a.jsx)("section",{className:"py-10",children:(0,a.jsx)("div",{className:"w-full",children:P?(0,a.jsx)(x,{}):R?(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-gray-400 mb-4",children:R}),(0,a.jsx)("button",{onClick:()=>window.location.reload(),className:"px-6 py-2 bg-brand text-surface-base font-semibold rounded-lg hover:bg-brand-hover transition-colors",children:"Try again"})]}):N.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:N.map(e=>(0,a.jsx)(h,{product:e},e.id))}),Z&&(0,a.jsx)("div",{className:"text-center mt-10",children:(0,a.jsx)(d.Button,{variant:"outline",size:"lg",onClick:B,disabled:z,children:z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 mr-2 animate-spin"}),"Loading..."]}):"Load more products"})})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("div",{className:"w-24 h-24 bg-surface-elevated rounded-full flex items-center justify-center mx-auto mb-6",children:(0,a.jsx)(c.Z,{className:"w-12 h-12 text-gray-600"})}),(0,a.jsx)("h3",{className:"text-2xl font-semibold text-white mb-2",children:"No products found"}),(0,a.jsx)("p",{className:"text-gray-400 mb-6",children:g?'Nothing matches "'.concat(g,'"').concat(r?" in ".concat(r):"","."):r?"No products available in this category.":"No products available right now."}),g?(0,a.jsx)("button",{onClick:function(){j("")},className:"px-6 py-2 bg-brand text-surface-base font-semibold rounded-lg hover:bg-brand-hover transition-colors",children:"Clear search"}):(0,a.jsx)(s.default,{href:"/products",className:"inline-block px-6 py-2 bg-brand text-surface-base font-semibold rounded-lg hover:bg-brand-hover transition-colors",children:"Browse all products"})]})})})]})}},69488:function(e,t,r){r.d(t,{PublicCatalogSidebar:function(){return o}});var a=r(57437),n=r(2265),s=r(27648),l=r(99376),c=r(10407);function o(e){var t;let{tree:r}=e,o=(0,l.usePathname)(),i=(null==o?void 0:o.startsWith("/products/category/"))?decodeURIComponent(null!==(t=o.split("/")[3])&&void 0!==t?t:""):null,[d,u]=(0,n.use
1State)(()=>{let e=new Set;if(i){var t;null===(t=function e(t,r){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let n of t){let t=[...a,n.title].join("/");if(n.slug===r)return a;if(n.children.length>0){let s=e(n.children,r,[...a,t]);if(s)return s}}return null}(r,i))||void 0===t||t.forEach(t=>e.add(t))}return e});function f(e){u(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})}return(0,a.jsxs)("nav",{"aria-label":"Product categories",className:"text-sm",children:[(0,a.jsx)(s.default,{href:"/products",className:"block rounded-md px-2 py-1.5 mb-2 font-medium transition-colors ".concat("/products"===o?"bg-brand text-surface-base":"text-white hover:bg-surface-elevated"),children:"All Products"}),(0,a.jsx)("ul",{className:"space-y-0.5",children:r.map(e=>(function e(t,r,n){let l=[...n,t.title].join("/"),o=t.children.length>0,u=d.has(l),m=null!==t.slug&&t.slug===i,h=(0,a.jsxs)("span",{className:"flex-1 flex items-center justify-between gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"truncate",children:t.title}),(0,a.jsx)("span",{className:"text-xs ".concat(m?"text-surface-base/70":"text-gray-600"),children:t.accumulatedCount})]});return(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex items-center",style:{paddingLeft:"".concat(12*r,"px")},children:[o?(0,a.jsx)("button",{type:"button",onClick:()=>f(l),"aria-label":u?"Collapse ".concat(t.title):"Expand ".concat(t.title),"aria-expanded":u,className:"w-5 h-6 flex items-center justify-center text-gray-500 hover:text-gray-300 transition-colors shrink-0",children:(0,a.jsx)(c.Z,{className:"w-3 h-3 transition-transform ".concat(u?"rotate-90":""),"aria-hidden":!0})}):(0,a.jsx)("span",{className:"w-5 shrink-0","aria-hidden":!0}),t.slug?(0,a.jsx)(s.default,{href:"/products/category/".concat(t.slug),"aria-current":m?"page":void 0,className:"flex-1 flex min-w-0 items-center rounded-md px-2 py-1.5 text-sm transition-colors ".concat(m?"bg-brand text-surface-base font-medium":"text-gray-300 hover:bg-surface-elevated hover:text-white"),children:h}):(0,a.jsx)("button",{type:"button",onClick:()=>f(l),className:"flex-1 flex min-w-0 items-center rounded-md px-2 py-1.5 text-sm text-gray-400 hover:text-gray-200 transition-colors text-left",children:h})]}),o&&u&&(0,a.jsx)("ul",{children:t.children.map(t=>e(t,r+1,[...n,l]))})]},l)})(e,0,[]))})]})}},96780:function(e,t,r){r.d(t,{DV:function(){return n}});let a={dtg:"Printed","dtg-inkjet":"Printed",embroidery:"Embroidered",sublimation:"Sublimated","all-over-print":"All-Over Print",dtfilm:"DTF",cut:"Cut",uv:"UV Print",engraving:"Engraved"};function n(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!e||0===e.length)return[];let n=t.toLowerCase();return[...new Set(e.map(e=>a[e.key]||e.displayName))].filter(Boolean).filter(e=>{let t=e.toLowerCase();return!n.includes(t)&&!n.includes(t.replace("ed",""))&&!t.includes(n.replace(/s$/,""))}).slice(0,r)}},20135:function(e,t,r){r.d(t,{Z:function(){return l}});var a=r(2265),n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},s=r(7656);let l=(0,a.forwardRef)((e,t)=>{let{color:r="currentColor",size:l=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:i="",children:d,iconNode:u,...f}=e;return(0,a.createElement)("svg",{ref:t,...n,width:l,height:l,stroke:r,strokeWidth:o?24*Number(c)/Number(l):c,className:(0,s.z)("lucide",i),...f},[...u.map(e=>{let[t,r]=e;return(0,a.createElement)(t,r)}),...Array.isArray(d)?d:[d]])})},43168:function(e,t,r){r.d(t,{Z:function(){return l}});var a=r(2265),n=r(7656),s=r(20135);let l=(e,t)=>{let r=(0,a.forwardRef)((r,l)=>{let{className:c,...o}=r;return(0,a.createElement)(s.Z,{ref:l,iconNode:t,className:(0,n.z)("lucide-".concat((0,n.m)(e)),c),...o})});return r.displayName="".concat(e),r}},28842:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]])},10407:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},50598:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]])},51817:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},58293:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]])},73247:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},42351:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]])},92369:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},32489:function(e,t,r){r.d(t,{Z:function(){return a}});let a=(0,r(43168).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},7656:function(e,t,r){r.d(t,{m:function(){return a},z:function(){return n}});let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")}},27648:function(e,t,r){r.d(t,{default:function(){return n.a}});var a=r(72972),n=r.n(a)},99376:function(e,t,r){var a=r(35475);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},61994:function(e,t,r){function a(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=function e(t){var r,a,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(a=e(t[r]))&&(n&&(n+=" "),n+=a)}else for(a in t)t[a]&&(n&&(n+=" "),n+=a)}return n}(e))&&(a&&(a+=" "),a+=t);return a}r.d(t,{W:function(){return a}}),t.Z=a}}]);
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.