// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.9.0 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @match *://www.bilibili.com/ // @match *://www.bilibili.com/?* // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @require https://unpkg.com/axios@0.27.2/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.2.0/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.2.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.2.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_deleteValue // @grant GM_getValue // @grant GM_setValue // @downloadURL none // ==/UserScript== (e=>{const i=document.createElement("style");i.dataset.source="vite-plugin-monkey",i.innerText=e,document.head.appendChild(i)})(` .primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}._modal-mask_qk630_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_qk630_1{width:500px;max-height:calc(90vh - 50px);background-color:#fff;border-radius:10px;padding:0 15px 15px;display:flex;flex-direction:column;overflow:hidden}._modal-header_qk630_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal-body_qk630_30{padding-top:0;flex-grow:1;overflow-y:scroll}._modal-title_qk630_35{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._btn-close_qk630_42{margin-left:10px}._btn-close_qk630_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._btn-close_qk630_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._toast-container_mcbuq_1{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999999;padding:12px 24px;font-size:14px;min-width:200px;width:max-content;max-width:450px;background:#ffb243;color:#fff;border-radius:6px;white-space:pre-wrap}._toast-container_mcbuq_1._single-line_mcbuq_17{text-align:center}._modal_dp8y9_1{width:500px}._title-desc_dp8y9_4{margin-left:5px;font-size:40%}._reason-list_dp8y9_8{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_dp8y9_8{color:inherit;width:48%;text-align:center;line-height:20px;position:relative;border:1px solid #eee;padding-top:5px;padding-bottom:5px;margin-top:5px;margin-bottom:5px}body.dark ._reason_dp8y9_8{border:1px solid #333}._reason_dp8y9_8._active_dp8y9_29{border-color:#fb7299;border-radius:4px}._reason-no_dp8y9_33{position:absolute;left:6px;width:20px;height:20px;border-radius:50%;top:6px;display:flex;align-items:center;justify-content:center;background-color:#6a5acd;background-color:#fb7299;color:#fff}._tips-container_dp8y9_47{margin-top:20px}._tips_dp8y9_47{display:flex;align-items:center}._bili-video-card_mqmiz_1{position:relative}._image-wrapper_mqmiz_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_mqmiz_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}._preview-card-wrapper_mqmiz_8 ._preview-card-inner_mqmiz_21{width:100%;height:100%}._watch-later_mqmiz_25{z-index:3}._badge_mqmiz_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_mqmiz_36{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_mqmiz_51{color:default}._btn-dislike_mqmiz_54{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_mqmiz_54 ._btn-dislike-icon_mqmiz_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_mqmiz_54 ._btn-dislike-tip_mqmiz_76{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_mqmiz_91{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_mqmiz_91{border:1px solid #333}._disliked-wrapper_mqmiz_91 ._dislike-content-cover_mqmiz_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_mqmiz_91 ._dislike-content-cover_mqmiz_105 ._dislike-content-cover-inner_mqmiz_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_mqmiz_91 ._dislike-content-cover_mqmiz_105 ._dislike-content-cover-inner_mqmiz_111 ._dislike-icon_mqmiz_122{margin-bottom:5px}._disliked-wrapper_mqmiz_91 ._dislike-content-cover_mqmiz_105 ._dislike-content-cover-inner_mqmiz_111 ._dislike-reason_mqmiz_125{font-size:20px;text-align:center}._disliked-wrapper_mqmiz_91 ._dislike-content-cover_mqmiz_105 ._dislike-content-cover-inner_mqmiz_111 ._dislike-desc_mqmiz_129{font-size:16px;text-align:center}._disliked-wrapper_mqmiz_91 ._dislike-content-action_mqmiz_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_mqmiz_91 ._dislike-content-action_mqmiz_133{border-top:1px solid #333}._disliked-wrapper_mqmiz_91 ._dislike-content-action_mqmiz_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._skeleton-active_mqmiz_150 .bili-video-card__skeleton--cover,._skeleton-active_mqmiz_150 .bili-video-card__skeleton--text,._skeleton-active_mqmiz_150 .bili-video-card__skeleton--light{background:linear-gradient(135deg,rgba(0,0,0,.06) 25%,rgba(0,0,0,.15) 37%,rgba(0,0,0,.06) 63%);background-size:400% 100%;animation-name:_ant-skeleton-loading_mqmiz_1;animation-duration:1.4s;animation-timing-function:ease;animation-iteration-count:infinite}@keyframes _ant-skeleton-loading_mqmiz_1{0%{background-position:100% 50%}to{background-position:0 50%}}._video-grid_14t5i_9{display:grid;position:relative;width:100%;grid-gap:20px 12px}@media (max-width: 1099.9px){._video-grid_14t5i_9{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1100px) and (max-width: 1700.9px){._video-grid_14t5i_9{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}@media (min-width: 1701px){._video-grid_14t5i_9{grid-template-columns:repeat(6,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 13){display:none!important}}._video-grid_14t5i_9._internal-testing_14t5i_43{grid-gap:20px 20px}@media (max-width: 1399.9px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 5){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1400px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 6){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}._narrow-mode_14t5i_71{grid-template-columns:repeat(2,1fr)!important}._config-icon_1onav_1{line-height:1;margin-right:5px;font-size:0}._settings-group_1onav_6{margin-bottom:10px}._settings-group_1onav_6 ._settings-group-title_1onav_9{font-size:2em}._settings-group_1onav_6 ._settings-group-content_1onav_12{color:default}._settings-group_1onav_6 ._settings-group-content_1onav_12 button:first-child{margin-left:0}._row_1onav_18{display:flex;align-items:center;flex-wrap:wrap}._row_1onav_18 .primary-btn:first-child{margin-left:0}._check_1onav_26{margin-right:20px;margin-bottom:5px}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._modal-mask_1as61_1._narrow-mode_1as61_1{background-color:#000000e6}._modal_1as61_1{width:calc(100vw - 30px);height:calc(100vh - 30px);max-height:unset;padding-right:0}body.dark ._modal_1as61_1{border:1px solid #fb7299}._modal_1as61_1._narrow-mode_1as61_1{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1as61_1._narrow-mode_1as61_1{border:none}._modal-header_1as61_21,._modal-body_1as61_22{padding-right:15px}body.dark ._btn-refresh_1as61_25{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px} `); var _b=Object.defineProperty;var Sb=(p,Y,Z)=>Y in p?_b(p,Y,{enumerable:!0,configurable:!0,writable:!0,value:Z}):p[Y]=Z;var ae=(p,Y,Z)=>(Sb(p,typeof Y!="symbol"?Y+"":Y,Z),Z),Us=(p,Y,Z)=>{if(!Y.has(p))throw TypeError("Cannot "+Z)};var u=(p,Y,Z)=>(Us(p,Y,"read from private field"),Z?Z.call(p):Y.get(p)),H=(p,Y,Z)=>{if(Y.has(p))throw TypeError("Cannot add the same private member more than once");Y instanceof WeakSet?Y.add(p):Y.set(p,Z)},N=(p,Y,Z,It)=>(Us(p,Y,"write to private field"),It?It.call(p,Z):Y.set(p,Z),Z),Jr=(p,Y,Z,It)=>({set _(qr){N(p,Y,qr,Z)},get _(){return u(p,Y,It)}}),L=(p,Y,Z)=>(Us(p,Y,"access private method"),Z);(function(p,Y,Z,It){var rn,je,Re,et,Fe,on,le,We,ue,J,j,ke,Me,we,me,ze,ye,ft,dt,He,tt,vt,Oe,$n,Gs,Lt,ht,Vn,Le,Kr,wl,Pt,an,Yn,nt,_t,rt,St,Kn,$s,cn,Zr,ln,Qr,K,q,Xn,Vs,Nt,Zn;"use strict";function qr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ys=qr(p);function Sl(e){if(e.sheet)return e.sheet;for(var t=0;t0?ge(Ft,--Ee):0,jt--,se===10&&(jt=1,tr--),se}function Te(){return se=Ee2||mn(se)>3?"":" "}function Nl(e,t){for(;--t&&Te()&&!(se<48||se>102||se>57&&se<65||se>70&&se<97););return pn(e,rr()+(t<6&&Ge()==32&&Te()==32))}function ii(e){for(;Te();)switch(se){case e:return Ee;case 34:case 39:e!==34&&e!==39&&ii(se);break;case 40:e===41&&ii(e);break;case 92:Te();break}return Ee}function Dl(e,t){for(;Te()&&e+se!==47+10;)if(e+se===42+42&&Ge()===47)break;return"/*"+pn(t,Ee-1)+"*"+qn(e===47?e:Te())}function Il(e){for(;!mn(Ge());)Te();return pn(e,Ee)}function jl(e){return qs(sr("",null,null,null,[""],e=Qs(e),0,[0],e))}function sr(e,t,n,r,i,s,o,a,c){for(var l=0,f=0,d=o,h=0,y=0,v=0,g=1,w=1,b=1,x=0,D="",F=i,S=s,_=r,k=D;w;)switch(v=x,x=Te()){case 40:if(v!=108&&ge(k,d-1)==58){ni(k+=$(ir(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=ir(x);break;case 9:case 10:case 13:case 32:k+=Pl(v);break;case 92:k+=Nl(rr()-1,7);continue;case 47:switch(Ge()){case 42:case 47:er(Fl(Dl(Te(),rr()),t,n),c);break;default:k+="/"}break;case 123*g:a[l++]=Ue(k)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:w=0;case 59+f:y>0&&Ue(k)-d&&er(y>32?to(k+";",r,n,d-1):to($(k," ","")+";",r,n,d-2),c);break;case 59:k+=";";default:if(er(_=eo(k,t,n,l,f,i,a,D,F=[],S=[],d),s),x===123)if(f===0)sr(k,t,_,_,F,s,d,a,S);else switch(h===99&&ge(k,3)===110?100:h){case 100:case 109:case 115:sr(e,_,_,r&&er(eo(e,_,_,0,0,i,a,D,i,F=[],d),S),i,S,d,a,r?F:S);break;default:sr(k,_,_,_,[""],S,0,a,S)}}l=f=y=0,g=b=1,D=k="",d=o;break;case 58:d=1+Ue(k),y=v;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&Ll()==125)continue}switch(k+=qn(x),x*g){case 38:b=f>0?1:(k+="\f",-1);break;case 44:a[l++]=(Ue(k)-1)*b,b=1;break;case 64:Ge()===45&&(k+=ir(Te())),h=Ge(),f=d=Ue(D=k+=Il(rr())),x++;break;case 45:v===45&&Ue(k)==2&&(g=0)}}return s}function eo(e,t,n,r,i,s,o,a,c,l,f){for(var d=i-1,h=i===0?s:[""],y=ri(h),v=0,g=0,w=0;v0?h[b]+" "+x:$(x,/&\f/g,h[b])))&&(c[w++]=D);return nr(e,t,n,i===0?ei:a,c,l,f)}function Fl(e,t,n){return nr(e,t,n,Ks,qn(Ml()),dn(e,2,-2),0)}function to(e,t,n,r){return nr(e,t,n,ti,dn(e,0,r),dn(e,r+1,-1),r)}function Wt(e,t){for(var n="",r=ri(e),i=0;i6)switch(ge(e,t+1)){case 109:if(ge(e,t+4)!==45)break;case 102:return $(e,/(.+:)(.+)-([^]+)/,"$1"+U+"$2-$3$1"+Qn+(ge(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ni(e,"stretch")?ro($(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ge(e,t+1)!==115)break;case 6444:switch(ge(e,Ue(e)-3-(~ni(e,"!important")&&10))){case 107:return $(e,":",":"+U)+e;case 101:return $(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+U+(ge(e,14)===45?"inline-":"")+"box$3$1"+U+"$2$3$1"+ve+"$2box$3")+e}break;case 5936:switch(ge(e,t+11)){case 114:return U+e+ve+$(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return U+e+ve+$(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return U+e+ve+$(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return U+e+ve+e+e}return e}var Kl=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ti:t.return=ro(t.value,t.length);break;case Xs:return Wt([hn(t,{value:$(t.value,"@","@"+U)})],i);case ei:if(t.length)return Rl(t.props,function(s){switch(Al(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wt([hn(t,{props:[$(s,/:(read-\w+)/,":"+Qn+"$1")]})],i);case"::placeholder":return Wt([hn(t,{props:[$(s,/:(plac\w+)/,":"+U+"input-$1")]}),hn(t,{props:[$(s,/:(plac\w+)/,":"+Qn+"$1")]}),hn(t,{props:[$(s,/:(plac\w+)/,ve+"input-$1")]})],i)}return""})}},Xl=[Kl],io=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var w=g.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||Xl,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var w=g.getAttribute("data-emotion").split(" "),b=1;b=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lu={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uu=/[A-Z]|^ms/g,fu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uo=function(t){return t.charCodeAt(1)===45},fo=function(t){return t!=null&&typeof t!="boolean"},ui=Bl(function(e){return uo(e)?e:e.replace(uu,"-$&").toLowerCase()}),ho=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(fu,function(r,i,s){return $e={name:i,styles:s,next:$e},i})}return lu[t]!==1&&!uo(t)&&typeof n=="number"&&n!==0?n+"px":n},kb="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function gn(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $e={name:n.name,styles:n.styles,next:$e},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$e={name:r.name,styles:r.styles,next:$e},r=r.next;var i=n.styles+";";return i}return du(e,t,n)}case"function":{if(e!==void 0){var s=$e,o=n(e);return $e=s,gn(e,t,o)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function du(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i0){if(++t>=wf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ef(e){return function(){return e}}var Cf=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}();const br=Cf;var Of=br?function(e,t){return br(e,"toString",{configurable:!0,enumerable:!1,value:Ef(t),writable:!0})}:Ao,Tf=kf(Of);const xf=Tf;function Af(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s-1}var Nf=9007199254740991,Df=/^(?:0|[1-9]\d*)$/;function gi(e,t){var n=typeof e;return t=t??Nf,!!t&&(n=="number"||n!="symbol"&&Df.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Hf}function Bf(e){return e!=null&&vi(e.length)&&!Ro(e)}var Uf=Object.prototype;function Gf(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Uf;return e===n}function $f(e,t){for(var n=-1,r=Array(e);++n-1}function ih(e,t){var n=this.__data__,r=wr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ot(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(a)?t>1?Vo(a,t-1,n,r,i):Go(i,a):r||(i[i.length]=a)}return i}function Sh(e){var t=e==null?0:e.length;return t?Vo(e,1):[]}function kh(e){return xf(zf(e,void 0,Sh),e+"")}var Eh="Expected a function";function Ch(e,t){var n;if(typeof t!="function")throw new TypeError(Eh);return e=xo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}function Oh(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r=r?e:Oh(e,t,n)}var xh="\\ud800-\\udfff",Ah="\\u0300-\\u036f",Rh="\\ufe20-\\ufe2f",Mh="\\u20d0-\\u20ff",Lh=Ah+Rh+Mh,Ph="\\ufe0e\\ufe0f",Nh="\\u200d",Dh=RegExp("["+Nh+xh+Lh+Ph+"]");function Ci(e){return Dh.test(e)}function Ih(e){return e.split("")}var Yo="\\ud800-\\udfff",jh="\\u0300-\\u036f",Fh="\\ufe20-\\ufe2f",Wh="\\u20d0-\\u20ff",zh=jh+Fh+Wh,Hh="\\ufe0e\\ufe0f",Bh="["+Yo+"]",Oi="["+zh+"]",Ti="\\ud83c[\\udffb-\\udfff]",Uh="(?:"+Oi+"|"+Ti+")",Ko="[^"+Yo+"]",Xo="(?:\\ud83c[\\udde6-\\uddff]){2}",Jo="[\\ud800-\\udbff][\\udc00-\\udfff]",Gh="\\u200d",Zo=Uh+"?",Qo="["+Hh+"]?",$h="(?:"+Gh+"(?:"+[Ko,Xo,Jo].join("|")+")"+Qo+Zo+")*",Vh=Qo+Zo+$h,Yh="(?:"+[Ko+Oi+"?",Oi,Xo,Jo,Bh].join("|")+")",Kh=RegExp(Ti+"(?="+Ti+")|"+Yh+Vh,"g");function Xh(e){return e.match(Kh)||[]}function Jh(e){return Ci(e)?Xh(e):Ih(e)}function Zh(){this.__data__=new ot,this.size=0}function Qh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qh(e){return this.__data__.get(e)}function ep(e){return this.__data__.has(e)}var tp=200;function np(e,t){var n=this.__data__;if(n instanceof ot){var r=n.__data__;if(!Sn||r.lengtha))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,y=n&Cp?new En:void 0;for(s.set(e,t),s.set(t,e);++d=t||k<0||d&&B>=s}function b(){var _=Li();if(w(_))return x(_);a=setTimeout(b,g(_))}function x(_){return a=void 0,h&&r?y(_):(r=i=void 0,o)}function D(){a!==void 0&&clearTimeout(a),l=0,r=c=i=a=void 0}function F(){return a===void 0?o:x(Li())}function S(){var _=Li(),k=w(_);if(r=arguments,i=this,c=_,k){if(a===void 0)return v(c);if(d)return clearTimeout(a),a=setTimeout(b,t),y(c)}return a===void 0&&(a=setTimeout(b,t)),o}return S.cancel=D,S.flush=F,S}function fm(e,t,n){for(var r=-1,i=e==null?0:e.length;++rgm)return n;do t%2&&(n+=e),t=ym(t/2),t&&(e+=e);while(t);return n}var vm=ya("length");const bm=vm;var wa="\\ud800-\\udfff",wm="\\u0300-\\u036f",_m="\\ufe20-\\ufe2f",Sm="\\u20d0-\\u20ff",km=wm+_m+Sm,Em="\\ufe0e\\ufe0f",Cm="["+wa+"]",Pi="["+km+"]",Ni="\\ud83c[\\udffb-\\udfff]",Om="(?:"+Pi+"|"+Ni+")",_a="[^"+wa+"]",Sa="(?:\\ud83c[\\udde6-\\uddff]){2}",ka="[\\ud800-\\udbff][\\udc00-\\udfff]",Tm="\\u200d",Ea=Om+"?",Ca="["+Em+"]?",xm="(?:"+Tm+"(?:"+[_a,Sa,ka].join("|")+")"+Ca+Ea+")*",Am=Ca+Ea+xm,Rm="(?:"+[_a+Pi+"?",Pi,Sa,ka,Cm].join("|")+")",Oa=RegExp(Ni+"(?="+Ni+")|"+Rm+Am,"g");function Mm(e){for(var t=Oa.lastIndex=0;Oa.test(e);)++t;return t}function Ta(e){return Ci(e)?Mm(e):bm(e)}var Lm=Math.ceil;function Pm(e,t){t=t===void 0?" ":di(t);var n=t.length;if(n<2)return n?ba(t,e):t;var r=ba(t,Lm(e/Ta(t)));return Ci(t)?Th(Jh(r),0,e).join(""):r.slice(0,e)}function Nm(e,t,n){e=Uo(e),t=xo(t);var r=t?Ta(e):0;return t&&r=Bm){var l=t?null:Hm(e);if(l)return Ri(l);o=!1,i=ca,c=new En}else c=t?[]:a;e:for(;++rnew Proxy(e,t);const Ii=Object.getPrototypeOf,ji=new WeakMap,Ra=e=>e&&(ji.has(e)?ji.get(e):Ii(e)===Object.prototype||Ii(e)===Array.prototype),Cr=e=>typeof e=="object"&&e!==null,Vm=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(n=>{n.configurable=!0}),Object.create(Ii(e),t)},Fi=e=>e[Di]||e,Ma=(e,t,n,r)=>{if(!Ra(e))return e;let i=r&&r.get(e);if(!i){const c=Fi(e);i=(l=>Object.values(Object.getOwnPropertyDescriptors(l)).some(f=>!f.configurable&&!f.writable))(c)?[c,Vm(c)]:[c],r==null||r.set(e,i)}const[s,o]=i;let a=n&&n.get(s);return a&&a[1].f===!!o||(a=((c,l)=>{const f={f:l};let d=!1;const h=(v,g)=>{if(!d){let w=f[Cn].get(c);if(w||(w={},f[Cn].set(c,w)),v===On)w[On]=!0;else{let b=w[v];b||(b=new Set,w[v]=b),b.add(g)}}},y={get:(v,g)=>g===Di?c:(h("k",g),Ma(Reflect.get(v,g),f[Cn],f.c)),has:(v,g)=>g===Gm?(d=!0,f[Cn].delete(c),!0):(h("h",g),Reflect.has(v,g)),getOwnPropertyDescriptor:(v,g)=>(h("o",g),Reflect.getOwnPropertyDescriptor(v,g)),ownKeys:v=>(h(On),Reflect.ownKeys(v))};return l&&(y.set=y.deleteProperty=()=>!1),[y,f]})(s,!!o),a[1].p=$m(o||s,a[0]),n&&n.set(s,a)),a[1][Cn]=t,a[1].c=n,a[1].p},La=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!Cr(e)||!Cr(t))return!0;const i=n.get(Fi(e));if(!i)return!0;if(r){const o=r.get(e);if(o&&o.n===t)return o.g;r.set(e,{n:t,g:!1})}let s=null;try{for(const o of i.h||[])if(s=Reflect.has(e,o)!==Reflect.has(t,o),s)return s;if(i[On]===!0){if(s=((o,a)=>{const c=Reflect.ownKeys(o),l=Reflect.ownKeys(a);return c.length!==l.length||c.some((f,d)=>f!==l[d])})(e,t),s)return s}else for(const o of i.o||[])if(s=!!Reflect.getOwnPropertyDescriptor(e,o)!=!!Reflect.getOwnPropertyDescriptor(t,o),s)return s;for(const o of i.k||[])if(s=La(e[o],t[o],n,r),s)return s;return s===null&&(s=!0),s}finally{r&&r.set(e,{n:t,g:s})}},Ym=e=>Ra(e)&&e[Di]||null,Pa=(e,t=!0)=>{ji.set(e,t)},Km=(e,t,n)=>{const r=[],i=new WeakSet,s=(o,a)=>{if(i.has(o))return;Cr(o)&&i.add(o);const c=Cr(o)&&t.get(Fi(o));if(c){var l,f;if((l=c.h)==null||l.forEach(h=>{const y=`:has(${String(h)})`;r.push(a?[...a,y]:[y])}),c[On]===!0){const h=":ownKeys";r.push(a?[...a,h]:[h])}else{var d;(d=c.o)==null||d.forEach(h=>{const y=`:hasOwn(${String(h)})`;r.push(a?[...a,y]:[y])})}(f=c.k)==null||f.forEach(h=>{n&&!("value"in(Object.getOwnPropertyDescriptor(o,h)||{}))||s(o[h],a?[...a,h]:[h])})}else a&&r.push(a)};return s(e),r},Wi=e=>typeof e=="object"&&e!==null,mt=new WeakMap,Or=new WeakSet,Xm=(e=Object.is,t=(l,f)=>new Proxy(l,f),n=l=>Wi(l)&&!Or.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),r=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},i=new WeakMap,s=(l,f,d=r)=>{const h=i.get(l);if((h==null?void 0:h[0])===f)return h[1];const y=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return Pa(y,!0),i.set(l,[f,y]),Reflect.ownKeys(l).forEach(v=>{if(Object.getOwnPropertyDescriptor(y,v))return;const g=Reflect.get(l,v),w={value:g,enumerable:!0,configurable:!0};if(Or.has(g))Pa(g,!1);else if(g instanceof Promise)delete w.value,w.get=()=>d(g);else if(mt.has(g)){const[b,x]=mt.get(g);w.value=s(b,x(),d)}Object.defineProperty(y,v,w)}),y},o=new WeakMap,a=[1,1],c=l=>{if(!Wi(l))throw new Error("object required");const f=o.get(l);if(f)return f;let d=a[0];const h=new Set,y=(A,O=++a[0])=>{d!==O&&(d=O,h.forEach(I=>I(A,O)))};let v=a[1];const g=(A=++a[1])=>(v!==A&&!h.size&&(v=A,b.forEach(([O])=>{const I=O[1](A);I>d&&(d=I)})),d),w=A=>(O,I)=>{const fe=[...O];fe[1]=[A,...fe[1]],y(fe,I)},b=new Map,x=(A,O)=>{if(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&b.has(A))throw new Error("prop listener already exists");if(h.size){const I=O[3](w(A));b.set(A,[O,I])}else b.set(A,[O])},D=A=>{var O;const I=b.get(A);I&&(b.delete(A),(O=I[1])==null||O.call(I))},F=A=>(h.add(A),h.size===1&&b.forEach(([I,fe],P)=>{if(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&fe)throw new Error("remove already exists");const C=I[3](w(P));b.set(P,[I,C])}),()=>{h.delete(A),h.size===0&&b.forEach(([I,fe],P)=>{fe&&(fe(),b.set(P,[I]))})}),S=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),k=t(S,{deleteProperty(A,O){const I=Reflect.get(A,O);D(O);const fe=Reflect.deleteProperty(A,O);return fe&&y(["delete",[O],I]),fe},set(A,O,I,fe){const P=Reflect.has(A,O),C=Reflect.get(A,O,fe);if(P&&(e(C,I)||o.has(I)&&e(C,o.get(I))))return!0;D(O),Wi(I)&&(I=Ym(I)||I);let E=I;if(I instanceof Promise)I.then(M=>{I.status="fulfilled",I.value=M,y(["resolve",[O],M])}).catch(M=>{I.status="rejected",I.reason=M,y(["reject",[O],M])});else{!mt.has(I)&&n(I)&&(E=c(I));const M=!Or.has(E)&&mt.get(E);M&&x(O,M)}return Reflect.set(A,O,E,fe),y(["set",[O],I,C]),!0}});o.set(l,k);const B=[S,g,s,F];return mt.set(k,B),Reflect.ownKeys(l).forEach(A=>{const O=Object.getOwnPropertyDescriptor(l,A);"value"in O&&(k[A]=l[A],delete O.value,delete O.writable),Object.defineProperty(S,A,O)}),k})=>[c,mt,Or,e,t,n,r,i,s,o,a],[Jm]=Xm();function Tn(e={}){return Jm(e)}function Na(e,t,n){const r=mt.get(e);({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&!r&&console.warn("Please use proxy object");let i;const s=[],o=r[3];let a=!1;const l=o(f=>{if(s.push(f),n){t(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,a&&t(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function Da(e,t){const n=mt.get(e);({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&!n&&console.warn("Please use proxy object");const[r,i,s]=n;return s(r,i(),t)}var zi={},Zm={get exports(){return zi},set exports(e){zi=e}},Ia={};/** * @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 Ut=p;function Qm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qm=typeof Object.is=="function"?Object.is:Qm,eg=Ut.useState,tg=Ut.useEffect,ng=Ut.useLayoutEffect,rg=Ut.useDebugValue;function ig(e,t){var n=t(),r=eg({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return ng(function(){i.value=n,i.getSnapshot=t,Hi(i)&&s({inst:i})},[e,n,t]),tg(function(){return Hi(i)&&s({inst:i}),e(function(){Hi(i)&&s({inst:i})})},[e]),rg(n),n}function Hi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qm(e,n)}catch{return!0}}function sg(e,t){return t()}var og=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sg:ig;Ia.useSyncExternalStore=Ut.useSyncExternalStore!==void 0?Ut.useSyncExternalStore:og,function(e){e.exports=Ia}(Zm);const ag=Zl(zi),{use:ja}=p,{useSyncExternalStore:cg}=ag,lg=(e,t)=>{const n=p.useRef();p.useEffect(()=>{n.current=Km(e,t,!0)}),p.useDebugValue(n.current)},ug=new WeakMap;function Gt(e,t){const n=t==null?void 0:t.sync,r=p.useRef(),i=p.useRef();let s=!0;const o=cg(p.useCallback(l=>{const f=Na(e,l,n);return l(),f},[e,n]),()=>{const l=Da(e,ja);try{if(!s&&r.current&&i.current&&!La(r.current,l,i.current,new WeakMap))return r.current}catch{}return l},()=>Da(e,ja));s=!1;const a=new WeakMap;p.useEffect(()=>{r.current=o,i.current=a}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&lg(o,a);const c=p.useMemo(()=>new WeakMap,[]);return Ma(o,a,c,ug)}const Bi={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1,openInIINAWhenRightClick:!1,usePcDesktopApi:!1},_e=Tn({...Bi}),Fa=Object.keys(Bi),gt=function(){return Gt(_e)},Wa="bilibili-app-recommend.settings";function fg(){const e=GM_getValue(Wa);e&&typeof e=="object"&&Object.assign(_e,xa(e,Fa)),Na(_e,()=>{dg()})}function dg(){const e=xa(_e,Fa);GM_setValue(Wa,e)}function za(e){Object.assign(_e,e)}function hg(){return za(Bi)}fg();var $t={},pg={get exports(){return $t},set exports(e){$t=e}};const mg=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Ha=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Ba=({clearTimeout:e,setTimeout:t,willResolve:n})=>(r,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(Ha());let o,a,c;const l=e||clearTimeout,f=()=>{l(o),c(Ha())},d=()=>{s&&s.removeEventListener("abort",f)},h=new Promise((y,v)=>{a=()=>{d(),n?y(i):v(i)},c=v,o=(t||setTimeout)(a,r)});return s&&s.addEventListener("abort",f,{once:!0}),h.clear=()=>{l(o),o=null,a()},h},Ua=e=>{const t=Ba({...e,willResolve:!0});return t.reject=Ba({...e,willResolve:!1}),t.range=(n,r,i)=>t(mg(n,r),i),t},Ui=Ua();Ui.createWithTimers=Ua,pg.exports=Ui,$t.default=Ui;var Tr,Ga=Y;Tr=Ga.createRoot,Ga.hydrateRoot;const Ob="",xn=mm(()=>!!document.querySelectorAll(".bili-feed4").length),$a=document.querySelector(".bili-header__bar"),Va=!!($a&&window.getComputedStyle($a).display==="none")?50:64,Ya=()=>document.body.classList.contains("dark"),Ka=Tn({value:Ya()});function Xa(){return Gt(Ka).value}const xr=new MutationObserver(function(){Ka.value=Ya()});xr.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{xr==null||xr.disconnect()});var Gi={},Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.DEFAULT_ICON_CONFIGS=void 0,Ce.IconConverter=ec,Ce.IconProvider=void 0,Ce.IconWrapper=kg;var Ar=gg(p);function Ja(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ja=function(r){return r?n:t})(e)}function gg(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ja(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}var yg=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function Za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wg(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s=0)&&(n[i]=e[i]);return n}var qa={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};Ce.DEFAULT_ICON_CONFIGS=qa;function _g(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function ec(e,t,n){var r=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||n.theme;switch(s){case"outline":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("none"),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.twoTone.twoTone),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.multiColor.outFillColor),i.push(typeof r[2]=="string"?r[2]:n.colors.multiColor.innerStrokeColor),i.push(typeof r[3]=="string"?r[3]:n.colors.multiColor.innerFillColor);break}return{size:t.size||n.size,strokeWidth:t.strokeWidth||n.strokeWidth,strokeLinecap:t.strokeLinecap||n.strokeLinecap,strokeLinejoin:t.strokeLinejoin||n.strokeLinejoin,colors:i,id:e}}var tc=(0,Ar.createContext)(qa),Sg=tc.Provider;Ce.IconProvider=Sg;function kg(e,t,n){return function(r){var i=r.size,s=r.strokeWidth,o=r.strokeLinecap,a=r.strokeLinejoin,c=r.theme,l=r.fill,f=r.className,d=r.spin,h=bg(r,yg),y=(0,Ar.useContext)(tc),v=(0,Ar.useMemo)(_g,[]),g=ec(v,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:a,theme:c,fill:l},y),w=[y.prefix+"-icon"];return w.push(y.prefix+"-icon-"+e),t&&y.rtl&&w.push(y.prefix+"-icon-rtl"),d&&w.push(y.prefix+"-icon-spin"),f&&w.push(f),Ar.default.createElement("span",Qa(Qa({},h),{},{className:w.join(" ")}),n(g))}}Object.defineProperty(Gi,"__esModule",{value:!0});var nc=Gi.default=void 0,$i=Cg(p),Eg=Ce;function Cg(e){return e&&e.__esModule?e:{default:e}}var Og=(0,Eg.IconWrapper)("close",!1,function(e){return $i.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},$i.default.createElement("path",{d:"M8 8L40 40",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),$i.default.createElement("path",{d:"M8 40L40 8",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});nc=Gi.default=Og;var Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});var rc=Vi.default=void 0,Yi=xg(p),Tg=Ce;function xg(e){return e&&e.__esModule?e:{default:e}}var Ag=(0,Tg.IconWrapper)("config",!1,function(e){return Yi.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Yi.default.createElement("path",{d:"M24 4L18 10H10V18L4 24L10 30V38H18L24 44L30 38H38V30L44 24L38 18V10H30L24 4Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Yi.default.createElement("path",{d:"M24 30C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30Z",fill:e.colors[3],stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}))});rc=Vi.default=Ag;var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});var ic=Ki.default=void 0,An=Mg(p),Rg=Ce;function Mg(e){return e&&e.__esModule?e:{default:e}}var Lg=(0,Rg.IconWrapper)("distraught-face",!1,function(e){return An.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},An.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),An.default.createElement("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),An.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),An.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});ic=Ki.default=Lg;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});var sc=Xi.default=void 0,Rn=Ng(p),Pg=Ce;function Ng(e){return e&&e.__esModule?e:{default:e}}var Dg=(0,Pg.IconWrapper)("info",!0,function(e){return Rn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Rn.default.createElement("path",{d:"M24 44C29.5228 44 34.5228 41.7614 38.1421 38.1421C41.7614 34.5228 44 29.5228 44 24C44 18.4772 41.7614 13.4772 38.1421 9.85786C34.5228 6.23858 29.5228 4 24 4C18.4772 4 13.4772 6.23858 9.85786 9.85786C6.23858 13.4772 4 18.4772 4 24C4 29.5228 6.23858 34.5228 9.85786 38.1421C13.4772 41.7614 18.4772 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Rn.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 11C25.3807 11 26.5 12.1193 26.5 13.5C26.5 14.8807 25.3807 16 24 16C22.6193 16 21.5 14.8807 21.5 13.5C21.5 12.1193 22.6193 11 24 11Z",fill:e.colors[2]}),Rn.default.createElement("path",{d:"M24.5 34V20H23.5H22.5",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Rn.default.createElement("path",{d:"M21 34H28",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});sc=Xi.default=Dg;var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});var oc=Ji.default=void 0,Zi=jg(p),Ig=Ce;function jg(e){return e&&e.__esModule?e:{default:e}}var Fg=(0,Ig.IconWrapper)("loading",!0,function(e){return Zi.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Zi.default.createElement("path",{d:"M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Zi.default.createElement("path",{d:"M36 24C36 17.3726 30.6274 12 24 12C17.3726 12 12 17.3726 12 24C12 30.6274 17.3726 36 24 36V36",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});oc=Ji.default=Fg;var Qi={};Object.defineProperty(Qi,"__esModule",{value:!0});var ac=Qi.default=void 0,Xe=zg(p),Wg=Ce;function zg(e){return e&&e.__esModule?e:{default:e}}var Hg=(0,Wg.IconWrapper)("loading-three",!1,function(e){return Xe.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Xe.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M24 12V15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M32.4852 15.5147L30.3639 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M36 24H33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M32.4852 32.4853L30.3639 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M24 36V33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M15.5148 32.4853L17.6361 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M12 24H15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Xe.default.createElement("path",{d:"M15.5148 15.5147L17.6361 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});ac=Qi.default=Hg;var qi={};Object.defineProperty(qi,"__esModule",{value:!0});var cc=qi.default=void 0,es=Ug(p),Bg=Ce;function Ug(e){return e&&e.__esModule?e:{default:e}}var Gg=(0,Bg.IconWrapper)("return",!0,function(e){return es.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},es.default.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),es.default.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});cc=qi.default=Gg;const $g={Close:nc,Config:rc,DistraughtFace:ic,Return:cc,Loading:oc,LoadingThree:ac,Info:sc};function Tt({name:e,theme:t,size:n,fill:r,...i}){t||(t="outline"),n||(n=24);const s=Xa();r||(r=s?"#fff":"#333");const o=$g[e];return m(o,{theme:t,size:n,fill:r,...i,style:{fontSize:0,...i.style}})}var ts={},Vg={get exports(){return ts},set exports(e){ts=e}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i(t,n)=>{const r=p.useRef(!1);e(()=>()=>{r.current=!1},[]),e(()=>{if(!r.current)r.current=!0;else return t()},n)};function dc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);itypeof e=="function",Zg=e=>typeof e=="string",hc=e=>typeof e=="number",rs=!1;function ee(e){rs&&(Yt(e)||console.error(`useMemoizedFn expected parameter is a function, got ${typeof e}`));const t=p.useRef(e);t.current=p.useMemo(()=>e,[e]);const n=p.useRef();return n.current||(n.current=function(...r){return t.current.apply(this,r)}),n.current}const is=fc(p.useEffect),pc=(e,{manual:t,ready:n=!0,defaultParams:r=[],refreshDeps:i=[],refreshDepsAction:s})=>{const o=p.useRef(!1);return o.current=!1,is(()=>{!t&&n&&(o.current=!0,e.run(...r))},[n]),is(()=>{o.current||t||(o.current=!0,s?s():e.refresh())},[...i]),{onBefore:()=>{if(!n)return{stopNow:!0}}}};pc.onInit=({ready:e=!0,manual:t})=>({loading:!t&&e});const Qg=pc;function ss(e,t){if(e===t)return!0;for(let n=0;n{rs&&(Yt(e)||console.error(`useUnmount expected parameter is a function, got ${typeof e}`));const t=Mn(e);p.useEffect(()=>()=>{t.current()},[])},Rr=new Map,qg=(e,t,n)=>{const r=Rr.get(e);r!=null&&r.timer&&clearTimeout(r.timer);let i;t>-1&&(i=setTimeout(()=>{Rr.delete(e)},t)),Rr.set(e,Object.assign(Object.assign({},n),{timer:i}))},ey=e=>Rr.get(e),Mr=new Map,ty=e=>Mr.get(e),ny=(e,t)=>{Mr.set(e,t),t.then(n=>(Mr.delete(e),n)).catch(()=>{Mr.delete(e)})},xt={},ry=(e,t)=>{xt[e]&&xt[e].forEach(n=>n(t))},os=(e,t)=>(xt[e]||(xt[e]=[]),xt[e].push(t),function(){const r=xt[e].indexOf(t);xt[e].splice(r,1)}),iy=(e,{cacheKey:t,cacheTime:n=5*60*1e3,staleTime:r=0,setCache:i,getCache:s})=>{const o=p.useRef(),a=p.useRef(),c=(f,d)=>{i?i(d):qg(f,n,d),ry(f,d.data)},l=(f,d=[])=>s?s(d):ey(f);return mc(()=>{if(!t)return;const f=l(t);f&&Object.hasOwnProperty.call(f,"data")&&(e.state.data=f.data,e.state.params=f.params,(r===-1||new Date().getTime()-f.time<=r)&&(e.state.loading=!1)),o.current=os(t,d=>{e.setState({data:d})})},[]),Ln(()=>{var f;(f=o.current)===null||f===void 0||f.call(o)}),t?{onBefore:f=>{const d=l(t,f);return!d||!Object.hasOwnProperty.call(d,"data")?{}:r===-1||new Date().getTime()-d.time<=r?{loading:!1,data:d==null?void 0:d.data,error:void 0,returnNow:!0}:{data:d==null?void 0:d.data,error:void 0}},onRequest:(f,d)=>{let h=ty(t);return h&&h!==a.current?{servicePromise:h}:(h=f(...d),a.current=h,ny(t,h),{servicePromise:h})},onSuccess:(f,d)=>{var h;t&&((h=o.current)===null||h===void 0||h.call(o),c(t,{data:f,params:d,time:new Date().getTime()}),o.current=os(t,y=>{e.setState({data:y})}))},onMutate:f=>{var d;t&&((d=o.current)===null||d===void 0||d.call(o),c(t,{data:f,params:e.state.params,time:new Date().getTime()}),o.current=os(t,h=>{e.setState({data:h})}))}}:{}},sy=(e,{debounceWait:t,debounceLeading:n,debounceTrailing:r,debounceMaxWait:i})=>{const s=p.useRef(),o=p.useMemo(()=>{const a={};return n!==void 0&&(a.leading=n),r!==void 0&&(a.trailing=r),i!==void 0&&(a.maxWait=i),a},[n,r,i]);return p.useEffect(()=>{if(t){const a=e.runAsync.bind(e);return s.current=va(c=>{c()},t,o),e.runAsync=(...c)=>new Promise((l,f)=>{var d;(d=s.current)===null||d===void 0||d.call(s,()=>{a(...c).then(l).catch(f)})}),()=>{var c;(c=s.current)===null||c===void 0||c.cancel(),e.runAsync=a}}},[t,o]),t?{onCancel:()=>{var a;(a=s.current)===null||a===void 0||a.cancel()}}:{}},oy=(e,{loadingDelay:t,ready:n})=>{const r=p.useRef();if(!t)return{};const i=()=>{r.current&&clearTimeout(r.current)};return{onBefore:()=>(i(),n!==!1&&(r.current=setTimeout(()=>{e.setState({loading:!0})},t)),{loading:!1}),onFinally:()=>{i()},onCancel:()=>{i()}}},Pn=!!(typeof window<"u"&&window.document&&window.document.createElement);function as(){return Pn?document.visibilityState!=="hidden":!0}const Nn=[];function ay(e){return Nn.push(e),function(){const n=Nn.indexOf(e);Nn.splice(n,1)}}if(Pn){const e=()=>{if(as())for(let t=0;t{const i=p.useRef(),s=p.useRef(),o=p.useRef(0),a=()=>{var c;i.current&&clearTimeout(i.current),(c=s.current)===null||c===void 0||c.call(s)};return is(()=>{t||a()},[t]),t?{onBefore:()=>{a()},onError:()=>{o.current+=1},onSuccess:()=>{o.current=0},onFinally:()=>{r===-1||r!==-1&&o.current<=r?i.current=setTimeout(()=>{!n&&!as()?s.current=ay(()=>{e.refresh()}):e.refresh()},t):o.current=0},onCancel:()=>{a()}}:{}};function ly(e,t){let n=!1;return(...r)=>{n||(n=!0,e(...r),setTimeout(()=>{n=!1},t))}}function uy(){return Pn&&typeof navigator.onLine<"u"?navigator.onLine:!0}const Dn=[];function fy(e){return Dn.push(e),function(){const n=Dn.indexOf(e);n>-1&&Dn.splice(n,1)}}if(Pn){const e=()=>{if(!(!as()||!uy()))for(let t=0;t{const r=p.useRef(),i=()=>{var s;(s=r.current)===null||s===void 0||s.call(r)};return p.useEffect(()=>{if(t){const s=ly(e.refresh.bind(e),n);r.current=fy(()=>{s()})}return()=>{i()}},[t,n]),Ln(()=>{i()}),{}},hy=(e,{retryInterval:t,retryCount:n})=>{const r=p.useRef(),i=p.useRef(0),s=p.useRef(!1);return n?{onBefore:()=>{s.current||(i.current=0),s.current=!1,r.current&&clearTimeout(r.current)},onSuccess:()=>{i.current=0},onError:()=>{if(i.current+=1,n===-1||i.current<=n){const o=t??Math.min(1e3*Math.pow(2,i.current),3e4);r.current=setTimeout(()=>{s.current=!0,e.refresh()},o)}else i.current=0},onCancel:()=>{i.current=0,r.current&&clearTimeout(r.current)}}:{}},py=(e,{throttleWait:t,throttleLeading:n,throttleTrailing:r})=>{const i=p.useRef(),s={};return n!==void 0&&(s.leading=n),r!==void 0&&(s.trailing=r),p.useEffect(()=>{if(t){const o=e.runAsync.bind(e);return i.current=Fm(a=>{a()},t,s),e.runAsync=(...a)=>new Promise((c,l)=>{var f;(f=i.current)===null||f===void 0||f.call(i,()=>{o(...a).then(c).catch(l)})}),()=>{var a;e.runAsync=o,(a=i.current)===null||a===void 0||a.cancel()}}},[t,n,r]),t?{onCancel:()=>{var o;(o=i.current)===null||o===void 0||o.cancel()}}:{}},my=e=>{rs&&(Yt(e)||console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof e}".`)),p.useEffect(()=>{e==null||e()},[])},gy=()=>{const[,e]=p.useState({});return p.useCallback(()=>e({}),[])};class yy{constructor(t,n,r,i={}){this.serviceRef=t,this.options=n,this.subscribe=r,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=Object.assign(Object.assign(Object.assign({},this.state),{loading:!n.manual}),i)}setState(t={}){this.state=Object.assign(Object.assign({},this.state),t),this.subscribe()}runPluginHandler(t,...n){const r=this.pluginImpls.map(i=>{var s;return(s=i[t])===null||s===void 0?void 0:s.call(i,...n)}).filter(Boolean);return Object.assign({},...r)}runAsync(...t){var n,r,i,s,o,a,c,l,f,d;return Jg(this,void 0,void 0,function*(){this.count+=1;const h=this.count,y=this.runPluginHandler("onBefore",t),{stopNow:v=!1,returnNow:g=!1}=y,w=dc(y,["stopNow","returnNow"]);if(v)return new Promise(()=>{});if(this.setState(Object.assign({loading:!0,params:t},w)),g)return Promise.resolve(w.data);(r=(n=this.options).onBefore)===null||r===void 0||r.call(n,t);try{let{servicePromise:b}=this.runPluginHandler("onRequest",this.serviceRef.current,t);b||(b=this.serviceRef.current(...t));const x=yield b;return h!==this.count?new Promise(()=>{}):(this.setState({data:x,error:void 0,loading:!1}),(s=(i=this.options).onSuccess)===null||s===void 0||s.call(i,x,t),this.runPluginHandler("onSuccess",x,t),(a=(o=this.options).onFinally)===null||a===void 0||a.call(o,t,x,void 0),h===this.count&&this.runPluginHandler("onFinally",t,x,void 0),x)}catch(b){if(h!==this.count)return new Promise(()=>{});throw this.setState({error:b,loading:!1}),(l=(c=this.options).onError)===null||l===void 0||l.call(c,b,t),this.runPluginHandler("onError",b,t),(d=(f=this.options).onFinally)===null||d===void 0||d.call(f,t,void 0,b),h===this.count&&this.runPluginHandler("onFinally",t,void 0,b),b}})}run(...t){this.runAsync(...t).catch(n=>{this.options.onError||console.error(n)})}cancel(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}refresh(){this.run(...this.state.params||[])}refreshAsync(){return this.runAsync(...this.state.params||[])}mutate(t){const n=Yt(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})}}function vy(e,t={},n=[]){const{manual:r=!1}=t,i=dc(t,["manual"]),s=Object.assign({manual:r},i),o=Mn(e),a=gy(),c=mc(()=>{const l=n.map(f=>{var d;return(d=f==null?void 0:f.onInit)===null||d===void 0?void 0:d.call(f,s)}).filter(Boolean);return new yy(o,s,a,Object.assign({},...l))},[]);return c.options=s,c.pluginImpls=n.map(l=>l(c,s)),my(()=>{if(!r){const l=c.state.params||t.defaultParams||[];c.run(...l)}}),Ln(()=>{c.cancel()}),{loading:c.state.loading,data:c.state.data,error:c.state.error,params:c.state.params||[],cancel:ee(c.cancel.bind(c)),refresh:ee(c.refresh.bind(c)),refreshAsync:ee(c.refreshAsync.bind(c)),run:ee(c.run.bind(c)),runAsync:ee(c.runAsync.bind(c)),mutate:ee(c.mutate.bind(c))}}function gc(e,t,n){return vy(e,t,[...n||[],sy,oy,cy,dy,py,Qg,iy,hy])}function yc(e=!1,t){const[n,r]=p.useState(e),i=p.useMemo(()=>{const s=t===void 0?!e:t;return{toggle:()=>r(f=>f===e?s:e),set:f=>r(f),setLeft:()=>r(e),setRight:()=>r(s)}},[]);return[n,i]}function by(e=!1){const[t,{toggle:n,set:r}]=yc(e),i=p.useMemo(()=>({toggle:n,set:a=>r(!!a),setTrue:()=>r(!0),setFalse:()=>r(!1)}),[]);return[t,i]}function Lr(e,t){if(!Pn)return;if(!e)return t;let n;return Yt(e)?n=e():"current"in e?n=e.current:n=e,n}const vc=(e=>(n,r,i)=>{const s=p.useRef(!1),o=p.useRef([]),a=p.useRef([]),c=p.useRef();e(()=>{var l;const d=(Array.isArray(i)?i:[i]).map(h=>Lr(h));if(!s.current){s.current=!0,o.current=d,a.current=r,c.current=n();return}(d.length!==o.current.length||!ss(d,o.current)||!ss(r,a.current))&&((l=c.current)===null||l===void 0||l.call(c),o.current=d,a.current=r,c.current=n())}),Ln(()=>{var l;(l=c.current)===null||l===void 0||l.call(c),s.current=!1})})(p.useEffect);var cs={},wy={get exports(){return cs},set exports(e){cs=e}};(function(e,t){(function(n,r){e.exports=r()})(Jl,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",f="week",d="month",h="quarter",y="year",v="date",g="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,x={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("_"),ordinal:function(P){var C=["th","st","nd","rd"],E=P%100;return"["+P+(C[(E-20)%10]||C[E]||C[0])+"]"}},D=function(P,C,E){var M=String(P);return!M||M.length>=C?P:""+Array(C+1-M.length).join(E)+P},F={s:D,z:function(P){var C=-P.utcOffset(),E=Math.abs(C),M=Math.floor(E/60),T=E%60;return(C<=0?"+":"-")+D(M,2,"0")+":"+D(T,2,"0")},m:function P(C,E){if(C.date()1)return P(W[0])}else{var G=C.name;_[G]=C,T=G}return!M&&T&&(S=T),T||!M&&S},A=function(P,C){if(k(P))return P.clone();var E=typeof C=="object"?C:{};return E.date=P,E.args=arguments,new I(E)},O=F;O.l=B,O.i=k,O.w=function(P,C){return A(P,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var I=function(){function P(E){this.$L=B(E.locale,null,!0),this.parse(E)}var C=P.prototype;return C.parse=function(E){this.$d=function(M){var T=M.date,z=M.utc;if(T===null)return new Date(NaN);if(O.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var W=T.match(w);if(W){var G=W[2]-1||0,ne=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],G,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ne)):new Date(W[1],G,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ne)}}return new Date(T)}(E),this.$x=E.x||{},this.init()},C.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},C.$utils=function(){return O},C.isValid=function(){return this.$d.toString()!==g},C.isSame=function(E,M){var T=A(E);return this.startOf(M)<=T&&T<=this.endOf(M)},C.isAfter=function(E,M){return A(E){const i=Lr(n.target,window);if(!(i!=null&&i.addEventListener))return;const s=o=>r.current(o);return i.addEventListener(e,s,{capture:n.capture,once:n.once,passive:n.passive}),()=>{i.removeEventListener(e,s,{capture:n.capture})}},[e,n.capture,n.once,n.passive],n.target)}const ls=(e,t)=>{const{onEnter:n,onLeave:r,onChange:i}=t||{},[s,{setTrue:o,setFalse:a}]=by(!1);return Pr("mouseenter",()=>{n==null||n(),o(),i==null||i(!0)},{target:e}),Pr("mouseleave",()=>{r==null||r(),a(),i==null||i(!1)},{target:e}),s},_y=(e,t=[])=>dm(e,t),Sy=(e,t,n)=>{const r=p.useRef(),i=p.useRef(0);_y(t,r.current)||(r.current=t,i.current+=1),vc(e,[i.current],n)},ky=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),Nr={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222};ky?Nr.meta=[91,93]:Nr.meta=[91,92];const us={ctrl:e=>e.ctrlKey,shift:e=>e.shiftKey,alt:e=>e.altKey,meta:e=>e.type==="keyup"?Nr.meta.includes(e.keyCode):e.metaKey};function Ey(e){const t=Object.keys(us).reduce((n,r)=>us[r](e)?n+1:n,0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function wc(e,t,n){if(!e.key)return!1;if(hc(t))return e.keyCode===t;const r=t.split(".");let i=0;for(const s of r){const o=us[s],a=Nr[s.toLowerCase()];(o&&o(e)||a&&a===e.keyCode)&&i++}return n?i===r.length&&Ey(e)===r.length:i===r.length}function Cy(e,t){return Yt(e)?e:Zg(e)||hc(e)?n=>wc(n,e,t):Array.isArray(e)?n=>e.some(r=>wc(n,r,t)):()=>!!e}const Oy=["keydown"];function be(e,t,n){const{events:r=Oy,target:i,exactMatch:s=!1,useCapture:o=!1}=n||{},a=Mn(t),c=Mn(e);Sy(()=>{var l;const f=Lr(i,window);if(!f)return;const d=h=>{var y;if(Cy(c.current,s)(h))return(y=a.current)===null||y===void 0?void 0:y.call(a,h)};for(const h of r)(l=f==null?void 0:f.addEventListener)===null||l===void 0||l.call(f,h,d,o);return()=>{var h;for(const y of r)(h=f==null?void 0:f.removeEventListener)===null||h===void 0||h.call(f,y,d,o)}},[r],i)}function Ty(e){const t=p.useRef(0),[n,r]=p.useState(e),i=p.useCallback(s=>{cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{r(s)})},[]);return Ln(()=>{cancelAnimationFrame(t.current)}),[n,i]}const xy={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},Ay=e=>{const[t,n]=Ty(xy);return Pr("mousemove",r=>{const{screenX:i,screenY:s,clientX:o,clientY:a,pageX:c,pageY:l}=r,f={screenX:i,screenY:s,clientX:o,clientY:a,pageX:c,pageY:l,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},d=Lr(e);if(d){const{left:h,top:y,width:v,height:g}=d.getBoundingClientRect();f.elementPosX=h+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=c-f.elementPosX,f.elementY=l-f.elementPosY,f.elementW=v,f.elementH=g}n(f)},{target:()=>document}),t},Ry=fc(p.useLayoutEffect),Ie={modalMask:"_modal-mask_qk630_1",modal:"_modal_qk630_1",modalHeader:"_modal-header_qk630_23",modalBody:"_modal-body_qk630_30",modalTitle:"_modal-title_qk630_35",btnClose:"_btn-close_qk630_42"};let In=0;const My=()=>{In++,document.body.style.overflow="hidden"},Ly=()=>{In--,In<0&&(In=0),In===0&&(document.body.style.overflow="")};function fs({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1,hideWhenEsc:o=!1}){p.useLayoutEffect(()=>{e?My():Ly()},[e]);const a=p.useRef(null),c=Xa(),{bg:l,c:f}=p.useMemo(()=>{const g=window.getComputedStyle(document.body)["background-color"],w=window.getComputedStyle(document.body).color;return{bg:g,c:w}},[c]),d=p.useMemo(()=>c?{"--bg":l,"--c":f,backgroundColor:l,color:f}:{},[l,f,c]),h=p.useId(),y=p.useMemo(()=>{const g=document.createElement("div");return g.setAttribute("data-id","base-modal-"+h),document.body.appendChild(g),g},[]),v=ee(g=>{var w;(w=a.current)!=null&&w.contains(g.target)||s&&t()});return be("esc",g=>{e&&o&&(g.preventDefault(),g.stopImmediatePropagation(),setTimeout(t))}),e?Y.createPortal(m("div",{className:re(Ie.modalMask,r),onClick:v,children:m("div",{className:re(Ie.modal,i),style:d,ref:a,children:n})}),y):null}const ds=e=>m(Tt,{...e,name:"Close",size:18,style:{cursor:"pointer",marginLeft:10,...e.style}});var Kt=1e3,Xt=Kt*60,Jt=Xt*60,At=Jt*24,Py=At*7,Ny=At*365.25,Dy=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Iy(e);if(n==="number"&&isFinite(e))return t.long?Fy(e):jy(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Iy(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Ny;case"weeks":case"week":case"w":return n*Py;case"days":case"day":case"d":return n*At;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Jt;case"minutes":case"minute":case"mins":case"min":case"m":return n*Xt;case"seconds":case"second":case"secs":case"sec":case"s":return n*Kt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function jy(e){var t=Math.abs(e);return t>=At?Math.round(e/At)+"d":t>=Jt?Math.round(e/Jt)+"h":t>=Xt?Math.round(e/Xt)+"m":t>=Kt?Math.round(e/Kt)+"s":e+"ms"}function Fy(e){var t=Math.abs(e);return t>=At?Dr(e,t,At,"day"):t>=Jt?Dr(e,t,Jt,"hour"):t>=Xt?Dr(e,t,Xt,"minute"):t>=Kt?Dr(e,t,Kt,"second"):e+" ms"}function Dr(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+" "+r+(i?"s":"")}const _c="_toast-container_mcbuq_1",Sc="_single-line_mcbuq_17",Zb={toastContainer:_c,singleLine:Sc};function Ae(e,t=2e3){let n=typeof t=="number"?t:Dy(t);const r=document.createElement("div");r.className=_c,r.innerText=e,!e.includes(` `)&&!e.includes("r.remove(),n)}const Wy="请求失败, 请重试 !!!",zy="操作失败, 请重试 !!!";function kc(){return Ae(Wy)}function Ec(){return Ae(zy)}function Hy(e){const t=Tn({data:Array.from(e||[]),has(n){return this.data.some(r=>r[0]===n)},set(n,r){const i=this.data.find(s=>s[0]===n);return i?i[1]=r:this.data.push([n,r]),this},get(n){var r;return(r=this.data.find(i=>i[0]===n))==null?void 0:r[1]},delete(n){const r=this.data.findIndex(i=>i[0]===n);return r===-1?!1:(this.data.splice(r,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(n){this.data.forEach(r=>{n(r[1],r[0],this)})},keys(){return this.data.map(n=>n[0]).values()},values(){return this.data.map(n=>n[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const Cc="27eb53fc9058f8c3";async function By(){var c,l;const t=(await Z.get("https://passport.bilibili.com/login/app/third",{params:{appkey:Cc,api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((c=t==null?void 0:t.data)!=null&&c.has_login))return{errmsg:"你必须登录B站之后才能使用授权",json:t};if(!((l=t==null?void 0:t.data)!=null&&l.confirm_uri))return{errmsg:"无法获得授权网址",json:t};const n=t.data.confirm_uri;let r;const i=new Promise(f=>{window.addEventListener("message",d=>{if(d.origin!="https://www.mcbbs.net"||!d.data)return;const h=d.data.match(/access_key=([0-9a-z]{32})/);if(!h||!h[1])return f({errmsg:"没有获得匹配的密钥"});f(h[1])}),r=setTimeout(()=>{f({errmsg:"获取授权超时"})},10*1e3)}),s=document.createElement("iframe");s.src=n,s.style.display="none",document.body.appendChild(s);function o(){s.remove(),r&&(clearTimeout(r),r=null)}const a=await i;return o(),a}async function Uy(){const e=await By();if(typeof e=="object"&&"errmsg"in e){Ae(e.errmsg);return}const t=e;return _e.accessKey=t,Ae("获取成功"),t}function Gy(){_e.accessKey="",Ae("已删除 access_key")}const Oc="https://api.bilibili.com",Tc="https://app.bilibili.com",Ir=Z.create({baseURL:Oc});Ir.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params={...e.params,_:Date.now()}),e},function(e){return Promise.reject(e)});const jr=Z.create({adapter:It});jr.interceptors.request.use(function(e){return e.params={appkey:Cc,access_key:_e.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),jr.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r)}catch{}}return e});function $y(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw Ae("找不到 csrf token, 请检查是否登录"),new Error("找不到 csrf token, 请检查是否登录");return e}const jn=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,xc=new Set,Vy=(e,t,n,r)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},Yy=e=>!xc.has(e),yt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Ac=e=>yt(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Fr:null:null;class Fr extends Array{constructor(t){super(t),this.fill(0)}}const sn=class{constructor(t,n){ae(this,"heap");ae(this,"length");if(!u(sn,rn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){const n=Ac(t);if(!n)return[];N(sn,rn,!0);const r=new sn(t,n);return N(sn,rn,!1),r}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};let Wr=sn;rn=new WeakMap,H(Wr,rn,!1);const zs=class{constructor(t){H(this,$n);H(this,Kr);H(this,nt);H(this,rt);H(this,Kn);H(this,cn);H(this,ln);H(this,K);H(this,Xn);H(this,Nt);H(this,je,void 0);H(this,Re,void 0);H(this,et,void 0);H(this,Fe,void 0);H(this,on,void 0);ae(this,"ttl");ae(this,"ttlResolution");ae(this,"ttlAutopurge");ae(this,"updateAgeOnGet");ae(this,"updateAgeOnHas");ae(this,"allowStale");ae(this,"noDisposeOnSet");ae(this,"noUpdateTTL");ae(this,"maxEntrySize");ae(this,"sizeCalculation");ae(this,"noDeleteOnFetchRejection");ae(this,"noDeleteOnStaleGet");ae(this,"allowStaleOnFetchAbort");ae(this,"allowStaleOnFetchRejection");ae(this,"ignoreFetchAbort");H(this,le,void 0);H(this,We,void 0);H(this,ue,void 0);H(this,J,void 0);H(this,j,void 0);H(this,ke,void 0);H(this,Me,void 0);H(this,we,void 0);H(this,me,void 0);H(this,ze,void 0);H(this,ye,void 0);H(this,ft,void 0);H(this,dt,void 0);H(this,He,void 0);H(this,tt,void 0);H(this,vt,void 0);H(this,Oe,void 0);H(this,Lt,()=>{});H(this,ht,()=>{});H(this,Vn,()=>{});H(this,Le,()=>!1);H(this,Pt,t=>{});H(this,an,(t,n,r)=>{});H(this,Yn,(t,n,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:h,maxSize:y=0,maxEntrySize:v=0,sizeCalculation:g,fetchMethod:w,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:F,ignoreFetchAbort:S}=t;if(n!==0&&!yt(n))throw new TypeError("max option must be a nonnegative integer");const _=n?Ac(n):Array;if(!_)throw new Error("invalid max value: "+n);if(N(this,je,n),N(this,Re,y),this.maxEntrySize=v||u(this,Re),this.sizeCalculation=g,this.sizeCalculation){if(!u(this,Re)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(N(this,on,w),N(this,vt,!!w),N(this,ue,new Map),N(this,J,new Array(n).fill(void 0)),N(this,j,new Array(n).fill(void 0)),N(this,ke,new _(n)),N(this,Me,new _(n)),N(this,we,0),N(this,me,0),N(this,ze,Wr.create(n)),N(this,le,0),N(this,We,0),typeof l=="function"&&N(this,et,l),typeof f=="function"?(N(this,Fe,f),N(this,ye,[])):(N(this,Fe,void 0),N(this,ye,void 0)),N(this,tt,!!u(this,et)),N(this,Oe,!!u(this,Fe)),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!F,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(u(this,Re)!==0&&!yt(u(this,Re)))throw new TypeError("maxSize must be a positive integer if specified");if(!yt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");L(this,Kr,wl).call(this)}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=yt(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!yt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");L(this,$n,Gs).call(this)}if(u(this,je)===0&&this.ttl===0&&u(this,Re)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!u(this,je)&&!u(this,Re)){const k="LRU_CACHE_UNBOUNDED";Yy(k)&&(xc.add(k),Vy("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",k,zs))}}static unsafeExposeInternals(t){return{starts:u(t,dt),ttls:u(t,He),sizes:u(t,ft),keyMap:u(t,ue),keyList:u(t,J),valList:u(t,j),next:u(t,ke),prev:u(t,Me),get head(){return u(t,we)},get tail(){return u(t,me)},free:u(t,ze),isBackgroundFetch:n=>{var r;return L(r=t,K,q).call(r,n)},backgroundFetch:(n,r,i,s)=>{var o;return L(o=t,ln,Qr).call(o,n,r,i,s)},moveToTail:n=>{var r;return L(r=t,Nt,Zn).call(r,n)},indexes:n=>{var r;return L(r=t,nt,_t).call(r,n)},rindexes:n=>{var r;return L(r=t,rt,St).call(r,n)},isStale:n=>{var r;return u(r=t,Le).call(r,n)}}}get max(){return u(this,je)}get maxSize(){return u(this,Re)}get calculatedSize(){return u(this,We)}get size(){return u(this,le)}get fetchMethod(){return u(this,on)}get dispose(){return u(this,et)}get disposeAfter(){return u(this,Fe)}getRemainingTTL(t){return u(this,ue).has(t)?1/0:0}*entries(){for(const t of L(this,nt,_t).call(this))u(this,j)[t]!==void 0&&u(this,J)[t]!==void 0&&!L(this,K,q).call(this,u(this,j)[t])&&(yield[u(this,J)[t],u(this,j)[t]])}*rentries(){for(const t of L(this,rt,St).call(this))u(this,j)[t]!==void 0&&u(this,J)[t]!==void 0&&!L(this,K,q).call(this,u(this,j)[t])&&(yield[u(this,J)[t],u(this,j)[t]])}*keys(){for(const t of L(this,nt,_t).call(this)){const n=u(this,J)[t];n!==void 0&&!L(this,K,q).call(this,u(this,j)[t])&&(yield n)}}*rkeys(){for(const t of L(this,rt,St).call(this)){const n=u(this,J)[t];n!==void 0&&!L(this,K,q).call(this,u(this,j)[t])&&(yield n)}}*values(){for(const t of L(this,nt,_t).call(this))u(this,j)[t]!==void 0&&!L(this,K,q).call(this,u(this,j)[t])&&(yield u(this,j)[t])}*rvalues(){for(const t of L(this,rt,St).call(this))u(this,j)[t]!==void 0&&!L(this,K,q).call(this,u(this,j)[t])&&(yield u(this,j)[t])}[Symbol.iterator](){return this.entries()}find(t,n={}){for(const r of L(this,nt,_t).call(this)){const i=u(this,j)[r],s=L(this,K,q).call(this,i)?i.__staleWhileFetching:i;if(s!==void 0&&t(s,u(this,J)[r],this))return this.get(u(this,J)[r],n)}}forEach(t,n=this){for(const r of L(this,nt,_t).call(this)){const i=u(this,j)[r],s=L(this,K,q).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&t.call(n,s,u(this,J)[r],this)}}rforEach(t,n=this){for(const r of L(this,rt,St).call(this)){const i=u(this,j)[r],s=L(this,K,q).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&t.call(n,s,u(this,J)[r],this)}}purgeStale(){let t=!1;for(const n of L(this,rt,St).call(this,{allowStale:!0}))u(this,Le).call(this,n)&&(this.delete(u(this,J)[n]),t=!0);return t}dump(){const t=[];for(const n of L(this,nt,_t).call(this,{allowStale:!0})){const r=u(this,J)[n],i=u(this,j)[n],s=L(this,K,q).call(this,i)?i.__staleWhileFetching:i;if(s===void 0||r===void 0)continue;const o={value:s};if(u(this,He)&&u(this,dt)){o.ttl=u(this,He)[n];const a=jn.now()-u(this,dt)[n];o.start=Math.floor(Date.now()-a)}u(this,ft)&&(o.size=u(this,ft)[n]),t.unshift([r,o])}return t}load(t){this.clear();for(const[n,r]of t){if(r.start){const i=Date.now()-r.start;r.start=jn.now()-i}this.set(n,r.value,r)}}set(t,n,r={}){var h,y,v;const{ttl:i=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const f=u(this,Yn).call(this,t,n,r.size||0,a);if(this.maxEntrySize&&f>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(t),this;let d=u(this,le)===0?void 0:u(this,ue).get(t);if(d===void 0)d=u(this,le)===0?u(this,me):u(this,ze).length!==0?u(this,ze).pop():u(this,le)===u(this,je)?L(this,cn,Zr).call(this,!1):u(this,le),u(this,J)[d]=t,u(this,j)[d]=n,u(this,ue).set(t,d),u(this,ke)[u(this,me)]=d,u(this,Me)[d]=u(this,me),N(this,me,d),Jr(this,le)._++,u(this,an).call(this,d,f,c),c&&(c.set="add"),l=!1;else{L(this,Nt,Zn).call(this,d);const g=u(this,j)[d];if(n!==g){if(u(this,vt)&&L(this,K,q).call(this,g)?g.__abortController.abort(new Error("replaced")):o||(u(this,tt)&&((h=u(this,et))==null||h.call(this,g,t,"set")),u(this,Oe)&&((y=u(this,ye))==null||y.push([g,t,"set"]))),u(this,Pt).call(this,d),u(this,an).call(this,d,f,c),u(this,j)[d]=n,c){c.set="replace";const w=g&&L(this,K,q).call(this,g)?g.__staleWhileFetching:g;w!==void 0&&(c.oldValue=w)}}else c&&(c.set="update")}if(i!==0&&!u(this,He)&&L(this,$n,Gs).call(this),u(this,He)&&(l||u(this,Vn).call(this,d,i,s),c&&u(this,ht).call(this,c,d)),!o&&u(this,Oe)&&u(this,ye)){const g=u(this,ye);let w;for(;w=g==null?void 0:g.shift();)(v=u(this,Fe))==null||v.call(this,...w)}return this}pop(){var t;try{for(;u(this,le);){const n=u(this,j)[u(this,we)];if(L(this,cn,Zr).call(this,!0),L(this,K,q).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(u(this,Oe)&&u(this,ye)){const n=u(this,ye);let r;for(;r=n==null?void 0:n.shift();)(t=u(this,Fe))==null||t.call(this,...r)}}}has(t,n={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=n,s=u(this,ue).get(t);if(s!==void 0){const o=u(this,j)[s];if(L(this,K,q).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(u(this,Le).call(this,s))i&&(i.has="stale",u(this,ht).call(this,i,s));else return r&&u(this,Lt).call(this,s),i&&(i.has="hit",u(this,ht).call(this,i,s)),!0}else i&&(i.has="miss");return!1}peek(t,n={}){const{allowStale:r=this.allowStale}=n,i=u(this,ue).get(t);if(i!==void 0&&(r||!u(this,Le).call(this,i))){const s=u(this,j)[i];return L(this,K,q).call(this,s)?s.__staleWhileFetching:s}}async fetch(t,n={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:v=this.allowStaleOnFetchAbort,context:g,forceRefresh:w=!1,status:b,signal:x}=n;if(!u(this,vt))return b&&(b.fetch="get"),this.get(t,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:b});const D={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:v,ignoreFetchAbort:y,status:b,signal:x};let F=u(this,ue).get(t);if(F===void 0){b&&(b.fetch="miss");const S=L(this,ln,Qr).call(this,t,F,D,g);return S.__returned=S}else{const S=u(this,j)[F];if(L(this,K,q).call(this,S)){const O=r&&S.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",O&&(b.returnedStale=!0)),O?S.__staleWhileFetching:S.__returned=S}const _=u(this,Le).call(this,F);if(!w&&!_)return b&&(b.fetch="hit"),L(this,Nt,Zn).call(this,F),i&&u(this,Lt).call(this,F),b&&u(this,ht).call(this,b,F),S;const k=L(this,ln,Qr).call(this,t,F,D,g),A=k.__staleWhileFetching!==void 0&&r;return b&&(b.fetch=_?"stale":"refresh",A&&_&&(b.returnedStale=!0)),A?k.__staleWhileFetching:k.__returned=k}}get(t,n={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=n,a=u(this,ue).get(t);if(a!==void 0){const c=u(this,j)[a],l=L(this,K,q).call(this,c);return o&&u(this,ht).call(this,o,a),u(this,Le).call(this,a)?(o&&(o.get="stale"),l?(o&&r&&c.__staleWhileFetching!==void 0&&(o.returnedStale=!0),r?c.__staleWhileFetching:void 0):(s||this.delete(t),o&&r&&(o.returnedStale=!0),r?c:void 0)):(o&&(o.get="hit"),l?c.__staleWhileFetching:(L(this,Nt,Zn).call(this,a),i&&u(this,Lt).call(this,a),c))}else o&&(o.get="miss")}delete(t){var r,i,s,o;let n=!1;if(u(this,le)!==0){const a=u(this,ue).get(t);if(a!==void 0)if(n=!0,u(this,le)===1)this.clear();else{u(this,Pt).call(this,a);const c=u(this,j)[a];L(this,K,q).call(this,c)?c.__abortController.abort(new Error("deleted")):(u(this,tt)||u(this,Oe))&&(u(this,tt)&&((r=u(this,et))==null||r.call(this,c,t,"delete")),u(this,Oe)&&((i=u(this,ye))==null||i.push([c,t,"delete"]))),u(this,ue).delete(t),u(this,J)[a]=void 0,u(this,j)[a]=void 0,a===u(this,me)?N(this,me,u(this,Me)[a]):a===u(this,we)?N(this,we,u(this,ke)[a]):(u(this,ke)[u(this,Me)[a]]=u(this,ke)[a],u(this,Me)[u(this,ke)[a]]=u(this,Me)[a]),Jr(this,le)._--,u(this,ze).push(a)}}if(u(this,Oe)&&((s=u(this,ye))!=null&&s.length)){const a=u(this,ye);let c;for(;c=a==null?void 0:a.shift();)(o=u(this,Fe))==null||o.call(this,...c)}return n}clear(){var t,n,r;for(const i of L(this,rt,St).call(this,{allowStale:!0})){const s=u(this,j)[i];if(L(this,K,q).call(this,s))s.__abortController.abort(new Error("deleted"));else{const o=u(this,J)[i];u(this,tt)&&((t=u(this,et))==null||t.call(this,s,o,"delete")),u(this,Oe)&&((n=u(this,ye))==null||n.push([s,o,"delete"]))}}if(u(this,ue).clear(),u(this,j).fill(void 0),u(this,J).fill(void 0),u(this,He)&&u(this,dt)&&(u(this,He).fill(0),u(this,dt).fill(0)),u(this,ft)&&u(this,ft).fill(0),N(this,we,0),N(this,me,0),u(this,ze).length=0,N(this,We,0),N(this,le,0),u(this,Oe)&&u(this,ye)){const i=u(this,ye);let s;for(;s=i==null?void 0:i.shift();)(r=u(this,Fe))==null||r.call(this,...s)}}};let hs=zs;je=new WeakMap,Re=new WeakMap,et=new WeakMap,Fe=new WeakMap,on=new WeakMap,le=new WeakMap,We=new WeakMap,ue=new WeakMap,J=new WeakMap,j=new WeakMap,ke=new WeakMap,Me=new WeakMap,we=new WeakMap,me=new WeakMap,ze=new WeakMap,ye=new WeakMap,ft=new WeakMap,dt=new WeakMap,He=new WeakMap,tt=new WeakMap,vt=new WeakMap,Oe=new WeakMap,$n=new WeakSet,Gs=function(){const t=new Fr(u(this,je)),n=new Fr(u(this,je));N(this,He,t),N(this,dt,n),N(this,Vn,(s,o,a=jn.now())=>{if(n[s]=o!==0?a:0,t[s]=o,o!==0&&this.ttlAutopurge){const c=setTimeout(()=>{u(this,Le).call(this,s)&&this.delete(u(this,J)[s])},o+1);c.unref&&c.unref()}}),N(this,Lt,s=>{n[s]=t[s]!==0?jn.now():0}),N(this,ht,(s,o)=>{if(t[o]){const a=t[o],c=n[o];s.ttl=a,s.start=c,s.now=r||i(),s.remainingTTL=s.now+a-c}});let r=0;const i=()=>{const s=jn.now();if(this.ttlResolution>0){r=s;const o=setTimeout(()=>r=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{const o=u(this,ue).get(s);return o===void 0?0:t[o]===0||n[o]===0?1/0:n[o]+t[o]-(r||i())},N(this,Le,s=>t[s]!==0&&n[s]!==0&&(r||i())-n[s]>t[s])},Lt=new WeakMap,ht=new WeakMap,Vn=new WeakMap,Le=new WeakMap,Kr=new WeakSet,wl=function(){const t=new Fr(u(this,je));N(this,We,0),N(this,ft,t),N(this,Pt,n=>{N(this,We,u(this,We)-t[n]),t[n]=0}),N(this,Yn,(n,r,i,s)=>{if(L(this,K,q).call(this,r))return 0;if(!yt(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(r,n),!yt(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),N(this,an,(n,r,i)=>{if(t[n]=r,u(this,Re)){const s=u(this,Re)-t[n];for(;u(this,We)>s;)L(this,cn,Zr).call(this,!0)}N(this,We,u(this,We)+t[n]),i&&(i.entrySize=r,i.totalCalculatedSize=u(this,We))})},Pt=new WeakMap,an=new WeakMap,Yn=new WeakMap,nt=new WeakSet,_t=function*({allowStale:t=this.allowStale}={}){if(u(this,le))for(let n=u(this,me);!(!L(this,Kn,$s).call(this,n)||((t||!u(this,Le).call(this,n))&&(yield n),n===u(this,we)));)n=u(this,Me)[n]},rt=new WeakSet,St=function*({allowStale:t=this.allowStale}={}){if(u(this,le))for(let n=u(this,we);!(!L(this,Kn,$s).call(this,n)||((t||!u(this,Le).call(this,n))&&(yield n),n===u(this,me)));)n=u(this,ke)[n]},Kn=new WeakSet,$s=function(t){return t!==void 0&&u(this,ue).get(u(this,J)[t])===t},cn=new WeakSet,Zr=function(t){var s,o;const n=u(this,we),r=u(this,J)[n],i=u(this,j)[n];return u(this,vt)&&L(this,K,q).call(this,i)?i.__abortController.abort(new Error("evicted")):(u(this,tt)||u(this,Oe))&&(u(this,tt)&&((s=u(this,et))==null||s.call(this,i,r,"evict")),u(this,Oe)&&((o=u(this,ye))==null||o.push([i,r,"evict"]))),u(this,Pt).call(this,n),t&&(u(this,J)[n]=void 0,u(this,j)[n]=void 0,u(this,ze).push(n)),u(this,le)===1?(N(this,we,N(this,me,0)),u(this,ze).length=0):N(this,we,u(this,ke)[n]),u(this,ue).delete(r),Jr(this,le)._--,n},ln=new WeakSet,Qr=function(t,n,r,i){const s=n===void 0?void 0:u(this,j)[n];if(L(this,K,q).call(this,s))return s;const o=new AbortController,{signal:a}=r;a==null||a.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:r,context:i},l=(g,w=!1)=>{const{aborted:b}=o.signal,x=r.ignoreFetchAbort&&g!==void 0;if(r.status&&(b&&!w?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,x&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),b&&!x&&!w)return d(o.signal.reason);const D=y;return u(this,j)[n]===y&&(g===void 0?D.__staleWhileFetching?u(this,j)[n]=D.__staleWhileFetching:this.delete(t):(r.status&&(r.status.fetchUpdated=!0),this.set(t,g,c.options))),g},f=g=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=g),d(g)),d=g=>{const{aborted:w}=o.signal,b=w&&r.allowStaleOnFetchAbort,x=b||r.allowStaleOnFetchRejection,D=x||r.noDeleteOnFetchRejection,F=y;if(u(this,j)[n]===y&&(!D||F.__staleWhileFetching===void 0?this.delete(t):b||(u(this,j)[n]=F.__staleWhileFetching)),x)return r.status&&F.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),F.__staleWhileFetching;if(F.__returned===F)throw g},h=(g,w)=>{var x;const b=(x=u(this,on))==null?void 0:x.call(this,t,s,c);b&&b instanceof Promise&&b.then(D=>g(D),w),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(g(),r.allowStaleOnFetchAbort&&(g=D=>l(D,!0)))})};r.status&&(r.status.fetchDispatched=!0);const y=new Promise(h).then(l,f),v=Object.assign(y,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return n===void 0?(this.set(t,v,{...c.options,status:void 0}),n=u(this,ue).get(t)):u(this,j)[n]=v,v},K=new WeakSet,q=function(t){if(!u(this,vt))return!1;const n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof AbortController},Xn=new WeakSet,Vs=function(t,n){u(this,Me)[n]=t,u(this,ke)[t]=n},Nt=new WeakSet,Zn=function(t){t!==u(this,me)&&(t===u(this,we)?N(this,we,u(this,ke)[t]):L(this,Xn,Vs).call(this,u(this,Me)[t],u(this,ke)[t]),L(this,Xn,Vs).call(this,u(this,me),t),N(this,me,t))};const Ky=hs;async function Xy(e){return(await Ir.get("/pvideo",{params:{aid:e}})).data.data}async function Jy(e){return[]}const ps=new Ky({max:200});async function Zy(e){if(ps.has(e))return ps.get(e);const[t,n]=await Promise.all([Xy(e),Jy()]);return ps.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function Rc(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",$y());const s=(await Ir.post("/x/v2/history/toview/"+e,r,{withCredentials:!0})).data,o=(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0";return o||Ae((s==null?void 0:s.message)||"出错了"),o}}const Qy=Rc("add"),qy=Rc("del"),Mc=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var a;const s=(await jr.get(Tc+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(a=n.tag)==null?void 0:a.tag_id,reason_id:r,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}},ev=Mc("dislike"),tv=Mc("cancel"),Ne={modal:"_modal_dp8y9_1",titleDesc:"_title-desc_dp8y9_4",reasonList:"_reason-list_dp8y9_8",reason:"_reason_dp8y9_8",active:"_active_dp8y9_29",reasonNo:"_reason-no_dp8y9_33",tipsContainer:"_tips-container_dp8y9_47",tips:"_tips_dp8y9_47"},zr=Hy();function nv(){return Gt(zr)}function rv(e){const t=nv();if(e)return t.get(e)}function iv({show:e,onHide:t,item:n}){const[r,i]=p.useState(!1),s=ee(async y=>{if(!n)return;let v=!1,g=null;try{i(!0),v=await ev(n,y.id)}catch(w){g=w}finally{i(!1)}if(g)return console.error(g.stack||g),kc();v?Ae("已标记不想看"):Ec(),v&&(zr.set(n.param,{...y}),t())}),o=p.useMemo(()=>{var y;return((y=n==null?void 0:n.three_point)==null?void 0:y.dislike_reasons)||[]},[n]),a=()=>!!e&&!!n,c=["1","2","3","4","5","6"];be(c,y=>{if(!a()||!c.includes(y.key))return;const v=Number(y.key)-1;f(v);const g=document.querySelectorAll(`.${Ne.reason}`)[v]||null;g==null||g.click()});const[l,f]=p.useState(o.length-1);Ry(()=>{f(o.length-1)},[o]);const d=y=>()=>{if(!a())return;const v=l+y;v<0||v>o.length-1||f(v)};be("leftarrow",d(-1)),be("rightarrow",d(1)),be("uparrow",d(-2)),be("downarrow",d(2)),be("enter",y=>{var v;a()&&(l<0||l>o.length-1||(y.preventDefault(),y.stopImmediatePropagation(),(v=document.querySelector(`.${Ne.reason}.${Ne.active}`))==null||v.click()))});const h=p.useMemo(()=>{var y;return((y=o[l])==null?void 0:y.name)||""},[o,l]);return R(fs,{show:e,onHide:t,clsModal:Ne.modal,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[R("div",{className:Ie.modalHeader,children:[R("div",{className:Ie.modalTitle,children:["我不想看",m("span",{className:Ne.titleDesc,children:"(选择后将减少相似内容推荐)"})]}),m("div",{className:"space",style:{flex:1}}),m(ds,{onClick:t})]}),R("div",{className:Ie.modalBody,children:[m("div",{className:Ne.reasonList,children:o.map((y,v)=>R("button",{className:re(Ne.reason,{[Ne.active]:v===l}),"data-id":y.id,onClick:()=>s(y),disabled:r,children:[m("span",{className:Ne.reasonNo,children:v+1}),y.name]},y.id))}),R("div",{className:Ne.tipsContainer,children:[R("div",{className:Ne.tips,children:[m(Tt,{name:"Info",size:15,style:{marginRight:5}}),"使用删除键打开弹框, 数字键选择, Esc 关闭"]}),h&&R("div",{className:Ne.tips,children:[m(Tt,{name:"Info",size:15,style:{marginRight:5}}),"已选择「",h,"」, 回车键提交"]})]})]})]})}const Hr={show:!1,onHide:Pc,item:null},Lc=Tn({value:Hr.show}),sv=function(){return Gt(Lc).value};function Pc(){setTimeout(()=>{Nc({show:!1,item:null})})}function Nc(e){Object.assign(Hr,e),Lc.value=Hr.show,ov().render(m(iv,{...Hr,onHide:Pc}))}let ms;function ov(){if(!ms){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),ms=Tr(e)}return ms}function av(e){e!=null&&e.param&&zr.has(e.param)||Nc({show:!0,item:e})}function cv(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const n=Math.trunc(e/60);e-=n*60;const i=[t,n,e];return i[0]===0&&i.shift(),i.map(o=>Nm(o.toString(),2,"0")).join(":")}function gs(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}万`}const ce={biliVideoCard:"_bili-video-card_mqmiz_1",imageWrapper:"_image-wrapper_mqmiz_4",previewCardWrapper:"_preview-card-wrapper_mqmiz_8",previewCardInner:"_preview-card-inner_mqmiz_21",watchLater:"_watch-later_mqmiz_25",badge:"_badge_mqmiz_28",recommendReason:"_recommend-reason_mqmiz_36",bangumiDesc:"_bangumi-desc_mqmiz_51",btnDislike:"_btn-dislike_mqmiz_54",btnDislikeIcon:"_btn-dislike-icon_mqmiz_69",btnDislikeTip:"_btn-dislike-tip_mqmiz_76",dislikedWrapper:"_disliked-wrapper_mqmiz_91",dislikeContentCover:"_dislike-content-cover_mqmiz_105",dislikeContentCoverInner:"_dislike-content-cover-inner_mqmiz_111",dislikeIcon:"_dislike-icon_mqmiz_122",dislikeReason:"_dislike-reason_mqmiz_125",dislikeDesc:"_dislike-desc_mqmiz_129",dislikeContentAction:"_dislike-content-action_mqmiz_133",skeletonActive:"_skeleton-active_mqmiz_150",antSkeletonLoading:"_ant-skeleton-loading_mqmiz_1"};function ys(e,t){return isNaN(e)?t:e}function lv({className:e,videoDuration:t,pvideo:n,enterCursorState:r}){const i=p.useRef(null),s=Ay(i),o={videoDuration:t,pvideo:n,cursorState:s,elWidth:ys(s.elementW,r.width),elHeight:ys(s.elementH,r.height),relativeX:ys(s.elementX,r.relativeX)};return m("div",{ref:i,className:re(ce.previewCardWrapper,e),children:n?m(uv,{...o}):!1})}function uv({videoDuration:e,pvideo:t,elWidth:n,elHeight:r,relativeX:i}){var _;let s=0,o=0;n&&i&&!isNaN(i)&&!isNaN(n)&&(s=i/n,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e||0)*s));let a=p.useMemo(()=>{const k=(t==null?void 0:t.index)||[];let B=dv(k,o);return B!==-1?B:o>k[k.length-1]?(B=Math.floor(k.length*s)-1,B<0&&(B=0),B):0},[t,o]);const{img_x_len:c,img_y_len:l,img_x_size:f,img_y_size:d}=t,h=l*c;a=a+1;const y=Math.floor(a/h),v=a-y*h,g=((_=t.image)==null?void 0:_[y])||"",w=Math.floor(v/c)+1,b=v-(w-1)*c,x=n*c,D=r*l,F=(w-1)*r,S=(b-1)*n;return m("div",{className:ce.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${g})`,backgroundPosition:`-${S}px -${F}px`,backgroundSize:`${x}px ${D}px`},children:m(fv,{progress:s})})}function fv({progress:e}){return m("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:m("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function dv(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){const a=Math.floor((n+r)/2),c=e[a];if(t===c)return a;c{if(!e)return"";const t=bc.unix(e);return t.format("YYYY")===hv?t.format("M-D"):t.format("YY-M-D")},mv=e=>(e||"").replace(/^http:\/\//,"https://"),vs=p.memo(p.forwardRef(function({style:t,className:n,item:r,loading:i,active:s,...o},a){i=i??!r;const c=R("div",{className:re("bili-video-card__skeleton",{hide:!i,[ce.skeletonActive]:i}),children:[m("div",{className:"bili-video-card__skeleton--cover"}),m("div",{className:"bili-video-card__skeleton--info",children:R("div",{className:"bili-video-card__skeleton--right",children:[m("p",{className:"bili-video-card__skeleton--text"}),m("p",{className:"bili-video-card__skeleton--text short"}),m("p",{className:"bili-video-card__skeleton--light"})]})})]}),l=rv((r==null?void 0:r.api)==="app"&&r.param),f=p.useRef(null),d=p.useRef(null);return p.useImperativeHandle(a,()=>({async onCancelDislike(){var h;await((h=f.current)==null?void 0:h.onCancelDislike())},async onToggleWatchLater(){var h;await((h=d.current)==null?void 0:h.onToggleWatchLater())},onTriggerDislike(){var h;(h=d.current)==null||h.onTriggerDislike()}}),[f,d]),R("div",{style:t,className:re("bili-video-card",ce.biliVideoCard,n),"data-report":"partition_recommend.content",...o,children:[c,!i&&r&&(l?m(gv,{ref:f,item:r,dislikedReason:l}):m(yv,{ref:d,item:r,active:s}))]})})),gv=p.memo(p.forwardRef(function({dislikedReason:t,item:n},r){const i=ee(async()=>{if(!(t!=null&&t.id))return;let s=!1,o=null;try{s=await tv(n,t.id)}catch(a){o=a}if(o)return console.error(o.stack||o),kc();s?Ae("已撤销"):Ec(),s&&zr.delete(n.param)});return p.useImperativeHandle(r,()=>({onCancelDislike:i}),[]),R("div",{className:re(ce.dislikedWrapper),children:[m("div",{className:ce.dislikeContentCover,children:R("div",{className:ce.dislikeContentCoverInner,children:[m(Tt,{name:"DistraughtFace",size:32,className:ce.dislikeIcon}),m("div",{className:ce.dislikeReason,children:t==null?void 0:t.name}),m("div",{className:ce.dislikeDesc,children:(t==null?void 0:t.toast)||"将减少此类内容推荐"})]})}),m("div",{className:ce.dislikeContentAction,children:R("button",{onClick:i,children:[m(Tt,{name:"Return",size:"16",style:{marginRight:4,marginTop:-2}}),"撤销"]})})]})})),yv=p.memo(p.forwardRef(function({item:t,active:n=!1},r){var gl,yl,vl;const i=p.useRef(null),[s,o]=p.useState(()=>({width:0,height:0,relativeX:0}));Pr("mouseenter",oe=>{var bl;const it=(bl=i.current)==null?void 0:bl.getBoundingClientRect();if(!it)return;const{width:fn,height:Bs,x:wb}=it;o({width:fn,height:Bs,relativeX:oe.pageX-window.pageXOffset-wb})},{target:i});const a=ls(i),c=p.useRef(null),l=ls(c),[f,d]=p.useState(!1),{accessKey:h}=gt(),y=!!h;p.useImperativeHandle(r,()=>({onToggleWatchLater:Be,onTriggerDislike:bt}),[]);const v=t.api==="pc",g=t.api==="app",w=String(v?t.id:t.param),b=v?t.bvid:"",x=t.goto,D=v?t.stat.view:void 0,F=v?t.stat.like:void 0,S=t.title,_=v?t.pic:t.cover,k=v?t.pubdate:void 0,B=(v?t.duration:(gl=t.player_args)==null?void 0:gl.duration)||0,A=v?t.owner.name:t.args.up_name;v&&t.owner.face;const O=v?t.owner.mid:t.args.up_id,I=void 0,fe=v?void 0:t.badge,P=v?void 0:((yl=t.desc_button)==null?void 0:yl.text)||"",C=v?(vl=t.rcmd_reason)==null?void 0:vl.content:t.rcmd_reason,E=p.useMemo(()=>pv(k),[k]),M=p.useMemo(()=>mv(_),[_]),[T,z]=p.useState(null),[W,G]=p.useState(!1),ne=ee(async()=>{if(!T&&!W)try{G(!0);const oe=await Zy(w);z(oe)}finally{G(!1)}});p.useEffect(()=>{a&&ne()},[a]);const[Q,de]=p.useState(!1),Be=ee(async oe=>{if(oe==null||oe.preventDefault(),Q)return;de(!0);const it=f?qy:Qy;let fn=!1;try{fn=await it(w)}finally{de(!1)}fn&&d(Bs=>!Bs)}),De=p.useRef(null),Dt=ls(De),bt=ee(oe=>{oe==null||oe.stopPropagation(),oe==null||oe.preventDefault(),g&&av(t)}),wt=t.goto==="bangumi",he=t.goto==="av",Pe=v?he&&b?`/video/${b}`:t.uri:he?`/video/av${t.param}`:t.uri,Jn=p.useMemo(()=>cv(B),[B]),un=p.useMemo(()=>gs(D),[D]),hl=p.useMemo(()=>gs(F),[F]),yb=p.useMemo(()=>gs(I),[I]),vb=v?hl:yb,bb=ee(oe=>{if(!_e.openInIINAWhenRightClick)return;const it=new URL(Pe,location.href).href,fn=`iina://open?url=${encodeURIComponent(it)}`;window.open(fn,"_self"),oe.preventDefault()}),Xr=({text:oe,iconSvgName:it})=>R("span",{className:"bili-video-card__stats--item",children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:it})}),m("span",{className:"bili-video-card__stats--text",children:oe})]}),Hs={play:"#widget-video-play-count",danmaku:"#widget-video-danmaku",like:"#widget-agree",bangumiFollow:"#widget-agree"},pl={1:"play",2:"like",3:"danmaku",4:"bangumiFollow"},ml=oe=>{const it=pl[oe]||pl[1];return Hs[it]};return R("div",{className:"bili-video-card__wrap __scale-wrap",onContextMenu:bb,children:[m("a",{href:Pe,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:R("div",{className:"bili-video-card__image __scale-player-wrap",ref:i,children:[R("div",{className:re("bili-video-card__image--wrap",ce.imageWrapper),children:[R("picture",{className:"v-img bili-video-card__cover",children:[m("source",{srcSet:`${M}@672w_378h_1c_!web-home-common-cover.avif`,type:"image/avif"}),m("source",{srcSet:`${M}@672w_378h_1c_!web-home-common-cover.webp`,type:"image/webp"}),m("img",{src:`${M}@672w_378h_1c_!web-home-common-cover`,alt:S,loading:"eager"})]}),a&&m(lv,{videoDuration:B,pvideo:T==null?void 0:T.pvideoData,enterCursorState:s}),R("div",{className:`bili-watch-later ${ce.watchLater}`,style:{display:a||n?"flex":"none"},ref:c,onClick:Be,children:[m("svg",{className:"bili-watch-later__icon",children:m("use",{xlinkHref:f?"#widget-watch-save":"#widget-watch-later"})}),m("span",{className:"bili-watch-later__tip",style:{display:l?"block":"none"},children:f?"移除":"稍后再看"})]}),g&&y&&R("div",{ref:De,className:ce.btnDislike,onClick:bt,style:{display:a?"flex":"none"},children:[m("svg",{className:ce.btnDislikeIcon,children:m("use",{xlinkHref:"#widget-close"})}),m("span",{className:ce.btnDislikeTip,style:{display:Dt?"block":"none"},children:"我不想看"})]})]}),m("div",{className:"bili-video-card__mask",children:R("div",{className:"bili-video-card__stats",children:[m("div",{className:"bili-video-card__stats--left",children:v?R(pt,{children:[Xr({text:un,iconSvgName:Hs.play}),Xr({text:x==="av"?hl:vb,iconSvgName:Hs.like})]}):R(pt,{children:[Xr({iconSvgName:ml(t.cover_left_icon_1),text:t.cover_left_text_1}),Xr({iconSvgName:ml(t.cover_left_icon_2),text:t.cover_left_text_2})]})}),m("span",{className:"bili-video-card__stats__duration",children:he&&Jn})]})})]})}),m("div",{className:"bili-video-card__info __scale-disable",children:R("div",{className:"bili-video-card__info--right",children:[m("a",{href:Pe,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:m("h3",{className:"bili-video-card__info--tit",title:S,children:S})}),R("p",{className:"bili-video-card__info--bottom",children:[he&&R("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${O}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[C?m("span",{className:ce.recommendReason,children:C}):m("svg",{className:"bili-video-card__info--owner__up",children:m("use",{xlinkHref:"#widget-up"})}),m("span",{className:"bili-video-card__info--author",children:A}),E&&R("span",{className:"bili-video-card__info--date",children:["· ",E]})]}),wt&&R("a",{className:"bili-video-card__info--owner",href:Pe,target:"_blank",children:[m("span",{className:ce.badge,children:fe||""}),m("span",{className:ce.bangumiDesc,children:P||""})]})]})]})})]})})),Dc="bilibili-app-recommend";var Fn={},vv={get exports(){return Fn},set exports(e){Fn=e}},Br={},bv={get exports(){return Br},set exports(e){Br=e}},Zt={},wv={get exports(){return Zt},set exports(e){Zt=e}},ie=wv.exports={},Je,Ze;function bs(){throw new Error("setTimeout has not been defined")}function ws(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Je=setTimeout:Je=bs}catch{Je=bs}try{typeof clearTimeout=="function"?Ze=clearTimeout:Ze=ws}catch{Ze=ws}})();function Ic(e){if(Je===setTimeout)return setTimeout(e,0);if((Je===bs||!Je)&&setTimeout)return Je=setTimeout,setTimeout(e,0);try{return Je(e,0)}catch{try{return Je.call(null,e,0)}catch{return Je.call(this,e,0)}}}function _v(e){if(Ze===clearTimeout)return clearTimeout(e);if((Ze===ws||!Ze)&&clearTimeout)return Ze=clearTimeout,clearTimeout(e);try{return Ze(e)}catch{try{return Ze.call(null,e)}catch{return Ze.call(this,e)}}}var lt=[],Qt=!1,Rt,Ur=-1;function Sv(){!Qt||!Rt||(Qt=!1,Rt.length?lt=Rt.concat(lt):Ur=-1,lt.length&&jc())}function jc(){if(!Qt){var e=Ic(Sv);Qt=!0;for(var t=lt.length;t;){for(Rt=lt,lt=[];++Ur1)for(var n=1;n=i)return a;switch(a){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}default:return a}}),o=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Vr(t)?n.showHidden=t:t&&Rs(n,t),qe(n.showHidden)&&(n.showHidden=!1),qe(n.depth)&&(n.depth=2),qe(n.colors)&&(n.colors=!1),qe(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Ev),$r(n,e,n.depth)}Qe.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Qe.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Ev(e,t){var n=Qe.styles[t];return n?"\x1B["+Qe.colors[n][0]+"m"+e+"\x1B["+Qe.colors[n][1]+"m":e}function Cv(e,t){return e}function Ov(e){var t={};return e.forEach(function(n,r){t[n]=!0}),t}function $r(e,t,n){if(e.customInspect&&t&&Un(t.inspect)&&t.inspect!==Qe&&!(t.constructor&&t.constructor.prototype===t)){var r=t.inspect(n,e);return zn(r)||(r=$r(e,r,n)),r}var i=Tv(e,t);if(i)return i;var s=Object.keys(t),o=Ov(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),Bn(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return Es(t);if(s.length===0){if(Un(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(Hn(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Yr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Bn(t))return Es(t)}var c="",l=!1,f=["{","}"];if(Os(t)&&(l=!0,f=["[","]"]),Un(t)){var d=t.name?": "+t.name:"";c=" [Function"+d+"]"}if(Hn(t)&&(c=" "+RegExp.prototype.toString.call(t)),Yr(t)&&(c=" "+Date.prototype.toUTCString.call(t)),Bn(t)&&(c=" "+Es(t)),s.length===0&&(!l||t.length==0))return f[0]+c+f[1];if(n<0)return Hn(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return l?h=xv(e,t,n,o,s):h=s.map(function(y){return Cs(e,t,n,o,y,l)}),e.seen.pop(),Av(h,c,f)}function Tv(e,t){if(qe(t))return e.stylize("undefined","undefined");if(zn(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(Ts(t))return e.stylize(""+t,"number");if(Vr(t))return e.stylize(""+t,"boolean");if(Wn(t))return e.stylize("null","null")}function Es(e){return"["+Error.prototype.toString.call(e)+"]"}function xv(e,t,n,r,i){for(var s=[],o=0,a=t.length;o-1&&(s?a=a.split(` `).map(function(l){return" "+l}).join(` `).substr(2):a=` `+a.split(` `).map(function(l){return" "+l}).join(` `))):a=e.stylize("[Circular]","special")),qe(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function Av(e,t,n){var r=e.reduce(function(i,s){return s.indexOf(` `)>=0,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return r>60?n[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function Os(e){return Array.isArray(e)}function Vr(e){return typeof e=="boolean"}function Wn(e){return e===null}function Hc(e){return e==null}function Ts(e){return typeof e=="number"}function zn(e){return typeof e=="string"}function Bc(e){return typeof e=="symbol"}function qe(e){return e===void 0}function Hn(e){return Mt(e)&&xs(e)==="[object RegExp]"}function Mt(e){return typeof e=="object"&&e!==null}function Yr(e){return Mt(e)&&xs(e)==="[object Date]"}function Bn(e){return Mt(e)&&(xs(e)==="[object Error]"||e instanceof Error)}function Un(e){return typeof e=="function"}function Uc(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function Gc(e){return Buffer.isBuffer(e)}function xs(e){return Object.prototype.toString.call(e)}function As(e){return e<10?"0"+e.toString(10):e.toString(10)}var Rv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Mv(){var e=new Date,t=[As(e.getHours()),As(e.getMinutes()),As(e.getSeconds())].join(":");return[e.getDate(),Rv[e.getMonth()],t].join(" ")}function $c(){console.log("%s - %s",Mv(),qt.apply(null,arguments))}function Rs(e,t){if(!t||!Mt(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function Vc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Lv=Ql(Object.freeze(Object.defineProperty({__proto__:null,_extend:Rs,debuglog:zc,default:{inherits:Wc,_extend:Rs,log:$c,isBuffer:Gc,isPrimitive:Uc,isFunction:Un,isError:Bn,isDate:Yr,isObject:Mt,isRegExp:Hn,isUndefined:qe,isSymbol:Bc,isString:zn,isNumber:Ts,isNullOrUndefined:Hc,isNull:Wn,isBoolean:Vr,isArray:Os,inspect:Qe,deprecate:Ss,format:qt,debuglog:zc},deprecate:Ss,format:qt,inherits:Wc,inspect:Qe,isArray:Os,isBoolean:Vr,isBuffer:Gc,isDate:Yr,isError:Bn,isFunction:Un,isNull:Wn,isNullOrUndefined:Hc,isNumber:Ts,isObject:Mt,isPrimitive:Uc,isRegExp:Hn,isString:zn,isSymbol:Bc,isUndefined:qe,log:$c},Symbol.toStringTag,{value:"Module"}))).format;function Pv(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function Nv(e,t){return function(){var n=this,r=[].slice.call(arguments);Pv();var i=new AbortController;return r.push(i.signal),new Promise(function(s,o){var a=setTimeout(function(){var c=new Yc(t);o(c),i.abort()},t);Promise.resolve(e.apply(n,r)).then(function(c){clearTimeout(a),s(c)},function(c){clearTimeout(a),o(c)})})}}let Yc=class _l extends Error{constructor(t){super(),this.timeout=t,this.message=Lv("timeout of %sms exceed",t),Error.captureStackTrace(this,_l)}};bv.exports=Nv,Br.TimeoutError=Yc;const Kc=Br,Dv=Kc.TimeoutError;vv.exports=function(t,n){const r=t;n=n||{};const i=n.times||5,s=n.timeout;s&&(t=Kc(t,s));const o=n.onerror;return async function(){const a=this,c=[].slice.call(arguments),l=new Array(i);for(let f=0;f"} ${this.times} times`,this.timeout&&(this.message+=` with timeout = ${this.timeout}ms`),Error.captureStackTrace(this,this.constructor)}}class Iv extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}var jv=Fn.RetryError=Xc;Fn.TimeoutError=Dv;class Ms extends Error{constructor(t){super(),Error.captureStackTrace(this,Ms),this.json=t,this.message=t.message||JSON.stringify(t)}}async function Fv(){var r;const t=(await jr.get(Tc+"/x/v2/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data;if(!t.data){if(t.code===-663)throw new Ms(t);return Ae(`${Dc}: 未知错误, 请联系开发者 code=${t.code} message=${t.message||""}`,"5s"),[]}return((r=t==null?void 0:t.data)==null?void 0:r.items)||[]}const Wv=Fn(Fv,{times:5,timeout:2e3,onerror(e,t){console.info("[%s] tryGetRecommend onerror: index=%s",Dc,t,e)}});async function zv(){try{return await Wv()}catch(e){if(e instanceof jv){console.error(e.errors);const t=[qt("请求出错, 已重试%s次:",e.times),...e.errors.map((n,r)=>qt(" %s) %s",r+1,n.message)),"","请重新获取 access_key 后重试~"].join(` `);Ae(t,"5s")}throw e}}async function Jc(e){let t=[];const n=new Array(e).fill(0).map(i=>zv());return t=(await Promise.all(n)).reduce((i,s)=>i.concat(s||[]),[]),t=Aa(t,i=>i.param),t.map(i=>({...i,api:"app",uniqId:i.param+"-"+crypto.randomUUID()}))}async function Hv(){return Jc(2)}async function Bv(e){const t=e.page++;return(await Ir.get("/x/web-interface/index/top/rcmd",{baseURL:Oc,withCredentials:!0,params:{fresh_type:3,version:1,ps:14,fresh_idx:t,fresh_idx_1h:t,homepage_ver:1}})).data.data.item}async function Zc(e,t){let n=(await Promise.all(new Array(e).fill(0).map(()=>Bv(t)))).flat();return n=Aa(n,r=>r.id),n.forEach(r=>{var i,s;((i=r.rcmd_reason)==null?void 0:i.reason_type)===1&&((s=r.rcmd_reason).content||(s.content="已关注"))}),n.map(r=>({...r,uniqId:r.id+"-"+crypto.randomUUID(),api:"pc"}))}async function Uv(e){return Zc(1,e)}async function Qc(e,t){return _e.usePcDesktopApi?Zc(e,t):Jc(e)}async function Gv(e){return _e.usePcDesktopApi?Uv(e):Hv()}var Se={},$v={get exports(){return Se},set exports(e){Se=e}},Vv="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Yv=Vv,Kv=Yv;function qc(){}function el(){}el.resetWarningCache=qc;var Xv=function(){function e(r,i,s,o,a,c){if(c!==Kv){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:el,resetWarningCache:qc};return n.PropTypes=n,n};$v.exports=Xv();class Ls extends p.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const s=document.documentElement||document.body.parentNode||document.body,o=n.pageYOffset!==void 0?n.pageYOffset:s.scrollTop;this.props.isReverse?i=o:i=this.calculateOffset(t,o)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i{this.scrollComponent=b,f&&f(b)};const w=[n];return i&&(a?o?w.unshift(a):w.push(a):this.defaultLoader&&(o?w.unshift(this.defaultLoader):w.push(this.defaultLoader))),p.createElement(r,g,w)}}ae(Ls,"propTypes",{children:Se.node.isRequired,element:Se.node,hasMore:Se.bool,initialLoad:Se.bool,isReverse:Se.bool,loader:Se.node,loadMore:Se.func.isRequired,pageStart:Se.number,ref:Se.func,getScrollParent:Se.func,threshold:Se.number,useCapture:Se.bool,useWindow:Se.bool}),ae(Ls,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const Ps="_video-grid_14t5i_9",tl="_limit-two-lines_14t5i_19",Ns="_internal-testing_14t5i_43",Jv="_limit-one-line_14t5i_50",nl="_narrow-mode_14t5i_71",A1={videoGrid:Ps,limitTwoLines:tl,internalTesting:Ns,limitOneLine:Jv,narrowMode:nl};function Zv({enabled:e,refresh:t,minIndex:n=0,maxIndex:r,containerRef:i,getScrollerRect:s,changeScrollY:o,videoCardRefs:a}){const[c,l]=p.useState(null),f=ee(()=>{var _;if(!e)return!1;const S=(((_=document.activeElement)==null?void 0:_.tagName)||"").toLowerCase();return!(["input","textarea"].includes(S)||document.querySelector(".center-search__bar.is-focus"))}),d=ee(()=>{var k;if(c===null||!i.current)return!1;const S=s(),_=(k=i.current.querySelector(`.${en.card}.${en.cardActive}`))==null?void 0:k.getBoundingClientRect();return!(!S||!_||_.top-S.top<-(S.height+_.height)||_.top-S.top>S.height*2+_.height)}),h=S=>_=>{if(!f())return;_==null||_.preventDefault();const k=d()?c+S:v();if(kr){x(r);return}l(k),x(k)};be("leftarrow",h(-1)),be("rightarrow",h(1)),be("uparrow",h(-F())),be("downarrow",h(F()));const y=()=>{f()&&l(null)};be("esc",y),be("enter",()=>{!f()||typeof c!="number"||D(c)}),be("backspace",()=>{var S;!f()||typeof c!="number"||(S=a[c])==null||S.onTriggerDislike()}),be("r",()=>{f()&&t()},{exactMatch:!0}),be("s",()=>{var S;!f()||typeof c!="number"||(S=a[c])==null||S.onToggleWatchLater()},{exactMatch:!0});function v(){const S=s();if(!S)return 0;const _=w();for(let k=0;k<_.length;k++)if(_[k].getBoundingClientRect().top>=S.top)return k;return 0}const g=`.${en.card}`;function w(){var S;return[...((S=i.current)==null?void 0:S.querySelectorAll(g))||[]]}function b(S){return w()[S]}function x(S){var A;const _=b(S);(A=_==null?void 0:_.scrollIntoViewIfNeeded)==null||A.call(_,!1);const k=s(),B=_.getBoundingClientRect();if(!(!k||!B)){if(B.top<=k.top){const O=-(k.top-B.top+10);o==null||o({offset:O});return}if(k.bottom-B.bottom<10){const O=10-(k.bottom-B.bottom);o==null||o({offset:O});return}}}function D(S){const _=b(S);if(!_)return;const k=_.querySelector(".bili-video-card__wrap > a");k==null||k.click()}function F(){if(_e.useNarrowMode)return 2;let S=rl.get(window.innerWidth);if(S)return S;const _=i.current;if(!_)return 0;const k=window.getComputedStyle(_);return k.display!=="grid"?0:(S=k.gridTemplateColumns.split(" ").length,rl.set(window.innerWidth,S),S)}return{activeIndex:c,clearActiveIndex:y}}const rl=new Map,en={loader:ns` text-align: center; line-height: 60px; font-size: 120%; `,card:ns` border: 2px solid transparent; /* global class under .card */ .bili-video-card__info { padding-left: 2px; padding-bottom: 1px; margin-top: calc(var(--info-margin-top) - 1px); } `,cardActive:ns` border-color: #fb7299; border-radius: 6px; overflow: hidden; `},il=p.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:n,className:r,scrollerRef:i},s)=>{const[o,a]=p.useState([]),[c,l]=p.useState(!1);p.useImperativeHandle(s,()=>({refresh:d}),[]);const f=p.useMemo(()=>({page:1}),[]),d=ee(async()=>{await(n==null?void 0:n());try{D(),l(!0),f.page=1,a(await Qc(2,f)),D()}finally{l(!1)}}),h=ee(async()=>{const S=await Qc(2,f);a(_=>[..._,...S])}),{useNarrowMode:y}=gt(),v=p.useRef(null),g=ee(()=>{var S;if(e){const _=Va+50;return new DOMRect(0,_,window.innerWidth,window.innerHeight-_)}else return(S=i==null?void 0:i.current)==null?void 0:S.getBoundingClientRect()}),w=sv(),b=p.useMemo(()=>new Array(o.length).fill(void 0),[o.length]),{activeIndex:x,clearActiveIndex:D}=Zv({enabled:t&&!w,refresh:d,maxIndex:o.length-1,containerRef:v,getScrollerRect:g,videoCardRefs:b,changeScrollY:e?function({offset:S,absolute:_}){const k=document.documentElement;if(typeof S=="number"){k.scrollTop+=S;return}if(typeof _=="number"){k.scrollTop=_;return}}:void 0}),F=xn();return m(Ls,{pageStart:0,loadMore:h,hasMore:!0,useWindow:e,threshold:window.innerHeight,style:{minHeight:"100%"},loader:m("div",{className:en.loader,children:"加载中..."},0),children:m("div",{ref:v,className:re(Ps,{[Ns]:F},{[nl]:y},r),children:o.map((S,_)=>{const k=_===x;return m(vs,{ref:B=>b[_]=B,className:re(en.card,{[en.cardActive]:k}),loading:c,item:S,active:k},S.uniqId)})})})});function Ds(){const e=p.useRef(null),{accessKey:t}=gt(),n=gc(Uy,{manual:!0}),r=ee(async()=>{var a;await n.runAsync()&&((a=e.current)==null||a.set(!1))}),i=Gy,s=m("a",{className:"primary-btn roll-btn",target:"_blank",href:"https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E",children:"access_key 说明"});return m(pt,{children:t?R(pt,{children:[s,m("button",{className:"primary-btn roll-btn",onClick:()=>r(),disabled:n.loading,children:m("span",{children:"重新获取 access_key"})}),m("button",{className:"primary-btn roll-btn",onClick:i,children:m("span",{children:"删除 access_key"})})]}):R(pt,{children:[s,m("button",{className:"primary-btn roll-btn",onClick:r,disabled:n.loading,children:m("span",{children:"获取 access_key"})})]})})}const Is={container:{name:"8irbms",styles:"display:inline-flex;align-items:center"},checkbox:{name:"4l4ubo",styles:"cursor:pointer;outline:none"},label:{name:"side0b",styles:"margin-left:2px;user-select:none;cursor:pointer"}};function sl({className:e,label:t,checked:n,onChange:r}){const i=p.useCallback(o=>{const a=o.target.checked;r(a)},[r]),s=p.useId();return R("span",{css:Is.container,className:e,children:[m("input",{type:"checkbox",id:s,checked:n,onChange:i,css:Is.checkbox}),m("label",{htmlFor:s,css:Is.label,children:t})]})}function tn({configKey:e,label:t,className:n}){const i=!!gt()[e],s=p.useCallback(o=>{za({[e]:o}),o&&e==="initialShowMore"&&Ae("已开启自动查看更多: 下次打开首页时将直接展示推荐弹框")},[]);return m(sl,{className:n,label:t||e,checked:i,onChange:s})}var Qv={name:"1qkltea",styles:"margin-left:5px"};const qv=function(){const e=Qv;return R(pt,{children:[m(tn,{configKey:"initialShowMore",label:"自动查看更多",css:e}),m(tn,{configKey:"useNarrowMode",label:"启用居中模式(居中两列)",css:e})]})},te={configIcon:"_config-icon_1onav_1",settingsGroup:"_settings-group_1onav_6",settingsGroupTitle:"_settings-group-title_1onav_9",settingsGroupContent:"_settings-group-content_1onav_12",row:"_row_1onav_18",check:"_check_1onav_26"};async function ol(){Ae("即将刷新网页"),await $t(500),location.reload()}function eb(){if(window.confirm("确定?"))return hg(),ol()}function tb({show:e,onHide:t}){const{pureRecommend:n,usePcDesktopApi:r}=gt();return R(fs,{show:e,onHide:t,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[R("div",{className:Ie.modalHeader,children:[R("div",{className:Ie.modalTitle,children:[m(Tt,{name:"Config",className:te.configIcon}),"设置项"]}),m("div",{className:"space",style:{flex:1}}),m(ds,{onClick:t})]}),R("main",{className:Ie.modalBody,children:[R("div",{className:te.settingsGroup,children:[m("div",{className:te.settingsGroupTitle,children:"接口切换"}),R("div",{className:re(te.settingsGroupContent),children:[m(tn,{configKey:"usePcDesktopApi",label:"使用桌面端接口(默认使用 App 端接口)",className:te.check}),!r&&m("div",{className:te.row,children:m(Ds,{})})]})]}),R("div",{className:te.settingsGroup,children:[m("div",{className:te.settingsGroupTitle,children:"开关"}),R("div",{className:re(te.settingsGroupContent,te.row),children:[m(sl,{label:"开启纯推荐模式",checked:n,className:te.check,onChange:i=>(_e.pureRecommend=i,ol())}),m(tn,{configKey:"initialShowMore",label:"自动查看更多",className:te.check}),m(tn,{configKey:"useNarrowMode",label:"启用居中模式(居中两列)",className:te.check})]})]}),R("div",{className:te.settingsGroup,children:[m("div",{className:te.settingsGroupTitle,children:"高级"}),R("div",{className:re(te.settingsGroupContent),children:[m("div",{className:te.row,children:m("button",{className:"primary-btn roll-btn",style:{display:"inline-flex"},onClick:eb,children:m("span",{children:"恢复默认设置"})})}),m("div",{className:te.row,style:{marginTop:10},children:m(tn,{configKey:"openInIINAWhenRightClick",label:"右键在 IINA 中打开",className:te.check})})]})]}),R("div",{className:te.settingsGroup,children:[m("div",{className:te.settingsGroupTitle,children:"帮助"}),m("div",{className:re(te.settingsGroupContent),children:R("div",{className:te.row,children:[m("a",{className:"primary-btn roll-btn",href:"https://github.com/magicdawn/bilibili-app-recommend#%E5%BF%AB%E6%8D%B7%E9%94%AE%E8%AF%B4%E6%98%8E",target:"_blank",children:"快捷键使用说明"}),m("a",{className:"primary-btn roll-btn",target:"_blank",href:"https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E",children:"access_key 说明"})]})})]})]})]})}var js={};Object.defineProperty(js,"__esModule",{value:!0});var al=js.useSticky=void 0;const Fs=p;function nb(){const e=(0,Fs.useRef)(null),[t,n]=(0,Fs.useState)(!1);return(0,Fs.useEffect)(()=>{function r(){if(!e.current)return;const i=e.current.getBoundingClientRect().top,s=parseInt(getComputedStyle(e.current).top),o=i<=s;o&&!t?n(!0):!o&&t&&n(!1)}return r(),document.addEventListener("scroll",r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{document.removeEventListener("scroll",r),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[t]),[e,t]}al=js.useSticky=nb;const cl={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},ll=p.forwardRef(function({children:t},n){const[r,i]=yc(!1);p.useImperativeHandle(n,()=>i,[i]);const s=m("button",{className:re("primary-btn",cl.expandBtn),onClick:i.toggle,children:m("svg",{className:re({[cl.expanded]:r}),children:m("use",{xlinkHref:"#widget-arrow"})})});return R(pt,{children:[s,r&&t]})}),Gn={modalMask:"_modal-mask_1as61_1",narrowMode:"_narrow-mode_1as61_1",modal:"_modal_1as61_1",modalHeader:"_modal-header_1as61_21",modalBody:"_modal-body_1as61_22",btnRefresh:"_btn-refresh_1as61_25"},rb=p.memo(function({show:t,onHide:n}){const r=p.useRef(null),i=p.useRef(null),{useNarrowMode:s}=gt(),o=p.useMemo(()=>({[Gn.narrowMode]:s}),[s]),a=ee(()=>{var l;return(l=i.current)==null?void 0:l.refresh()}),c=ee(()=>{r.current&&(r.current.scrollTop=0)});return R(fs,{show:t,onHide:n,clsModalMask:re(o),clsModal:re(Gn.modal,o),children:[R("div",{className:re(Ie.modalHeader,Gn.modalHeader),children:[m("div",{className:Ie.modalTitle,children:"推荐"}),m("div",{className:"space",style:{flex:1}}),m(ll,{children:m(qv,{})}),R("button",{className:`primary-btn roll-btn ${Gn.btnRefresh}`,onClick:a,children:[m("svg",{children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"换一换"})]}),m(ds,{onClick:n})]}),m("div",{className:re(Ie.modalBody,Gn.modalBody),ref:r,children:m(il,{ref:i,shortcutEnabled:t,onScrollToTop:c,infiteScrollUseWindow:!1,scrollerRef:r})})]})}),ul={btn:Vt` padding: 0; width: 31px; height: 31px; border-radius: 50%; `,icon:Vt` svg { width: 14px; height: 14px; } `},nn=Tn({modalFeedVisible:_e.initialShowMore,modalConfigVisible:!1}),ib=function(){return Gt(nn)},sb=()=>{nn.modalFeedVisible=!0},ob=()=>{nn.modalFeedVisible=!1},ab=()=>{nn.modalConfigVisible=!0},cb=()=>{nn.modalConfigVisible=!1};function fl({onRefresh:e}){const{accessKey:t,pureRecommend:n,usePcDesktopApi:r}=gt(),i=p.useRef(null),{modalFeedVisible:s,modalConfigVisible:o}=Gt(nn),[a,c]=al();return R(pt,{children:[R("div",{ref:a,className:"area-header",css:[Vt` margin-bottom: 0; height: 50px; `,n&&Vt` position: sticky; top: ${Va}px; z-index: 1000; `,n&&c&&Vt` background-color: var(--bg1_float); box-shadow: 0 2px 4px rgb(0 0 0 / 8%); `,"",""],children:[R("div",{className:"left",children:[m("a",{id:"影视",className:"the-world area-anchor","data-id":"25"}),m("svg",{className:"icon",children:m("use",{xlinkHref:"#channel-cinephile"})}),m("a",{className:"title",href:"#",children:m("span",{children:"推荐"})})]}),R("div",{className:"right",children:[!r&&(t?m(ll,{ref:i,children:m(Ds,{})}):m(Ds,{})),m("button",{className:"primary-btn",css:ul.btn,onClick:ab,children:m(Tt,{name:"Config",css:ul.icon})}),R("button",{className:"primary-btn roll-btn",onClick:e,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"换一换"})]}),!n&&R("button",{className:"primary-btn see-more",onClick:sb,children:[m("span",{children:"查看更多"}),m("svg",{children:m("use",{xlinkHref:"#widget-arrow"})})]})]})]}),m(rb,{show:s,onHide:ob}),m(tb,{show:o,onHide:cb})]})}const lb={grid:Vt` /* card=299 col-gap=20 */ width: ${299*2+20}px; margin: 0 auto; `};function ub(){const{useNarrowMode:e}=gt(),{modalFeedVisible:t}=ib(),n=p.useRef(null),r=ee(()=>{var s;return(s=n.current)==null?void 0:s.refresh()}),i=ee(()=>{document.documentElement.scrollTop=0});return R("section",{"data-area":"推荐",children:[m(fl,{onRefresh:r}),m(il,{ref:n,css:[e&&lb.grid,"",""],shortcutEnabled:!t,infiteScrollUseWindow:!0,onScrollToTop:i})]})}function fb(){const e=p.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),t=xn(),n=p.useMemo(()=>({page:1}),[]),{data:r,loading:i,error:s,refresh:o}=gc(()=>Gv(n));return s&&console.error(s.stack||s),R("section",{"data-area":"推荐",children:[m(fl,{onRefresh:o}),m("div",{className:re(Ps,tl,{[Ns]:t}),style:{marginBottom:t?30:0},children:i||s?e.map(a=>m(vs,{},a)):r.map(a=>m(vs,{item:a},a.uniqId))})]})}const db=10*1e3,hb=200;async function dl(e,t){let n=[];const r=()=>{n=Array.from(document.querySelectorAll(e))};r();const i=performance.now();for(;!n.length&&performance.now()-it.remove())}(function(){var t;if(location.href.startsWith("https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?"))return window.stop(),(t=window.top)==null?void 0:t.postMessage(location.href,"https://www.bilibili.com");if(location.pathname==="/")return pb()})();async function pb(){return Ws(".adblock-tips"),dl("html.gray",e=>e.classList.remove("gray")),_e.pureRecommend?gb():mb()}async function mb(){const t=Date.now()+1e4;let n=null;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){const s=document.querySelector(".bili-layout > section.bili-grid");n=o=>s==null?void 0:s.insertAdjacentElement("afterend",o);break}if(xn()&&document.querySelector(".bili-feed4-layout")){n=s=>{var o;return(o=document.querySelector(".bili-feed4-layout"))==null?void 0:o.insertAdjacentElement("afterbegin",s)};break}if(Date.now()>t)break;await $t(200)}if(!n){console.error("[bilibili-app-recommend]: init fail");return}const r=document.createElement("section");n(r),Tr(r).render(m(fb,{}))}async function gb(){var i,s;xn()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),Ws(".bili-feed4 .header-channel")):((s=document.querySelector(".bili-layout"))==null||s.remove(),Ws(".bili-footer"));const e=document.createElement("div");e.classList.add(xn()?"bili-feed4-layout":"bili-layout","pure-recommend");const t=document.querySelector(".bili-header");t==null||t.insertAdjacentElement("afterend",e);const n=document.createElement("section");e==null||e.appendChild(n),Tr(n).render(m(ub,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);