bilibili-app-recommend

为B站首页添加像App一样的推荐

当前为 2022-11-12 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.5.1
// @author       magicdawn
// @description  为B站首页添加像App一样的推荐
// @license      MIT
// @homepageURL  https://github.com/magicdawn/bilibili-app-recommend
// @supportURL   https://github.com/magicdawn/bilibili-app-recommend/issues
// @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/[email protected]/dist/axios.min.js
// @require      https://unpkg.com/[email protected]/dist/axiosGmxhrAdapter.min.js
// @require      https://unpkg.com/[email protected]/umd/react.production.min.js
// @require      https://unpkg.com/[email protected]/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
// @grant        GM_xmlhttpRequest
// @grant        unsafeWindow
// ==/UserScript==

(o=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=o,document.head.appendChild(e)})(`._toast-container_9119l_1{position:fixed;top:50%;left:50%;z-index:999999;padding:12px 24px;font-size:14px;width:240px;margin-left:-120px;background:#ffb243;color:#fff;border-radius:6px}._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_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._bili-video-card_1a93a_1{position:relative}._image-wrapper_1a93a_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_1a93a_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_1a93a_8 ._preview-card-inner_1a93a_21{width:100%;height:100%}._watch-later_1a93a_25{z-index:3}._badge_1a93a_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_1a93a_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_1a93a_51{color:default}._btn-dislike_1a93a_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_1a93a_54 ._btn-dislike-icon_1a93a_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_1a93a_54 ._btn-dislike-tip_1a93a_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_1a93a_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_1a93a_91{border:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-icon_1a93a_122{margin-bottom:5px}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-reason_1a93a_125{font-size:20px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-desc_1a93a_129{font-size:16px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{border-top:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._modal-mask_1urmj_1{position:fixed;left:0;top:0;right:0;bottom:0;z-index:11000;background-color:#00000080;display:flex;align-items:center;justify-content:center}._modal-mask_1urmj_1._narrow-mode_1urmj_13{background-color:#000000e6}._modal_1urmj_1{width:calc(100vw - 30px);height:calc(100vh - 30px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 0 15px 15px;display:flex;flex-direction:column}body.dark ._modal_1urmj_1{border:1px solid #fb7299}._modal_1urmj_1._narrow-mode_1urmj_13{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1urmj_1._narrow-mode_1urmj_13{border:none}._modal_1urmj_1 ._modal-header_1urmj_38{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_1urmj_1 ._modal-header_1urmj_38 ._modal-title_1urmj_46{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-refresh_1urmj_51,body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{margin-left:10px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52 svg{width:10px;height:10px}._modal_1urmj_1 ._modal-body_1urmj_68{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px}._list_1urmj_74{color:inherit}._card_1urmj_77{border:2px solid transparent}._card_1urmj_77 .bili-video-card__info{padding-left:2px;padding-bottom:1px;margin-top:calc(var(--info-margin-top) - 1px)}._card_1urmj_77._active_1urmj_85{border-color:#fb7299;border-radius:6px;overflow:hidden}._video-card-list_1urmj_90{display:block!important}#_video-card-body_1urmj_1>*{display:block!important}#_video-card-body_1urmj_1._narrow-mode_1urmj_13{grid-template-columns:repeat(2,1fr)}._loader_1urmj_99{text-align:center;line-height:60px;font-size:120%}._checkbox_1urmj_104{margin-left:5px;margin-top:1px;cursor:pointer;outline:none}._checkbox_1urmj_104+label{margin-left:2px;user-select:none;cursor:pointer}._grid_svuzk_1{color:default;margin-bottom:20px}@media (min-width: 2200px){._video-card-list_svuzk_6.is-full{grid-column:span 7!important}._video-card-list_svuzk_6.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_svuzk_6.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_svuzk_6.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_svuzk_20{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_svuzk_20 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_svuzk_20 svg._expanded_svuzk_31{transform:rotate(0)}.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}
`);

var xh=Object.defineProperty;var Ah=(v,J,pe)=>J in v?xh(v,J,{enumerable:!0,configurable:!0,writable:!0,value:pe}):v[J]=pe;var Sn=(v,J,pe)=>(Ah(v,typeof J!="symbol"?J+"":J,pe),pe);(function(v,J,pe,Ss){"use strict";const $e=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Be=$e(v),Ts=$e(J),ft=$e(pe),Cs=$e(Ss);var xs=typeof global=="object"&&global&&global.Object===Object&&global;const Tn=xs;var As=typeof self=="object"&&self&&self.Object===Object&&self,Os=Tn||As||Function("return this")();const Z=Os;var Es=Z.Symbol;const Q=Es;var Cn=Object.prototype,ks=Cn.hasOwnProperty,Ps=Cn.toString,Ee=Q?Q.toStringTag:void 0;function Ms(e){var t=ks.call(e,Ee),n=e[Ee];try{e[Ee]=void 0;var r=!0}catch{}var i=Ps.call(e);return r&&(t?e[Ee]=n:delete e[Ee]),i}var Ls=Object.prototype,Rs=Ls.toString;function Ds(e){return Rs.call(e)}var Ns="[object Null]",Fs="[object Undefined]",xn=Q?Q.toStringTag:void 0;function Se(e){return e==null?e===void 0?Fs:Ns:xn&&xn in Object(e)?Ms(e):Ds(e)}function Te(e){return e!=null&&typeof e=="object"}var js="[object Symbol]";function We(e){return typeof e=="symbol"||Te(e)&&Se(e)==js}function Is(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var zs=Array.isArray;const re=zs;var $s=1/0,An=Q?Q.prototype:void 0,On=An?An.toString:void 0;function dt(e){if(typeof e=="string")return e;if(re(e))return Is(e,dt)+"";if(We(e))return On?On.call(e):"";var t=e+"";return t=="0"&&1/e==-$s?"-0":t}var Bs=/\s/;function Ws(e){for(var t=e.length;t--&&Bs.test(e.charAt(t)););return t}var Hs=/^\s+/;function Us(e){return e&&e.slice(0,Ws(e)+1).replace(Hs,"")}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var En=0/0,Ys=/^[-+]0x[0-9a-f]+$/i,Gs=/^0b[01]+$/i,Ks=/^0o[0-7]+$/i,Xs=parseInt;function ht(e){if(typeof e=="number")return e;if(We(e))return En;if(ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Us(e);var n=Gs.test(e);return n||Ks.test(e)?Xs(e.slice(2),n?2:8):Ys.test(e)?En:+e}var kn=1/0,Vs=17976931348623157e292;function Js(e){if(!e)return e===0?e:0;if(e=ht(e),e===kn||e===-kn){var t=e<0?-1:1;return t*Vs}return e===e?e:0}function Zs(e){var t=Js(e),n=t%1;return t===t?n?t-n:t:0}function Qs(e){return e}var qs="[object AsyncFunction]",eo="[object Function]",to="[object GeneratorFunction]",no="[object Proxy]";function Pn(e){if(!ce(e))return!1;var t=Se(e);return t==eo||t==to||t==qs||t==no}var ro=Z["__core-js_shared__"];const pt=ro;var Mn=function(){var e=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function io(e){return!!Mn&&Mn in e}var so=Function.prototype,oo=so.toString;function ge(e){if(e!=null){try{return oo.call(e)}catch{}try{return e+""}catch{}}return""}var ao=/[\\^$.*+?()[\]{}|]/g,lo=/^\[object .+?Constructor\]$/,co=Function.prototype,uo=Object.prototype,fo=co.toString,ho=uo.hasOwnProperty,po=RegExp("^"+fo.call(ho).replace(ao,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function go(e){if(!ce(e)||io(e))return!1;var t=Pn(e)?po:lo;return t.test(ge(e))}function vo(e,t){return e==null?void 0:e[t]}function ve(e,t){var n=vo(e,t);return go(n)?n:void 0}var mo=ve(Z,"WeakMap");const gt=mo;function yo(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var bo=800,_o=16,wo=Date.now;function So(e){var t=0,n=0;return function(){var r=wo(),i=_o-(r-n);if(n=r,i>0){if(++t>=bo)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function To(e){return function(){return e}}var Co=function(){try{var e=ve(Object,"defineProperty");return e({},"",{}),e}catch{}}();const He=Co;var xo=He?function(e,t){return He(e,"toString",{configurable:!0,enumerable:!1,value:To(t),writable:!0})}:Qs,Ao=So(xo);const Oo=Ao;var Eo=9007199254740991,ko=/^(?:0|[1-9]\d*)$/;function vt(e,t){var n=typeof e;return t=t==null?Eo:t,!!t&&(n=="number"||n!="symbol"&&ko.test(e))&&e>-1&&e%1==0&&e<t}function Po(e,t,n){t=="__proto__"&&He?He(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function mt(e,t){return e===t||e!==e&&t!==t}var Mo=Object.prototype,Lo=Mo.hasOwnProperty;function Ro(e,t,n){var r=e[t];(!(Lo.call(e,t)&&mt(r,n))||n===void 0&&!(t in e))&&Po(e,t,n)}var Ln=Math.max;function Do(e,t,n){return t=Ln(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Ln(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(o),yo(e,this,l)}}var No=9007199254740991;function yt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=No}function Fo(e){return e!=null&&yt(e.length)&&!Pn(e)}var jo=Object.prototype;function Io(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jo;return e===n}function zo(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var $o="[object Arguments]";function Rn(e){return Te(e)&&Se(e)==$o}var Dn=Object.prototype,Bo=Dn.hasOwnProperty,Wo=Dn.propertyIsEnumerable,Ho=Rn(function(){return arguments}())?Rn:function(e){return Te(e)&&Bo.call(e,"callee")&&!Wo.call(e,"callee")};const bt=Ho;function Uo(){return!1}var Nn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fn=Nn&&typeof module=="object"&&module&&!module.nodeType&&module,Yo=Fn&&Fn.exports===Nn,jn=Yo?Z.Buffer:void 0,Go=jn?jn.isBuffer:void 0,Ko=Go||Uo;const _t=Ko;var Xo="[object Arguments]",Vo="[object Array]",Jo="[object Boolean]",Zo="[object Date]",Qo="[object Error]",qo="[object Function]",ea="[object Map]",ta="[object Number]",na="[object Object]",ra="[object RegExp]",ia="[object Set]",sa="[object String]",oa="[object WeakMap]",aa="[object ArrayBuffer]",la="[object DataView]",ca="[object Float32Array]",ua="[object Float64Array]",fa="[object Int8Array]",da="[object Int16Array]",ha="[object Int32Array]",pa="[object Uint8Array]",ga="[object Uint8ClampedArray]",va="[object Uint16Array]",ma="[object Uint32Array]",I={};I[ca]=I[ua]=I[fa]=I[da]=I[ha]=I[pa]=I[ga]=I[va]=I[ma]=!0,I[Xo]=I[Vo]=I[aa]=I[Jo]=I[la]=I[Zo]=I[Qo]=I[qo]=I[ea]=I[ta]=I[na]=I[ra]=I[ia]=I[sa]=I[oa]=!1;function ya(e){return Te(e)&&yt(e.length)&&!!I[Se(e)]}function ba(e){return function(t){return e(t)}}var In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ke=In&&typeof module=="object"&&module&&!module.nodeType&&module,_a=ke&&ke.exports===In,wt=_a&&Tn.process,wa=function(){try{var e=ke&&ke.require&&ke.require("util").types;return e||wt&&wt.binding&&wt.binding("util")}catch{}}();const zn=wa;var $n=zn&&zn.isTypedArray,Sa=$n?ba($n):ya;const Bn=Sa;var Ta=Object.prototype,Ca=Ta.hasOwnProperty;function xa(e,t){var n=re(e),r=!n&&bt(e),i=!n&&!r&&_t(e),s=!n&&!r&&!i&&Bn(e),o=n||r||i||s,l=o?zo(e.length,String):[],c=l.length;for(var a in e)(t||Ca.call(e,a))&&!(o&&(a=="length"||i&&(a=="offset"||a=="parent")||s&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||vt(a,c)))&&l.push(a);return l}function Aa(e,t){return function(n){return e(t(n))}}var Oa=Aa(Object.keys,Object);const Ea=Oa;var ka=Object.prototype,Pa=ka.hasOwnProperty;function Ma(e){if(!Io(e))return Ea(e);var t=[];for(var n in Object(e))Pa.call(e,n)&&n!="constructor"&&t.push(n);return t}function La(e){return Fo(e)?xa(e):Ma(e)}var Ra=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Da=/^\w*$/;function Na(e,t){if(re(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||We(e)?!0:Da.test(e)||!Ra.test(e)||t!=null&&e in Object(t)}var Fa=ve(Object,"create");const Pe=Fa;function ja(){this.__data__=Pe?Pe(null):{},this.size=0}function Ia(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var za="__lodash_hash_undefined__",$a=Object.prototype,Ba=$a.hasOwnProperty;function Wa(e){var t=this.__data__;if(Pe){var n=t[e];return n===za?void 0:n}return Ba.call(t,e)?t[e]:void 0}var Ha=Object.prototype,Ua=Ha.hasOwnProperty;function Ya(e){var t=this.__data__;return Pe?t[e]!==void 0:Ua.call(t,e)}var Ga="__lodash_hash_undefined__";function Ka(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pe&&t===void 0?Ga:t,this}function me(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}me.prototype.clear=ja,me.prototype.delete=Ia,me.prototype.get=Wa,me.prototype.has=Ya,me.prototype.set=Ka;function Xa(){this.__data__=[],this.size=0}function Ue(e,t){for(var n=e.length;n--;)if(mt(e[n][0],t))return n;return-1}var Va=Array.prototype,Ja=Va.splice;function Za(e){var t=this.__data__,n=Ue(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ja.call(t,n,1),--this.size,!0}function Qa(e){var t=this.__data__,n=Ue(t,e);return n<0?void 0:t[n][1]}function qa(e){return Ue(this.__data__,e)>-1}function el(e,t){var n=this.__data__,r=Ue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ie(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ie.prototype.clear=Xa,ie.prototype.delete=Za,ie.prototype.get=Qa,ie.prototype.has=qa,ie.prototype.set=el;var tl=ve(Z,"Map");const Me=tl;function nl(){this.size=0,this.__data__={hash:new me,map:new(Me||ie),string:new me}}function rl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ye(e,t){var n=e.__data__;return rl(t)?n[typeof t=="string"?"string":"hash"]:n.map}function il(e){var t=Ye(this,e).delete(e);return this.size-=t?1:0,t}function sl(e){return Ye(this,e).get(e)}function ol(e){return Ye(this,e).has(e)}function al(e,t){var n=Ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function se(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}se.prototype.clear=nl,se.prototype.delete=il,se.prototype.get=sl,se.prototype.has=ol,se.prototype.set=al;var ll="Expected a function";function St(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ll);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(St.Cache||se),n}St.Cache=se;var cl=500;function ul(e){var t=St(e,function(r){return n.size===cl&&n.clear(),r}),n=t.cache;return t}var fl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dl=/\\(\\)?/g,hl=ul(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fl,function(n,r,i,s){t.push(i?s.replace(dl,"$1"):r||n)}),t});const pl=hl;function Wn(e){return e==null?"":dt(e)}function Ge(e,t){return re(e)?e:Na(e,t)?[e]:pl(Wn(e))}var gl=1/0;function Tt(e){if(typeof e=="string"||We(e))return e;var t=e+"";return t=="0"&&1/e==-gl?"-0":t}function vl(e,t){t=Ge(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Tt(t[n++])];return n&&n==r?e:void 0}function Hn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Un=Q?Q.isConcatSpreadable:void 0;function ml(e){return re(e)||bt(e)||!!(Un&&e&&e[Un])}function Yn(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=ml),i||(i=[]);++s<o;){var l=e[s];t>0&&n(l)?t>1?Yn(l,t-1,n,r,i):Hn(i,l):r||(i[i.length]=l)}return i}function yl(e){var t=e==null?0:e.length;return t?Yn(e,1):[]}function bl(e){return Oo(Do(e,void 0,yl),e+"")}function _l(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<i;)s[r]=e[r+t];return s}function wl(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:_l(e,t,n)}var Sl="\\ud800-\\udfff",Tl="\\u0300-\\u036f",Cl="\\ufe20-\\ufe2f",xl="\\u20d0-\\u20ff",Al=Tl+Cl+xl,Ol="\\ufe0e\\ufe0f",El="\\u200d",kl=RegExp("["+El+Sl+Al+Ol+"]");function Ct(e){return kl.test(e)}function Pl(e){return e.split("")}var Gn="\\ud800-\\udfff",Ml="\\u0300-\\u036f",Ll="\\ufe20-\\ufe2f",Rl="\\u20d0-\\u20ff",Dl=Ml+Ll+Rl,Nl="\\ufe0e\\ufe0f",Fl="["+Gn+"]",xt="["+Dl+"]",At="\\ud83c[\\udffb-\\udfff]",jl="(?:"+xt+"|"+At+")",Kn="[^"+Gn+"]",Xn="(?:\\ud83c[\\udde6-\\uddff]){2}",Vn="[\\ud800-\\udbff][\\udc00-\\udfff]",Il="\\u200d",Jn=jl+"?",Zn="["+Nl+"]?",zl="(?:"+Il+"(?:"+[Kn,Xn,Vn].join("|")+")"+Zn+Jn+")*",$l=Zn+Jn+zl,Bl="(?:"+[Kn+xt+"?",xt,Xn,Vn,Fl].join("|")+")",Wl=RegExp(At+"(?="+At+")|"+Bl+$l,"g");function Hl(e){return e.match(Wl)||[]}function Ul(e){return Ct(e)?Hl(e):Pl(e)}function Yl(){this.__data__=new ie,this.size=0}function Gl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Kl(e){return this.__data__.get(e)}function Xl(e){return this.__data__.has(e)}var Vl=200;function Jl(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!Me||r.length<Vl-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new se(r)}return n.set(e,t),this.size=n.size,this}function ue(e){var t=this.__data__=new ie(e);this.size=t.size}ue.prototype.clear=Yl,ue.prototype.delete=Gl,ue.prototype.get=Kl,ue.prototype.has=Xl,ue.prototype.set=Jl;function Zl(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Ql(){return[]}var ql=Object.prototype,ec=ql.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,tc=Qn?function(e){return e==null?[]:(e=Object(e),Zl(Qn(e),function(t){return ec.call(e,t)}))}:Ql;const nc=tc;function rc(e,t,n){var r=t(e);return re(e)?r:Hn(r,n(e))}function qn(e){return rc(e,La,nc)}var ic=ve(Z,"DataView");const Ot=ic;var sc=ve(Z,"Promise");const Et=sc;var oc=ve(Z,"Set");const kt=oc;var er="[object Map]",ac="[object Object]",tr="[object Promise]",nr="[object Set]",rr="[object WeakMap]",ir="[object DataView]",lc=ge(Ot),cc=ge(Me),uc=ge(Et),fc=ge(kt),dc=ge(gt),ye=Se;(Ot&&ye(new Ot(new ArrayBuffer(1)))!=ir||Me&&ye(new Me)!=er||Et&&ye(Et.resolve())!=tr||kt&&ye(new kt)!=nr||gt&&ye(new gt)!=rr)&&(ye=function(e){var t=Se(e),n=t==ac?e.constructor:void 0,r=n?ge(n):"";if(r)switch(r){case lc:return ir;case cc:return er;case uc:return tr;case fc:return nr;case dc:return rr}return t});const sr=ye;var hc=Z.Uint8Array;const or=hc;var pc="__lodash_hash_undefined__";function gc(e){return this.__data__.set(e,pc),this}function vc(e){return this.__data__.has(e)}function Ke(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new se;++t<n;)this.add(e[t])}Ke.prototype.add=Ke.prototype.push=gc,Ke.prototype.has=vc;function mc(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function yc(e,t){return e.has(t)}var bc=1,_c=2;function ar(e,t,n,r,i,s){var o=n&bc,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var a=s.get(e),u=s.get(t);if(a&&u)return a==t&&u==e;var f=-1,p=!0,g=n&_c?new Ke:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var d=e[f],y=t[f];if(r)var m=o?r(y,d,f,t,e,s):r(d,y,f,e,t,s);if(m!==void 0){if(m)continue;p=!1;break}if(g){if(!mc(t,function(T,D){if(!yc(g,D)&&(d===T||i(d,T,n,r,s)))return g.push(D)})){p=!1;break}}else if(!(d===y||i(d,y,n,r,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function wc(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Sc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Tc=1,Cc=2,xc="[object Boolean]",Ac="[object Date]",Oc="[object Error]",Ec="[object Map]",kc="[object Number]",Pc="[object RegExp]",Mc="[object Set]",Lc="[object String]",Rc="[object Symbol]",Dc="[object ArrayBuffer]",Nc="[object DataView]",lr=Q?Q.prototype:void 0,Pt=lr?lr.valueOf:void 0;function Fc(e,t,n,r,i,s,o){switch(n){case Nc:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Dc:return!(e.byteLength!=t.byteLength||!s(new or(e),new or(t)));case xc:case Ac:case kc:return mt(+e,+t);case Oc:return e.name==t.name&&e.message==t.message;case Pc:case Lc:return e==t+"";case Ec:var l=wc;case Mc:var c=r&Tc;if(l||(l=Sc),e.size!=t.size&&!c)return!1;var a=o.get(e);if(a)return a==t;r|=Cc,o.set(e,t);var u=ar(l(e),l(t),r,i,s,o);return o.delete(e),u;case Rc:if(Pt)return Pt.call(e)==Pt.call(t)}return!1}var jc=1,Ic=Object.prototype,zc=Ic.hasOwnProperty;function $c(e,t,n,r,i,s){var o=n&jc,l=qn(e),c=l.length,a=qn(t),u=a.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var p=l[f];if(!(o?p in t:zc.call(t,p)))return!1}var g=s.get(e),d=s.get(t);if(g&&d)return g==t&&d==e;var y=!0;s.set(e,t),s.set(t,e);for(var m=o;++f<c;){p=l[f];var T=e[p],D=t[p];if(r)var R=o?r(D,T,p,t,e,s):r(T,D,p,e,t,s);if(!(R===void 0?T===D||i(T,D,n,r,s):R)){y=!1;break}m||(m=p=="constructor")}if(y&&!m){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof w=="function"&&w instanceof w)&&(y=!1)}return s.delete(e),s.delete(t),y}var Bc=1,cr="[object Arguments]",ur="[object Array]",Xe="[object Object]",Wc=Object.prototype,fr=Wc.hasOwnProperty;function Hc(e,t,n,r,i,s){var o=re(e),l=re(t),c=o?ur:sr(e),a=l?ur:sr(t);c=c==cr?Xe:c,a=a==cr?Xe:a;var u=c==Xe,f=a==Xe,p=c==a;if(p&&_t(e)){if(!_t(t))return!1;o=!0,u=!1}if(p&&!u)return s||(s=new ue),o||Bn(e)?ar(e,t,n,r,i,s):Fc(e,t,c,n,r,i,s);if(!(n&Bc)){var g=u&&fr.call(e,"__wrapped__"),d=f&&fr.call(t,"__wrapped__");if(g||d){var y=g?e.value():e,m=d?t.value():t;return s||(s=new ue),i(y,m,n,r,s)}}return p?(s||(s=new ue),$c(e,t,n,r,i,s)):!1}function dr(e,t,n,r,i){return e===t?!0:e==null||t==null||!Te(e)&&!Te(t)?e!==e&&t!==t:Hc(e,t,n,r,dr,i)}function Uc(e,t){return e!=null&&t in Object(e)}function Yc(e,t,n){t=Ge(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=Tt(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&yt(i)&&vt(o,i)&&(re(e)||bt(e)))}function Gc(e,t){return e!=null&&Yc(e,t,Uc)}function Kc(e){return function(t){return t==null?void 0:t[e]}}var Xc=function(){return Z.Date.now()};const Mt=Xc;var Vc="Expected a function",Jc=Math.max,Zc=Math.min;function hr(e,t,n){var r,i,s,o,l,c,a=0,u=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Vc);t=ht(t)||0,ce(n)&&(u=!!n.leading,f="maxWait"in n,s=f?Jc(ht(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p);function g(b){var M=r,L=i;return r=i=void 0,a=b,o=e.apply(L,M),o}function d(b){return a=b,l=setTimeout(T,t),u?g(b):o}function y(b){var M=b-c,L=b-a,N=t-M;return f?Zc(N,s-L):N}function m(b){var M=b-c,L=b-a;return c===void 0||M>=t||M<0||f&&L>=s}function T(){var b=Mt();if(m(b))return D(b);l=setTimeout(T,y(b))}function D(b){return l=void 0,p&&r?g(b):(r=i=void 0,o)}function R(){l!==void 0&&clearTimeout(l),a=0,r=c=i=l=void 0}function x(){return l===void 0?o:D(Mt())}function w(){var b=Mt(),M=m(b);if(r=arguments,i=this,c=b,M){if(l===void 0)return d(c);if(f)return clearTimeout(l),l=setTimeout(T,t),g(c)}return l===void 0&&(l=setTimeout(T,t)),o}return w.cancel=R,w.flush=x,w}function Qc(e,t){return dr(e,t)}function qc(e,t,n,r){if(!ce(e))return e;t=Ge(t,e);for(var i=-1,s=t.length,o=s-1,l=e;l!=null&&++i<s;){var c=Tt(t[i]),a=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var u=l[c];a=r?r(u,c,l):void 0,a===void 0&&(a=ce(u)?u:vt(t[i+1])?[]:{})}Ro(l,c,a),l=l[c]}return e}function eu(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],l=vl(e,o);n(l,o)&&qc(s,Ge(o,e),l)}return s}var tu=9007199254740991,nu=Math.floor;function pr(e,t){var n="";if(!e||t<1||t>tu)return n;do t%2&&(n+=e),t=nu(t/2),t&&(e+=e);while(t);return n}var ru=Kc("length");const iu=ru;var gr="\\ud800-\\udfff",su="\\u0300-\\u036f",ou="\\ufe20-\\ufe2f",au="\\u20d0-\\u20ff",lu=su+ou+au,cu="\\ufe0e\\ufe0f",uu="["+gr+"]",Lt="["+lu+"]",Rt="\\ud83c[\\udffb-\\udfff]",fu="(?:"+Lt+"|"+Rt+")",vr="[^"+gr+"]",mr="(?:\\ud83c[\\udde6-\\uddff]){2}",yr="[\\ud800-\\udbff][\\udc00-\\udfff]",du="\\u200d",br=fu+"?",_r="["+cu+"]?",hu="(?:"+du+"(?:"+[vr,mr,yr].join("|")+")"+_r+br+")*",pu=_r+br+hu,gu="(?:"+[vr+Lt+"?",Lt,mr,yr,uu].join("|")+")",wr=RegExp(Rt+"(?="+Rt+")|"+gu+pu,"g");function vu(e){for(var t=wr.lastIndex=0;wr.test(e);)++t;return t}function Sr(e){return Ct(e)?vu(e):iu(e)}var mu=Math.ceil;function yu(e,t){t=t===void 0?" ":dt(t);var n=t.length;if(n<2)return n?pr(t,e):t;var r=pr(t,mu(e/Sr(t)));return Ct(t)?wl(Ul(r),0,e).join(""):r.slice(0,e)}function bu(e,t,n){e=Wn(e),t=Zs(t);var r=t?Sr(e):0;return t&&r<t?yu(t-r,n)+e:e}function _u(e,t){return eu(e,t,function(n,r){return Gc(e,r)})}var wu=bl(function(e,t){return e==null?{}:_u(e,t)});const Tr=wu;var Su="Expected a function";function Tu(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Su);return ce(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),hr(e,t,{leading:r,maxWait:t,trailing:i})}const Dt=Symbol(),Cu=Symbol(),Nt=Symbol();let xu=(e,t)=>new Proxy(e,t);const Ft=Object.getPrototypeOf,jt=new WeakMap,Cr=e=>e&&(jt.has(e)?jt.get(e):Ft(e)===Object.prototype||Ft(e)===Array.prototype),xr=e=>typeof e=="object"&&e!==null,Ar=new WeakMap,Or=e=>e[Nt]||e,Er=(e,t,n)=>{if(!Cr(e))return e;const r=Or(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(l=>!l.writable))(r);let s=n&&n.get(r);return s&&s[1].f===i||(s=((o,l)=>{const c={f:l};let a=!1;const u=(p,g)=>{if(!a){let d=c.a.get(o);d||(d=new Set,c.a.set(o,d)),g&&d.has(Dt)||d.add(p)}},f={get:(p,g)=>g===Nt?o:(u(g),Er(p[g],c.a,c.c)),has:(p,g)=>g===Cu?(a=!0,c.a.delete(o),!0):(u(g),g in p),getOwnPropertyDescriptor:(p,g)=>(u(g,!0),Object.getOwnPropertyDescriptor(p,g)),ownKeys:p=>(u(Dt),Reflect.ownKeys(p))};return l&&(f.set=f.deleteProperty=()=>!1),[f,c]})(r,i),s[1].p=xu(i?(o=>{let l=Ar.get(o);if(!l){if(Array.isArray(o))l=Array.from(o);else{const c=Object.getOwnPropertyDescriptors(o);Object.values(c).forEach(a=>{a.configurable=!0}),l=Object.create(Ft(o),c)}Ar.set(o,l)}return l})(r):r,s[0]),n&&n.set(r,s)),s[1].a=t,s[1].c=n,s[1].p},Au=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((i,s)=>i!==r[s])},kr=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!xr(e)||!xr(t))return!0;const i=n.get(Or(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;for(const o of i){const l=o===Dt?Au(e,t):kr(e[o],t[o],n,r);if(l!==!0&&l!==!1||(s=l),s)break}return s===null&&(s=!0),r&&r.set(e,{n:t,g:s}),s},Pr=e=>Cr(e)&&e[Nt]||null,Mr=(e,t=!0)=>{jt.set(e,t)};var Ou=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr={exports:{}},Rr={};/**
 * @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 Ce=Be.default;function ku(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pu=typeof Object.is=="function"?Object.is:ku,Mu=Ce.useState,Lu=Ce.useEffect,Ru=Ce.useLayoutEffect,Du=Ce.useDebugValue;function Nu(e,t){var n=t(),r=Mu({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Ru(function(){i.value=n,i.getSnapshot=t,It(i)&&s({inst:i})},[e,n,t]),Lu(function(){return It(i)&&s({inst:i}),e(function(){It(i)&&s({inst:i})})},[e]),Du(n),n}function It(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pu(e,n)}catch{return!0}}function Fu(e,t){return t()}var ju=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fu:Nu;Rr.useSyncExternalStore=Ce.useSyncExternalStore!==void 0?Ce.useSyncExternalStore:ju,function(e){e.exports=Rr}(Lr);const Iu=Eu(Lr.exports),zt=e=>typeof e=="object"&&e!==null,K=Symbol(),$t=new WeakSet,zu=(e=Object.is,t=(a,u)=>new Proxy(a,u),n=a=>zt(a)&&!$t.has(a)&&(Array.isArray(a)||!(Symbol.iterator in a))&&!(a instanceof WeakMap)&&!(a instanceof WeakSet)&&!(a instanceof Error)&&!(a instanceof Number)&&!(a instanceof Date)&&!(a instanceof String)&&!(a instanceof RegExp)&&!(a instanceof ArrayBuffer),r=a=>{switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:throw a}},i=new WeakMap,s=(a,u,f,p=r)=>{const g=i.get(u);if((g==null?void 0:g[0])===f)return g[1];const d=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a));return Mr(d,!0),i.set(u,[f,d]),Reflect.ownKeys(a).forEach(y=>{const m=Reflect.get(a,y,u);$t.has(m)?(Mr(m,!1),d[y]=m):m instanceof Promise?Object.defineProperty(d,y,{get(){return p(m)}}):m!=null&&m[K]?d[y]=Bt(m,p):d[y]=m}),Object.freeze(d)},o=new WeakMap,l=[1],c=a=>{if(!zt(a))throw new Error("object required");const u=o.get(a);if(u)return u;let f=l[0];const p=new Set,g=(x,w=++l[0])=>{f!==w&&(f=w,p.forEach(b=>b(x,w)))},d=new Map,y=x=>{let w=d.get(x);return w||(w=(b,M)=>{const L=[...b];L[1]=[x,...L[1]],g(L,M)},d.set(x,w)),w},m=x=>{const w=d.get(x);return d.delete(x),w},T=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a)),R=t(T,{get(x,w,b){return w===K?[x,b,f,s,p]:Reflect.get(x,w,b)},deleteProperty(x,w){var b;const M=Reflect.get(x,w),L=(b=M==null?void 0:M[K])==null?void 0:b[4];L&&L.delete(m(w));const N=Reflect.deleteProperty(x,w);return N&&g(["delete",[w],M]),N},set(x,w,b,M){var L,N;const F=Reflect.has(x,w),X=Reflect.get(x,w,M);if(F&&e(X,b))return!0;const ee=(L=X==null?void 0:X[K])==null?void 0:L[4];ee&&ee.delete(m(w)),zt(b)&&(b=Pr(b)||b);let A=b;return(N=Object.getOwnPropertyDescriptor(x,w))!=null&&N.set||(b instanceof Promise?b.then(S=>{b.status="fulfilled",b.value=S,g(["resolve",[w],S])}).catch(S=>{b.status="rejected",b.reason=S,g(["reject",[w],S])}):(!(b!=null&&b[K])&&n(b)&&(A=Ve(b)),A!=null&&A[K]&&A[K][4].add(y(w)))),Reflect.set(x,w,A,M),g(["set",[w],b,X]),!0}});return o.set(a,R),Reflect.ownKeys(a).forEach(x=>{const w=Object.getOwnPropertyDescriptor(a,x);w.get||w.set?Object.defineProperty(T,x,w):R[x]=a[x]}),R})=>[c,K,$t,e,t,n,r,i,s,o,l],[$u]=zu();function Ve(e={}){return $u(e)}function Dr(e,t,n){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[K])&&console.warn("Please use proxy object");let r;const i=[],s=e[K][4],o=l=>{if(i.push(l),n){t(i.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,s.has(o)&&t(i.splice(0))}))};return s.add(o),()=>s.delete(o)}function Bt(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[K])&&console.warn("Please use proxy object");const[n,r,i,s]=e[K];return s(n,r,i,t)}const{use:Nr}=Be.default,{useSyncExternalStore:Bu}=Iu,Wu=(e,t)=>{const n=[],r=new WeakSet,i=(s,o)=>{if(r.has(s))return;let l;typeof s=="object"&&s!==null&&(r.add(s),l=t.get(Pr(s)||s)),l?l.forEach(c=>{"value"in(Object.getOwnPropertyDescriptor(s,c)||{})&&i(s[c],o?[...o,c]:[c])}):o&&n.push(o)};return i(e),n},Hu=(e,t)=>{const n=v.useRef();v.useEffect(()=>{n.current=Wu(e,t)}),v.useDebugValue(n.current)};function Wt(e,t){const n=t==null?void 0:t.sync,r=v.useRef(),i=v.useRef();let s=!0;const o=Bu(v.useCallback(a=>{const u=Dr(e,a,n);return a(),u},[e,n]),()=>{const a=Bt(e,Nr);try{if(!s&&r.current&&i.current&&!kr(r.current,a,i.current,new WeakMap))return r.current}catch{}return a},()=>Bt(e,Nr));s=!1;const l=new WeakMap;v.useEffect(()=>{r.current=o,i.current=l}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Hu(o,l);const c=v.useMemo(()=>new WeakMap,[]);return Er(o,l,c)}const Fr={accessKey:"",useNarrowMode:!1,initialShowMore:!1},jr=Object.keys(Fr),q=Ve(Fr),Ht=function(){return Wt(q)},Ir="bilibili-app-recommend.config";function Uu(){const e=GM_getValue(Ir);e&&typeof e=="object"&&Object.assign(q,Tr(e,jr)),Dr(q,()=>{Yu()})}function Yu(){GM_setValue(Ir,Tr(q,jr))}function zr(e){Object.assign(q,e)}Uu();var Ut={exports:{}};const Gu=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),$r=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Br=({clearTimeout:e,setTimeout:t,willResolve:n})=>(r,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject($r());let o,l,c;const a=e||clearTimeout,u=()=>{a(o),c($r())},f=()=>{s&&s.removeEventListener("abort",u)},p=new Promise((g,d)=>{l=()=>{f(),n?g(i):d(i)},c=d,o=(t||setTimeout)(l,r)});return s&&s.addEventListener("abort",u,{once:!0}),p.clear=()=>{a(o),o=null,l()},p},Wr=e=>{const t=Br({...e,willResolve:!0});return t.reject=Br({...e,willResolve:!1}),t.range=(n,r,i)=>t(Gu(n,r),i),t},Yt=Wr();Yt.createWithTimers=Wr,Ut.exports=Yt,Ut.exports.default=Yt;var Gt,Hr=Ts.default;Gt=Hr.createRoot,Hr.hydrateRoot;const Ku="https://api.bilibili.com",Ur="https://app.bilibili.com",Kt=ft.default.create({baseURL:Ku});Kt.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 Je=ft.default.create({adapter:Cs.default});Je.interceptors.request.use(function(e){return e.params={access_key:q.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),Je.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});async function Xu(){return(await Je.get(Ur+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data.data}async function Vu(){return Xt(2)}async function Xt(e){const t=new Array(e).fill(0).map(i=>Xu());let r=(await Promise.all(t)).reduce((i,s)=>i.concat(s),[]);return r=Ju(r),r.map(i=>({...i,uniqId:i.param+"-"+crypto.randomUUID()}))}function Ju(e){const t=new Set;return e=e.filter(n=>{const{param:r}=n;return t.has(r)?(console.log("[bilibili-app-recommend]: [uniqRecList]: duplicate",n),!1):(t.add(r),!0)}),e}const Yr="_toast-container_9119l_1",kh={toastContainer:Yr};function oe(e,t=2e3){const n=document.createElement("div");n.className=Yr,n.innerText=e,document.body.appendChild(n),setTimeout(()=>n.remove(),t)}const Zu="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",Qu="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Gr(){return oe(Zu)}function Kr(){return oe(Qu)}async function qu(){var c,a;const t=(await ft.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((c=t==null?void 0:t.data)!=null&&c.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((a=t==null?void 0:t.data)!=null&&a.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:t};const n=t.data.confirm_uri;let r;const i=new Promise(u=>{window.addEventListener("message",f=>{if(f.origin!="https://www.mcbbs.net"||!f.data)return;const p=f.data.match(/access_key=([0-9a-z]{32})/);if(!p||!p[1])return u({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});u(p[1])}),r=setTimeout(()=>{u({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},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 l=await i;return o(),l}async function ef(){const e=await qu();if(typeof e=="object"&&"errmsg"in e){oe(e.errmsg);return}const t=e;return q.accessKey=t,oe("\u83B7\u53D6\u6210\u529F"),t}function tf(){q.accessKey="",oe("\u5DF2\u5220\u9664 access_key")}var nf=function(t){return function(n,r){var i=v.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return n()},r)}},xe=function(t){return typeof t=="function"},rf=function(t){return typeof t=="string"},Xr=function(t){return typeof t=="number"},sf=!1;const Vt=sf;function B(e){Vt&&(xe(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=v.useRef(e);t.current=v.useMemo(function(){return e},[e]);var n=v.useRef();return n.current||(n.current=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current}const Jt=nf(v.useEffect);var Vr=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Jr=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Zr=function(t,n){var r=n.manual,i=n.ready,s=i===void 0?!0:i,o=n.defaultParams,l=o===void 0?[]:o,c=n.refreshDeps,a=c===void 0?[]:c,u=n.refreshDepsAction,f=v.useRef(!1);return f.current=!1,Jt(function(){!r&&s&&(f.current=!0,t.run.apply(t,Jr([],Vr(l),!1)))},[s]),Jt(function(){f.current||r||(f.current=!0,u?u():t.refresh())},Jr([],Vr(a),!1)),{onBefore:function(){if(!s)return{stopNow:!0}}}};Zr.onInit=function(e){var t=e.ready,n=t===void 0?!0:t,r=e.manual;return{loading:!r&&n}};const of=Zr;function Zt(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Qr(e,t){var n=v.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!Zt(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj}function Le(e){var t=v.useRef(e);return t.current=e,t}var af=function(t){Vt&&(xe(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var n=Le(t);v.useEffect(function(){return function(){n.current()}},[])};const Re=af;var Ze=globalThis&&globalThis.__assign||function(){return Ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ze.apply(this,arguments)},Qe=new Map,lf=function(t,n,r){var i=Qe.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;n>-1&&(s=setTimeout(function(){Qe.delete(t)},n)),Qe.set(t,Ze(Ze({},r),{timer:s}))},cf=function(t){return Qe.get(t)},qe=new Map,uf=function(t){return qe.get(t)},ff=function(t,n){qe.set(t,n),n.then(function(r){return qe.delete(t),r}).catch(function(){qe.delete(t)})},be={},df=function(t,n){be[t]&&be[t].forEach(function(r){return r(n)})},Qt=function(t,n){return be[t]||(be[t]=[]),be[t].push(n),function(){var i=be[t].indexOf(n);be[t].splice(i,1)}},hf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},pf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},gf=function(t,n){var r=n.cacheKey,i=n.cacheTime,s=i===void 0?5*60*1e3:i,o=n.staleTime,l=o===void 0?0:o,c=n.setCache,a=n.getCache,u=v.useRef(),f=v.useRef(),p=function(y,m){c?c(m):lf(y,s,m),df(y,m.data)},g=function(y,m){return m===void 0&&(m=[]),a?a(m):cf(y)};return Qr(function(){if(!!r){var d=g(r);d&&Object.hasOwnProperty.call(d,"data")&&(t.state.data=d.data,t.state.params=d.params,(l===-1||new Date().getTime()-d.time<=l)&&(t.state.loading=!1)),u.current=Qt(r,function(y){t.setState({data:y})})}},[]),Re(function(){var d;(d=u.current)===null||d===void 0||d.call(u)}),r?{onBefore:function(y){var m=g(r,y);return!m||!Object.hasOwnProperty.call(m,"data")?{}:l===-1||new Date().getTime()-m.time<=l?{loading:!1,data:m==null?void 0:m.data,error:void 0,returnNow:!0}:{data:m==null?void 0:m.data,error:void 0}},onRequest:function(y,m){var T=uf(r);return T&&T!==f.current?{servicePromise:T}:(T=y.apply(void 0,pf([],hf(m),!1)),f.current=T,ff(r,T),{servicePromise:T})},onSuccess:function(y,m){var T;r&&((T=u.current)===null||T===void 0||T.call(u),p(r,{data:y,params:m,time:new Date().getTime()}),u.current=Qt(r,function(D){t.setState({data:D})}))},onMutate:function(y){var m;r&&((m=u.current)===null||m===void 0||m.call(u),p(r,{data:y,params:t.state.params,time:new Date().getTime()}),u.current=Qt(r,function(T){t.setState({data:T})}))}}:{}};const vf=gf;var mf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},yf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},bf=function(t,n){var r=n.debounceWait,i=n.debounceLeading,s=n.debounceTrailing,o=n.debounceMaxWait,l=v.useRef(),c=v.useMemo(function(){var a={};return i!==void 0&&(a.leading=i),s!==void 0&&(a.trailing=s),o!==void 0&&(a.maxWait=o),a},[i,s,o]);return v.useEffect(function(){if(r){var a=t.runAsync.bind(t);return l.current=hr(function(u){u()},r,c),t.runAsync=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new Promise(function(p,g){var d;(d=l.current)===null||d===void 0||d.call(l,function(){a.apply(void 0,yf([],mf(u),!1)).then(p).catch(g)})})},function(){var u;(u=l.current)===null||u===void 0||u.cancel(),t.runAsync=a}}},[r,c]),r?{onCancel:function(){var u;(u=l.current)===null||u===void 0||u.cancel()}}:{}};const _f=bf;var wf=function(t,n){var r=n.loadingDelay,i=v.useRef();if(!r)return{};var s=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return s(),i.current=setTimeout(function(){t.setState({loading:!0})},r),{loading:!1}},onFinally:function(){s()},onCancel:function(){s()}}};const Sf=wf;var Tf=!!(typeof window<"u"&&window.document&&window.document.createElement);const De=Tf;function qt(){return De?document.visibilityState!=="hidden":!0}var Ne=[];function Cf(e){return Ne.push(e),function(){var n=Ne.indexOf(e);Ne.splice(n,1)}}if(De){var xf=function(){if(!!qt())for(var t=0;t<Ne.length;t++){var n=Ne[t];n()}};window.addEventListener("visibilitychange",xf,!1)}var Af=function(t,n){var r=n.pollingInterval,i=n.pollingWhenHidden,s=i===void 0?!0:i,o=n.pollingErrorRetryCount,l=o===void 0?-1:o,c=v.useRef(),a=v.useRef(),u=v.useRef(0),f=function(){var g;c.current&&clearTimeout(c.current),(g=a.current)===null||g===void 0||g.call(a)};return Jt(function(){r||f()},[r]),r?{onBefore:function(){f()},onError:function(){u.current+=1},onSuccess:function(){u.current=0},onFinally:function(){l===-1||l!==-1&&u.current<=l?c.current=setTimeout(function(){!s&&!qt()?a.current=Cf(function(){t.refresh()}):t.refresh()},r):u.current=0},onCancel:function(){f()}}:{}};const Of=Af;var Ef=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},kf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function Pf(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];n||(n=!0,e.apply(void 0,kf([],Ef(r),!1)),setTimeout(function(){n=!1},t))}}function Mf(){return De&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Fe=[];function Lf(e){return Fe.push(e),function(){var n=Fe.indexOf(e);n>-1&&Fe.splice(n,1)}}if(De){var qr=function(){if(!(!qt()||!Mf()))for(var t=0;t<Fe.length;t++){var n=Fe[t];n()}};window.addEventListener("visibilitychange",qr,!1),window.addEventListener("focus",qr,!1)}var Rf=function(t,n){var r=n.refreshOnWindowFocus,i=n.focusTimespan,s=i===void 0?5e3:i,o=v.useRef(),l=function(){var a;(a=o.current)===null||a===void 0||a.call(o)};return v.useEffect(function(){if(r){var c=Pf(t.refresh.bind(t),s);o.current=Lf(function(){c()})}return function(){l()}},[r,s]),Re(function(){l()}),{}};const Df=Rf;var Nf=function(t,n){var r=n.retryInterval,i=n.retryCount,s=v.useRef(),o=v.useRef(0),l=v.useRef(!1);return i?{onBefore:function(){l.current||(o.current=0),l.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,i===-1||o.current<=i){var a=r!=null?r:Math.min(1e3*Math.pow(2,o.current),3e4);s.current=setTimeout(function(){l.current=!0,t.refresh()},a)}else o.current=0},onCancel:function(){o.current=0,s.current&&clearTimeout(s.current)}}:{}};const Ff=Nf;var jf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},If=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},zf=function(t,n){var r=n.throttleWait,i=n.throttleLeading,s=n.throttleTrailing,o=v.useRef(),l={};return i!==void 0&&(l.leading=i),s!==void 0&&(l.trailing=s),v.useEffect(function(){if(r){var c=t.runAsync.bind(t);return o.current=Tu(function(a){a()},r,l),t.runAsync=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new Promise(function(f,p){var g;(g=o.current)===null||g===void 0||g.call(o,function(){c.apply(void 0,If([],jf(a),!1)).then(f).catch(p)})})},function(){var a;t.runAsync=c,(a=o.current)===null||a===void 0||a.cancel()}}},[r,i,s]),r?{onCancel:function(){var a;(a=o.current)===null||a===void 0||a.cancel()}}:{}};const $f=zf;var Bf=function(t){Vt&&(xe(t)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t,'".'))),v.useEffect(function(){t==null||t()},[])};const Wf=Bf;var Hf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Uf=function(){var t=Hf(v.useState({}),2),n=t[1];return v.useCallback(function(){return n({})},[])};const Yf=Uf;var fe=globalThis&&globalThis.__assign||function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fe.apply(this,arguments)},Gf=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(u){try{a(r.next(u))}catch(f){o(f)}}function c(u){try{a(r.throw(u))}catch(f){o(f)}}function a(u){u.done?s(u.value):i(u.value).then(l,c)}a((r=r.apply(e,t||[])).next())})},Kf=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(a){return function(u){return c([a,u])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(u){a=[6,u],i=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Xf=globalThis&&globalThis.__rest||function(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ae=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Oe=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Vf=function(){function e(t,n,r,i){i===void 0&&(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=fe(fe(fe({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=fe(fe({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.pluginImpls.map(function(s){var o;return(o=s[t])===null||o===void 0?void 0:o.call.apply(o,Oe([s],Ae(n),!1))}).filter(Boolean);return Object.assign.apply(Object,Oe([{}],Ae(i),!1))},e.prototype.runAsync=function(){for(var t,n,r,i,s,o,l,c,a,u,f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];return Gf(this,void 0,void 0,function(){var g,d,y,m,T,D,R,x,w,b,M;return Kf(this,function(L){switch(L.label){case 0:if(this.count+=1,g=this.count,d=this.runPluginHandler("onBefore",f),y=d.stopNow,m=y===void 0?!1:y,T=d.returnNow,D=T===void 0?!1:T,R=Xf(d,["stopNow","returnNow"]),m)return[2,new Promise(function(){})];if(this.setState(fe({loading:!0,params:f},R)),D)return[2,Promise.resolve(R.data)];(n=(t=this.options).onBefore)===null||n===void 0||n.call(t,f),L.label=1;case 1:return L.trys.push([1,3,,4]),x=this.runPluginHandler("onRequest",this.serviceRef.current,f).servicePromise,x||(x=(M=this.serviceRef).current.apply(M,Oe([],Ae(f),!1))),[4,x];case 2:return w=L.sent(),g!==this.count?[2,new Promise(function(){})]:(this.setState({data:w,error:void 0,loading:!1}),(i=(r=this.options).onSuccess)===null||i===void 0||i.call(r,w,f),this.runPluginHandler("onSuccess",w,f),(o=(s=this.options).onFinally)===null||o===void 0||o.call(s,f,w,void 0),g===this.count&&this.runPluginHandler("onFinally",f,w,void 0),[2,w]);case 3:if(b=L.sent(),g!==this.count)return[2,new Promise(function(){})];throw this.setState({error:b,loading:!1}),(c=(l=this.options).onError)===null||c===void 0||c.call(l,b,f),this.runPluginHandler("onError",b,f),(u=(a=this.options).onFinally)===null||u===void 0||u.call(a,f,void 0,b),g===this.count&&this.runPluginHandler("onFinally",f,void 0,b),b;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,Oe([],Ae(n),!1)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,Oe([],Ae(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Oe([],Ae(this.state.params||[]),!1))},e.prototype.mutate=function(t){var n=xe(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})},e}();const Jf=Vf;var en=globalThis&&globalThis.__assign||function(){return en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},en.apply(this,arguments)},Zf=globalThis&&globalThis.__rest||function(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ei=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},ti=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function Qf(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,i=r===void 0?!1:r,s=Zf(t,["manual"]),o=en({manual:i},s),l=Le(e),c=Yf(),a=Qr(function(){var u=n.map(function(f){var p;return(p=f==null?void 0:f.onInit)===null||p===void 0?void 0:p.call(f,o)}).filter(Boolean);return new Jf(l,o,c,Object.assign.apply(Object,ti([{}],ei(u),!1)))},[]);return a.options=o,a.pluginImpls=n.map(function(u){return u(a,o)}),Wf(function(){if(!i){var u=a.state.params||t.defaultParams||[];a.run.apply(a,ti([],ei(u),!1))}}),Re(function(){a.cancel()}),{loading:a.state.loading,data:a.state.data,error:a.state.error,params:a.state.params||[],cancel:B(a.cancel.bind(a)),refresh:B(a.refresh.bind(a)),refreshAsync:B(a.refreshAsync.bind(a)),run:B(a.run.bind(a)),runAsync:B(a.runAsync.bind(a)),mutate:B(a.mutate.bind(a))}}var qf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},ni=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function ri(e,t,n){return Qf(e,t,ni(ni([],qf(n||[]),!1),[_f,Sf,Of,Df,$f,of,vf,Ff],!1))}var ed=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function ii(e,t){e===void 0&&(e=!1);var n=ed(v.useState(e),2),r=n[0],i=n[1],s=v.useMemo(function(){var o=t===void 0?!e:t,l=function(){return i(function(p){return p===e?o:e})},c=function(p){return i(p)},a=function(){return i(e)},u=function(){return i(o)};return{toggle:l,set:c,setLeft:a,setRight:u}},[]);return[r,s]}var td=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function nd(e){e===void 0&&(e=!1);var t=td(ii(e),2),n=t[0],r=t[1],i=r.toggle,s=r.set,o=v.useMemo(function(){var l=function(){return s(!0)},c=function(){return s(!1)};return{toggle:i,set:function(u){return s(!!u)},setTrue:l,setFalse:c}},[]);return[n,o]}function et(e,t){if(!!De){if(!e)return t;var n;return xe(e)?n=e():"current"in e?n=e.current:n=e,n}}var rd=function(t){var n=function(i,s,o){var l=v.useRef(!1),c=v.useRef([]),a=v.useRef([]),u=v.useRef();t(function(){var f,p=Array.isArray(o)?o:[o],g=p.map(function(d){return et(d)});if(!l.current){l.current=!0,c.current=g,a.current=s,u.current=i();return}(g.length!==c.current.length||!Zt(g,c.current)||!Zt(s,a.current))&&((f=u.current)===null||f===void 0||f.call(u),c.current=g,a.current=s,u.current=i())}),Re(function(){var f;(f=u.current)===null||f===void 0||f.call(u),l.current=!1})};return n},id=rd(v.useEffect);const si=id;var oi={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ou,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",l="minute",c="hour",a="day",u="week",f="month",p="quarter",g="year",d="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,D={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(A){var S=["th","st","nd","rd"],_=A%100;return"["+A+(S[(_-20)%10]||S[_]||S[0])+"]"}},R=function(A,S,_){var O=String(A);return!O||O.length>=S?A:""+Array(S+1-O.length).join(_)+A},x={s:R,z:function(A){var S=-A.utcOffset(),_=Math.abs(S),O=Math.floor(_/60),C=_%60;return(S<=0?"+":"-")+R(O,2,"0")+":"+R(C,2,"0")},m:function A(S,_){if(S.date()<_.date())return-A(_,S);var O=12*(_.year()-S.year())+(_.month()-S.month()),C=S.clone().add(O,f),E=_-C<0,k=S.clone().add(O+(E?-1:1),f);return+(-(O+(_-C)/(E?C-k:k-C))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:f,y:g,w:u,d:a,D:d,h:c,m:l,s:o,ms:s,Q:p}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},w="en",b={};b[w]=D;var M=function(A){return A instanceof X},L=function A(S,_,O){var C;if(!S)return w;if(typeof S=="string"){var E=S.toLowerCase();b[E]&&(C=E),_&&(b[E]=_,C=E);var k=S.split("-");if(!C&&k.length>1)return A(k[0])}else{var j=S.name;b[j]=S,C=j}return!O&&C&&(w=C),C||!O&&w},N=function(A,S){if(M(A))return A.clone();var _=typeof S=="object"?S:{};return _.date=A,_.args=arguments,new X(_)},F=x;F.l=L,F.i=M,F.w=function(A,S){return N(A,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var X=function(){function A(_){this.$L=L(_.locale,null,!0),this.parse(_)}var S=A.prototype;return S.parse=function(_){this.$d=function(O){var C=O.date,E=O.utc;if(C===null)return new Date(NaN);if(F.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var k=C.match(m);if(k){var j=k[2]-1||0,$=(k[7]||"0").substring(0,3);return E?new Date(Date.UTC(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,$)):new Date(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,$)}}return new Date(C)}(_),this.$x=_.x||{},this.init()},S.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},S.$utils=function(){return F},S.isValid=function(){return this.$d.toString()!==y},S.isSame=function(_,O){var C=N(_);return this.startOf(O)<=C&&C<=this.endOf(O)},S.isAfter=function(_,O){return N(_)<this.startOf(O)},S.isBefore=function(_,O){return this.endOf(O)<N(_)},S.$g=function(_,O,C){return F.u(_)?this[O]:this.set(C,_)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(_,O){var C=this,E=!!F.u(O)||O,k=F.p(_),j=function(he,H){var ne=F.w(C.$u?Date.UTC(C.$y,H,he):new Date(C.$y,H,he),C);return E?ne:ne.endOf(a)},$=function(he,H){return F.w(C.toDate()[he].apply(C.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(H)),C)},z=this.$W,W=this.$M,te=this.$D,V="set"+(this.$u?"UTC":"");switch(k){case g:return E?j(1,0):j(31,11);case f:return E?j(1,W):j(0,W+1);case u:var ae=this.$locale().weekStart||0,le=(z<ae?z+7:z)-ae;return j(E?te-le:te+(6-le),W);case a:case d:return $(V+"Hours",0);case c:return $(V+"Minutes",1);case l:return $(V+"Seconds",2);case o:return $(V+"Milliseconds",3);default:return this.clone()}},S.endOf=function(_){return this.startOf(_,!1)},S.$set=function(_,O){var C,E=F.p(_),k="set"+(this.$u?"UTC":""),j=(C={},C[a]=k+"Date",C[d]=k+"Date",C[f]=k+"Month",C[g]=k+"FullYear",C[c]=k+"Hours",C[l]=k+"Minutes",C[o]=k+"Seconds",C[s]=k+"Milliseconds",C)[E],$=E===a?this.$D+(O-this.$W):O;if(E===f||E===g){var z=this.clone().set(d,1);z.$d[j]($),z.init(),this.$d=z.set(d,Math.min(this.$D,z.daysInMonth())).$d}else j&&this.$d[j]($);return this.init(),this},S.set=function(_,O){return this.clone().$set(_,O)},S.get=function(_){return this[F.p(_)]()},S.add=function(_,O){var C,E=this;_=Number(_);var k=F.p(O),j=function(W){var te=N(E);return F.w(te.date(te.date()+Math.round(W*_)),E)};if(k===f)return this.set(f,this.$M+_);if(k===g)return this.set(g,this.$y+_);if(k===a)return j(1);if(k===u)return j(7);var $=(C={},C[l]=r,C[c]=i,C[o]=n,C)[k]||1,z=this.$d.getTime()+_*$;return F.w(z,this)},S.subtract=function(_,O){return this.add(-1*_,O)},S.format=function(_){var O=this,C=this.$locale();if(!this.isValid())return C.invalidDate||y;var E=_||"YYYY-MM-DDTHH:mm:ssZ",k=F.z(this),j=this.$H,$=this.$m,z=this.$M,W=C.weekdays,te=C.months,V=function(H,ne,ze,G){return H&&(H[ne]||H(O,E))||ze[ne].slice(0,G)},ae=function(H){return F.s(j%12||12,H,"0")},le=C.meridiem||function(H,ne,ze){var G=H<12?"AM":"PM";return ze?G.toLowerCase():G},he={YY:String(this.$y).slice(-2),YYYY:this.$y,M:z+1,MM:F.s(z+1,2,"0"),MMM:V(C.monthsShort,z,te,3),MMMM:V(te,z),D:this.$D,DD:F.s(this.$D,2,"0"),d:String(this.$W),dd:V(C.weekdaysMin,this.$W,W,2),ddd:V(C.weekdaysShort,this.$W,W,3),dddd:W[this.$W],H:String(j),HH:F.s(j,2,"0"),h:ae(1),hh:ae(2),a:le(j,$,!0),A:le(j,$,!1),m:String($),mm:F.s($,2,"0"),s:String(this.$s),ss:F.s(this.$s,2,"0"),SSS:F.s(this.$ms,3,"0"),Z:k};return E.replace(T,function(H,ne){return ne||he[H]||k.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(_,O,C){var E,k=F.p(O),j=N(_),$=(j.utcOffset()-this.utcOffset())*r,z=this-j,W=F.m(this,j);return W=(E={},E[g]=W/12,E[f]=W,E[p]=W/3,E[u]=(z-$)/6048e5,E[a]=(z-$)/864e5,E[c]=z/i,E[l]=z/r,E[o]=z/n,E)[k]||z,C?W:F.a(W)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return b[this.$L]},S.locale=function(_,O){if(!_)return this.$L;var C=this.clone(),E=L(_,O,!0);return E&&(C.$L=E),C},S.clone=function(){return F.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},A}(),ee=X.prototype;return N.prototype=ee,[["$ms",s],["$s",o],["$m",l],["$H",c],["$W",a],["$M",f],["$y",g],["$D",d]].forEach(function(A){ee[A[1]]=function(S){return this.$g(S,A[0],A[1])}}),N.extend=function(A,S){return A.$i||(A(S,X,N),A.$i=!0),N},N.locale=L,N.isDayjs=M,N.unix=function(A){return N(1e3*A)},N.en=b[w],N.Ls=b,N.p={},N})})(oi);const ai=oi.exports;function tt(e,t,n){n===void 0&&(n={});var r=Le(t);si(function(){var i=et(n.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(l){return r.current(l)};return i.addEventListener(e,s,{capture:n.capture,once:n.once,passive:n.passive}),function(){i.removeEventListener(e,s,{capture:n.capture})}}},[e,n.capture,n.once,n.passive],n.target)}var sd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};const tn=function(e,t){var n=t||{},r=n.onEnter,i=n.onLeave,s=n.onChange,o=sd(nd(!1),2),l=o[0],c=o[1],a=c.setTrue,u=c.setFalse;return tt("mouseenter",function(){r==null||r(),a(),s==null||s(!0)},{target:e}),tt("mouseleave",function(){i==null||i(),u(),s==null||s(!1)},{target:e}),l};var od=function(t,n){return n===void 0&&(n=[]),Qc(t,n)},ad=function(t,n,r){var i=v.useRef(),s=v.useRef(0);od(n,i.current)||(i.current=n,s.current+=1),si(t,[s.current],r)};const ld=ad;var nn=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},cd={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},rn={ctrl:function(t){return t.ctrlKey},shift:function(t){return t.shiftKey},alt:function(t){return t.altKey},meta:function(t){return t.metaKey}};function ud(e){var t=Object.keys(rn).reduce(function(n,r){return rn[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function li(e,t,n){var r,i;if(!e.key)return!1;if(Xr(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var l=nn(s),c=l.next();!c.done;c=l.next()){var a=c.value,u=rn[a],f=cd[a.toLowerCase()];(u&&u(e)||f&&f===e.keyCode)&&o++}}catch(p){r={error:p}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return n?o===s.length&&ud(e)===s.length:o===s.length}function fd(e,t){return xe(e)?e:rf(e)||Xr(e)?function(n){return li(n,e,t)}:Array.isArray(e)?function(n){return e.some(function(r){return li(n,r,t)})}:e?function(){return!0}:function(){return!1}}var dd=["keydown"];function _e(e,t,n){var r=n||{},i=r.events,s=i===void 0?dd:i,o=r.target,l=r.exactMatch,c=l===void 0?!1:l,a=Le(t),u=Le(e);ld(function(){var f,p,g,d=et(o,window);if(!!d){var y=function(x){var w,b=fd(u.current,c);if(b(x))return(w=a.current)===null||w===void 0?void 0:w.call(a,x)};try{for(var m=nn(s),T=m.next();!T.done;T=m.next()){var D=T.value;(g=d==null?void 0:d.addEventListener)===null||g===void 0||g.call(d,D,y)}}catch(R){f={error:R}}finally{try{T&&!T.done&&(p=m.return)&&p.call(m)}finally{if(f)throw f.error}}return function(){var R,x,w;try{for(var b=nn(s),M=b.next();!M.done;M=b.next()){var L=M.value;(w=d==null?void 0:d.removeEventListener)===null||w===void 0||w.call(d,L,y)}}catch(N){R={error:N}}finally{try{M&&!M.done&&(x=b.return)&&x.call(b)}finally{if(R)throw R.error}}}}},[s],o)}var hd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function pd(e){var t=v.useRef(0),n=hd(v.useState(e),2),r=n[0],i=n[1],s=v.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return Re(function(){cancelAnimationFrame(t.current)}),[r,s]}var gd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},vd={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN};const md=function(e){var t=gd(pd(vd),2),n=t[0],r=t[1];return tt("mousemove",function(i){var s=i.screenX,o=i.screenY,l=i.clientX,c=i.clientY,a=i.pageX,u=i.pageY,f={screenX:s,screenY:o,clientX:l,clientY:c,pageX:a,pageY:u,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},p=et(e);if(p){var g=p.getBoundingClientRect(),d=g.left,y=g.top,m=g.width,T=g.height;f.elementPosX=d+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=a-f.elementPosX,f.elementY=u-f.elementPosY,f.elementW=m,f.elementH=T}r(f)},{target:function(){return document}}),n};var ci={exports:{}};/*!
	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<arguments.length;i++){var s=arguments[i];if(!!s){var o=typeof s;if(o==="string"||o==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var l=n.apply(null,s);l&&r.push(l)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var c in s)t.call(s,c)&&s[c]&&r.push(c)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ci);const U=ci.exports,ui="_expand-btn_wdzp9_1",fi="_expanded_wdzp9_12",Mh={expandBtn:ui,expanded:fi};var nt={exports:{}},rt={};/**
 * @license React
 * react-jsx-runtime.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 yd=Be.default,bd=Symbol.for("react.element"),_d=Symbol.for("react.fragment"),wd=Object.prototype.hasOwnProperty,Sd=yd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Td={key:!0,ref:!0,__self:!0,__source:!0};function di(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)wd.call(t,r)&&!Td.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:bd,type:e,key:s,ref:o,props:i,_owner:Sd.current}}rt.Fragment=_d,rt.jsx=di,rt.jsxs=di,function(e){e.exports=rt}(nt);const it=nt.exports.Fragment,h=nt.exports.jsx,P=nt.exports.jsxs,hi=v.forwardRef(function({children:t},n){const[r,i]=ii(!1);v.useImperativeHandle(n,()=>i,[i]);const s=h("button",{className:U("primary-btn",ui),onClick:i.toggle,children:h("svg",{className:U({[fi]:r}),children:h("use",{xlinkHref:"#widget-arrow"})})});return P(it,{children:[s,r&&t]})});var Y={exports:{}},Cd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xd=Cd,Ad=xd;function pi(){}function gi(){}gi.resetWarningCache=pi;var Od=function(){function e(r,i,s,o,l,c){if(c!==Ad){var a=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 a.name="Invariant Violation",a}}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:gi,resetWarningCache:pi};return n.PropTypes=n,n};Y.exports=Od();class sn extends v.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!=null?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<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=r.scrollHeight,this.beforeScrollTop=r.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,n){return t?this.calculateTopPosition(t)+(t.offsetHeight-n-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const t=this.filterProps(this.props),{children:n,element:r,hasMore:i,initialLoad:s,isReverse:o,loader:l,loadMore:c,pageStart:a,ref:u,threshold:f,useCapture:p,useWindow:g,getScrollParent:d,...y}=t;y.ref=T=>{this.scrollComponent=T,u&&u(T)};const m=[n];return i&&(l?o?m.unshift(l):m.push(l):this.defaultLoader&&(o?m.unshift(this.defaultLoader):m.push(this.defaultLoader))),Be.default.createElement(r,y,m)}}Sn(sn,"propTypes",{children:Y.exports.node.isRequired,element:Y.exports.node,hasMore:Y.exports.bool,initialLoad:Y.exports.bool,isReverse:Y.exports.bool,loader:Y.exports.node,loadMore:Y.exports.func.isRequired,pageStart:Y.exports.number,ref:Y.exports.func,getScrollParent:Y.exports.func,threshold:Y.exports.number,useCapture:Y.exports.bool,useWindow:Y.exports.bool}),Sn(sn,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});let je=0;const Ed=()=>{je++,document.body.style.overflow="hidden"},kd=()=>{je--,je<0&&(je=0),je===0&&(document.body.style.overflow="overlay")},vi=()=>document.body.classList.contains("dark"),mi=Ve({value:vi()}),Pd=function(){return Wt(mi).value};new MutationObserver(function(){mi.value=vi()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});function yi({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1}){v.useLayoutEffect(()=>{e?Ed():kd()},[e]);const o=v.useRef(null),l=Pd(),{bg:c,c:a}=v.useMemo(()=>{const d=window.getComputedStyle(document.body)["background-color"],y=window.getComputedStyle(document.body).color;return{bg:d,c:y}},[l]),u=v.useMemo(()=>l?{"--bg":c,"--c":a,backgroundColor:c,color:a}:{},[c,a,l]),f=v.useId(),p=v.useMemo(()=>{const d=document.createElement("div");return d.setAttribute("data-id","base-modal-"+f),document.body.appendChild(d),d},[]),g=B(d=>{var y;(y=o.current)!=null&&y.contains(d.target)||s&&t()});return e?J.createPortal(h("div",{className:U(r),onClick:g,children:h("div",{className:U(i),style:u,ref:o,children:n})}),p):null}function Md(e){const t=Ve({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}function Ld(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw oe("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55"),new Error("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55");return e}const Ie=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,st=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new bi}abort(){this.signal.dispatchEvent("abort")}},Rd=typeof AbortSignal=="function",Dd=typeof st.AbortSignal=="function",bi=Rd?AbortSignal:Dd?st.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;const n={type:t,target:this};this.onabort(n),this._listeners.forEach(r=>r(n),this)}}onabort(){}addEventListener(t,n){t==="abort"&&this._listeners.push(n)}removeEventListener(t,n){t==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},on=new Set,an=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;ot(n)&&cn(n,`${e} option`,`options.${t}`,we)},ln=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(ot(n)){const{prototype:r}=we,{get:i}=Object.getOwnPropertyDescriptor(r,e);cn(n,`${e} method`,`cache.${t}()`,i)}},Nd=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(ot(n)){const{prototype:r}=we,{get:i}=Object.getOwnPropertyDescriptor(r,e);cn(n,`${e} property`,`cache.${t}`,i)}},_i=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},ot=e=>!on.has(e),cn=(e,t,n,r)=>{on.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;_i(i,"DeprecationWarning",e,r)},de=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),wi=e=>de(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?at:null:null;class at extends Array{constructor(t){super(t),this.fill(0)}}class Fd{constructor(t){if(t===0)return[];const n=wi(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class we{constructor(t={}){const{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:c,dispose:a,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:p,maxSize:g=0,maxEntrySize:d=0,sizeCalculation:y,fetchMethod:m,fetchContext:T,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:R}=t,{length:x,maxAge:w,stale:b}=t instanceof we?{}:t;if(n!==0&&!de(n))throw new TypeError("max option must be a nonnegative integer");const M=n?wi(n):Array;if(!M)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=g,this.maxEntrySize=d||this.maxSize,this.sizeCalculation=y||x,this.sizeCalculation){if(!this.maxSize&&!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(this.fetchMethod=m||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=T,!this.fetchMethod&&T!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(n).fill(null),this.valList=new Array(n).fill(null),this.next=new M(n),this.prev=new M(n),this.head=0,this.tail=0,this.free=new Fd(n),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!D,this.maxEntrySize!==0){if(this.maxSize!==0&&!de(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!de(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!b,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=de(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||w||0,this.ttl){if(!de(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const L="LRU_CACHE_UNBOUNDED";ot(L)&&(on.add(L),_i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,we))}b&&an("stale","allowStale"),w&&an("maxAge","ttl"),x&&an("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new at(this.max),this.starts=new at(this.max),this.setItemTTL=(r,i,s=Ie.now())=>{if(this.starts[r]=i!==0?s:0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){const o=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);o.unref&&o.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Ie.now():0};let t=0;const n=()=>{const r=Ie.now();if(this.ttlResolution>0){t=r;const i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{const i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||n())-this.starts[r]>this.ttls[r]}updateItemAge(t){}setItemTTL(t,n,r){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new at(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,n,r,i)=>{if(!de(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,t),!de(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return r},this.addItemSize=(t,n)=>{this.sizes[t]=n;const r=this.maxSize-this.sizes[t];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,n){}requireSize(t,n,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(const t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*rkeys(){for(const t of this.rindexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}*rvalues(){for(const t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,n={}){for(const r of this.indexes())if(t(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],n)}forEach(t,n=this){for(const r of this.indexes())t.call(n,this.valList[r],this.keyList[r],this)}rforEach(t,n=this){for(const r of this.rindexes())t.call(n,this.valList[r],this.keyList[r],this)}get prune(){return ln("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),t=!0);return t}dump(){const t=[];for(const n of this.indexes({allowStale:!0})){const r=this.keyList[n],i=this.valList[n],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[n];const l=Ie.now()-this.starts[n];o.start=Math.floor(Date.now()-l)}this.sizes&&(o.size=this.sizes[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=Ie.now()-i}this.set(n,r.value,r)}}dispose(t,n,r){}set(t,n,{ttl:r=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL}={}){if(o=this.requireSize(t,n,o,l),this.maxEntrySize&&o>this.maxEntrySize)return this;let a=this.size===0?void 0:this.keyMap.get(t);if(a===void 0)a=this.newIndex(),this.keyList[a]=t,this.valList[a]=n,this.keyMap.set(t,a),this.next[this.tail]=a,this.prev[a]=this.tail,this.tail=a,this.size++,this.addItemSize(a,o),c=!1;else{const u=this.valList[a];n!==u&&(this.isBackgroundFetch(u)?u.__abortController.abort():s||(this.dispose(u,t,"set"),this.disposeAfter&&this.disposed.push([u,t,"set"])),this.removeItemSize(a),this.valList[a]=n,this.addItemSize(a,o)),this.moveToTail(a)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(a,r,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const n=this.head,r=this.keyList[n],i=this.valList[n];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(n),t&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(t,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const r=this.keyMap.get(t);return r!==void 0&&!this.isStale(r)?(n&&this.updateItemAge(r),!0):!1}peek(t,{allowStale:n=this.allowStale}={}){const r=this.keyMap.get(t);if(r!==void 0&&(n||!this.isStale(r))){const i=this.valList[r];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,n,r,i){const s=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(s))return s;const o=new st,l={signal:o.signal,options:r,context:i},c=p=>(o.signal.aborted||this.set(t,p,l.options),p),a=p=>{if(this.valList[n]===f&&(!r.noDeleteOnFetchRejection||f.__staleWhileFetching===void 0?this.delete(t):this.valList[n]=f.__staleWhileFetching),f.__returned===f)throw p},u=p=>p(this.fetchMethod(t,s,l)),f=new Promise(u).then(c,a);return f.__abortController=o,f.__staleWhileFetching=s,f.__returned=null,n===void 0?(this.set(t,f,l.options),n=this.keyMap.get(t)):this.valList[n]=f,f}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,fetchContext:f=this.fetchContext,forceRefresh:p=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i});const g={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:c,noUpdateTTL:a,noDeleteOnFetchRejection:u};let d=this.keyMap.get(t);if(d===void 0){const y=this.backgroundFetch(t,d,g,f);return y.__returned=y}else{const y=this.valList[d];if(this.isBackgroundFetch(y))return n&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!p&&!this.isStale(d))return this.moveToTail(d),r&&this.updateItemAge(d),y;const m=this.backgroundFetch(t,d,g,f);return n&&m.__staleWhileFetching!==void 0?m.__staleWhileFetching:m.__returned=m}}get(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const s=this.keyMap.get(t);if(s!==void 0){const o=this.valList[s],l=this.isBackgroundFetch(o);return this.isStale(s)?l?n?o.__staleWhileFetching:void 0:(i||this.delete(t),n?o:void 0):l?void 0:(this.moveToTail(s),r&&this.updateItemAge(s),o)}}connect(t,n){this.prev[n]=t,this.next[t]=n}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return ln("del","delete"),this.delete}delete(t){let n=!1;if(this.size!==0){const r=this.keyMap.get(t);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);const i=this.valList[r];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,t,"delete"),this.disposeAfter&&this.disposed.push([i,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(const t of this.rindexes({allowStale:!0})){const n=this.valList[t];if(this.isBackgroundFetch(n))n.__abortController.abort();else{const r=this.keyList[t];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return ln("reset","clear"),this.clear}get length(){return Nd("length","size"),this.size}static get AbortController(){return st}static get AbortSignal(){return bi}}var jd=we;const Id=jd;async function zd(e){return(await Kt.get("/pvideo",{params:{aid:e}})).data.data}async function $d(e){return[]}const un=new Id({max:200});async function Bd(e){if(un.has(e))return un.get(e);const[t,n]=await Promise.all([zd(e),$d()]);return un.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function Si(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",Ld());const s=(await Kt.post("/x/v2/history/toview/"+e,r,{withCredentials:!0})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}}const Wd=Si("add"),Hd=Si("del"),Ti=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var l;const s=(await Je.get(Ur+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(l=n.tag)==null?void 0:l.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"}},Ud=Ti("dislike"),Yd=Ti("cancel"),Ci="_modal-mask_vh629_1",xi="_modal_vh629_1",Ai="_modal-header_vh629_23",Oi="_modal-title_vh629_30",Ei="_title-desc_vh629_35",ki="_btn-close_vh629_39",Pi="_modal-body_vh629_57",Mi="_reason-list_vh629_62",Li="_reason_vh629_62",Dh={modalMask:Ci,modal:xi,modalHeader:Ai,modalTitle:Oi,titleDesc:Ei,btnClose:ki,modalBody:Pi,reasonList:Mi,reason:Li},fn=Md();function Gd(){return Wt(fn)}function Kd(e){const t=Gd();if(!!e)return t.get(e)}function Xd({show:e,onHide:t,item:n}){const[r,i]=v.useState(!1),s=B(async(l,c)=>{if(!n)return;let a=!1,u=null;try{i(!0),a=await Ud(n,l)}catch(f){u=f}finally{i(!1)}if(u)return console.error(u.stack||u),Gr();a?oe("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Kr(),a&&(fn.set(n.param,{id:l,name:c}),t())}),o=v.useMemo(()=>{var l;return[...(l=n==null?void 0:n.dislike_reasons)!=null?l:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[n]);return P(yi,{show:e,onHide:t,clsModalMask:Ci,clsModal:xi,hideWhenMaskOnClick:!0,children:[P("div",{className:Ai,children:[P("div",{className:Oi,children:["\u6211\u4E0D\u60F3\u770B",h("span",{className:Ei,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),h("div",{className:"space",style:{flex:1}}),P("button",{className:`primary-btn roll-btn ${ki}`,onClick:t,children:[h("svg",{style:{transform:"rotate(0deg)"},children:h("use",{xlinkHref:"#widget-close"})}),h("span",{children:"\u5173\u95ED"})]})]}),h("div",{className:Pi,children:h("div",{className:Mi,children:o.map(l=>h("button",{className:Li,"data-id":l.reason_id,onClick:()=>s(l.reason_id,l.reason_name),disabled:r,children:l.reason_name},l.reason_id))})})]})}const Ri={show:!1,onHide:Di,item:null};function Di(){Ni({show:!1,item:null})}function Ni(e){Object.assign(Ri,e),Vd().render(h(Xd,{...Ri,onHide:Di}))}let dn;function Vd(){if(!dn){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),dn=Gt(e)}return dn}function Jd(e){Ni({show:!0,item:e})}function Zd(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=>bu(o.toString(),2,"0")).join(":")}function hn(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}var Qd=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function Fi(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 ji(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fi(Object(n),!0).forEach(function(r){qd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eh(e,t){if(e==null)return{};var n=th(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function th(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var nh={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"};function rh(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function ih(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 Ii=v.createContext(nh);Ii.Provider;function zi(e,t,n){return function(r){var i=r.size,s=r.strokeWidth,o=r.strokeLinecap,l=r.strokeLinejoin,c=r.theme,a=r.fill,u=r.className,f=r.spin,p=eh(r,Qd),g=v.useContext(Ii),d=v.useMemo(rh,[]),y=ih(d,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:l,theme:c,fill:a},g),m=[g.prefix+"-icon"];return m.push(g.prefix+"-icon-"+e),t&&g.rtl&&m.push(g.prefix+"-icon-rtl"),f&&m.push(g.prefix+"-icon-spin"),u&&m.push(u),h("span",{...ji(ji({},p),{},{className:m.join(" ")}),children:n(y)})}}const sh=zi("distraught-face",!1,function(e){return P("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none",children:[h("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}),h("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}),h("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),h("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin})]})}),oh=zi("return",!0,function(e){return P("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none",children:[h("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),h("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})]})}),$i="_bili-video-card_1a93a_1",Bi="_image-wrapper_1a93a_4",Wi="_preview-card-wrapper_1a93a_8",Hi="_preview-card-inner_1a93a_21",Ui="_watch-later_1a93a_25",Yi="_badge_1a93a_28",Gi="_recommend-reason_1a93a_36",Ki="_bangumi-desc_1a93a_51",Xi="_btn-dislike_1a93a_54",Vi="_btn-dislike-icon_1a93a_69",Ji="_btn-dislike-tip_1a93a_76",Zi="_disliked-wrapper_1a93a_91",Qi="_dislike-content-cover_1a93a_105",qi="_dislike-content-cover-inner_1a93a_111",es="_dislike-icon_1a93a_122",ts="_dislike-reason_1a93a_125",ns="_dislike-desc_1a93a_129",rs="_dislike-content-action_1a93a_133",Nh={biliVideoCard:$i,imageWrapper:Bi,previewCardWrapper:Wi,previewCardInner:Hi,watchLater:Ui,badge:Yi,recommendReason:Gi,bangumiDesc:Ki,btnDislike:Xi,btnDislikeIcon:Vi,btnDislikeTip:Ji,dislikedWrapper:Zi,dislikeContentCover:Qi,dislikeContentCoverInner:qi,dislikeIcon:es,dislikeReason:ts,dislikeDesc:ns,dislikeContentAction:rs};function pn(e,t){return isNaN(e)?t:e}function ah({className:e,item:t,pvideo:n,enterCursorState:r}){const i=v.useRef(null),s=md(i),o={item:t,pvideo:n,cursorState:s,elWidth:pn(s.elementW,r.width),elHeight:pn(s.elementH,r.height),relativeX:pn(s.elementX,r.relativeX)};return h("div",{ref:i,className:U(Wi,e),children:n?h(lh,{...o}):!1})}function lh({item:e,pvideo:t,elWidth:n,elHeight:r,relativeX:i}){var b;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.duration||0)*s));let l=v.useMemo(()=>{const M=(t==null?void 0:t.index)||[];let L=uh(M,o);return L!==-1?L:o>M[M.length-1]?(L=Math.floor(M.length*s)-1,L<0&&(L=0),L):0},[t,o]);const{img_x_len:c,img_y_len:a,img_x_size:u,img_y_size:f}=t,p=a*c;l=l+1;const g=Math.floor(l/p),d=l-g*p,y=((b=t.image)==null?void 0:b[g])||"",m=Math.floor(d/c)+1,T=d-(m-1)*c,D=n*c,R=r*a,x=(m-1)*r,w=(T-1)*n;return h("div",{className:Hi,style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${w}px -${x}px`,backgroundSize:`${D}px ${R}px`},children:h(ch,{progress:s})})}function ch({progress:e}){return h("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:h("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function uh(e,t){var l;let n=0,r=e.length-1,i=-1;for(;n<=r;){const c=Math.floor((n+r)/2),a=e[c];if(t===a)return c;a<t?(n=c+1,i=c):r=c-1}if(i===-1)return-1;const s=e[i],o=(l=e[i+1])!=null?l:0;return s<t&&t<o?i:-1}const fh=ai().format("YYYY"),dh=e=>{if(!e)return"";const t=ai.unix(e);return t.format("YYYY")===fh?t.format("M-D"):t.format("YY-M-D")},hh=e=>e.replace(/^http:\/\//,"https://"),gn=v.memo(function({style:t,className:n,item:r,loading:i}){i=i!=null?i:!r;const s=P("div",{className:U("bili-video-card__skeleton",{hide:!i}),children:[h("div",{className:"bili-video-card__skeleton--cover"}),h("div",{className:"bili-video-card__skeleton--info",children:P("div",{className:"bili-video-card__skeleton--right",children:[h("p",{className:"bili-video-card__skeleton--text"}),h("p",{className:"bili-video-card__skeleton--text short"}),h("p",{className:"bili-video-card__skeleton--light"})]})})]}),o=Kd(r==null?void 0:r.param);return P("div",{style:t,className:U("bili-video-card",$i,n),"data-report":"partition_recommend.content",children:[s,!i&&r&&(o?h(ph,{item:r,dislikedReason:o}):h(gh,{item:r}))]})}),ph=v.memo(function({dislikedReason:t,item:n}){const r=B(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Yd(n,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),Gr();i?oe("\u5DF2\u64A4\u9500"):Kr(),i&&fn.delete(n.param)});return P("div",{className:U(Zi),children:[h("div",{className:Qi,children:P("div",{className:qi,children:[h(sh,{theme:"outline",size:"32",fill:"#333",className:es}),h("div",{className:ts,children:t==null?void 0:t.name}),h("div",{className:ns,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),h("div",{className:rs,children:P("button",{onClick:r,children:[h(oh,{theme:"outline",size:"16",fill:"#333",style:{marginRight:4,fontSize:0,marginTop:-2}}),"\u64A4\u9500"]})})]})}),gh=v.memo(function({item:t}){const n=v.useRef(null),[r,i]=v.useState(()=>({width:0,height:0,relativeX:0}));tt("mouseenter",G=>{var ws;const ct=(ws=n.current)==null?void 0:ws.getBoundingClientRect();if(!ct)return;const{width:ut,height:wn,x:Ch}=ct;i({width:ut,height:wn,relativeX:G.pageX-window.pageXOffset-Ch})},{target:n});const s=tn(n),o=v.useRef(null),l=tn(o),[c,a]=v.useState(!1),{accessKey:u}=Ht(),f=Boolean(u),{param:p,title:g,cover:d,goto:y,play:m,like:T,coin:D,desc:R,danmaku:x,ctime:w,duration:b,name:M,face:L,mid:N,favorite:F,badge:X,rcmd_reason:ee}=t,A=v.useMemo(()=>dh(w),[w]),S=v.useMemo(()=>hh(d),[d]),[_,O]=v.useState(null),[C,E]=v.useState(!1),k=B(async()=>{if(!_&&!C)try{E(!0);const G=await Bd(p);O(G)}finally{E(!1)}});v.useEffect(()=>{s&&k()},[s]);let j=!1;const $=B(async G=>{if(G.preventDefault(),j)return;j=!0;const ct=c?Hd:Wd;let ut=!1;try{ut=await ct(p)}finally{j=!1}ut&&a(wn=>!wn)}),z=v.useRef(null),W=tn(z),te=B(G=>{G.stopPropagation(),G.preventDefault(),Jd(t)}),V=t.goto==="bangumi",ae=t.goto==="av",le=ae?`/video/av${p}`:t.uri,he=v.useMemo(()=>Zd(b),[b]),H=v.useMemo(()=>hn(m),[m]),ne=v.useMemo(()=>hn(T),[T]),ze=v.useMemo(()=>hn(F),[F]);return P("div",{className:"bili-video-card__wrap __scale-wrap",children:[h("a",{href:le,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:P("div",{className:"bili-video-card__image __scale-player-wrap",ref:n,children:[P("div",{className:U("bili-video-card__image--wrap",Bi),children:[P("picture",{className:"v-img bili-video-card__cover",children:[h("source",{srcSet:`${S}@672w_378h_1c.webp`,type:"image/webp"}),h("img",{src:`${S}@672w_378h_1c.webp`,alt:g,loading:"lazy"})]}),s&&h(ah,{item:t,pvideo:_==null?void 0:_.pvideoData,enterCursorState:r}),P("div",{className:`bili-watch-later ${Ui}`,style:{display:s?"flex":"none"},ref:o,onClick:$,children:[h("svg",{className:"bili-watch-later__icon",children:h("use",{xlinkHref:c?"#widget-watch-save":"#widget-watch-later"})}),h("span",{className:"bili-watch-later__tip",style:{display:l?"block":"none"},children:c?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),f&&P("div",{ref:z,className:Xi,onClick:te,style:{display:s?"flex":"none"},children:[h("svg",{className:Vi,children:h("use",{xlinkHref:"#widget-close"})}),h("span",{className:Ji,style:{display:W?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),h("div",{className:"bili-video-card__mask",children:P("div",{className:"bili-video-card__stats",children:[P("div",{className:"bili-video-card__stats--left",children:[P("span",{className:"bili-video-card__stats--item",children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-play-count"})}),h("span",{className:"bili-video-card__stats--text",children:H})]}),h("span",{className:"bili-video-card__stats--item",children:y==="av"?P(it,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:ne})]}):P(it,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:ze})]})})]}),h("span",{className:"bili-video-card__stats__duration",children:ae&&he})]})})]})}),h("div",{className:"bili-video-card__info __scale-disable",children:P("div",{className:"bili-video-card__info--right",children:[h("a",{href:le,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:h("h3",{className:"bili-video-card__info--tit",title:g,children:g})}),P("p",{className:"bili-video-card__info--bottom",children:[ae&&P("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${N}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[ee!=null&&ee.content?h("span",{className:Gi,children:ee.content}):h("svg",{className:"bili-video-card__info--owner__up",children:h("use",{xlinkHref:"#widget-up"})}),h("span",{className:"bili-video-card__info--author",children:M}),A&&P("span",{className:"bili-video-card__info--date",children:["\xB7 ",A]})]}),V&&P("a",{className:"bili-video-card__info--owner",href:le,target:"_blank",children:[h("span",{className:Yi,children:X}),h("span",{className:Ki,children:R})]})]})]})})]})}),is="_modal-mask_1urmj_1",ss="_narrow-mode_1urmj_13",os="_modal_1urmj_1",as="_modal-header_1urmj_38",ls="_modal-title_1urmj_46",cs="_btn-refresh_1urmj_51",us="_btn-close_1urmj_52",lt="_modal-body_1urmj_68",vh="_list_1urmj_74",vn="_card_1urmj_77",mn="_active_1urmj_85",fs="_video-card-list_1urmj_90",yn="_video-card-body_1urmj_1",ds="_loader_1urmj_99",bn="_checkbox_1urmj_104",Fh={modalMask:is,narrowMode:ss,modal:os,modalHeader:as,modalTitle:ls,btnRefresh:cs,btnClose:us,modalBody:lt,list:vh,card:vn,active:mn,videoCardList:fs,videoCardBody:yn,loader:ds,checkbox:bn};function mh({show:e,refresh:t,minIndex:n=0,maxIndex:r}){const[i,s]=v.useState(null),o=B(()=>{if(i===null)return!1;const y=document.querySelector(`${_n}.${mn}`),m=document.querySelector(`.${lt}`);if(!y||!m)return!1;const T=m.getBoundingClientRect(),D=y.getBoundingClientRect();return!(D.top-T.top<-(T.height+D.height)||D.top-T.top>T.height*2+D.height)}),l=B((y,m)=>{if(!e)return;m==null||m.preventDefault();const T=o()?i+y:yh();if(!(T<n)){if(T>r){gs(r);return}s(T),gs(T)}}),c=v.useCallback(y=>{l(-1,y)},[]),a=v.useCallback(y=>{l(1,y)},[]);_e("leftarrow",c),_e("rightarrow",a);const u=v.useCallback(y=>{l(-ms(),y)},[]),f=v.useCallback(y=>{l(ms(),y)},[]);_e("uparrow",u),_e("downarrow",f);const p=B(()=>{!i||!e||bh(i)}),g=B(()=>{!e||s(null)});_e("enter",p),_e("esc",g);const d=B(()=>{!e||t()});return _e("r",d,{exactMatch:!0}),{activeIndex:i,clearActiveIndex:g}}function yh(){const e=document.querySelector(`.${lt}`);if(!e)return 0;const t=e.getBoundingClientRect(),n=hs();for(let r=0;r<n.length;r++)if(n[r].getBoundingClientRect().top>=t.top)return r;return 0}const _n=`#${yn} .${vn}`;function hs(){return[...document.querySelectorAll(_n)]}function ps(e){return hs()[e]}function gs(e){var n;const t=ps(e);(n=t==null?void 0:t.scrollIntoViewIfNeeded)==null||n.call(t,!1)}function bh(e){const t=ps(e);if(!t)return;const n=t.querySelector(".bili-video-card__wrap > a");n==null||n.click()}const vs=new Map;function ms(){if(q.useNarrowMode)return 2;let e=vs.get(window.innerWidth);if(e)return e;const t=document.querySelector(_n);if(!t)throw new Error("expect found first card");e=1;const n=t.getBoundingClientRect().top;let r=t.nextElementSibling;for(;r&&r.getBoundingClientRect().top===n;)e++,r=r.nextElementSibling;return vs.set(window.innerWidth,e),e}function ys(){return v.useMemo(()=>crypto.randomUUID(),[])}const _h=v.memo(function({show:t,onHide:n}){const[r,i]=v.useState([]),[s,o]=v.useState(!1),l=v.useRef(null),c=B(async()=>{l.current&&(l.current.scrollTop=0);try{m(),o(!0),i(await Xt(2)),m()}finally{o(!1)}}),a=B(async R=>{const x=await Xt(2);i(w=>[...w,...x])}),{useNarrowMode:u,initialShowMore:f}=Ht(),p=v.useCallback(R=>{const x=R.target.checked;zr({useNarrowMode:x})},[]),g=v.useCallback(R=>{const x=R.target.checked;zr({initialShowMore:x}),x&&oe("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u672C\u63A8\u8350\u5F39\u6846")},[]),d=v.useMemo(()=>({[ss]:u}),[u]),{activeIndex:y,clearActiveIndex:m}=mh({show:t,refresh:c,maxIndex:r.length-1}),T=ys(),D=ys();return P(yi,{show:t,onHide:n,clsModalMask:U(is,d),clsModal:U(os,d),children:[P("div",{className:as,children:[h("div",{className:ls,children:"\u63A8\u8350"}),h("div",{className:"space",style:{flex:1}}),P(hi,{children:[h("input",{type:"checkbox",className:bn,id:D,checked:f,onChange:g}),h("label",{htmlFor:D,children:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A"}),h("input",{type:"checkbox",className:bn,id:T,checked:u,onChange:p}),h("label",{htmlFor:T,children:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F"})]}),P("button",{className:`primary-btn roll-btn ${cs}`,onClick:c,children:[h("svg",{children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),P("button",{className:`primary-btn roll-btn ${us}`,onClick:n,children:[h("svg",{children:h("use",{xlinkHref:"#widget-close"})}),h("span",{children:"\u5173\u95ED"})]})]}),h("div",{className:lt,ref:l,children:h(sn,{pageStart:0,loadMore:a,hasMore:!0,useWindow:!1,threshold:360,style:{minHeight:"100%"},loader:h("div",{className:ds,children:"\u52A0\u8F7D\u4E2D..."},0),children:h("div",{className:`video-card-list is-full ${fs}`,children:h("div",{id:yn,className:U("video-card-body",d),children:r.map((R,x)=>h(gn,{loading:s,item:R,className:U(vn,{[mn]:x===y})},R.uniqId))})})})})]})}),bs="_grid_svuzk_1",_s="_video-card-list_svuzk_6",zh={grid:bs,videoCardList:_s,expandBtn:"_expand-btn_svuzk_20",expanded:"_expanded_svuzk_31"};function wh({internalTesting:e=!1}){const t=v.useRef(null),{accessKey:n}=Ht(),r=ri(ef,{manual:!0}),i=B(async()=>{var T;await r.runAsync()&&((T=t.current)==null||T.set(!1))}),s=tf,o=B(()=>{const m="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(m,"_blank")}),l=v.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:c,loading:a,error:u,refresh:f}=ri(Vu);u&&console.error(u.stack||u);const[p,g]=v.useState(()=>q.initialShowMore),d=v.useCallback(()=>{g(!0)},[]),y=v.useCallback(()=>{g(!1)},[]);return h("section",{className:U("bili-grid",{"no-margin":!e},bs),"data-area":"\u63A8\u8350",children:P("div",{className:`video-card-list is-full ${_s}`,children:[P("div",{className:"area-header",children:[P("div",{className:"left",children:[h("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),h("svg",{className:"icon",children:h("use",{xlinkHref:"#channel-cinephile"})}),h("a",{className:"title",href:"#",children:h("span",{children:"\u63A8\u8350"})})]}),P("div",{className:"right",children:[n?P(hi,{ref:t,children:[h("button",{className:"primary-btn roll-btn",onClick:o,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:()=>i(),disabled:r.loading,children:h("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"\u5220\u9664 access_key"})})]}):P(it,{children:[h("button",{className:"primary-btn roll-btn",onClick:o,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:i,disabled:r.loading,children:h("span",{children:"\u83B7\u53D6 access_key"})})]}),P("button",{className:"primary-btn roll-btn",onClick:f,children:[h("svg",{style:{transform:"rotate(0deg)"},children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),P("button",{className:"primary-btn see-more",onClick:d,children:[h("span",{children:"\u67E5\u770B\u66F4\u591A"}),h("svg",{children:h("use",{xlinkHref:"#widget-arrow"})})]})]})]}),h(_h,{show:p,onHide:y}),h("div",{className:"video-card-body more-class1 more-class2",children:a||u?l.map(m=>h(gn,{},m)):c.map(m=>h(gn,{item:m},m.uniqId))})]})})}(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 Sh()})();async function Sh(){const t=Date.now()+1e4;let n=null,r=!1;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){n=document.querySelector(".bili-layout > section.bili-grid");break}if(Th()&&document.querySelector(".recommended-container")){r=!0,n=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await Ut.exports(100)}if(!n){console.error("[bilibili-app-recommend]: init fail");return}const i=document.createElement("section");n.insertAdjacentElement("afterend",i),Gt(i).render(h(wh,{internalTesting:r}))}function Th(){var e;return((e=document.querySelector("button.go-back"))==null?void 0:e.innerText.trim())==="\u9000\u51FA\u5185\u6D4B"}})(React,ReactDOM,axios,axiosGmxhrAdapter);