bilibili-app-recommend

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

当前为 2022-08-18 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.4.3
// @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_xmlhttpRequest
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        unsafeWindow
// ==/UserScript==

// use [email protected] at 2022-08-18T10:28:41.856Z

;(({ css = "" }) => {
  const style = document.createElement("style");
  style.innerText = css;
  style.dataset.source = "vite-plugin-monkey";
  document.head.appendChild(style);
})({
  "css": "._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_15xx7_1{position:relative}._image-wrapper_15xx7_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_15xx7_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_15xx7_8 ._preview-card-inner_15xx7_21{width:100%;height:100%}._watch-later_15xx7_25{z-index:3}._badge_15xx7_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_15xx7_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_15xx7_51{color:default}._btn-dislike_15xx7_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_15xx7_54 ._btn-dislike-icon_15xx7_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_15xx7_54 ._btn-dislike-tip_15xx7_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_15xx7_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_15xx7_91{border:1px solid #333}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111 ._dislike-icon_15xx7_122{color:inherit}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111 ._dislike-reason_15xx7_125{font-size:20px;text-align:center}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111 ._dislike-desc_15xx7_129{font-size:16px;text-align:center}._disliked-wrapper_15xx7_91 ._dislike-content-action_15xx7_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_15xx7_91 ._dislike-content-action_15xx7_133{border-top:1px solid #333}._disliked-wrapper_15xx7_91 ._dislike-content-action_15xx7_133 button{font-size:18px;color:inherit}._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_20olc_1{color:default}@media (min-width: 2200px){._video-card-list_20olc_5.is-full{grid-column:span 7!important}._video-card-list_20olc_5.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_20olc_5.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_20olc_5.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_20olc_19{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_20olc_19 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_20olc_19 svg._expanded_20olc_30{transform:rotate(0)}.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}\n"
});

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