PageSourceSearch

https://www.sommpicks.com/_next/static/chunks/2348-98584a81bcb59dad.js

js sommpicks.com collected 2026-10-04 13:23:19 UTC 8,271 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2348],{593:(e,t,a)=>{a.d(t,{A:()=>g,h:()=>E});var n=a(5155),r=a(2115),o=a(3321),s=a(8921),c=a(5471);let i=(0,r.createContext)(null),l="sommpicks:location-change",u={hash:"",pathname:"/",search:""},h=!1,d=u,m=!1,w=()=>{let e={hash:window.location.hash||"",pathname:window.location.pathname||"/",search:window.location.search||""};return d.hash===e.hash&&d.pathname===e.pathname&&d.search===e.search?d:d=e},p=()=>{m||(m=!0,window.setTimeout(()=>{m=!1,window.dispatchEvent(new Event(l))},0))},f=e=>((()=>{if(h)return;h=!0;let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history);window.history.pushState=(...t)=>{e(...t),p()},window.history.replaceState=(...e)=>{t(...e),p()}})(),window.addEventListener(l,e),window.addEventListener("hashchange",e),window.addEventListener("popstate",e),()=>{window.removeEventListener(l,e),window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e)});function E(){let e=(0,r.useContext)(i);if(!e)throw Error("useMarket must be used within a MarketProvider");return e}function g({children:e,initialMarket:t}){let a=(0,r.useSyncExternalStore)(f,w,()=>u),l=(0,o.useRouter)(),h=a.search.startsWith("?")?a.search.slice(1):a.search,d=(0,c.Cm)(new URLSearchParams(h).get("market")),[m,p]=(0,r.useReducer)((e,t)=>t,t),[E,g]=(0,r.useTransition)(),v=(0,r.useRef)(null),y=(0,r.useCallback)(e=>{v.current!==e&&((0,c.OU)(e),v.current=e)},[]),k=(0,r.useCallback)(e=>{p(e),y(e)},[y]);(0,r.useEffect)(()=>{k(d??(()=>{if("u"<typeof document)return null;let e=(0,c.Cm)(document.body?.dataset.market)??(0,c.Cm)(document.documentElement?.dataset.market);return e||(document.body?.classList.contains("market-eu")||document.documentElement?.classList.contains("market-eu")?"eu":document.body?.classList.contains("market-us")||document.documentElement?.classList.contains("market-us")?"us":null)})()??(0,c.Uf)())},[d,a.pathname,h,k]),(0,r.useEffect)(()=>{if(d||"eu"!==m||!a.pathname.includes("/collections/"))return;let e=(0,c.sJ)(a.pathname,new URLSearchParams(h),m),t=`${e}${a.hash}`;t!==`${a.pathname}${a.search}${a.hash}`&&window.history.replaceState(window.history.state,"",t)},[d,a.hash,a.pathname,a.search,m,h]);let $=(0,r.useCallback)((e,t)=>{if(t)return(0,c.DW)(t,e);let n=(0,c.sJ)(a.pathname,new URLSearchParams(h),e);return`${n}${a.hash}`},[a.hash,a.pathname,h]),S=(0,r.useCallback)((e,t)=>{if(E)return;let n=$(e,t?.href),r=`${a.pathname}${a.search}${a.hash}`;k(e),n!==r&&((0,s.r0)(n),g(()=>{l.push(n,{scroll:t?.scroll??!0})}))},[$,E,a.hash,a.pathname,a.search,l,k]);(0,r.useEffect)(()=>{let e={checkURL:()=>{let e=(0,c.Uf)();if(!window.location.pathname.includes("/collections/"))return;let t=(0,c.sJ)(window.location.pathname,new URLSearchParams(window.location.search),e);window.history.replaceState(null,"",`${t}${window.location.hash}`)},goToEUMarket:()=>{S("eu",{href:(0,c.Tr)("eu")})},goToUSMarket:()=>{S("us",{href:(0,c.Tr)("us")})},hideMenu:()=>{},selectEUMarket:()=>{k("eu")},selectMarketAndGo:(e,t)=>{let a=(0,c.Cm)(e);a&&S(a,{href:t})},selectUSMarket:()=>{k("us")},setMarket:e=>{let t=(0,c.Cm)(e.add);t&&k(t)}};return window.EUMarket=e,()=>{window.EUMarket===e&&delete window.EUMarket}},[S,k]);let L=(0,r.useMemo)(()=>({market:m,isSwitchingMarket:E,buildMarketHref:$,switchMarket:S}),[$,E,m,S]);return(0,n.jsx)(i.Provider,{value:L,children:e})}},1286:(e,t,a)=>{a.d(t,{K$:()=>l,Xj:()=>s,lo:()=>u,n6:()=>o,op:()=>c,wB:()=>i});var n=a(5471);let r="https://www.sommpicks.com",o=e=>(0,n.DS)("/pages/account",e),s=e=>(0,n.DS)("/pages/favorites",e),c=(e,t)=>{let a=new URL((0,n.DS)("/pages/order-details",t),r);return a.searchParams.set("id",String(e)),`${a.pathname}${a.search}${a.hash}`},i=e=>(0,n.DS)("/account/logout",e),l=({acrValues:e,locale:t,loginHintMode:a,market:o,popup:s=!1,returnTo:c,loginHint:i})=>{let l=new URL((0,n.DS)("/auth/login",o),r);return c&&l.searchParams.set("return_to",c),i&&l.searchParams.set("login_hint",i),e&&l.searchParams.set("acr_values",e),a&&l.searchParams.set("login_hint_mode",a),t&&l.searchParams.set("locale",t),s&&l.searchParams.set("popup","1"),`${l.pathname}${l.search}${l.hash}`},u=({market:e,returnTo:t,error:a,loggedOut:o=!1})=>{let s=new URL((0,n.DS)("/account/login",e),r);return t&&s.searchParams.set("return_to",t),a&&s.searchParams.set("error",a),o&&s.searchParams.set("logged_out","1"),`${s.pathname}${s.search}${s.hash}`}},2348:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(5155),r=a(2115),o=a(3321),s=a(593),c=a(1286),i=a(9931);function l({autoloadScript:e=!0,buttonClassName:t,className:a,customerAccessToken:l,label:u,onTrigger:h,publicAccessToken:d,publicStoreDomain:m,renderTrigger:w=!0,returnToOverride:p,signInUrlOverride:f,slotContent:E,triggerTabIndex:g,triggerRef:v}){let y=(0,o.usePathname)()||"/",k=(0,o.useSearchParams)(),{market:$}=(0,s.h)(),S=(0,r.useRef)(null);(0,r.useEffect)(()=>{e&&(0,i.m)().catch(e=>{console.error("Failed loading Shopify account component script",e)})},[e]),(0,r.useEffect)(()=>{let t=!1,a=null,n=0,r=e=>{let t=e.querySelectorAll(".stack-inline, .account__shortcuts");
1t.forEach(e=>{e.querySelectorAll('a, button, [role="button"]').forEach(t=>{let a=t.textContent?.replace(/\s+/g," ").trim().toLowerCase()??"",n=t.getAttribute("aria-label")?.replace(/\s+/g," ").trim().toLowerCase()??"",r=t.getAttribute("title")?.replace(/\s+/g," ").trim().toLowerCase()??"",o=t.getAttribute("href")?.toLowerCase()??"";if(!([a,n,r].filter(Boolean).some(e=>"orders"===e||"profile"===e)||o.includes("/orders")||o.includes("/addresses")||o.includes("/profile")))return;let s=t.closest(".account__item-wrapper, .account__item");s&&e.contains(s)?s.remove():t.remove()})}),t.forEach(e=>{0===e.children.length&&e.remove()})},o=()=>{if(t)return;let e=S.current?.shadowRoot;if(!e){n=window.requestAnimationFrame(o);return}r(e),(a=new MutationObserver(()=>{r(e)})).observe(e,{childList:!0,subtree:!0})};return(async()=>{try{e?await (0,i.m)():void 0!==window.customElements&&await window.customElements.whenDefined("shopify-account")}catch(e){console.error("Failed preparing Shopify account control",e);return}o()})(),()=>{t=!0,n&&window.cancelAnimationFrame(n),a?.disconnect()}},[e]);let L=(0,r.useMemo)(()=>{if(f?.trim())return f.trim();let e=k?.toString()??"",t=p?.trim()||(e?`${y}?${e}`:y);return(0,c.K$)({market:$,returnTo:t})},[$,y,p,k,f]),b=w&&t&&u&&E?(0,n.jsx)("button",{ref:v,type:"button",slot:"signed-out-avatar",className:t,"aria-label":u,tabIndex:g,"data-login-gate-ignore":"true",onClick:h,children:E}):null;return(0,r.createElement)("shopify-store",{"customer-access-token":l??void 0,"public-access-token":d,"store-domain":m},(0,r.createElement)("shopify-account",{className:a,"data-login-gate-ignore":"true",ref:S,"sign-in-url":L},b))}},8921:(e,t,a)=>{a.d(t,{j:()=>n,oD:()=>s,r0:()=>c,xH:()=>r});let n="sommpicks:collection-navigation-loading-start",r="sommpicks:collection-navigation-loading-stop",o=e=>{if(""===e.trim())return"/";try{let t=new URL(e,window.location.origin);return`${t.pathname}${t.search}${t.hash}`}catch{return e}},s=e=>{let t=`${window.location.pathname}${window.location.search}${window.location.hash}`;return o(e)!==o(t)},c=e=>(!e||!!s(e))&&(window.dispatchEvent(new Event(n)),!0)},9931:(e,t,a)=>{a.d(t,{m:()=>o});let n="https://cdn.shopify.com/storefront/web-components/account.js",r=null,o=()=>"u"<typeof document||void 0!==window.customElements&&window.customElements.get("shopify-store")&&window.customElements.get("shopify-account")?Promise.resolve():r||(r=new Promise((e,t)=>{let a=document.querySelector(`script[src="${n}"]`),o=()=>{void 0===window.customElements?e():Promise.all([window.customElements.whenDefined("shopify-store"),window.customElements.whenDefined("shopify-account")]).then(()=>e()).catch(t)},s=()=>{r=null,t(Error("Failed to load Shopify account component script."))};if(a)return"true"===a.dataset.loaded?void o():(a.addEventListener("load",o,{once:!0}),void a.addEventListener("error",s,{once:!0}));let c=document.createElement("script");c.src=n,c.type="module",c.async=!0,c.crossOrigin="anonymous",c.dataset.shopifyAccountComponent="true",c.addEventListener("load",()=>{c.dataset.loaded="true",o()},{once:!0}),c.addEventListener("error",s,{once:!0}),document.head.appendChild(c)}))}}]);

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.