PageSourceSearch

https://www.sommpicks.com/_next/static/chunks/455.2b5c3966cdbf9d5e.js

js sommpicks.com collected 2026-10-04 13:23:39 UTC 29,952 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[455],{455:(e,t,s)=>{s.r(t),s.d(t,{default:()=>D});var a=s(5155),r=s(2115),i=s(593),l=s(8410),n=s(772);let o=["downloadListOptions","downloadFullListOptions"],d={chooseMarket:!1,handle:null,market:null,path:null,producerId:null,query:null,sort:null,view:"items"},c=e=>{let t=(e??"").trim().match(/^\/collections\/([^/?#]+)/i);if(!t?.[1])return null;try{return decodeURIComponent(t[1]).trim()||null}catch{return t[1].trim()||null}},u=()=>window.location.search.replace(/^\?/,"")||null,p=()=>(0,l.WV)(window.location.hash),m=e=>e.replace(/[\\/:*?"<>|]+/g,"-").trim();function h(){let{market:e}=(0,i.h)(),[t,s]=(0,r.useState)(null),[l,h]=(0,r.useState)(e),[v,f]=(0,r.useState)("pdf"),[y,b]=(0,r.useState)(d),[w,x]=(0,r.useState)(null),[g,j]=(0,r.useState)(null);(0,r.useEffect)(()=>{let t=t=>{let a=t.target;if(!a)return;let r=a.closest('a[href="#downloadListOptions"], a[href="#downloadFullListOptions"], .download-list');if(r){var i;t.preventDefault();let a=r.getAttribute("href")??"#downloadListOptions",l={chooseMarket:"true"===r.getAttribute("data-download-choose-market"),handle:r.getAttribute("data-download-handle")||c(window.location.pathname),market:(e=>{if(!e)return null;let t=e.getAttribute("data-download-market");return"eu"===t||"us"===t?t:e.closest(".search-tab-eu, .eu-download, #eu-results")?"eu":e.closest(".search-tab, #us-results")?"us":null})(r),path:r.getAttribute("data-download-path")||window.location.pathname||null,producerId:r.getAttribute("data-download-producer-id"),query:r.getAttribute("data-download-query")||u(),sort:r.getAttribute("data-download-sort")||new URLSearchParams(window.location.search).get("sort"),view:"countries"===(i=r.getAttribute("data-download-view")||p())||"producers"===i||"vintages"===i?i:"items"};h(l.market??e),f("pdf"),j(null),x(null),b(l),s("#downloadFullListOptions"===a?"downloadFullListOptions":"downloadListOptions")}};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[e]),(0,r.useEffect)(()=>(document.body.classList.toggle("popup-shown",!!t),()=>{document.body.classList.remove("popup-shown")}),[t]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{w||"Escape"===e.key&&s(null)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[t,w]);let k=()=>{w||(s(null),j(null))},N=(0,r.useMemo)(()=>y.market??l,[y.market,l]),_=t?"downloadFullListOptions"===t?{title:"Download Stocklist",description:y.chooseMarket?"Choose a market and your preferred file format to download the full stocklist.":"Choose your preferred file format and download the full stocklist to review offline."}:"producers"===y.view?{title:"Download Producer Index",description:"Choose your preferred file format and download the current producer index to review offline."}:"vintages"===y.view?{title:"Download Vintage Index",description:"Choose your preferred file format and download the current vintage index to review offline."}:{title:"Download Stocklist",description:"Choose your preferred file format and download the current stocklist to review offline."}:null,S=async(e,t)=>{if(e.preventDefault(),!w){j(null),x(t);try{let e,a,r=(e=>{let t=e.context.market??e.currentMarket,s="downloadFullListOptions"===e.popupId,a=new URLSearchParams,r=new URLSearchParams(e.context.query??u()??"");if(a.set("shop",window.location.hostname||"sommpicks.com"),a.set("market",t),!s){for(let[e,t]of r.entries())(0,n.qt)(e)&&a.append((0,n.Lz)(e),t);let t=e.context.handle??c(e.context.path)??c(window.location.pathname),s=e.context.sort??r.get("sort"),i=e.context.view??p();t&&a.set("handle",t),s&&a.set("sort",s),"items"!==i&&a.set("view",i),e.context.producerId&&a.set("producerId",e.context.producerId)}let i=`/export-${e.selectedType}${"eu"===t?"-eumarket":""}`;return`${i}?${a.toString()}`})({context:y,currentMarket:l,popupId:t,selectedType:v}),i=await fetch(r,{method:"GET",cache:"no-store",credentials:"same-origin"});if(!i.ok)throw Error(`Download failed with status ${i.status}`);let o=await i.blob();if(o.size<=0)throw Error("Download returned an empty file");let d=`SommPicks.${"pdf"===v?"pdf":"xlsx"}`,h=((e,t)=>{let s=m(t)||t;if(!e)return s;let a=e.match(/filename\*\s*=\s*UTF-8''([^;]+)/i);if(a?.[1])return m((e=>{try{return decodeURIComponent(e)}catch{return e}})(a[1].trim().replace(/^"(.*)"$/,"$1")))||s;let r=e.match(/filename\s*=\s*"?([^";]+)"?/i);return r?.[1]&&m(r[1].trim())||s})(i.headers.get("content-disposition"),d);e=window.URL.createObjectURL(o),(a=document.createElement("a")).href=e,a.download=h,a.style.display="none",document.body.appendChild(a),a.click(),a.remove(),window.setTimeout(()=>{window.URL.revokeObjectURL(e)},1e3),x(null),s(null),j(null)}
1catch(e){console.error("Download stocklist failed",e),x(null),j("Unable to download right now. Please try again.")}}};return(0,a.jsx)(a.Fragment,{children:o.map(e=>(0,a.jsx)("div",{className:`popup${t===e?" active":""}`,id:e,onClick:()=>{k()},children:(0,a.jsxs)("section",{className:`section-options section-options-secondary${w===e?" section-options--downloading":""}`,"aria-busy":w===e,onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("header",{className:"section-head",children:[(0,a.jsx)("h3",{children:t===e&&_?_.title:"Download Stocklist"}),(0,a.jsx)("a",{href:"#",className:"popup-close",onClick:e=>{e.preventDefault(),k()}})]}),(0,a.jsx)("div",{className:"section-body",children:(0,a.jsx)("div",{className:"form-download",children:(0,a.jsxs)("form",{action:"?",method:"post",onSubmit:t=>S(t,e),"data-market":N,children:[(0,a.jsxs)("div",{className:"form-entry",children:[(0,a.jsx)("strong",{children:t===e&&y.chooseMarket?"Select a Market & Format":"Select a Format"}),(0,a.jsx)("p",{children:t===e&&_?_.description:"Choose your preferred file format and download the stocklist to review offline."}),t===e&&y.chooseMarket?(0,a.jsxs)("fieldset",{className:"download-market-options",children:[(0,a.jsx)("legend",{children:"Select a Market"}),(0,a.jsxs)("div",{className:"download-market-options__grid",children:[(0,a.jsxs)("div",{className:"download-market-option",children:[(0,a.jsx)("input",{type:"radio",name:`download-market-${e}`,id:`download-market-us-${e}`,value:"us",checked:"us"===l,disabled:w===e,onChange:()=>h("us")}),(0,a.jsxs)("label",{htmlFor:`download-market-us-${e}`,children:[(0,a.jsx)("strong",{children:"SommPicks US"}),(0,a.jsx)("small",{children:"Domestic cellar"})]})]}),(0,a.jsxs)("div",{className:"download-market-option",children:[(0,a.jsx)("input",{type:"radio",name:`download-market-${e}`,id:`download-market-eu-${e}`,value:"eu",checked:"eu"===l,disabled:w===e,onChange:()=>h("eu")}),(0,a.jsxs)("label",{htmlFor:`download-market-eu-${e}`,children:[(0,a.jsx)("strong",{children:"EU Direct"}),(0,a.jsx)("small",{children:"European offers"})]})]})]})]}):null,g?(0,a.jsx)("p",{className:"form-download__error",role:"alert",children:g}):null]}),(0,a.jsx)("div",{className:"form-checks",children:(0,a.jsxs)("ul",{className:"list-radios",children:[(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"radio custom-radio custom-radio-teritary",children:[(0,a.jsx)("input",{type:"radio",name:`list-type-${e}`,id:`form-field-pdf-${e}`,value:"pdf",checked:"pdf"===v,disabled:w===e,onChange:()=>f("pdf")}),(0,a.jsxs)("label",{className:"radio-label",htmlFor:`form-field-pdf-${e}`,children:[(0,a.jsx)("span",{}),"PDF"]})]})}),(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"radio custom-radio custom-radio-teritary",children:[(0,a.jsx)("input",{type:"radio",name:`list-type-${e}`,id:`form-field-excel-${e}`,value:"excel",checked:"excel"===v,disabled:w===e,onChange:()=>f("excel")}),(0,a.jsxs)("label",{className:"radio-label",htmlFor:`form-field-excel-${e}`,children:[(0,a.jsx)("span",{}),"Excel"]})]})})]})}),(0,a.jsx)("div",{className:"form-actions",children:(0,a.jsx)("input",{type:"submit",value:w===e?"Downloading...":"Download",className:"form-btn btn btn-small btn-yellow",disabled:w===e})})]})})}),w===e?(0,a.jsxs)("div",{className:"download-popup__loading",role:"status","aria-live":"polite",children:[(0,a.jsx)("span",{className:"download-popup__spinner","aria-hidden":"true"}),(0,a.jsx)("span",{className:"download-popup__loading-text",children:"Preparing your file..."})]}):null]})},e))})}var v=s(3321),f=s(3930),y=s(854),b=s(5471),w=s(4715),x=s(1006),g=s(5334);let j=[45,58,90,116],k=e=>{let t=e.trim();if(!t)return"/";let[s]=t.replace(/^https?:\/\/[^/]+/i,"").split(/[?#]/,1),a=s||"/";return"/"!==a&&a.endsWith("/")?a.slice(0,-1):a},N=e=>{let t=e.toLowerCase().match(/(\d+(?:\.\d+)?)\s*(ml|l)\b/);if(!t)return 1/0;let s=Number(t[1]);return Number.isFinite(s)?"l"===t[2]?1e3*s:s:1/0};function _({product:e}){let t=(0,r.useMemo)(()=>{let t=(0,w.IS)((0,g.T_)(e));return Array.from(new Set([e.image,t,...e.imageFallbacks??[],(0,w.zs)(null,e.type)].filter(e=>!!e)))},[e]),[s,i]=(0,r.useState)(0),l=t[Math.min(s,t.length-1)],n=(0,w.AS)(l,116,e.type),o=(0,w.yB)(l,j,e.type);return(0,a.jsx)("img",{src:n,srcSet:o,sizes:"(min-width: 750px) 64px, 52px",alt:e.fullTitle,width:116,height:116,loading:"lazy",decoding:"async",onError:()=>{i(e=>Math.min(e+1,t.length-1))}})}function S(){let e=(0,v.usePathname)(),[t,s]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)({title:"",sku:"",isNew:!1,meta:"",url:"",market:"us",breadcrumbs:[],reviewAggregateItems:[]}),[u,p]=(0,r.useState)([]),m=(0,r.useRef)(0),h=(0,r.useRef)(0),j=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{let t=e.target;if(!t)return;let a=t.closest('a[data-buying-options="true"], a[href="#buyingOptions"][data-iwine], a[href="#buyingOptionsMain"][data-iwine], a[href="#buyingOptions"][data-lwin16], a[href="#buyingOptionsMain"][data-lwin16]');if(!a)return;e.preventDefault(),e.stopPropagation();let r=(a.dataset.iwine||"").trim(),i=(a.dataset.lwin16||"").trim(),n=Number.parseInt(a.dataset.productId||a.dataset.id||"",10),d=a.dataset.market,u="eu"===d||"us"===d?d:(0,b.Uf)(),h=/^\d{16}$/.test(i),v=h?i:"us"===u?r:"";if(!v||!Number.isFinite(n)||n<=0)return;m.current+=1;let f=m.current;c({title:a.dataset.masterTitle||"",sku:a.dataset.masterSku||"",isNew:"true"===a.dataset.masterIsNew,meta:a.dataset.masterMeta||"",url:a.dataset.masterUrl||"",market:u,breadcrumbs:(e=>{if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.name&&"string"==typeof e.url)}catch{return[]}})(a.dataset.masterBreadcrumbs),reviewAggregateItems:(e=>{if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.key&&"string"==typeof e.label&&(void 0===e.className||"string"==typeof e.className))}catch{return[]}})(a.dataset.masterReviewAggregate)}),s(!0),l(!0),o(h),p([]);let y=new URLSearchParams({productId:String(n),market:u});y.set(h?"lwin16":"iwine",v),h&&y.set("includeVintages","true"),fetch(`/api/products/buying-options?${y.toString()}
1`,{method:"GET",cache:"no-store"}).then(async e=>e.ok?await e.json():{products:[]}).then(e=>{f===m.current&&p(Array.isArray(e.products)?e.products:[])}).catch(e=>{f===m.current&&(console.error("Failed to load buying options",e),p([]))}).finally(()=>{f===m.current&&l(!1)})};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[]),(0,r.useEffect)(()=>{if(!t)return;h.current=window.scrollY,j.current={overflow:document.body.style.overflow,position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,width:document.body.style.width},document.body.classList.add("sp-modal-open"),document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${h.current}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%";let e=e=>{"Escape"===e.key&&s(!1)};return window.addEventListener("keydown",e),()=>{let t=j.current;document.body.classList.remove("sp-modal-open"),t?(document.body.style.overflow=t.overflow,document.body.style.position=t.position,document.body.style.top=t.top,document.body.style.left=t.left,document.body.style.right=t.right,document.body.style.width=t.width):(document.body.style.removeProperty("overflow"),document.body.style.removeProperty("position"),document.body.style.removeProperty("top"),document.body.style.removeProperty("left"),document.body.style.removeProperty("right"),document.body.style.removeProperty("width")),window.removeEventListener("keydown",e),window.scrollTo({top:h.current,behavior:"auto"})}},[t]);let S=(0,r.useMemo)(()=>{let e=new Map;for(let t of u){let s=t.size?.trim()||"Other",a=t.year?.trim()||"NV",r=n?`${a} \xb7 ${s}`:s,i=e.get(r);i?i.push(t):e.set(r,[t])}for(let t of e.values())t.sort((e,t)=>e.priceCents!==t.priceCents?e.priceCents-t.priceCents:(t.publishedAtUnix??0)-(e.publishedAtUnix??0));let t=Array.from(e.entries());return n?t:t.sort((e,t)=>{let s=N(e[0])-N(t[0]);return 0!==s?s:e[0].localeCompare(t[0])})},[n,u]),C=()=>{m.current+=1,s(!1),l(!1)},A=d.breadcrumbs.length>0||d.reviewAggregateItems.length>0,E=(0,r.useMemo)(()=>d.meta.split(/\s*[|/]\s*/g).map(e=>e.trim()).filter(Boolean),[d.meta]),L=!!d.url&&k(d.url)!==k(e||"/"),P=`sp-buying-options-modal__intro sp-buying-options-modal__intro--product-list-item product-list-item${L?" sp-buying-options-modal__intro--link":""}`,I=(0,a.jsx)("div",{className:P,children:(0,a.jsx)("div",{className:"sp-buying-options-modal__intro-inner",children:(0,a.jsx)("div",{className:"product-wrapper",children:(0,a.jsxs)("div",{className:"product-meta",children:[d.title?(0,a.jsxs)("h4",{children:[d.title,d.sku?(0,a.jsxs)("span",{className:"sku",children:["#",d.sku]}):null,d.isNew?(0,a.jsx)("span",{className:"new-tag",children:"New"}):null]}):null,d.breadcrumbs.length>0?(0,a.jsx)("div",{className:"breadcrumbs",children:d.breadcrumbs.map(e=>(0,a.jsx)("span",{children:e.name},e.url))}):E.length>0?(0,a.jsx)("div",{className:"breadcrumbs",children:E.map((e,t)=>(0,a.jsx)("span",{children:e},`${e}-${t}`))}):null,d.reviewAggregateItems.length>0?(0,a.jsx)("div",{className:"review-aggregate",children:d.reviewAggregateItems.map(e=>(0,a.jsx)("span",{className:e.className||void 0,children:e.label},e.key))}):null]})})})}),$=d.title||d.meta||d.url||A?L?(0,a.jsx)(f.default,{href:d.url,productHandle:d.url.split("/").pop()||"",market:d.market,className:"sp-buying-options-modal__intro-link",onClick:C,preloadOnVisible:!1,children:I}):I:null;return(0,a.jsx)("div",{className:`sp-modal sp-modal--buying-options${t?" is-open":""}`,"aria-hidden":!t,onClick:e=>{let t=window.getSelection();e.target===e.currentTarget&&(!t||t.isCollapsed)&&C()},children:(0,a.jsxs)("section",{className:"sp-modal__panel sp-buying-options-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{type:"button",className:"sp-modal__close","aria-label":"Close buying options dialog",onClick:C}),(0,a.jsxs)("header",{className:"sp-modal__header",children:[(0,a.jsx)("h3",{children:"Select Buying Option"}),(0,a.jsx)("p",{children:"Explore other available vintages, sizes, and formats for this wine."})]}),(0,a.jsxs)("div",{className:"sp-buying-options-modal__top",children:[(0,a.jsxs)("a",{href:"#",className:"popup-back",onClick:e=>{e.preventDefault(),C()},children:[(0,a.jsx)("i",{className:"ico-arrow-left-secondary"}),"back"]}),$?(0,a.jsx)("div",{className:"sp-buying-options-modal__top-content",children:$}):null]}),(0,a.jsx)("div",{className:"sp-buying-options-modal__body",children:i?null:0===S.length?(0,a.jsx)("div",{className:"sp-buying-options-modal__status",children:"No additional buying options available."}):S.map(([e,t])=>(0,a.jsxs)("section",{className:"sp-buying-options-modal__group",children:[(0,a.jsx)("div",{className:"sp-buying-options-modal__group-title",children:e}),(0,a.jsx)("ul",{className:"sp-buying-options-modal__list",children:t.map(e=>{let t,s=(t=e.size,t?.trim()??""),r=e.market??d.market,i=e.inventory<=0||e.priceCents<=0||e.variantId<=0,l=(0,g.$D)(e),n=(0,w.AS)(e.image,200,e.type),{packSize:o}="eu"===r?(0,x.uC)(e.tags):{packSize:null};return(0,a.jsxs)("li",{className:"sp-buying-options-modal__item",children:[(0,a.jsx)(f.default,{href:l,productHandle:e.handle,market:r,className:"sp-buying-options-modal__item-link","aria-label":`View ${e.fullTitle}`,onClick:C,preloadOnVisible:!1}),(0,a.jsxs)("div",{className:"sp-buying-options-modal__item-layout",children:[(0,a.jsx)("div",{className:"sp-buying-options-modal__image",children:(0,a.jsx)(_,{product:e})}),(0,a.jsxs)("div",{className:"sp-buying-options-modal__content",children:[(0,a.jsx)("p",{className:"sp-buying-options-modal__stock",children:e.inventory<=0||e.priceCents<=0?"Sold Out":`${e.inventory>24?"24+":e.inventory} ${e.status??"In Stock"}`}),(0,a.jsxs)("p",{className:"sp-buying-options-modal__meta",children:[s||"Bottle",e.sku?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"separator",children:"|"}),(0,a.jsxs)("span",{children:["#",e.sku]})]}):null]})]}),(0,a.jsx)("div",{className:"sp-buying-options-modal__actions",children:i?(0,a.jsx)("span",{className:"sp-buying-options-modal__action sp-buying-options-modal__action--static is-disabled",children:"SOLD OUT"}):(0,a.jsx)(y.default,{market:r,variantId:e.variantId,productId:e.id,inventory:e.inventory,priceCents:e.priceCents,packSize:o,limitedInventory:e.limitedInventory,tags:e.tags,showPackSizeInfo:!1,productTitle:e.fullTitle,productSku:e.sku,productMeta:[e.type,e.country,e.regi
1on].filter(Boolean).join(" / "),productUrl:l,productImageUrl:n,className:"buy-form sp-buying-options-modal__action",inputName:`buying-options-quantity-${e.variantId}`,inputId:`buying-options-quantity-${e.variantId}`,interactiveDiscountText:!1,stopPropagation:!0})})]})]},e.id)})})]},e))})]})})}var C=s(5848),A=s(8471);function E(){let[e,t]=(0,r.useState)(!1),[s,i]=(0,r.useState)(null),[l,n]=(0,r.useState)("exact");(0,r.useEffect)(()=>{let e=e=>{let s=e.detail;s?.handle&&(i(s),n("exact"),t(!0))};return window.addEventListener(A.B,e),()=>{window.removeEventListener(A.B,e)}},[]),(0,r.useEffect)(()=>{if(!e)return;document.body.classList.add("sp-modal-open");let s=e=>{"Escape"===e.key&&t(!1)};return window.addEventListener("keydown",s),()=>{document.body.classList.remove("sp-modal-open"),window.removeEventListener("keydown",s)}},[e]);let o=(0,r.useMemo)(()=>s?[s.year?.trim(),s.title.trim(),s.size?.trim()].filter(Boolean).join(" ").trim():"",[s]),d=s?.title?.trim()||"",c=s?.vendor?.trim()||"",u=!!s?.accessory;return(0,a.jsx)("div",{className:`sp-modal sp-modal--favorite${e?" is-open":""}`,"aria-hidden":!e,onClick:()=>t(!1),children:(0,a.jsxs)("section",{className:"sp-modal__panel sp-favorite-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{type:"button",className:"sp-modal__close","aria-label":"Close favorites dialog",onClick:()=>t(!1)}),(0,a.jsxs)("header",{className:"sp-modal__header",children:[(0,a.jsx)("h3",{children:"Add to Favorites"}),(0,a.jsx)("p",{children:"Choose how broadly you want to track this wine."})]}),(0,a.jsxs)("form",{className:"sp-favorite-modal__form",onSubmit:e=>{if(e.preventDefault(),!s)return;if((0,C.st)())return void t(!1);let a=u?"exact":"vendor"!==l||c?l:"exact",r=o||s.title||s.handle,i={handle:s.handle,market:s.market,title:r,kind:"exact",iwine:s.iwine??null,lwin16:s.lwin16??null,lwin7:s.lwin7??s.lwin16?.slice(0,7)??null,globalProducerId:s.globalProducerId??null,productId:s.favPid??null,size:s.size??null,wineTitle:s.title,vendor:s.vendor??null,accessory:u};"vintages"===a?(r=d||r,i={handle:s.handle,market:s.market,title:r,kind:"vintages",lwin16:s.lwin16??null,lwin7:s.lwin7??s.lwin16?.slice(0,7)??null,productId:s.favPid??null,wineTitle:d||s.title}):"vendor"===a&&(r=c||r,i={handle:s.handle,market:s.market,title:r,kind:"vendor",globalProducerId:s.globalProducerId??null,productId:s.favPid??null,vendor:c||s.vendor||null}),(0,C.Gm)(i),t(!1)},children:[(0,a.jsxs)("div",{className:"sp-favorite-modal__options",children:[(0,a.jsxs)("div",{className:"sp-favorite-modal__option",children:[(0,a.jsx)("input",{type:"radio",name:"favorite-by",id:"favorite-by-exact",value:"exact",checked:"exact"===l,onChange:()=>n("exact")}),(0,a.jsxs)("label",{className:"sp-favorite-modal__choice",htmlFor:"favorite-by-exact",children:[(0,a.jsx)("span",{className:"sp-favorite-modal__bullet","aria-hidden":"true"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{children:o}),(0,a.jsx)("p",{children:u?"This exact accessory":"This exact wine"})]})]})]}),!u&&d?(0,a.jsxs)("div",{className:"sp-favorite-modal__option",children:[(0,a.jsx)("input",{type:"radio",name:"favorite-by",id:"favorite-by-vintages",value:"vintages",checked:"vintages"===l,onChange:()=>n("vintages")}),(0,a.jsxs)("label",{className:"sp-favorite-modal__choice",htmlFor:"favorite-by-vintages",children:[(0,a.jsx)("span",{className:"sp-favorite-modal__bullet","aria-hidden":"true"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{children:d}),(0,a.jsx)("p",{children:"All vintages and sizes of this wine"})]})]})]}):null,!u&&c?(0,a.jsxs)("div",{className:"sp-favorite-modal__option",children:[(0,a.jsx)("input",{type:"radio",name:"favorite-by",id:"favorite-by-vendor",value:"vendor",checked:"vendor"===l,onChange:()=>n("vendor")}),(0,a.jsxs)("label",{className:"sp-favorite-modal__choice",htmlFor:"favorite-by-vendor",children:[(0,a.jsx)("span",{className:"sp-favorite-modal__bullet","aria-hidden":"true"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{children:c}),(0,a.jsx)("p",{children:"All wines from this producer"})]})]})]}):null]}),(0,a.jsxs)("div",{className:"sp-modal__actions",children:[(0,a.jsx)("button",{type:"button",className:"sp-modal__secondary",onClick:()=>t(!1),children:"Cancel"}),(0,a.jsx)("button",{type:"submit",className:"sp-modal__primary",children:"Add to Favorites"})]})]})]})})}let L={"pre-arrival":"Pre Arrival","in-transit":"In Transit","in-stock-ships":"In Stock Ships"},P={"pre-arrival":[],"in-transit":[],"in-stock-ships":["This wine is in stock and can ship now.","Actual delivery timing depends on destination, service level, and weather-safe shipping windows."]},I=new Set(["pre-arrival","in-transit","in-stock-ships"]);function $(){let[e,t]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=e=>{let s=e.target;if(!s)return;let a=s.closest('a.toggle[href^="#"]');if(!a)return;let r=(a.getAttribute("href")||"").replace("#","").trim();I.has(r)&&(e.preventDefault(),t(r))};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[]),(0,r.useEffect)(()=>
1{if(!e)return;document.body.classList.add("popup-shown");let s=e=>{"Escape"===e.key&&t(null)};return window.addEventListener("keydown",s),()=>{document.body.classList.remove("popup-shown"),window.removeEventListener("keydown",s)}},[e]);let s=s=>(0,a.jsx)("div",{className:`popup popup-status popup-locked popup-fix popup-${"pre-arrival"===s?"prearrival":"in-transit"===s?"intransit":"instock"}${e===s?" active":""}`,id:s,onClick:()=>t(null),"aria-hidden":e!==s,role:"dialog","aria-modal":"true","aria-labelledby":`${s}-title`,children:(0,a.jsxs)("section",{className:"section-products section-cart section-search",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("a",{href:"#",className:"popup-close",onClick:e=>{e.preventDefault(),t(null)}}),(0,a.jsx)("header",{className:"section-head",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsx)("h3",{id:`${s}-title`,children:L[s]})})}),(0,a.jsx)("div",{className:"section-body",children:(0,a.jsx)("div",{className:"container",children:"pre-arrival"===s?(0,a.jsxs)("div",{className:"section-entry rte",children:[(0,a.jsx)("p",{children:"\xa0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{children:'What are "Pre Arrival" wines?'}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["Pre Arrival refers to items that have not yet been shipped to our US warehouse. These items typically take 14-24 weeks to arrive.",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"To offer you the best value, we consolidate shipments from Europe (or elsewhere), constantly balancing timing and cost. We always do our best to provide accurate arrival estimates and to keep you informed throughout the process, but we are not able to offer guaranteed arrival dates on In Transit or Pre Arrival items."]}),(0,a.jsxs)("p",{children:["For questions regarding specific In Transit or Pre Arrival items, please contact us at"," ",(0,a.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),".",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Please note: confirmed order requests for In Transit and Pre Arrival items are final sale and, therefore, not cancellable."]})]})})]})]}):"in-transit"===s?(0,a.jsxs)("div",{className:"section-entry rte",children:[(0,a.jsx)("p",{children:"\xa0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{children:'What are "In Transit" wines?\xa0'}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:(0,a.jsx)("span",{children:"In Transit refers to items that are en route (via air, sea or land) to our warehouse and generally expected to arrive in 3-7 weeks.\xa0"})}),(0,a.jsxs)("p",{children:["In order to offer you the best value, we consolidate shipments from Europe (or elsewhere), constantly balancing timing and cost. We always do our best to offer accurate arrival estimates and to keep you informed throughout the process, but we are not able to offer guaranteed arrival dates on In Transit or Pre Arrival items. For questions regarding specific In Transit or Pre Arrival items, please contact us at ",(0,a.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),(0,a.jsx)("p",{children:(0,a.jsx)("span",{children:"Please note: confirmed order requests for In Transit and Pre Arrival items are final sale and therefore not cancellable."})})]})})]})]}):(0,a.jsx)("div",{className:"section-entry",children:P[s].map(e=>(0,a.jsx)("p",{children:e},e))})})}),(0,a.jsx)("footer",{className:"section-footer",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"popup-actions",children:[(0,a.jsx)("div",{className:"invisible-btn-overlay"}),(0,a.jsx)("input",{type:"submit",value:"GOT IT!",className:"btn btn-gray popup-btn-close",onClick:e=>{e.preventDefault(),t(null)}})]})})})]})},s);return(0,a.jsxs)(a.Fragment,{children:[s("pre-arrival"),s("in-transit"),s("in-stock-ships")]})}function D(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h,{}),(0,a.jsx)($,{}),(0,a.jsx)(E,{}),(0,a.jsx)(S,{})]})}},1006:(e,t,s)=>{s.d(t,{Gg:()=>l,Lr:()=>i,uC:()=>r});let a=e=>{let t=Number.parseInt(e,10);return!Number.isFinite(t)||t<=0?null:t},r=e=>{let t=null,s=null;if(e)for(let r of e.split(",")){let e=r.trim(),i=e.toLowerCase();if(i.startsWith("packsize:")){let r=a(e.slice(e.indexOf(":")+1).trim());if(!r)continue;i.includes("assortment")?s=r:r>1&&(t=r);continue}if(i.startsWith("assortmentpacksize:")){let t=a(e.slice(e.indexOf(":")+1).trim());t&&(s=t)}}let r=t?`Sold in cases of ${t}`:s?`${s} Bottles per case`:null;return{assortmentPackSize:s,packSize:t,packSizeInfoText:r}},i=(e,t)=>{let s=String(e??"").trim(),a=r(t).assortmentPackSize;if(!s||!a||a<=1)return s;let i=s.replace(/^\d+\s*[x×]\s*/i,"").trim();return i?`${a}x${i}`:s},l=(e,t)=>
1"eu"===e?r(t).packSize:null},8410:(e,t,s)=>{s.d(t,{Bd:()=>y,Ez:()=>p,JP:()=>u,Qc:()=>w,WV:()=>h,lh:()=>x,q$:()=>g});var a=s(772),r=s(5471);let i={value:"default",label:"Wine List Sort"},l=[{value:"published_at:DESC",label:"Newest"},{value:"price:ASC",label:"Lowest Price"},{value:"price:DESC",label:"Highest Price"},{value:"title:ASC",label:"Alphabetically, A-Z"},{value:"title:DESC",label:"Alphabetically, Z-A"},{value:"year:ASC",label:"Vintage, Old to New"},{value:"year:DESC",label:"Vintage, New to Old"},{value:"limited_inventory:DESC",label:"Quantity, Most to Least"},{value:"limited_inventory:ASC",label:"Quantity, Least to Most"}],n=[{value:"published_at:DESC",label:"Newest"},{value:"price:ASC",label:"Lowest Price"},{value:"price:DESC",label:"Highest Price"},{value:"title:ASC",label:"Alphabetically, A-Z"},{value:"title:DESC",label:"Alphabetically, Z-A"},{value:"limited_inventory:DESC",label:"Quantity, Most to Least"},{value:"limited_inventory:ASC",label:"Quantity, Least to Most"}],o=[{value:"vendor:ASC",label:"Producer, A-Z"},{value:"vendor:DESC",label:"Producer, Z-A"}],d=[{value:"country:ASC",label:"Country, A-Z"},{value:"country:DESC",label:"Country, Z-A"}],c=[{value:"year:ASC",label:"Vintage, Old to New"},{value:"year:DESC",label:"Vintage, New to Old"}],u=e=>{let t=[];for(let[s,r]of Object.entries(e)){let e=(0,a.Lz)(s);if(void 0!==r){if(Array.isArray(r)){for(let s of r)t.push([e,s]);continue}t.push([e,r])}}return t},p=e=>e.map(([e,t])=>`${encodeURIComponent((0,a.Lz)(e)).replace(/%5B/g,"[").replace(/%5D/g,"]")}=${encodeURIComponent(t).replace(/%3A/g,":").replace(/%2C/g,",")}`).join("&"),m=(e,t,s="")=>{let a=p(t);return a?`${e}?${a}${s}`:`${e}${s}`},h=e=>{let t=e.trim().toLowerCase();return"#producers"===t?"producers":"#vintages"===t?"vintages":"#countries"===t?"countries":"items"},v=e=>e.filter(([e])=>"page"!==e&&"limit"!==e&&"handle"!==e&&"sort"!==e),f=(e,t)=>e.some(([e])=>"market"===e)?e:[...e,["market",t]],y=(e,t,s)=>"producers"===e?o:"vintages"===e?c:"countries"===e?d:t?n:[i,...l],b=(e,t=!1)=>"producers"===e?"vendor:ASC":"vintages"===e?"year:ASC":"countries"===e?"country:ASC":r.Yp,w=(e,t,s,a)=>{let r=y(t,s,a);return e&&r.some(t=>t.value===e)?e:b(t,s)},x=e=>{let t=Array.isArray(e.searchParams.sort)?e.searchParams.sort[0]:e.searchParams.sort,s=w(e.sortValue??t,e.view,e.isAccessories,e.market),a=[...f(v(u(e.searchParams)),e.market),["sort",s],["page","1"]],r="producers"===e.view?"#producers":"vintages"===e.view?"#vintages":"countries"===e.view?"#countries":"";return m(e.path,a,r)},g=e=>{let t=v(u(e.searchParams));e.removeEntry&&(t=t.filter(([t])=>!e.removeEntry?.(t)));let s=[...t=f(t,e.market),...e.extraEntries,["sort",b("items",e.isAccessories)],["page","1"]];return m(e.path,s)}}}]);

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.