PageSourceSearch

https://konst24.se/_next/static/chunks/5146.2225cf7405b189f9.js

js konst24.se collected 2026-10-03 21:37:36 UTC 5,819 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5146],{58578:(e,r,t)=>{t.d(r,{RK:()=>n,yY:()=>l,yr:()=>s}),t(73446);var a=t(70569);function s(e){return(0,a.U)(e,"artwork.by")}function l(e){return(0,a.U)(e,"artwork.contactPriceHidden")}function n(e){return(0,a.U)(e,"artwork.sold")}},80041:(e,r,t)=>{t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),l=t(73321),n=t(98500),o=t.n(n),d=t(12787),i=t(86556),c=t(70569);function u({isOpen:e,onClose:r,locale:t}){let[n,x]=(0,s.useState)(""),[g,m]=(0,s.useState)([]),[h]=(0,s.useState)(()=>(0,c.U)(t,"search.popularTerms").split(",").map(e=>e.trim()).filter(Boolean)),p=(0,l.useRouter)(),k=(0,s.useRef)(null),f=(0,s.useRef)(null);if((0,s.useEffect)(()=>{e&&k.current&&setTimeout(()=>k.current?.focus(),100)},[e]),(0,s.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&r()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,r]),(0,s.useEffect)(()=>{let t=e=>{f.current&&!f.current.contains(e.target)&&r()};return e&&document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[e,r]),(0,s.useEffect)(()=>{let r=n.trim();if(!e||r.length<2)return void m([]);let t=setTimeout(()=>{fetch(`/api/search/suggestions?q=${encodeURIComponent(r)}&limit=8`).then(e=>e.json()).then(e=>{m(Array.isArray(e?.suggestions)?e.suggestions:[])}).catch(()=>m([]))},200);return()=>clearTimeout(t)},[n,e]),!e)return null;let b=g.filter(e=>"artist"===e.type),y=g.filter(e=>"artwork"===e.type);return(0,a.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-start justify-center pt-20 px-4 bg-black/50 backdrop-blur-sm",children:(0,a.jsxs)("div",{ref:f,className:"bg-white dark:bg-gray-800 rounded-lg shadow-2xl w-full max-w-2xl border border-gray-200 dark:border-gray-700",children:[(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault(),n.trim()&&(p.push((0,i.getGalleryHref)(t,`q=${encodeURIComponent(n.trim())}`)),r())},className:"p-6 border-b border-gray-200 dark:border-gray-700",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-gray-400 dark:text-darkText",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,a.jsx)("input",{ref:k,type:"text",value:n,onChange:e=>x(e.target.value),placeholder:(0,c.U)(t,"search.placeholder"),className:"w-full pl-12 pr-4 py-4 text-lg border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText placeholder-gray-500 dark:placeholder-gray-400"})]})}),b.length>0?(0,a.jsxs)("div",{className:"px-6 pt-4",children:[(0,a.jsx)("h3",{className:"text-sm font-bold text-gray-900 dark:text-darkText uppercase tracking-wide mb-3",children:(0,c.U)(t,"search.matchingArtists")}),(0,a.jsx)("ul",{className:"space-y-1",children:b.map(e=>(0,a.jsx)("li",{children:(0,a.jsxs)(o(),{href:(0,i.getArtistProfilePath)(t,e.slug),onClick:r,className:"flex items-center gap-3 rounded-lg px-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-700",children:[e.image?(0,a.jsx)("img",{src:e.image,alt:"",className:"h-10 w-10 rounded-full object-cover"}):(0,a.jsx)("span",{className:"h-10 w-10 rounded-full bg-stone-200 dark:bg-gray-600"}),(0,a.jsx)("span",{className:"font-medium text-gray-900 dark:text-darkText",children:e.title}),(0,a.jsx)("span",{className:"ml-auto text-xs text-blue-600 dark:text-blue-400",children:(0,c.U)(t,"search.viewArtistProfile")})]})},`artist-${e.id}`))})]}):null,y.length>0?(0,a.jsxs)("div",{className:"px-6 pt-4",children:[(0,a.jsx)("h3",{className:"text-sm font-bold text-gray-900 dark:text-darkText uppercase tracking-wide mb-3",children:(0,c.U)(t,"search.matchingArtworks")}),(0,a.jsx)("ul",{className:"space-y-1",children:y.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)(o(),{href:e.artistSlug?(0,i.getArtworkDetailPath)(t,e.artistSlug,e.slug):(0,i.getGalleryHref)(t,`q=${encodeURIComponent(e.title)}`),onClick:r,className:"block rounded-lg px-2 py-2 text-sm text-gray-800 dark:text-darkText hover:bg-gray-100 dark:hover:bg-gray-700",children:e.title})},`artwork-${e.id}`))})]}):null,(0,a.jsx)("div",{className:"px-6 pb-2",children:(0,a.jsx)(d.A,{locale:t,variant:"modal",onNavigate:r})}),(0,a.jsxs)("div",{className:"p-6 pt-2",children:[(0,a.jsx)("h3",{className:"text-sm font-bold text-gray-900 dark:text-darkText uppercase tracking-wide mb-4",children:(0,c.U)(t,"search.popularSearches")}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map((e,s)=>(0,a.jsx)("button",{onClick:()=>{p.push((0,i.getGalleryHref)(t,`q=${encodeURIComponent(e)}`)),r()},className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-darkText rounded-full text-sm font-medium transition-colors duration-200",children:e},s))})]}),(0,a.jsx)("div",{className:"px-6 pb-6 border-t border-gray-200 dark:border-gray-700 pt-4",children:(0,a.jsxs)(o(),{href:(0,i.getGalleryHref)(t,"visual=true"),onClick:r,className:"flex items-center space-x-2 text-blue-600 dar
1k:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:[(0,a.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),(0,a.jsx)("span",{className:"text-sm font-medium underline",children:(0,c.U)(t,"search.tryVisualSearch")})]})})]})})}}}]);

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.