"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7692],{57692:function(e,t,a){a.d(t,{k6:function(){return highlightMatch}});var r=a(85893),s=a(67294),n=a(23279),o=a.n(n),l=a(85590),i=a(87858),c=a(95463),u=a(74632),d=a(84981),p=a(79836),m=a(1757),h=a(35162),f=a(80853),y=a(40671),v=a(5246),g=a(23217),_=a(87764),x=a(69035),b=a(50125),T=a(39332),O=a(11163),C=a(17193);i.CO.AUTHOR,i.CO.INSTITUTION,i.CO.JOURNAL,i.CO.TOPIC,i.CO.CONCEPT,i.CO.WORK;let N={[i.CO.WORK]:u.Z,[i.CO.INSTITUTION]:d.Z,[i.CO.AUTHOR]:p.Z,[i.CO.JOURNAL]:m.Z,[i.CO.CONCEPT]:h.Z,[i.CO.TOPIC]:f.Z,[i.CO.FIELD]:y.Z,default:v.Z},getAdditionalInfo=e=>{let t=(0,c.vw)(e.id);switch(e.entity_type){case i.CO.AUTHOR:var a;return(null===(a=e.institution_data)||void 0===a?void 0:a.display_name)||(0,C.Zp)(e.primary_id)||t;case i.CO.INSTITUTION:{let a=e.primary_id;if(a){let e=a.replace("https://ror.org/","");return"ROR: ".concat(e)}return t}case i.CO.JOURNAL:return e.publisher||e.issn&&e.issn[0]||t;case i.CO.TOPIC:return e.domain_display_name||"";case i.CO.CONCEPT:return e.description||"";case i.CO.WORK:default:return t}};function highlightMatch(e,t){let a=t.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),s=RegExp("(".concat(a,")"),"gi"),n=e.split(s);return n.map((e,t)=>s.test(e)?(0,r.jsx)("span",{className:"font-medium text-txt-focus",children:e},t):e)}t.ZP=e=>{let{searchString:t,onSearchAll:a,showAutocomplete:n,className:u="",setAutocompleteIsLoading:d,onSelect:p}=e,m=(0,O.useRouter)(),h=(0,T.usePathname)(),[f,y]=(0,s.useState)(-1),v=(0,s.useRef)(null),[C,w]=(0,s.useState)(1),[S,k]=(0,s.useState)([]),I=(0,T.useSearchParams)(),[R,E]=(0,s.useState)(!1),[j,P]=(0,s.useState)(0),[U,{data:L,isLoading:A}]=(0,l.VD)(),D=(0,s.useRef)(null),H=(0,s.useRef)(null),Z=(0,s.useMemo)(()=>S,[S]),q=(0,s.useRef)(o()((e,t,a)=>{e.trim()&&U({query:e,entity:"autocomplete_full",pagination:{page:t,perPage:10}}).unwrap().then(e=>{var t;if("ok"in e&&e.ok&&(null===(t=e.data)||void 0===t?void 0:t.length)){if(k(t=>a?e.data:[...t,...e.data]),a){let t="number"==typeof e.total?e.total:e.total.value;P(t)}let t=a?e.data.length:S.length+e.data.length,r="number"==typeof e.total?e.total:e.total.value;E(t<r)}}).catch(()=>{E(!1),a&&(k([]),P(0))})},300)).current;(0,s.useEffect)(()=>{w(1),k([]),E(!1),P(0),q(t,1,!0),y(-1)},[t,q]),(0,s.useEffect)(()=>{null==d||d(A)},[A,d]);let K=(0,s.useCallback)(()=>{if(!A){let e=C+1;q(t,e,!1),w(e)}},[A,C,q,t]),M=(0,s.useCallback)(e=>{let t;switch(e.entity_type){case i.CO.WORK:t=c.x$.QUERY;break;case i.CO.AUTHOR:t=c.x$.AUTHORS;break;case i.CO.INSTITUTION:t=c.x$.INSTITUTIONS;break;case i.CO.CONCEPT:t=c.x$.CONCEPTS;break;case i.CO.TOPIC:t=c.x$.TOPICS;break;case i.CO.JOURNAL:t=c.x$.SOURCES;break;default:t=c.x$.QUERY}let a=new URLSearchParams((null==I?void 0:I.toString())||"");a.set(t,"".concat(e.title).concat("id"in e?":".concat((0,c.vw)(e.id)):""));let r=(null==h?void 0:h.includes("search"))?h:"".concat(h,"/search");m.push("".concat(r,"?").concat(a.toString())),null==p||p(e)},[p,I,m,h]),Q=(0,s.useCallback)(e=>{if(v.current){let t=null;if(e<Z.length?t=v.current.children[e]:e===Z.length&&R?t=D.current:e===Z.length+1&&(t=H.current),t){let e=v.current,a=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s=0;r.bottom>a.bottom?s=r.bottom-a.bottom+t.offsetHeight:r.top<a.top&&(s=r.top-a.top-t.offsetHeight),e.scrollTop+=s}}},[Z.length,R]),$=(0,s.useCallback)(e=>{if(!t)return;let r=Z.length+2;switch(e.key){case"ArrowDown":e.preventDefault(),y(e=>{let t=e<r-1?e+1:0;return setTimeout(()=>Q(t),0),t});break;case"ArrowUp":e.preventDefault(),y(e=>{let t=e>0?e-1:r-1;return setTimeout(()=>Q(t),0),t});break;case"Enter":if(e.preventDefault(),-1===f)a();else if(f>=0&&f<Z.length){let e=Z[f];M(e._source||{entity_type:i.CO.WORK,title:t})}else f===Z.length?K():f===Z.length+1&&a();break;case"Escape":e.preventDefault(),y(-1)}},[Z,f,t,M,a,K,Q]);return((0,s.useEffect)(()=>{f>=0&&Q(f)},[f,Q]),(0,s.useEffect)(()=>(document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}),[$]),t)?(0,r.jsx)("div",{"data-testid":"search-autocomplete",className:(0,b.cn)("absolute w-full top-0 left-0 right-0 rounded-2xl bg-slate-2 border transition-all duration-200",n?"h-auto pt-12 lg:pt-14 border-border-neutral opacity-100 shadow-[0_3px_11px_2px] shadow-shadow-viewer overflow-y-auto":"h-0 pt-0 border-transparent opacity-0 shadow-none",u),role:"listbox","aria-label":"Search suggestions",onMouseMove:()=>y(-1),children:(0,r.jsxs)("div",{ref:v,"data-testid":"search-autocomplete-results",className:"overflow-y-auto max-h-[700px]",children:[Z.map((e,a)=>{let s=e._source,n=s.entity_type;return(0,r.jsxs)("div",{"data-testid":"autocomplete-item-".concat(a),"aria-selected":f===a,tabIndex:f===a?0:-1,className:(0,b.cn)("flex items-center justify-between gap-2 px-4 py-2 w-full text-txt-focus cursor-pointer",f===a&&"bg-surface-focus",-1===f&&"hover:bg-surface-focus"),onClick:()=>M(s),children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 text-base text-txt-neutral",children:[(0,r.jsx)("div",{children:(()=>{let e=N[s.entity_type]||N.default;return(0,r.jsx)(e,{className:"w-4 h-4 text-icon-focus"})})()}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("span",{className:"txt-txt-neutral",children:highlightMatch(s.title,t)}),(0,r.jsx)("span",{className:"text-txt-subdued italic text-sm truncate",children:getAdditionalInfo(s)})]})]}),n===i.CO.AUTHOR||n===i.CO.INSTITUTION?(0,r.jsx)("p",{className:"font-medium text-sm",children:"Show works by"}):null,n===i.CO.CONCEPT?(0,r.jsx)("p",{className:"font-medium text-sm",children:"Filter by concept"}):null,n===i.CO.TOPIC?(0,r.jsx)("p",{className:"font-medium text-sm",children:"Filter by topic"}):null,n===i.CO.JOURNAL?(0,r.jsx)("p",{className:"font-medium text-sm",children:"Filter by journal"}):null]},a)}),R&&(0,r.jsxs)("div",{ref:D,onClick:K,className:(0,b.cn)("flex items-center justify-between gap-2 px-4 py-3.5 w-full text-txt-neutral hover:bg-surface-focus cursor-pointer",f===Z.length&&"bg-surface-focus",A&&"opacity-50 cursor-not-allowed"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 text-base",children:[A?(0,r.jsx)(g.Z,{className:"w-4 h-4 animate-spin"}):(0,r.jsx)(_.Z,{className:"w-4 h-4"}),(0,r.jsx)("span",{children:A?"Loading more suggestions...":'Show more suggestions for "'.concat(t,'"')})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-txt-focus",children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Press Enter"}),(0,r.jsx)(x.Z,{className:"w-4 h-4"})]})]}),(0,r.jsxs)("div",{onClick:a,ref:H,className:(0,b.cn)("flex items-center justify-between gap-2 px-4 py-3.5 w-full text-txt-neutral hover:bg-surface-focus cursor-pointer",f===Z.length+1&&"bg-surface-focus"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 text-base",children:[(0,r.jsx)(_.Z,{className:"w-4 h-4"}),(0,r.jsxs)("span",{children:["Search all results for"," ",(0,r.jsxs)("span",{className:"font-medium text-txt-focus",children:["“",t,"”"]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-txt-focus",children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Press Enter"}),(0,r.jsx)(x.Z,{className:"w-4 h-4"})]})]})]})}):null}},10849:function(e,t,a){a.d(t,{Z:function(){return useKeyPress}});var r=a(67294);function useKeyPress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{meta:!1,shift:!1,preventDefault:!1},[a,s]=(0,r.useState)(!1),downHandler=a=>{let r=a.metaKey||a.ctrlKey;(!t.meta||r)&&(t.meta||!r)&&(!t.shift||a.shiftKey)&&(t.shift||!a.shiftKey)&&a.key===e&&(t.preventDefault&&a.preventDefault(),s(!0),setTimeout(()=>{s(!1)},0))},upHandler=t=>{t.key===e&&s(!1)};return(0,r.useEffect)(()=>(window.addEventListener("keydown",downHandler),window.addEventListener("keyup",upHandler),()=>{window.removeEventListener("keydown",downHandler),window.removeEventListener("keyup",upHandler)}),[]),a}},95463:function(e,t,a){a.d(t,{Rx:function(){return useSearch},Vn:function(){return h},dR:function(){return n},dg:function(){return f},vw:function(){return shortenRscId},x$:function(){return o},xg:function(){return m}});var r,s,n,o,l=a(67294),i=a(11163),c=a(39332),u=a(85590),d=a(10849),p=a(47062);(r=n||(n={})).CONTENT_NOVELTY="content novelty",r.CONTEXT_NOVELTY="context novelty",(s=o||(o={})).QUERY="query",s.AUTHORS="authors",s.TOPICS="topics",s.FIELDS="fields",s.CONCEPTS="concepts",s.INSTITUTIONS="institutions",s.SOURCES="sources",s.COUNTRIES="countries",s.YEAR="year",s.CONTENT_NOVELTY="content novelty",s.CONTEXT_NOVELTY="context novelty";let m=Object.values(o),h={query:"title",authors:"display_name",topics:"display_name",fields:"subfield_display_name",concepts:"display_name",institutions:"display_name",sources:"display_name"},f=[{label:"Relevance",order:"desc",apiTag:"relevance"},{label:"Newest First",order:"desc",apiTag:"publication_date"},{label:"Oldest First",order:"asc",apiTag:"publication_date"},{label:"Citation Count",order:"desc",apiTag:"cited_by_count"},{label:"Context Novelty",order:"desc",apiTag:"context_novelty_percentile"},{label:"Content Novelty",order:"desc",apiTag:"content_novelty_percentile"}],useSearch=e=>{let t=(0,i.useRouter)(),a=(0,c.usePathname)(),r=(0,d.Z)("Escape"),[s,n]=(0,l.useState)(m.map(t=>{var a,r,s;if("year"===t&&(null==e?void 0:e.has(t))){let a=null===(r=e.get(t))||void 0===r?void 0:r.toString().split(",");return{type:t,searchTerms:(null==a?void 0:a.length)===1?[{term:""},{term:(null==a?void 0:a[0])||""}]:[{term:(null==a?void 0:a[0])||""},{term:(null==a?void 0:a[1])||""}]}}return{type:t,searchTerms:(null==e?void 0:e.has(t))&&null!==(s=null===(a=e.get(t))||void 0===a?void 0:a.toString().split(",").map((e,t)=>({term:0===t?null==e?void 0:e.trim():" ".concat(null==e?void 0:e.trim())})))&&void 0!==s?s:[]}})),[o,h]=(0,l.useState)(f[5]),y=(0,l.useMemo)(()=>s.map(e=>e.type),[s]),[v,{data:g,isLoading:_,isUninitialized:x,error:b}]=(0,u.VD)(),[T,{data:O,isLoading:C,isUninitialized:N,error:w}]=(0,u.dy)(),S=(0,l.useRef)(null),[k,I]=(0,l.useState)(!1),R=(0,l.useMemo)(()=>s.some(e=>"query"!==e.type&&e.searchTerms.length),[s]),[E,j]=(0,l.useState)(1),P=_||C,U=R?N:x,[L,A]=(0,l.useState)({relation:"eq",value:0}),[D,H]=(0,l.useState)("OR"),[Z,q]=(0,l.useState)({totalResults:0}),[K,M]=(0,l.useState)(!0);(0,l.useEffect)(()=>{var t,a,r,l;let i=m.map(t=>{var a,r,s;if("year"===t&&(null==e?void 0:e.has(t))){let a=null===(r=e.get(t))||void 0===r?void 0:r.toString().split(","),s=(null==a?void 0:a.length)===1?["",null==a?void 0:a[0]]:[(null==a?void 0:a[0])||"",(null==a?void 0:a[1])||""];return{type:t,searchTerms:s.map(e=>({term:e}))}}return{type:t,searchTerms:(null==e?void 0:e.has(t))&&null!==(s=null===(a=e.get(t))||void 0===a?void 0:a.toString().split(",").map(e=>{let[t,a]=e.trim().split(":");return{term:t,autocompleteId:a?expandRscId(a):void 0}}))&&void 0!==s?s:[]}}),c=null!==(a=null==e?void 0:e.get("sortby"))&&void 0!==a?a:f[5].apiTag,u=null!==(r=null==e?void 0:e.get("order"))&&void 0!==r?r:f[5].order,d=null!==(l=null===(t=f.find(e=>e.apiTag===c&&e.order===u))||void 0===t?void 0:t.label)&&void 0!==l?l:f[5].label,p={apiTag:c,order:u,label:d};JSON.stringify(s)!==JSON.stringify(i)&&n(i),JSON.stringify(o)!==JSON.stringify(p)&&h(p)},[e,r]),(0,l.useEffect)(()=>{if(!k)return S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{if(E in Z)return;let e=E||1;if(console.log({filters:s,currentPage:E}),R){let t=[],a=[];s.forEach(e=>{if(0!==e.searchTerms.length)switch(e.type){case"year":{let[t,r]=e.searchTerms.map(e=>""===e.term?void 0:new Date(e.term).getTime()),s={entity:"works",field:"publication_date",type:"range"};t&&a.push({...s,operator:"gte",value:t}),r&&a.push({...s,operator:"lte",value:r});break}case"context novelty":case"content novelty":{let t="context novelty"===e.type,[r,s]=e.searchTerms.map(e=>{let{term:t}=e;return isNaN(parseInt(t))?void 0:t.trim()}),n={entity:"works",field:t?"context_novelty_percentile":"content_novelty_percentile",type:"range"};r&&a.push({...n,operator:"gte",value:r}),s&&a.push({...n,operator:"lte",value:s});break}case"countries":e.searchTerms.length>0&&a.push({entity:"works",field:"institutions.country_code",type:"match",value:e.searchTerms.map(e=>e.term).join(" ")});break;case"authors":case"institutions":case"fields":case"sources":case"concepts":case"topics":{let t="authors"===e.type?"authors.author_id":"institutions"===e.type?"institutions.id.keyword":"fields"===e.type?"topics.subfield_id":"sources"===e.type?"best_locations.source_id":"concepts"===e.type?"concepts.concept_id":"topics.topic_id",r="authors"===e.type?"authors.display_name":"institutions"===e.type?"institutions.display_name":"fields"===e.type?"topics.subfield_display_name":"sources"===e.type?"best_locations.display_name":"concepts"===e.type?"concepts.display_name":"topics.display_name",s=e.searchTerms.filter(e=>e.autocompleteId).map(e=>e.autocompleteId),n=e.searchTerms.filter(e=>!e.autocompleteId).map(e=>e.term);s.length>0&&a.push({entity:"works",field:t,type:"match",value:s}),n.length>0&&a.push({entity:"works",field:r,type:"match_phrase",value:n,matchLogic:"authors"===e.type&&"AND"===D?"and":"or"});break}default:{let a="query"===e.type?"works":e.type,r=e.searchTerms.map(e=>e.term).join(", ");t.push({[a]:r})}}}),T({queries:t,filters:a,sort:{field:o.apiTag,order:o.order},pagination:{page:e,perPage:10}})}else{let t=s[0].searchTerms.map(e=>e.term).join(", ");(t.trim()||""===t)&&v({query:t.trim(),entity:"works",sort:{field:o.apiTag,order:o.order},pagination:{page:e,perPage:10}})}},300),()=>{S.current&&clearTimeout(S.current)}},[s,o,v,R,T,E,Z,k,D]),(0,l.useEffect)(()=>{j(1),q({totalResults:0}),M(!0)},[s,o]);let Q=(0,l.useMemo)(()=>{var e,t;let a=R?O:g,r=(null==a?void 0:a.ok)&&(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.length);if(!r)return[];"works"!==a.index&&console.error("Search result was of a different index to 'works', this is unexpected behavior.");let s=null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.map(e=>{var t,a,r,s,n,o;let l=(null===(t=e._source.authors)||void 0===t?void 0:t.map(e=>e.display_name))||[],i=(null===(a=e._source.authors)||void 0===a?void 0:a.map(e=>({name:e.display_name,id:e.author_id,authorWorksCount:e.works_count,authorCitationCount:e.cited_by_count})))||[],c=e._source.work_id,u=e._source.context_novelty_percentile||e._source.content_novelty_percentile?{contextNovelty:e._source.context_novelty_percentile,contentNovelty:e._source.content_novelty_percentile}:void 0;return{title:e._source.title||"Untitled",authors:l,published:!0,publishDate:new Date(e._source.publication_date),sourceUrl:c,score:e._score,citationCount:e._source.cited_by_count,workType:e._source.type,abstract:e._source.abstract||"",authorInfo:i,topics:(null===(r=e._source.topics)||void 0===r?void 0:r.map(e=>({id:e.id,subfieldDisplayName:e.subfield_display_name,subfieldId:e.subfield_id,topicId:e.topic_id,displayName:e.display_name})))||[],doi:e._source.doi||void 0,noveltyScores:u,bestLocations:(null===(s=e._source.best_locations)||void 0===s?void 0:s.map(e=>({license:e.license,citedByCount:e.cited_by_count,publisher:e.publisher,pdfUrl:e.pdf_url,isOa:e.is_oa,sourceId:e.source_id,displayName:e.display_name,worksCount:e.works_count,version:e.version})))||[],locations:(null===(n=e._source.locations)||void 0===n?void 0:n.map(e=>({license:e.license,citedByCount:e.cited_by_count,publisher:e.publisher,pdfUrl:e.pdf_url,isOa:e.is_oa,sourceId:e.source_id,displayName:e.display_name,worksCount:e.works_count,version:e.version})))||[],language:e._source.language,isRetracted:e._source.is_retracted,isParatext:e._source.is_paratext,institutions:(null===(o=e._source.institutions)||void 0===o?void 0:o.map(e=>({countryCode:e.country_code,citedByCount:e.cited_by_count,ror:e.ror,id:e.id,type:e.type,worksCount:e.works_count,displayName:e.display_name})))||[]}});return s||[]},[g,R,O]);(0,l.useEffect)(()=>{if(Q&&!P){let e=R?O:g;if(e&&"ok"in e&&e.ok){q(t=>({...t,[e.page]:Q,totalResults:e.total}));let t="number"==typeof e.total?{relation:"eq",value:e.total}:e.total;A(t);let a="number"==typeof e.total?e.total:e.total.value,r=e.page*e.perPage<a;M(r),console.log("[search pagination] Page ".concat(e.page,": Loaded ").concat(Q.length," results. Has more: ").concat(r))}}},[Q,P,R,O,g]);let $=(0,l.useMemo)(()=>Object.keys(Z).filter(e=>"totalResults"!==e).map(Number).sort((e,t)=>e-t).flatMap(e=>Z[e]||[]),[Z]);return{filters:s,setFilters:n,sort:o,setSort:h,existingFilters:y,currentPage:E,setCurrentPage:j,structuredResults:Z,hasMoreResults:K,isSearching:P,isUnitialized:U,handleSubmit:(r,s)=>{if(null==s||s.preventDefault(),(0,p.Ux)(p.nQ.search),e){let s=new URLSearchParams(e);m.forEach(e=>s.delete(e)),r.forEach(e=>{let t=e.searchTerms.filter(e=>{var t;return(null===(t=e.term)||void 0===t?void 0:t.trim())!==""&&"Invalid Date"!==e.term}).map(e=>{var t;return"".concat(null===(t=e.term)||void 0===t?void 0:t.trim()).concat(e.autocompleteId?":".concat(shortenRscId(e.autocompleteId)):"")});t.length>0&&s.set(e.type,t.join(","))}),Array.from(s.entries()).forEach(e=>{let[t,a]=e;""===a&&s.delete(t)}),s.get("sortby")&&s.get("order")||(s.set("sortby",f[5].apiTag),s.set("order",f[5].order)),(null==a?void 0:a.includes("search"))?t.push("".concat(a,"?").concat(s.toString())):t.push("".concat(a,"/search?").concat(s.toString()))}},handleDeleteFilter:r=>{if(e){let s=new URLSearchParams(e);n(e=>{let t=[...e],a=t.findIndex(e=>e.type===r);return t[a].searchTerms=[],t}),s.delete(r),t.push("".concat(a,"?").concat(s.toString()))}},handleSortChange:r=>{if(e){let s=new URLSearchParams(e);h(r),s.set("sortby",r.apiTag),s.set("order",r.order),t.push("".concat(a,"?").concat(s.toString()))}},navHome:()=>{if(e){let r=new URLSearchParams(e);m.forEach(e=>r.delete(e)),r.delete("sortby"),r.delete("order"),t.push("".concat(a,"?").concat(r.toString()).replace("search?",""))}},searchResults:Q,allResults:$,toggleIsAdjustingFilters:e=>I(t=>null!=e?e:!t),totalHits:L,authorFilterLogicOp:D,setAuthorFilterLogicOp:H}},shortenRscId=e=>null==e?void 0:e.replace("https://openalex.org/",""),expandRscId=e=>(e.startsWith("https://openalex.org/")||(e="https://openalex.org/".concat(e)),e)},85590:function(e,t,a){a.d(t,{VD:function(){return o},dy:function(){return l}});var r=a(14395),s=a(6828);let n=r.hi.injectEndpoints({endpoints:e=>({singleQuerySearch:e.mutation({query:e=>{let{query:t,entity:a,sort:r,pagination:n,filters:o}=e;return{url:s.H.v1.search.singleQuery,body:{query:t,entity:a,sort:r,pagination:n,filters:o},method:"POST",retry:0}},async onQueryStarted(e,t){let{dispatch:a,queryFulfilled:r}=t;try{console.log("[Search API] single - querying",e);let{data:t}=await r}catch(e){console.error(e)}}}),multiQuerySearch:e.mutation({query:e=>{let{queries:t,sort:a,pagination:r,filters:n}=e;return{url:s.H.v1.search.multiQuery,body:{queries:t,sort:a,pagination:r,filters:n},method:"POST",retry:0}},async onQueryStarted(e,t){let{dispatch:a,queryFulfilled:r}=t;try{console.log("[Search API] multi - querying",e);let{data:t}=await r}catch(e){console.error(e)}}})})}),{useSingleQuerySearchMutation:o,useMultiQuerySearchMutation:l}=n}}]);