1import{b as v}from"./Ds1R8kbg.js";import{M as g,aj as m,c as a,r as l}from"#entry";function s(){window.scrollTo({top:0,left:0,behavior:"instant"})}function f(d={}){const{withQuery:p=!1,itemsPerPage:n=20}=d,r=g(),i=m(),e=a(()=>{const o=r.query;return{query:p&&o.q||void 0,page:Number(o.page)||1,limit:n,sort:v(o.sort),categoryIds:o.categories?o.categories.split(","):void 0,brandIds:o.brands?o.brands.split(","):void 0,promotionIds:o.promotions?o.promotions.split(","):void 0,ratings:o.ratings?o.ratings.split(",").map(Number):void 0,priceMin:o.priceMin?Number(o.priceMin):void 0,priceMax:o.priceMax?Number(o.priceMax):void 0,deliveryTomorrow:o.delivery==="1"?!0:void 0}}),t=l(!1);function c(o){i.replace({query:{...r.query,page:o.page&&o.page>1?String(o.page):void 0,sort:o.sort&&o.sort!=="relevance"?o.sort:void 0,categories:o.categoryIds?.join(",")||void 0,brands:o.brandIds?.join(",")||void 0,promotions:o.promotionIds?.join(",")||void 0,ratings:o.ratings?.join(",")||void 0,priceMin:o.priceMin?.toString()||void 0,priceMax:o.priceMax?.toString()||void 0,delivery:o.deliveryTomorrow?"1":void 0}}),t.value=!1,s()}const u=a({get:()=>e.value.page||1,set:o=>{i.replace({query:{...r.query,page:o>1?String(o):void 0}}),s()}});return{filters:e,filterSidebarOpen:t,currentPage:u,updateFilters:c}}export{f as u};
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.