1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5017],{21102:(e,t,n)=>{Promise.resolve().then(n.bind(n,92192))},30254:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var s=n(95155),i=n(12115);function r(e){let t=1e3*e-Date.now();if(t<=0)return null;let n=Math.floor(t/1e3)%60,s=Math.floor(t/6e4)%60,i=Math.floor(t/36e5)%24,r=Math.floor(t/864e5),l=[];return r>0&&l.push("".concat(r,"d")),i>0&&l.push("".concat(i,"h")),s>0&&l.push("".concat(s,"m")),(0===l.length||0===r)&&l.push("".concat(n,"s")),l.join(" ")}function l(e){let{src:t,alt:n}=e,[r,l]=(0,i.useState)(!1);return(0,s.jsx)("img",{className:"h-full w-full object-cover transition-opacity duration-500 ".concat(r?"opacity-100":"opacity-0"),src:t,alt:n,loading:"lazy",onLoad:()=>l(!0)})}function a(e){var t,n;let{auction:a,onEnded:o,onClick:c,staggerDelay:d=0}=e,u=null!=(n=null==(t=a.endTime)?void 0:t._seconds)?n:0,[h,f]=(0,i.useState)(()=>r(u)),[x,m]=(0,i.useState)(0===d);return((0,i.useEffect)(()=>{if(0===d)return void m(!0);let e=setTimeout(()=>m(!0),d);return()=>clearTimeout(e)},[d]),(0,i.useEffect)(()=>{let e=setInterval(()=>{let t=r(u);f(t),null===t&&(clearInterval(e),null==o||o(a.id))},1e3);return()=>clearInterval(e)},[u,a.id,o]),null===h)?null:(0,s.jsxs)("div",{className:"relative w-full cursor-pointer rounded-2xl bg-white/5 pb-1 transition-opacity duration-300 hover:bg-white/10 ".concat(x?"opacity-100":"opacity-0"),children:[(0,s.jsx)("div",{className:"aspect-square w-full cursor-pointer overflow-hidden rounded-2xl bg-white/5 transition-opacity duration-300 ".concat(x?"opacity-100":"opacity-0"),onClick:c,children:a.imageUrl&&(0,s.jsx)(l,{src:a.imageUrl,alt:a.name})}),(0,s.jsxs)("div",{className:"px-2 py-1",children:[(0,s.jsx)("h2",{className:"truncate text-xs leading-tight font-bold md:text-xs",children:a.name}),(0,s.jsxs)("div",{className:"flex-col justify-between pt-1 md:flex-row md:items-end",children:[(0,s.jsx)("p",{className:"text-xs leading-tight md:text-xs",children:function(e,t){let n=e%1==0?e.toLocaleString("de-CH"):e.toLocaleString("de-CH",{minimumFractionDigits:2});return"".concat(t," ").concat(n)}(a.startPrice,a.currency)}),(0,s.jsx)("p",{className:"text-shackGreen text-xs leading-tight md:text-xs",children:h})]})]})]})}},56265:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var s=n(95155),i=n(12115),r=n(24274);let l=["CH","DE","AT","US"];async function a(){try{let e=await fetch("https://ipapi.co/json/");return(await e.json()).country}catch(e){return null}}function o(e){let{open:t,onClose:n}=e,{t:o}=(0,r.Bd)("auctions"),[c,d]=(0,i.useState)(null),[u,h]=(0,i.useState)(null),[f,x]=(0,i.useState)(!0);if((0,i.useEffect)(()=>{t&&(d(function(){let e=navigator.userAgent||navigator.vendor;return/android/i.test(e)?"android":/iPad|iPhone|iPod/.test(e)?"ios":"desktop"}()),a().then(e=>{h(e),x(!1)}))},[t]),!t)return null;let m="desktop"===c,p="ios"===c&&l.includes(null!=u?u:"");return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-8",onClick:n,children:(0,s.jsxs)("div",{className:"glass-effect relative flex w-full max-w-sm flex-col items-center gap-6 rounded-3xl p-8 text-center",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("button",{onClick:n,className:"absolute top-4 right-4 text-xl text-white/60 transition hover:text-white","aria-label":"Close",children:"â"}),(0,s.jsx)("img",{src:"/brand/app-icon.png",alt:"Shack",className:"h-16 w-16 rounded-2xl"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:o("modal.headline")}),(0,s.jsx)("p",{className:"mt-2 text-white/60",children:o("modal.subline")})]}),f&&!m?(0,s.jsx)("p",{className:"text-sm text-white/40",children:o("modal.detecting")}):"android"===c?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,s.jsx)("p",{className:"text-sm text-white/60",children:o("modal.androidSoon")}),(0,s.jsx)("a",{href:"/waitlistSystem",className:"glass-effect glass-hover inline-flex items-center justify-center rounded-full px-6 py-3 text-lg text-white transition",children:o("modal.joinWaitlist")})]}):m||p?(0,s.jsx)("a",{href:"https://apps.apple.com/ch/app/auctionshack-verkauf-kauf/id6471442994",target:"_blank",rel:"noopener noreferrer",className:"glass-effect glass-hover inline-flex items-center justify-center rounded-full px-6 py-3 text-lg text-white transition",children:o("modal.downloadIOS")}):(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,s.jsx)("p",{className:"text-sm text-white/60",children:o("modal.regionNotice")}),(0,s.jsx)("a",{href:"/waitlistRegion",className:"glass-effect glass-hover inline-flex items-center justify-center rounded-full px-6 py-3 text-lg text-white transition",children:o("modal.joinWaitlist")})]})]})})}},92192:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>x});var s=n(95155),i=n(12115),r=n(24274),l=Object.defineProperty,a=new Map,o=new WeakMap,c=0,d=void 0;i.Component;let u=window.location.hostname.includes("--")?"https://us-central1-shackwebsite-24b53.cloudfunctions.net/auctionProxy":"/api/auctions";var h=n(30254),f=n(56265);function x(){let{t:e}=(0,r.Bd)("auctions"),{auctions:t,loading:n,hasMore:l,initialLoad:x,lastBatchStart:m,loadMore:p}=function(){let[e,t]=(0,i.useState)([]),[n,s]=(0,i.useState)(!1),[r,l]=(0,i.useState)(!0),[a,o]=(0,i.useState)(null),[c,d]=(0,i.useState)(!0),[h,f]=(0,i.useState)(0),x=(0,i.useCallback)(async()=>
1{if(!n&&r){s(!0);try{let n=new URLSearchParams({limit:String(12)});a&&n.set("startAfter",a);let s=await fetch("".concat(u,"?").concat(n)),i=await s.json(),r=i.data,c=Math.floor(Date.now()/1e3),d=Array.isArray(r)?r.filter(e=>e.endTime._seconds>c):[];if(Array.isArray(r)&&0!==r.length){var e;t(e=>(f(e.length),[...e,...d])),o(null!=(e=i.nextPageToken)?e:null),(r.length<12||!i.nextPageToken)&&l(!1)}else l(!1)}catch(e){console.error("Failed to fetch auctions:",e),l(!1)}finally{s(!1),d(!1)}}},[n,r,a]);return{auctions:e,loading:n,hasMore:r,initialLoad:c,lastBatchStart:h,loadMore:x}}(),[g,w]=(0,i.useState)(new Set),[v,y]=(0,i.useState)(""),[j,b]=(0,i.useState)(!1),[N,S]=(0,i.useState)(!1),k=(0,i.useRef)(null),C=(0,i.useCallback)(e=>{w(t=>new Set(t).add(e))},[]),E=(0,i.useMemo)(()=>{let e=new Map;for(let s of t){var n;for(let t of null!=(n=s.keywords)?n:[])e.set(t,(e.get(t)||0)+1)}return[...e.entries()].sort((e,t)=>t[1]-e[1]).map(e=>{let[t]=e;return t})},[t]);(0,i.useMemo)(()=>{if(!v.trim())return[];let e=v.trim().toLowerCase();return E.filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[v,E]);let A=t.filter(e=>{if(g.has(e.id))return!1;if(v.trim()){var t,n;let s=v.trim().toLowerCase(),i=null==(t=e.keywords)?void 0:t.some(e=>e.toLowerCase().includes(s)),r=null==(n=e.name)?void 0:n.toLowerCase().includes(s);return i||r}return!0});(0,i.useEffect)(()=>{function e(e){k.current&&!k.current.contains(e.target)&&b(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let{ref:L,inView:M}=function(){var e;let{threshold:t,delay:n,trackVisibility:s,rootMargin:r,root:l,triggerOnce:u,skip:h,initialInView:f,fallbackInView:x,onChange:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[p,g]=i.useState(null),w=i.useRef(m),[v,y]=i.useState({inView:!!f,entry:void 0});w.current=m,i.useEffect(()=>{let e;if(!h&&p)return e=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d;if(void 0===window.IntersectionObserver&&void 0!==s){let i=e.getBoundingClientRect();return t(s,{isIntersecting:s,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}let{id:i,observer:r,elements:l}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var n;return"".concat(t,"_").concat("root"===t?(n=e.root)?(o.has(n)||(c+=1,o.set(n,c.toString())),o.get(n)):"0":e[t])}).toString(),n=a.get(t);if(!n){let s,i=new Map,r=new IntersectionObserver(t=>{t.forEach(t=>{var n;let r=t.isIntersecting&&s.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(n=i.get(t.target))||n.forEach(e=>{e(r,t)})})},e);s=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:r,elements:i},a.set(t,n)}return n}(n),u=l.get(e)||[];return l.has(e)||l.set(e,u),u.push(t),r.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(l.delete(e),r.unobserve(e)),0===l.size&&(r.disconnect(),a.delete(i))}}(p,(t,n)=>{y({inView:t,entry:n}),w.current&&w.current(t,n),n.isIntersecting&&u&&e&&(e(),e=void 0)},{root:l,rootMargin:r,threshold:t,trackVisibility:s,delay:n},x),()=>{e&&e()}},[Array.isArray(t)?t.toString():t,p,l,r,u,h,s,x,n]);let j=null==(e=v.entry)?void 0:e.target,b=i.useRef(void 0);p||!j||u||h||b.current===j||(b.current=j,y({inView:!!f,entry:void 0}));let N=[g,v.inView,v.entry];return N.ref=N[0],N.inView=N[1],N.entry=N[2],N}({threshold:0});return(0,i.useEffect)(()=>{p()},[]),(0,i.useEffect)(()=>{M&&l&&!n&&p()},[M,l,n,p]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex w-full flex-col gap-4 px-4 py-16 md:max-w-7xl",children:[(0,s.jsx)("h1",{className:"text-center text-6xl",children:e("headline")}),(0,s.jsx)("p",{className:"text-center text-xl text-white/60",children:e("subline")})]}),(0,s.jsxs)("div",{className:"w-full px-4 pb-16 md:max-w-7xl",children:[x&&n?(0,s.jsx)("p",{className:"py-8 text-center text-white/60",children:e("loading")}):0===A.length?(0,s.jsx)("p",{className:"py-8 text-center text-white/60",children:e("empty")}):(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 md:grid-cols-6 lg:grid-cols-6",children:A.map(e=>{let n=t.indexOf(e);return(0,s.jsx)(h.A,{auction:e,onEnded:C,onClick:()=>S(!0),staggerDelay:n>=m?(n-m)*60:0},e.id)})}),l&&!x&&(0,s.jsx)("div",{ref:L,className:"flex justify-center py-8",children:n&&(0,s.jsx)("p",{className:"text-white/60",children:e("loading")})})]}),(0,s.jsx)(f.A,{open:N,onClose:()=>S(!1)})]})}}},e=>{e.O(0,[4274,8441,1255,7358],()=>e(e.s=21102)),_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.