PageSourceSearch

https://www.ackermann.ch/assets/turbo/60feea67/ackermannch/_next/s…/chunks/SearchHistory.9dc536896a464209.js

js ackermann.ch collected 2026-09-25 06:17:39 UTC 3,115 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7265],{25976:(e,t,r)=>{r.d(t,{Gx:()=>i,SY:()=>a,Y5:()=>n});var s=r(1651);let a=e=>fetch("string"==typeof e?e:e[0],Array.isArray(e)&&e[1]?{headers:{"x-ec-token":e[1]}}:{}).then(e=>{if(!e.ok)throw Error(`Endpoint: ${e.url} - Status ${e.status}: ${e.statusText}`);return e.json()}),n=e=>`${e}`,i=async(e,{componentName:t})=>{try{let r=await fetch(e,{next:{revalidate:900,tags:[t]}});if(!r.ok)throw Error(`Status ${r.status}: ${r.statusText}`,{cause:{response:await r.text()}});return await r.json()}catch(r){throw r instanceof Error&&s.vF.error({component:t,url:e,error:r},"Error during data fetching"),r}}},67131:(e,t,r)=>{r.r(t),r.d(t,{SearchHistory:()=>b,default:()=>j,deleteResource:()=>k});var s=r(54568),a=r(25599),n=r(85958),i=r(76233),o=r(30720),l=r(1651),c=r(7144),h=r(81610),d=r(25976),u=r(82597),y=r(44615),p=r(4077);let f=({href:e,children:t,onClick:r,onKeyDown:a})=>(0,s.jsx)(p.Link,{href:e,onMouseDown:e=>{e.preventDefault()},className:"flex flex-1 items-center self-stretch",onClick:r,onKeyDown:a,children:(0,s.jsx)("span",{className:"text-size-body-base",children:t})});var x=r(30057),m=r(9426);let g=({children:e,onActivate:t})=>(0,s.jsx)(x.i,{onClick:t,onKeyDown:(0,m.F)("Enter",t),className:"cursor-pointer underline",children:(0,s.jsx)("span",{className:"text-size-body-base",tabIndex:0,role:"button",children:e})}),E=(0,a.YK)({searchHistoryTitle:{id:"search.history.title",defaultMessage:"Deine Suchhistorie"},deletAllEntries:{id:"searchbar.history.delete.all",defaultMessage:"Suchverlauf l\xf6schen"},emptyHistory:{id:"searchbar.history.emptyHistory",defaultMessage:"...steht in Zukunft hier."}}),k=(e,t,r)=>fetch(e,{method:"DELETE",headers:{"x-ec-token":t,"Content-Type":"text/plain;charset=UTF-8"},body:r}).then(e=>e.json()).catch(e=>{l.vF.error(e,"Error on deleting search history items")}),b=({onAccept:e,onAdopt:t,jwtToken:r})=>{let{formatMessage:a}=(0,n.A)(),{apiEndpoints:{historyApiNew:l,historyDeleteAllNew:p}}=(0,o.U)(),{data:b,mutate:j}=(0,i.u)([(0,d.Y5)(l),r],d.SY,{suspense:!0,fallback:[]});if(!Array.isArray(b))throw Error(`invalid history data: ${b}`);let v=t=>()=>{e?.({suggestionUsed:{suggestionType:c.sg.HISTORY,term:t},suggestions:b.map(e=>({suggestionType:c.sg.HISTORY,term:e}))})};return(0,s.jsx)(u.I,{heading:a(E.searchHistoryTitle),children:0===b.length?(0,s.jsx)(x.i,{children:a(E.emptyHistory)}):(0,s.jsxs)(s.Fragment,{children:[b.map(e=>(0,s.jsx)(y.i,{onAdopt:()=>t?.(e),leftIcon:(0,s.jsx)(h.Button,{onClick:()=>j(k((0,d.Y5)(l),r,e),{optimisticData:b.filter(t=>t!==e),rollbackOnError:!0,revalidate:!1}),variant:"icon-flat",className:"rounded-full p-[0.375rem]",size:"base","aria-label":"Close",type:"button",children:(0,s.jsx)("span",{className:"icon-emp-cancel size-4"})}),children:(0,s.jsx)(f,{href:`/s/${e}/?searchHistory=true`,onClick:v(e),onKeyDown:(0,m.F)("Enter",v(e)),children:e})},e)),(0,s.jsx)(g,{onActivate:()=>j(k((0,d.Y5)(p),r),{optimisticData:[],rollbackOnError:!0,revalidate:!1}),children:a(E.deletAllEntries)})]})})},j=b}}]);
2//# sourceMappingURL=SearchHistory.9dc536896a464209.js.map

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.