mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
1 line
692 B
JavaScript
1 line
692 B
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[396],{89396:(t,e,n)=>{n.d(e,{searchDocs:()=>s}),n(41758);async function s(t,{indexName:e,onSearch:n,client:s,locale:i,tag:r}){return t.length>0?(function(t){let e=[],n=new Set;for(let s of t)n.has(s.url)||(n.add(s.url),e.push({id:s.url,type:"page",url:s.url,content:s.title})),e.push({id:s.objectID,type:s.content===s.section?"heading":"text",url:s.section_id?`${s.url}#${s.section_id}`:s.url,content:s.content});return e})((n?await n(t,r,i):await s.searchForHits({requests:[{type:"default",indexName:e,query:t,distinct:5,hitsPerPage:10,filters:r?`tag:${r}`:void 0}]})).results[0].hits).filter(t=>"page"===t.type):[]}}}]); |