1import{_ as j}from"./BL5rIW0A.js";import{o as a,c as l,a as t,t as f,F as y,h as v,b as M,l as L,m as b,k as I,g as N,C as D,x as $,B as P,D as V,j as R,A as O,p as k,z as U,s as Y,y as E,i as G}from"./ClflXjMl.js";import{_ as z}from"./DK4uKKYP.js";import{_ as F}from"./DlAUqK2U.js";import{q as H}from"./R_GyjEGD.js";import"./DHIpiif9.js";import"./B6fGrA7M.js";import"./bPssbgoV.js";import"./Bs84hzBu.js";import"./DFbw2Je1.js";const Q={class:"text-left"},Z={class:"px-4 text-gray-800 mt-4 bg-gray-100 border-l-4 border-primary/80 text-sm rounded-sm"},W={class:"px-4 py-2 font-normal w-full"},J={class:"py-2 px-4"},K={class:"px-2 text-center"},X=["textContent"],tt={class:"px-2 text-center"},et=["textContent"],st={class:"px-2 text-center"},nt=["textContent"],ot={key:0},rt={__name:"TablePublications",props:{list:{type:Array,required:!0},date:{type:String,default:""}},setup(g){const c=g,w=b(()=>[...c.list].filter(i=>i.date?.slice(0,7)===c.date?.slice(0,7)).sort((i,n)=>{const u=parseInt(i.issue);return parseInt(n.issue)-u}));function _(i){return i?i.replace(/(\d)-(\d)/g,"$1â$2"):""}function m(i){return i?new Date(i+"T00:00:00").toLocaleDateString("en-US",{year:"numeric",month:"long"}):""}return(i,n)=>{const u=j;return a(),l("table",null,[t("thead",Q,[t("tr",Z,[t("th",W,f(m(g.date)),1),n[0]||(n[0]=t("th",{class:"px-2 py-2 font-normal"},"Pages",-1)),n[1]||(n[1]=t("th",{class:"px-2 py-2 font-normal text-center"},"Publication",-1)),n[2]||(n[2]=t("th",{class:"px-2 py-2 font-normal text-center"},"Date",-1))])]),t("tbody",null,[(a(!0),l(y,null,v(w.value,(r,C)=>(a(),l(y,{key:r._path},[t("tr",null,[t("td",J,[M(u,{publication:r},null,8,["publication"])]),t("td",K,[t("span",{class:"text-xs text-gray-500 whitespace-nowrap",textContent:f(_(r.pagination))},null,8,X)]),t("td",tt,[t("span",{class:"text-xs text-gray-500 whitespace-nowrap",textContent:f(r.issue)},null,8,et)]),t("td",st,[t("span",{class:"text-xs text-gray-500 whitespace-nowrap",textContent:f(r.date)},null,8,nt)])]),C!==g.list.length-1?(a(),l("tr",ot,[...n[3]||(n[3]=[t("td",{colspan:"4",class:"px-4 py-1"},[t("div",{class:"h-px bg-gray-200 mx-auto"})],-1)])])):L("",!0)],64))),128))])])}}},at={},lt={class:"bg-neutral-100 text-neutral-800 text-base text-center py-2 px-4 border-b border-t border-yellow-900 font-serif flex items-center justify-center space-x-2 mb-10"};function it(g,c){return a(),l("div",lt,[...c[0]||(c[0]=[I('<svg class="w-4 h-4 text-red-800 flex-shrink-0 animate-pulse" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M7.022 1.566a1.5 1.5 0 0 1 1.956 0l5.853 11.667A1.5 1.5 0 0 1 13.55 16H2.45a1.5 1.5 0 0 1-1.282-2.267L7.022 1.566Z"></path></svg><p class="text-sm text-red-800 font-serif"> The <strong class="font-semibold">Insecta Mundi</strong> publication list is currently being uploaded. Not all papers are available just yet, but we're diligently working to add the remaining ones soon. Thanks for your patience and understanding! </p><svg class="w-4 h-4 text-red-800 flex-shrink-0 animate-pulse" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true"><path d="M7.022 1.566a1.5 1.5 0 0 1 1.956 0l5.853 11.667A1.5 1.5 0 0 1 13.55 16H2.45a1.5 1.5 0 0 1-1.282-2.267L7.022 1.566Z"></path></svg>',3)])])}const ut=Object.assign(F(at,[["render",it]]),{__name:"InsectaMundiTemporaryBanner"}),dt={class:"container mx-auto px-8 my-10 font-serif"},ct={class:"relative"},pt={class:"flex-1"},xt={class:"bg-gray-100 border border-gray-300 p-3 rounded shadow mb-8 flex flex-col lg:flex-row gap-4 items-center justify-between mt-8"},mt=["value"],ht={class:"flex flex-col lg:flex-row lg:items-stretch gap-8"},ft={class:"w-full"},gt={class:"w-full space-y-4"},_t=["onClick"],yt={class:"text-lg text-gray-800 font-medium"},wt={key:0},qt={__name:"index",async setup(g){let c,w;const _=([c,w]=N(()=>H("insecta_mundi").where({date:{$ne:null}}).sort({date:-1}).find()),c=await c,w(),c),m=O(),i=U(),n=k(""),u=k(),r=k(new Set);function C(o){r.value.has(o)?r.value.delete(o):r.value.add(o)}const S=b(()=>{const o=B(A.value,4);
1return o.forEach(e=>{e[1]=B(e[1],7)}),o});function B(o,e){const h=o.reduce((s,p)=>{const x=p.date?.slice(0,e);return s[x]||(s[x]=[]),s[x].push(p),s},{});return Object.entries(h).sort(([s],[p])=>p-s)}const q=b(()=>{const o=_.map(d=>d.date?.slice(0,7));return[...new Set(o)].sort((d,s)=>s.localeCompare(d)).map(d=>({label:new Date(`${d}-01T00:00:00`).toLocaleDateString("en-US",{year:"numeric",month:"long"}),date:d}))}),A=b(()=>{const o=n.value.toLowerCase();return _.filter(e=>{const h=n.value===""||e.title?.toLowerCase().includes(o)||e.categories?.some(s=>s.toLowerCase().includes(o))||e.authors?.some(({first_name:s,last_name:p,suffix:x})=>`${s} ${p} ${x}`.toLowerCase().includes(o)),d=!u.value||e.date?.startsWith(u.value);return h&&d})});return D(S,o=>{r.value=new Set,o.forEach(([e])=>{r.value.has(e)||r.value.add(e)})},{deep:!0}),m.query.month&&(u.value=m.query.month),m.query.search&&(n.value=m.query.search),D([u,n],()=>{i.replace({query:{month:u.value,search:n.value}})}),(o,e)=>{const h=rt,d=z;return a(),l("section",null,[t("div",dt,[t("div",ct,[t("div",null,[M(ut),e[2]||(e[2]=t("h1",{class:"text-4xl font-bold text-gray-800"},"Insecta Mundi",-1)),e[3]||(e[3]=t("h2",{class:"text-xl text-gray-500 mt-1 tracking-wide italic"}," Publication Archive ",-1))]),e[4]||(e[4]=t("div",{class:"mt-2 text-sm text-gray-400 italic"}," paper ISSN 0749-6737 · CD-ROM 1942-1362 · online 1942-1354 ",-1))]),t("div",pt,[t("div",xt,[$(t("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>n.value=s),placeholder:"Search by title, author, or category...",class:"px-2 w-full lg:w-1/4 p-1 border border-gray-300 rounded text-sm bg-white"},null,512),[[P,n.value]]),$(t("select",{"onUpdate:modelValue":e[1]||(e[1]=s=>u.value=s),class:"w-full lg:w-1/4 p-1 border border-gray-300 bg-white rounded text-sm"},[e[5]||(e[5]=t("option",{value:void 0},"All Dates",-1)),(a(!0),l(y,null,v(q.value,({date:s,label:p})=>(a(),l("option",{key:s,value:s},f(p),9,mt))),128))],512),[[V,u.value]])])]),t("div",ht,[t("div",ft,[t("ul",gt,[(a(!0),l(y,null,v(S.value,([s,p])=>(a(),l("li",{key:s},[t("div",{class:"flex items-center justify-between px-4 py-3 bg-quaternary/20 border-l-4 border-quaternary/80 cursor-pointer rounded-sm",onClick:x=>C(s)},[t("h2",yt,f(s),1),(a(),l("svg",{xmlns:"http://www.w3.org/2000/svg",class:Y(["w-5 h-5 transform transition-transform duration-300",{"rotate-180":r.value.has(s)}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...e[6]||(e[6]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 15l7-7 7 7"},null,-1)])],2))],8,_t),$(t("div",null,[(a(!0),l(y,null,v(p,([x,T])=>(a(),G(h,{key:x,class:"my-2",list:T,date:x},null,8,["list","date"]))),128))],512),[[E,r.value.has(s)]])]))),128))]),R(_).length?L("",!0):(a(),l("p",wt,"No articles found."))]),M(d)])])])}}};export{qt 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.