PageSourceSearch

https://www.campbellsci.com/_nuxt/BfE7v1GL.js

js campbellsci.com collected 2026-09-24 18:31:18 UTC 5,448 bytes, 1 lines download raw bytes

1import H from"./Bu8zQJeA.js";import{_ as W}from"./_cF7CpUZ.js";import F from"./DydmrGus.js";import G from"./BGKl6SyO.js";import{U as J,G as O,w as Q,a0 as x,aJ as C,bz as R,ao as f,Q as a,N as n,ap as b,O as i,P as r,b0 as K,a1 as m,aq as U,b2 as X,M as B,aB as Z,aE as h,Y as ee,b5 as te,v as oe}from"./DPjEYeee.js";import ae from"./HNfl-PTo.js";import re from"./UCPWY6Xk.js";import se from"./3_o1nKtp.js";import le from"./H1ahrKl3.js";import ne from"./DLoriMgU.js";import{_ as ie}from"./DpV0svzd.js";import ce from"./DUFVYz29.js";import{u as me}from"./BEGWY7-q.js";import"./ud4_Ojlb.js";import"./zX0r6Ewz.js";import"./hzXG2y6G.js";import"./BsxZF9Js.js";import"./BiJeP6yc.js";import"./4y5ao4b1.js";import"./c06c0GOX.js";import"./DcIqBEt1.js";import"./C3kfGWWI.js";import"./B1aJJIQa.js";import"./D91aNTax.js";import"./CtOQag3_.js";import"./kRIii9yh.js";import"./B9W2LXBV.js";import"./B7MF4u0b.js";import"./CxWgFQGr.js";import"./DONREWDj.js";import"./Dn7Tt3sf.js";import"./C8WGSesc.js";const ue={class:"py-6 space-y-4"},de={class:"mb-8 mt-6"},pe={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},_e={class:"w-full sm:w-80"},fe={class:"flex flex-wrap items-center gap-4"},ge={class:"flex items-center gap-2"},ve={class:"flex flex-wrap gap-2"},be={key:0,class:"space-y-6"},he={class:"text-sm text-muted"},ye={key:0,class:"mt-8 flex justify-center"},u=12,tt=J({__name:"index",async setup(we){let g,y;O({title:"Blog - Campbell Scientific",description:"Your source for useful how-to information and helpful expert advice"});
1const d=Q(),l=x(d.query.search||""),p=x("all"),v=m(()=>Number(d.query.page)||1);C(()=>d.query.search,t=>{l.value=t||""});const{data:w}=([g,y]=R(()=>me()),g=await g,y(),g),P=m(()=>{const t=new Set;return(w.value??[]).forEach(e=>e.categories.forEach(s=>t.add(s))),["all",...Array.from(t).sort()]}),$=m(()=>P.value.map(t=>({label:t==="all"?"All categories":t,value:t}))),c=m(()=>{let t=w.value??[];if(p.value!=="all"&&(t=t.filter(e=>e.categories.includes(p.value))),l.value.trim()){const e=l.value.toLowerCase().trim();t=t.filter(s=>s.title.toLowerCase().includes(e)||(s.teaser??"").toLowerCase().includes(e)||s.categories.some(_=>_.toLowerCase().includes(e))||s.tags?.some(_=>_.toLowerCase().includes(e)))}return t}),k=m(()=>Math.ceil(c.value.length/u)),S=m(()=>{const t=(v.value-1)*u,e=t+u;return c.value.slice(t,e)});C([l,p],()=>{oe({query:{...d.query,page:void 0}},{replace:!0})});const q={root:"ring-0 border-transparent bg-secondary-50",header:"p-4 bg-secondary-200 border-transparent",body:"p-4 bg-secondary-50"};return(t,e)=>{const s=H,_=W,V=F,A=G,L=X,N=ae,E=re,M=K,j=se,z=le,I=ne,T=te,Y=ie,D=ce;return i(),f(b,null,[a(s,{title:"The Campbell Scientific Blog",description:"Your source for useful how-to information and helpful expert advice",ui:{root:"py-0 pt-8 pb-14",container:"mb-8"}}),a(D,null,{default:n(()=>[a(Y,{ui:{left:"py-0 lg:ps-0 lg:pe-0 lg:ms-0 -mt-20"}},{left:n(()=>[a(V,{ui:{root:"overflow-visible"}},{default:n(()=>[r("div",ue,[a(_,{title:"Blog",sidebar:"blog-nav"})])]),_:1})]),default:n(()=>[r("section",de,[a(A,{class:"pt-4 mb-4",items:[{label:"Home",to:"/"},{label:"Blog"}]}),a(M,{variant:"soft",ui:q},{header:n(()=>[r("div",pe,[e[2]||(e[2]=r("h2",{class:"text-lg font-semibold text-highlighted"},"Browse Articles",-1)),r("div",_e,[a(L,{modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=o=>l.value=o),placeholder:"Search articles...",icon:"i-lucide-search","aria-label":"Search blog posts",ui:{root:"w-full",base:"w-full bg-white"}},null,8,["modelValue"])])])]),default:n(()=>[r("div",fe,[r("div",ge,[e[3]||(e[3]=r("span",{class:"text-sm font-medium text-highlighted"},"Category:",-1)),a(N,{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=o=>p.value=o),items:$.value,"value-key":"value","label-key":"label",placeholder:"Select a category",size:"sm",ui:{base:"bg-white min-w-40"}},null,8,["modelValue","items"])]),r("div",ve,[(i(),f(b,null,U(["Weather","Water","Energy","Programming","Installation"],o=>a(E,{key:o,label:o,variant:"subtle",size:"md",class:"cursor-pointer hover:bg-secondary-200",ui:{base:"bg-gold text-secondary-700"},onClick:xe=>l.value=o},null,8,["label","onClick"])),64))])])]),_:1})]),r("section",null,[c.value.length>0?(i(),f("div",be,[r("p",he," Showing "+h((v.value-1)*u+1)+"-"+h(Math.min(v.value*u,c.value.length))+" of "+h(c.value.length)+" articles ",1),a(z,null,{default:n(()=>[(i(!0),f(b,null,U(S.value,o=>(i(),B(j,{key:o.id,to:"/blog/"+o.slug,title:o.title,description:o.teaser??"",date:o.publishedDate??"",image:o.imageUrl??"",authors:o.authors,ui:{root:"rounded-lg overflow-hidden hover:shadow-lg transition-shadow duration-200 border-transparent ring-0 bg-secondary-50",image:"aspect-video overflow-hidden bg-secondary-100",title:"text-secondary",body:"text-secondary/90 justify-start",date:"text-sm text-secondary-500",authors:"border-t border-transparent mt-0",avatar:"hidden"}},null,8,["to","title","description","date","image","authors"]))),128))]),_:1}),k.value>1?(i(),f("div",ye,[a(I,{page:v.value,total:c.value.length,"items-per-page":u,to:o=>({query:{...ee(d).query,page:o>1?o:void 0}})},null,8,["page","total","to"])])):Z("",!0)])):(i(),B(T,{key:1,title:"No articles found",description:"Try adjusting your search or filter criteria.",color:"primary",variant:"subtle",ui:{root:"bg-gold ring-0 border-transparent",title:"text-secondary font-bold",description:"text-secondary/90"}}))])]),_:1})]),_:1})],64)}}});export{tt 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.