1import{b as se,d as le,w as ce}from"./EyjkLuyz.js";import{I as W,C as j,U as Q}from"./BB_Ol6Sd.js";import{G as D,H as O,I as H,d as q,J as re,r as C,K as X,k as ee,o as i,c as m,f as $,y as ue,e as a,L as h,M as N,B as d,w as p,N as P,O as u,t as w,b as g,P as de,Q as me,R as ve,S as I,T as te,U as Y,V as pe,W as Z,u as fe,a as he,z as ye,_ as be,h as ge,i as we,X as ke,D as Ie,n as A,Y as Se,Z as Ce,$ as Ee}from"./CD5ytW8R.js";import{E as S,l as Te,a as Ve}from"./UbZmcXnx.js";import{u as xe,a as Ne,b as Pe,c as $e}from"./Dser7GTK.js";import{i as R}from"./DOXrXuhB.js";import{i as Be}from"./Dyv7m53g.js";import{u as ze}from"./BRP4QvY_.js";import{E as Ue,a as _e}from"./BQzZc6S6.js";import{E as Ae}from"./RGdb54Kf.js";import{E as G}from"./CI1i5dDT.js";import{u as Re}from"./BEVZCyWw.js";import"./B20MYjTg.js";import"./BJUn8YRy.js";import"./BUfQGvsA.js";import"./D3oACieP.js";import"./DpVEJrWt.js";import"./Bkw822L6.js";import"./CYnJB9ax.js";import"./CJTOf5lH.js";import"./D-j43n7u.js";import"./CXlhhiiX.js";import"./BbTaFCvx.js";import"./7h6gO0oe.js";import"./Cola_d4b.js";import"./CduMtyi0.js";import"./CXdL6s-7.js";import"./DqsVBVfg.js";import"./MzOsUhdY.js";import"./lyleLzDk.js";import"./h_QX3e4W.js";import"./Bp3YSIOJ.js";import"./DUry4JkF.js";import"./CHftoMLW.js";import"./Cosh_gJN.js";import"./DB9JFwUH.js";import"./DU-Yxntg.js";import"./Dv6_qSAB.js";import"./X5iwki61.js";import"./ogrPYdcy.js";import"./DvqxuD3L.js";const De=se({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:Be},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:R},activeActionIcon:{type:R},activeIcon:{type:R},inactiveIcon:{type:R},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:le(Function)},id:String,tabindex:{type:[String,Number]},...ze(["ariaLabel"])}),Le={[Q]:e=>D(e)||O(e)||H(e),[j]:e=>D(e)||O(e)||H(e),[W]:e=>D(e)||O(e)||H(e)},Me=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],Ke=["aria-hidden"],Fe={key:1},Oe={key:1},He=["aria-hidden"],J="ElSwitch";var Ge=q({name:J,__name:"switch",props:De,emits:Le,setup(e,{expose:L,emit:E}){const n=e,f=E,{formItem:B}=xe(),v=Ne(),s=re("switch"),{inputId:M}=Pe(n,{formItemContext:B}),T=$e(I(()=>{if(n.loading)return!0})),y=C(n.modelValue!==!1),b=ve(),z=I(()=>[s.b(),s.m(v.value),s.is("disabled",T.value),s.is("checked",l.value)]),V=I(()=>[s.e("label"),s.em("label","left"),s.is("active",!l.value)]),K=I(()=>[s.e("label"),s.em("label","right"),s.is("active",l.value)]),F=I(()=>({width:Ve(n.width)}));X(()=>n.modelValue,()=>{y.value=!0});const U=I(()=>y.value?n.modelValue:!1),l=I(()=>U.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(U.value)||(f(Q,n.inactiveValue),f(j,n.inactiveValue),f(W,n.inactiveValue)),X(l,t=>{b.value.checked=t,n.validateEvent&&B?.validate?.("change").catch(r=>Z(r))});const x=()=>{const t=l.value?n.inactiveValue:n.activeValue;f(Q,t),f(j,t),f(W,t),te(()=>{b.value.checked=l.value})},_=()=>{if(T.value)return;const{beforeChange:t}=n;if(!t){x();return}const r=t();[Y(r),D(r)].includes(!0)||pe(J,"beforeChange must return type `Promise<boolean>` or `boolean`"),Y(r)?r.then(k=>{k&&x()}).catch(k=>{Z(J,`some error occurred: ${k}`)}):r&&x()},o=()=>{b.value?.focus?.()};return ee(()=>{b.value.checked=l.value}),L({focus:o,checked:l}),(t,r)=>(i(),m("div",{class:h(z.value),onClick:me(_,["prevent"])},[$("input",{id:a(M),ref_key:"input",ref:b,class:h(a(s).e("input")),type:"checkbox",role:"switch","aria-checked":l.value,"aria-disabled":a(T),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:a(T),tabindex:e.tabindex,onChange:x,onKeydown:ue(_,["enter"])},null,42,Me),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||t.$slots.inactive)?(i(),m("span",{key:0,class:h(V.value)},[N(t.$slots,"inactive",{}
1,()=>[e.inactiveIcon?(i(),d(a(S),{key:0},{default:p(()=>[(i(),d(P(e.inactiveIcon)))]),_:1})):u("v-if",!0),!e.inactiveIcon&&e.inactiveText?(i(),m("span",{key:1,"aria-hidden":l.value},w(e.inactiveText),9,Ke)):u("v-if",!0)])],2)):u("v-if",!0),$("span",{class:h(a(s).e("core")),style:de(F.value)},[e.inlinePrompt?(i(),m("div",{key:0,class:h(a(s).e("inner"))},[l.value?(i(),m("div",{key:1,class:h(a(s).e("inner-wrapper"))},[N(t.$slots,"active",{},()=>[e.activeIcon?(i(),d(a(S),{key:0},{default:p(()=>[(i(),d(P(e.activeIcon)))]),_:1})):u("v-if",!0),!e.activeIcon&&e.activeText?(i(),m("span",Oe,w(e.activeText),1)):u("v-if",!0)])],2)):(i(),m("div",{key:0,class:h(a(s).e("inner-wrapper"))},[N(t.$slots,"inactive",{},()=>[e.inactiveIcon?(i(),d(a(S),{key:0},{default:p(()=>[(i(),d(P(e.inactiveIcon)))]),_:1})):u("v-if",!0),!e.inactiveIcon&&e.inactiveText?(i(),m("span",Fe,w(e.inactiveText),1)):u("v-if",!0)])],2))],2)):u("v-if",!0),$("div",{class:h(a(s).e("action"))},[e.loading?(i(),d(a(S),{key:0,class:h(a(s).is("loading"))},{default:p(()=>[g(a(Te))]),_:1},8,["class"])):l.value?N(t.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(i(),d(a(S),{key:0},{default:p(()=>[(i(),d(P(e.activeActionIcon)))]),_:1})):u("v-if",!0)]):l.value?u("v-if",!0):N(t.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(i(),d(a(S),{key:0},{default:p(()=>[(i(),d(P(e.inactiveActionIcon)))]),_:1})):u("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||t.$slots.active)?(i(),m("span",{key:1,class:h(K.value)},[N(t.$slots,"active",{},()=>[e.activeIcon?(i(),d(a(S),{key:0},{default:p(()=>[(i(),d(P(e.activeIcon)))]),_:1})):u("v-if",!0),!e.activeIcon&&e.activeText?(i(),m("span",{key:1,"aria-hidden":!l.value},w(e.activeText),9,He)):u("v-if",!0)])],2)):u("v-if",!0)],2))}}),Je=Ge;const We=ce(Je),je={class:"col-right col-main"},Qe={key:0},Xe=["onClick"],Lt=q({__name:"subscriptions",emits:["updateTitle"],setup(e,{emit:L}){const E=we(),n=C("è¨é±è³æéæ¸
å®"),f=C("è¨é±è³æéæ¸
å®"),B=fe();he({title:n,meta:[{key:"description",name:"description",content:f.value},{key:"og:url",property:"og:url",content:E.public.baseUrl+B.path},{key:"og:title",property:"og:title",content:n.value+" ï½ "+E.public.websiteName},{key:"og:description",property:"og:description",content:f.value},{key:"twitter:url",name:"twitter:url",content:E.public.baseUrl+B.path},{key:"twitter:title",name:"twitter:title",content:n.value+" ï½ "+E.public.websiteName},{key:"twitter:description",name:"twitter:description",content:f.value}]});const v=C({page_num:1,page_limit:15,sort:"subscription_time_desc"}),s=o=>{v.value.page_num=o,z()},M=({prop:o,order:t})=>{t==="ascending"?v.value.sort=o+"_desc":v.value.sort=o+"_asc",v.value.page_num=1,z()},T=o=>{let t="";return o!=="false"&&(t="å·²æ´æ°"),t},y=C([]),b=C(0),z=async()=>{try{const o=await ke(v.value);y.value=o?.search_result,b.value=o?.search_count,y.value.forEach(t=>{t.subscription_time=t.subscription_time.date.split(" ")[0],t.update_notification=T(t.update_notification)}),Ie()}catch(o){await A("/error"),console.error(o)}},V=C(!1),K=async()=>{try{const o=await Se();V.value=o?.subscription_notification}catch(o){await A("/error"),console.error(o)}},F=async o=>{try{(await Ce(o))?.subscription_notification?G({message:"å¯ä¿¡éç¥å·²æé",type:"success",showClose:!0}):G({message:"å¯ä¿¡éç¥å·²éé",type:"success",showClose:!0})}catch(t){await A("/error"),console.error(t)}},U=async(o,t)=>{try{await Ee(o)&&(G({message:"æåå·²è®æ¤éç¥",type:"success",showClose:!0}),y.value[t].update_notification="")}catch(r){await A("/error"),console.error(r)}},l=L,{isRadio:x,addThScope:_}=Re();return ee(async()=>{l("updateTitle",n.value),x(),_(),await z(),await K(),await te()}),(o,t)=>{const r=We,k=Ue,ae=be,ie=_e,ne=Ae;return i(),m("div",je,[$("h2",null,w(a(n)),1),g(r,{modelValue:a(V),"onUpdate:modelValue":t[0]||(t[0]=c=>ye(V)?V.value=c:null),"active-text":"éåæ´æ°éç¥","inactive-text":"éé",label:"æ´æ°éç¥éé",size:"large",onChange:F},null,8,["modelValue"]),t[3]||(t[3]=$("p",null,"(éåå¾è¥æè³æéæ´æ°åæå¯éEmailé²è¡éç¥)",-1)),$("section",null,[g(ie,{data:a(y),"empty-text":"æ«ç¡è³æ",onSortChange:M},{default:p(()=>[g(k,{prop:"subscription_time",label:"è¨é±æ¥æ",sortable:"custom",width:"120"}),g(k,{prop:"title",label:"è³æéå稱",sortable:"custom"},{default:p(c=>[g(ae,{to:"/dataset/"+c.row.nid,title:`åå¾è³æé ${c.row.title}`},{default:p(()=>[ge(w(c.row.title),1)]),_:2},1032,["to","title"])]),_:1}),g(k,{prop:"update_notification",label:"æ´æ°éç¥",align:"right",sortable:"custom"},{default:p(c=>[c.row.update_notification===""?(i(),m("div",Qe,w(c.row.update_notification),1)):(i(),m("div",{key:1,style:{color:"#0079b7",cursor:"pointer"},onClick:Ye=>U(c.row.nid,a(y).map(oe=>oe.nid).indexOf(c.row.nid))},w(c.row.update_notification),9,Xe))]),_:1})]),_:1},8,["data"]),g(ne,{"current-page":a(v).page_num,"onUpdate:currentPage":t[1]||(t[1]=c=>a(v).page_num=c),"page-size":a(v).page_limit,"onUpdate:pageSize":t[2]||(t[2]=c=>a(v).page_limit=c),size:"small",layout:"total, prev, pager, next, jumper",total:a(b),"hide-on-single-page":!0,onCurrentChange:s},null,8,["current-page","page-size","total"])])])}}});
1export{Lt 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.