mirror of
https://github.com/qist/tvbox.git
synced 2025-01-24 19:44:54 +08:00
1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
const y=b;!function(){for(var x=b,f=a();;)try{if(653497==-parseInt(x(698))*(-parseInt(x(741))/2)+parseInt(x(772))/3*(parseInt(x(787))/4)+-parseInt(x(704))/5*(parseInt(x(531))/6)+parseInt(x(584))/7*(parseInt(x(825))/8)+parseInt(x(606))/9+-parseInt(x(616))/10*(parseInt(x(495))/11)+parseInt(x(648))/12)break;f.push(f.shift())}catch(h){f.push(f.shift())}}();import{_,jinja2}from"assets://js/lib/cat.js";import*as c from"./utils.js";class User{["driveId"]="";[y(539)]="";[y(693)]="";["accessToken"]="";[y(657)]="";static[y(533)](d){var g,z=y,e={UvHZQ:z(844),ZITdS:z(691),geopG:z(500)};return _[z(605)](d)?new User:(d=JSON[z(717)](d),(g=new User)[z(808)]=d[e[z(510)]],g[z(539)]=d[e[z(520)]],g[z(693)]=d[z(527)],g[z(651)]=d[z(777)],g.refreshToken=d[e[z(585)]],g)}constructor(){}[y(827)](){var A=y;return _[A(605)](this[A(808)])?"":this[A(808)]}["getUserId"](){var B=y;return _[B(605)](this.userId)?"":this[B(539)]}["getTokenType"](){var C=y;return _[C(605)](this[C(693)])?"":this[C(693)]}[y(637)](){var D=y;return _[D(605)](this[D(651)])?"":this[D(651)]}[y(562)](){var E=y;return _[E(605)](this[E(657)])?"":this.refreshToken}[y(706)](d){this[y(657)]=d}[y(514)](){var G=y,d={uUrFz:function(e,f){return e+f}};return d.uUrFz(d[G(756)](this[G(839)]()," "),this[G(637)]())}[y(559)](){var H=y,d={CUdfL:function(e,f){return f<e},sMnPj:function(e,f){return f<e}};return d.CUdfL(this[H(839)]()[H(814)],0)&&d[H(686)](this[H(637)]()[H(814)],0)}[y(819)](){var I=y;return this[I(657)]="",this[I(651)]="",this}async[y(599)](){var J=y,d={aXHJZ:J(523),KqjOy:J(522)};return await local[J(512)](d[J(737)],d[J(712)],this[J(760)]()),this}[y(760)](){var K=y,d={default_drive_id:this[K(827)](),user_id:this[K(790)](),token_type:this[K(839)](),access_token:this.getAccessToken(),refresh_token:this[K(562)]()};return JSON[K(633)](d)}}class OAuth{[y(693)]="";[y(651)]="";[y(657)]="";static["objectFrom"](d){var g,L=y,e={KLrmp:L(674),bOOXF:L(527),winPW:L(777)};return console.log(e[L(783)]),console[L(589)](d),_[L(605)](d)?new OAuth:(d=JSON.parse(d),(g=new OAuth)[L(693)]=d[e.bOOXF],g.accessToken=d[e.winPW],g.refreshToken=d[L(500)],g)}["getTokenType"](){var M=y;return _[M(605)](this[M(693)])?"":this[M(693)]}[y(637)](){var N=y;return _.isEmpty(this[N(651)])?"":this[N(651)]}[y(562)](){var O=y;return _[O(605)](this[O(657)])?"":this[O(657)]}[y(514)](){var P=y;return{mkUgB:function(e,f){return e+f}}[P(649)](this[P(839)]()," ")+this[P(637)]()}[y(819)](){var Q=y;return this[Q(657)]="",this[Q(651)]="",this}async[y(599)](){var R=y,d={EQTvw:R(513)};return await local.set(R(523),d[R(634)],this[R(760)]()),this}[y(760)](){var S=y,d={token_type:this[S(839)](),access_token:this[S(637)](),refresh_token:this.getRefreshToken()};return JSON[S(633)](d)}}class Item{[y(505)]=[];[y(784)]="";[y(775)]="";[y(629)]="";[y(807)]="";[y(668)]="";[y(517)]="";[y(571)]="";[y(638)]="";[y(699)]="";constructor(d){var T=y,e={muPcO:function(f,g){return f+g},jFjWT:T(620)};console[T(589)](e[T(595)](e[T(639)],d)),this[T(775)]=d}static[y(533)](d){const U=y,e={YWWQD:U(840),AnDcx:"undefined",tnhcy:function(h,i){return h==i},reNyO:U(558),dBNBa:U(636),julUf:U(668),EblmY:function(h,i){return h==i},jcLSh:U(587),WPvTs:U(571),UjukU:U(638),PvFot:function(h,i){return h==i},egyYf:U(498),OTAvw:"items"};if(_[U(605)](d))return new Item;let f=JSON[U(717)](d),g=new Item;return g[U(784)]=typeof f[e.YWWQD]==e[U(746)]?"":f[e[U(565)]],g.fileId=e[U(675)](typeof f[e[U(835)]],U(715))?"":f[U(558)],g[U(629)]=e[U(675)](typeof f[U(636)],e.AnDcx)?"":f[e[U(747)]],g[U(807)]=e.tnhcy(typeof f[U(807)],U(715))?"":f[U(807)],g.type=typeof f.type==e.AnDcx?"":f[e[U(730)]],g[U(517)]=e.EblmY(typeof f[e[U(846)]],e[U(746)])?"":f[e[U(846)]],g.category=void 0===f[e.WPvTs]?"":f[e[U(776)]],g[U(638)]=e[U(641)](typeof f[e[U(721)]],U(715))?"":f[e.UjukU],g[U(699)]=e[U(734)](typeof f[e.egyYf],e[U(746)])?"":f[e[U(619)]],typeof f[U(505)]!=e[U(746)]&&Array.isArray(f[U(505)])&&!_.isEmpty(f.items)&&f[e[U(845)]][U(528)](function(h){var V=U,h=Item[V(533)](JSON[V(633)](h));g[V(505)].push(h)}),g}[y(805)](){var W=y;return _.isEmpty(this[W(505)])?[]:this[W(505)]}[y(545)](){var X=y;return _[X(605)](this.nextMarker)?"":this.nextMarker}["getFileId"](){var Y=y;return _.isEmpty(this.fileId)?"":this[Y(775)]}[y(696)](){var Z=y;return _[Z(605)](this[Z(807)])?"":this[Z(807)]}["getType"](){var a0=y;return _[a0(605)](this[a0(668)])?"":this[a0(668)]}["getExt"](){var a1=y;return _.isEmpty(this.fileExtension)?"":this[a1(517)]}[y(821)](){var a2=y;return _[a2(605)](this[a2(571)])?"":this[a2(571)]}["getSize"](){var a3=y,d={WIJtp:function(e,f){return e==f},CTVsW:function(e,f){return e+f},xqapa:function(e,f){return e+f}};return d[a3(795)](this[a3(638)],0)?"":d[a3(849)](d[a3(800)]("[",c.getSize(this[a3(638)])),"]")}["getParent"](){var a4=y;return _[a4(605)](this[a4(699)])?"":{MuVgL:function(e,f){return e+f}}[a4(681)]("["+this[a4(699)],"]")}["parentFunc"](d){return this.parent=d,this}[y(745)](){var a5=y,d={YGhdP:function(e,f){return e+f}};return d.YGhdP(d[a5(786)](this.getParent()+" ",this[a5(696)]())," ")+this[a5(549)]()}}class Code{[y(632)]="";static[y(533)](d){const a6=y,e_FLZZh=a6(632);var g;return _[a6(605)](d)?new Code:(d=JSON[a6(717)](d),(g=new Code).redirectUri=d[e_FLZZh],g)}constructor(){}["getRedirectUri"](){var a7=y;return _.isEmpty(this.redirectUri)?"":this[a7(632)]}[y(525)](){var a8=y,d={DTswQ:a8(810)};return this.getRedirectUri()[a8(824)](d[a8(673)])[1]}}const UA=y(516),CLIENT_ID=y(725);let quality={},tempIds=[],refreshToken="",shareToken="",shareId="",oauth=new OAuth,user=new User,log=c[y(589)];async function getUserCache(){var a9=y,d={JpwiC:a9(523),OcxGe:"aliyundrive_user"};return await local[a9(592)](d[a9(788)],d.OcxGe)}async function getOAuthCache(){var aa=y,d={BYnXW:"ali",bIGZt:aa(513)};return await local[aa(592)](d.BYnXW,d[aa(830)])}async function initSome(){var ab=y,d={KELrN:function(g){return g()},ySAeR:function(g,h){return g(h)},LyJDL:function(g,h){return g+h},sMxZd:ab(601),SCZsR:ab(818),XuWHB:function(g,h){return g(h)},gHbEP:function(g,h){return g+h},gJFiF:"initSome----user-",plJlg:ab(607),RhMwx:ab(622)},e=(tempIds=[],await d[ab(702)](getOAuthCache)),e=(await d[ab(692)](log,d[ab(542)](d[ab(724)],e)),oauth=OAuth.objectFrom(e),console.log(d[ab(672)]),console[ab(589)](oauth),await getUserCache());console[ab(589)](e),await d[ab(502)](log,d[ab(749)](d[ab(647)],e)),user=User[ab(533)](e),quality={"4K":d[ab(762)],"2k":d[ab(815)],"超清":ab(570),"高清":"HD","标清":"SD","流畅":"LD"}}function setRefreshToken(d){refreshToken=d}function getToken(){var ac=y;return user[ac(562)]()}async function setShareId(d){var ad=y,e={LKwAE:function(f,g){return f==g},kKgvk:function(f,g){return f==g},mjziL:function(f){return f()},muyXj:function(f){return f()}};e.LKwAE(getOAuthCache()[ad(814)],0)&&await oauth[ad(819)]()[ad(599)](),e[ad(642)](e[ad(526)](getUserCache)[ad(814)],0)&&await user.clean().save(),shareId=d,await e.muyXj(refreshShareToken)}function getHeader(){var ae=y,d={nMWPN:ae(703),VvOUA:ae(804),Mqofq:ae(543)},e={};return e[d[ae(726)]]=UA,e[d[ae(521)]]=d[ae(660)],e}function getHeaderAuth(){var af=y,d={BRKuj:"1|3|2|0|4",CILvi:af(809),advFb:af(635),Iieob:af(593)},e=d[af(793)][af(824)]("|");let f=0;for(;;){switch(e[f++]){case"0":user[af(559)]()&&(g[d[af(627)]]=user[af(514)]());continue;case"1":var g={};continue;case"2":g[d[af(530)]]=af(524);continue;case"3":g[d[af(604)]]=shareToken;continue;case"4":return g}break}}function getHeaderOpen(){var ag=y,d={rKNKh:ag(809)},e="3|2|0|1|4"[ag(824)]("|");let f=0;for(;;){switch(e[f++]){case"0":console.log(oauth);continue;case"1":g[d[ag(754)]]=oauth[ag(514)]();continue;case"2":console[ag(589)]("getHeaderOpen---");continue;case"3":var g={};continue;case"4":return g}break}}async function alist(d,e){var ah=y,f={ipqtG:function(j,k){return j+k},IfVWI:function(j,k,l,m){return j(k,l,m)},cWzMw:function(j){return j()},KIjEh:ah(600)},d=f[ah(551)](ah(816),d),d=(await f[ah(765)](postJson,d,e,f[ah(748)](getHeader)))[ah(707)];return console[ah(589)](f.KIjEh),console.log(d),!await isManyRequest(d)&&(oauth=await OAuth[ah(533)](d)[ah(599)](),!0)}function b(c,d){const e=a();return(b=function(f,g){return f-=495,e[f]})(c,d)}async function getString(d){var ai=y;return(await{GisAr:function(g,h,i){return g(h,i)}}[ai(640)](req,d,{}))[ai(707)]}async function postJson(d,e,f){var aj=y,g={ekdbI:"Content-Type",jKXdN:aj(700),SJkEl:aj(538)},d=(f[g[aj(560)]]=g[aj(823)],await req(d,{headers:f,method:g[aj(705)],data:e}));return d}async function post(d,e){var ak=y,f={ncLfp:ak(631),HHgnl:function(h,i){return h+i},xBLyL:ak(738),QQWXs:function(h,i,j,k){return h(i,j,k)}},f=(d=d[ak(541)](f[ak(683)])?d:f[ak(837)](f[ak(799)],d),await f[ak(598)](postJson,d,e,getHeader()));return f[ak(707)]}async function auth(d,e,f){var al=y,g={pxFvk:al(631),mMdtB:function(i,j){return i+j},YrvVo:al(738),eQRbb:function(i){return i()},jlgJn:function(i,j){return i(j)},nZpFP:function(i,j){return i+j},zVijA:al(656),BoSkN:function(i,j){return i==j},mSzjm:function(i,j){return i==j},vzWdO:function(i,j){return i==j},hiLeM:al(715),iESOf:function(i,j){return i+j},MIEhJ:al(689),pyxfj:function(i,j,k,l){return i(j,k,l)},bzvtL:function(i,j){return i==j}},h=await postJson(d=d[al(541)](g[al(669)])?d:g[al(609)](g[al(778)],d),e,g.eQRbb(getHeaderAuth));return await g.jlgJn(log,g.nZpFP(g[al(575)],h[al(707)])),f&&(g[al(644)](h[al(798)],400)||g[al(779)](h[al(798)],401)||g.vzWdO(typeof h.code,g[al(742)])||_[al(605)](h[al(707)]))&&await g.eQRbb(refreshAccessToken)?(await g[al(744)](log,g[al(572)](g[al(645)],h[al(707)])),g[al(713)](auth,d,e,!1)):f&&(g[al(773)](h[al(798)],429)||g[al(779)](typeof h[al(798)],g[al(742)]))?(await g[al(744)](log,al(497)+h[al(707)]),auth(d,e,!1)):h[al(707)]}async function oauthFunc(d,e,f){var am=y,g={uBkSR:am(631),WeLAI:function(i,j){return i+j},hEalK:am(739),QrCOx:function(i,j,k,l){return i(j,k,l)},rUxDN:function(i){return i()},RMOuy:function(i,j){return i(j)},ZqaxB:am(588),hAOAA:function(i,j){return i==j},udyVK:am(836)},h=(d=d[am(541)](g[am(695)])?d:g.WeLAI(g[am(789)],d),await g[am(563)](postJson,d,e,g[am(623)](getHeaderOpen)));return await g[am(603)](log,g[am(826)]+JSON[am(633)](h)),f&&(g[am(766)](h[am(798)],400)||401==h[am(798)]||typeof h[am(798)]==am(715)||_.isEmpty(h[am(707)]))&&await refreshOpenToken()?(await g[am(603)](log,g.udyVK+h.content),g.QrCOx(oauthFunc,d,e,!1)):h[am(707)]}async function isManyRequest(d){var an=y,e={HwKXy:an(838)};return-1<d[an(822)](e[an(828)])&&(await oauth[an(819)]()[an(599)](),!0)}async function refreshShareToken(){var ao=y,d={yHNQc:ao(636),Gfete:ao(723),xVCpe:function(f,g,h){return f(g,h)},khAEE:"v2/share_link/get_share_token",PHkFb:ao(611)};try{var f={},g=(f[d[ao(567)]]=shareId,f[d[ao(540)]]="",await d.xVCpe(post,d[ao(537)],f)),h=JSON[ao(717)](g);shareToken=h[d.PHkFb]}catch(i){console[ao(589)](i.message)}}async function refreshAccessToken(){var ap=y,d={VSHRb:function(f,g){return f(g)},sbuzP:ap(500),NCIrQ:ap(684),vgwfD:function(f,g){return f(g)},RWkoQ:function(f,g){return f+g},MRZCr:"refreshAccessToken---body--",Rsnnq:function(f,g,h){return f(g,h)},WkLaB:ap(568),BnGvX:"refreshAccessToken---result--",EgULx:function(f,g){return f(g)},GhMHz:function(f,g){return f+g},QnxIA:ap(654),Gadbk:function(f,g){return f(g)},fqxvA:ap(843)};try{let f={},g=user[ap(562)]();(g=_[ap(605)](g)?refreshToken:g)[ap(541)](ap(546))&&(g=(g=await d[ap(758)](getString,g))[ap(532)]()),f[d[ap(597)]]=g,f[d.NCIrQ]=d[ap(597)],await d.vgwfD(log,d.RWkoQ(d[ap(574)],JSON[ap(633)](f)));var h=await d[ap(817)](post,d.WkLaB,f);if(await log(d[ap(650)](d[ap(612)],h)),user=await User[ap(533)](h)[ap(599)](),await d[ap(690)](log,d[ap(771)](d.QnxIA,user[ap(827)]())),_[ap(605)](user[ap(637)]()))throw new Error(h);return!0}catch(i){return await d.Gadbk(log,d[ap(687)]+i[ap(677)]),console.log(i[ap(677)]),await user[ap(819)]().save(),!0}}async function oauthRequest(){var aq=y,d={zzTAE:aq(561),tNoLP:function(f,g){return f+g},JRMkp:aq(720),VXhAS:aq(519),jFhFf:function(f,g,h,i){return f(g,h,i)},DpqQD:function(f,g){return f(g)},xSimp:function(f,g){return f+g},ZGvIL:aq(797),MKBwJ:function(f,g){return f(g)}};try{var f={},g=(f[d[aq(812)]]=1,f[aq(729)]="user:base,file:all:read,file:all:write",d.tNoLP(d[aq(753)](d[aq(829)],CLIENT_ID),d[aq(630)])),h=await d[aq(590)](auth,g,f,!0);return await d[aq(774)](log,d.xSimp(d.ZGvIL,h)),console[aq(589)](d[aq(743)]),console[aq(589)](h),await d[aq(666)](oauthRedirect,Code[aq(533)](h)[aq(525)]())}catch(i){return console[aq(667)](i),!1}}async function oauthRedirect(d){var ar=y,f={RXdLd:"grant_type",rVDRs:"authorization_code",XLtXk:function(g,h,i){return g(h,i)},cYZLf:ar(798)};try{var g={};return g.code=d,g[f[ar(806)]]=f[ar(509)],await f[ar(716)](alist,f[ar(682)],g)}catch(h){return console[ar(589)](h[ar(677)]),await oauth[ar(819)]().save(),!1}}function a(){const aK=["isEmpty","3469644GzYcqg","UHD","copy---user-","mMdtB","idgqL","share_token","BnGvX","NHyWF","BrVbm","SmPeu","43810OLOQrt","FdWOe","order_direction","egyYf","fileId---","wdOnA","QHD","rUxDN","VdDQX","YKYvF","unshift","CILvi","file_infos","shareId","VXhAS","https","redirectUri","stringify","EQTvw","X-Canary","share_id","getAccessToken","size","jFjWT","GisAr","EblmY","kKgvk","wQIwE","BoSkN","MIEhJ","limit","gJFiF","7131804tvtQBB","mkUgB","RWkoQ","accessToken","removeExt","getExt","refreshAccessToken---","BpZHw","auth--res--","refreshToken","openFile/getVideoPreviewPlayInfo","hasOwnProperty","Mqofq","FZpdd","AHWOY","fadkV","body","RHDSh","MKBwJ","error","type","pxFvk","aCTlR","RSPFq","SCZsR","DTswQ","OAuthobjectFrom----- ","tnhcy","Bxrif","message","yyLjc","drive_id","IFSWJ","MuVgL","cYZLf","ncLfp","grant_type","KYglo","sMnPj","fqxvA","video","auth--res--400","EgULx","user_id","ySAeR","tokenType","xYyxS","uBkSR","getName","audio","1709LDZhKF","parent","application/json","adrive/v3/file/list","KELrN","User-Agent","195iJMPXj","SJkEl","setRefreshToken","content","oVQui","hBxyM","uxjpN","getFileId","KqjOy","pyxfj","CNCCd","undefined","XLtXk","parse","XzMkF","video_preview_play_info","https://open.aliyundrive.com/oauth/users/authorize?client_id=","UjukU","$$$","share_pwd","sMxZd","76917ccccd4441c39457a04f6084fb2f","nMWPN","eZVAE","ZfttW","scope","julUf","live_transcoding","url_expire_sec","STftp","PvFot","cdSWt","fENPx","aXHJZ","https://api.aliyundrive.com/","https://open.aliyundrive.com/adrive/v1.0/","lXMfR","668TtGUFT","hiLeM","ZGvIL","jlgJn","getDisplayName","AnDcx","dBNBa","cWzMw","gHbEP","hfMvJ","jQEMF","getType","tNoLP","rKNKh","WTNwF","uUrFz","PJVOQ","VSHRb","LZIlv","toString","阿里云盘","plJlg","push","bNhAN","IfVWI","hAOAA","iLyDO","EXzNC","file","wXaWK","GhMHz","93zuGnIU","bzvtL","DpqQD","fileId","WPvTs","access_token","YrvVo","mSzjm","dhUkc","IBsxH","copy----","KLrmp","nextMarker","VsAzB","YGhdP","64748uavDCD","JpwiC","hEalK","getUserId","BBiWQ","mTeAg","BRKuj","join","WIJtp","eAfvF","oauthRequest---","code","xBLyL","xqapa","LKCUZ","adrive/v2/batch","atWct","Referer","getItems","RXdLd","name","driveId","authorization","code=","proxy://sub/","zzTAE","lXhAy","length","RhMwx","https://api-cf.nn.ci/alist/ali_open/","Rsnnq","initSome----","clean","oDviT","getCategory","indexOf","jKXdN","split","8fZcTry","ZqaxB","getDriveId","HwKXy","JRMkp","bIGZt","xDLZN","KHlnL","ASC","JdLhq","reNyO","oauthFunc--res-2-","HHgnl","Too Many Requests","getTokenType","next_marker","token","LEOIe","refreshAccessToken---error-","default_drive_id","OTAvw","jcLSh","marker","getDownloadUrl---","CTVsW","1067rySqiK","ForbiddenNoPermission.File","auth--res--429","parent_file_id","urGys","refresh_token","parentFunc","XuWHB","ilunC","QwjbN","items","wKdQu",'{"requests":[{"body":{"file_id":"{{data.fileId}}","share_id":"{{data.shareId}}","auto_rename":true,"to_parent_file_id":"root","to_drive_id":"{{data.driveId}}"},"headers":{"Content-Type":"application/json"},"id":"0","method":"POST","url":"/file/copy"}],"resource":"file"}',"live_transcoding_subtitle_task_list","rVDRs","UvHZQ","copy---","set","aliyundrive_oauth","getAuthorization","IeohA","Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1","fileExtension","innlI","&redirect_uri=https://alist.nn.ci/tool/aliyundrive/callback&scope=user:base,file:all:read,file:all:write&state=","ZITdS","VvOUA","aliyundrive_user","ali","client=Android,app=adrive,version=v4.3.1","getCode","mjziL","token_type","forEach","ptAgN","advFb","158418PJRwWy","trim","objectFrom","nMbKb","HEuur","rlZMZ","khAEE","post","userId","Gfete","startsWith","LyJDL","https://www.aliyundrive.com/","live_transcoding_task_list","getNextMarker","http","order_by","deleteFile-----","getSize","IizMu","ipqtG","oGzgI",'{"requests":[{"body":{"drive_id":"{{data.driveId}}","file_id":"{{data.fileId}}"},"headers":{"Content-Type":"application/json"},"id":"{{data.fileId}}","method":"POST","url":"/file/delete"}],"resource":"file"}',"fwnAU","aGHGZ","wKFKk","QIieu","file_id","isAuthed","ekdbI","authorize","getRefreshToken","QrCOx","folder","YWWQD","toLowerCase","yHNQc","https://auth.aliyundrive.com/v2/account/token","lUfjx","FHD","category","iESOf","TJJZM","MRZCr","zVijA","BXqTQ","responses","nypMy","RRzZm","VHdaI","QRqNe","@@@","url","390145GWIXVC","geopG","template_id","file_extension","oauthFunc--res-1-","log","jFhFf","HBirW","get","x-share-token","kSmzw","muPcO","YpxiS","sbuzP","QQWXs","save","alist---","initSome----oauth-","root","RMOuy","Iieob"];return(a=function(){return aK})()}async function refreshOpenToken(){var f,as=y,d={fwnAU:function(f){return f()},TJJZM:as(684),nMbKb:as(500),paYzo:as(841)};try{return _[as(605)](oauth.getRefreshToken())?await d[as(554)](oauthRequest):((f={})[d[as(573)]]=d.nMbKb,f[d[as(534)]]=oauth[as(562)](),await alist(d.paYzo,f))}catch(g){return console[as(589)](g[as(677)]),oauth[as(819)]()[as(599)](),!1}}async function getVod(d,e){var r,at=y,f={iLyDO:"share_id",uxjpN:function(u,v,w){return u(v,w)},eZVAE:function(u,v){return u+v},aCTlR:function(u,v,w){return u(v,w)},rlZMZ:function(u,v){return u<v},FdWOe:"share_name",oDviT:at(722),VsAzB:at(761)},g={},g=(g[f[at(767)]]=shareId,await f.uxjpN(post,"adrive/v3/share_link/get_share_by_anonymous",g)),g=JSON[at(717)](g),k=[],l=[],e=f[at(710)](getParentFileId,e,g),o=(await listFiles(new Item(e),k,l),["原画","超清","高清"]),p=[],q=[];for(r of k)p[at(763)](f[at(727)](f.eZVAE(r[at(745)](),"$")+r[at(711)](),f[at(670)](findSubs,r.getName(),l)));for(var s=0;f[at(536)](s,o.length);s++)q[at(763)](p.join("#"));return{vod_id:d,vod_content:d,vod_pic:g.avatar,vod_name:g[f[at(617)]],vod_play_url:q[at(794)](at(722)),vod_play_from:o[at(794)](f[at(820)]),type_name:f[at(785)],vod_year:"",vod_area:"",vod_remarks:"",vod_actor:"",vod_director:""}}async function listFiles(d,e,f){return{mTeAg:function(h,i,j,k,l){return h(i,j,k,l)}}[y(792)](listFilesMarker,d,e,f,"")}async function listFilesMarker(d,e,f,g){var l,m,av=y,h={fDBZj:av(646),YpxiS:av(636),LEOIe:av(547),lXhAy:"name",HEuur:av(833),RzbYq:function(n,o){return o<n},STftp:av(847),WTNwF:function(n,o,p,q){return n(o,p,q)},IFSWJ:av(701),wKFKk:function(n,o){return n==o},IBsxH:"folder",QIieu:"video",hBxyM:function(n,o){return n==o},IizMu:av(697),ptAgN:function(n,o){return o<n},etOiS:function(n,o,p,q,r){return n(o,p,q,r)},AHWOY:function(n,o,p,q){return n(o,p,q)}},i={},j=[],g=(i[h.fDBZj]=200,i[h[av(596)]]=shareId,i[av(498)]=d[av(711)](),i[h[av(842)]]=h[av(813)],i[av(618)]=h[av(535)],h.RzbYq(g[av(814)],0)&&(i[h[av(733)]]=g),Item[av(533)](await h[av(755)](auth,h[av(680)],i,!0)));for(l of g[av(805)]())h.wKFKk(l[av(752)](),h[av(781)])?j[av(763)](l):h[av(556)](l[av(821)](),h[av(557)])||h[av(709)](l[av(821)](),h[av(550)])?e[av(763)](l[av(501)](d[av(696)]())):c.isSub(l[av(653)]())&&f.push(l);h[av(529)](g.getNextMarker()[av(814)],0)&&await h.etOiS(listFilesMarker,d,e,f,g[av(545)]());for(m of j)await h[av(662)](listFiles,m,e,f)}function getParentFileId(d,e){var aw=y,f={ykRLt:aw(628),KHlnL:function(i,j){return i==j},wKdQu:function(i,j){return i==j},EXzNC:"type",kaHOj:aw(564),atWct:"file_id",ZfttW:aw(571),cdSWt:aw(688),VcUup:aw(602)},e=e[f.ykRLt];return _[aw(605)](d)?f[aw(832)](e.length,0)?"":(e=e[0],f[aw(506)](e[f[aw(768)]],f.kaHOj)?e[f[aw(803)]]:f[aw(506)](e[f[aw(768)]],aw(769))&&f[aw(506)](e[f[aw(728)]],f[aw(735)])?f.VcUup:""):d}function pair(d,e,f){var h,ax=y,g={YKYvF:function(j,k){return k<j}};for(h of e){var i=c[ax(652)](h[ax(696)]())[ax(566)]();(-1<d.indexOf(i)||g[ax(625)](i[ax(822)](d),-1))&&f[ax(763)](h)}}function findSubs(d,e){var j,ay=y,f={VdDQX:function(k,l,m,n){return k(l,m,n)},rzQnO:function(k,l){return k==l},hfMvJ:function(k,l){return k+l},kSmzw:function(k,l){return k+l},yyLjc:ay(582)},g=[];if(f[ay(624)](pair,c[ay(652)](d)[ay(566)](),e,g),f.rzQnO(g[ay(814)],0))for(var h of e)g[ay(763)](h);let i="";for(j of g)i+=f[ay(750)](f[ay(750)](f[ay(750)](f[ay(750)](f[ay(594)]("+",c[ay(652)](j[ay(696)]())),ay(582)),j[ay(653)]()),f[ay(678)]),j.getFileId());return i}async function getSubs(d){const az=y,e_moymn=function(h,i){return h+i};var g,h,f=[];for(g of d)-1<g.indexOf(az(582))&&((h=g.split(az(582)))[0],h[1],h=e_moymn(az(811),h[2]),f[az(763)](h));return f}async function getDownloadUrl(d){var aA=y,e={nypMy:function(h,i){return h(i)},NiXbt:aA(679),Bxrif:function(h,i,j,k){return h(i,j,k)},IeohA:"openFile/getDownloadUrl",fadkV:aA(848),QfNxY:function(h,i){return h(i)}},d=(tempIds.unshift(await e[aA(578)](copy,d)),{}),d=(d[aA(558)]=tempIds[0],d[e.NiXbt]=user[aA(827)](),await e[aA(676)](oauthFunc,e[aA(515)],d,!0));return console[aA(589)](e.fadkV),console[aA(589)](d),await e.QfNxY(log,e[aA(663)]+d),await deleteAll(),JSON.parse(d)[aA(583)]}async function getVideoPreviewPlayInfo(d){var aB=y,e={wdOnA:function(h,i){return h(i)},VHdaI:aB(558),RHDSh:aB(679),mxBQB:"category",FqIsl:aB(732),wQIwE:"14400",XFWdu:function(h,i,j,k){return h(i,j,k)},BelTx:aB(658),oVQui:"getVideoPreviewPlayInfo===",xVFEZ:function(h){return h()}},d=(tempIds[aB(626)](await e[aB(621)](copy,d)),{}),d=(d[e[aB(580)]]=tempIds[0],d[e[aB(665)]]=user[aB(827)](),d[e.mxBQB]=aB(731),d[e.FqIsl]=e[aB(643)],await e.XFWdu(oauthFunc,e.BelTx,d,!0));return console.log(e[aB(708)]),console[aB(589)](d),await e.xVFEZ(deleteAll),JSON[aB(717)](d)[aB(719)]}async function playerContent(d){var aC=y,e={BpZHw:function(h,i){return h(i)},xYyxS:function(h,i){return h(i)}},f=await e[aC(655)](getDownloadUrl,d[0]),e=await e[aC(694)](getSubs,d);return JSON[aC(633)]({parse:0,url:f,header:getHeader(),subt:e})}async function playerContentByFlag(d,e){var k,aD=y,f={RSPFq:function(l,m,n){return l(m,n)},HBirW:function(l,m){return l(m)},bNhAN:function(l){return l()}},g=await getVideoPreviewPlayInfo(d[0]),e=f[aD(671)](getPreviewUrl,g,e),i=await f[aD(591)](getSubs,d);for(k of f[aD(591)](getSubsByPlayInfo,g))i[aD(763)](k);return JSON[aD(633)]({parse:0,url:e,header:f[aD(764)](getHeader),subt:i})}function getPreviewUrl(d,e){var aE=y,f={lXMfR:aE(544),ilunC:function(j,k){return j<k},SmPeu:function(j,k){return j==k},Djeny:aE(586),PJVOQ:aE(583)};if(!d[aE(659)]("live_transcoding_task_list"))return"";for(var g=d[f[aE(740)]],h=0;f[aE(503)](h,g[aE(814)]);++h){var j=g[h];if(f[aE(615)](j[f.Djeny],quality[e]))return j[f[aE(757)]]}return g[0][f[aE(757)]]}function getSubsByPlayInfo(d){var aF=y,e={KYglo:aF(508),XzMkF:"language"};if(!d[aF(659)](e.KYglo))return[];for(var f=d[e[aF(685)]],g=[],h=0;h<f[aF(814)];++h){var j=f[h],j=(j[e[aF(718)]],j.url);g[aF(763)](j)}return g}async function copy(d){var aG=y,e={dhUkc:function(i,j){return i+j},innlI:aG(608),BrVbm:aG(507),fENPx:function(i,j,k){return i(j,k)},QRqNe:function(i,j){return i(j)},CNCCd:function(i,j){return i+j},lSakw:aG(511),urGys:"copy----json---",RRzZm:function(i,j,k,l){return i(j,k,l)},eAfvF:aG(802),LKCUZ:function(i,j){return i+j},NHyWF:"copy---result",idgqL:aG(782),aGHGZ:function(i,j){return j<i},LZIlv:aG(577),lUfjx:aG(664),wXaWK:aG(558)},f=(await log(e[aG(780)](e[aG(518)],user[aG(760)]())),e[aG(614)]),g={fileId:d,shareId:shareId,driveId:user[aG(827)]()},f=e[aG(736)](jinja2,f,{data:g}),g=(await e[aG(581)](log,e[aG(714)](e.lSakw,f)),console[aG(589)](e[aG(499)]),console[aG(589)](f),await e[aG(579)](auth,e[aG(796)],JSON.parse(f),!0));return await e.QRqNe(log,e[aG(801)](e[aG(613)],g)),console.log(e[aG(610)]),console[aG(589)](g),console[aG(589)](typeof g),e[aG(555)](g[aG(822)](aG(496)),-1)?e[aG(581)](copy,d):JSON.parse(g)[e[aG(759)]][0][e[aG(569)]][e[aG(770)]]}async function deleteAll(){var f,aH=y,d={BBiWQ:"deleteAll-----",QwjbN:function(g,h){return g(h)}},e=tempIds;console.log(d[aH(791)]),console[aH(589)](e);for(f of e)await d[aH(504)](deleteFile,f)&&(tempIds=e.filter(h=>h!==f))}async function deleteFile(d){var aI=y,e={BXqTQ:aI(553),JdLhq:function(i,j,k){return i(j,k)},xDLZN:function(i,j,k,l){return i(j,k,l)},FZpdd:aI(548),jQEMF:function(i,j){return i==j}},f=e[aI(576)],d={fileId:d,driveId:user[aI(827)]()},f=e[aI(834)](jinja2,f,{data:d}),d=await e[aI(831)](auth,"adrive/v2/batch",JSON[aI(717)](f),!0);return console.log(e[aI(661)]),console.log(d),e[aI(751)](d[aI(814)],211)}async function setToken(d){var aJ=y;user[aJ(706)](d),await{oGzgI:function(f){return f()}}[aJ(552)](refreshAccessToken)}export{initSome,setToken,setShareId,getVod,playerContent,playerContentByFlag}; |