// ==UserScript==
// @name bilibili-app-recommend
// @namespace https://magicdawn.fun
// @version 0.7.0
// @author magicdawn
// @description 为B站首页添加像App一样的推荐
// @license MIT
// @homepageURL https://github.com/magicdawn/bilibili-app-recommend
// @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues
// @match *://www.bilibili.com/
// @match *://www.bilibili.com/?*
// @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png
// @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?*
// @require https://unpkg.com/[email protected]/dist/axios.min.js
// @require https://unpkg.com/[email protected]/dist/axiosGmxhrAdapter.min.js
// @require https://unpkg.com/[email protected]/umd/react.production.min.js
// @require https://unpkg.com/[email protected]/umd/react-dom.production.min.js
// @connect app.bilibili.com
// @connect passport.bilibili.com
// @connect link.acg.tv
// @connect www.mcbbs.net
// @grant GM.xmlHttpRequest
// @grant GM_deleteValue
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// ==/UserScript==
(i=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=i,document.head.appendChild(e)})(`.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}._modal-mask_1fjgs_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_1fjgs_1{width:500px;max-height:calc(80vh - 50px);background-color:#fff;border-radius:10px;padding:0 15px 15px;display:flex;flex-direction:column;overflow:hidden}._modal-header_1fjgs_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal-body_1fjgs_30{padding-top:0;flex-grow:1;overflow-y:scroll}._modal-title_1fjgs_35{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._btn-close_1fjgs_42{margin-left:10px}._btn-close_1fjgs_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._btn-close_1fjgs_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._toast-container_mcbuq_1{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999999;padding:12px 24px;font-size:14px;min-width:200px;width:max-content;max-width:450px;background:#ffb243;color:#fff;border-radius:6px;white-space:pre-wrap}._toast-container_mcbuq_1._single-line_mcbuq_17{text-align:center}._modal_g0in4_1{width:500px}._title-desc_g0in4_4{margin-left:5px;font-size:40%}._reason-list_g0in4_8{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_g0in4_8{color:inherit;width:48%;text-align:center;line-height:20px;position:relative;border:1px solid #eee;padding-top:5px;padding-bottom:5px;margin-top:5px;margin-bottom:5px}body.dark ._reason_g0in4_8{border:1px solid #333}._reason-no_g0in4_29{position:absolute;left:6px;width:20px;height:20px;border-radius:50%;top:6px;display:flex;align-items:center;justify-content:center;background-color:#6a5acd;background-color:#fb7299;color:#fff}._tips_g0in4_43{margin-top:20px;display:flex;align-items:center}._bili-video-card_1a93a_1{position:relative}._image-wrapper_1a93a_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_1a93a_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._preview-card-wrapper_1a93a_8 ._preview-card-inner_1a93a_21{width:100%;height:100%}._watch-later_1a93a_25{z-index:3}._badge_1a93a_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_1a93a_36{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_1a93a_51{color:default}._btn-dislike_1a93a_54{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_1a93a_54 ._btn-dislike-icon_1a93a_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_1a93a_54 ._btn-dislike-tip_1a93a_76{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_1a93a_91{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_1a93a_91{border:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-icon_1a93a_122{margin-bottom:5px}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-reason_1a93a_125{font-size:20px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-desc_1a93a_129{font-size:16px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{border-top:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._video-grid_14t5i_9{display:grid;position:relative;width:100%;grid-gap:20px 12px}@media (max-width: 1099.9px){._video-grid_14t5i_9{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1100px) and (max-width: 1700.9px){._video-grid_14t5i_9{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}@media (min-width: 1701px){._video-grid_14t5i_9{grid-template-columns:repeat(6,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 13){display:none!important}}._video-grid_14t5i_9._internal-testing_14t5i_43{grid-gap:20px 20px}@media (max-width: 1399.9px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 5){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1400px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 6){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}._narrow-mode_14t5i_71{grid-template-columns:repeat(2,1fr)!important}._checkbox_5cp8u_1{margin-top:1px;cursor:pointer;outline:none}._checkbox_5cp8u_1+label{margin-left:2px;user-select:none;cursor:pointer}._config-icon_1jab1_1{line-height:1;margin-right:5px;font-size:0}._settings-group_1jab1_6{margin-bottom:10px}._settings-group_1jab1_6 ._settings-group-title_1jab1_9{font-size:2em}._settings-group_1jab1_6 ._settings-group-content_1jab1_12{color:default}._settings-group_1jab1_6 ._settings-group-content_1jab1_12 button:first-child{margin-left:0}._row_1jab1_18{display:flex;align-items:center}._check_1jab1_22{margin-left:20px}._check_1jab1_22:first-child{margin-left:0}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._modal-mask_1as61_1._narrow-mode_1as61_1{background-color:#000000e6}._modal_1as61_1{width:calc(100vw - 30px);height:calc(100vh - 30px);max-height:unset;padding-right:0}body.dark ._modal_1as61_1{border:1px solid #fb7299}._modal_1as61_1._narrow-mode_1as61_1{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1as61_1._narrow-mode_1as61_1{border:none}._modal-header_1as61_21,._modal-body_1as61_22{padding-right:15px}body.dark ._btn-refresh_1as61_25{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}
`);
var mv=Object.defineProperty;var gv=(p,me,Re)=>me in p?mv(p,me,{enumerable:!0,configurable:!0,writable:!0,value:Re}):p[me]=Re;var oi=(p,me,Re)=>(gv(p,typeof me!="symbol"?me+"":me,Re),Re);(function(p,me,Re,ga){"use strict";const Rt=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function va(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ie=Rt(p),ai=va(p),ya=Rt(me),ci=Rt(Re),ba=Rt(ga);var _a=typeof global=="object"&&global&&global.Object===Object&&global;const ui=_a;var wa=typeof self=="object"&&self&&self.Object===Object&&self,Sa=ui||wa||Function("return this")();const ge=Sa;var Ca=ge.Symbol;const ve=Ca;var li=Object.prototype,ka=li.hasOwnProperty,xa=li.toString,ot=ve?ve.toStringTag:void 0;function Ta(e){var t=ka.call(e,ot),n=e[ot];try{e[ot]=void 0;var r=!0}catch{}var i=xa.call(e);return r&&(t?e[ot]=n:delete e[ot]),i}var Ea=Object.prototype,Aa=Ea.toString;function La(e){return Aa.call(e)}var Oa="[object Null]",Ma="[object Undefined]",fi=ve?ve.toStringTag:void 0;function He(e){return e==null?e===void 0?Ma:Oa:fi&&fi in Object(e)?Ta(e):La(e)}function Ue(e){return e!=null&&typeof e=="object"}var Pa="[object Symbol]";function Nt(e){return typeof e=="symbol"||Ue(e)&&He(e)==Pa}function Ra(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 Na=Array.isArray;const ye=Na;var Da=1/0,di=ve?ve.prototype:void 0,hi=di?di.toString:void 0;function Tn(e){if(typeof e=="string")return e;if(ye(e))return Ra(e,Tn)+"";if(Nt(e))return hi?hi.call(e):"";var t=e+"";return t=="0"&&1/e==-Da?"-0":t}var $a=/\s/;function Ia(e){for(var t=e.length;t--&&$a.test(e.charAt(t)););return t}var Fa=/^\s+/;function ja(e){return e&&e.slice(0,Ia(e)+1).replace(Fa,"")}function Te(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pi=0/0,Wa=/^[-+]0x[0-9a-f]+$/i,za=/^0b[01]+$/i,Ba=/^0o[0-7]+$/i,Ha=parseInt;function En(e){if(typeof e=="number")return e;if(Nt(e))return pi;if(Te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ja(e);var n=za.test(e);return n||Ba.test(e)?Ha(e.slice(2),n?2:8):Wa.test(e)?pi:+e}var mi=1/0,Ua=17976931348623157e292;function Ga(e){if(!e)return e===0?e:0;if(e=En(e),e===mi||e===-mi){var t=e<0?-1:1;return t*Ua}return e===e?e:0}function gi(e){var t=Ga(e),n=t%1;return t===t?n?t-n:t:0}function vi(e){return e}var Ya="[object AsyncFunction]",Va="[object Function]",Ka="[object GeneratorFunction]",Xa="[object Proxy]";function yi(e){if(!Te(e))return!1;var t=He(e);return t==Va||t==Ka||t==Ya||t==Xa}var Za=ge["__core-js_shared__"];const An=Za;var bi=function(){var e=/[^.]+$/.exec(An&&An.keys&&An.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ja(e){return!!bi&&bi in e}var Qa=Function.prototype,qa=Qa.toString;function Ne(e){if(e!=null){try{return qa.call(e)}catch{}try{return e+""}catch{}}return""}var ec=/[\\^$.*+?()[\]{}|]/g,tc=/^\[object .+?Constructor\]$/,nc=Function.prototype,rc=Object.prototype,ic=nc.toString,sc=rc.hasOwnProperty,oc=RegExp("^"+ic.call(sc).replace(ec,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ac(e){if(!Te(e)||Ja(e))return!1;var t=yi(e)?oc:tc;return t.test(Ne(e))}function cc(e,t){return e==null?void 0:e[t]}function De(e,t){var n=cc(e,t);return ac(n)?n:void 0}var uc=De(ge,"WeakMap");const Ln=uc;function lc(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)}function fc(){}var dc=800,hc=16,pc=Date.now;function mc(e){var t=0,n=0;return function(){var r=pc(),i=hc-(r-n);if(n=r,i>0){if(++t>=dc)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function gc(e){return function(){return e}}var vc=function(){try{var e=De(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Dt=vc;var yc=Dt?function(e,t){return Dt(e,"toString",{configurable:!0,enumerable:!1,value:gc(t),writable:!0})}:vi,bc=mc(yc);const _c=bc;function wc(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Sc(e){return e!==e}function Cc(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function kc(e,t,n){return t===t?Cc(e,t,n):wc(e,Sc,n)}function xc(e,t){var n=e==null?0:e.length;return!!n&&kc(e,t,0)>-1}var Tc=9007199254740991,Ec=/^(?:0|[1-9]\d*)$/;function On(e,t){var n=typeof e;return t=t==null?Tc:t,!!t&&(n=="number"||n!="symbol"&&Ec.test(e))&&e>-1&&e%1==0&&e<t}function Ac(e,t,n){t=="__proto__"&&Dt?Dt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Mn(e,t){return e===t||e!==e&&t!==t}var Lc=Object.prototype,Oc=Lc.hasOwnProperty;function Mc(e,t,n){var r=e[t];(!(Oc.call(e,t)&&Mn(r,n))||n===void 0&&!(t in e))&&Ac(e,t,n)}var _i=Math.max;function Pc(e,t,n){return t=_i(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=_i(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=r[i];return c[t]=n(o),lc(e,this,c)}}var Rc=9007199254740991;function Pn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Rc}function Nc(e){return e!=null&&Pn(e.length)&&!yi(e)}var Dc=Object.prototype;function $c(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Dc;return e===n}function Ic(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Fc="[object Arguments]";function wi(e){return Ue(e)&&He(e)==Fc}var Si=Object.prototype,jc=Si.hasOwnProperty,Wc=Si.propertyIsEnumerable,zc=wi(function(){return arguments}())?wi:function(e){return Ue(e)&&jc.call(e,"callee")&&!Wc.call(e,"callee")};const Rn=zc;function Bc(){return!1}var Ci=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ki=Ci&&typeof module=="object"&&module&&!module.nodeType&&module,Hc=ki&&ki.exports===Ci,xi=Hc?ge.Buffer:void 0,Uc=xi?xi.isBuffer:void 0,Gc=Uc||Bc;const Nn=Gc;var Yc="[object Arguments]",Vc="[object Array]",Kc="[object Boolean]",Xc="[object Date]",Zc="[object Error]",Jc="[object Function]",Qc="[object Map]",qc="[object Number]",eu="[object Object]",tu="[object RegExp]",nu="[object Set]",ru="[object String]",iu="[object WeakMap]",su="[object ArrayBuffer]",ou="[object DataView]",au="[object Float32Array]",cu="[object Float64Array]",uu="[object Int8Array]",lu="[object Int16Array]",fu="[object Int32Array]",du="[object Uint8Array]",hu="[object Uint8ClampedArray]",pu="[object Uint16Array]",mu="[object Uint32Array]",U={};U[au]=U[cu]=U[uu]=U[lu]=U[fu]=U[du]=U[hu]=U[pu]=U[mu]=!0,U[Yc]=U[Vc]=U[su]=U[Kc]=U[ou]=U[Xc]=U[Zc]=U[Jc]=U[Qc]=U[qc]=U[eu]=U[tu]=U[nu]=U[ru]=U[iu]=!1;function gu(e){return Ue(e)&&Pn(e.length)&&!!U[He(e)]}function vu(e){return function(t){return e(t)}}var Ti=typeof exports=="object"&&exports&&!exports.nodeType&&exports,at=Ti&&typeof module=="object"&&module&&!module.nodeType&&module,yu=at&&at.exports===Ti,Dn=yu&&ui.process,bu=function(){try{var e=at&&at.require&&at.require("util").types;return e||Dn&&Dn.binding&&Dn.binding("util")}catch{}}();const Ei=bu;var Ai=Ei&&Ei.isTypedArray,_u=Ai?vu(Ai):gu;const Li=_u;var wu=Object.prototype,Su=wu.hasOwnProperty;function Cu(e,t){var n=ye(e),r=!n&&Rn(e),i=!n&&!r&&Nn(e),s=!n&&!r&&!i&&Li(e),o=n||r||i||s,c=o?Ic(e.length,String):[],u=c.length;for(var a in e)(t||Su.call(e,a))&&!(o&&(a=="length"||i&&(a=="offset"||a=="parent")||s&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||On(a,u)))&&c.push(a);return c}function ku(e,t){return function(n){return e(t(n))}}var xu=ku(Object.keys,Object);const Tu=xu;var Eu=Object.prototype,Au=Eu.hasOwnProperty;function Lu(e){if(!$c(e))return Tu(e);var t=[];for(var n in Object(e))Au.call(e,n)&&n!="constructor"&&t.push(n);return t}function Oi(e){return Nc(e)?Cu(e):Lu(e)}var Ou=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mu=/^\w*$/;function $n(e,t){if(ye(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Nt(e)?!0:Mu.test(e)||!Ou.test(e)||t!=null&&e in Object(t)}var Pu=De(Object,"create");const ct=Pu;function Ru(){this.__data__=ct?ct(null):{},this.size=0}function Nu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Du="__lodash_hash_undefined__",$u=Object.prototype,Iu=$u.hasOwnProperty;function Fu(e){var t=this.__data__;if(ct){var n=t[e];return n===Du?void 0:n}return Iu.call(t,e)?t[e]:void 0}var ju=Object.prototype,Wu=ju.hasOwnProperty;function zu(e){var t=this.__data__;return ct?t[e]!==void 0:Wu.call(t,e)}var Bu="__lodash_hash_undefined__";function Hu(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ct&&t===void 0?Bu:t,this}function $e(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])}}$e.prototype.clear=Ru,$e.prototype.delete=Nu,$e.prototype.get=Fu,$e.prototype.has=zu,$e.prototype.set=Hu;function Uu(){this.__data__=[],this.size=0}function $t(e,t){for(var n=e.length;n--;)if(Mn(e[n][0],t))return n;return-1}var Gu=Array.prototype,Yu=Gu.splice;function Vu(e){var t=this.__data__,n=$t(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Yu.call(t,n,1),--this.size,!0}function Ku(e){var t=this.__data__,n=$t(t,e);return n<0?void 0:t[n][1]}function Xu(e){return $t(this.__data__,e)>-1}function Zu(e,t){var n=this.__data__,r=$t(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ee(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])}}Ee.prototype.clear=Uu,Ee.prototype.delete=Vu,Ee.prototype.get=Ku,Ee.prototype.has=Xu,Ee.prototype.set=Zu;var Ju=De(ge,"Map");const ut=Ju;function Qu(){this.size=0,this.__data__={hash:new $e,map:new(ut||Ee),string:new $e}}function qu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function It(e,t){var n=e.__data__;return qu(t)?n[typeof t=="string"?"string":"hash"]:n.map}function el(e){var t=It(this,e).delete(e);return this.size-=t?1:0,t}function tl(e){return It(this,e).get(e)}function nl(e){return It(this,e).has(e)}function rl(e,t){var n=It(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ae(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])}}Ae.prototype.clear=Qu,Ae.prototype.delete=el,Ae.prototype.get=tl,Ae.prototype.has=nl,Ae.prototype.set=rl;var il="Expected a function";function In(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(il);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(In.Cache||Ae),n}In.Cache=Ae;var sl=500;function ol(e){var t=In(e,function(r){return n.size===sl&&n.clear(),r}),n=t.cache;return t}var al=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cl=/\\(\\)?/g,ul=ol(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(al,function(n,r,i,s){t.push(i?s.replace(cl,"$1"):r||n)}),t});const ll=ul;function Mi(e){return e==null?"":Tn(e)}function Ft(e,t){return ye(e)?e:$n(e,t)?[e]:ll(Mi(e))}var fl=1/0;function lt(e){if(typeof e=="string"||Nt(e))return e;var t=e+"";return t=="0"&&1/e==-fl?"-0":t}function Fn(e,t){t=Ft(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[lt(t[n++])];return n&&n==r?e:void 0}function dl(e,t,n){var r=e==null?void 0:Fn(e,t);return r===void 0?n:r}function Pi(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ri=ve?ve.isConcatSpreadable:void 0;function hl(e){return ye(e)||Rn(e)||!!(Ri&&e&&e[Ri])}function Ni(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=hl),i||(i=[]);++s<o;){var c=e[s];t>0&&n(c)?t>1?Ni(c,t-1,n,r,i):Pi(i,c):r||(i[i.length]=c)}return i}function pl(e){var t=e==null?0:e.length;return t?Ni(e,1):[]}function ml(e){return _c(Pc(e,void 0,pl),e+"")}var gl="Expected a function";function vl(e,t){var n;if(typeof t!="function")throw new TypeError(gl);return e=gi(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}function yl(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 bl(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:yl(e,t,n)}var _l="\\ud800-\\udfff",wl="\\u0300-\\u036f",Sl="\\ufe20-\\ufe2f",Cl="\\u20d0-\\u20ff",kl=wl+Sl+Cl,xl="\\ufe0e\\ufe0f",Tl="\\u200d",El=RegExp("["+Tl+_l+kl+xl+"]");function jn(e){return El.test(e)}function Al(e){return e.split("")}var Di="\\ud800-\\udfff",Ll="\\u0300-\\u036f",Ol="\\ufe20-\\ufe2f",Ml="\\u20d0-\\u20ff",Pl=Ll+Ol+Ml,Rl="\\ufe0e\\ufe0f",Nl="["+Di+"]",Wn="["+Pl+"]",zn="\\ud83c[\\udffb-\\udfff]",Dl="(?:"+Wn+"|"+zn+")",$i="[^"+Di+"]",Ii="(?:\\ud83c[\\udde6-\\uddff]){2}",Fi="[\\ud800-\\udbff][\\udc00-\\udfff]",$l="\\u200d",ji=Dl+"?",Wi="["+Rl+"]?",Il="(?:"+$l+"(?:"+[$i,Ii,Fi].join("|")+")"+Wi+ji+")*",Fl=Wi+ji+Il,jl="(?:"+[$i+Wn+"?",Wn,Ii,Fi,Nl].join("|")+")",Wl=RegExp(zn+"(?="+zn+")|"+jl+Fl,"g");function zl(e){return e.match(Wl)||[]}function Bl(e){return jn(e)?zl(e):Al(e)}function Hl(){this.__data__=new Ee,this.size=0}function Ul(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gl(e){return this.__data__.get(e)}function Yl(e){return this.__data__.has(e)}var Vl=200;function Kl(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ut||r.length<Vl-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ae(r)}return n.set(e,t),this.size=n.size,this}function Le(e){var t=this.__data__=new Ee(e);this.size=t.size}Le.prototype.clear=Hl,Le.prototype.delete=Ul,Le.prototype.get=Gl,Le.prototype.has=Yl,Le.prototype.set=Kl;function Xl(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 Zl(){return[]}var Jl=Object.prototype,Ql=Jl.propertyIsEnumerable,zi=Object.getOwnPropertySymbols,ql=zi?function(e){return e==null?[]:(e=Object(e),Xl(zi(e),function(t){return Ql.call(e,t)}))}:Zl;const ef=ql;function tf(e,t,n){var r=t(e);return ye(e)?r:Pi(r,n(e))}function Bi(e){return tf(e,Oi,ef)}var nf=De(ge,"DataView");const Bn=nf;var rf=De(ge,"Promise");const Hn=rf;var sf=De(ge,"Set");const Ge=sf;var Hi="[object Map]",of="[object Object]",Ui="[object Promise]",Gi="[object Set]",Yi="[object WeakMap]",Vi="[object DataView]",af=Ne(Bn),cf=Ne(ut),uf=Ne(Hn),lf=Ne(Ge),ff=Ne(Ln),Ie=He;(Bn&&Ie(new Bn(new ArrayBuffer(1)))!=Vi||ut&&Ie(new ut)!=Hi||Hn&&Ie(Hn.resolve())!=Ui||Ge&&Ie(new Ge)!=Gi||Ln&&Ie(new Ln)!=Yi)&&(Ie=function(e){var t=He(e),n=t==of?e.constructor:void 0,r=n?Ne(n):"";if(r)switch(r){case af:return Vi;case cf:return Hi;case uf:return Ui;case lf:return Gi;case ff:return Yi}return t});const Ki=Ie;var df=ge.Uint8Array;const Xi=df;var hf="__lodash_hash_undefined__";function pf(e){return this.__data__.set(e,hf),this}function mf(e){return this.__data__.has(e)}function ft(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ae;++t<n;)this.add(e[t])}ft.prototype.add=ft.prototype.push=pf,ft.prototype.has=mf;function gf(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 Zi(e,t){return e.has(t)}var vf=1,yf=2;function Ji(e,t,n,r,i,s){var o=n&vf,c=e.length,u=t.length;if(c!=u&&!(o&&u>c))return!1;var a=s.get(e),l=s.get(t);if(a&&l)return a==t&&l==e;var f=-1,d=!0,g=n&yf?new ft:void 0;for(s.set(e,t),s.set(t,e);++f<c;){var h=e[f],y=t[f];if(r)var v=o?r(y,h,f,t,e,s):r(h,y,f,e,t,s);if(v!==void 0){if(v)continue;d=!1;break}if(g){if(!gf(t,function(S,L){if(!Zi(g,L)&&(h===S||i(h,S,n,r,s)))return g.push(L)})){d=!1;break}}else if(!(h===y||i(h,y,n,r,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function bf(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Un(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var _f=1,wf=2,Sf="[object Boolean]",Cf="[object Date]",kf="[object Error]",xf="[object Map]",Tf="[object Number]",Ef="[object RegExp]",Af="[object Set]",Lf="[object String]",Of="[object Symbol]",Mf="[object ArrayBuffer]",Pf="[object DataView]",Qi=ve?ve.prototype:void 0,Gn=Qi?Qi.valueOf:void 0;function Rf(e,t,n,r,i,s,o){switch(n){case Pf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mf:return!(e.byteLength!=t.byteLength||!s(new Xi(e),new Xi(t)));case Sf:case Cf:case Tf:return Mn(+e,+t);case kf:return e.name==t.name&&e.message==t.message;case Ef:case Lf:return e==t+"";case xf:var c=bf;case Af:var u=r&_f;if(c||(c=Un),e.size!=t.size&&!u)return!1;var a=o.get(e);if(a)return a==t;r|=wf,o.set(e,t);var l=Ji(c(e),c(t),r,i,s,o);return o.delete(e),l;case Of:if(Gn)return Gn.call(e)==Gn.call(t)}return!1}var Nf=1,Df=Object.prototype,$f=Df.hasOwnProperty;function If(e,t,n,r,i,s){var o=n&Nf,c=Bi(e),u=c.length,a=Bi(t),l=a.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var d=c[f];if(!(o?d in t:$f.call(t,d)))return!1}var g=s.get(e),h=s.get(t);if(g&&h)return g==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=o;++f<u;){d=c[f];var S=e[d],L=t[d];if(r)var D=o?r(L,S,d,t,e,s):r(S,L,d,e,t,s);if(!(D===void 0?S===L||i(S,L,n,r,s):D)){y=!1;break}v||(v=d=="constructor")}if(y&&!v){var x=e.constructor,_=t.constructor;x!=_&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _)&&(y=!1)}return s.delete(e),s.delete(t),y}var Ff=1,qi="[object Arguments]",es="[object Array]",jt="[object Object]",jf=Object.prototype,ts=jf.hasOwnProperty;function Wf(e,t,n,r,i,s){var o=ye(e),c=ye(t),u=o?es:Ki(e),a=c?es:Ki(t);u=u==qi?jt:u,a=a==qi?jt:a;var l=u==jt,f=a==jt,d=u==a;if(d&&Nn(e)){if(!Nn(t))return!1;o=!0,l=!1}if(d&&!l)return s||(s=new Le),o||Li(e)?Ji(e,t,n,r,i,s):Rf(e,t,u,n,r,i,s);if(!(n&Ff)){var g=l&&ts.call(e,"__wrapped__"),h=f&&ts.call(t,"__wrapped__");if(g||h){var y=g?e.value():e,v=h?t.value():t;return s||(s=new Le),i(y,v,n,r,s)}}return d?(s||(s=new Le),If(e,t,n,r,i,s)):!1}function Wt(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ue(e)&&!Ue(t)?e!==e&&t!==t:Wf(e,t,n,r,Wt,i)}var zf=1,Bf=2;function Hf(e,t,n,r){var i=n.length,s=i,o=!r;if(e==null)return!s;for(e=Object(e);i--;){var c=n[i];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<s;){c=n[i];var u=c[0],a=e[u],l=c[1];if(o&&c[2]){if(a===void 0&&!(u in e))return!1}else{var f=new Le;if(r)var d=r(a,l,u,e,t,f);if(!(d===void 0?Wt(l,a,zf|Bf,r,f):d))return!1}}return!0}function ns(e){return e===e&&!Te(e)}function Uf(e){for(var t=Oi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ns(i)]}return t}function rs(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Gf(e){var t=Uf(e);return t.length==1&&t[0][2]?rs(t[0][0],t[0][1]):function(n){return n===e||Hf(n,e,t)}}function Yf(e,t){return e!=null&&t in Object(e)}function Vf(e,t,n){t=Ft(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=lt(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&&Pn(i)&&On(o,i)&&(ye(e)||Rn(e)))}function is(e,t){return e!=null&&Vf(e,t,Yf)}var Kf=1,Xf=2;function Zf(e,t){return $n(e)&&ns(t)?rs(lt(e),t):function(n){var r=dl(n,e);return r===void 0&&r===t?is(n,e):Wt(t,r,Kf|Xf)}}function ss(e){return function(t){return t==null?void 0:t[e]}}function Jf(e){return function(t){return Fn(t,e)}}function Qf(e){return $n(e)?ss(lt(e)):Jf(e)}function qf(e){return typeof e=="function"?e:e==null?vi:typeof e=="object"?ye(e)?Zf(e[0],e[1]):Gf(e):Qf(e)}var ed=function(){return ge.Date.now()};const Yn=ed;var td="Expected a function",nd=Math.max,rd=Math.min;function os(e,t,n){var r,i,s,o,c,u,a=0,l=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(td);t=En(t)||0,Te(n)&&(l=!!n.leading,f="maxWait"in n,s=f?nd(En(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d);function g(b){var T=r,M=i;return r=i=void 0,a=b,o=e.apply(M,T),o}function h(b){return a=b,c=setTimeout(S,t),l?g(b):o}function y(b){var T=b-u,M=b-a,$=t-T;return f?rd($,s-M):$}function v(b){var T=b-u,M=b-a;return u===void 0||T>=t||T<0||f&&M>=s}function S(){var b=Yn();if(v(b))return L(b);c=setTimeout(S,y(b))}function L(b){return c=void 0,d&&r?g(b):(r=i=void 0,o)}function D(){c!==void 0&&clearTimeout(c),a=0,r=u=i=c=void 0}function x(){return c===void 0?o:L(Yn())}function _(){var b=Yn(),T=v(b);if(r=arguments,i=this,u=b,T){if(c===void 0)return h(u);if(f)return clearTimeout(c),c=setTimeout(S,t),g(u)}return c===void 0&&(c=setTimeout(S,t)),o}return _.cancel=D,_.flush=x,_}function id(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function sd(e,t){return Wt(e,t)}function od(e,t,n,r){if(!Te(e))return e;t=Ft(t,e);for(var i=-1,s=t.length,o=s-1,c=e;c!=null&&++i<s;){var u=lt(t[i]),a=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var l=c[u];a=r?r(l,u,c):void 0,a===void 0&&(a=Te(l)?l:On(t[i+1])?[]:{})}Mc(c,u,a),c=c[u]}return e}function ad(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],c=Fn(e,o);n(c,o)&&od(s,Ft(o,e),c)}return s}function cd(e){return vl(2,e)}var ud=9007199254740991,ld=Math.floor;function as(e,t){var n="";if(!e||t<1||t>ud)return n;do t%2&&(n+=e),t=ld(t/2),t&&(e+=e);while(t);return n}var fd=ss("length");const dd=fd;var cs="\\ud800-\\udfff",hd="\\u0300-\\u036f",pd="\\ufe20-\\ufe2f",md="\\u20d0-\\u20ff",gd=hd+pd+md,vd="\\ufe0e\\ufe0f",yd="["+cs+"]",Vn="["+gd+"]",Kn="\\ud83c[\\udffb-\\udfff]",bd="(?:"+Vn+"|"+Kn+")",us="[^"+cs+"]",ls="(?:\\ud83c[\\udde6-\\uddff]){2}",fs="[\\ud800-\\udbff][\\udc00-\\udfff]",_d="\\u200d",ds=bd+"?",hs="["+vd+"]?",wd="(?:"+_d+"(?:"+[us,ls,fs].join("|")+")"+hs+ds+")*",Sd=hs+ds+wd,Cd="(?:"+[us+Vn+"?",Vn,ls,fs,yd].join("|")+")",ps=RegExp(Kn+"(?="+Kn+")|"+Cd+Sd,"g");function kd(e){for(var t=ps.lastIndex=0;ps.test(e);)++t;return t}function ms(e){return jn(e)?kd(e):dd(e)}var xd=Math.ceil;function Td(e,t){t=t===void 0?" ":Tn(t);var n=t.length;if(n<2)return n?as(t,e):t;var r=as(t,xd(e/ms(t)));return jn(t)?bl(Bl(r),0,e).join(""):r.slice(0,e)}function Ed(e,t,n){e=Mi(e),t=gi(t);var r=t?ms(e):0;return t&&r<t?Td(t-r,n)+e:e}function Ad(e,t){return ad(e,t,function(n,r){return is(e,r)})}var Ld=ml(function(e,t){return e==null?{}:Ad(e,t)});const gs=Ld;var Od="Expected a function";function Md(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Od);return Te(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),os(e,t,{leading:r,maxWait:t,trailing:i})}var Pd=1/0,Rd=Ge&&1/Un(new Ge([,-0]))[1]==Pd?function(e){return new Ge(e)}:fc;const Nd=Rd;var Dd=200;function $d(e,t,n){var r=-1,i=xc,s=e.length,o=!0,c=[],u=c;if(n)o=!1,i=id;else if(s>=Dd){var a=t?null:Nd(e);if(a)return Un(a);o=!1,i=Zi,u=new ft}else u=t?[]:c;e:for(;++r<s;){var l=e[r],f=t?t(l):l;if(l=n||l!==0?l:0,o&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),c.push(l)}else i(u,f,n)||(u!==c&&u.push(f),c.push(l))}return c}function Id(e,t){return e&&e.length?$d(e,qf(t)):[]}const Xn=Symbol(),Fd=Symbol(),Zn=Symbol();let jd=(e,t)=>new Proxy(e,t);const Jn=Object.getPrototypeOf,Qn=new WeakMap,vs=e=>e&&(Qn.has(e)?Qn.get(e):Jn(e)===Object.prototype||Jn(e)===Array.prototype),ys=e=>typeof e=="object"&&e!==null,bs=new WeakMap,_s=e=>e[Zn]||e,ws=(e,t,n)=>{if(!vs(e))return e;const r=_s(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(c=>!c.writable))(r);let s=n&&n.get(r);return s&&s[1].f===i||(s=((o,c)=>{const u={f:c};let a=!1;const l=(d,g)=>{if(!a){let h=u.a.get(o);h||(h=new Set,u.a.set(o,h)),g&&h.has(Xn)||h.add(d)}},f={get:(d,g)=>g===Zn?o:(l(g),ws(d[g],u.a,u.c)),has:(d,g)=>g===Fd?(a=!0,u.a.delete(o),!0):(l(g),g in d),getOwnPropertyDescriptor:(d,g)=>(l(g,!0),Object.getOwnPropertyDescriptor(d,g)),ownKeys:d=>(l(Xn),Reflect.ownKeys(d))};return c&&(f.set=f.deleteProperty=()=>!1),[f,u]})(r,i),s[1].p=jd(i?(o=>{let c=bs.get(o);if(!c){if(Array.isArray(o))c=Array.from(o);else{const u=Object.getOwnPropertyDescriptors(o);Object.values(u).forEach(a=>{a.configurable=!0}),c=Object.create(Jn(o),u)}bs.set(o,c)}return c})(r):r,s[0]),n&&n.set(r,s)),s[1].a=t,s[1].c=n,s[1].p},Wd=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((i,s)=>i!==r[s])},Ss=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!ys(e)||!ys(t))return!0;const i=n.get(_s(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 c=o===Xn?Wd(e,t):Ss(e[o],t[o],n,r);if(c!==!0&&c!==!1||(s=c),s)break}return s===null&&(s=!0),r&&r.set(e,{n:t,g:s}),s},Cs=e=>vs(e)&&e[Zn]||null,ks=(e,t=!0)=>{Qn.set(e,t)};var zd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xs={exports:{}},Ts={};/**
* @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 Ye=ie.default;function Hd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ud=typeof Object.is=="function"?Object.is:Hd,Gd=Ye.useState,Yd=Ye.useEffect,Vd=Ye.useLayoutEffect,Kd=Ye.useDebugValue;function Xd(e,t){var n=t(),r=Gd({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Vd(function(){i.value=n,i.getSnapshot=t,qn(i)&&s({inst:i})},[e,n,t]),Yd(function(){return qn(i)&&s({inst:i}),e(function(){qn(i)&&s({inst:i})})},[e]),Kd(n),n}function qn(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ud(e,n)}catch{return!0}}function Zd(e,t){return t()}var Jd=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Zd:Xd;Ts.useSyncExternalStore=Ye.useSyncExternalStore!==void 0?Ye.useSyncExternalStore:Jd,function(e){e.exports=Ts}(xs);const Qd=Bd(xs.exports),er=e=>typeof e=="object"&&e!==null,ue=Symbol(),tr=new WeakSet,qd=(e=Object.is,t=(a,l)=>new Proxy(a,l),n=a=>er(a)&&!tr.has(a)&&(Array.isArray(a)||!(Symbol.iterator in a))&&!(a instanceof WeakMap)&&!(a instanceof WeakSet)&&!(a instanceof Error)&&!(a instanceof Number)&&!(a instanceof Date)&&!(a instanceof String)&&!(a instanceof RegExp)&&!(a instanceof ArrayBuffer),r=a=>{switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:throw a}},i=new WeakMap,s=(a,l,f,d=r)=>{const g=i.get(l);if((g==null?void 0:g[0])===f)return g[1];const h=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a));return ks(h,!0),i.set(l,[f,h]),Reflect.ownKeys(a).forEach(y=>{const v=Reflect.get(a,y,l);tr.has(v)?(ks(v,!1),h[y]=v):v instanceof Promise?Object.defineProperty(h,y,{get(){return d(v)}}):v!=null&&v[ue]?h[y]=nr(v,d):h[y]=v}),Object.freeze(h)},o=new WeakMap,c=[1],u=a=>{if(!er(a))throw new Error("object required");const l=o.get(a);if(l)return l;let f=c[0];const d=new Set,g=(x,_=++c[0])=>{f!==_&&(f=_,d.forEach(b=>b(x,_)))},h=new Map,y=x=>{let _=h.get(x);return _||(_=(b,T)=>{const M=[...b];M[1]=[x,...M[1]],g(M,T)},h.set(x,_)),_},v=x=>{const _=h.get(x);return h.delete(x),_},S=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a)),D=t(S,{get(x,_,b){return _===ue?[x,b,f,s,d]:Reflect.get(x,_,b)},deleteProperty(x,_){var b;const T=Reflect.get(x,_),M=(b=T==null?void 0:T[ue])==null?void 0:b[4];M&&M.delete(v(_));const $=Reflect.deleteProperty(x,_);return $&&g(["delete",[_],T]),$},set(x,_,b,T){var M,$;const I=Reflect.has(x,_),P=Reflect.get(x,_,T);if(I&&e(P,b))return!0;const F=(M=P==null?void 0:P[ue])==null?void 0:M[4];F&&F.delete(v(_)),er(b)&&(b=Cs(b)||b);let k=b;return($=Object.getOwnPropertyDescriptor(x,_))!=null&&$.set||(b instanceof Promise?b.then(w=>{b.status="fulfilled",b.value=w,g(["resolve",[_],w])}).catch(w=>{b.status="rejected",b.reason=w,g(["reject",[_],w])}):(!(b!=null&&b[ue])&&n(b)&&(k=Ve(b)),k!=null&&k[ue]&&k[ue][4].add(y(_)))),Reflect.set(x,_,k,T),g(["set",[_],b,P]),!0}});return o.set(a,D),Reflect.ownKeys(a).forEach(x=>{const _=Object.getOwnPropertyDescriptor(a,x);_.get||_.set?Object.defineProperty(S,x,_):D[x]=a[x]}),D})=>[u,ue,tr,e,t,n,r,i,s,o,c],[eh]=qd();function Ve(e={}){return eh(e)}function Es(e,t,n){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[ue])&&console.warn("Please use proxy object");let r;const i=[],s=e[ue][4],o=c=>{if(i.push(c),n){t(i.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,s.has(o)&&t(i.splice(0))}))};return s.add(o),()=>s.delete(o)}function nr(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[ue])&&console.warn("Please use proxy object");const[n,r,i,s]=e[ue];return s(n,r,i,t)}const{use:As}=ie.default,{useSyncExternalStore:th}=Qd,nh=(e,t)=>{const n=[],r=new WeakSet,i=(s,o)=>{if(r.has(s))return;let c;typeof s=="object"&&s!==null&&(r.add(s),c=t.get(Cs(s)||s)),c?c.forEach(u=>{"value"in(Object.getOwnPropertyDescriptor(s,u)||{})&&i(s[u],o?[...o,u]:[u])}):o&&n.push(o)};return i(e),n},rh=(e,t)=>{const n=p.useRef();p.useEffect(()=>{n.current=nh(e,t)}),p.useDebugValue(n.current)};function dt(e,t){const n=t==null?void 0:t.sync,r=p.useRef(),i=p.useRef();let s=!0;const o=th(p.useCallback(a=>{const l=Es(e,a,n);return a(),l},[e,n]),()=>{const a=nr(e,As);try{if(!s&&r.current&&i.current&&!Ss(r.current,a,i.current,new WeakMap))return r.current}catch{}return a},()=>nr(e,As));s=!1;const c=new WeakMap;p.useEffect(()=>{r.current=o,i.current=c}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&rh(o,c);const u=p.useMemo(()=>new WeakMap,[]);return ws(o,c,u)}const rr={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1,openInIINAWhenRightClick:!1,getRecommendParallelRequest:!0},de=Ve({...rr}),Ls=Object.keys(rr),Fe=function(){return dt(de)},Os="bilibili-app-recommend",ir=`${Os}.config`,zt=`${Os}.settings`;function ih(){Object.keys(GM_getValue(ir)||{}).length&&!Object.keys(GM_getValue(zt)||{}).length&&(GM_setValue(zt,GM_getValue(ir)),GM_deleteValue(ir));const e=GM_getValue(zt);e&&typeof e=="object"&&Object.assign(de,gs(e,Ls)),Es(de,()=>{sh()})}function sh(){const e=gs(de,Ls);GM_setValue(zt,e)}function Ms(e){Object.assign(de,e)}function oh(){return Ms(rr)}ih();var ht={exports:{}};const ah=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Ps=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Rs=({clearTimeout:e,setTimeout:t,willResolve:n})=>(r,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(Ps());let o,c,u;const a=e||clearTimeout,l=()=>{a(o),u(Ps())},f=()=>{s&&s.removeEventListener("abort",l)},d=new Promise((g,h)=>{c=()=>{f(),n?g(i):h(i)},u=h,o=(t||setTimeout)(c,r)});return s&&s.addEventListener("abort",l,{once:!0}),d.clear=()=>{a(o),o=null,c()},d},Ns=e=>{const t=Rs({...e,willResolve:!0});return t.reject=Rs({...e,willResolve:!1}),t.range=(n,r,i)=>t(ah(n,r),i),t},sr=Ns();sr.createWithTimers=Ns,ht.exports=sr,ht.exports.default=sr;var Bt,Ds=ya.default;Bt=Ds.createRoot,Ds.hydrateRoot;const yv="",pt=cd(()=>!!document.querySelectorAll(".bili-feed4").length),$s=document.querySelector(".bili-header__bar"),Is=Boolean($s&&window.getComputedStyle($s).display==="none")?50:64,Fs=()=>document.body.classList.contains("dark"),js=Ve({value:Fs()});function or(){return dt(js).value}const Ht=new MutationObserver(function(){js.value=Fs()});Ht.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{Ht==null||Ht.disconnect()});var ar={},te={};Object.defineProperty(te,"__esModule",{value:!0}),te.DEFAULT_ICON_CONFIGS=void 0,te.IconConverter=Us,te.IconProvider=void 0,te.IconWrapper=mh;var Ut=ch(ie.default);function Ws(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ws=function(r){return r?n:t})(e)}function ch(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ws(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}var uh=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zs(Object(n),!0).forEach(function(r){lh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fh(e,t){if(e==null)return{};var n=dh(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function dh(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hs={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};te.DEFAULT_ICON_CONFIGS=Hs;function hh(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Us(e,t,n){var r=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||n.theme;switch(s){case"outline":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("none"),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.twoTone.twoTone),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.multiColor.outFillColor),i.push(typeof r[2]=="string"?r[2]:n.colors.multiColor.innerStrokeColor),i.push(typeof r[3]=="string"?r[3]:n.colors.multiColor.innerFillColor);break}return{size:t.size||n.size,strokeWidth:t.strokeWidth||n.strokeWidth,strokeLinecap:t.strokeLinecap||n.strokeLinecap,strokeLinejoin:t.strokeLinejoin||n.strokeLinejoin,colors:i,id:e}}var Gs=(0,Ut.createContext)(Hs),ph=Gs.Provider;te.IconProvider=ph;function mh(e,t,n){return function(r){var i=r.size,s=r.strokeWidth,o=r.strokeLinecap,c=r.strokeLinejoin,u=r.theme,a=r.fill,l=r.className,f=r.spin,d=fh(r,uh),g=(0,Ut.useContext)(Gs),h=(0,Ut.useMemo)(hh,[]),y=Us(h,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:c,theme:u,fill:a},g),v=[g.prefix+"-icon"];return v.push(g.prefix+"-icon-"+e),t&&g.rtl&&v.push(g.prefix+"-icon-rtl"),f&&v.push(g.prefix+"-icon-spin"),l&&v.push(l),Ut.default.createElement("span",Bs(Bs({},d),{},{className:v.join(" ")}),n(y))}}Object.defineProperty(ar,"__esModule",{value:!0});var Ys=ar.default=void 0,cr=vh(ie.default),gh=te;function vh(e){return e&&e.__esModule?e:{default:e}}var yh=(0,gh.IconWrapper)("close",!1,function(e){return cr.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},cr.default.createElement("path",{d:"M8 8L40 40",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),cr.default.createElement("path",{d:"M8 40L40 8",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Ys=ar.default=yh;var ur={};Object.defineProperty(ur,"__esModule",{value:!0});var Vs=ur.default=void 0,lr=_h(ie.default),bh=te;function _h(e){return e&&e.__esModule?e:{default:e}}var wh=(0,bh.IconWrapper)("config",!1,function(e){return lr.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},lr.default.createElement("path",{d:"M24 4L18 10H10V18L4 24L10 30V38H18L24 44L30 38H38V30L44 24L38 18V10H30L24 4Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),lr.default.createElement("path",{d:"M24 30C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30Z",fill:e.colors[3],stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}))});Vs=ur.default=wh;var fr={};Object.defineProperty(fr,"__esModule",{value:!0});var Ks=fr.default=void 0,mt=Ch(ie.default),Sh=te;function Ch(e){return e&&e.__esModule?e:{default:e}}var kh=(0,Sh.IconWrapper)("distraught-face",!1,function(e){return mt.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},mt.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),mt.default.createElement("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),mt.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),mt.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Ks=fr.default=kh;var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Xs=dr.default=void 0,gt=Th(ie.default),xh=te;function Th(e){return e&&e.__esModule?e:{default:e}}var Eh=(0,xh.IconWrapper)("info",!0,function(e){return gt.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},gt.default.createElement("path",{d:"M24 44C29.5228 44 34.5228 41.7614 38.1421 38.1421C41.7614 34.5228 44 29.5228 44 24C44 18.4772 41.7614 13.4772 38.1421 9.85786C34.5228 6.23858 29.5228 4 24 4C18.4772 4 13.4772 6.23858 9.85786 9.85786C6.23858 13.4772 4 18.4772 4 24C4 29.5228 6.23858 34.5228 9.85786 38.1421C13.4772 41.7614 18.4772 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),gt.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 11C25.3807 11 26.5 12.1193 26.5 13.5C26.5 14.8807 25.3807 16 24 16C22.6193 16 21.5 14.8807 21.5 13.5C21.5 12.1193 22.6193 11 24 11Z",fill:e.colors[2]}),gt.default.createElement("path",{d:"M24.5 34V20H23.5H22.5",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),gt.default.createElement("path",{d:"M21 34H28",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Xs=dr.default=Eh;var hr={};Object.defineProperty(hr,"__esModule",{value:!0});var Zs=hr.default=void 0,pr=Lh(ie.default),Ah=te;function Lh(e){return e&&e.__esModule?e:{default:e}}var Oh=(0,Ah.IconWrapper)("loading",!0,function(e){return pr.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},pr.default.createElement("path",{d:"M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),pr.default.createElement("path",{d:"M36 24C36 17.3726 30.6274 12 24 12C17.3726 12 12 17.3726 12 24C12 30.6274 17.3726 36 24 36V36",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Zs=hr.default=Oh;var mr={};Object.defineProperty(mr,"__esModule",{value:!0});var Js=mr.default=void 0,be=Ph(ie.default),Mh=te;function Ph(e){return e&&e.__esModule?e:{default:e}}var Rh=(0,Mh.IconWrapper)("loading-three",!1,function(e){return be.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},be.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M24 12V15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M32.4852 15.5147L30.3639 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M36 24H33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M32.4852 32.4853L30.3639 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M24 36V33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M15.5148 32.4853L17.6361 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M12 24H15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),be.default.createElement("path",{d:"M15.5148 15.5147L17.6361 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Js=mr.default=Rh;var gr={};Object.defineProperty(gr,"__esModule",{value:!0});var Qs=gr.default=void 0,vr=Dh(ie.default),Nh=te;function Dh(e){return e&&e.__esModule?e:{default:e}}var $h=(0,Nh.IconWrapper)("return",!0,function(e){return vr.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},vr.default.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),vr.default.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Qs=gr.default=$h;function Ih(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Fh(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var jh=function(){function e(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Fh(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Ih(i);try{s.insertRule(r,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),q="-ms-",Gt="-moz-",j="-webkit-",qs="comm",yr="rule",br="decl",Wh="@import",eo="@keyframes",zh=Math.abs,Yt=String.fromCharCode,Bh=Object.assign;function Hh(e,t){return Q(e,0)^45?(((t<<2^Q(e,0))<<2^Q(e,1))<<2^Q(e,2))<<2^Q(e,3):0}function to(e){return e.trim()}function Uh(e,t){return(e=t.exec(e))?e[0]:e}function W(e,t,n){return e.replace(t,n)}function _r(e,t){return e.indexOf(t)}function Q(e,t){return e.charCodeAt(t)|0}function vt(e,t,n){return e.slice(t,n)}function _e(e){return e.length}function wr(e){return e.length}function Vt(e,t){return t.push(e),e}function Gh(e,t){return e.map(t).join("")}var Kt=1,Ke=1,no=0,ne=0,V=0,Xe="";function Xt(e,t,n,r,i,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:Kt,column:Ke,length:o,return:""}}function yt(e,t){return Bh(Xt("",null,null,"",null,null,0),e,{length:-e.length},t)}function Yh(){return V}function Vh(){return V=ne>0?Q(Xe,--ne):0,Ke--,V===10&&(Ke=1,Kt--),V}function se(){return V=ne<no?Q(Xe,ne++):0,Ke++,V===10&&(Ke=1,Kt++),V}function we(){return Q(Xe,ne)}function Zt(){return ne}function bt(e,t){return vt(Xe,e,t)}function _t(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ro(e){return Kt=Ke=1,no=_e(Xe=e),ne=0,[]}function io(e){return Xe="",e}function Jt(e){return to(bt(ne-1,Sr(e===91?e+2:e===40?e+1:e)))}function Kh(e){for(;(V=we())&&V<33;)se();return _t(e)>2||_t(V)>3?"":" "}function Xh(e,t){for(;--t&&se()&&!(V<48||V>102||V>57&&V<65||V>70&&V<97););return bt(e,Zt()+(t<6&&we()==32&&se()==32))}function Sr(e){for(;se();)switch(V){case e:return ne;case 34:case 39:e!==34&&e!==39&&Sr(V);break;case 40:e===41&&Sr(e);break;case 92:se();break}return ne}function Zh(e,t){for(;se()&&e+V!==47+10;)if(e+V===42+42&&we()===47)break;return"/*"+bt(t,ne-1)+"*"+Yt(e===47?e:se())}function Jh(e){for(;!_t(we());)se();return bt(e,ne)}function Qh(e){return io(Qt("",null,null,null,[""],e=ro(e),0,[0],e))}function Qt(e,t,n,r,i,s,o,c,u){for(var a=0,l=0,f=o,d=0,g=0,h=0,y=1,v=1,S=1,L=0,D="",x=i,_=s,b=r,T=D;v;)switch(h=L,L=se()){case 40:if(h!=108&&Q(T,f-1)==58){_r(T+=W(Jt(L),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:T+=Jt(L);break;case 9:case 10:case 13:case 32:T+=Kh(h);break;case 92:T+=Xh(Zt()-1,7);continue;case 47:switch(we()){case 42:case 47:Vt(qh(Zh(se(),Zt()),t,n),u);break;default:T+="/"}break;case 123*y:c[a++]=_e(T)*S;case 125*y:case 59:case 0:switch(L){case 0:case 125:v=0;case 59+l:g>0&&_e(T)-f&&Vt(g>32?oo(T+";",r,n,f-1):oo(W(T," ","")+";",r,n,f-2),u);break;case 59:T+=";";default:if(Vt(b=so(T,t,n,a,l,i,c,D,x=[],_=[],f),s),L===123)if(l===0)Qt(T,t,b,b,x,s,f,c,_);else switch(d===99&&Q(T,3)===110?100:d){case 100:case 109:case 115:Qt(e,b,b,r&&Vt(so(e,b,b,0,0,i,c,D,i,x=[],f),_),i,_,f,c,r?x:_);break;default:Qt(T,b,b,b,[""],_,0,c,_)}}a=l=g=0,y=S=1,D=T="",f=o;break;case 58:f=1+_e(T),g=h;default:if(y<1){if(L==123)--y;else if(L==125&&y++==0&&Vh()==125)continue}switch(T+=Yt(L),L*y){case 38:S=l>0?1:(T+="\f",-1);break;case 44:c[a++]=(_e(T)-1)*S,S=1;break;case 64:we()===45&&(T+=Jt(se())),d=we(),l=f=_e(D=T+=Jh(Zt())),L++;break;case 45:h===45&&_e(T)==2&&(y=0)}}return s}function so(e,t,n,r,i,s,o,c,u,a,l){for(var f=i-1,d=i===0?s:[""],g=wr(d),h=0,y=0,v=0;h<r;++h)for(var S=0,L=vt(e,f+1,f=zh(y=o[h])),D=e;S<g;++S)(D=to(y>0?d[S]+" "+L:W(L,/&\f/g,d[S])))&&(u[v++]=D);return Xt(e,t,n,i===0?yr:c,u,a,l)}function qh(e,t,n){return Xt(e,t,n,qs,Yt(Yh()),vt(e,2,-2),0)}function oo(e,t,n,r){return Xt(e,t,n,br,vt(e,0,r),vt(e,r+1,-1),r)}function Ze(e,t){for(var n="",r=wr(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function ep(e,t,n,r){switch(e.type){case Wh:case br:return e.return=e.return||e.value;case qs:return"";case eo:return e.return=e.value+"{"+Ze(e.children,r)+"}";case yr:e.value=e.props.join(",")}return _e(n=Ze(e.children,r))?e.return=e.value+"{"+n+"}":""}function tp(e){var t=wr(e);return function(n,r,i,s){for(var o="",c=0;c<t;c++)o+=e[c](n,r,i,s)||"";return o}}function np(e){return function(t){t.root||(t=t.return)&&e(t)}}function rp(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var ip=function(t,n,r){for(var i=0,s=0;i=s,s=we(),i===38&&s===12&&(n[r]=1),!_t(s);)se();return bt(t,ne)},sp=function(t,n){var r=-1,i=44;do switch(_t(i)){case 0:i===38&&we()===12&&(n[r]=1),t[r]+=ip(ne-1,n,r);break;case 2:t[r]+=Jt(i);break;case 4:if(i===44){t[++r]=we()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Yt(i)}while(i=se());return t},op=function(t,n){return io(sp(ro(t),n))},ao=new WeakMap,ap=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!ao.get(r))&&!i){ao.set(t,!0);for(var s=[],o=op(n,s),c=r.props,u=0,a=0;u<o.length;u++)for(var l=0;l<c.length;l++,a++)t.props[a]=s[u]?o[u].replace(/&\f/g,c[l]):c[l]+" "+o[u]}}},cp=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function co(e,t){switch(Hh(e,t)){case 5103:return j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+Gt+e+q+e+e;case 6828:case 4268:return j+e+q+e+e;case 6165:return j+e+q+"flex-"+e+e;case 5187:return j+e+W(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+q+"flex-$1$2")+e;case 5443:return j+e+q+"flex-item-"+W(e,/flex-|-self/,"")+e;case 4675:return j+e+q+"flex-line-pack"+W(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+q+W(e,"shrink","negative")+e;case 5292:return j+e+q+W(e,"basis","preferred-size")+e;case 6060:return j+"box-"+W(e,"-grow","")+j+e+q+W(e,"grow","positive")+e;case 4554:return j+W(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return W(W(W(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return W(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return W(W(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+q+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return W(e,/(.+)-inline(.+)/,j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_e(e)-1-t>6)switch(Q(e,t+1)){case 109:if(Q(e,t+4)!==45)break;case 102:return W(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+Gt+(Q(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_r(e,"stretch")?co(W(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Q(e,t+1)!==115)break;case 6444:switch(Q(e,_e(e)-3-(~_r(e,"!important")&&10))){case 107:return W(e,":",":"+j)+e;case 101:return W(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(Q(e,14)===45?"inline-":"")+"box$3$1"+j+"$2$3$1"+q+"$2box$3")+e}break;case 5936:switch(Q(e,t+11)){case 114:return j+e+q+W(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+q+W(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+q+W(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+q+e+e}return e}var up=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case br:t.return=co(t.value,t.length);break;case eo:return Ze([yt(t,{value:W(t.value,"@","@"+j)})],i);case yr:if(t.length)return Gh(t.props,function(s){switch(Uh(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ze([yt(t,{props:[W(s,/:(read-\w+)/,":"+Gt+"$1")]})],i);case"::placeholder":return Ze([yt(t,{props:[W(s,/:(plac\w+)/,":"+j+"input-$1")]}),yt(t,{props:[W(s,/:(plac\w+)/,":"+Gt+"$1")]}),yt(t,{props:[W(s,/:(plac\w+)/,q+"input-$1")]})],i)}return""})}},lp=[up],uo=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||lp,s={},o,c=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),S=1;S<v.length;S++)s[v[S]]=!0;c.push(y)});var u,a=[ap,cp];{var l,f=[ep,np(function(y){l.insert(y)})],d=tp(a.concat(i,f)),g=function(v){return Ze(Qh(v),d)};u=function(v,S,L,D){l=L,g(v?v+"{"+S.styles+"}":S.styles),D&&(h.inserted[S.name]=!0)}}var h={key:n,sheet:new jh({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return h.sheet.hydrate(c),h},lo={exports:{}},B={};/** @license React v16.13.1
* react-is.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 X=typeof Symbol=="function"&&Symbol.for,Cr=X?Symbol.for("react.element"):60103,kr=X?Symbol.for("react.portal"):60106,qt=X?Symbol.for("react.fragment"):60107,en=X?Symbol.for("react.strict_mode"):60108,tn=X?Symbol.for("react.profiler"):60114,nn=X?Symbol.for("react.provider"):60109,rn=X?Symbol.for("react.context"):60110,xr=X?Symbol.for("react.async_mode"):60111,sn=X?Symbol.for("react.concurrent_mode"):60111,on=X?Symbol.for("react.forward_ref"):60112,an=X?Symbol.for("react.suspense"):60113,fp=X?Symbol.for("react.suspense_list"):60120,cn=X?Symbol.for("react.memo"):60115,un=X?Symbol.for("react.lazy"):60116,dp=X?Symbol.for("react.block"):60121,hp=X?Symbol.for("react.fundamental"):60117,pp=X?Symbol.for("react.responder"):60118,mp=X?Symbol.for("react.scope"):60119;function oe(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Cr:switch(e=e.type,e){case xr:case sn:case qt:case tn:case en:case an:return e;default:switch(e=e&&e.$$typeof,e){case rn:case on:case un:case cn:case nn:return e;default:return t}}case kr:return t}}}function fo(e){return oe(e)===sn}B.AsyncMode=xr,B.ConcurrentMode=sn,B.ContextConsumer=rn,B.ContextProvider=nn,B.Element=Cr,B.ForwardRef=on,B.Fragment=qt,B.Lazy=un,B.Memo=cn,B.Portal=kr,B.Profiler=tn,B.StrictMode=en,B.Suspense=an,B.isAsyncMode=function(e){return fo(e)||oe(e)===xr},B.isConcurrentMode=fo,B.isContextConsumer=function(e){return oe(e)===rn},B.isContextProvider=function(e){return oe(e)===nn},B.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cr},B.isForwardRef=function(e){return oe(e)===on},B.isFragment=function(e){return oe(e)===qt},B.isLazy=function(e){return oe(e)===un},B.isMemo=function(e){return oe(e)===cn},B.isPortal=function(e){return oe(e)===kr},B.isProfiler=function(e){return oe(e)===tn},B.isStrictMode=function(e){return oe(e)===en},B.isSuspense=function(e){return oe(e)===an},B.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qt||e===sn||e===tn||e===en||e===an||e===fp||typeof e=="object"&&e!==null&&(e.$$typeof===un||e.$$typeof===cn||e.$$typeof===nn||e.$$typeof===rn||e.$$typeof===on||e.$$typeof===hp||e.$$typeof===pp||e.$$typeof===mp||e.$$typeof===dp)},B.typeOf=oe,function(e){e.exports=B}(lo);var ho=lo.exports,gp={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},vp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},po={};po[ho.ForwardRef]=gp,po[ho.Memo]=vp;var yp=!0;function Tr(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var mo=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||yp===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},go=function(t,n,r){mo(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function bp(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _p={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},wp=/[A-Z]|^ms/g,Sp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vo=function(t){return t.charCodeAt(1)===45},yo=function(t){return t!=null&&typeof t!="boolean"},Er=rp(function(e){return vo(e)?e:e.replace(wp,"-$&").toLowerCase()}),bo=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Sp,function(r,i,s){return Se={name:i,styles:s,next:Se},i})}return _p[t]!==1&&!vo(t)&&typeof n=="number"&&n!==0?n+"px":n},_v="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function wt(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Se={name:n.name,styles:n.styles,next:Se},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Se={name:r.name,styles:r.styles,next:Se},r=r.next;var i=n.styles+";";return i}return Cp(e,t,n)}case"function":{if(e!==void 0){var s=Se,o=n(e);return Se=s,wt(e,t,o)}break}}if(t==null)return n;var c=t[n];return c!==void 0?c:n}function Cp(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=wt(e,t,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object")t!=null&&t[o]!==void 0?r+=s+"{"+t[o]+"}":yo(o)&&(r+=Er(s)+":"+bo(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)yo(o[c])&&(r+=Er(s)+":"+bo(s,o[c])+";");else{var u=wt(e,t,o);switch(s){case"animation":case"animationName":{r+=Er(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var _o=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Se,St=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,s="";Se=void 0;var o=t[0];o==null||o.raw===void 0?(i=!1,s+=wt(r,n,o)):s+=o[0];for(var c=1;c<t.length;c++)s+=wt(r,n,t[c]),i&&(s+=o[c]);_o.lastIndex=0;for(var u="",a;(a=_o.exec(s))!==null;)u+="-"+a[1];var l=bp(s)+u;return{name:l,styles:s,next:Se}},kp=function(t){return t()},xp=ai["useInsertionEffect"]?ai["useInsertionEffect"]:!1,Tp=xp||kp,ln={}.hasOwnProperty,wo=p.createContext(typeof HTMLElement<"u"?uo({key:"css"}):null);wo.Provider;var Ep=function(t){return p.forwardRef(function(n,r){var i=p.useContext(wo);return t(n,i,r)})},Ap=p.createContext({}),Ar="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",So=function(t,n){var r={};for(var i in n)ln.call(n,i)&&(r[i]=n[i]);return r[Ar]=t,r},Lp=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return mo(n,r,i),Tp(function(){return go(n,r,i)}),null},Co=Ep(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Ar],s=[r],o="";typeof e.className=="string"?o=Tr(t.registered,s,e.className):e.className!=null&&(o=e.className+" ");var c=St(s,void 0,p.useContext(Ap));o+=t.key+"-"+c.name;var u={};for(var a in e)ln.call(e,a)&&a!=="css"&&a!==Ar&&(u[a]=e[a]);return u.ref=n,u.className=o,p.createElement(p.Fragment,null,p.createElement(Lp,{cache:t,serialized:c,isStringTag:typeof i=="string"}),p.createElement(i,u))}),fn={exports:{}},dn={};/**
* @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 Op=ie.default,Mp=Symbol.for("react.element"),Pp=Symbol.for("react.fragment"),Rp=Object.prototype.hasOwnProperty,Np=Op.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Dp={key:!0,ref:!0,__self:!0,__source:!0};function ko(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)Rp.call(t,r)&&!Dp.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:Mp,type:e,key:s,ref:o,props:i,_owner:Np.current}}dn.Fragment=Pp,dn.jsx=ko,dn.jsxs=ko,function(e){e.exports=dn}(fn);const $p=fn.exports.Fragment,xo=fn.exports.jsx,To=fn.exports.jsxs;var Ct=$p;function m(e,t,n){return ln.call(t,"css")?xo(Co,So(e,t),n):xo(e,t,n)}function A(e,t,n){return ln.call(t,"css")?To(Co,So(e,t),n):To(e,t,n)}const Ip={Close:Ys,Config:Vs,DistraughtFace:Ks,Return:Qs,Loading:Zs,LoadingThree:Js,Info:Xs};function Je({name:e,theme:t,size:n,fill:r,...i}){t||(t="outline"),n||(n=24);const s=or();r||(r=s?"#fff":"#333");const o=Ip[e];return m(o,{theme:t,size:n,fill:r,...i,style:{fontSize:0,...i.style}})}var Eo={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 c=n.apply(null,s);c&&r.push(c)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var u in s)t.call(s,u)&&s[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Eo);const Z=Eo.exports;function Qe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return St(t)}function Ao(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Lo(e,t,n){var r=[],i=Tr(e,r,n);return r.length<2?n:i+t(r)}var Fp=function(t){var n=uo(t);n.sheet.speedy=function(c){this.isSpeedy=c},n.compat=!0;var r=function(){for(var u=arguments.length,a=new Array(u),l=0;l<u;l++)a[l]=arguments[l];var f=St(a,n.registered,void 0);return go(n,f,!1),n.key+"-"+f.name},i=function(){for(var u=arguments.length,a=new Array(u),l=0;l<u;l++)a[l]=arguments[l];var f=St(a,n.registered),d="animation-"+f.name;return Ao(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},s=function(){for(var u=arguments.length,a=new Array(u),l=0;l<u;l++)a[l]=arguments[l];var f=St(a,n.registered);Ao(n,f)},o=function(){for(var u=arguments.length,a=new Array(u),l=0;l<u;l++)a[l]=arguments[l];return Lo(n.registered,r,jp(a))};return{css:r,cx:o,injectGlobal:s,keyframes:i,hydrate:function(u){u.forEach(function(a){n.inserted[a]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Tr.bind(null,n.registered),merge:Lo.bind(null,n.registered,r)}},jp=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var s=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))s=e(i);else{s="";for(var o in i)i[o]&&o&&(s&&(s+=" "),s+=o)}break}default:s=i}s&&(n&&(n+=" "),n+=s)}}return n},Wp=Fp({key:"css"}),Lr=Wp.css,zp=function(t){return function(n,r){var i=p.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return n()},r)}},qe=function(t){return typeof t=="function"},Bp=function(t){return typeof t=="string"},Oo=function(t){return typeof t=="number"},Hp=!1;const Or=Hp;function H(e){Or&&(qe(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=p.useRef(e);t.current=p.useMemo(function(){return e},[e]);var n=p.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 Mr=zp(p.useEffect);var Mo=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Po=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Ro=function(t,n){var r=n.manual,i=n.ready,s=i===void 0?!0:i,o=n.defaultParams,c=o===void 0?[]:o,u=n.refreshDeps,a=u===void 0?[]:u,l=n.refreshDepsAction,f=p.useRef(!1);return f.current=!1,Mr(function(){!r&&s&&(f.current=!0,t.run.apply(t,Po([],Mo(c),!1)))},[s]),Mr(function(){f.current||r||(f.current=!0,l?l():t.refresh())},Po([],Mo(a),!1)),{onBefore:function(){if(!s)return{stopNow:!0}}}};Ro.onInit=function(e){var t=e.ready,n=t===void 0?!0:t,r=e.manual;return{loading:!r&&n}};const Up=Ro;function Pr(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 No(e,t){var n=p.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!Pr(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj}function kt(e){var t=p.useRef(e);return t.current=e,t}var Gp=function(t){Or&&(qe(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var n=kt(t);p.useEffect(function(){return function(){n.current()}},[])};const xt=Gp;var hn=globalThis&&globalThis.__assign||function(){return hn=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},hn.apply(this,arguments)},pn=new Map,Yp=function(t,n,r){var i=pn.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;n>-1&&(s=setTimeout(function(){pn.delete(t)},n)),pn.set(t,hn(hn({},r),{timer:s}))},Vp=function(t){return pn.get(t)},mn=new Map,Kp=function(t){return mn.get(t)},Xp=function(t,n){mn.set(t,n),n.then(function(r){return mn.delete(t),r}).catch(function(){mn.delete(t)})},je={},Zp=function(t,n){je[t]&&je[t].forEach(function(r){return r(n)})},Rr=function(t,n){return je[t]||(je[t]=[]),je[t].push(n),function(){var i=je[t].indexOf(n);je[t].splice(i,1)}},Jp=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Qp=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},qp=function(t,n){var r=n.cacheKey,i=n.cacheTime,s=i===void 0?5*60*1e3:i,o=n.staleTime,c=o===void 0?0:o,u=n.setCache,a=n.getCache,l=p.useRef(),f=p.useRef(),d=function(y,v){u?u(v):Yp(y,s,v),Zp(y,v.data)},g=function(y,v){return v===void 0&&(v=[]),a?a(v):Vp(y)};return No(function(){if(!!r){var h=g(r);h&&Object.hasOwnProperty.call(h,"data")&&(t.state.data=h.data,t.state.params=h.params,(c===-1||new Date().getTime()-h.time<=c)&&(t.state.loading=!1)),l.current=Rr(r,function(y){t.setState({data:y})})}},[]),xt(function(){var h;(h=l.current)===null||h===void 0||h.call(l)}),r?{onBefore:function(y){var v=g(r,y);return!v||!Object.hasOwnProperty.call(v,"data")?{}:c===-1||new Date().getTime()-v.time<=c?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:function(y,v){var S=Kp(r);return S&&S!==f.current?{servicePromise:S}:(S=y.apply(void 0,Qp([],Jp(v),!1)),f.current=S,Xp(r,S),{servicePromise:S})},onSuccess:function(y,v){var S;r&&((S=l.current)===null||S===void 0||S.call(l),d(r,{data:y,params:v,time:new Date().getTime()}),l.current=Rr(r,function(L){t.setState({data:L})}))},onMutate:function(y){var v;r&&((v=l.current)===null||v===void 0||v.call(l),d(r,{data:y,params:t.state.params,time:new Date().getTime()}),l.current=Rr(r,function(S){t.setState({data:S})}))}}:{}};const em=qp;var tm=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},nm=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},rm=function(t,n){var r=n.debounceWait,i=n.debounceLeading,s=n.debounceTrailing,o=n.debounceMaxWait,c=p.useRef(),u=p.useMemo(function(){var a={};return i!==void 0&&(a.leading=i),s!==void 0&&(a.trailing=s),o!==void 0&&(a.maxWait=o),a},[i,s,o]);return p.useEffect(function(){if(r){var a=t.runAsync.bind(t);return c.current=os(function(l){l()},r,u),t.runAsync=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new Promise(function(d,g){var h;(h=c.current)===null||h===void 0||h.call(c,function(){a.apply(void 0,nm([],tm(l),!1)).then(d).catch(g)})})},function(){var l;(l=c.current)===null||l===void 0||l.cancel(),t.runAsync=a}}},[r,u]),r?{onCancel:function(){var l;(l=c.current)===null||l===void 0||l.cancel()}}:{}};const im=rm;var sm=function(t,n){var r=n.loadingDelay,i=p.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 om=sm;var am=!!(typeof window<"u"&&window.document&&window.document.createElement);const Tt=am;function Nr(){return Tt?document.visibilityState!=="hidden":!0}var Et=[];function cm(e){return Et.push(e),function(){var n=Et.indexOf(e);Et.splice(n,1)}}if(Tt){var um=function(){if(!!Nr())for(var t=0;t<Et.length;t++){var n=Et[t];n()}};window.addEventListener("visibilitychange",um,!1)}var lm=function(t,n){var r=n.pollingInterval,i=n.pollingWhenHidden,s=i===void 0?!0:i,o=n.pollingErrorRetryCount,c=o===void 0?-1:o,u=p.useRef(),a=p.useRef(),l=p.useRef(0),f=function(){var g;u.current&&clearTimeout(u.current),(g=a.current)===null||g===void 0||g.call(a)};return Mr(function(){r||f()},[r]),r?{onBefore:function(){f()},onError:function(){l.current+=1},onSuccess:function(){l.current=0},onFinally:function(){c===-1||c!==-1&&l.current<=c?u.current=setTimeout(function(){!s&&!Nr()?a.current=cm(function(){t.refresh()}):t.refresh()},r):l.current=0},onCancel:function(){f()}}:{}};const fm=lm;var dm=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},hm=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function pm(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,hm([],dm(r),!1)),setTimeout(function(){n=!1},t))}}function mm(){return Tt&&typeof navigator.onLine<"u"?navigator.onLine:!0}var At=[];function gm(e){return At.push(e),function(){var n=At.indexOf(e);n>-1&&At.splice(n,1)}}if(Tt){var Do=function(){if(!(!Nr()||!mm()))for(var t=0;t<At.length;t++){var n=At[t];n()}};window.addEventListener("visibilitychange",Do,!1),window.addEventListener("focus",Do,!1)}var vm=function(t,n){var r=n.refreshOnWindowFocus,i=n.focusTimespan,s=i===void 0?5e3:i,o=p.useRef(),c=function(){var a;(a=o.current)===null||a===void 0||a.call(o)};return p.useEffect(function(){if(r){var u=pm(t.refresh.bind(t),s);o.current=gm(function(){u()})}return function(){c()}},[r,s]),xt(function(){c()}),{}};const ym=vm;var bm=function(t,n){var r=n.retryInterval,i=n.retryCount,s=p.useRef(),o=p.useRef(0),c=p.useRef(!1);return i?{onBefore:function(){c.current||(o.current=0),c.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,i===-1||o.current<=i){var a=r!=null?r:Math.min(1e3*Math.pow(2,o.current),3e4);s.current=setTimeout(function(){c.current=!0,t.refresh()},a)}else o.current=0},onCancel:function(){o.current=0,s.current&&clearTimeout(s.current)}}:{}};const _m=bm;var wm=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Sm=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Cm=function(t,n){var r=n.throttleWait,i=n.throttleLeading,s=n.throttleTrailing,o=p.useRef(),c={};return i!==void 0&&(c.leading=i),s!==void 0&&(c.trailing=s),p.useEffect(function(){if(r){var u=t.runAsync.bind(t);return o.current=Md(function(a){a()},r,c),t.runAsync=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new Promise(function(f,d){var g;(g=o.current)===null||g===void 0||g.call(o,function(){u.apply(void 0,Sm([],wm(a),!1)).then(f).catch(d)})})},function(){var a;t.runAsync=u,(a=o.current)===null||a===void 0||a.cancel()}}},[r,i,s]),r?{onCancel:function(){var a;(a=o.current)===null||a===void 0||a.cancel()}}:{}};const km=Cm;var xm=function(t){Or&&(qe(t)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t,'".'))),p.useEffect(function(){t==null||t()},[])};const Tm=xm;var Em=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Am=function(){var t=Em(p.useState({}),2),n=t[1];return p.useCallback(function(){return n({})},[])};const Lm=Am;var Oe=globalThis&&globalThis.__assign||function(){return Oe=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},Oe.apply(this,arguments)},Om=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 c(l){try{a(r.next(l))}catch(f){o(f)}}function u(l){try{a(r.throw(l))}catch(f){o(f)}}function a(l){l.done?s(l.value):i(l.value).then(c,u)}a((r=r.apply(e,t||[])).next())})},Mm=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:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(l){return u([a,l])}}function u(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(l){a=[6,l],i=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Pm=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},et=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},tt=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Rm=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=Oe(Oe(Oe({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=Oe(Oe({},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,tt([s],et(n),!1))}).filter(Boolean);return Object.assign.apply(Object,tt([{}],et(i),!1))},e.prototype.runAsync=function(){for(var t,n,r,i,s,o,c,u,a,l,f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];return Om(this,void 0,void 0,function(){var g,h,y,v,S,L,D,x,_,b,T;return Mm(this,function(M){switch(M.label){case 0:if(this.count+=1,g=this.count,h=this.runPluginHandler("onBefore",f),y=h.stopNow,v=y===void 0?!1:y,S=h.returnNow,L=S===void 0?!1:S,D=Pm(h,["stopNow","returnNow"]),v)return[2,new Promise(function(){})];if(this.setState(Oe({loading:!0,params:f},D)),L)return[2,Promise.resolve(D.data)];(n=(t=this.options).onBefore)===null||n===void 0||n.call(t,f),M.label=1;case 1:return M.trys.push([1,3,,4]),x=this.runPluginHandler("onRequest",this.serviceRef.current,f).servicePromise,x||(x=(T=this.serviceRef).current.apply(T,tt([],et(f),!1))),[4,x];case 2:return _=M.sent(),g!==this.count?[2,new Promise(function(){})]:(this.setState({data:_,error:void 0,loading:!1}),(i=(r=this.options).onSuccess)===null||i===void 0||i.call(r,_,f),this.runPluginHandler("onSuccess",_,f),(o=(s=this.options).onFinally)===null||o===void 0||o.call(s,f,_,void 0),g===this.count&&this.runPluginHandler("onFinally",f,_,void 0),[2,_]);case 3:if(b=M.sent(),g!==this.count)return[2,new Promise(function(){})];throw this.setState({error:b,loading:!1}),(u=(c=this.options).onError)===null||u===void 0||u.call(c,b,f),this.runPluginHandler("onError",b,f),(l=(a=this.options).onFinally)===null||l===void 0||l.call(a,f,void 0,b),g===this.count&&this.runPluginHandler("onFinally",f,void 0,b),b;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,tt([],et(n),!1)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,tt([],et(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,tt([],et(this.state.params||[]),!1))},e.prototype.mutate=function(t){var n=qe(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})},e}();const Nm=Rm;var Dr=globalThis&&globalThis.__assign||function(){return Dr=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},Dr.apply(this,arguments)},Dm=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},$o=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Io=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function $m(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,i=r===void 0?!1:r,s=Dm(t,["manual"]),o=Dr({manual:i},s),c=kt(e),u=Lm(),a=No(function(){var l=n.map(function(f){var d;return(d=f==null?void 0:f.onInit)===null||d===void 0?void 0:d.call(f,o)}).filter(Boolean);return new Nm(c,o,u,Object.assign.apply(Object,Io([{}],$o(l),!1)))},[]);return a.options=o,a.pluginImpls=n.map(function(l){return l(a,o)}),Tm(function(){if(!i){var l=a.state.params||t.defaultParams||[];a.run.apply(a,Io([],$o(l),!1))}}),xt(function(){a.cancel()}),{loading:a.state.loading,data:a.state.data,error:a.state.error,params:a.state.params||[],cancel:H(a.cancel.bind(a)),refresh:H(a.refresh.bind(a)),refreshAsync:H(a.refreshAsync.bind(a)),run:H(a.run.bind(a)),runAsync:H(a.runAsync.bind(a)),mutate:H(a.mutate.bind(a))}}var Im=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Fo=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function Fm(e,t,n){return $m(e,t,Fo(Fo([],Im(n||[]),!1),[im,om,fm,ym,km,Up,em,_m],!1))}var jm=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function jo(e,t){e===void 0&&(e=!1);var n=jm(p.useState(e),2),r=n[0],i=n[1],s=p.useMemo(function(){var o=t===void 0?!e:t,c=function(){return i(function(d){return d===e?o:e})},u=function(d){return i(d)},a=function(){return i(e)},l=function(){return i(o)};return{toggle:c,set:u,setLeft:a,setRight:l}},[]);return[r,s]}var Wm=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function zm(e){e===void 0&&(e=!1);var t=Wm(jo(e),2),n=t[0],r=t[1],i=r.toggle,s=r.set,o=p.useMemo(function(){var c=function(){return s(!0)},u=function(){return s(!1)};return{toggle:i,set:function(l){return s(!!l)},setTrue:c,setFalse:u}},[]);return[n,o]}function gn(e,t){if(!!Tt){if(!e)return t;var n;return qe(e)?n=e():"current"in e?n=e.current:n=e,n}}var Bm=function(t){var n=function(i,s,o){var c=p.useRef(!1),u=p.useRef([]),a=p.useRef([]),l=p.useRef();t(function(){var f,d=Array.isArray(o)?o:[o],g=d.map(function(h){return gn(h)});if(!c.current){c.current=!0,u.current=g,a.current=s,l.current=i();return}(g.length!==u.current.length||!Pr(g,u.current)||!Pr(s,a.current))&&((f=l.current)===null||f===void 0||f.call(l),u.current=g,a.current=s,l.current=i())}),xt(function(){var f;(f=l.current)===null||f===void 0||f.call(l),c.current=!1})};return n},Hm=Bm(p.useEffect);const Wo=Hm;var zo={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zd,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",c="minute",u="hour",a="day",l="week",f="month",d="quarter",g="year",h="date",y="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var w=["th","st","nd","rd"],C=k%100;return"["+k+(w[(C-20)%10]||w[C]||w[0])+"]"}},D=function(k,w,C){var O=String(k);return!O||O.length>=w?k:""+Array(w+1-O.length).join(C)+k},x={s:D,z:function(k){var w=-k.utcOffset(),C=Math.abs(w),O=Math.floor(C/60),E=C%60;return(w<=0?"+":"-")+D(O,2,"0")+":"+D(E,2,"0")},m:function k(w,C){if(w.date()<C.date())return-k(C,w);var O=12*(C.year()-w.year())+(C.month()-w.month()),E=w.clone().add(O,f),N=C-E<0,R=w.clone().add(O+(N?-1:1),f);return+(-(O+(C-E)/(N?E-R:R-E))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:g,w:l,d:a,D:h,h:u,m:c,s:o,ms:s,Q:d}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},_="en",b={};b[_]=L;var T=function(k){return k instanceof P},M=function k(w,C,O){var E;if(!w)return _;if(typeof w=="string"){var N=w.toLowerCase();b[N]&&(E=N),C&&(b[N]=C,E=N);var R=w.split("-");if(!E&&R.length>1)return k(R[0])}else{var z=w.name;b[z]=w,E=z}return!O&&E&&(_=E),E||!O&&_},$=function(k,w){if(T(k))return k.clone();var C=typeof w=="object"?w:{};return C.date=k,C.args=arguments,new P(C)},I=x;I.l=M,I.i=T,I.w=function(k,w){return $(k,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var P=function(){function k(C){this.$L=M(C.locale,null,!0),this.parse(C)}var w=k.prototype;return w.parse=function(C){this.$d=function(O){var E=O.date,N=O.utc;if(E===null)return new Date(NaN);if(I.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var R=E.match(v);if(R){var z=R[2]-1||0,Y=(R[7]||"0").substring(0,3);return N?new Date(Date.UTC(R[1],z,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Y)):new Date(R[1],z,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Y)}}return new Date(E)}(C),this.$x=C.x||{},this.init()},w.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},w.$utils=function(){return I},w.isValid=function(){return this.$d.toString()!==y},w.isSame=function(C,O){var E=$(C);return this.startOf(O)<=E&&E<=this.endOf(O)},w.isAfter=function(C,O){return $(C)<this.startOf(O)},w.isBefore=function(C,O){return this.endOf(O)<$(C)},w.$g=function(C,O,E){return I.u(C)?this[O]:this.set(E,C)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(C,O){var E=this,N=!!I.u(O)||O,R=I.p(C),z=function(xe,ee){var pe=I.w(E.$u?Date.UTC(E.$y,ee,xe):new Date(E.$y,ee,xe),E);return N?pe:pe.endOf(a)},Y=function(xe,ee){return I.w(E.toDate()[xe].apply(E.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ee)),E)},G=this.$W,J=this.$M,ke=this.$D,K="set"+(this.$u?"UTC":"");switch(R){case g:return N?z(1,0):z(31,11);case f:return N?z(1,J):z(0,J+1);case l:var le=this.$locale().weekStart||0,fe=(G<le?G+7:G)-le;return z(N?ke-fe:ke+(6-fe),J);case a:case h:return Y(K+"Hours",0);case u:return Y(K+"Minutes",1);case c:return Y(K+"Seconds",2);case o:return Y(K+"Milliseconds",3);default:return this.clone()}},w.endOf=function(C){return this.startOf(C,!1)},w.$set=function(C,O){var E,N=I.p(C),R="set"+(this.$u?"UTC":""),z=(E={},E[a]=R+"Date",E[h]=R+"Date",E[f]=R+"Month",E[g]=R+"FullYear",E[u]=R+"Hours",E[c]=R+"Minutes",E[o]=R+"Seconds",E[s]=R+"Milliseconds",E)[N],Y=N===a?this.$D+(O-this.$W):O;if(N===f||N===g){var G=this.clone().set(h,1);G.$d[z](Y),G.init(),this.$d=G.set(h,Math.min(this.$D,G.daysInMonth())).$d}else z&&this.$d[z](Y);return this.init(),this},w.set=function(C,O){return this.clone().$set(C,O)},w.get=function(C){return this[I.p(C)]()},w.add=function(C,O){var E,N=this;C=Number(C);var R=I.p(O),z=function(J){var ke=$(N);return I.w(ke.date(ke.date()+Math.round(J*C)),N)};if(R===f)return this.set(f,this.$M+C);if(R===g)return this.set(g,this.$y+C);if(R===a)return z(1);if(R===l)return z(7);var Y=(E={},E[c]=r,E[u]=i,E[o]=n,E)[R]||1,G=this.$d.getTime()+C*Y;return I.w(G,this)},w.subtract=function(C,O){return this.add(-1*C,O)},w.format=function(C){var O=this,E=this.$locale();if(!this.isValid())return E.invalidDate||y;var N=C||"YYYY-MM-DDTHH:mm:ssZ",R=I.z(this),z=this.$H,Y=this.$m,G=this.$M,J=E.weekdays,ke=E.months,K=function(ee,pe,si,xn){return ee&&(ee[pe]||ee(O,N))||si[pe].slice(0,xn)},le=function(ee){return I.s(z%12||12,ee,"0")},fe=E.meridiem||function(ee,pe,si){var xn=ee<12?"AM":"PM";return si?xn.toLowerCase():xn},xe={YY:String(this.$y).slice(-2),YYYY:this.$y,M:G+1,MM:I.s(G+1,2,"0"),MMM:K(E.monthsShort,G,ke,3),MMMM:K(ke,G),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:K(E.weekdaysMin,this.$W,J,2),ddd:K(E.weekdaysShort,this.$W,J,3),dddd:J[this.$W],H:String(z),HH:I.s(z,2,"0"),h:le(1),hh:le(2),a:fe(z,Y,!0),A:fe(z,Y,!1),m:String(Y),mm:I.s(Y,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:R};return N.replace(S,function(ee,pe){return pe||xe[ee]||R.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(C,O,E){var N,R=I.p(O),z=$(C),Y=(z.utcOffset()-this.utcOffset())*r,G=this-z,J=I.m(this,z);return J=(N={},N[g]=J/12,N[f]=J,N[d]=J/3,N[l]=(G-Y)/6048e5,N[a]=(G-Y)/864e5,N[u]=G/i,N[c]=G/r,N[o]=G/n,N)[R]||G,E?J:I.a(J)},w.daysInMonth=function(){return this.endOf(f).$D},w.$locale=function(){return b[this.$L]},w.locale=function(C,O){if(!C)return this.$L;var E=this.clone(),N=M(C,O,!0);return N&&(E.$L=N),E},w.clone=function(){return I.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},k}(),F=P.prototype;return $.prototype=F,[["$ms",s],["$s",o],["$m",c],["$H",u],["$W",a],["$M",f],["$y",g],["$D",h]].forEach(function(k){F[k[1]]=function(w){return this.$g(w,k[0],k[1])}}),$.extend=function(k,w){return k.$i||(k(w,P,$),k.$i=!0),$},$.locale=M,$.isDayjs=T,$.unix=function(k){return $(1e3*k)},$.en=b[_],$.Ls=b,$.p={},$})})(zo);const Bo=zo.exports;function vn(e,t,n){n===void 0&&(n={});var r=kt(t);Wo(function(){var i=gn(n.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(c){return r.current(c)};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 Um=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};const $r=function(e,t){var n=t||{},r=n.onEnter,i=n.onLeave,s=n.onChange,o=Um(zm(!1),2),c=o[0],u=o[1],a=u.setTrue,l=u.setFalse;return vn("mouseenter",function(){r==null||r(),a(),s==null||s(!0)},{target:e}),vn("mouseleave",function(){i==null||i(),l(),s==null||s(!1)},{target:e}),c};var Gm=function(t,n){return n===void 0&&(n=[]),sd(t,n)},Ym=function(t,n,r){var i=p.useRef(),s=p.useRef(0);Gm(n,i.current)||(i.current=n,s.current+=1),Wo(t,[s.current],r)};const Vm=Ym;var Ir=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.")},Km={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},Fr={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 Xm(e){var t=Object.keys(Fr).reduce(function(n,r){return Fr[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function Ho(e,t,n){var r,i;if(!e.key)return!1;if(Oo(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var c=Ir(s),u=c.next();!u.done;u=c.next()){var a=u.value,l=Fr[a],f=Km[a.toLowerCase()];(l&&l(e)||f&&f===e.keyCode)&&o++}}catch(d){r={error:d}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return n?o===s.length&&Xm(e)===s.length:o===s.length}function Zm(e,t){return qe(e)?e:Bp(e)||Oo(e)?function(n){return Ho(n,e,t)}:Array.isArray(e)?function(n){return e.some(function(r){return Ho(n,r,t)})}:e?function(){return!0}:function(){return!1}}var Jm=["keydown"];function Ce(e,t,n){var r=n||{},i=r.events,s=i===void 0?Jm:i,o=r.target,c=r.exactMatch,u=c===void 0?!1:c,a=kt(t),l=kt(e);Vm(function(){var f,d,g,h=gn(o,window);if(!!h){var y=function(x){var _,b=Zm(l.current,u);if(b(x))return(_=a.current)===null||_===void 0?void 0:_.call(a,x)};try{for(var v=Ir(s),S=v.next();!S.done;S=v.next()){var L=S.value;(g=h==null?void 0:h.addEventListener)===null||g===void 0||g.call(h,L,y)}}catch(D){f={error:D}}finally{try{S&&!S.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}return function(){var D,x,_;try{for(var b=Ir(s),T=b.next();!T.done;T=b.next()){var M=T.value;(_=h==null?void 0:h.removeEventListener)===null||_===void 0||_.call(h,M,y)}}catch($){D={error:$}}finally{try{T&&!T.done&&(x=b.return)&&x.call(b)}finally{if(D)throw D.error}}}}},[s],o)}var Qm=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function qm(e){var t=p.useRef(0),n=Qm(p.useState(e),2),r=n[0],i=n[1],s=p.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return xt(function(){cancelAnimationFrame(t.current)}),[r,s]}var eg=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},tg={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 ng=function(e){var t=eg(qm(tg),2),n=t[0],r=t[1];return vn("mousemove",function(i){var s=i.screenX,o=i.screenY,c=i.clientX,u=i.clientY,a=i.pageX,l=i.pageY,f={screenX:s,screenY:o,clientX:c,clientY:u,pageX:a,pageY:l,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},d=gn(e);if(d){var g=d.getBoundingClientRect(),h=g.left,y=g.top,v=g.width,S=g.height;f.elementPosX=h+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=a-f.elementPosX,f.elementY=l-f.elementPosY,f.elementW=v,f.elementH=S}r(f)},{target:function(){return document}}),n},he={modalMask:"_modal-mask_1fjgs_1",modal:"_modal_1fjgs_1",modalHeader:"_modal-header_1fjgs_23",modalBody:"_modal-body_1fjgs_30",modalTitle:"_modal-title_1fjgs_35",btnClose:"_btn-close_1fjgs_42"};let Lt=0;const rg=()=>{Lt++,document.body.style.overflow="hidden"},ig=()=>{Lt--,Lt<0&&(Lt=0),Lt===0&&(document.body.style.overflow="overlay")};function jr({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1,hideWhenEsc:o=!1}){p.useLayoutEffect(()=>{e?rg():ig()},[e]);const c=p.useRef(null),u=or(),{bg:a,c:l}=p.useMemo(()=>{const y=window.getComputedStyle(document.body)["background-color"],v=window.getComputedStyle(document.body).color;return{bg:y,c:v}},[u]),f=p.useMemo(()=>u?{"--bg":a,"--c":l,backgroundColor:a,color:l}:{},[a,l,u]),d=p.useId(),g=p.useMemo(()=>{const y=document.createElement("div");return y.setAttribute("data-id","base-modal-"+d),document.body.appendChild(y),y},[]),h=H(y=>{var v;(v=c.current)!=null&&v.contains(y.target)||s&&t()});return Ce("esc",()=>{!e||o&&t()}),e?me.createPortal(m("div",{className:Z(he.modalMask,r),onClick:h,children:m("div",{className:Z(he.modal,i),style:f,ref:c,children:n})}),g):null}const Wr=e=>m(Je,{...e,name:"Close",size:18,style:{cursor:"pointer",marginLeft:10,...e.style}});var nt=1e3,rt=nt*60,it=rt*60,We=it*24,sg=We*7,og=We*365.25,ag=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return cg(e);if(n==="number"&&isFinite(e))return t.long?lg(e):ug(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function cg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*og;case"weeks":case"week":case"w":return n*sg;case"days":case"day":case"d":return n*We;case"hours":case"hour":case"hrs":case"hr":case"h":return n*it;case"minutes":case"minute":case"mins":case"min":case"m":return n*rt;case"seconds":case"second":case"secs":case"sec":case"s":return n*nt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function ug(e){var t=Math.abs(e);return t>=We?Math.round(e/We)+"d":t>=it?Math.round(e/it)+"h":t>=rt?Math.round(e/rt)+"m":t>=nt?Math.round(e/nt)+"s":e+"ms"}function lg(e){var t=Math.abs(e);return t>=We?yn(e,t,We,"day"):t>=it?yn(e,t,it,"hour"):t>=rt?yn(e,t,rt,"minute"):t>=nt?yn(e,t,nt,"second"):e+" ms"}function yn(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+" "+r+(i?"s":"")}const Uo="_toast-container_mcbuq_1",Go="_single-line_mcbuq_17",Av={toastContainer:Uo,singleLine:Go};function Me(e,t=2e3){let n=typeof t=="number"?t:ag(t);const r=document.createElement("div");r.className=Uo,r.innerText=e,!e.includes(`
`)&&!e.includes("<br")&&r.classList.add(Go),document.body.appendChild(r),setTimeout(()=>r.remove(),n)}const fg="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",dg="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Yo(){return Me(fg)}function Vo(){return Me(dg)}function hg(e){const t=Ve({data:Array.from(e||[]),has(n){return this.data.some(r=>r[0]===n)},set(n,r){const i=this.data.find(s=>s[0]===n);return i?i[1]=r:this.data.push([n,r]),this},get(n){var r;return(r=this.data.find(i=>i[0]===n))==null?void 0:r[1]},delete(n){const r=this.data.findIndex(i=>i[0]===n);return r===-1?!1:(this.data.splice(r,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(n){this.data.forEach(r=>{n(r[1],r[0],this)})},keys(){return this.data.map(n=>n[0]).values()},values(){return this.data.map(n=>n[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const Ko="https://api.bilibili.com",pg="https://app.bilibili.com",bn=ci.default.create({baseURL:Ko});bn.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 zr=ci.default.create({adapter:ba.default});zr.interceptors.request.use(function(e){return e.params={access_key:de.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),zr.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r)}catch{}}return e});function mg(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw Me("\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 Ot=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,_n=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Xo}abort(){this.signal.dispatchEvent("abort")}},gg=typeof AbortSignal=="function",vg=typeof _n.AbortSignal=="function",Xo=gg?AbortSignal:vg?_n.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))}},Br=new Set,Hr=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;wn(n)&&Gr(n,`${e} option`,`options.${t}`,ze)},Ur=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(wn(n)){const{prototype:r}=ze,{get:i}=Object.getOwnPropertyDescriptor(r,e);Gr(n,`${e} method`,`cache.${t}()`,i)}},yg=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(wn(n)){const{prototype:r}=ze,{get:i}=Object.getOwnPropertyDescriptor(r,e);Gr(n,`${e} property`,`cache.${t}`,i)}},Zo=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},wn=e=>!Br.has(e),Gr=(e,t,n,r)=>{Br.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;Zo(i,"DeprecationWarning",e,r)},Pe=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Jo=e=>Pe(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Sn:null:null;class Sn extends Array{constructor(t){super(t),this.fill(0)}}class bg{constructor(t){if(t===0)return[];const n=Jo(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class ze{constructor(t={}){const{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:u,dispose:a,disposeAfter:l,noDisposeOnSet:f,noUpdateTTL:d,maxSize:g=0,maxEntrySize:h=0,sizeCalculation:y,fetchMethod:v,fetchContext:S,noDeleteOnFetchRejection:L,noDeleteOnStaleGet:D}=t,{length:x,maxAge:_,stale:b}=t instanceof ze?{}:t;if(n!==0&&!Pe(n))throw new TypeError("max option must be a nonnegative integer");const T=n?Jo(n):Array;if(!T)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=g,this.maxEntrySize=h||this.maxSize,this.sizeCalculation=y||x,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=v||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&S!==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 T(n),this.prev=new T(n),this.head=0,this.tail=0,this.free=new bg(n),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof l=="function"?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!L,this.maxEntrySize!==0){if(this.maxSize!==0&&!Pe(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Pe(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!b,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=Pe(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||_||0,this.ttl){if(!Pe(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 M="LRU_CACHE_UNBOUNDED";wn(M)&&(Br.add(M),Zo("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,ze))}b&&Hr("stale","allowStale"),_&&Hr("maxAge","ttl"),x&&Hr("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Sn(this.max),this.starts=new Sn(this.max),this.setItemTTL=(r,i,s=Ot.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?Ot.now():0};let t=0;const n=()=>{const r=Ot.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 Sn(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,n,r,i)=>{if(this.isBackgroundFetch(n))return 0;if(!Pe(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,t),!Pe(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)=>{if(this.sizes[t]=n,this.maxSize){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 Ur("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 c=Ot.now()-this.starts[n];o.start=Math.floor(Date.now()-c)}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=Ot.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:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(o=this.requireSize(t,n,o,c),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(t),this;let a=this.size===0?void 0:this.keyMap.get(t);if(a===void 0)a=this.newIndex(),this.keyList[a]=t,this.valList[a]=n,this.keyMap.set(t,a),this.next[this.tail]=a,this.prev[a]=this.tail,this.tail=a,this.size++,this.addItemSize(a,o),u=!1;else{const l=this.valList[a];n!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():s||(this.dispose(l,t,"set"),this.disposeAfter&&this.disposed.push([l,t,"set"])),this.removeItemSize(a),this.valList[a]=n,this.addItemSize(a,o)),this.moveToTail(a)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(a,r,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const n=this.head,r=this.keyList[n],i=this.valList[n];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(n),t&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(t,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const r=this.keyMap.get(t);return r!==void 0&&!this.isStale(r)?(n&&this.updateItemAge(r),!0):!1}peek(t,{allowStale:n=this.allowStale}={}){const r=this.keyMap.get(t);if(r!==void 0&&(n||!this.isStale(r))){const i=this.valList[r];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,n,r,i){const s=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(s))return s;const o=new _n,c={signal:o.signal,options:r,context:i},u=d=>(o.signal.aborted||this.set(t,d,c.options),d),a=d=>{if(this.valList[n]===f&&(!r.noDeleteOnFetchRejection||f.__staleWhileFetching===void 0?this.delete(t):this.valList[n]=f.__staleWhileFetching),f.__returned===f)throw d},l=d=>d(this.fetchMethod(t,s,c)),f=new Promise(l).then(u,a);return f.__abortController=o,f.__staleWhileFetching=s,f.__returned=null,n===void 0?(this.set(t,f,c.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:c=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:f=this.fetchContext,forceRefresh:d=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i});const g={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:c,sizeCalculation:u,noUpdateTTL:a,noDeleteOnFetchRejection:l};let h=this.keyMap.get(t);if(h===void 0){const y=this.backgroundFetch(t,h,g,f);return y.__returned=y}else{const y=this.valList[h];if(this.isBackgroundFetch(y))return n&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!d&&!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),y;const v=this.backgroundFetch(t,h,g,f);return n&&v.__staleWhileFetching!==void 0?v.__staleWhileFetching:v.__returned=v}}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],c=this.isBackgroundFetch(o);return this.isStale(s)?c?n?o.__staleWhileFetching:void 0:(i||this.delete(t),n?o:void 0):c?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 Ur("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 Ur("reset","clear"),this.clear}get length(){return yg("length","size"),this.size}static get AbortController(){return _n}static get AbortSignal(){return Xo}}var _g=ze;const wg=_g;async function Sg(e){return(await bn.get("/pvideo",{params:{aid:e}})).data.data}async function Cg(e){return[]}const Yr=new wg({max:200});async function kg(e){if(Yr.has(e))return Yr.get(e);const[t,n]=await Promise.all([Sg(e),Cg()]);return Yr.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function Qo(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",mg());const s=(await bn.post("/x/v2/history/toview/"+e,r,{withCredentials:!0})).data,o=(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0";return o||Me((s==null?void 0:s.message)||"\u51FA\u9519\u4E86"),o}}const xg=Qo("add"),Tg=Qo("del"),qo=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var c;const s=(await zr.get(pg+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(c=n.tag)==null?void 0:c.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"}},Eg=qo("dislike"),Ag=qo("cancel"),Be={modal:"_modal_g0in4_1",titleDesc:"_title-desc_g0in4_4",reasonList:"_reason-list_g0in4_8",reason:"_reason_g0in4_8",reasonNo:"_reason-no_g0in4_29",tips:"_tips_g0in4_43"},Vr=hg();function Lg({show:e,onHide:t,item:n}){const[r,i]=p.useState(!1),s=H(async(u,a)=>{if(!n)return;let l=!1,f=null;try{i(!0),l=await Eg(n,u)}catch(d){f=d}finally{i(!1)}if(f)return console.error(f.stack||f),Yo();l?Me("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Vo(),l&&(Vr.set(n.param,{id:u,name:a}),t())}),o=p.useMemo(()=>{var u;return[...(u=n==null?void 0:n.dislike_reasons)!=null?u:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[n]),c=["1","2","3","4","5","6"];return Ce(c,u=>{if(!e||!n||!c.includes(u.key))return;const a=Number(u.key)-1,l=document.querySelectorAll(`.${Be.reason}`)[a]||null;l==null||l.click()}),A(jr,{show:e,onHide:t,clsModal:Be.modal,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[A("div",{className:he.modalHeader,children:[A("div",{className:he.modalTitle,children:["\u6211\u4E0D\u60F3\u770B",m("span",{className:Be.titleDesc,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),m("div",{className:"space",style:{flex:1}}),m(Wr,{onClick:t})]}),A("div",{className:he.modalBody,children:[m("div",{className:Be.reasonList,children:o.map((u,a)=>A("button",{className:Be.reason,"data-id":u.reason_id,onClick:()=>s(u.reason_id,u.reason_name),disabled:r,children:[m("span",{className:Be.reasonNo,children:a+1}),u.reason_name]},u.reason_id))}),A("div",{className:Be.tips,children:[m(Je,{name:"Info",size:15,style:{marginRight:5}}),"\u4F7F\u7528\u5220\u9664\u952E\u6253\u5F00\u5F39\u6846, \u6570\u5B57\u952E\u9009\u62E9, Esc \u5173\u95ED"]})]})]})}const Cn={show:!1,onHide:ta,item:null},ea=Ve({value:Cn.show}),Og=function(){return dt(ea).value};function ta(){na({show:!1,item:null})}function na(e){Object.assign(Cn,e),ea.value=Cn.show,Mg().render(m(Lg,{...Cn,onHide:ta}))}let Kr;function Mg(){if(!Kr){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),Kr=Bt(e)}return Kr}function Pg(e){(e==null?void 0:e.param)&&Vr.has(e.param)||na({show:!0,item:e})}function Rg(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=>Ed(o.toString(),2,"0")).join(":")}function ra(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}const ae={biliVideoCard:"_bili-video-card_1a93a_1",imageWrapper:"_image-wrapper_1a93a_4",previewCardWrapper:"_preview-card-wrapper_1a93a_8",previewCardInner:"_preview-card-inner_1a93a_21",watchLater:"_watch-later_1a93a_25",badge:"_badge_1a93a_28",recommendReason:"_recommend-reason_1a93a_36",bangumiDesc:"_bangumi-desc_1a93a_51",btnDislike:"_btn-dislike_1a93a_54",btnDislikeIcon:"_btn-dislike-icon_1a93a_69",btnDislikeTip:"_btn-dislike-tip_1a93a_76",dislikedWrapper:"_disliked-wrapper_1a93a_91",dislikeContentCover:"_dislike-content-cover_1a93a_105",dislikeContentCoverInner:"_dislike-content-cover-inner_1a93a_111",dislikeIcon:"_dislike-icon_1a93a_122",dislikeReason:"_dislike-reason_1a93a_125",dislikeDesc:"_dislike-desc_1a93a_129",dislikeContentAction:"_dislike-content-action_1a93a_133"};function Xr(e,t){return isNaN(e)?t:e}function Ng({className:e,videoDuration:t,pvideo:n,enterCursorState:r}){const i=p.useRef(null),s=ng(i),o={videoDuration:t,pvideo:n,cursorState:s,elWidth:Xr(s.elementW,r.width),elHeight:Xr(s.elementH,r.height),relativeX:Xr(s.elementX,r.relativeX)};return m("div",{ref:i,className:Z(ae.previewCardWrapper,e),children:n?m(Dg,{...o}):!1})}function Dg({videoDuration:e,pvideo:t,elWidth:n,elHeight:r,relativeX:i}){var b;let s=0,o=0;n&&i&&!isNaN(i)&&!isNaN(n)&&(s=i/n,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e||0)*s));let c=p.useMemo(()=>{const T=(t==null?void 0:t.index)||[];let M=Ig(T,o);return M!==-1?M:o>T[T.length-1]?(M=Math.floor(T.length*s)-1,M<0&&(M=0),M):0},[t,o]);const{img_x_len:u,img_y_len:a,img_x_size:l,img_y_size:f}=t,d=a*u;c=c+1;const g=Math.floor(c/d),h=c-g*d,y=((b=t.image)==null?void 0:b[g])||"",v=Math.floor(h/u)+1,S=h-(v-1)*u,L=n*u,D=r*a,x=(v-1)*r,_=(S-1)*n;return m("div",{className:ae.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${_}px -${x}px`,backgroundSize:`${L}px ${D}px`},children:m($g,{progress:s})})}function $g({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 Ig(e,t){var c;let n=0,r=e.length-1,i=-1;for(;n<=r;){const u=Math.floor((n+r)/2),a=e[u];if(t===a)return u;a<t?(n=u+1,i=u):r=u-1}if(i===-1)return-1;const s=e[i],o=(c=e[i+1])!=null?c:0;return s<t&&t<o?i:-1}const Fg=Bo().format("YYYY"),jg=e=>{if(!e)return"";const t=Bo.unix(e);return t.format("YYYY")===Fg?t.format("M-D"):t.format("YY-M-D")},Wg=e=>e.replace(/^http:\/\//,"https://"),Zr=p.memo(function({style:t,className:n,item:r,loading:i,...s}){i=i!=null?i:!r;const o=A("div",{className:Z("bili-video-card__skeleton",{hide:!i}),children:[m("div",{className:"bili-video-card__skeleton--cover"}),m("div",{className:"bili-video-card__skeleton--info",children:A("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"})]})})]});return A("div",{style:t,className:Z("bili-video-card",ae.biliVideoCard,n),"data-report":"partition_recommend.content",...s,children:[o,!i&&r&&m(zg,{item:r})]})});p.memo(function({dislikedReason:t,item:n}){const r=H(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Ag(n,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),Yo();i?Me("\u5DF2\u64A4\u9500"):Vo(),i&&Vr.delete(n.param)});return A("div",{className:Z(ae.dislikedWrapper),children:[m("div",{className:ae.dislikeContentCover,children:A("div",{className:ae.dislikeContentCoverInner,children:[m(Je,{name:"DistraughtFace",size:32,className:ae.dislikeIcon}),m("div",{className:ae.dislikeReason,children:t==null?void 0:t.name}),m("div",{className:ae.dislikeDesc,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),m("div",{className:ae.dislikeContentAction,children:A("button",{onClick:r,children:[m(Je,{name:"Return",size:"16",style:{marginRight:4,marginTop:-2}}),"\u64A4\u9500"]})})]})});const zg=p.memo(function({item:t}){const n=p.useRef(null),[r,i]=p.useState(()=>({width:0,height:0,relativeX:0}));vn("mouseenter",K=>{var pe;const le=(pe=n.current)==null?void 0:pe.getBoundingClientRect();if(!le)return;const{width:fe,height:xe,x:ee}=le;i({width:fe,height:xe,relativeX:K.pageX-window.pageXOffset-ee})},{target:n});const s=$r(n),o=p.useRef(null),c=$r(o),[u,a]=p.useState(!1);Fe();let{bvid:l,title:f,pic:d,goto:g,stat:{view:h,like:y},pubdate:v,duration:S,owner:{name:L,face:D,mid:x},rcmd_reason:_}=t;const b=String(t.id),T=p.useMemo(()=>jg(v),[v]),M=p.useMemo(()=>Wg(d),[d]),[$,I]=p.useState(null),[P,F]=p.useState(!1),k=H(async()=>{if(!$&&!P)try{F(!0);const K=await kg(b);I(K)}finally{F(!1)}});p.useEffect(()=>{s&&k()},[s]);let w=!1;const C=H(async K=>{if(K.preventDefault(),w)return;w=!0;const le=u?Tg:xg;let fe=!1;try{fe=await le(b)}finally{w=!1}fe&&a(xe=>!xe)}),O=p.useRef(null);$r(O),H(K=>{K.stopPropagation(),K.preventDefault()});const E=!1,N=t.goto==="av",R=N?`/video/${l}`:t.uri,z=p.useMemo(()=>Rg(S),[S]),Y=p.useMemo(()=>ra(h),[h]),G=p.useMemo(()=>ra(y),[y]),J=G,ke=H(K=>{if(!de.openInIINAWhenRightClick)return;const le=new URL(R,location.href).href,fe=`iina://open?url=${encodeURIComponent(le)}`;window.open(fe,"_self"),K.preventDefault()});return A("div",{className:"bili-video-card__wrap __scale-wrap",onContextMenu:ke,children:[m("a",{href:R,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:A("div",{className:"bili-video-card__image __scale-player-wrap",ref:n,children:[A("div",{className:Z("bili-video-card__image--wrap",ae.imageWrapper),children:[A("picture",{className:"v-img bili-video-card__cover",children:[m("source",{srcSet:`${M}@672w_378h_1c_!web-home-common-cover.avif`,type:"image/avif"}),m("source",{srcSet:`${M}@672w_378h_1c_!web-home-common-cover.webp`,type:"image/webp"}),m("img",{src:`${M}@672w_378h_1c_!web-home-common-cover`,alt:f,loading:"eager"})]}),s&&m(Ng,{videoDuration:S,pvideo:$==null?void 0:$.pvideoData,enterCursorState:r}),A("div",{className:`bili-watch-later ${ae.watchLater}`,style:{display:s?"flex":"none"},ref:o,onClick:C,children:[m("svg",{className:"bili-watch-later__icon",children:m("use",{xlinkHref:u?"#widget-watch-save":"#widget-watch-later"})}),m("span",{className:"bili-watch-later__tip",style:{display:c?"block":"none"},children:u?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),!1]}),m("div",{className:"bili-video-card__mask",children:A("div",{className:"bili-video-card__stats",children:[A("div",{className:"bili-video-card__stats--left",children:[A("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:Y})]}),m("span",{className:"bili-video-card__stats--item",children:g==="av"?A(Ct,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:G})]}):A(Ct,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:J})]})})]}),m("span",{className:"bili-video-card__stats__duration",children:N&&z})]})})]})}),m("div",{className:"bili-video-card__info __scale-disable",children:A("div",{className:"bili-video-card__info--right",children:[m("a",{href:R,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:m("h3",{className:"bili-video-card__info--tit",title:f,children:f})}),A("p",{className:"bili-video-card__info--bottom",children:[N&&A("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${x}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[_!=null&&_.content?m("span",{className:ae.recommendReason,children:_.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}),T&&A("span",{className:"bili-video-card__info--date",children:["\xB7 ",T]})]}),E]})]})})]})});async function Bg(e){const t=e.page++;return(await bn.get("/x/web-interface/index/top/rcmd",{baseURL:Ko,withCredentials:!0,params:{fresh_type:3,version:1,ps:14,fresh_idx:t,fresh_idx_1h:t,homepage_ver:1}})).data.data.item}async function Jr(e,t){let n=(await Promise.all(new Array(e).fill(0).map(()=>Bg(t)))).flat();return n=Id(n,r=>r.id),n.forEach(r=>{var i,s;((i=r.rcmd_reason)==null?void 0:i.reason_type)===1&&((s=r.rcmd_reason).content||(s.content="\u5DF2\u5173\u6CE8"))}),n.map(r=>({...r,uniqId:r.id+"-"+crypto.randomUUID()}))}async function Hg(e){return Jr(1,e)}var re={exports:{}},Ug="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Gg=Ug,Yg=Gg;function ia(){}function sa(){}sa.resetWarningCache=ia;var Vg=function(){function e(r,i,s,o,c,u){if(u!==Yg){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:sa,resetWarningCache:ia};return n.PropTypes=n,n};re.exports=Vg();class Qr extends p.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n!=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:c,loadMore:u,pageStart:a,ref:l,threshold:f,useCapture:d,useWindow:g,getScrollParent:h,...y}=t;y.ref=S=>{this.scrollComponent=S,l&&l(S)};const v=[n];return i&&(c?o?v.unshift(c):v.push(c):this.defaultLoader&&(o?v.unshift(this.defaultLoader):v.push(this.defaultLoader))),ie.default.createElement(r,y,v)}}oi(Qr,"propTypes",{children:re.exports.node.isRequired,element:re.exports.node,hasMore:re.exports.bool,initialLoad:re.exports.bool,isReverse:re.exports.bool,loader:re.exports.node,loadMore:re.exports.func.isRequired,pageStart:re.exports.number,ref:re.exports.func,getScrollParent:re.exports.func,threshold:re.exports.number,useCapture:re.exports.bool,useWindow:re.exports.bool}),oi(Qr,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const qr="_video-grid_14t5i_9",oa="_limit-two-lines_14t5i_19",ei="_internal-testing_14t5i_43",Kg="_limit-one-line_14t5i_50",aa="_narrow-mode_14t5i_71",ey={videoGrid:qr,limitTwoLines:oa,internalTesting:ei,limitOneLine:Kg,narrowMode:aa};function Xg({enabled:e,refresh:t,minIndex:n=0,maxIndex:r,containerRef:i,getScrollerRect:s,openDislikeAt:o,changeScrollY:c}){const[u,a]=p.useState(null),l=H(()=>{var k;if(u===null||!i.current)return!1;const P=s(),F=(k=i.current.querySelector(`.${st.card}.${st.cardActive}`))==null?void 0:k.getBoundingClientRect();return!(!P||!F||F.top-P.top<-(P.height+F.height)||F.top-P.top>P.height*2+F.height)}),f=H((P,F)=>{if(!e)return;F==null||F.preventDefault();const k=l()?u+P:x();if(k<n){M(n);return}if(k>r){M(r);return}a(k),M(k)}),d=p.useCallback(P=>{f(-1,P)},[]),g=p.useCallback(P=>{f(1,P)},[]);Ce("leftarrow",d),Ce("rightarrow",g);const h=p.useCallback(P=>{f(-I(),P)},[]),y=p.useCallback(P=>{f(I(),P)},[]);Ce("uparrow",h),Ce("downarrow",y);const v=H(()=>{!e||a(null)}),S=H(()=>{!e||typeof u!="number"||$(u)}),L=H(()=>{!e||typeof u!="number"||o(u)});Ce("esc",v),Ce("enter",S),Ce("backspace",L);const D=H(()=>{!e||t()});Ce("r",D,{exactMatch:!0});function x(){const P=s();if(!P)return 0;const F=b();for(let k=0;k<F.length;k++)if(F[k].getBoundingClientRect().top>=P.top)return k;return 0}const _=`.${st.card}`;function b(){var P;return[...((P=i.current)==null?void 0:P.querySelectorAll(_))||[]]}function T(P){return b()[P]}function M(P){var C;const F=T(P);(C=F==null?void 0:F.scrollIntoViewIfNeeded)==null||C.call(F,!1);const k=s(),w=F.getBoundingClientRect();if(!(!k||!w)){if(w.top<=k.top){const O=-(k.top-w.top+10);c==null||c({offset:O});return}if(k.bottom-w.bottom<10){const O=10-(k.bottom-w.bottom);c==null||c({offset:O});return}}}function $(P){const F=T(P);if(!F)return;const k=F.querySelector(".bili-video-card__wrap > a");k==null||k.click()}function I(){if(de.useNarrowMode)return 2;let P=ca.get(window.innerWidth);if(P)return P;const F=i.current;if(!F)return 0;const k=window.getComputedStyle(F);return k.display!=="grid"?0:(P=k.gridTemplateColumns.split(" ").length,ca.set(window.innerWidth,P),P)}return{activeIndex:u,clearActiveIndex:v}}const ca=new Map,st={loader:Lr`
text-align: center;
line-height: 60px;
font-size: 120%;
`,card:Lr`
border: 2px solid transparent;
/* global class under .card */
.bili-video-card__info {
padding-left: 2px;
padding-bottom: 1px;
margin-top: calc(var(--info-margin-top) - 1px);
}
`,cardActive:Lr`
border-color: #fb7299;
border-radius: 6px;
overflow: hidden;
`},ua=p.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:n,className:r,scrollerRef:i},s)=>{const[o,c]=p.useState([]),[u,a]=p.useState(!1);p.useImperativeHandle(s,()=>({refresh:f}));const l=p.useMemo(()=>({page:1}),[]),f=H(async()=>{await(n==null?void 0:n());try{L(),a(!0),l.page=1,c(await Jr(2,l)),L()}finally{a(!1)}}),d=H(async()=>{const x=await Jr(2,l);c(_=>[..._,...x])}),{useNarrowMode:g}=Fe(),h=p.useRef(null),y=H(()=>{var x;if(e){const _=Is+50;return new DOMRect(0,_,window.innerWidth,window.innerHeight-_)}else return(x=i==null?void 0:i.current)==null?void 0:x.getBoundingClientRect()}),v=Og(),{activeIndex:S,clearActiveIndex:L}=Xg({enabled:t&&!v,refresh:f,maxIndex:o.length-1,containerRef:h,getScrollerRect:y,openDislikeAt(x){Pg(o[x])},changeScrollY:e?function({offset:x,absolute:_}){const b=document.documentElement;if(typeof x=="number"){b.scrollTop+=x;return}if(typeof _=="number"){b.scrollTop=_;return}}:void 0}),D=pt();return m(Qr,{pageStart:0,loadMore:d,hasMore:!0,useWindow:e,threshold:360,style:{minHeight:"100%"},loader:m("div",{className:st.loader,children:"\u52A0\u8F7D\u4E2D..."},0),children:m("div",{ref:h,className:Z(qr,{[ei]:D},{[aa]:g},r),children:o.map((x,_)=>m(Zr,{loading:u,item:x,className:Z(st.card,{[st.cardActive]:_===S})},x.uniqId))})})}),Zg={checkbox:"_checkbox_5cp8u_1"},ti={container:{name:"8irbms",styles:"display:inline-flex;align-items:center"},checkbox:{name:"4l4ubo",styles:"cursor:pointer;outline:none"},label:{name:"side0b",styles:"margin-left:2px;user-select:none;cursor:pointer"}};function Mt({configKey:e,label:t,className:n}){const i=!!Fe()[e],s=p.useCallback(c=>{const u=c.target.checked;Ms({[e]:u}),u&&e==="initialShowMore"&&Me("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u63A8\u8350\u5F39\u6846")},[]),o=p.useId();return A("span",{css:ti.container,className:n,children:[m("input",{type:"checkbox",id:o,checked:i,onChange:s,css:ti.checkbox}),m("label",{htmlFor:o,css:ti.label,children:t||e})]})}var Jg={name:"1qkltea",styles:"margin-left:5px"};const Qg=function(){const e=Jg;return A(Ct,{children:[m(Mt,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",css:e}),m(Mt,{configKey:"useNarrowMode",label:"\u542F\u7528\u5C45\u4E2D\u6A21\u5F0F(\u5C45\u4E2D\u4E24\u5217)",css:e})]})},ce={configIcon:"_config-icon_1jab1_1",settingsGroup:"_settings-group_1jab1_6",settingsGroupTitle:"_settings-group-title_1jab1_9",settingsGroupContent:"_settings-group-content_1jab1_12",row:"_row_1jab1_18",check:"_check_1jab1_22"};async function la(){Me("\u5373\u5C06\u5237\u65B0\u7F51\u9875"),await ht.exports(500),location.reload()}function qg(){if(!!window.confirm("\u786E\u5B9A?"))return oh(),la()}function ev({show:e,onHide:t}){const n=p.useId(),{pureRecommend:r}=Fe();return A(jr,{show:e,onHide:t,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[A("div",{className:he.modalHeader,children:[A("div",{className:he.modalTitle,children:[m(Je,{name:"Config",className:ce.configIcon}),"\u8BBE\u7F6E\u9879"]}),m("div",{className:"space",style:{flex:1}}),m(Wr,{onClick:t})]}),A("main",{className:he.modalBody,children:[A("div",{className:ce.settingsGroup,children:[m("div",{className:ce.settingsGroupTitle,children:"\u5F00\u5173"}),A("div",{className:Z(ce.settingsGroupContent,ce.row),children:[m("input",{type:"checkbox",className:Zg.checkbox,id:n,checked:r,onChange:i=>(de.pureRecommend=i.target.checked,la())}),m("label",{htmlFor:n,children:"\u5F00\u542F\u7EAF\u63A8\u8350\u6A21\u5F0F"}),m(Mt,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",className:ce.check}),m(Mt,{configKey:"useNarrowMode",label:"\u542F\u7528\u5C45\u4E2D\u6A21\u5F0F(\u5C45\u4E2D\u4E24\u5217)",className:ce.check})]})]}),A("div",{className:ce.settingsGroup,children:[m("div",{className:ce.settingsGroupTitle,children:"\u9AD8\u7EA7"}),A("div",{className:Z(ce.settingsGroupContent),children:[m("div",{className:ce.row,children:m("button",{className:"primary-btn roll-btn",style:{display:"inline-flex"},onClick:qg,children:m("span",{children:"\u6062\u590D\u9ED8\u8BA4\u8BBE\u7F6E"})})}),m("div",{className:ce.row,style:{marginTop:10},children:m(Mt,{configKey:"openInIINAWhenRightClick",label:"\u53F3\u952E\u5728 IINA \u4E2D\u6253\u5F00",className:ce.check})})]})]})]})]})}const fa={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},tv=p.forwardRef(function({children:t},n){const[r,i]=jo(!1);p.useImperativeHandle(n,()=>i,[i]);const s=m("button",{className:Z("primary-btn",fa.expandBtn),onClick:i.toggle,children:m("svg",{className:Z({[fa.expanded]:r}),children:m("use",{xlinkHref:"#widget-arrow"})})});return A(Ct,{children:[s,r&&t]})}),Pt={modalMask:"_modal-mask_1as61_1",narrowMode:"_narrow-mode_1as61_1",modal:"_modal_1as61_1",modalHeader:"_modal-header_1as61_21",modalBody:"_modal-body_1as61_22",btnRefresh:"_btn-refresh_1as61_25"},nv=p.memo(function({show:t,onHide:n}){const r=p.useRef(null),i=p.useRef(null),{useNarrowMode:s}=Fe(),o=p.useMemo(()=>({[Pt.narrowMode]:s}),[s]),c=H(()=>{var a;return(a=i.current)==null?void 0:a.refresh()}),u=H(()=>{r.current&&(r.current.scrollTop=0)});return A(jr,{show:t,onHide:n,clsModalMask:Z(o),clsModal:Z(Pt.modal,o),children:[A("div",{className:Z(he.modalHeader,Pt.modalHeader),children:[m("div",{className:he.modalTitle,children:"\u63A8\u8350"}),m("div",{className:"space",style:{flex:1}}),m(tv,{children:m(Qg,{})}),A("button",{className:`primary-btn roll-btn ${Pt.btnRefresh}`,onClick:c,children:[m("svg",{children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),m(Wr,{onClick:n})]}),m("div",{className:Z(he.modalBody,Pt.modalBody),ref:r,children:m(ua,{ref:i,shortcutEnabled:t,onScrollToTop:u,infiteScrollUseWindow:!1,scrollerRef:r})})]})});var ni={};Object.defineProperty(ni,"__esModule",{value:!0});var da=ni.useSticky=void 0;const ri=ie.default;function rv(){const e=(0,ri.useRef)(null),[t,n]=(0,ri.useState)(!1);return(0,ri.useEffect)(()=>{function r(){if(!e.current)return;const i=e.current.getBoundingClientRect().top,s=parseInt(getComputedStyle(e.current).top),o=i<=s;o&&!t?n(!0):!o&&t&&n(!1)}return r(),document.addEventListener("scroll",r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{document.removeEventListener("scroll",r),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[t]),[e,t]}da=ni.useSticky=rv;const ha={btn:Qe`
padding: 0;
width: 31px;
height: 31px;
border-radius: 50%;
`,icon:Qe`
svg {
width: 14px;
height: 14px;
}
`},kn=Ve({showMore:de.initialShowMore}),iv=function(){return dt(kn)},sv=()=>{kn.showMore=!0},ov=()=>{kn.showMore=!1};function pa({onRefresh:e}){const{accessKey:t,pureRecommend:n}=Fe();p.useRef(null);const{showMore:r}=dt(kn),[i,s]=p.useState(!1),o=p.useCallback(()=>{s(!0)},[]),c=p.useCallback(()=>{s(!1)},[]),[u,a]=da();return or(),A(Ct,{children:[A("div",{ref:u,className:"area-header",css:[Qe`
margin-bottom: 0;
height: 50px;
`,n&&Qe`
position: sticky;
top: ${Is}px;
z-index: 1000;
`,n&&a&&Qe`
background-color: var(--bg1_float);
box-shadow: 0 2px 4px rgb(0 0 0 / 8%);
`,"",""],children:[A("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"})})]}),A("div",{className:"right",children:[m("button",{className:"primary-btn",css:ha.btn,onClick:o,children:m(Je,{name:"Config",css:ha.icon})}),A("button",{className:"primary-btn roll-btn",onClick:e,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),A("button",{className:"primary-btn see-more",onClick:sv,children:[m("span",{children:"\u67E5\u770B\u66F4\u591A"}),m("svg",{children:m("use",{xlinkHref:"#widget-arrow"})})]})]})]}),m(nv,{show:r,onHide:ov}),m(ev,{show:i,onHide:c})]})}const av={grid:Qe`
/* card=299 col-gap=20 */
width: ${299*2+20}px;
margin: 0 auto;
`};function cv(){const{useNarrowMode:e}=Fe(),{showMore:t}=iv(),n=p.useRef(null),r=H(()=>{var s;return(s=n.current)==null?void 0:s.refresh()}),i=H(()=>{document.documentElement.scrollTop=0});return A("section",{"data-area":"\u63A8\u8350",children:[m(pa,{onRefresh:r}),m(ua,{ref:n,css:[e&&av.grid,"",""],shortcutEnabled:!t,infiteScrollUseWindow:!0,onScrollToTop:i})]})}function uv(){const e=p.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),t=pt(),n=p.useMemo(()=>({page:1}),[]),{data:r,loading:i,error:s,refresh:o}=Fm(()=>Hg(n));return s&&console.error(s.stack||s),A("section",{"data-area":"\u63A8\u8350",children:[m(pa,{onRefresh:o}),m("div",{className:Z(qr,oa,{[ei]:t}),style:{marginBottom:t?30:0},children:i||s?e.map(c=>m(Zr,{},c)):r.map(c=>m(Zr,{item:c},c.uniqId))})]})}const lv=10*1e3,fv=200;async function ma(e,t){let n=[];const r=()=>{n=Array.from(document.querySelectorAll(e))};r();const i=performance.now();for(;!n.length&&performance.now()-i<lv;)await ht.exports(fv),r();if(!n.length){console.log("[bilibili-app-recommend]: tryAction timeout, selector = %s",e);return}for(const s of n)await Promise.resolve(t(s))}function ii(e){return ma(e,t=>t.remove())}(function(){var t;if(location.href.startsWith("https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?"))return window.stop(),(t=window.top)==null?void 0:t.postMessage(location.href,"https://www.bilibili.com");if(location.pathname==="/")return dv()})();async function dv(){return ii(".adblock-tips"),ma("html.gray",e=>e.classList.remove("gray")),de.pureRecommend?pv():hv()}async function hv(){const t=Date.now()+1e4;let n=null;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){n=document.querySelector(".bili-layout > section.bili-grid");break}if(pt()&&document.querySelector(".recommended-container")){n=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await ht.exports(100)}if(!n){console.error("[bilibili-app-recommend]: init fail");return}const r=document.createElement("section");n.insertAdjacentElement("afterend",r),Bt(r).render(m(uv,{}))}async function pv(){var i,s;pt()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),ii(".bili-feed4 .header-channel")):((s=document.querySelector(".bili-layout"))==null||s.remove(),ii(".bili-footer"));const e=document.createElement("div");e.classList.add(pt()?"bili-feed4-layout":"bili-layout","pure-recommend");const t=document.querySelector(".bili-header");t==null||t.insertAdjacentElement("afterend",e);const n=document.createElement("section");e==null||e.appendChild(n),Bt(n).render(m(cv,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);