1import{v as a,x as o,y as l,z as c}from"./app-ClDWgJGR.js";import{_ as n}from"./InstantSearchMixin-DcHVpDAQ.js";import{S as u,a as d,b as f,d as h,A as g,r as m,o as y,u as p}from"./AisStatsAnalytics-DWU9XkSX.js";import"./noop-BxdHCTdT.js";import"./widget-BHJq7wFI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="608c7c93-e0f6-4898-aab7-3e481b9fb6ef",e._sentryDebugIdIdentifier="sentry-dbid-608c7c93-e0f6-4898-aab7-3e481b9fb6ef")}catch{}})();let r=document.activeElement.id;const I={mixins:[n],components:{InstantSearch:p,Hits:y,Configure:m,Autocomplete:g,Index:h,Stats:f,StateResults:d,StatsAnalytics:u},props:{hitsPerPage:{type:Number,default:3},filterQueryString:{type:String}},render(){return this.$slots.default(this)},created(){r??=document.activeElement.id},mounted(){let e=null;r&&(e=this.$el?.parentNode?.querySelector?.("#"+r))&&setTimeout(()=>{requestAnimationFrame(()=>{e?.focus()})}),this.$nextTick(()=>{this.$emit("mounted"),setTimeout(()=>{requestAnimationFrame(()=>{let t=null;r&&(t=this.$el.parentNode.querySelector("#"+r))&&t?.focus()})})});const s=l(t=>{const i=t?.payload?.query;i&&c("post","/search",{q:i,results:t?.payload?.nbHits})},3e3);o(this.$el.nextSibling,"insights-event:viewedObjectIDs",t=>{const i=t.detail.insightsEvent;i?.eventType==="search"&&s(i)})},computed:{searchHistory(){return Object.entries(a.value).sort((e,s)=>Date.parse(s[1].lastSearched)-Date.parse(e[1].lastSearched))}},methods:{async initSearchClient(){const e=await n.methods.initSearchClient.bind(this).call(),s=e.search;return e.search=async t=>t.every(({params:i})=>!i.query)?Promise.resolve({results:t.map(()=>({hits:[],nbHits:0,nbPages:0,page:0,processingTimeMS:0,hitsPerPage:0,exhaustiveNbHits:!1,query:"",params:""}))}):(t=t.map(i=>(i.params.hitsPerPage=i.params.hitsPerPage||this.hitsPerPage,i)),s.bind(e)(t)),e},async getSearchSettings(){return{...await n.methods.getSearchSettings.bind(this).call(),sorting:{default:{field:"_score",key:"default",label:"Default",order:"desc",value:window.config.index.product}}}},async getInstantSearchClientConfig(){const e=await n.methods.getInstantSearchClientConfig.bind(this).call();return e.getBaseFilters=this.getBaseFilters,e},getBaseFilters(){let e=[];return e.push({query_string:{query:"visibility:(3 OR 4) OR (NOT _exists_:visibility)"}}),this.filterQueryString&&e.push({query_string:{query:this.filterQueryString}}),e}}};export{I as default}; 2//# sourceMappingURL=Autocomplete-twS5TlxK.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.