1import{w as B,s as D,c as P,_ as Q,o as Y,h as O,q as Z,b as M,u as ee}from"./9JYzwI1J.js";import{_ as te,n as j,a as se}from"./DsR0EJ2T.js";import{d as A,m as I,c as u,o as i,F as q,k as $,i as g,j as f,u as a,w as z,f as n,t as c,r as ne,n as L,l as w,a as F,b as ie,T as ae,q as V,v as U}from"./BC1fSk-i.js";import{u as G}from"./tew4WMd_.js";import{_ as le}from"./XMkg9UG9.js";import{u as H}from"./DXqUtDiP.js";const oe=["innerHTML"],re={key:0,class:"ms-3 py-1 px-2 bg-gray-200 text-xs rounded-lg"},E=A({__name:"Head",props:{item:{type:Object,required:!0}},setup(e){const t=B(),{journalId:p}=D(P()),s=e,l=I(()=>{const o=s.item.pdfUrl;return`pdf/${p.value}/articles/${s.item.articleId}/${o}`}),d=I(()=>s.item.articleType=="Other"||s.item.articleType=="DiÄer"?!0:s.item.isOnlyPdf),y=I(()=>d.value?l.value:t(`/articles/${s.item.slug}/doi/${s.item.articleId}`)),v=I(()=>{if(d.value)return"_blank"});return(o,m)=>{const r=Q,b=te;return i(),u(q,null,[$(r,{to:a(y),class:"font-semibold text-gray-700 hover:text-sky-600",target:a(v)},{default:z(()=>[n("span",{innerHTML:e.item.title},null,8,oe),a(d)?(i(),u("span",re,c(o.$t("pdfArticle")),1)):f("",!0)]),_:1},8,["to","target"]),e.item.authors?(i(),g(b,{key:0,authors:e.item.authors,class:"my-4 px-3"},null,8,["authors"])):f("",!0)],64)}}}),R=A({__name:"Button",props:{url:{type:String},target:{type:String},icon:{type:String},iconClass:{type:String},label:{type:String}},setup(e){return(t,p)=>{const s=O,l=Y;return i(),g(l,{to:e.url,target:e.target},{default:z(()=>[e.icon?(i(),g(s,{key:0,name:e.icon,class:L(e.iconClass)},null,8,["name","class"])):f("",!0),ne(t.$slots,"default",{},()=>[w(c(e.label),1)])]),_:3},8,["to","target"])}}}),ce={class:"flex items-center text-gray-600 text-xs font-normal gap-1"},ue={class:"flex-1 flex items-center gap-5"},me={key:0},de={class:"font-semibold"},pe={key:1},fe={class:"font-semibold"},ye={key:2},ve={class:"font-semibold"},be={key:3},_e={class:"font-semibold"},he={key:4},$e={class:"font-semibold"},ge=A({__name:"Dates",props:{item:{type:Object,required:!0}},setup(e){return(t,p)=>{var l,d,y,v,o,m,r;const s=O;return i(),u("div",ce,[$(s,{name:"fa6-solid:calendar-days"}),n("div",ue,[e.item.receivedDate?(i(),u("div",me,[w(c(t.$t("receivedDate"))+": ",1),n("span",de,c(("normalizeDate"in t?t.normalizeDate:a(j))((l=e.item)==null?void 0:l.receivedDate)),1)])):f("",!0),e.item.acceptedDate?(i(),u("div",pe,[w(c(t.$t("acceptedDate"))+": ",1),n("span",fe,c(("normalizeDate"in t?t.normalizeDate:a(j))((d=e.item)==null?void 0:d.acceptedDate)),1)])):f("",!0),e.item.onlineDate?(i(),u("div",ye,[w(c(t.$t("onlineDate"))+": ",1),n("span",ve,c(("normalizeDate"in t?t.normalizeDate:a(j))((y=e.item)==null?void 0:y.onlineDate)),1)])):f("",!0),(v=e.item)!=null&&v.publishDate?(i(),u("div",be,[w(c(t.$t("publishDate"))+": ",1),n("span",_e,c(("normalizeDate"in t?t.normalizeDate:a(j))((o=e.item)==null?void 0:o.publishDate)),1)])):f("",!0),(m=e.item)!=null&&m.epubDate?(i(),u("div",he,[w(c(t.$t("epubDate"))+": ",1),n("span",$e,c(("normalizeDate"in t?t.normalizeDate:a(j))((r=e.item)==null?void 0:r.epubDate)),1)])):f("",!0)])])}}}),xe={class:"shadow-lg bg-white absolute z-30 -top-[61px] -left-[1px] w-full border border-gray-100 rounded-lg p-6 md:px-7"},Ie={class:"absolute right-3 top-3"},ke={class:"md:flex gap-6 items-center text-xs font-medium text-gray-500 mb-1 mt-4"},we={class:"mt-2 md:mt-0"},De={class:"my-3"},Ae={class:"flex justify-end items-center gap-2 mt-3"},Ce={class:"border-t pt-4 quickviewabstract"},Te={key:0,class:"flex items-center justify-center"},je={class:"text-gray-500 ms-2 text-sm"},qe={key:1},ze=A({__name:"QuickView",props:{item:{type:Object,required:!0}},setup(e){const t=B(),p=F(!0),{journalId:s,currentIssueId:l,abbreviation:d}=D(P()),{issue:y,currentIssue:v}=D(G()),o=e;I(()=>l.value==o.item.issueId?v.value:y.value);const m=Z(),{articleId:r,abstract:b,abbreviation:k}=D(m),{locale:C}=M();ie(async()=>{(r.value??void 0)!==o.item.articleId&&(m.reset(),await $fetch(`/api/journal-content/${s.value}/articles/${o.item.articleId}`,{query:{lang:C.value}}).then(_=>{_&&m.setArticle(_)})),p.value=!1});const T=I(()=>t(`/articles/${o.item.slug}/doi/${o.item.articleId}`));return(_,x)=>{const h=O,J=E,K=ge,N=R,W=se;return i(),u("div",null,[n("div",{class:"fixed z-20 w-full h-full inset-0 bg-black bg-opacity-35",onClick:x[0]||(x[0]=S=>_.$emit("close-quick-view"))}
1),(i(),g(ae,{appear:"",key:e.item.articleId,"enter-active-class":"transition-opacity duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-150","leave-from-class":"opacity-100","leave-to-class":"opacity-50"},{default:z(()=>{var S;return[n("div",xe,[n("div",Ie,[n("button",{onClick:x[1]||(x[1]=X=>_.$emit("close-quick-view"))},[$(h,{name:"material-symbols:close",class:"text-gray-500 cursor-pointer"})])]),n("div",ke,[n("div",null,c(a(k)),1),n("div",we,"DOI: "+c((S=e.item)==null?void 0:S.doi),1)]),$(J,{item:e.item},null,8,["item"]),n("div",De,[$(K,{item:e.item},null,8,["item"]),n("div",Ae,[$(N,{onClick:x[2]||(x[2]=X=>("useCitePanel"in _?_.useCitePanel:a(ee))().open()),class:"btn-article-item text-blue-600",icon:"bi:chat-left-quote","icon-class":"me-2 w-4 h-4",label:_.$t("cite")},null,8,["label"]),$(N,{to:a(T),class:"btn-article-item text-yellow-600",icon:"ph:file-html-duotone","icon-class":"me-1 text-lg",label:_.$t("fullText")},null,8,["to","label"])])]),n("div",Ce,[a(p)?(i(),u("div",Te,[x[3]||(x[3]=n("svg",{class:"animate-spin h-5 w-5 text-cyan-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[n("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),n("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),n("span",je,c(_.$t("loadingAbstract"))+"... ",1)])):(i(),u("div",qe,[a(b)?(i(),g(W,{key:0,section:a(b)},null,8,["section"])):f("",!0)]))])])]}),_:1}))])}}}),Le={class:"px-3 md:px-7"},Pe={class:"flex items-center gap-2 justify-end"},Oe=A({__name:"Index",props:{item:{type:Object,required:!0}},setup(e){const t=B(),{journalId:p}=D(P()),s=e,l=I(()=>s.item.articleType!="Other"&&!s.item.isOnlyPdf&&s.item.hasAbstract),d=I(()=>{const m=s.item.pdfUrl;return`pdf/${p.value}/articles/${s.item.articleId}/${m}`}),y=F(!1),v=I(()=>s.item.articleType=="Other"||s.item.articleType=="DiÄer"?!0:s.item.isOnlyPdf),o=I(()=>v.value?d.value:t(`/articles/${s.item.slug}/doi/${s.item.articleId}`));return(m,r)=>{const b=E,k=R,C=ze;return i(),u(q,null,[n("div",Le,[$(b,{item:e.item},null,8,["item"]),n("div",Pe,[a(l)?(i(),g(k,{key:0,onClick:r[0]||(r[0]=T=>y.value=!0),class:"btn-article-item text-gray-600",icon:"ic:twotone-visibility","icon-class":"me-1 text-rose-400 text-lg",label:m.$t("quickView")},null,8,["label"])):f("",!0),a(v)?f("",!0):(i(),g(k,{key:1,to:a(o),class:"btn-article-item text-yellow-600",icon:"ph:file-html-duotone","icon-class":"me-1 text-lg",label:m.$t("fullText")},null,8,["to","label"])),a(v)?(i(),g(k,{key:2,to:a(o),class:"btn-article-item text-gray-600",icon:"material-symbols:cloud-download-rounded","icon-class":"me-1",label:"PDF",target:"_blank"},null,8,["to"])):f("",!0)])]),a(y)?(i(),g(C,{key:0,item:e.item,onCloseQuickView:r[1]||(r[1]=T=>y.value=!1),class:""},null,8,["item"])):f("",!0)],64)}}}),Se={class:"relative"},Ve=A({__name:"Index",props:{articles:{type:Array,required:!0}},setup(e){return(t,p)=>{const s=Oe;return i(!0),u(q,null,V(e.articles,(l,d)=>(i(),u("div",{class:L([d===e.articles.length-1?"":"border-b",d===0&&e.articles.length>1?"pt-0 pb-10":"py-10",e.articles.length===1?"py-0 pt-0 pb-5":""])},[n("div",Se,[$(s,{item:l},null,8,["item"])])],2))),256)}}}),Be={key:0},Ne={class:"py-10 px-4 text-gray-400 fw-bold text-sm"},Ue={class:"text-xs text-gray-500 bg-primary-100 rounded-full px-2 py-1 ms-1"},Re=A({__name:"Issue",props:{issueId:{type:String,required:!0}},async setup(e){let t,p;const s=e,l=G(),{journalId:d,currentIssueId:y}=D(P()),{locale:v}=M(),{currentIssue:o,issue:m,articles:r}=D(l);if(s.issueId===y.value)if(o.value)l.setArticles(o.value.articles);else{const{data:b}=([t,p]=U(()=>H("currentissue",()=>$fetch(`/api/journal-content/${d.value}/issues/${y.value}`,{query:{lang:v.value}}))),t=await t,p(),t);b.value&&l.setCurrentIssue(b.value)}else if(!m.value||m.value.id!==s.issueId){const{data:b}=([t,p]=U(()=>H(s.issueId,()=>$fetch(`/api/journal-content/${d.value}/issues/${s.issueId}`,{query:{lang:v.value}}),"$ot9LeG_Gxm")),t=await t,p(),t);b.value&&l.setIssue(b.value)}else l.setArticles(m.value.articles);return(b,k)=>{const C=O,T=Q,_=Ve,x=le;return a(r)?(i(),u("div",Be,[n("div",{class:L(["hidden md:flex gap-4 mb-4 overflow-x-auto",a(r).length<=5?"":"scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100"])},[(i(!0),u(q,null,V(a(r),h=>(i(),g(T,{key:h.articleType,to:`#section-${h.articleType}`,class:L(["rounded-lg border border-gray-100 text-center hover:bg-primary-100",a(r).length>5?"w-1/5 flex-shrink-0":` w-full w-1/${a(r).length}`])},{default:z(()=>[n("div",Ne,[$(C,{name:h.icon,class:"text-4xl mb-2"},null,8,["name"]),n("div",null,[w(c(h.articleType)+" ",1),n("span",Ue,c(h.articles.length),1)]),k[0]||(k[0]=n("div",{class:"mt-2"},null,-1))])]),_:2},1032,["to","class"]))),128))],2),(i(!0),u(q,null,V(a(r),h=>(i(),g(x,{title:h.articleType,class:"mb-5",id:`section-${h.articleType}`,"is-sticky":!0},{body:z(()=>[$(_,{articles:h.articles},null,8,["articles"])]),_:2},1032,["title","id"]))),256))])):f("",!0)}}});
1export{Re as _};
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.