1import{u as k,a as w,o as V,r as n,d as s,e as d,h as $,w as l,f as t,F as L,i as C,t as c,q as F,m as b,p as u}from"./index-DGRxsnEV.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const x={class:"academy-page"},N={class:"video-grid"},A=["onClick"],I={class:"video-cover-wrap"},S=["src","alt"],U=["src"],q={class:"video-title"},D={class:"video-meta"},E={__name:"Academy",setup(M){const{t:v}=k(),_=w.create({baseURL:"",timeout:6e4}),i=u([]),r=u(!1),m=e=>`/api/academy/videos/${e}/stream`,p=e=>{e.target.currentTime=1},y=async()=>{r.value=!0;try{const e=await _.get("/api/academy/videos");i.value=(e.data.list||[]).map(o=>({...o,views:f(o.views)}))}catch(e){console.error(v("academy.fetchListFailed"),e)}finally{r.value=!1}},f=e=>e?e>=1e4?(e/1e4).toFixed(1)+"w":e>=1e3?(e/1e3).toFixed(1)+"k":String(e):"0";return V(()=>{y()}),(e,o)=>{const h=n("el-empty"),g=n("el-card");return s(),d("div",x,[$(g,null,{header:l(()=>[t("span",null,c(e.$t("academy.title")),1)]),default:l(()=>[t("div",N,[(s(!0),d(L,null,C(i.value,a=>(s(),d("div",{key:a.id,class:"video-card",onClick:R=>e.$router.push(`/academy/${a.id}`)},[t("div",I,[a.cover_url?(s(),d("img",{key:0,src:`${a.cover_url}?v=1`,class:"video-thumb",alt:a.title},null,8,S)):(s(),d("video",{key:1,src:m(a.id),class:"video-thumb",preload:"metadata",muted:"",onLoadeddata:p},null,40,U)),o[0]||(o[0]=t("div",{class:"play-icon"},"â¶",-1))]),t("div",q,c(a.title),1),t("div",D,[t("span",null,c(a.views)+" "+c(e.$t("academy.views")),1)])],8,A))),128)),!r.value&&i.value.length===0?(s(),F(h,{key:0,description:e.$t("academy.noVideos")},null,8,["description"])):b("",!0)])]),_:1})])}}},z=B(E,[["__scopeId","data-v-e19fd6db"]]);export{z 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.