import{_ as y,g as C}from"./index.f1458219.js";import{u as H,N as x}from"./App.4a38a252.js";import{j as h,q as A,l as f,N as B,aW as N,A as V,y as R,dN as b,m as F,R as E,o,c as t,Y as v,X as _,ak as g,Z as w,V as L,a1 as M,a as S}from"./index.2e2ba873.js";import{aa as D}from"./MoreFeedback.7a64cae1.js";import"./modulepreload-polyfill.b7f2da20.js";import"./ico_max_exit.795e9ef8.js";import"./plugin-vue_export-helper.21dcd24c.js";import"./index.36d4c5c3.js";import"./style.488e5a30.js";import"./isUdf.1a76b9f4.js";import"./btn_devtools.210a42a8.js";import"./ico_pin.548219aa.js";/* empty css               */import"./theme-map.83df99de.js";import"./index.53c6cc19.js";const P=(p,i)=>{const a=e=>{p===e&&i()};return h.on("loadmore",a),A(()=>{h.off("loadmore",a)}),{noMore:f(!1),loading:f(!1)}},T={class:"home_hots_all pt_lg"},j=S("div",{class:"home_hots--tabs--shim"},null,-1),q={key:1,class:"row gutter_md"},z={key:2,class:"flex_center text3 lh_md fs_5 pb_xl"},se=B({__name:"All",setup(p){const i=N(),a=f(1),e=V([]),{noMore:l,loading:s}=P("HomeHotsAll",()=>m()),{homeHotsRef:k}=R(b());async function m(){var c;if(!(s.value||l.value)){s.value=!0;try{const r=await C({pn:a.value});if(a.value++,r.no_more){s.value=!1,l.value=!0;return}const u=((c=r.list)==null?void 0:c.map((n,d)=>D(n,d)))||[];e.push(...u),s.value=!1,i.flashPageCursors(100)}catch(r){s.value=!1,console.log(r)}}}return H("HomeHotsAll",()=>{a.value===1&&s.value||(e.splice(0,e.length),l.value=!1,a.value=1,m())}),F(()=>{e.length||m()}),(c,r)=>{const u=E("BiliVideoCard");return o(),t("div",T,[j,e.length?(o(),t("div",q,[(o(!0),t(v,null,w(e,(n,d)=>(o(),t("div",{class:"home_hots_all--video col_3 col_sm_1_5 mb_xxl",key:n.aid},[L(u,{info:n,"is-rcmd":"","img-lazy":"eager","disable-frame":"","disable-scale":"",rootRef:_(k),iid:"pc_app_hots_all","scroll-wrap":".home_hots",isFirstCard:d===0},null,8,["info","rootRef","isFirstCard"])]))),128))])):(o(),t(v,{key:0},[_(s)?(o(),g(y,{key:0})):(o(),g(x,{key:1}))],64)),_(l)?(o(),t("div",z,"\u5DF2\u7ECF\u5230\u5E95\u5566~")):M("",!0)])}}});export{se as default};
