1import{t as b,b as x,$ as A,U as D}from"./BnowyiiT.js";import{t as y,z as c,c as o}from"./DGxlnW41.js";const F=(r,t=1,e=12,d={},f={})=>{t=y(t),e=y(e);const s={include:1,limit:12},l=c(()=>o(e)||s.limit),m=c(()=>((o(t)||1)-1)*o(l)),p=c(()=>{const n=`${o(r)||"cms-entries"}`,a=o(t)||1,i=o(e)||s.limit;return`${n}:page=${a}:pageSize=${i}`});return b(p,async()=>{const{$cms:n}=x(),a=Object.assign({},s,{...d,limit:l.value,skip:m.value}),{content_type:i,include:u,includeTotal:v=!0,limit:h,order:k,select:w,skip:$,...E}=a;return await n.fetchByType(i,{filters:E,include:u,includeTotal:v,limit:h,order:k,select:w,skip:$})},{deep:!1,watch:[t,e],...f})};async function O(r,t,e){if(!e.content_type){let u="You must provide content type.";throw new Error(u)}r=y(r),t=y(t);const d=A(r.value,t.value,e),f={},{data:s,status:l,error:m,refresh:p}=await F(d,r,t,e,f);if(m.value)throw D({statusCode:500,message:"Unexpected error."});const n=c(()=>s.value?.items||[]),a=c(()=>s.value?.total||0),i=c(()=>{const{total:u=0,limit:v=0,skip:h=0}=s.value??{};return{total:u,limit:v,skip:h}});return{items:n,totalItems:a,meta:i,status:l,error:m,refresh:p}}export{O 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.