// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.1.1 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @include https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @match *://www.bilibili.com/* // @require https://unpkg.com/jquery@3.6.0/dist/jquery.min.js // @require https://unpkg.com/axios@0.26.1/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.1.11/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.0.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.0.0/umd/react-dom.production.min.js // @connect app.bilibili.com // @connect passport.bilibili.com // @connect link.acg.tv // @connect www.mcbbs.net // @grant GM.xmlHttpRequest // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant unsafeWindow // @downloadURL none // ==/UserScript== ;(({ cssTextList = [] }) => { cssTextList.forEach((s) => { const style = document.createElement("style"); style.innerText = s; style.dataset.source = "vite-plugin-monkey"; document.head.appendChild(style); }); })({ "cssTextList": [ "._toast-container_9119l_1{position:fixed;top:50%;left:50%;z-index:999999;padding:12px 24px;font-size:14px;width:240px;margin-left:-120px;background:#ffb243;color:#fff;border-radius:6px}._bili-video-card_3h2r6_1{position:relative}._image-wrapper_3h2r6_4{border-radius:\"6px\";overflow:\"hidden\"}._preview-card-wrapper_3h2r6_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._watch-later_3h2r6_21{z-index:3}._badge_3h2r6_24{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_3h2r6_32{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_3h2r6_47{color:default}._btn-dislike_3h2r6_50{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_3h2r6_50 ._btn-dislike-icon_3h2r6_65{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_3h2r6_50 ._btn-dislike-tip_3h2r6_72{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_3h2r6_87{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_3h2r6_87{border:1px solid #333}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107 ._dislike-icon_3h2r6_118{color:inherit}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107 ._dislike-reason_3h2r6_121{font-size:20px;text-align:center}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107 ._dislike-desc_3h2r6_125{font-size:16px;text-align:center}._disliked-wrapper_3h2r6_87 ._dislike-content-action_3h2r6_129{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_3h2r6_87 ._dislike-content-action_3h2r6_129{border-top:1px solid #333}._disliked-wrapper_3h2r6_87 ._dislike-content-action_3h2r6_129 button{font-size:18px;color:inherit}._modal-mask_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._modal-mask_12oi8_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11000;display:flex;align-items:center;justify-content:center}._modal_12oi8_1{width:calc(100vw - 50px);height:calc(100vh - 50px);border:1px solid #fa6a9d;border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_12oi8_1 ._modal-header_12oi8_24{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_12oi8_1 ._modal-header_12oi8_24 ._modal-title_12oi8_31{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_12oi8_1 ._modal-header_12oi8_24 ._btn-refresh_12oi8_36,body.dark ._modal_12oi8_1 ._modal-header_12oi8_24 ._btn-close_12oi8_37{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_12oi8_1 ._modal-header_12oi8_24 ._btn-close_12oi8_37{margin-left:10px}._modal_12oi8_1 ._modal-header_12oi8_24 ._btn-close_12oi8_37 svg{width:10px;height:10px}._modal_12oi8_1 ._modal-body_12oi8_53{padding-top:0;flex-grow:1;overflow-y:scroll}._list_12oi8_58,._card_12oi8_61{color:inherit}._video-card-list_12oi8_64.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._loader_12oi8_67{text-align:center;line-height:60px;font-size:120%}._grid_p5dvw_1{color:default}@media (min-width: 2200px){._video-card-list_p5dvw_5.is-full{grid-column:span 7!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_p5dvw_19{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_p5dvw_19 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_p5dvw_19 svg._expanded_p5dvw_30{transform:rotate(0)}\n" ] }); var Lm=Object.defineProperty,Tm=Object.defineProperties;var Rm=Object.getOwnPropertyDescriptors;var Jr=Object.getOwnPropertySymbols;var jl=Object.prototype.hasOwnProperty,ef=Object.prototype.propertyIsEnumerable;var Xs=(Ee,be,P)=>be in Ee?Lm(Ee,be,{enumerable:!0,configurable:!0,writable:!0,value:P}):Ee[be]=P,Rn=(Ee,be)=>{for(var P in be||(be={}))jl.call(be,P)&&Xs(Ee,P,be[P]);if(Jr)for(var P of Jr(be))ef.call(be,P)&&Xs(Ee,P,be[P]);return Ee},jn=(Ee,be)=>Tm(Ee,Rm(be));var tf=(Ee,be)=>{var P={};for(var _t in Ee)jl.call(Ee,_t)&&be.indexOf(_t)<0&&(P[_t]=Ee[_t]);if(Ee!=null&&Jr)for(var _t of Jr(Ee))be.indexOf(_t)<0&&ef.call(Ee,_t)&&(P[_t]=Ee[_t]);return P};var Zs=(Ee,be,P)=>(Xs(Ee,typeof be!="symbol"?be+"":be,P),P);(function(Ee,be,P,_t,nf){"use strict";function Cn(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var On=Cn(Ee),rf=Cn(be),Vr=Cn(P),Qr=Cn(_t),sf=Cn(nf),fn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},qr={exports:{}};const of=(u,o)=>Math.floor(Math.random()*(o-u+1)+u),Js=()=>{const u=new Error("Delay aborted");return u.name="AbortError",u},Vs=({clearTimeout:u,setTimeout:o,willResolve:i})=>(f,{value:h,signal:p}={})=>{if(p&&p.aborted)return Promise.reject(Js());let v,y,E;const C=u||clearTimeout,T=()=>{C(v),E(Js())},L=()=>{p&&p.removeEventListener("abort",T)},N=new Promise((R,F)=>{y=()=>{L(),i?R(h):F(h)},E=F,v=(o||setTimeout)(y,f)});return p&&p.addEventListener("abort",T,{once:!0}),N.clear=()=>{C(v),v=null,y()},N},Qs=u=>{const o=Vs(jn(Rn({},u),{willResolve:!0}));return o.reject=Vs(jn(Rn({},u),{willResolve:!1})),o.range=(i,f,h)=>o(of(i,f),h),o},jr=Qs();jr.createWithTimers=Qs,qr.exports=jr,qr.exports.default=jr;var qs=qr.exports,ei,uf=rf.default;ei=uf.createRoot;var js={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(u){(function(){var o={}.hasOwnProperty;function i(){for(var f=[],h=0;h0)&&!(h=f.next()).done;)p.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(v)throw v.error}}return p};function ro(u,o){u===void 0&&(u=!1);var i=cf(P.useState(u),2),f=i[0],h=i[1],p=P.useMemo(function(){var v=o===void 0?!u:o,y=function(){return h(function(N){return N===u?v:u})},E=function(N){return h(N)},C=function(){return h(u)},T=function(){return h(v)};return{toggle:y,set:E,setLeft:C,setRight:T}},[]);return[f,p]}var hf=globalThis&&globalThis.__read||function(u,o){var i=typeof Symbol=="function"&&u[Symbol.iterator];if(!i)return u;var f=i.call(u),h,p=[],v;try{for(;(o===void 0||o-- >0)&&!(h=f.next()).done;)p.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(v)throw v.error}}return p};function df(u){u===void 0&&(u=!1);var o=hf(ro(u),2),i=o[0],f=o[1],h=f.toggle,p=f.set,v=P.useMemo(function(){var y=function(){return p(!0)},E=function(){return p(!1)};return{toggle:h,set:function(T){return p(!!T)},setTrue:y,setFalse:E}},[]);return[i,v]}var pf=!!(typeof window!="undefined"&&window.document&&window.document.createElement),gf=pf;function ti(u,o){if(!!gf){if(!u)return o;var i;return typeof u=="function"?i=u():"current"in u?i=u.current:i=u,i}}var _f=function(o){var i=function(h,p,v){var y=P.useRef(!1),E=P.useRef([]),C=P.useRef([]),T=P.useRef();o(function(){var L,N=Array.isArray(v)?v:[v],R=N.map(function(F){return ti(F)});if(!y.current){y.current=!0,E.current=R,C.current=p,T.current=h();return}(R.length!==E.current.length||!eo(R,E.current)||!eo(p,C.current))&&((L=T.current)===null||L===void 0||L.call(T),E.current=R,C.current=p,T.current=h())}),no(function(){var L;(L=T.current)===null||L===void 0||L.call(T),y.current=!1})};return i},vf=_f,mf=vf(P.useEffect),wf=mf,io={exports:{}};(function(u,o){(function(i,f){u.exports=f()})(fn,function(){var i=1e3,f=6e4,h=36e5,p="millisecond",v="second",y="minute",E="hour",C="day",T="week",L="month",N="quarter",R="year",F="date",j="Invalid Date",Y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ne=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Le={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},ve=function(X,I,M){var K=String(X);return!K||K.length>=I?X:""+Array(I+1-K.length).join(M)+X},he={s:ve,z:function(X){var I=-X.utcOffset(),M=Math.abs(I),K=Math.floor(M/60),O=M%60;return(I<=0?"+":"-")+ve(K,2,"0")+":"+ve(O,2,"0")},m:function X(I,M){if(I.date()1)return X(G[0])}else{var oe=I.name;Me[oe]=I,O=oe}return!K&&O&&(fe=O),O||!K&&fe},de=function(X,I){if(Be(X))return X.clone();var M=typeof I=="object"?I:{};return M.date=X,M.args=arguments,new Ie(M)},ie=he;ie.l=Ge,ie.i=Be,ie.w=function(X,I){return de(X,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var Ie=function(){function X(M){this.$L=Ge(M.locale,null,!0),this.parse(M)}var I=X.prototype;return I.parse=function(M){this.$d=function(K){var O=K.date,k=K.utc;if(O===null)return new Date(NaN);if(ie.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var G=O.match(Y);if(G){var oe=G[2]-1||0,Q=(G[7]||"0").substring(0,3);return k?new Date(Date.UTC(G[1],oe,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Q)):new Date(G[1],oe,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Q)}}return new Date(O)}(M),this.$x=M.x||{},this.init()},I.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},I.$utils=function(){return ie},I.isValid=function(){return this.$d.toString()!==j},I.isSame=function(M,K){var O=de(M);return this.startOf(K)<=O&&O<=this.endOf(K)},I.isAfter=function(M,K){return de(M)0)&&!(h=f.next()).done;)p.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(v)throw v.error}}return p},ri=function(u,o){var i=o||{},f=i.onEnter,h=i.onLeave,p=yf(df(!1),2),v=p[0],y=p[1],E=y.setTrue,C=y.setFalse;return ni("mouseenter",function(){f==null||f(),E()},{target:u}),ni("mouseleave",function(){h==null||h(),C()},{target:u}),v},bf=globalThis&&globalThis.__read||function(u,o){var i=typeof Symbol=="function"&&u[Symbol.iterator];if(!i)return u;var f=i.call(u),h,p=[],v;try{for(;(o===void 0||o-- >0)&&!(h=f.next()).done;)p.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(v)throw v.error}}return p};function xf(u){var o=P.useRef(0),i=bf(P.useState(u),2),f=i[0],h=i[1],p=P.useCallback(function(v){cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){h(v)})},[]);return no(function(){cancelAnimationFrame(o.current)}),[f,p]}var Sf=globalThis&&globalThis.__read||function(u,o){var i=typeof Symbol=="function"&&u[Symbol.iterator];if(!i)return u;var f=i.call(u),h,p=[],v;try{for(;(o===void 0||o-- >0)&&!(h=f.next()).done;)p.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(v)throw v.error}}return p},Af={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},Ef=function(u){var o=Sf(xf(Af),2),i=o[0],f=o[1];return ni("mousemove",function(h){var p=h.screenX,v=h.screenY,y=h.clientX,E=h.clientY,C=h.pageX,T=h.pageY,L={screenX:p,screenY:v,clientX:y,clientY:E,pageX:C,pageY:T,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},N=ti(u);if(N){var R=N.getBoundingClientRect(),F=R.left,j=R.top,Y=R.width,ne=R.height;L.elementPosX=F+window.pageXOffset,L.elementPosY=j+window.pageYOffset,L.elementX=C-L.elementPosX,L.elementY=T-L.elementPosY,L.elementW=Y,L.elementH=ne}f(L)},{target:document}),i},Lf=function(){var o=P.useRef(!1);return P.useEffect(function(){return o.current=!1,function(){o.current=!0}},[]),o},Tf=Lf,Rf=globalThis&&globalThis.__read||function(u,o){var i=typeof Symbol=="function"&&u[Symbol.iterator];if(!i)return u;var f=i.call(u),h,p=[],v;try{for(;(o===void 0||o-- >0)&&!(h=f.next()).done;)p.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(v)throw v.error}}return p};function Dt(u){var o=Tf(),i=Rf(P.useState(u),2),f=i[0],h=i[1],p=P.useCallback(function(v){o.current||h(v)},[]);return[f,p]}const ii=Symbol(),Cf=Symbol(),si=Symbol(),oi=Object.getPrototypeOf,ui=new WeakMap,oo=u=>u&&(ui.has(u)?ui.get(u):oi(u)===Object.prototype||oi(u)===Array.prototype),ai=u=>typeof u=="object"&&u!==null,Of=(u,o)=>{let i=!1;const f=(p,v,y)=>{if(!i){let E=p.a.get(u);E||(E=new Set,p.a.set(u,E)),y&&E.has(ii)||E.add(v)}},h={f:o,get(p,v){return v===si?u:(f(this,v),uo(p[v],this.a,this.c))},has(p,v){return v===Cf?(i=!0,this.a.delete(u),!0):(f(this,v),v in p)},getOwnPropertyDescriptor(p,v){return f(this,v,!0),Object.getOwnPropertyDescriptor(p,v)},ownKeys(p){return f(this,ii),Reflect.ownKeys(p)}};return o&&(h.set=h.deleteProperty=()=>!1),h},uo=(u,o,i)=>{if(!oo(u))return u;const f=u[si]||u,h=(v=>Object.isFrozen(v)||Object.values(Object.getOwnPropertyDescriptors(v)).some(y=>!y.writable))(f);let p=i&&i.get(f);return p&&p.f===h||(p=Of(f,h),p.p=new Proxy(h?(v=>{if(Array.isArray(v))return Array.from(v);const y=Object.getOwnPropertyDescriptors(v);return Object.values(y).forEach(E=>{E.configurable=!0}),Object.create(oi(v),y)})(f):f,p),i&&i.set(f,p)),p.a=o,p.c=i,p.p},Df=(u,o)=>{const i=Reflect.ownKeys(u),f=Reflect.ownKeys(o);return i.length!==f.length||i.some((h,p)=>h!==f[p])},ao=(u,o,i,f)=>{if(Object.is(u,o))return!1;if(!ai(u)||!ai(o))return!0;const h=i.get(u);if(!h)return!0;if(f){const v=f.get(u);if(v&&v.n===o)return v.g;f.set(u,{n:o,g:!1})}let p=null;for(const v of h){const y=v===ii?Df(u,o):ao(u[v],o[v],i,f);if(y!==!0&&y!==!1||(p=y),p)break}return p===null&&(p=!0),f&&f.set(u,{n:o,g:p}),p},Mf=u=>oo(u)&&u[si]||null,lo=(u,o)=>{ui.set(u,o)},If=(u,o)=>{const i=[],f=new WeakSet,h=(p,v)=>{if(f.has(p))return;ai(p)&&f.add(p);const y=o.get(p);y?y.forEach(E=>{h(p[E],v?[...v,E]:[E])}):v&&i.push(v)};return h(u),i};var fo={exports:{}},co={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var cn=Vr.default;function Nf(u,o){return u===o&&(u!==0||1/u===1/o)||u!==u&&o!==o}var Pf=typeof Object.is=="function"?Object.is:Nf,Ff=cn.useState,Wf=cn.useEffect,Bf=cn.useLayoutEffect,kf=cn.useDebugValue;function Uf(u,o){var i=o(),f=Ff({inst:{value:i,getSnapshot:o}}),h=f[0].inst,p=f[1];return Bf(function(){h.value=i,h.getSnapshot=o,li(h)&&p({inst:h})},[u,i,o]),Wf(function(){return li(h)&&p({inst:h}),u(function(){li(h)&&p({inst:h})})},[u]),kf(i),i}function li(u){var o=u.getSnapshot;u=u.value;try{var i=o();return!Pf(u,i)}catch{return!0}}function zf(u,o){return o()}var Hf=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?zf:Uf;co.useSyncExternalStore=cn.useSyncExternalStore!==void 0?cn.useSyncExternalStore:Hf,fo.exports=co;var Yf=fo.exports;const Gf=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),Et=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),er=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),Kf=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Dn=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),ho=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),po=new WeakSet,fi=u=>typeof u=="object"&&u!==null,$f=u=>fi(u)&&!po.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),go=new WeakMap;let _o=1;const vo=new WeakMap;function ci(u={}){if(!fi(u))throw new Error("object required");const o=go.get(u);if(o)return o;let i=_o;const f=new Set,h=(N,R=++_o)=>{i!==R&&(i=R,f.forEach(F=>F(N,R)))},p=new Map,v=N=>{let R=p.get(N);return R||(R=(F,j)=>{const Y=[...F];Y[1]=[N,...Y[1]],h(Y,j)},p.set(N,R)),R},y=N=>{const R=p.get(N);return p.delete(N),R},E=(N,R)=>{const F=vo.get(R);if((F==null?void 0:F[0])===i)return F[1];const j=Array.isArray(N)?[]:Object.create(Object.getPrototypeOf(N));return lo(j,!0),vo.set(R,[i,j]),Reflect.ownKeys(N).forEach(Y=>{const ne=Reflect.get(N,Y,R);if(po.has(ne))lo(ne,!1),j[Y]=ne;else if(ne instanceof Promise)if(Dn in ne)j[Y]=ne[Dn];else{const Le=ne[ho]||ne;Object.defineProperty(j,Y,{get(){if(Dn in ne)return ne[Dn];throw Le}})}else ne!=null&&ne[Et]?j[Y]=ne[er]:j[Y]=ne}),Object.freeze(j),j},C=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),T={get(N,R,F){return R===Gf?i:R===Et?f:R===er?E(N,F):R===Kf?T:Reflect.get(N,R,F)},deleteProperty(N,R){const F=Reflect.get(N,R),j=F==null?void 0:F[Et];j&&j.delete(y(R));const Y=Reflect.deleteProperty(N,R);return Y&&h(["delete",[R],F]),Y},is:Object.is,canProxy:$f,set(N,R,F,j){var Y;const ne=Reflect.has(N,R),Le=Reflect.get(N,R,j);if(ne&&this.is(Le,F))return!0;const ve=Le==null?void 0:Le[Et];ve&&ve.delete(y(R)),fi(F)&&(F=Mf(F)||F);let he;return(Y=Object.getOwnPropertyDescriptor(N,R))!=null&&Y.set?he=F:F instanceof Promise?he=F.then(fe=>(he[Dn]=fe,h(["resolve",[R],fe]),fe)).catch(fe=>{he[ho]=fe,h(["reject",[R],fe])}):F!=null&&F[Et]?(he=F,he[Et].add(v(R))):this.canProxy(F)?(he=ci(F),he[Et].add(v(R))):he=F,Reflect.set(N,R,he,j),h(["set",[R],F,Le]),!0}},L=new Proxy(C,T);return go.set(u,L),Reflect.ownKeys(u).forEach(N=>{const R=Object.getOwnPropertyDescriptor(u,N);R.get||R.set?Object.defineProperty(C,N,R):L[N]=u[N]}),L}function Xf(u,o,i){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(u!=null&&u[Et])&&console.warn("Please use proxy object");let f;const h=[],p=v=>{if(h.push(v),i){o(h.splice(0));return}f||(f=Promise.resolve().then(()=>{f=void 0,o(h.splice(0))}))};return u[Et].add(p),()=>{u[Et].delete(p)}}function mo(u){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(u!=null&&u[er])&&console.warn("Please use proxy object"),u[er]}const{useSyncExternalStore:Zf}=Yf,Jf=(u,o)=>{const i=P.useRef();P.useEffect(()=>{i.current=If(u,o)}),P.useDebugValue(i.current)};function wo(u,o){const i=o==null?void 0:o.sync,f=P.useRef(),h=P.useRef();let p=!0;const v=Zf(P.useCallback(C=>{const T=Xf(u,C,i);return C(),T},[u,i]),()=>{const C=mo(u);try{if(!p&&f.current&&h.current&&!ao(f.current,C,h.current,new WeakMap))return f.current}catch{}return C},()=>mo(u));p=!1;const y=new WeakMap;P.useEffect(()=>{f.current=v,h.current=y}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Jf(v,y);const E=P.useMemo(()=>new WeakMap,[]);return uo(v,y,E)}const Mn=ci({accessKey:""}),yo=function(){return wo(Mn)},bo="bilibili-app-recommend.config";function Vf(){const u=GM_getValue(bo);u&&typeof u=="object"&&Object.assign(Mn,u)}function Qf(){GM_setValue(bo,Mn)}function xo(u){Object.assign(Mn,u),Qf()}Vf();const So="_toast-container_9119l_1";var Om={toastContainer:So};function zt(u,o=2e3){const i=On.default(`
${u}
`);i.appendTo(document.body),setTimeout(()=>i.remove(),o)}async function qf(){var E,C;const o=(await Qr.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((E=o==null?void 0:o.data)!=null&&E.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:o};if(!((C=o==null?void 0:o.data)!=null&&C.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:o};const i=o.data.confirm_uri;let f;const h=new Promise(T=>{window.addEventListener("message",L=>{if(L.origin!="https://www.mcbbs.net"||!L.data)return;const N=L.data.match(/access_key=([0-9a-z]{32})/);if(!N||!N[1])return T({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});T(N[1])}),f=setTimeout(()=>{T({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},5e3)}),p=On.default(`