PageSourceSearch

https://hurmacredit.ru/_nuxt/DBGrJoZE.js

js hurmacredit.ru collected 2026-10-05 22:55:07 UTC 2,329 bytes, 1 lines download raw bytes

1import{ad as q,G as g,ao as C,u as S,J as b,ap as _,af as k,e as A,aq as c}from"./6OxBJoM5.js";import{u as N}from"./i6BRQwNb.js";import"./J_9er0zO.js";const O=q({name:"ContentQuery",props:{path:{type:String,required:!1,default:void 0},only:{type:Array,required:!1,default:void 0},without:{type:Array,required:!1,default:void 0},where:{type:Object,required:!1,default:void 0},sort:{type:Object,required:!1,default:void 0},limit:{type:Number,required:!1,default:void 0},skip:{type:Number,required:!1,default:void 0},locale:{type:String,required:!1,default:void 0},find:{type:String,required:!1,default:void 0}},async setup(n){const{path:t,only:r,without:o,where:i,sort:l,limit:s,skip:d,locale:f,find:p}=C(n),y=A(()=>t.value?.includes("/_")),h=!S().public.content.experimental.advanceQuery;b(()=>n,()=>u(),{deep:!0});const a=e=>h?e?.surround?e.surround:e?._id||Array.isArray(e)?e:e?.result:e.result,{data:v,refresh:u}=await N(`content-query-${_(n)}`,()=>{let e;return t.value?e=c(t.value):e=c(),r.value&&(e=e.only(r.value)),o.value&&(e=e.without(o.value)),i.value&&(e=e.where(i.value)),l.value&&(e=e.sort(l.value)),s.value&&(e=e.limit(s.value)),d.value&&(e=e.skip(d.value)),f.value&&(e=e.where({_locale:f.value})),p.value==="one"?e.findOne().then(a):p.value==="surround"?t.value?h?e.findSurround(t.value):e.withSurround(t.value).findOne().then(a):(console.warn("[Content] Surround queries requires `path` prop to be set."),console.warn("[Content] Query without `path` will return regular `find()` results."),e.find().then(a)):e.find().then(a)});return{isPartial:y,data:v,refresh:u}},render(n){const t=g(),{data:r,refresh:o,isPartial:i,path:l,only:s,without:d,where:f,sort:p,limit:y,skip:h,locale:a,find:v}=n,u={path:l,only:s,without:d,where:f,sort:p,limit:y,skip:h,locale:a,find:v};if(u.find==="one"){if(!r&&t?.["not-found"])return t["not-found"]({props:u,...this.$attrs});if(t?.empty&&r?._type==="markdown"&&!r?.body?.children.length)return t.empty({props:u,...this.$attrs})}else if((!r||!r.length)&&t?.["not-found"])return t["not-found"]({props:u,...this.$attrs});return t?.default?t.default({data:r,refresh:o,isPartial:i,props:u,...this.$attrs}):((m,w)=>k("pre",null,JSON.stringify({message:"You should use slots with <ContentQuery>!",slot:m,data:w},null,2)))("default",{data:r,props:u,isPartial:i})}}),j=O;export{j as default};

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.