PageSourceSearch

https://sessionsbythebay.com/_next/static/chunks/app/shop/page-bf9…?dpl=dpl_FjMFn7xZjyP5XgR6ogm499twtCQR

js sessionsbythebay.com collected 2026-10-10 00:49:06 UTC 35,359 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4895],{1181:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Reveal:()=>r});var l=n(5155),a=n(2115);function r(e){let{children:t,delay:n=0,className:r}=e,s=(0,a.useRef)(null),[i,o]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{let e=s.current;if(!e||window.matchMedia("(prefers-reduced-motion: reduce)").matches||e.getBoundingClientRect().top<window.innerHeight)return;o(!1);let t=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting&&(o(!0),t.disconnect())},{rootMargin:"-60px"});return t.observe(e),()=>t.disconnect()},[]),(0,l.jsx)("div",{ref:s,className:r,style:{opacity:+!!i,transform:i?"none":"translateY(18px)",transition:"opacity 550ms cubic-bezier(0.22,1,0.36,1) ".concat(n,"s, transform 550ms cubic-bezier(0.22,1,0.36,1) ").concat(n,"s")},children:t})}},1317:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,1356,23)),Promise.resolve().then(n.bind(n,3696)),Promise.resolve().then(n.bind(n,2939)),Promise.resolve().then(n.bind(n,1671)),Promise.resolve().then(n.bind(n,8267)),Promise.resolve().then(n.bind(n,7869)),Promise.resolve().then(n.bind(n,9196)),Promise.resolve().then(n.bind(n,1181))},1613:(e,t,n)=>{"use strict";n.d(t,{Ll:()=>i,dw:()=>s,yP:()=>r});let l="sbtb.favorites",a=new Set;function r(){try{let e=window.localStorage.getItem(l),t=e?JSON.parse(e):[];return Array.isArray(t)?t.filter(e=>"string"==typeof e).slice(0,500):[]}catch(e){return[]}}function s(e){let t=r(),n=!t.includes(e);return!function(e){try{window.localStorage.setItem(l,JSON.stringify(e.slice(0,500)))}catch(e){return!1}return a.forEach(t=>t(e)),!0}(n?[e,...t]:t.filter(t=>t!==e))?null:n}function i(e){a.add(e);let t=t=>{t.key===l&&e(r())};return window.addEventListener("storage",t),()=>{a.delete(e),window.removeEventListener("storage",t)}}},7869:(e,t,n)=>{"use strict";n.d(t,{ShopBrowser:()=>$});var l=n(5155),a=n(2115);function r(e){return new Map(e.map(e=>[e.id,e]))}function s(e,t){for(let n of e.categoryIds){let e=t.get(function(e,t){var n;let l=t.get(e);for(let e=0;(null==l?void 0:l.parentId)&&e<8;e+=1){let e=t.get(l.parentId);if(!e)break;l=e}return null!=(n=null==l?void 0:l.id)?n:e}(n,t));if(e)return e}return null}function i(e){var t;return e.sellable>=3&&Number.isFinite((t=e).price)&&t.price>.01&&!1!==e.onWebsite}let o=[{id:"fresh",label:"Fresh Drops",blurb:"Added to the menu in the last 30 days."},{id:"last",label:"While Supplies Last",blurb:"On sale or on clearance, until the shelf runs out."}];function c(e,t){let n=Date.parse("".concat(e,"T00:00:00Z"));return Math.round((Date.parse("".concat(t,"T00:00:00Z"))-n)/864e5)}function u(e,t){let n=e.created;return!n||t.imports.has(n)?null:c(n,t.today)>=-1?n:null}let d=["clearance","while supplies last","expiring soon","expiring"];function m(e){let t=" ".concat(e," ");return d.some(e=>t.includes(" ".concat(e," ")))}function h(e,t,n){var l;return"fresh"===t?function(e,t,n){let l=u(e,{today:t,imports:n});return null!==l&&30>c(l,t)}(e,n.today,n.imports):!!i(e)&&(null!==e.salePrice||(null!=(l=e.searchWords)?l:[]).some(m))}let p=[{id:"u25",label:"Under $25",min:0,max:25},{id:"25-40",label:"$25 to $39.99",min:25,max:40},{id:"40-50",label:"$40 to $49.99",min:40,max:50},{id:"50-75",label:"$50 to $74.99",min:50,max:75},{id:"75-100",label:"$75 to $99.99",min:75,max:100},{id:"100+",label:"$100 and up",min:100,max:1/0}];function x(e){var t;return null!=(t=e.salePrice)?t:e.price}function f(e){var t;let n=x(e);return null!=(t=p.find(e=>n>=e.min&&n<e.max))?t:null}let b=[{id:"default",label:"Featured"},{id:"arrivals",label:"Newest arrivals"},{id:"price-asc",label:"Price, low to high"},{id:"price-desc",label:"Price, high to low"},{id:"name",label:"Name, A to Z"},{id:"newest",label:"Most in stock"}];var g=n(686),v=n(1613),j=n(5239);function y(e){let{facets:t,total:n,selected:a,onSelect:r}=e;return 0===t.length?null:(0,l.jsx)("nav",{"aria-label":"Shop by category",className:"mt-12 -mx-6 overflow-x-auto px-6 pb-2 md:mx-0 md:overflow-visible md:px-0 md:pb-0",children:(0,l.jsxs)("ul",{className:"flex gap-px bg-cream-06 md:grid md:grid-cols-[repeat(auto-fit,minmax(150px,1fr))]",children:[(0,l.jsx)("li",{className:"w-40 shrink-0 md:w-auto",children:(0,l.jsxs)(w,{active:null===a,onClick:()=>r(null),children:[(0,l.jsx)(N,{active:null===a,children:"Everything"}),(0,l.jsxs)(k,{children:[n," products"]})]})}),t.map(e=>{let t=a===e.id,n=e.inStock>0;return(0,l.jsx)("li",{className:"w-40 shrink-0 md:w-auto",children:(0,l.jsxs)(w,{active:t,onClick:()=>r(t?null:e.id),children:[e.image?(0,l.jsx)(j.default,{src:e.image,alt:"",fill:!0,sizes:"(min-width: 768px) 17vw, 160px",className:"object-cover opacity-60 transition-all duration-700 ease-luxe group-hover:scale-105 group-hover:opacity-80 shop-light:opacity-100 shop-light:brightness-105 shop-light:group-hover:opacity-100 ".concat(n?"":"grayscale")}
1):null,(0,l.jsx)("span",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-black via-black/60 to-black/10 shop-light:from-dark shop-light:from-25% shop-light:via-dark/85 shop-light:via-45% shop-light:to-transparent shop-light:to-75%"}),(0,l.jsx)(N,{active:t,children:e.name}),(0,l.jsx)(k,{children:n?"".concat(e.inStock," on the shelf"):"Restocking"})]})},e.id)})]})})}function w(e){let{active:t,onClick:n,children:a}=e;return(0,l.jsx)("button",{type:"button","aria-pressed":t,onClick:n,className:"group relative flex h-32 w-full flex-col justify-end overflow-hidden bg-charcoal p-4 text-left shop-light:bg-dark md:h-40 md:p-5 ".concat(t?"ring-1 ring-inset ring-amber":""),children:a})}function N(e){let{active:t,children:n}=e;return(0,l.jsx)("span",{className:"relative font-sans text-[13px] uppercase tracking-[0.14em] transition-colors duration-400 group-hover:text-amber ".concat(t?"text-amber":"text-cream"),children:n})}function k(e){let{children:t}=e;return(0,l.jsx)("span",{className:"relative mt-1.5 font-sans text-[11px] text-cream-60",children:t})}var C=n(7222),S=n(8984);function M(e){let{potency:t,readings:n,coaHref:a,size:r="card"}=e,s=n&&n.length>0?n:function(e){let t=(null!=e?e:"").trim();if(!t)return[];let n=[],l=new Set;for(let e of t.matchAll(/\b(THCa|THCv|THC|CBDa|CBD|CBG|CBN|CBC|TERPS?|TOTAL THC|TOTAL CBD)\b\s*[:=]?\s*([\d.]+\s*(?:%|mg|MG|mG)?)/gi)){let t=e[1].toUpperCase().replace(/^TERPENES?$/,"TERPS");l.has(t)||(l.add(t),n.push({label:t,value:e[2].replace(/\s+/g,"").toUpperCase()}))}if(n.length)return n;for(let e of t.matchAll(/([\d.]+\s*(?:%|mg|MG)?)\s*\b(THCa|THC|CBD|CBG|CBN)\b/gi)){let t=e[2].toUpperCase();l.has(t)||(l.add(t),n.push({label:t,value:e[1].replace(/\s+/g,"").toUpperCase()}))}if(n.length)return n;let a=t.match(/^([\d.]+\s*(?:%|mg|MG))$/);return a?[{label:"THC",value:a[1].replace(/\s+/g,"").toUpperCase()}]:[{label:"POTENCY",value:t.slice(0,24)}]}(t);if(0===s.length)return null;let i="card"===r;return(0,l.jsxs)("div",{className:i?"mt-1":"mt-8",children:[(0,l.jsx)("div",{className:i?"flex flex-wrap gap-2":"flex flex-wrap gap-3",children:s.map(e=>(0,l.jsxs)("div",{className:i?"border border-cream-06 bg-black/40 px-2.5 py-1":"border border-cream-06 bg-black/40 px-4 py-2.5",children:[(0,l.jsx)("span",{className:i?"font-sans text-[10px] uppercase tracking-[0.14em] text-cream-35":"block font-sans text-kicker uppercase text-cream-35",children:e.label}),(0,l.jsx)("span",{className:i?"ml-1.5 font-sans text-[12px] text-amber":"mt-1 block font-sans text-[16px] text-amber",children:e.value})]},e.label))}),i?null:(0,l.jsxs)("p",{className:"mt-4 max-w-md font-sans text-micro font-light leading-relaxed text-cream-35 shop-light:text-cream-60",children:["Lab figures are approximate and can differ from the batch on the shelf. THC may vary by 10% or more between batches.",a?(0,l.jsxs)(l.Fragment,{children:[" ",(0,l.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-amber underline decoration-1 underline-offset-4 transition-colors duration-400 hover:text-amber-light",children:"View the lab report"})]}):null]})]})}var P=n(3299);function A(e){let{sellable:t,product:n}=e,[r,s]=(0,a.useState)(0),[i,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),[d,m]=(0,a.useState)(!1),[h,p]=(0,a.useState)(null),x=(0,a.useRef)(null),f=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=Number(n.id),t=()=>s((0,P.Ct)(e));return t(),(0,P.zn)(t)},[n.id]),(0,a.useEffect)(()=>{var e,t;h&&("plus"===h&&(null==(e=x.current)||e.focus()),"add"===h&&(null==(t=f.current)||t.focus()),p(null))},[h,r]);let b=Math.max(0,Math.min(Math.floor(t),99)),v=b-r>0;async function j(e){if(!v||i||d)return;o(!0);let t=await (0,P.bE)(n,1);o(!1),u("unavailable"===t),m("not-online"===t),"added"===t&&e&&p("plus")}async function y(){if(i||r<1)return;o(!0);let e=1===r,t=await (0,P.XH)(n.id);o(!1),u(!t),t&&e&&p("add")}let w="flex h-10 w-full";return(0,l.jsxs)("div",{children:[r>0?(0,l.jsxs)("div",{role:"group","aria-label":"".concat(n.name," in your bag"),className:"".concat(w," clip-control items-stretch border border-coral bg-coral text-on-coral"),children:[(0,l.jsx)("button",{type:"button",onClick:y,disabled:i,"aria-label":1===r?"Remove ".concat(n.name," from your bag"):"One fewer ".concat(n.name),className:"flex w-10 shrink-0 items-center justify-center transition-colors duration-300 hover:bg-black/15 focu
1s-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-black disabled:cursor-wait",children:1===r?(0,l.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M4 7h16M9 7V4.5h6V7M6.5 7l1 13h9l1-13M10 11v6M14 11v6"})}):(0,l.jsx)("span",{"aria-hidden":"true",className:"text-[18px] leading-none",children:"−"})}),(0,l.jsxs)("span",{"aria-live":"polite",className:"flex flex-1 items-center justify-center whitespace-nowrap font-sans text-[14px] font-medium tabular-nums",children:[r,(0,l.jsx)("span",{"aria-hidden":"true",className:"hidden pl-1.5 text-[10px] font-normal uppercase tracking-[0.18em] md:inline",children:"in bag"}),(0,l.jsx)("span",{className:"sr-only",children:" in your bag"})]}),(0,l.jsx)("button",{ref:x,type:"button",onClick:()=>j(!1),disabled:!v||i||d,"aria-label":v?"One more ".concat(n.name):"All ".concat(b," on the shelf are in your bag"),className:"flex w-10 shrink-0 items-center justify-center text-[18px] leading-none transition-colors duration-300 hover:bg-black/15 focu
1s-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-black disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",children:"+"})]}):(0,l.jsx)("button",{ref:f,type:"button",onClick:()=>j(!0),disabled:!v||i||d,"aria-label":"".concat(i?"Adding":d?"Not online":"Add to Bag",", ").concat(n.name),className:"".concat(w," clip-control items-center justify-center whitespace-nowrap border border-amber px-3 font-sans text-[10px] font-normal uppercase tracking-[0.22em] text-amber transition-colors duration-300 hover:bg-coral hover:text-on-coral focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-amber disabled:cursor-not-allowed disabled:border-control-line disabled:text-cream-35 disabled:hover:bg-transparent"),children:i?"Adding":d?"Not online":"Add to Bag"}),d?(0,l.jsxs)("p",{"aria-live":"polite",className:"mt-2 font-sans text-[11px] font-light leading-snug text-cream-60",children:["Can’t be ordered online right now. Call"," ",(0,l.jsx)("a",{href:g._.contact.phoneHref,className:"text-amber underline decoration-1 underline-offset-4",children:g._.contact.phone})," ","and we can check it for you."]}):c?(0,l.jsxs)("p",{"aria-live":"polite",className:"mt-2 font-sans text-[11px] font-light leading-snug text-cream-60",children:["The bag is not available here. Call"," ",(0,l.jsx)("a",{href:g._.contact.phoneHref,className:"text-amber underline decoration-1 underline-offset-4",children:g._.contact.phone})," ","and we will set it aside."]}):null]})}function E(e){var t;let{product:n}=e,a=i(n),r=null!==n.salePrice&&a,s=null!=(t=n.salePrice)?t:n.price,o=function(e){let t=new Set,n=[];for(let l of e){let e=null==l?void 0:l.trim();if(!e)continue;let a=e.toLowerCase();t.has(a)||(t.add(a),n.push(e))}return n.join("  \xb7  ")}([n.strainType,n.strain]);return(0,l.jsxs)("article",{className:"group relative flex flex-col border border-cream-06 bg-charcoal transition-colors duration-500 ease-luxe hover:border-cream-15 has-[a:focus-visible]:z-20 ".concat(a?"":"opacity-70 hover:opacity-90 shop-light:opacity-100 shop-light:hover:opacity-100"),children:[(0,l.jsxs)("div",{className:"relative aspect-square overflow-hidden bg-dark",children:[n.images[0]?(0,l.jsx)(j.default,{src:n.images[0],alt:n.name,fill:!0,sizes:"(min-width: 1280px) 22vw, (min-width: 768px) 33vw, 50vw",className:"object-cover transition-transform duration-700 ease-luxe group-hover:scale-[1.04] shop-light:object-contain shop-light:p-[10%] shop-light:brightness-105 ".concat(a?"":"grayscale shop-light:opacity-50")}):(0,l.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center font-sans text-kicker uppercase ".concat(a?"text-cream-35":"text-cream-82 shop-light:text-cream-35"),children:"Photo coming"}),a?null:(0,l.jsx)("span",{className:"absolute left-0 top-0 bg-black/85 px-3 py-1.5 font-sans text-[11px] uppercase tracking-[0.16em] text-cream",children:"Off the shelf"}),r?(0,l.jsx)("span",{className:"absolute left-0 top-0 bg-amber px-3 py-1.5 font-sans text-[10px] uppercase tracking-[0.16em] text-black",children:"Sale"}):null,a?(0,l.jsx)("div",{className:"absolute right-2 top-2 z-10",children:(0,l.jsx)(S.Z,{productId:n.id,productName:n.name})}):null]}),(0,l.jsxs)("div",{className:"flex flex-1 flex-col gap-2.5 p-5",children:[n.brand?(0,l.jsx)("p",{className:"font-sans text-kicker uppercase text-amber",children:n.brand}):null,(0,l.jsx)("h3",{className:"font-serif text-[20px] font-light leading-[1.25] text-cream shop-light:font-normal",children:(0,l.jsx)("a",{href:"/shop/".concat(n.slug),className:"after:absolute after:inset-0 after:content-[''] focus-visible:outline-none focus-visible:after:outline focus-visible:after:outline-2 focus-visible:after:outline-offset-2 focus-visible:after:outline-amber",children:n.name})}),o?(0,l.jsx)("p",{className:"font-sans text-[13px] font-light text-cream-60",children:o}):null,(0,l.jsx)(M,{potency:n.potency,size:"card"}),(0,l.jsxs)("div",{className:"mt-auto flex items-end justify-between gap-3 pt-4",children:[(0,l.jsxs)("div",{className:"flex items-baseline gap-2.5",children:[(0,l.jsxs)("span",{className:"font-mono text-meta font-normal uppercase text-cream",children:["$",s.toFixed(2)]}),r?(0,l.jsxs)("span",{className:"font-mono text-[13px] font-normal text-cream-35 line-through",children:["$",n.price.toFixed(2)]}):null]}),a&&n.sellable<=5?(0,l.jsxs)("span",{className:"font-sans text-[11px] uppercase tracking-[0.12em] text-amber",children:[n.sellable," left"]}):null]}),a&&C.zN&&s>0?(0,l.jsx)("div",{className:"relative z-10 mt-4",children:(0,l.jsx)(A,{sellable:n.sellable,product:{id:n.id,name:n.name,price:s}})}):null]})]})}let L={q:"",collection:null,category:null,brand:null,band:null,pmin:null,pmax:null,sort:"default",fav:!1};function T(e){return null!==e&&/^\d{1,5}$/.test(e)?Number(e):null}function $(e){var t,n,c,d,m;let{products:j,categories:w,today:N,imports:k}=e,[C,S]=(0,a.useState)(L),[M,P]=(0,a.useState)(24),[A,$]=(0,a.useState)(!1),H=(0,a.useMemo)(()=>r(w),[w]),O=(0,a.useMemo)(()=>(function(e,t){let n=r(t),l=new Map;for(let t of e){let e=s(t,n);if(!e)continue;let a=l.get(e.id);a?a.push(t):l.set(e.id,[t])}let a=[];for(let[e,t]of l){var o,c;let l=n.get(e);if(!l)continue;let r=t.filter(i),s=null!=(o=r.find(e=>e.images[0]))?o:t.find(e=>e.images[0]);a.push({id:e,name:l.name,slug:l.slug,total:t.length,inStock:r.length,image:null!=(c=null==s?void 0:s.images[0])?c:null})}return a.sort((e,t)=>
1t.inStock-e.inStock||e.name.localeCompare(t.name))})(j,w),[j,w]),_=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let a of e){var n,l;let e=null==(n=a.brand)?void 0:n.trim();if(!e)continue;let r=null!=(l=t.get(e))?l:{name:e,total:0,inStock:0};r.total+=1,i(a)&&(r.inStock+=1),t.set(e,r)}return[...t.values()].sort((e,t)=>e.name.localeCompare(t.name))})(j),[j]),I=(0,a.useMemo)(()=>p.map(e=>{let t=j.filter(t=>{var n;return(null==(n=f(t))?void 0:n.id)===e.id});return{...e,total:t.length,inStock:t.filter(i).length}}).filter(e=>e.total>0),[j]),z=(0,a.useMemo)(()=>(function(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let l of e){let e=x(l);e<t&&(t=e),e>n&&(n=e)}return{min:Math.floor(t),max:Math.ceil(n)}})(j),[j]),[U,Z]=(0,a.useState)(""),[W,D]=(0,a.useState)(null);(0,a.useEffect)(()=>(D((0,v.yP)()),(0,v.Ll)(D)),[]);let G=(0,a.useMemo)(()=>new Set(null!=W?W:[]),[W]),J=(0,a.useMemo)(()=>W?j.filter(e=>G.has(e.id)).length:0,[j,W,G]),V=(0,a.useMemo)(()=>new Set(k),[k]),Y=(0,a.useMemo)(()=>o.map(e=>({...e,count:j.filter(t=>h(t,e.id,{today:N,imports:V})).length})).filter(e=>e.count>0),[j,N,V]),X=(0,a.useMemo)(()=>j.some(e=>null!==u(e,{today:N,imports:V})),[j,N,V]),K=(0,a.useMemo)(()=>b.filter(e=>"arrivals"!==e.id||X),[X]);(0,a.useEffect)(()=>{var e,t,n,l,a,r,s,i,o,c,u,d,m,h;let p=new URLSearchParams(window.location.search),x={q:null!=(s=p.get("q"))?s:"",collection:null!=(i=null==(e=Y.find(e=>e.id===p.get("collection")))?void 0:e.id)?i:null,category:null!=(o=null==(t=O.find(e=>e.id===p.get("category")))?void 0:t.id)?o:null,brand:null!=(c=null==(n=_.find(e=>e.name===p.get("brand")))?void 0:n.name)?c:null,band:null!=(u=null==(l=I.find(e=>e.id===p.get("band")))?void 0:l.id)?u:null,pmin:T(p.get("pmin")),pmax:T(p.get("pmax")),sort:null!=(d=null==(a=K.find(e=>e.id===p.get("sort")))?void 0:a.id)?d:"default",fav:"1"===p.get("fav")};if(!x.category&&window.location.hash){let e=decodeURIComponent(window.location.hash.slice(1));x.category=null!=(h=null==(m=O.find(t=>t.slug===e))?void 0:m.id)?h:null}JSON.stringify(x)!==JSON.stringify(L)&&S(x),(x.brand||x.band||null!==x.pmin||null!==x.pmax)&&$(!0);let f=null==(r=window.history.state)?void 0:r.shopShown;"number"==typeof f&&f>24&&P(f)},[O,_,I,Y,K]),(0,a.useEffect)(()=>{var e;let t=new URLSearchParams,n=["q","collection","category","brand","band","pmin","pmax","sort","fav"],l=[];for(let[e,a]of(new URLSearchParams(window.location.search).forEach((e,t)=>{n.includes(t)||l.push([t,e])}
1),C.q&&t.set("q",C.q),C.collection&&t.set("collection",C.collection),C.category&&t.set("category",C.category),C.brand&&t.set("brand",C.brand),C.band&&t.set("band",C.band),null!==C.pmin&&t.set("pmin",String(C.pmin)),null!==C.pmax&&t.set("pmax",String(C.pmax)),"default"!==C.sort&&t.set("sort",C.sort),C.fav&&t.set("fav","1"),l))t.append(e,a);let a=t.toString(),r=/^#action=/.test(window.location.hash)?window.location.hash:"";window.history.replaceState({...null!=(e=window.history.state)?e:{},shopShown:M},"",(a?"".concat(window.location.pathname,"?").concat(a):window.location.pathname)+r)},[C,M]);let Q=(0,a.useMemo)(()=>{let e=new Map(O.map((e,t)=>[e.id,t]));return t=>{var n,l,a;return null!=(a=e.get(null!=(l=null==(n=s(t,H))?void 0:n.id)?l:""))?a:O.length}},[O,H]),ee=(0,a.useMemo)(()=>{let e=j;if(C.fav&&(e=e.filter(e=>G.has(e.id))),C.collection){let t=C.collection;e=e.filter(e=>h(e,t,{today:N,imports:V}))}if(C.category&&(e=e.filter(e=>{var t;return(null==(t=s(e,H))?void 0:t.id)===C.category})),C.brand&&(e=e.filter(e=>e.brand===C.brand)),C.band)e=e.filter(e=>{var t;return(null==(t=f(e))?void 0:t.id)===C.band});else if((null!==C.pmin||null!==C.pmax)&&z){var t,n;let l=null!=(t=C.pmin)?t:z.min,a=null!=(n=C.pmax)?n:z.max;e=e.filter(e=>(function(e,t,n){let l=x(e);return l>=t&&l<=n})(e,l,a))}return C.q&&(e=function(e,t,n){let l=t.toLowerCase().split(/\s+/).filter(Boolean);return l.length?e.filter(e=>{var t,a,r,i,o,c;let u=e.categoryIds.map(e=>{var t,l;return null!=(l=null==(t=n.get(e))?void 0:t.name)?l:""}).join(" "),d=null!=(a=null==(t=s(e,n))?void 0:t.name)?a:"",m=[e.name,null!=(r=e.brand)?r:"",null!=(i=e.strain)?i:"",null!=(o=e.strainType)?o:"",u,d,...null!=(c=e.searchWords)?c:[]].join(" ").toLowerCase();return l.every(e=>m.includes(e))}):e}(e,C.q,H)),function(e,t,n,l){let a=[...e],r=(e,t)=>Number(i(t))-Number(i(e));switch(t){case"price-asc":return a.sort((e,t)=>r(e,t)||x(e)-x(t));case"price-desc":return a.sort((e,t)=>r(e,t)||x(t)-x(e));case"name":return a.sort((e,t)=>r(e,t)||e.name.localeCompare(t.name));case"newest":return a.sort((e,t)=>r(e,t)||t.sellable-e.sellable);case"arrivals":{let e=e=>{var t;return null!=(t=l?u(e,l):e.created)?t:""};return a.sort((t,n)=>r(t,n)||e(n).localeCompare(e(t))||t.name.localeCompare(n.name))}default:return a.sort((e,t)=>r(e,t)||(n?n(e)-n(t):0)||e.name.localeCompare(t.name))}}(e,C.sort,Q,{today:N,imports:V})},[j,H,C,Q,z,N,V,G]),et=e=>{S(t=>({...t,...e})),P(24)},en=()=>{S(L),Z(""),P(24)},el=!C.band&&(null!==C.pmin||null!==C.pmax),ea=(0,a.useMemo)(()=>{var e,t;if(!z)return null;let n=I.find(e=>e.id===C.band);if(n){let e=Number.isFinite(n.max)?n.max:z.max;return[Math.max(z.min,n.min),Math.min(z.max,e)]}return[null!=(e=C.pmin)?e:z.min,null!=(t=C.pmax)?t:z.max]},[z,I,C.band,C.pmin,C.pmax]),er=el&&ea?"$".concat(ea[0]," to $").concat(ea[1]):null,es=null!=(c=null==(t=I.find(e=>e.id===C.band))?void 0:t.label)?c:er,ei=+!!C.fav+ +!!C.collection+ +!!C.category+ +!!C.brand+(C.band||el?1:0)+ +!!C.q,eo=C.category?null!=(d=null==(n=O.find(e=>e.id===C.category))?void 0:n.name)?d:"Shop":"Everything",ec=null!=(m=o.find(e=>e.id===C.collection))?m:null,eu=[eo,C.fav?"Favorites":null,null==ec?void 0:ec.label,C.brand,es].filter(Boolean).join(" \xb7 "),ed=+!!C.brand+(C.band||el?1:0),em=(0,a.useMemo)(()=>{let e=function(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);return n.length?e.filter(e=>{let t=e.name.toLowerCase();return n.every(e=>t.includes(e))}):e}(_,U);if(C.brand&&!e.some(e=>e.name===C.brand)){let t=_.find(e=>e.name===C.brand);if(t)return[t,...e]}return e},[_,U,C.brand]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y,{facets:O,total:j.length,selected:C.category,onSelect:e=>et({category:e})}),(0,l.jsxs)("div",{className:"mt-10 lg:mt-12 lg:grid lg:grid-cols-[260px_1fr] lg:gap-12",children:[(0,l.jsxs)("aside",{className:"mb-6 space-y-px bg-cream-06 lg:sticky lg:top-24 lg:mb-0 lg:max-h-[calc(100vh-7rem)] lg:self-start lg:overflow-y-auto",children:[(0,l.jsxs)(B,{title:"Search",children:[(0,l.jsx)("label",{className:"sr-only",htmlFor:"shop-search",children:"Search the shop"}),(0,l.jsxs)("div",{className:"flex gap-px",children:[(0,l.jsx)("input",{id:"shop-search",type:"search",value:C.q,onChange:e=>et({q:e.target.value}),placeholder:"Name, brand, strain",className:"w-full border border-control-line bg-black px-3 py-2.5 font-sans text-[13px] font-light text-cream placeholder:text-cream-35 focus:border-amber focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber"}),(0,l.jsxs)("button",{type:"button","aria-expanded":A,"aria-controls":"shop-refine",onClick:()=>$(e=>!e),className:"shrink-0 border border-cream-15 px-4 font-sans text-[12px] uppercase tracking-[0.12em] text-cream transition-colors duration-400 hover:border-amber hover:text-amber lg:hidden",children:["Filters",ed>0?" (".concat(ed,")"):""]})]})]}),(0,l.jsxs)(F,{title:"Category",summary:C.category?eo:null,className:"hidden lg:block",children:[(0,l.jsx)(R,{label:"Everything",count:j.length,checked:null===C.category,onChange:()=>et({category:null})}),O.map(e=>(0,l.jsx)(R,{label:e.name,count:e.total,checked:C.category===e.id,onChange:()=>et({category:e.id})},e.id))]}),_.length>1||I.length>1?(0,l.jsxs)("div",{id:"shop-refine",className:"space-y-px ".concat(A?"":"hidden"," lg:block"),children:[_.length>1?(0,l.jsxs)(F,{title:"Brand",summary:C.brand,children:[(0,l.jsx)("label",{className:"sr-only",htmlFor:"shop-brand-find",children:"Find a brand"}),(0,l.jsx)("input",{id:"shop-brand-find",type:"search",value:U,onChange:e=>Z(e.target.value),placeholder:"Find a brand",autoComplete:"off",className:"w-full border border-control-line bg-black px-3 py-2 font-sans text-[13px] font-light text-cream placeholder:text-cream-35 focus:border-amber focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber"}),(0,l.jsxs)("div",{className:"-mr-2 max-h-64 space-y-2.5 overflow-y-auto pr-2 pt-1",children:[""===U.trim()?(0,l.jsx)(R,{label:"All brands",checked:null===C.brand,onChange:()=>et({brand:null})}):null,em.map(e=>(0,l.jsx)(R,{label:e.name,count:e.total,checked:C.brand===e.name,onChange:()=>et({brand:e.name})},e.name)),0===em.length?(0,l.jsxs)("p",{className:"font-sans text-[13px] font-light text-cream-60",children:["No brand matches “",U.trim(),"”."]}):null]})]}):null,I.length>1?(0,l.jsxs)(F,{title:"Price",summary:es,children:[z&&ea&&z.max>z.min?(0,l.jsx)(q,{min:z.min,max:z.max,low:ea[0],high:ea[1],onChange:(e,t)=>
1{z&&et({band:null,pmin:e<=z.min?null:e,pmax:t>=z.max?null:t})}}):null,(0,l.jsx)(R,{label:"Any price",checked:null===C.band&&!el,onChange:()=>et({band:null,pmin:null,pmax:null})}),I.map(e=>(0,l.jsx)(R,{label:e.label,count:e.total,checked:C.band===e.id,onChange:()=>et({band:e.id,pmin:null,pmax:null})},e.id))]}):null]}):null,ei>0?(0,l.jsx)("div",{className:"bg-charcoal p-5",children:(0,l.jsx)("button",{type:"button",onClick:en,className:"font-sans text-[12px] uppercase tracking-[0.14em] text-amber transition-colors duration-400 hover:text-amber-light",children:"Clear all filters"})}):null]}),(0,l.jsxs)("div",{children:[Y.length>0||J>0||C.fav?(0,l.jsxs)("div",{className:"mb-px flex flex-wrap items-center gap-x-5 gap-y-3 border border-cream-06 bg-charcoal px-5 py-4",children:[(0,l.jsxs)("div",{role:"group","aria-label":"Collections",className:"flex flex-wrap gap-2",children:[J>0||C.fav?(0,l.jsxs)("button",{type:"button","aria-pressed":C.fav,onClick:()=>et({fav:!C.fav}),className:"inline-flex min-h-9 items-center gap-2.5 border px-4 py-2 font-sans text-[12px] uppercase tracking-[0.12em] transition-colors duration-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber ".concat(C.fav?"border-amber bg-cream-06 text-amber":"border-cream-15 text-cream hover:border-cream-35"),children:[(0,l.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5 shrink-0",fill:C.fav?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M12 20.5s-7.5-4.6-7.5-10.1A4.4 4.4 0 0 1 12 7.6a4.4 4.4 0 0 1 7.5 2.8c0 5.5-7.5 10.1-7.5 10.1z"})}),"Favorites",(0,l.jsx)("span",{className:"font-light normal-case tracking-normal text-cream-35",children:J})]}):null,Y.map(e=>{let t=C.collection===e.id;return(0,l.jsxs)("button",{type:"button","aria-pressed":t,onClick:()=>et({collection:t?null:e.id}),className:"inline-flex min-h-9 items-center gap-2.5 border px-4 py-2 font-sans text-[12px] uppercase tracking-[0.12em] transition-colors duration-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber ".concat(t?"border-amber bg-cream-06 text-amber":"border-cream-15 text-cream hover:border-cream-35"),children:[t?(0,l.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 12 10",className:"h-2.5 w-3 shrink-0",children:(0,l.jsx)("path",{d:"M1 5.2l3.4 3.4L11 1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})}):null,e.label,(0,l.jsx)("span",{className:"font-light normal-case tracking-normal text-cream-35",children:e.count})]},e.id)})]}),ec?(0,l.jsx)("p",{className:"font-sans text-[13px] font-light text-cream-60",children:ec.blurb}):C.fav?(0,l.jsx)("p",{className:"font-sans text-[13px] font-light text-cream-60",children:"Saved in this browser. Tap the heart on any product to add it."}):null]}):null,(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 border border-cream-06 bg-charcoal px-5 py-4",children:[(0,l.jsxs)("p",{className:"font-sans text-[14px] text-cream",children:[eu,(0,l.jsxs)("span",{className:"text-cream-35",children:[" \xb7 ",ee.length," "]}),(0,l.jsx)("span",{className:"text-cream-35",children:1===ee.length?"product":"products"})]}),(0,l.jsx)("div",{className:"flex items-center gap-3",children:(0,l.jsxs)("label",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"font-sans text-[12px] uppercase tracking-[0.12em] text-cream-35",children:"Sort"}),(0,l.jsx)("select",{value:C.sort,onChange:e=>et({sort:e.target.value}),className:"border border-control-line bg-black px-3 py-2 font-sans text-[13px] font-light text-cream focus:border-amber focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber",children:K.map(e=>(0,l.jsx)("option",{value:e.id,children:e.label},e.id))})]})})]}),0===ee.length?(0,l.jsxs)("div",{className:"mt-px border border-cream-06 bg-charcoal px-8 py-20 text-center",children:[(0,l.jsx)("p",{className:"font-serif text-[26px] font-light text-cream",children:"Nothing on the shelf matches that."}),(0,l.jsxs)("p",{className:"mx-auto mt-4 max-w-sm font-sans text-[14px] font-light leading-relaxed text-cream-60",children:["Stock changes through the day. Clear the filters to 
1see everything on the shelf, or call us on"," ",(0,l.jsx)("a",{href:g._.contact.phoneHref,className:"text-amber underline decoration-1 underline-offset-4 transition-colors duration-300 hover:text-amber-light",children:g._.contact.phone})," ","and we will check for you."]}),(0,l.jsx)("button",{type:"button",onClick:en,className:"btn-outline mt-7",children:"Clear filters"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"mt-px grid grid-cols-2 gap-px bg-cream-06 shop-light:bg-transparent md:grid-cols-3 xl:grid-cols-4",children:ee.slice(0,M).map(e=>(0,l.jsx)(E,{product:e},e.id))}),ee.length>M?(0,l.jsx)("div",{className:"mt-10 text-center",children:(0,l.jsxs)("button",{type:"button",onClick:()=>P(e=>e+24),className:"border border-cream-15 px-8 py-3.5 font-sans text-[12px] uppercase tracking-[0.14em] text-cream transition-colors duration-500 ease-luxe hover:border-amber hover:text-amber",children:["Show more (",ee.length-M," left)"]})}):null]})]})]})]})}function B(e){let{title:t,className:n="",id:a,children:r}=e;return(0,l.jsxs)("section",{id:a,className:"bg-charcoal p-5 ".concat(n),children:[(0,l.jsx)("h2",{className:"font-sans text-kicker uppercase tracking-[0.16em] text-cream",children:t}),(0,l.jsx)("div",{className:"mt-4 space-y-2.5",children:r})]})}function F(e){let{title:t,summary:n,className:r="",children:s}=e,[i,o]=(0,a.useState)(!1),c=(0,a.useId)();return(0,l.jsxs)("section",{className:"bg-charcoal ".concat(r),children:[(0,l.jsx)("h2",{children:(0,l.jsxs)("button",{type:"button","aria-expanded":i,"aria-controls":c,onClick:()=>o(e=>!e),className:"group flex w-full items-center gap-3 p-5 text-left",children:[(0,l.jsx)("span",{className:"font-sans text-kicker uppercase tracking-[0.16em] text-cream transition-colors duration-300 group-hover:text-amber",children:t}),n?(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate text-right font-sans text-[12px] font-light text-amber",children:n}):(0,l.jsx)("span",{className:"flex-1"}),(0,l.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 12 8",className:"h-2 w-3 shrink-0 text-cream-60 transition-transform duration-300 ".concat(i?"rotate-180":""),children:(0,l.jsx)("path",{d:"M1 1l5 5 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.4"})})]})}),(0,l.jsx)("div",{id:c,hidden:!i,className:"space-y-2.5 px-5 pb-5",children:i?s:null})]})}function q(e){let{min:t,max:n,low:a,high:r,onChange:s}=e,i=n-t||1,o=(a-t)/i*100,c=(r-t)/i*100;return(0,l.jsxs)("div",{className:"pb-2",children:[(0,l.jsxs)("p",{className:"font-sans text-[13px] font-light text-cream","aria-live":"polite",children:["$",a," to $",r]}),(0,l.jsxs)("div",{className:"price-range relative mt-3 h-5",children:[(0,l.jsx)("div",{className:"absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-cream-15"}),(0,l.jsx)("div",{className:"absolute top-1/2 h-0.5 -translate-y-1/2 bg-amber",style:{left:"".concat(o,"%"),width:"".concat(Math.max(0,c-o),"%")}}),(0,l.jsx)("input",{type:"range",min:t,max:n,step:1,value:a,"aria-label":"Lowest price","aria-valuetext":"$".concat(a),onChange:e=>s(Math.min(Number(e.target.value),r-1),r),className:"absolute inset-0 w-full"}),(0,l.jsx)("input",{type:"range",min:t,max:n,step:1,value:r,"aria-label":"Highest price","aria-valuetext":"$".concat(r),onChange:e=>s(a,Math.max(Number(e.target.value),a+1)),className:"absolute inset-0 w-full"})]}),(0,l.jsxs)("div",{className:"mt-1 flex justify-between font-sans text-[11px] text-cream-35",children:[(0,l.jsxs)("span",{children:["$",t]}),(0,l.jsxs)("span",{children:["$",n]})]})]})}function R(e){let{label:t,count:n,checked:a,onChange:r}=e;return(0,l.jsxs)("label",{className:"flex cursor-pointer items-center gap-2.5 py-0.5",children:[(0,l.jsx)("input",{type:"radio",checked:a,onChange:r,className:"h-3.5 w-3.5 shrink-0 accent-amber"}),(0,l.jsx)("span",{className:"flex-1 font-sans text-[13px] font-light ".concat(a?"text-cream":"text-cream-60"),children:t}),"number"==typeof n?(0,l.jsx)("span",{className:"font-sans text-[11px] text-cream-35",children:n}):null]})}},8267:(e,t,n)=>{"use strict";n.d(t,{MenuIndex:()=>r});var l=n(5155),a=n(2115);function r(e){let{summary:t,children:n}=e,r=(0,a.useRef)(null),s=e=>{var t;window.history.replaceState({...null!=(t=window.history.state)?t:{},...e},"")};return(0,a.useEffect)(()=>{let e=window.history.state,t=r.current;if(!(null==e?void 0:e.shopAZ)||!t)return;t.open=!0;let n=e.shopAZLink;n&&requestAnimationFrame(()=>requestAnimationFrame(()=>{let e=t.querySelector('a[href="'.concat(CSS.escape(n),'"]'));null==e||e.scrollIntoView({block:"center"})}))},[]),(0,l.jsxs)("details",{ref:r,className:"mt-16 border-t border-cream-06 pt-8",onToggle:e=>s({shopAZ:e.currentTarget.open}),onClick:e=>{let t=e.target.closest("a"),n=null==t?void 0:t.getAttribute("href");n&&s({shopAZ:!0,shopAZLink:n})},children:[(0,l.jsx)("summary",{className:"cursor-pointer font-sans text-[12px] uppercase tracking-[0.14em] text-cream-60 transition-colors duration-400 hover:text-amber",children:t}),n]})}},8984:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var l=n(5155),a=n(2115),r=n(1613);function s(e){let{productId:t,productName:n,variant:s="tile"}=e,[i,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1);return((0,a.useEffect)(()=>(o(!0),u((0,r.yP)().includes(t)),(0,r.Ll)(e=>u(e.includes(t)))),[t]),i)?(0,l.jsx)("button",{type:"button","aria-pressed":c,"aria-label":"Save ".concat(n," to favorites"),title:c?"Saved to favorites":"Save to favorites",onClick:()=>{let e=(0,r.dw)(t);null!==e&&u(e)},className:"flex items-center justify-center transition-colors duration-300 hover:text-amber focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber ".concat("tile"===s?"h-9 w-9 bg-black/70 text-cream shop-light:border shop-light:border-cream-15 shop-light:bg-dark/90 shop-light:text-cream":"h-10 w-10 border border-cream-15 text-cream hover:border-amber"),children:(0,l.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-[18px] w-[18px] ".concat(c?"text-amber":""),fill:c?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M12 20.5s-7.5-4.6-7.5-10.1A4.4 4.4 0 0 1 12 7.6a4.4 4.4 0 0 1 7.5 2.8c0 5.5-7.5 10.1-7.5 10.1z"})})}):null}}},e=>{e.O(0,[6394,8666,3052,8441,1255,7358],()=>e(e.s=1317)),_N_E=e.O()}]);

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.