1import{l as e,o as t,s as n,u as r}from"./apiResponse-C8fEm_-L.js";var i=2,a={error_vid:`æ æçè§é¢ID`,error_uid:`æ æçç¨æ·ID`,error_type:`åæ°ç±»åé误`,system_error:`ç³»ç»é误ï¼è¯·ç¨åéè¯`,too_many_requests:`请æ±è¿äºé¢ç¹ï¼è¯·ç¨ååè¯`,too_big_num:`è¯·æ±æ°éè¿å¤§`};function o(e){return new Promise(t=>{window.setTimeout(t,e)})}function s(e){return e.includes(`请ç¨å`)?e:`${e}ï¼è¯·ç¨åéè¯`}function c(e,t){if(e&&(e.status===408||e.status===429||e.status>=500))return!0;let n=t.toLowerCase();return n.includes(`failed to fetch`)||n.includes(`networkerror`)||n.includes(`network`)||n.includes(`ææ¶ä¸å¯ç¨`)||n.includes(`ç½å
³`)||n.includes(`gateway`)||n.includes(`unavailable`)||n.includes(`ç¨åéè¯`)}function l(e){if(!e||typeof e!=`object`)return[];let t=e;if(t.status===`error`)return[];let n=t.data;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n.video_list;if(Array.isArray(e))return e}return Array.isArray(n)?n:Array.isArray(t.video_list)?t.video_list:[]}async function u(e,r=`è·åè§é¢å¤±è´¥`){let l=s(r);for(let u=0;u<=i;u++)try{let d=await fetch(e,{cache:`no-store`}),f=await t(d),p=n(d,f,{messages:a,fallback:r});if(!p&&f!=null)return{ok:!0,data:f};if(l=p??s(r),u<i&&c(d,l)){await o(400*(u+1));continue}return{ok:!1,message:l}}catch{if(l=s(r),u<i){await o(400*(u+1));continue}return{ok:!1,message:l}}return{ok:!1,message:l}}async function d(e,t=`è·åè§é¢å¤±è´¥`){let n=await u(e,t);return n.ok?{ok:!0,list:l(n.data)}:n}function f(t,n,r){return e(`/api/video/recommend`,{offset:t,num:n,token:r})}function p(t={}){let{timeLimit:n=7,timeStart:i,offset:a=0,num:o=20,token:s}=t;return e(`/api/video/popular`,r({time_limit:n,...i!=null&&i>0?{time_start:i}:{},offset:a,num:o},s))}export{l as a,u as i,f as n,d as r,p as t};
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.