diff --git a/dist/bilibili-evolved.preview.user.js b/dist/bilibili-evolved.preview.user.js index 091cc5ee4..436712652 100644 --- a/dist/bilibili-evolved.preview.user.js +++ b/dist/bilibili-evolved.preview.user.js @@ -52,7 +52,7 @@ getPlayerConfig(e){return lodash.get(JSON.parse(localStorage.getItem("bilibili_p // eslint-disable-next-line class-methods-use-this get nativeApi(){return unsafeWindow.player}isMute(){return this.nativeApi?this.nativeApi.isMute():null}changeVolume(e){if(!this.nativeApi)return null;const t=this.nativeApi.volume();return this.nativeApi.volume(t+e/100),Math.round(100*this.nativeApi.volume())}seek(e){return this.nativeApi?(this.nativeApi.play(),setTimeout((()=>{this.nativeApi.seek(e);const t=dq(".bilibili-player-video-toast-bottom .bilibili-player-video-toast-item:first-child .bilibili-player-video-toast-item-text span:nth-child(2)");t&&(t.textContent=" 00:00")})),this.nativeApi.getCurrentTime()):null}changeTime(e){if(!this.nativeApi)return null;const t=this.query.video.element.sync();return t?(this.nativeApi.seek(t.currentTime+e,t.paused),this.nativeApi.getCurrentTime()):null}async toggleLight(e){const t=await this.query.control.settings.lightOff();t.checked=!e,(0,r.raiseEvent)(t,"change")}}class f extends p{constructor(){super(),s(this,"type","bwp"),this.query.video.element=l(".bilibili-player-video bwp-video")}}class h extends u{constructor(){super(),s(this,"type","bangumi"),s(this,"query",c({playerWrap:".player-module",bilibiliPlayer:".bpx-player-container",playerArea:".bpx-player-primary-area",video:{element:".bpx-player-video-wrap video",wrap:".bpx-player-video-area",top:".bpx-player-top-wrap",state:".bpx-player-state-wrap",panel:".bpx-player-ending-panel",popup:".bpx-player-dialog-wrap",subtitle:".bpx-player-subtitle-wrap",basDanmaku:".bpx-player-bas-dm-wrap",advDanmaku:".bpx-player-adv-dm-wrap",danmaku:".bpx-player-row-dm-wrap",container:".bpx-player-video-wrap"},control:{element:".squirtle-controller",wrap:".bpx-player-control-wrap",mask:".bpx-player-control-mask",top:".bpx-player-control-top",progress:".squirtle-progress-wrap",bottom:".squirtle-controller-wrap",bottomLeft:".squirtle-controller-wrap-left",bottomCenter:".squirtle-controller-wrap-center",bottomRight:".squirtle-controller-wrap-right",buttons:{start:".squirtle-video-start",next:".squirtle-video-next",time:".squirtle-time-wrap",quality:".squirtle-video-quality",pageList:".squirtle-video-pagelist",speed:".squirtle-video-speed",subtitle:".squirtle-video-subtitle",volume:".squirtle-video-volume .squirtle-volume-icon",settings:".squirtle-video-setting",pip:".squirtle-video-pip",widescreen:".squirtle-video-widescreen",webFullscreen:".squirtle-video-pagefullscreen",fullscreen:".squirtle-video-fullscreen"},settings:{wrap:".squirtle-setting-wrap",lightOff:".squirtle-lightoff"}},toastWrap:".bpx-player-tooltip-area",danmakuTipLayer:".bpx-player-dialog-wrap",danmakuSwitch:".bpx-player-dm-switch input"})),(0,o.bpxPlayerPolyfill)()}isMute(){return this.query.control.buttons.volume.sync()?.classList.contains("squirtle-volume-mute-state")??!1}changeVolume(e){const t=this.query.video.element.sync();return t?(t.volume=lodash.clamp(t.volume+e/100,0,1),Math.round(100*t.volume)):null}seek(e){const t=this.query.video.element.sync();return t?(t.play(),setTimeout((()=>{t.currentTime=lodash.clamp(e,0,t.duration);const n=dq(".bpx-player-toast-row .bpx-player-toast-item .bpx-player-toast-text");n?.textContent?.startsWith("已为您定位至")&&(n.textContent="已为您定位至00:00")})),t.currentTime):null}changeTime(e){const t=this.query.video.element.sync();return t?(t.currentTime=lodash.clamp(t.currentTime+e,0,t.duration),t.currentTime):null}toggleLight(e){const t=this.query.control.settings.lightOff.sync(),n=!t.classList.contains("active")&&!e,i=t.classList.contains("active")&&e;(n||i)&&t.dispatchEvent(new MouseEvent("click"))}}const m=(0,a.matchCurrentPage)(a.bangumiUrls)?new h:(0,r.isBwpVideo)()?new f:new p},6773:function(e,t,n){"use strict";n.r(t),n.d(t,{getBlob:function(){return s},getBlobWithCredentials:function(){return l},getText:function(){return d},getTextWithCredentials:function(){return u},getJson:function(){return h},getJsonWithCredentials:function(){return m},postText:function(){return g},postTextWithCredentials:function(){return b},postJson:function(){return v},postJsonWithCredentials:function(){return y},monkey:function(){return w},responsiveGetPages:function(){return x},getPages:function(){return k},bilibiliApi:function(){return _}});var i=n(4496);const r=e=>{const t=new XMLHttpRequest,{isText:n=!0,body:i}=e(t);return new Promise(((e,r)=>{t.addEventListener("load",(()=>e(n?t.responseText:t.response))),t.addEventListener("error",(()=>r(t.status))),t.send(i)}))},a=e=>t=>(t.withCredentials=!0,e(t)),o=e=>t=>(t.responseType="blob",t.open("GET",e),{isText:!1}),s=e=>r(o(e)),l=e=>r(a(o(e))),c=e=>t=>(t.responseType="text",t.open("GET",e),{isText:!0}),d=e=>r(c(e)),u=e=>r(a(c(e))),p=e=>t=>(t.responseType="json",t.open("GET",e),{isText:!1}),f=e=>"string"==typeof e?JSON.parse(e):e,h=async e=>{const t=await r(p(e));return f(t)},m=async e=>{const t=await r(a(p(e)));return f(t)},g=(e,t)=>r((n=>(n.open("POST",e),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),{isText:!1,body:t}))),b=(e,t)=>r((n=>(n.open("POST",e),n.withCredentials=!0,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),{isText:!1,body:t}))),v=(e,t)=>r((n=>(n.open("POST",e),n.setRequestHeader("Content-Type","application/json"),{isText:!1,body:JSON.stringify(t)}))),y=(e,t)=>r((n=>(n.open("POST",e),n.withCredentials=!0,n.setRequestHeader("Content-Type","application/json"),{isText:!1,body:JSON.stringify(t)}))),w=e=>new Promise(((t,n)=>{const i={...e,onload:e=>t(e.response),onerror:e=>{const t={...JSON.parse(JSON.stringify(e)),toString(){return JSON.stringify(this)}};n(t)}};"method"in i||(i.method="GET"),GM_xmlhttpRequest(i)})),x=e=>{let t;const n=new Promise((n=>{t=new Promise((t=>{(async()=>{const{api:i,getList:r,getTotal:a}=e;let o=1,s=1/0;const l=[];for(;l.length{const[,t]=x(e);return await t},_=async(e,t)=>{const n=await e;if(0!==n.code){const e=new Error(`${t}: code = ${n.code}, message = ${n.message||n.msg}`);throw(0,i.logError)(e),e}return n.data||{}}},4011:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{CdnTypes:function(){return i},cdnRoots:function(){return a}}),function(e){e.jsDelivr="jsDelivr",e.GitHub="GitHub"}(i||(i={}));const r="the1812",a={jsDelivr:(e,t)=>`https://cdn.jsdelivr.net/gh/${t||r}/Bilibili-Evolved@${e}/`,GitHub:(e,t)=>`https://raw.githubusercontent.com/${t||r}/Bilibili-Evolved/${e}/`}},5842:function(e,t,n){"use strict";n.r(t),n.d(t,{coreApis:function(){return On},externalApis:function(){return Ln}});var i={};n.r(i),n.d(i,{Reorder:function(){return N},ReorderDecreaseClassName:function(){return P},ReorderEnabledClassName:function(){return D},ReorderIncreaseClassName:function(){return z},ReorderOrientations:function(){return B},ReorderingClassName:function(){return V}});var r={};n.r(r),n.d(r,{getUserInfo:function(){return Z}});var a={};n.r(a),n.d(a,{CompareResult:function(){return W},Version:function(){return G}});var o={};n.r(o),n.d(o,{loadDanmakuSettingsPanel:function(){return ne},loadLazyPanel:function(){return ee},loadLazyPlayerSettingsPanel:function(){return te},loadSubtitleSettingsPanel:function(){return ie}});var s={};n.r(s),n.d(s,{styledComponentEntry:function(){return pe},toggleStyle:function(){return fe}});var l={};n.r(l),n.d(l,{getWatchlaterList:function(){return ge},toggleWatchlater:function(){return be},watchlaterList:function(){return me}});var c={};n.r(c),n.d(c,{addMenuItem:function(){return De},applyContentFilter:function(){return Le},bangumiTypeList:function(){return we},feedsCardTypes:function(){return ye},feedsCardsManager:function(){return $e},forEachFeedsCard:function(){return Ae},getFeeds:function(){return ze},getVideoFeeds:function(){return Pe},groupVideoFeeds:function(){return Ie},isPreOrderedVideo:function(){return Te},navbarFeedsTypeList:function(){return xe},withContentFilter:function(){return Me}});var d={};n.r(d),n.d(d,{disableProfilePopup:function(){return lt}});var u={};n.r(u),n.d(u,{compareID:function(){return ut},getLatestID:function(){return dt},getNotifyCount:function(){return mt},isNewID:function(){return ft},setLatestID:function(){return pt},updateInterval:function(){return ct},updateLatestID:function(){return ht}});var p={};n.r(p),n.d(p,{convertHexColorForDialogue:function(){return bt},convertHexColorForStyle:function(){return vt},convertTimeByDuration:function(){return wt},convertTimeByEndTime:function(){return xt},normalizeContent:function(){return kt}});var f={};n.r(f),n.d(f,{lightOff:function(){return Et},lightOn:function(){return St}});var h={};n.r(h),n.d(h,{forEachVideoDanmaku:function(){return It}});var m={};n.r(m),n.d(m,{BangumiInfo:function(){return Lt},VideoInfo:function(){return Ot}});var g={};n.r(g),n.d(g,{allQualities:function(){return zt},loginRequiredQualities:function(){return Mt},vipRequiredQualities:function(){return Pt}});var b={};n.r(b),n.d(b,{addMenuItem:function(){return Vt},forEachContextMenu:function(){return Dt}});var v={};n.r(v),n.d(v,{addControlBarButton:function(){return qt}});var y={};n.r(y),n.d(y,{waitForControlBar:function(){return Ft}});var w={};n.r(w),n.d(w,{LiveSocket:function(){return Xt}});var x={};n.r(x),n.d(x,{addMenuItem:function(){return on},commentAreas:function(){return Jt},forEachCommentArea:function(){return rn},forEachCommentItem:function(){return an}});var k={};n.r(k),n.d(k,{addCategoryIcons:function(){return gn},categories:function(){return fn},categoryCodes:function(){return hn},categoryLinks:function(){return mn},rawData:function(){return ln}});var _={};n.r(_),n.d(_,{createSwitchOptions:function(){return Sn}});var C=n(6773),S=n(4011),E=n(9356),$=n(6522),A=n(9183),I=n(5527),T=n(4327),O=n(7601),L=n(9017);function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P="reorder-decrease",z="reorder-increase",D="reorder-enabled",V="reordering",B={horizontal:{name:"horizontal",getMoveTransform:e=>`translateX(${e}px)`,setOtherTransform:lodash.throttle(((e,t,n)=>{if(!t.classList.contains(V))return;const i=e.find((e=>e.element===t));if(!i)return;const r=i.rect,a=e.filter((e=>e.rect.leftt.rect.left-e.rect.left)),o=e.filter((e=>e.rect.left>r.left)).sort(((e,t)=>e.rect.left-t.rect.left));if(n>=0){const[e]=o;a.forEach((e=>{e.element.style.transform="",e.element.classList.remove(z)})),o.forEach((t=>{r.left+n+r.width>=t.rect.left+t.rect.width/2?(t.element.classList.add(P),t.element.style.transform=`translateX(-${e.rect.left-r.left}px)`):(t.element.classList.remove(P),t.element.style.transform="")}))}else{const[e]=a;o.forEach((e=>{e.element.style.transform="",e.element.classList.remove(P)})),a.forEach((t=>{r.left+n<=t.rect.left+t.rect.width/2?(t.element.classList.add(z),t.element.style.transform=`translateX(${r.left+r.width-e.rect.left-e.rect.width}px)`):(t.element.classList.remove(z),t.element.style.transform="")}))}}),50)},vertical:{name:"vertical",getMoveTransform:(e,t)=>`translateY(${t}px)`,setOtherTransform:lodash.throttle(((e,t,n,i)=>{if(!t.classList.contains(V))return;const r=e.find((e=>e.element===t));if(!r)return;const a=r.rect,o=e.filter((e=>e.rect.topt.rect.top-e.rect.top)),s=e.filter((e=>e.rect.top>a.top)).sort(((e,t)=>e.rect.top-t.rect.top));if(i>=0){const[e]=s;o.forEach((e=>{e.element.style.transform="",e.element.classList.remove(z)})),s.forEach((t=>{a.top+i+a.height>=t.rect.top+t.rect.height/2?(t.element.classList.add(P),t.element.style.transform=`translateY(-${e.rect.top-a.top}px)`):(t.element.classList.remove(P),t.element.style.transform="")}))}else{const[e]=o;s.forEach((e=>{e.element.style.transform="",e.element.classList.remove(P)})),o.forEach((t=>{a.top+i<=t.rect.top+t.rect.height/2?(t.element.classList.add(z),t.element.style.transform=`translateY(${a.top+a.height-e.rect.top-e.rect.height}px)`):(t.element.classList.remove(z),t.element.style.transform="")}))}}),50)}};class N extends EventTarget{constructor(e){super(),this.container=e,M(this,"orientation",B.horizontal),M(this,"enabled",!1),M(this,"children",void 0),M(this,"snapshots",new Map),M(this,"attachedEvents",[]),this.children=[...this.container.children],this.children.every((e=>""===e.style.order))&&this.children.forEach(((e,t)=>{e.style.order=(t+1).toString()}))}addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.addEventListener(e,t,n)}getOrderMap(){return new Map(this.children.map((e=>[e,parseInt(e.style.order)])))}toggle(){this.enabled?this.disable():this.enable()}generateSnapshots(){this.children.forEach((e=>{this.snapshots.set(e,{element:e,rect:e.getBoundingClientRect()})}))}enable(){this.children.forEach((e=>{let t=0,n=0,i=!1;e.classList.add(D);(()=>{const r=(r,a)=>{e.classList.add(V),e.style.transition="none",e.style.userSelect="none",this.generateSnapshots(),this.children.filter((t=>t!==e)).forEach((e=>{e.style.transition="transform .2s ease-out"})),t=r,n=a,i=!0},a=e=>{r(e.screenX,e.screenY)};e.addEventListener("mousedown",a),this.attachedEvents.push((()=>e.removeEventListener("mousedown",a)));const o=e=>{if(1!==e.touches.length)return;const[t]=e.touches;r(t.screenX,t.screenY)};e.addEventListener("touchstart",o),this.attachedEvents.push((()=>e.removeEventListener("touchstart",o)))})(),(()=>{const r=(i,r)=>{const a=i-t,o=r-n;e.style.transform=this.orientation.getMoveTransform(a,o),this.orientation.setOtherTransform([...this.snapshots.values()],e,a,o)},a=e=>{i&&(r(e.screenX,e.screenY),e.cancelable&&e.preventDefault())};document.addEventListener("mousemove",a),this.attachedEvents.push((()=>document.removeEventListener("mousemove",a)));const o=e=>{if(!i)return;if(1!==e.touches.length)return;const[t]=e.touches;r(t.screenX,t.screenY),e.cancelable&&e.preventDefault()};e.addEventListener("touchmove",o,{passive:!1}),this.attachedEvents.push((()=>e.removeEventListener("touchmove",o)))})(),(()=>{const t=()=>{if(!i)return;e.classList.remove(V),i=!1;let t=0;const n=this.children.filter((t=>t!==e)),r=[];n.forEach((e=>{e.style.transform="",e.style.transition="",e.classList.contains(z)?(t--,e.style.order=(parseInt(e.style.order)+1).toString(),e.classList.remove(z),r.push(this.snapshots.get(e))):e.classList.contains(P)&&(t++,e.style.order=(parseInt(e.style.order)-1).toString(),e.classList.remove(P),r.push(this.snapshots.get(e)))})),e.style.userSelect="",e.style.order=(parseInt(e.style.order)+t).toString(),e.style.transform="",e.style.transition="",this.dispatchEvent(new CustomEvent("reorder",{detail:this.children.map((e=>({element:e,order:parseInt(e.style.order)})))}))};document.addEventListener("mouseup",t),this.attachedEvents.push((()=>document.removeEventListener("mouseup",t))),e.addEventListener("touchend",t),this.attachedEvents.push((()=>e.removeEventListener("touchend",t)))})()})),this.enabled=!0}disable(){this.attachedEvents.forEach((e=>e())),this.children.forEach((e=>e.classList.remove(D))),this.enabled=!1}}var j=n(6984),q=n(4402),F=n(9261),R=n(4659),U=n(7724);const H={isLogin:!1},Z=lodash.once((async()=>{const{getUID:e}=await Promise.resolve().then(n.bind(n,4742));if(!e())return H;const{getJsonWithCredentials:t}=await Promise.resolve().then(n.bind(n,6773)),i=await t("https://api.bilibili.com/x/web-interface/nav");return 0!==i.code&&-101!==i.code?(console.warn("[store.fetchUserInfo] API Error",i.message),H):i.data}));let W;!function(e){e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e[e.Incomparable=NaN]="Incomparable"}(W||(W={}));class G{constructor(e){var t,n,i;if(this.versionString=e,i=void 0,(n="parts")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,!/^[\d\.]+$/.test(e))throw new Error("Invalid version string");this.parts=e.split(".").map((e=>parseInt(e)))}compareTo(e){for(let t=0;te.parts[t]?W.Greater:W.Less}return this.parts.length!==e.parts.length?W.Less:W.Equal}greaterThan(e){return this.compareTo(e)===W.Greater}lessThan(e){return this.compareTo(e)===W.Less}equals(e){return this.compareTo(e)===W.Equal}}var X=n(4742),J=n(1290),K=n(2433),Y=n(4435),Q=n(5890);const ee=async(e,t={})=>{const{style:n,enterDelay:i=750,leaveDelay:r=1e3}=t,a=await(0,q.select)(e);if(!a)throw new Error(`lazy panel failed! selector = ${e}`);let o;return void 0!==n&&(o=document.createElement("style"),o.textContent=n,document.body.insertAdjacentElement("beforeend",o)),(0,X.raiseEvent)(a,"mouseover"),await(0,X.delay)(i),(0,X.raiseEvent)(a,"mouseout"),setTimeout((()=>o?.remove()),r),a},te=async(e,t,n={})=>{await ee(e,{style:`${t} { display: none !important; }`,...n});const i=(0,X.dq)(t);if(!i)throw new Error(`lazy player settings panel failed! panelSelector = ${t}`);return i},ne=()=>te(".bilibili-player-video-danmaku-setting",".bilibili-player-video-danmaku-setting-wrap"),ie=()=>te(".bilibili-player-video-btn-subtitle",".bilibili-player-video-subtitle-setting-wrap",{style:".bilibili-player-video-subtitle-setting-wrap, .bilibili-player-video-subtitle { display: none }"});var re=n(4496),ae=n(503),oe=n(6363),se=n(3446),le=n(8232),ce=n(9759),de=n(6087),ue=n(559);const pe=(e,t)=>async i=>{const{default:r}=await e(),{addStyle:a}=await Promise.resolve().then(n.bind(n,9261));return a(r,i.metadata.name),t(i)},fe=(e,t,i=X.none)=>{let r=null;const a=async()=>{if(r)return;const{default:i}=await t(),{addStyle:a}=await Promise.resolve().then(n.bind(n,9261));r=a(i,e)};return{name:e,entry:e=>a().then((()=>i(e))),reload:a,unload:()=>{r?.remove(),r=null}}};var he=n(8774);const me=[];async function ge(e=!1){const{getJsonWithCredentials:t}=await Promise.resolve().then(n.bind(n,6773)),i=await t("https://api.bilibili.com/x/v2/history/toview/web");if(0!==i.code)throw new Error(`获取稍后再看列表失败: ${i.message}`);if(!i.data.list)return lodash.pullAll(me,me),[];const r=i.data.list,a=r.filter((e=>!me.find((t=>t===e.aid)))),o=me.filter((e=>!r.find((t=>t.aid===e))));return lodash.pullAll(me,o),me.push(...a.map((e=>e.aid))),e?r:r.map((e=>e.aid))}const be=async(e,t)=>{const i=parseInt(e.toString());if(Number.isNaN(i))return;void 0===t&&(t=!me.includes(i));const r=t?"https://api.bilibili.com/x/v2/history/toview/add":"https://api.bilibili.com/x/v2/history/toview/del",{getCsrf:a}=await Promise.resolve().then(n.bind(n,4742)),o=a(),{postTextWithCredentials:s}=await Promise.resolve().then(n.bind(n,6773)),l=await s(r,`aid=${e}&csrf=${o}`),c=JSON.parse(l);if(0!==c.code)throw new Error(`稍后再看操作失败: ${c.message}`);t?me.push(i):lodash.pull(me,i)};requestIdleCallback((async()=>{const{getUID:e}=await Promise.resolve().then(n.bind(n,4742));e()&&ge()}));var ve=n(9207);const ye={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"},liveRecord:{id:2047,name:"开播记录"}},we="512,4097,4098,4099,4100,4101",xe="8,64,512,4097,4098,4099,4100,4101";function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=e=>e.querySelector(".repost")?ye.repost:e.querySelector(".imagesbox")?ye.textWithImages:e.querySelector(".video-container")?ye.video:e.querySelector(".bangumi-container")?ye.bangumi:e.querySelector(".article-container")?ye.column:e.querySelector(".music-container")?ye.audio:e.querySelector(".h5share-container")?ye.share:e.querySelector(".vc-ctnr")?ye.miniVideo:e.querySelector(".live-container")?ye.liveRecord:ye.text,Ce=[],Se="feeds.manager.listAdaptors";(0,ve.addData)(Se,(e=>{e.push({name:"live",match:[...oe.liveUrls],watchCardsList:async e=>{const t=await(0,q.select)(".room-feed");if(!t)return!1;console.log("live watch");let n=null;return(0,L.childList)(t,(async()=>{if(dq(".room-feed-content")){const t=await(0,q.select)(".room-feed-content .content");n?.disconnect(),[n]=e.updateCards(t)}else n?.disconnect(),n=null,await Promise.all(e.cards.map((e=>e.element)).map((t=>e.removeCard(t))))})),!0}},{name:"space",match:["https://space.bilibili.com/"],watchCardsList:async e=>{const t=await(0,q.select)(".s-space");if(!t)return!1;const n={},i=()=>n.listElement&&n.observer?(console.log("space feeds stop"),n.observer?.then((e=>e.disconnect())),delete n.observer,delete n.listElement,Promise.all(e.cards.map((e=>e.element)).map((t=>e.removeCard(t))))):[],r=()=>{if(n.observer)return n.observer;const t=(0,q.select)(".feed-card .content");return n.observer=(async()=>{const a=await t;a!==await n.listElement&&(n.listElement&&await i(),n.listElement=t,r()),console.log("space feeds start");const[o]=e.updateCards(a);return o})(),n.observer};return(0,L.childListSubtree)(t,(async()=>{dq(".feed-card .content")?r():i()})),!0}},{name:"topic",match:["https://t.bilibili.com/topic"],watchCardsList:async e=>{const t=await(0,q.select)(".page-container");if(!t)return!1;let n=null;return(0,L.childList)(t,(async()=>{if(dq(".page-container .feed")){const t=await(0,q.select)(".feed .feed-topic");n?.disconnect(),[n]=e.updateCards(t)}else n?.disconnect(),n=null,await Promise.all(e.cards.map((e=>e.element)).map((t=>e.removeCard(t))))})),!0}},{name:"default",match:["https://t.bilibili.com/"],watchCardsList:async e=>{const t=await(0,q.select)(".feed-card .content, .detail-content .detail-card");return!!t&&(e.updateCards(t),!0)}})}));class Ee extends EventTarget{constructor(...e){super(...e),ke(this,"watching",!1),ke(this,"cards",[])}addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}async addCard(e){if(e&&e instanceof HTMLElement&&e.classList.contains("card"))if(null!==e.querySelector(".skeleton")){const[t]=(0,L.childList)(e,(()=>{null===e.querySelector(".skeleton")&&(t.disconnect(),this.addCard(e))}))}else{if(null===e.parentNode)return;const t=await Ee.parseCard(e);if(!t.presented)return;if(this.cards.find((e=>e.id===t.id)))return;this.cards.push(t),this.cards.sort(((e,t)=>e.id===t.id?0:e.id>t.id?-1:1));const n=new CustomEvent("addCard",{detail:t});this.dispatchEvent(n),Ce.forEach((e=>e.added(t)))}}async removeCard(e){if(e&&e instanceof HTMLElement&&e.classList.contains("card")){const t=e.getAttribute("data-did"),n=this.cards.findIndex((e=>e.id===t));if(-1===n)return;const i=this.cards[n];this.cards.splice(n,1);const r=new CustomEvent("removeCard",{detail:i});this.dispatchEvent(r),Ce.forEach((e=>e.removed(i)))}}static async parseCard(e){ // eslint-disable-next-line no-underscore-dangle -const t=e=>e.__vue__||e.parentElement.__vue__,n=async t=>{const n=await(0,q.sq)((()=>e.querySelector(t)),(t=>null!==t||null===e.parentNode),{queryInterval:100});if(null===e.parentNode)return"";if(null===n)return console.warn(e,t,e.parentNode),"";return n.innerText.trim()},i=e=>{if(void 0===e.card.origin)return{originalText:"",originalDescription:"",originalTitle:""};const t=JSON.parse(e.card.origin);return{originalText:e.originCardData.pureText,originalDescription:lodash.get(t,"item.description",lodash.get(t,"desc","")),originalTitle:t.title}},r=async e=>{const t=parseInt(await n(e));return isNaN(t)?0:t},a={id:e.getAttribute("data-did"),username:await n(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:_e(e),get presented(){return null!==e.parentNode},async getText(){const n=await(async n=>{if(n===ye.bangumi)return"";const r=await(0,q.sq)((()=>e),(n=>Boolean(t(n)||!e.parentNode)),{queryInterval:100});if(null===e.parentNode)return"";if(null===r)return console.warn(r,e,t(r),e.parentNode),"";const a=t(r);if(n===ye.repost){const e=a.card.item.content,t=i(a);return[e,...Object.values(t).filter((e=>""!==e))].filter((e=>Boolean(e))).join("\n")}return[a.originCardData.pureText,a.originCardData.title].filter((e=>Boolean(e))).join("\n")})(this.type);return this.text=n,n}};if(await a.getText(),e.setAttribute("data-type",a.type.id.toString()),(e=>e.type===ye.repost)(a)){const n=a.username,r=t(a.element),o=lodash.get(r,"card.origin_user.info.uname","");n===o&&e.setAttribute("data-self-repost","true"),a.repostUsername=o,a.repostText=i(r).originalText}return a}updateCards(e){const t=".card[data-did]",n=e=>{if(e instanceof HTMLElement){if(e.matches(t))return e;const n=e.querySelector(t);if(n)return n}};return[...e.querySelectorAll(t)].forEach((e=>this.addCard(e))),(0,L.childList)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>this.addCard(n(e)))),e.removedNodes.forEach((e=>this.removeCard(n(e))))}))}))}async startWatching(){if(this.watching)return!0;this.watching=!0;const[e]=(0,ve.registerAndGetData)(Se,[]),t=e.find((e=>e.match.some((e=>(0,X.matchUrlPattern)(e)))));return t?t.watchCardsList(this):(console.warn("[FeedsCardsManager] No adaptor found",e),!1)}}const $e=new Ee,Ae=e=>{(async()=>{if(!await $e.startWatching())return void console.error("feedsCardsManager.startWatching() failed");const{added:t}=e;t&&$e.cards.forEach((e=>t(e))),Ce.push({added:none,removed:none,...e})})()},Ie=e=>{const t=lodash.groupBy(e,(e=>e.aid)),n=e=>({id:e.upID,name:e.upName,faceUrl:e.upFaceUrl});return Object.values(t).map((e=>{if(1===e.length)return e[0];const[t,...i]=e;return t.cooperation=[n(t),...i.map(n)],console.log([...t.cooperation]),t})).sort((0,ae.descendingStringSort)((e=>e.id)))},Te=e=>1===lodash.get(e,"extra.is_reserve_recall",0),Oe="feeds.contentFilters";(0,ve.registerData)(Oe,[]);const Le=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Me=e=>(...t)=>e(...t).then((e=>Le(e))),Pe=Me((async(e="video")=>{if(!(0,X.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${"video"===e?8:512}`);if(0!==t.code)throw new Error(t.message);const n=t.data.cards,i=n.filter((e=>!Te(JSON.parse(e.card))));return"video"===e?Ie(n.map((e=>{const t=JSON.parse(e.card),n=lodash.get(e,"display.topic_info.topic_details",[]).map((e=>({id:e.topic_id,name:e.topic_name})));return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(1e3*e.timestamp),topics:n,dynamic:t.dynamic,like:(0,K.formatCount)(e.desc.like),duration:t.duration,durationText:(0,K.formatDuration)(t.duration,0),playCount:(0,K.formatCount)(t.stat.view),danmakuCount:(0,K.formatCount)(t.stat.danmaku),watchlater:me.includes(t.aid)}}))):"bangumi"===e?i.map((e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(1e3*e.timestamp),like:(0,K.formatCount)(e.desc.like),durationText:"",playCount:(0,K.formatCount)(t.play_count),danmakuCount:(0,K.formatCount)(t.bullet_count),watchlater:!1}})):[]})),ze=async(e,t)=>{if("string"==typeof e)return(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${e}`);const n=e.id.toString();let i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,X.getUID)()}&offset_dynamic_id=${t}&type=${n}`),(0,C.getJsonWithCredentials)(i)},De=(e,t)=>{const n=dq(e.element,".more-panel"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("p");o.classList.add("child-button","c-pointer",i),o.textContent=r;[...new Set([...n.children].map((e=>e.getAttributeNames().filter((e=>e.startsWith("data-v-"))))).flat())].forEach((e=>o.setAttribute(e,""))),o.addEventListener("click",(t=>{a(t),e.element.click()})),n.appendChild(o)};var Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"bangumi-card",class:{new:e.isNew},attrs:{target:"_blank",href:e.data.url}},[n("div",{staticClass:"ep-cover-container"},[n("DpiImage",{staticClass:"ep-cover",attrs:{size:{width:100},src:e.data.epCoverUrl}})],1),e._v(" "),n("h1",{staticClass:"ep-title",attrs:{title:e.data.epTitle}},[e._v(e._s(e.data.epTitle))]),e._v(" "),n("div",{staticClass:"up",attrs:{title:e.data.title}},[n("DpiImage",{staticClass:"cover",attrs:{size:24,src:e.data.coverUrl}}),e._v(" "),n("div",{staticClass:"title"},[e._v(e._s(e.data.title))])],1)])};Ve._withStripped=!0;var Be=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),Ne=n(3379),je=n.n(Ne),qe=n(4780),Fe=n.n(qe),Re={insert:"head",singleton:!1},Ue=(je()(Fe(),Re),Fe().locals,n(1900)),He=(0,Ue.Z)(Be,Ve,[],!1,null,"3bc2da4f",null);He.options.__file="src/components/feeds/BangumiCard.vue";var Ze=He.exports,We=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"video-card",class:{vertical:"vertical"===e.orientation,"no-stats":!e.showStats},attrs:{target:"_blank",href:e.epID?"https://www.bilibili.com/bangumi/play/ep"+e.epID:"https://www.bilibili.com/"+e.bvid}},[n("div",{staticClass:"cover-container"},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{height:120,width:200}}}),e._v(" "),e.isNew?n("div",{staticClass:"new"},[e._v("NEW")]):e._e(),e._v(" "),e.pubTime&&e.pubTimeText?[n("div",{staticClass:"publish-time-summary"},[e._v("\n "+e._s(e.pubTimeText)+"\n ")]),e._v(" "),n("div",{staticClass:"publish-time-detail"},[e._v("\n "+e._s(e.pubTime)+"\n ")])]:e._e(),e._v(" "),e.durationText?n("div",{staticClass:"duration"},[e._v(e._s(e.durationText))]):e._e(),e._v(" "),e.durationText&&null!==e.watchlater&&void 0!==e.watchlater?n("div",{staticClass:"watchlater",on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.toggleWatchlater(e.aid)}}},[n("VIcon",{attrs:{size:15,icon:e.watchlater?"mdi-check-circle":"mdi-clock-outline"}}),e._v("\n "+e._s(e.watchlater?"已添加":"稍后再看")+"\n ")],1):e._e()],2),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.title}},[e._v(e._s(e.title))]),e._v(" "),e.topics&&e.topics.length?n("div",{staticClass:"topics"},e._l(e.topics.slice(0,3),(function(t){return n("a",{key:t.id,staticClass:"topic",attrs:{target:"_blank",href:"https://t.bilibili.com/topic/name/"+t.name+"/feed"}},[e._v("#"+e._s(t.name)+"#")])})),0):n("p",{staticClass:"description",attrs:{title:e.description}},[e._v(e._s(e.description))]),e._v(" "),0===e.cooperation.length?n("a",{staticClass:"up",class:{"no-face":!e.upFaceUrl},attrs:{target:"_blank",href:e.upID?"https://space.bilibili.com/"+e.upID:null}},[e.upFaceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.upFaceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}}),e._v(" "),n("div",{staticClass:"name",attrs:{title:e.upName}},[e._v(e._s(e.upName))])],1):e._e(),e._v(" "),0!==e.cooperation.length?n("div",{staticClass:"cooperation"},[n("div",{staticClass:"cooperation-ups"},e._l(e.reversedCooperation,(function(e){return n("a",{key:e.id,staticClass:"cooperation-up",class:{"no-face":!e.faceUrl},attrs:{target:"_blank",title:e.name,href:e.id?"https://space.bilibili.com/"+e.id:null}},[e.faceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.faceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}})],1)})),0),e._v(" "),n("div",{staticClass:"cooperation-note"},[e._v("\n 联合投稿\n ")])]):e._e(),e._v(" "),e.showStats?n("div",{staticClass:"stats"},[e.like&&!e.vertical?[n("VIcon",{attrs:{icon:"like-outline",size:18}}),e._v("\n "+e._s(e.like)+"\n ")]:e._e(),e._v(" "),e.coins&&!e.vertical?[n("VIcon",{attrs:{icon:"coin-outline",size:18}}),e._v("\n "+e._s(e.coins)+"\n ")]:e._e(),e._v(" "),e.favorites?[n("VIcon",{attrs:{icon:"favorites-outline",size:18}}),e._v("\n "+e._s(e.favorites)+"\n ")]:e._e(),e._v(" "),e.playCount?[n("VIcon",{attrs:{icon:"play",size:18}}),e._v("\n "+e._s(e.playCount)+"\n ")]:e._e(),e._v(" "),e.danmakuCount?[n("VIcon",{attrs:{icon:"danmaku",size:18}}),e._v("\n "+e._s(e.danmakuCount)+"\n ")]:e._e()],2):e._e()])};We._withStripped=!0;var Ge={components:{DpiImage:ce.DpiImage,VIcon:ce.VIcon},props:{data:{type:Object,required:!0},orientation:{type:String,default:"horizontal"},showStats:{type:Boolean,default:!0},isNew:{type:Boolean,default:!1}},data(){return{watchlaterList:me,upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,cooperation:[],...lodash.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return"vertical"===this.orientation},watchlater(){return(0,X.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Xe=n(1267),Je=n.n(Xe),Ke={insert:"head",singleton:!1},Ye=(je()(Je(),Ke),Je().locals,(0,Ue.Z)(Ge,We,[],!1,null,"0ffa1cb1",null));Ye.options.__file="src/components/feeds/VideoCard.vue";var Qe=Ye.exports,et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"column-card",attrs:{target:"_blank",href:"https://www.bilibili.com/read/cv"+e.data.cvID}},[n("div",{staticClass:"covers"},e._l(e.data.covers,(function(e){return n("DpiImage",{key:e,staticClass:"cover",attrs:{size:{height:120},src:e}})})),1),e._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.data.upID}},[n("DpiImage",{staticClass:"face",attrs:{size:24,src:e.data.upFaceUrl}}),e._v(" "),n("div",{staticClass:"name"},[e._v(e._s(e.data.upName))])],1),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.data.title}},[e._v(e._s(e.data.title))]),e._v(" "),n("div",{staticClass:"description",attrs:{title:e.data.description}},[e._v(e._s(e.data.description))])])};et._withStripped=!0;var tt=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),nt=n(807),it=n.n(nt),rt={insert:"head",singleton:!1},at=(je()(it(),rt),it().locals,(0,Ue.Z)(tt,et,[],!1,null,null,null));at.options.__file="src/components/feeds/ColumnCard.vue";var ot=at.exports;let st=!1;const lt=()=>{"https://t.bilibili.com/"===document.URL.replace(window.location.search,"")&&(async()=>{const{select:e}=await Promise.resolve().then(n.bind(n,4402)),t=await e(".live-up-list");if(null!==t){const{getComponentSettings:e}=await Promise.resolve().then(n.bind(n,7724));if(st)return;const i=e("fixedSidebars"),r=e("extendFeedsLive");t.addEventListener("mouseenter",(e=>{(i.enabled||r.enabled)&&e.stopImmediatePropagation()}),{capture:!0}),st=!0}})()},ct=3e5,dt=()=>(0,X.getCookieValue)(`bp_t_offset_${(0,X.getUID)()}`),ut=(e,t)=>e===t?0:e.length>t.length?1:t.length>e.length?-1:e>t==!0?1:-1,pt=e=>{if(null==e)return;const t=dt();ut(e,t)<0||(document.cookie=`bp_t_offset_${(0,X.getUID)()}=${e};path=/;domain=.bilibili.com;max-age=2592000`)},ft=e=>ut(e,dt())>0,ht=e=>{const[t]=[...e.map((e=>e.id))].sort(ut).reverse();pt(t)},mt=async e=>{const t=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${(0,X.getUID)()}&update_num_dy_id=${dt()}&type_list=${e||xe}`,n=await(0,C.getJsonWithCredentials)(t);return 0!==n.code?0:lodash.get(n,"data.update_num",0)},gt=e=>{e.startsWith("#")&&(e=e.substring(1));return{red:e.substring(0,2),green:e.substring(2,4),blue:e.substring(4,6)}},bt=e=>{const{red:t,green:n,blue:i}=gt(e);return`\\c&H${i}${n}${t}&`.toUpperCase()},vt=(e,t=1)=>{const{red:n,green:i,blue:r}=gt(e);return`&H${Math.round(255*(1-t)).toString(16).padStart(2,"0")}${r}${i}${n}`.toUpperCase()},yt=e=>{let t=0,n=0;for(;e>=60;)e-=60,n++;for(;n>=60;)n-=60,t++;return`${t}:${String(n).padStart(2,"0")}:${(e=>{const[t,n="00"]=String(e).split(".");return`${t.padStart(2,"0")}.${n.substr(0,2).padEnd(2,"0")}`})(e)}`},wt=(e,t)=>[yt(e),yt(e+t)],xt=(e,t)=>[yt(e),yt(t)],kt=e=>{const t={"{":"{","}":"}","&":"&","<":"<",">":">",""":'"',"'":"'","\n":"\\N"};for(const[n,i]of Object.entries(t))e=e.replace(new RegExp(n,"g"),i);return e};var _t=n(4572);const Ct=e=>oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:X.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,L.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,L.childListSubtree)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement,i=At.find((e=>e.element===n));if(!i)return;return i.text=e.textContent||"",i.reuse=!0,void(t.added&&t.added(i))}if(!(e instanceof HTMLElement))return;const n={element:i=e,reuse:!1,text:i.textContent||""};var i;At.push(n),t.added&&t.added(n)})),e.removedNodes.forEach((e=>{if(!(e instanceof HTMLElement))return;const n=At.findIndex((t=>t.element===e));if(-1!==n){const[e]=At.splice(n,1);t.removed&&t.removed(e)}}))}))}))})(t,e)}))};function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ot{constructor(e){Tt(this,"aid",void 0),Tt(this,"cid",void 0),Tt(this,"pageCount",void 0),Tt(this,"coverUrl",void 0),Tt(this,"tagId",void 0),Tt(this,"tagName",void 0),Tt(this,"title",void 0),Tt(this,"description",void 0),Tt(this,"up",void 0),Tt(this,"pages",void 0),Tt(this,"subtitles",void 0),this.aid=e}async fetchInfo(){let e;e=this.cid?`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`:`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`;const t=await(0,C.getJson)(e);if(0!==t.code)throw new Error(t.message);const{data:n}=t;return this.cid=n.cid,this.pageCount=n.videos,this.coverUrl=n.pic.replace("http:","https:"),this.tagId=n.tid,this.tagName=n.tname,this.title=n.title,this.description=n.desc,this.up={uid:n.owner.mid,name:n.owner.name,faceUrl:n.owner.face.replace("http:","https:")},this.pages=n.pages.map((e=>({cid:e.cid,title:e.part,pageNumber:e.page}))),this.subtitles=n.subtitle.list.map((e=>({id:e.id,languageCode:e.lan,language:e.lan_doc,url:e.subtitle_url.replace("http:","https:")}))),this}}class Lt{constructor(e){Tt(this,"ep",void 0),Tt(this,"videos",void 0),Tt(this,"title",void 0),Tt(this,"cover",void 0),Tt(this,"squareCover",void 0),Tt(this,"aid",void 0),Tt(this,"cid",void 0),this.ep=e,this.videos=[]}async fetchInfo(){const e=await(0,C.getText)(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`),t=JSON.parse(e.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);return this.title=t.mediaInfo.title,this.cover=t.mediaInfo.cover,this.squareCover=t.mediaInfo.square_cover,this.aid=t.epInfo.aid,this.cid=t.epInfo.cid,this.videos=t.epList.map((async e=>({title:e.index_title,aid:e.aid,cid:e.cid,info:await new Ot(e.aid).fetchInfo()}))),this}}const Mt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"HDR",displayName:"真彩 HDR",value:125},{name:"4K",displayName:"超清 4K",value:120},{name:"1080P60",displayName:"高清 1080P60",value:116},{name:"1080P+",displayName:"高清 1080P+",value:112},{name:"720P60",displayName:"高清 720P60",value:74}],zt=[...Pt,...Mt,{name:"480P",displayName:"清晰 480P",value:32},{name:"360P",displayName:"流畅 360P",value:16}].sort((0,ae.descendingSort)((e=>e.value))),Dt=async e=>{const{open:t,close:n}=e;if(!(0,q.hasVideo)())return;const i=await(0,q.select)(".bilibili-player");if(!i)return;const[r]=(0,L.childList)(i,(()=>{const e=dq(".bilibili-player-context-menu-origin");if(e){r.disconnect();const i=dq(e,"ul"),a={containerElement:e,listElement:i,get itemElements(){return dqa(e,".context-menu-function")},get isOpen(){return e.classList.contains("active")}};(0,L.childList)(i,(()=>{a.isOpen?t?.(a):n?.(a)}))}}))},Vt=async(e,t)=>Dt({open:t=>{if(t.listElement.contains(e))return;const n=document.createElement("li");n.classList.add("context-line","context-menu-function"),n.setAttribute("data-append","1");const i=document.createElement("a");i.classList.add("context-menu-a","js-action"),i.href="javascript:void(0);",i.appendChild(e),n.addEventListener("mouseover",(()=>n.classList.add("hover"))),n.addEventListener("mouseout",(()=>n.classList.remove("hover"))),n.appendChild(i),t.listElement.appendChild(n)},close:e=>t?.(e)});let Bt;const Nt=[],jt=lodash.once((async()=>{oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))&&(0,L.videoChange)((async()=>{const{playerAgent:e}=await Promise.resolve().then(n.bind(n,4572)),t=await e.query.control.buttons.time();if(null===t||null!==t.parentElement?.querySelector(".be-video-control-bar-extend"))return;const i=await Promise.resolve().then(n.bind(n,413)).then((e=>e.default));Bt=new i({propsData:{items:Nt}}).$mount(),t.insertAdjacentElement("afterend",Bt.$el)}))})),qt=async e=>{Bt||await jt(),Nt.push(e)},Ft=async e=>{if(!oe.liveUrls.some((e=>(0,X.matchUrlPattern)(e))))return;const t=await(0,q.select)(".bilibili-live-player-video-controller, .web-player-controller-wrap:not(.web-player-controller-bg)");if(!t)return;const{init:n,callback:i}=e;n?.(t),(0,L.childList)(t,(async()=>{const e=dq(t,".control-area");e&&i?.(e)}))};function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ut=0,Ht=2,Zt={heartBeat:2,heartBeatResponse:3,message:5,enterRoom:7,enterRoomResponse:8};class Wt{constructor(){Rt(this,"textEncoder",new TextEncoder),Rt(this,"textDecoder",new TextDecoder)}static readInt(e,t,n){let i=0;for(let r=n-1;r>=0;r--)i+=256**(n-r-1)*e[t+r];return i}static writeInt(e,t,n,i){let r=0;for(;r{const i={packetLength:Wt.readInt(e,0,4),headerLength:Wt.readInt(e,4,2),protocolVersion:Wt.readInt(e,6,2),operation:Wt.readInt(e,8,4),sequenceID:Wt.readInt(e,12,4)},r=[i];if(i.packetLengthe.messages[0])))}else i.protocolVersion===Ut&&(i.messages=[JSON.parse(this.textDecoder.decode(r))])}else i.operation===Zt.heartBeatResponse&&(i.heartBeatResponse={count:Wt.readInt(e,16,4)});return r};return new Promise(((n,i)=>{const r=new FileReader;r.onload=async e=>{if(!e.target)return void i(e);const r=new Uint8Array(e.target.result);n(await t(r))},r.readAsArrayBuffer(e)}))}}class Gt{constructor(){Rt(this,"startTime",0)}getLiveTime(){return new Promise((e=>{if(this.startTime)return void e(this.startTime);const t=(0,X.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,L.childList)(t,(t=>{if(t.length>0&&t.some((e=>e.addedNodes.length>0&&[...e.addedNodes].every((e=>e.nodeType===Node.TEXT_NODE))))){n.disconnect();const i=t[0].addedNodes[0].textContent,[r,a,o=0]=i.split(":").reverse().map(lodash.unary(parseInt)),s=Number(new Date);this.startTime=s-1e3*o*3600-60*a*1e3-1e3*r,e(this.startTime)}}))}))}}class Xt extends EventTarget{constructor(e){super(),this.roomID=e,Rt(this,"heartBeatTimer",void 0),Rt(this,"webSocket",void 0),Rt(this,"retryInterval",200),Rt(this,"autoRetry",!0),Rt(this,"servers",["broadcastlv.chat.bilibili.com"]),Rt(this,"selectedServer",""),Rt(this,"liveTime",new Gt),Rt(this,"bufferHelper",new Wt),Rt(this,"stopRequested",!1),window.addEventListener("unload",(()=>this.stop()))}heartBeat(){this.webSocket.readyState===WebSocket.OPEN?this.webSocket.send(this.bufferHelper.encode("","heartBeat")):(this.stop(),this.restart())}restart(){if(this.dispatchEvent(new CustomEvent("restart")),!this.stopRequested&&this.autoRetry){console.log(`Live Socket: unexpected disconnect, retry in ${this.retryInterval}ms`);const e=this.servers.indexOf(this.selectedServer);ethis.start()),this.retryInterval)}}async start(){const e=await(0,C.getJson)(`https://api.live.bilibili.com/room/v1/Danmu/getConf?room_id=${this.roomID}&platform=pc&player=web`),t=lodash.get(e,"data.host_server_list",[]);this.servers=[...new Set([...this.servers,...t.map((e=>e.host))])],""===this.selectedServer&&([this.selectedServer]=this.servers,console.log("Initial server:",this.selectedServer)),this.webSocket&&[WebSocket.CONNECTING,WebSocket.OPEN].includes(this.webSocket.readyState)&&this.stop(),this.webSocket=new WebSocket(`wss://${this.selectedServer}/sub`),this.stopRequested=!1,this.dispatchEvent(new CustomEvent("start",{detail:this.webSocket})),this.webSocket.addEventListener("open",(()=>{const t={roomid:this.roomID,uid:parseInt((0,X.getUID)()),protover:2,platform:"web",clientVer:"1.10.1",type:"2",key:lodash.get(e,"data.token")};this.webSocket.send(this.bufferHelper.encode(JSON.stringify(t),"enterRoom")),this.dispatchEvent(new CustomEvent("open",{detail:t}))})),this.webSocket.addEventListener("message",(async e=>{const[t]=await this.bufferHelper.decode(e.data);switch(this.dispatchEvent(new CustomEvent("message",{detail:t})),t.operation){case Zt.enterRoomResponse:this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.heartBeatTimer=window.setInterval((()=>{this.heartBeat()}),3e4);break;case Zt.heartBeatResponse:if(!t.heartBeatResponse)break;this.dispatchEvent(new CustomEvent("heartBeatResponse",{detail:t.heartBeatResponse.count}));break;case Zt.message:{if(!t.messages)break;const e=await this.liveTime.getLiveTime();t.messages.forEach((t=>{if("DANMU_MSG"===t.cmd){const{info:n}=t,i={content:n[1],type:n[0][1],fontSize:n[0][2],color:n[0][3],sendTime:n[0][4],userHash:n[0][7],userID:n[2][0],userName:n[2][1],startTime:e,get time(){return this.sendTime-this.startTime}};this.dispatchEvent(new CustomEvent("danmaku",{detail:i}))}}));break}}})),this.webSocket.addEventListener("close",(e=>{this.stopRequested||(console.error("Live Socket: close",e),this.restart())})),this.webSocket.addEventListener("error",(e=>{console.error("Live Socket: error",e),this.restart()}))}stop(){this.stopRequested=!0,this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.webSocket&&this.webSocket.readyState===WebSocket.OPEN&&this.webSocket.close()}}const Jt=[],Kt="bb-comment",Yt=[],Qt=[],en=[],tn=e=>{const t=e.querySelector(".con .user .name"),n=e=>{const t=e.querySelector(".reply-face"),n=e.querySelector(".reply-con .user .name");return{id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:n.textContent,content:e.querySelector(".text-con").textContent,timeText:e.querySelector(".info .time").textContent,likes:parseInt(e.querySelector(".info .like span").textContent)}},i={id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".con .text").textContent,timeText:e.querySelector(".con .info .time").textContent,likes:parseInt(e.querySelector(".con .like span").textContent),replies:[]};if(dq(e,".reply-box .view-more")){const t=dq(e,".reply-box");(0,L.childList)(t,(t=>{i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Kt)){const t={element:e,items:[]};Jt.push(t),(e=>{e.observer||(e.items=(0,X.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,L.childListSubtree)(e.element,(t=>{t.forEach((t=>{const n=e=>e instanceof HTMLElement&&e.classList.contains("list-item")&&e.classList.contains("reply-wrap");t.addedNodes.forEach((t=>{if(n(t)){const n=tn(t);e.items.push(n),Yt.forEach((e=>e(n)))}})),t.removedNodes.forEach((t=>{if(n(t)){const n=t.getAttribute("data-id"),i=e.items.findIndex((e=>e.id===n));if(-1!==i){const[t]=e.items.splice(i,1);Qt.forEach((e=>e(t)))}}}))}))})))})(t),en.forEach((e=>e(t)))}};(0,I.contentLoaded)((()=>{(0,L.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,X.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Jt.forEach((t=>e(t))),en.push(e)},an=e=>{const{added:t,removed:n}=e;rn((e=>{t&&(e.items.forEach((e=>t(e))),Yt.push(t)),n&&Qt.push(n)}))},on=(e,t)=>{const n=dq(e.element,".opera-list ul"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("li");o.classList.add(i),o.textContent=r,o.addEventListener("click",(e=>{a(e)})),n.appendChild(o)};var sn=n(4350);const ln=JSON.parse('[[{"name":"首页","route":"/","tid":"","locid":23,"sub":[]},{"name":"动画","route":"douga","tid":1,"locid":52,"count":"","subMenuSize":162,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2507,"leftId":2452,"rightId":2453},"sub":[{"name":"MAD·AMV","route":"mad","tid":24,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":151},"desc":"具有一定制作程度的动画或静画的二次创作视频","url":"//www.bilibili.com/video/douga-mad-1.html"},{"name":"MMD·3D","route":"mmd","tid":25,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":152},"desc":"使用MMD(MikuMikuDance)和其他3D建模类软件制作的视频","url":"//www.bilibili.com/video/douga-mmd-1.html"},{"name":"短片·手书·配音","route":"voice","tid":47,"ps":15,"rps":10,"desc":"追求创新并具有强烈特色的短片、手书(绘)及ACG相关配音","url":"//www.bilibili.com/video/douga-voice-1.html"},{"name":"手办·模玩","route":"garage_kit","tid":210,"ps":15,"rps":10,"desc":"手办模玩的测评、改造或其他衍生内容","url":""},{"name":"特摄","route":"tokusatsu","tid":86,"ps":15,"rps":10,"desc":"特摄相关衍生视频","url":"//www.bilibili.com/video/cinephile-tokusatsu.html"},{"name":"综合","route":"other","tid":27,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":153},"desc":"以动画及动画相关内容为素材,包括但不仅限于音频替换、杂谈、排行榜等内容","url":"//www.bilibili.com/video/douga-else-1.html"}]},{"name":"番剧","route":"anime","tid":13,"url":"//www.bilibili.com/anime/","takeOvered":true,"count":"","subMenuSize":172,"combination":true,"sub":[{"name":"连载动画","tid":33,"route":"serial","desc":"当季连载的动画番剧","url":"//www.bilibili.com/video/bangumi-two-1.html"},{"name":"完结动画","tid":32,"route":"finish","desc":"已完结的动画番剧合集","url":"//www.bilibili.com/video/part-twoelement-1.html"},{"name":"资讯","tid":51,"route":"information","desc":"动画番剧相关资讯视频","url":"//www.bilibili.com/video/douga-else-information-1.html"},{"name":"官方延伸","tid":152,"route":"offical","desc":"动画番剧为主题的宣传节目、采访视频,及声优相关视频","url":"//www.bilibili.com/video/bagumi_offical_1.html"},{"name":"新番时间表","url":"//www.bilibili.com/anime/timeline/","desc":""},{"name":"番剧索引","url":"//www.bilibili.com/anime/index/","desc":""}]},{"name":"国创","tid":167,"route":"guochuang","url":"//www.bilibili.com/guochuang/","takeOvered":true,"count":"","subMenuSize":214,"combination":true,"sub":[{"name":"国产动画","tid":153,"route":"chinese","desc":"我国出品的PGC动画","url":"//www.bilibili.com/video/bangumi_chinese_1.html"},{"name":"国产原创相关","tid":168,"route":"original","desc":"","url":"//www.bilibili.com/video/guochuang-fanvid-1.html"},{"name":"布袋戏","tid":169,"route":"puppetry","desc":"","url":"//www.bilibili.com/video/glove-puppetry-1.html"},{"name":"动态漫·广播剧","tid":195,"route":"motioncomic","desc":"","url":""},{"name":"资讯","tid":170,"route":"information","desc":"","url":"//www.bilibili.com/video/guochuang-offical-1.html"},{"name":"新番时间表","url":"//www.bilibili.com/guochuang/timeline/","desc":""},{"name":"国产动画索引","url":"//www.bilibili.com/guochuang/index/","desc":""}]},{"name":"音乐","route":"music","tid":3,"locid":58,"count":"","subMenuSize":268,"slider":{"width":620,"height":220},"viewTag":true,"customComponent":{"name":"Energy","titleId":2511,"leftId":2462,"rightId":3131,"rightType":"slide"},"sub":[{"name":"原创音乐","route":"original","tid":28,"ps":15,"rps":10,"viewHotTag":true,"ad":{"active":true,"dataLocId":243},"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"个人或团队制作以音乐为主要原创因素的歌曲或纯音乐","url":"//www.bilibili.com/video/music-original-1.html"},{"name":"翻唱","route":"cover","tid":31,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":245},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"一切非官方的人声再演绎歌曲作品","url":"//www.bilibili.com/video/music-Cover-1.html"},{"name":"VOCALOID·UTAU","route":"vocaloid","tid":30,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以雅马哈Vocaloid和UTAU引擎为基础,包含其他调教引擎,运用各类音源进行的歌曲创作内容","url":"//www.bilibili.com/video/music-vocaloid-1.html"},{"name":"电音","route":"electronic","tid":194,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以电子合成器、音乐软体等产生的电子声响制作的音乐","url":"#"},{"name":"演奏","route":"perform","tid":59,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":247},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"传统或非传统乐器及器材的演奏作品","url":"//www.bilibili.com/video/music-perform-1.html"},{"name":"MV","route":"mv","tid":193,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐录影带,为搭配音乐而拍摄或制作的视频","url":"//www.bilibili.com/video/music-coordinate-1.html"},{"name":"音乐现场","route":"live","tid":29,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐实况表演视频","url":"//www.bilibili.com/video/music-oped-1.html"},{"name":"音乐综合","route":"other","tid":130,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"收录无法定义到其他音乐子分区的音乐视频","url":"//www.bilibili.com/video/music-collection-1.html"},{"name":"音频","customZone":"Audio","route":"audio","url":"//www.bilibili.com/audio/home?musicType=music"},{"name":"说唱","url":"//www.bilibili.com/v/rap"}]},{"name":"舞蹈","route":"dance","tid":129,"locid":64,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2513,"leftId":2472,"rightId":2473},"sub":[{"name":"宅舞","route":"otaku","tid":20,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":249},"desc":"与ACG相关的翻跳、原创舞蹈","url":"//www.bilibili.com/video/dance-1.html"},{"name":"街舞","route":"hiphop","tid":198,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":251},"desc":"收录街舞相关内容,包括赛事现场、舞室作品、个人翻跳、FREESTYLE等","url":""},{"name":"明星舞蹈","route":"star","tid":199,"ps":15,"rps":10,"desc":"国内外明星发布的官方舞蹈及其翻跳内容","url":""},{"name":"中国舞","route":"china","tid":200,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":253},"desc":"传承中国艺术文化的舞蹈内容,包括古典舞、民族民间舞、汉唐舞、古风舞等","url":""},{"name":"舞蹈综合","route":"three_d","tid":154,"ps":15,"rps":10,"desc":"收录无法定义到其他舞蹈子分区的舞蹈视频","url":""},{"name":"舞蹈教程","route":"demo","tid":156,"ps":10,"rps":6,"desc":"镜面慢速,动作分解,基础教程等具有教学意义的舞蹈视频","url":"//www.bilibili.com/video/dance-demo-1.html"}]},{"name":"游戏","route":"game","tid":4,"locid":70,"count":"","subMenuSize":240,"slider":{"width":470,"height":216},"viewTag":true,"customComponent":{"name":"Energy","titleId":3761,"leftId":3765,"rightId":3775,"rightType":"slide"},"recommendCardType":"GameGroomBox","sub":[{"name":"单机游戏","route":"stand_alone","tid":17,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":255},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以所有平台(PC、主机、移动端)的单机或联机游戏为主的视频内容,包括游戏预告、CG、实况解说及相关的评测、杂谈与视频剪辑等","url":"//www.bilibili.com/video/videogame-1.html"},{"name":"电子竞技","route":"esports","tid":171,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":257},"desc":"具有高对抗性的电子竞技游戏项目,其相关的赛事、实况、攻略、解说、短剧等视频。","url":"//www.bilibili.com/video/esports-1.html"},{"name":"手机游戏","route":"mobile","tid":172,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"desc":"以手机及平板设备为主要平台的游戏,其相关的实况、攻略、解说、短剧、演示等视频。","url":"//www.bilibili.com/video/mobilegame-1.html"},{"name":"网络游戏","route":"online","tid":65,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":259},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由网络运营商运营的多人在线游戏,以及电子竞技的相关游戏内容。包括赛事、攻略、实况、解说等相关视频","url":"//www.bilibili.com/video/onlinegame-1.html"},{"name":"桌游棋牌","route":"board","tid":173,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"desc":"桌游、棋牌、卡牌对战等及其相关电子版游戏的实况、攻略、解说、演示等视频。","url":"//www.bilibili.com/video/boardgame-1.html"},{"name":"GMV","route":"gmv","tid":121,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由游戏素材制作的MV视频。以游戏内容或CG为主制作的,具有一定创作程度的MV类型的视频","url":"//www.bilibili.com/video/gmv-1.html"},{"name":"音游","route":"music","tid":136,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"各个平台上,通过配合音乐与节奏而进行的音乐类游戏视频","url":"//www.bilibili.com/video/music-game-1.html"},{"name":"Mugen","route":"mugen","tid":19,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以Mugen引擎为平台制作、或与Mugen相关的游戏视频","url":"//www.bilibili.com/video/game-mugen-1.html"},{"name":"游戏赛事","url":"//www.bilibili.com/v/game/match/","newIcon":true}]},{"name":"知识","route":"knowledge","tid":36,"locid":76,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2058,"leftId":2047,"rightId":2048},"sub":[{"name":"科学科普","route":"science","tid":201,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":261},"desc":"回答你的十万个为什么"},{"name":"社科·法律·心理","route":"social_science","tid":124,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":263},"desc":"基于社会科学、法学、心理学展开或个人观点输出的知识视频"},{"name":"人文历史","route":"humanity_history","tid":228,"ps":15,"rps":10,"desc":"看看古今人物,聊聊历史过往,品品文学典籍"},{"name":"财经商业","route":"business","tid":207,"ps":15,"rps":10,"desc":"说金融市场,谈宏观经济,一起畅聊商业故事"},{"name":"校园学习","route":"campus","tid":208,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":265},"desc":"老师很有趣,学生也有才,我们一起搞学习"},{"name":"职业职场","route":"career","tid":209,"ps":15,"rps":10,"desc":"职业分享、升级指南,一起成为最有料的职场人"},{"name":"设计·创意","route":"design","tid":229,"ps":15,"rps":10,"desc":"天马行空,创意设计,都在这里"},{"name":"野生技能协会","route":"skill","tid":122,"ps":15,"rps":10,"desc":"技能党集合,是时候展示真正的技术了"}]},{"name":"科技","route":"tech","tid":188,"locid":2977,"count":"","subMenuSize":80,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2980,"leftId":2978,"rightId":2979},"sub":[{"name":"数码","route":"digital","tid":95,"ps":15,"rps":10,"viewHotTag":true,"desc":"科技数码产品大全,一起来做发烧友","url":"#"},{"name":"软件应用","route":"application","tid":230,"ps":15,"rps":10,"viewHotTag":true,"desc":"超全软件应用指南","url":"#"},{"name":"计算机技术","route":"computer_tech","tid":231,"ps":15,"rps":10,"viewHotTag":true,"desc":"研究分析、教学演示、经验分享......有关计算机技术的都在这里","url":"#"},{"name":"工业·工程·机械","route":"industry","tid":232,"ps":15,"rps":10,"viewHotTag":true,"desc":"前方高能,机甲重工即将出没","url":"#"},{"name":"极客DIY","route":"diy","tid":233,"ps":15,"rps":10,"viewHotTag":true,"desc":"炫酷技能,极客文化,硬核技巧,准备好你的惊讶","url":"#"}]},{"name":"运动","route":"sports","tid":234,"locid":4639,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4646,"rightId":4652,"rightType":"slide"},"sub":[{"name":"篮球·足球","route":"basketballfootball","tid":235,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4656},"desc":"与篮球、足球相关的视频,包括但不限于篮足球赛事、教学、评述、剪辑、剧情等相关内容","url":"#"},{"name":"健身","route":"aerobics","tid":164,"ps":15,"rps":10,"desc":"与健身相关的视频,包括但不限于瑜伽、CrossFit、健美、力量举、普拉提、街健等相关内容","url":"//www.bilibili.com/video/fashion-body-1.html"},{"name":"竞技体育","route":"athletic","tid":236,"ps":15,"rps":10,"desc":"与竞技体育相关的视频,包括但不限于乒乓、羽毛球、排球、赛车等竞技项目的赛事、评述、剪辑、剧情等相关内容","url":"#"},{"name":"运动文化","route":"culture","tid":237,"ps":15,"rps":10,"desc":"与运动文化相关的视频,包络但不限于球鞋、球衣、球星卡等运动衍生品的分享、解读,体育产业的分析、科普等相关内容","url":"#"},{"name":"运动综合","route":"comprehensive","tid":238,"ps":15,"rps":10,"desc":"与运动综合相关的视频,包括但不限于钓鱼、骑行、滑板等日常运动分享、教学、Vlog等相关内容","url":"#"}]},{"name":"汽车","route":"car","tid":223,"locid":4428,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4435,"rightId":4441,"rightType":"slide"},"sub":[{"name":"汽车生活","route":"life","tid":176,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4445},"desc":"分享汽车及出行相关的生活体验类视频","url":"#"},{"name":"汽车文化","route":"culture","tid":224,"ps":15,"rps":10,"desc":"车迷的精神圣地,包括汽车赛事、品牌历史、汽车改装、经典车型和汽车模型等","url":"#"},{"name":"汽车极客","route":"geek","tid":225,"ps":15,"rps":10,"desc":"汽车硬核达人聚集地,包括DIY造车、专业评测和技术知识分享","url":"#"},{"name":"摩托车","route":"motorcycle","tid":240,"ps":15,"rps":10,"desc":"骑士们集合啦","url":"#"},{"name":"智能出行","route":"smart","tid":226,"ps":15,"rps":10,"desc":"探索新能源汽车和未来智能出行的前沿阵地","url":"#"},{"name":"购车攻略","route":"strategy","tid":227,"ps":15,"rps":10,"desc":"丰富详实的购车建议和新车体验","url":"#"}]},{"name":"生活","route":"life","tid":160,"locid":88,"count":"","subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2062,"leftId":1674,"rightId":1670},"sub":[{"name":"搞笑","route":"funny","tid":138,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":273},"desc":"各种沙雕有趣的搞笑剪辑,挑战,表演,配音等视频","url":"//www.bilibili.com/video/ent_funny_1.html","locid":4204,"recommendId":4210,"slider":{"width":620,"height":220},"customComponent":{"name":"Energy","leftId":4212,"rightId":4218,"rightType":"slide"}},{"name":"家居房产","route":"home","tid":239,"ps":15,"rps":10,"desc":"与买房、装修、居家生活相关的分享","url":"#"},{"name":"手工","route":"handmake","tid":161,"ps":15,"rps":10,"desc":"手工制品的制作过程或成品展示、教程、测评类视频","url":"//www.bilibili.com/video/ent-handmake-1.html"},{"name":"绘画","route":"painting","tid":162,"ps":15,"rps":10,"desc":"绘画过程或绘画教程,以及绘画相关的所有视频","url":"//www.bilibili.com/video/ent-painting-1.html"},{"name":"日常","route":"daily","tid":21,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":275},"desc":"记录日常生活,分享生活故事","url":"//www.bilibili.com/video/ent-life-1.html"}]},{"name":"美食","route":"food","tid":211,"locid":4243,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4258,"rightId":4264},"sub":[{"name":"美食制作","route":"make","tid":76,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4268},"desc":"学做人间美味,展示精湛厨艺","url":"#"},{"name":"美食侦探","route":"detective","tid":212,"ps":15,"rps":10,"desc":"寻找美味餐厅,发现街头美食","url":"#"},{"name":"美食测评","route":"measurement","tid":213,"ps":15,"rps":10,"desc":"吃货世界,品尝世间美味","url":"#"},{"name":"田园美食","route":"rural","tid":214,"ps":15,"rps":10,"desc":"品味乡野美食,寻找山与海的味道","url":"#"},{"name":"美食记录","route":"record","tid":215,"ps":15,"rps":10,"desc":"记录一日三餐,给生活添一点幸福感","url":"#"}]},{"name":"动物圈","route":"animal","tid":217,"locid":4365,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4376,"rightId":4381,"rightType":"slide"},"sub":[{"name":"喵星人","route":"cat","tid":218,"ps":15,"rps":10,"desc":"喵喵喵喵喵","url":"#","ad":{"active":true,"dataLocId":4385}},{"name":"汪星人","route":"dog","tid":219,"ps":15,"rps":10,"desc":"汪汪汪汪汪","url":"#"},{"name":"大熊猫","route":"panda","tid":220,"ps":15,"rps":10,"desc":"芝麻汤圆营业中","url":"#"},{"name":"野生动物","route":"wild_animal","tid":221,"ps":15,"rps":10,"desc":"内有“猛兽”出没","url":"#"},{"name":"爬宠","route":"reptiles","tid":222,"ps":15,"rps":10,"desc":"鳞甲有灵","url":"#"},{"name":"动物综合","route":"animal_composite","tid":75,"ps":15,"rps":10,"desc":"收录除上述子分区外,其余动物相关视频以及非动物主体或多个动物主体的动物相关延伸内容","url":"#"}]},{"name":"鬼畜","route":"kichiku","tid":119,"locid":100,"count":"","subMenuSize":182,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2509,"leftId":2482,"rightId":2483},"sub":[{"name":"鬼畜调教","route":"guide","tid":22,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":285},"desc":"使用素材在音频、画面上做一定处理,达到与BGM一定的同步感","url":"//www.bilibili.com/video/ent-Kichiku-1.html"},{"name":"音MAD","route":"mad","tid":26,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":287},"desc":"使用素材音频进行一定的二次创作来达到还原原曲的非商业性质稿件","url":"//www.bilibili.com/video/douga-kichiku-1.html"},{"name":"人力VOCALOID","route":"manual_vocaloid","tid":126,"ps":15,"rps":10,"desc":"将人物或者角色的无伴奏素材进行人工调音,使其就像VOCALOID一样歌唱的技术","url":"//www.bilibili.com/video/kichiku-manual_vocaloid-1.html"},{"name":"鬼畜剧场","route":"theatre","tid":216,"ps":15,"rps":10,"desc":"使用素材进行人工剪辑编排的有剧情的作品"},{"name":"教程演示","route":"course","tid":127,"ps":10,"rps":6,"rightComponent":{"name":"CmImgList","id":148},"ad":{"active":true,"dataLocId":289},"hideDropdown":false,"desc":"鬼畜相关的教程演示","url":"//www.bilibili.com/video/kichiku-course-1.html"}]},{"name":"时尚","route":"fashion","tid":155,"locid":94,"count":"","subMenuSize":124,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2515,"leftId":2492,"rightId":2493},"sub":[{"name":"美妆护肤","route":"makeup","tid":157,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":279},"desc":"彩妆护肤、美甲美发、仿妆、医美相关内容分享或产品测评","url":"//www.bilibili.com/video/fashion-makeup-fitness-1.html"},{"name":"穿搭","route":"clothing","tid":158,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":281},"desc":"穿搭风格、穿搭技巧的展示分享,涵盖衣服、鞋靴、箱包配件、配饰(帽子、钟表、珠宝首饰)等","url":"//www.bilibili.com/video/fashion-clothing-1.html"},{"name":"时尚潮流","route":"trend","tid":159,"ps":15,"rps":10,"desc":"时尚街拍、时装周、时尚大片,时尚品牌、潮流等行业相关记录及知识科普","url":"#"}]},{"name":"资讯","route":"information","tid":202,"locid":4076,"count":"","subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"sub":[{"name":"热点","route":"hotspot","tid":203,"ps":18,"rps":10,"desc":"全民关注的时政热门资讯"},{"name":"环球","route":"global","tid":204,"ps":18,"rps":10,"desc":"全球范围内发生的具有重大影响力的事件动态"},{"name":"社会","route":"social","tid":205,"ps":18,"rps":10,"desc":"日常生活的社会事件、社会问题、社会风貌的报道"},{"name":"综合","route":"multiple","tid":206,"ps":18,"rps":10,"desc":"除上述领域外其它垂直领域的综合资讯"}]},{"name":"娱乐","route":"ent","tid":5,"locid":82,"count":"","subMenuSize":62,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2067,"leftId":2065,"rightId":2066},"sub":[{"name":"综艺","route":"variety","tid":71,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":267},"desc":"所有综艺相关,全部一手掌握!","url":"//www.bilibili.com/video/ent-variety-1.html"},{"name":"娱乐杂谈","route":"talker","tid":241,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":269},"desc":"娱乐人物解读、娱乐热点点评、娱乐行业分析"},{"name":"粉丝创作","route":"fans","tid":242,"ps":15,"rps":10,"desc":"粉丝向创作视频"},{"name":"明星综合","route":"celebrity","tid":137,"ps":15,"rps":10,"desc":"娱乐圈动态、明星资讯相关"}]},{"name":"影视","route":"cinephile","tid":181,"locid":2211,"count":"","subMenuSize":84,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2309,"leftId":2307,"rightId":2308},"sub":[{"name":"影视杂谈","route":"cinecism","tid":182,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2212},"desc":"影视评论、解说、吐槽、科普等","url":"//www.bilibili.com/video/cinephile-cinecism.html"},{"name":"影视剪辑","route":"montage","tid":183,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2213},"desc":"对影视素材进行剪辑再创作的视频","url":"//www.bilibili.com/video/cinephile-montage.html"},{"name":"短片","route":"shortfilm","tid":85,"ps":15,"rps":10,"desc":"追求自我表达且具有特色的短片","url":"//www.bilibili.com/video/cinephile-shortfilm.html"},{"name":"预告·资讯","route":"trailer_info","tid":184,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2214},"desc":"影视类相关资讯,预告,花絮等视频","url":"//www.bilibili.com/video/cinephile-trailer-info.html"}]},{"name":"纪录片","route":"documentary","tid":177,"url":"//www.bilibili.com/documentary/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"人文·历史","tid":37,"route":"history","dise":"","url":"//www.bilibili.com/video/doco-history.html"},{"name":"科学·探索·自然","tid":178,"route":"science","dise":"","url":"//www.bilibili.com/video/doco-science.html"},{"name":"军事","tid":179,"route":"military","dise":"","url":"//www.bilibili.com/video/doco-military.html"},{"name":"社会·美食·旅行","tid":180,"route":"travel","dise":"","url":"//www.bilibili.com/video/doco-travel.html"},{"name":"纪录片索引","url":"//www.bilibili.com/documentary/index/"}]},{"name":"电影","route":"movie","tid":23,"url":"//www.bilibili.com/movie/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"华语电影","tid":147,"route":"chinese","desc":"","url":"//www.bilibili.com/video/movie_chinese_1.html"},{"name":"欧美电影","tid":145,"route":"west","desc":"","url":"//www.bilibili.com/video/movie_west_1.html"},{"name":"日本电影","tid":146,"route":"japan","desc":"","url":"//www.bilibili.com/video/movie_japan_1.html"},{"name":"其他国家","tid":83,"route":"movie","desc":"","url":"//www.bilibili.com/video/movie-movie-1.html"},{"name":"电影索引","url":"//www.bilibili.com/movie/index/"}]},{"name":"电视剧","route":"tv","tid":11,"url":"//www.bilibili.com/tv/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"国产剧","tid":185,"route":"mainland","desc":"","url":"//www.bilibili.com/video/tv-mainland.html"},{"name":"海外剧","tid":187,"route":"overseas","desc":"","url":"//www.bilibili.com/video/tv-overseas.html"},{"name":"电视剧索引","url":"//www.bilibili.com/tv/index/"}]},{"name":"虚拟UP主","route":"virtual","locid":4735,"count":"","isHide":true,"subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":4754,"leftId":4756},"sub":[{"name":"游戏","route":"game","tid":4,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/game"},{"name":"音乐","route":"music","tid":3,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/music"},{"name":"动画","route":"douga","tid":1,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/douga"},{"name":"其他","route":"other","tid":0,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/other"}]}],[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}],[{"name":"会员购","url":"//show.bilibili.com/platform/home.html","icon":"icon-vip-buy"},{"name":"游戏中心","url":"//game.bilibili.com","icon":"icon-game"},{"name":"画友","url":"http://h.bilibili.com","icon":"icon-hy"},{"name":"芒果TV","url":"//www.bilibili.com/mango","icon":"icon-mango"}],[{"name":"专栏","report":"article","url":"//www.bilibili.com/read/home","icon":"read"},{"name":"直播","report":"live","url":"//live.bilibili.com","icon":"live","sub":[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}]},{"name":"活动","report":"activity","url":"//www.bilibili.com/blackboard/activity-list.html","icon":"activit"},{"name":"课堂","report":"cheese","url":"//www.bilibili.com/cheese/","icon":"zhishi"},{"name":"小黑屋","report":"blackroom","url":"//www.bilibili.com/blackroom/","icon":"blackroom"},{"name":"新歌热榜","report":"musicplus","url":"//www.bilibili.com/v/musicplus/","icon":"musicplus"}]]'),cn=e=>e.startsWith("//")?`https:${e}`:e.replace("http:","https:"),dn=ln[0].filter((e=>"string"!=typeof e.tid)),un=ln[3],pn={};dn.forEach((e=>{const t=cn(`https://www.bilibili.com/v/${e.route}/`);pn[e.name]={icon:e.route,code:e.tid,link:t,subCategories:e.sub?Object.fromEntries(e.sub.map((e=>{const n=cn(e.route?`${t}${e.route}/`:e.url);return[e.name,n]}))):null}})),un.forEach((e=>{pn[e.name]={icon:e.icon,code:null,link:cn(e.url),subCategories:e.sub?Object.fromEntries(e.sub.map((e=>[e.name,cn(e.url)]))):null}}));const fn=pn,hn=Object.fromEntries(dn.map((e=>[e.route,e.tid]))),mn=Object.fromEntries(Object.values(pn).map((e=>[e.icon,e.link]))),gn=async()=>{if(document.getElementById("be-category-icons"))return;const{default:e}=await Promise.resolve().then(n.bind(n,382));document.body.insertAdjacentHTML("beforeend",e)};var bn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"translate-container"},[e.working||e.translated?e._e():n("div",{staticClass:"translate",on:{click:function(t){return e.translate()}}},[n("VIcon",{attrs:{size:14,icon:"mdi-earth"}}),e._v("翻译\n ")],1),e._v(" "),e.translated?n("div",{staticClass:"translated"},[n("a",{attrs:{href:e.activeTranslator&&e.activeTranslator.link,target:"_blank"}},[e._v("\n 翻译自\n ")]),e._v(" "),n("VDropdown",{attrs:{items:Object.values(e.translateProviders),value:e.activeTranslator,"key-mapper":function(e){return e.name}},on:{change:function(t){return e.changeTranslator(t)}},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[e._v("\n "+e._s(n.name)+"\n ")]}}],null,!1,1956376614)})],1):e._e(),e._v(" "),e.working?n("VIcon",{staticClass:"translating mdi-spin",attrs:{size:18,icon:"mdi-loading"}}):e._e(),e._v(" "),!e.working&&e.translated?n("div",{staticClass:"translate-result",domProps:{textContent:e._s(e.result)}}):e._e()],1)};bn._withStripped=!0;var vn=n(8494),yn=Vue.extend({components:{VDropdown:ce.VDropdown,VIcon:ce.VIcon},props:{text:{type:String,required:!0}},data:()=>({result:"",working:!1,translateProviders:vn.WK,activeTranslator:{}}),computed:{translated(){return""!==this.result}},methods:{changeTranslator(e){(0,U.getComponentSettings)("i18n").options.translator=e.name,this.translate()},async translate(){try{this.working=!0;const e=this.text.replace(/#(.+?)#/g,"");this.activeTranslator=(0,vn.Ty)();const t=this.activeTranslator;this.result=await t.translate(e)}catch(e){(0,re.logError)(e)}finally{this.working=!1}}}}),wn=n(3109),xn=n.n(wn),kn={insert:"head",singleton:!1},_n=(je()(xn(),kn),xn().locals,(0,Ue.Z)(yn,bn,[],!1,null,null,null));_n.options.__file="src/components/i18n/machine-translator/MachineTranslator.vue";var Cn=_n.exports;const Sn=e=>{void 0===e.radio&&(e.radio=!1);const{name:t,switches:i}=e,r={};return Object.entries(i).forEach((([e,{displayName:t,defaultValue:n}])=>{r[`switch-${e}`]={defaultValue:n,displayName:t,hidden:!0}})),i=>{const a=`${i.displayName}选项`,o={componentName:i.name,optionDisplayName:a};Object.assign(e,o),r[t]={defaultValue:e,displayName:a},i.options={...i.options,...r},i.widget||(i.widget={component:()=>Promise.resolve().then(n.bind(n,9560)).then((e=>e.default)),options:e});const s=i.entry;return i.entry=async(...e)=>{s?.(...e);const{name:t}=i,n=(0,U.getComponentSettings)(t).options;Object.keys(n).forEach((e=>{e.startsWith("switch-")&&(0,U.addComponentListener)(`${t}.${e}`,(n=>{document.body.classList.toggle(`${t}-${e}`,n)}),!0)}))},i}};const En={component:de,userComponent:ue,styledComponent:s,description:he,switchOptions:_,launchBar:{LaunchBar:n(8805).Z},feeds:{api:c,BangumiCard:Ze,VideoCard:Qe,ColumnCard:ot,disableProfilePopup:d,notify:u},video:{assUtils:p,playerLight:f,playerAgent:_t,videoDanmaku:h,videoInfo:m,videoQuality:g,videoContextMenu:b,videoControlBar:v,watchlater:l},live:{liveControlBar:y,liveSocket:w},utils:{commentApis:x,categories:{updater:sn,data:k}},i18N:{machineTranslator:{MachineTranslator:Cn}}};var $n=n(1773),An=n(3865),In=n(9263);const Tn={style:$n,plugin:An,data:ve,hook:In},On={ajax:C,cdnTypes:S,download:E,externalInput:$,filePicker:A,lifeCycle:I,loadingMode:T,meta:O,observer:L,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...X,constants:J,formatters:K,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Ln={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:L,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...X,...J,...K,...Y,...Q,...o,...re,...ae,...oe},ui:ce,componentApis:{...En.component,...En.userComponent,...En.styledComponent,...En.launchBar,...lodash.omit(En,"component","userComponent","styledComponent","launchBar")},pluginApis:{...Tn.style,...Tn.plugin,...Tn.data,...Tn.hook},monkeyApis:{GM_setValue:GM_setValue,GM_getValue:GM_getValue,GM_deleteValue:GM_deleteValue,GM_xmlhttpRequest:GM_xmlhttpRequest,GM_info:GM_info},lodash:lodash,Vue:Vue,sandboxWindow:window,theWorld:e=>{setTimeout((()=>{}),e)}}},595:function(e,t,n){"use strict";let i;n.d(t,{h:function(){return i}}),function(e){e.Packed="打包下载",e.Individual="单独下载"}(i||(i={}))},9356:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadPackage:function(){return l}});var i=n(595),r=n(6984),a=n(7724),o=n(2433);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l{constructor(e=[]){this.entries=e,s(this,"noEscape",!1)}add(e,t,n={}){null!=t&&this.entries.push({name:this.noEscape?e:(0,o.formatFilename)(e),data:t,options:n})}async blob(){if(0===this.entries.length)return null;if(1===this.entries.length){const{data:e}=this.entries[0];return"string"==typeof e?new Blob([e]):e}const e=new(await r.JSZipLibrary);return this.entries.forEach((({name:t,data:n,options:i})=>{e.file(t,n,i)})),e.generateAsync({type:"blob"})}async emit(e){if(0===this.entries.length)return;e&&1!==this.entries.length||(e=this.entries[0].name);if((0,a.getGeneralSettings)().downloadPackageEmitMode===i.h.Individual&&this.entries.length>1)return void await Promise.all(this.entries.map((e=>l.single(e.name,e.data,e.options))));const t=await this.blob();t&&l.download(e,t)}static download(e,t){const n=document.createElement("a"),i=URL.createObjectURL(t);l.lastPackageUrl&&URL.revokeObjectURL(l.lastPackageUrl),l.lastPackageUrl=i;const r=(0,o.formatFilename)(e);n.setAttribute("href",i),n.setAttribute("download",r),console.log("[Download file]",r),document.body.appendChild(n),n.click(),n.remove()}static async single(e,t,n={}){const i=new l;return i.add(e,t,n),i.emit()}}s(l,"lastPackageUrl","")},6522:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{parseExternalInput:function(){return parseExternalInput},batchParseCode:function(){return batchParseCode}});var _file_picker__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(9183);const parseExternalInput=async input=>{if(void 0===input){const files=await(0,_file_picker__WEBPACK_IMPORTED_MODULE_0__.pickFile)({accept:"application/json"});if(!(files.length>0))return console.error("[parseExternalInput] No file selected"),null;{const[file]=files,text=await file.text();try{return eval(`(${text})`)}catch(e){return console.error(e),null}}}else{if("string"!=typeof input)return input;try{const exports={},result=eval(input);if(Object.values(exports).length>0){const e=Object.values(exports)[0];return e}return result}catch(e){return console.error(e),null}}},batchParseCode=async inputs=>{try{const exports={},result=inputs.map((input=>eval(input)));if(Object.values(exports).length>0){const{coreApis:e}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,5842));return Object.values(exports).map((t=>"function"==typeof t?t(e):t))}return result}catch(e){return console.error(e),null}}},9183:function(e,t,n){"use strict";let i,r;n.r(t),n.d(t,{pickFile:function(){return o}});const a={accept:"*",multiple:!1},o=async(e=a)=>{const{accept:t,multiple:n}={...a,...e};i||(i=document.createElement("input"),i.type="file",i.style.display="none",document.body.appendChild(i),i.addEventListener("change",(()=>{r?.([...i.files]),r=null}))),i.accept=t,i.multiple=n,i.value="",r&&r([]);return await new Promise((e=>{r=e,i.click()}))}},3575:function(e,t,n){"use strict";n.r(t),n.d(t,{tryParseZip:function(){return s},installFeatureFromCode:function(){return l},installFeature:function(){return c}});var i=n(559),r=n(9263),a=n(3865),o=n(1773);const s=async e=>{const{JSZipLibrary:t}=await Promise.resolve().then(n.bind(n,6984)),{monkey:i}=await Promise.resolve().then(n.bind(n,6773)),r=e.endsWith(".zip"),a=r?"blob":"text",o=await i({url:e,method:"GET",responseType:a});if(!r||"string"==typeof o)return o;const s=await t,l=await s.loadAsync(o),c=Object.values(l.files);if(0===c.length)throw new Error("Empty zip file");return c[0].async("text")},l=async(e,t)=>{const{parseExternalInput:s}=await Promise.resolve().then(n.bind(n,6522)),l=await s(e),{type:c,installer:d}=(()=>{if((e=>"entry"in e)(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>"setup"in e)(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>"style"in e)(l))return{type:"style",installer:()=>(0,o.installStyle)(e)};throw new Error("无效的功能代码")})(),{before:u,after:p}=(0,r.getHook)(`user${lodash.startCase(c)}s.add`,e,t);await u();const f=await d();return await p(f.metadata),f},c=async e=>{const t=await s(e);return l(t,e)}},5527:function(e,t,n){"use strict";n.r(t),n.d(t,{headLoaded:function(){return r},contentLoaded:function(){return a},fullyLoaded:function(){return o},LifeCycleEventTypes:function(){return s},raiseLifeCycleEvent:function(){return l}});var i=n(9017);const r=e=>new Promise((t=>{if(null!==document.head)t(e());else{const[n]=(0,i.childList)(document.documentElement,(()=>{null!==document.head&&(n.disconnect(),t(e()))}))}})),a=e=>new Promise((t=>{"loading"!==document.readyState?t(e()):document.addEventListener("DOMContentLoaded",(()=>t(e())))})),o=e=>new Promise((t=>{"complete"===document.readyState?t(e()):unsafeWindow.addEventListener("load",(()=>t(e())))}));let s;!function(e){e.Start="be:start",e.StyleLoaded="be:style-loaded",e.ComponentsLoaded="be:components-loaded",e.End="be:end"}(s||(s={}));const l=e=>{unsafeWindow.dispatchEvent(new CustomEvent(e))}},4327:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{LoadingMode:function(){return i}}),function(e){e.Delay="延后",e.Race="同时"}(i||(i={}))},7601:function(e,t,n){"use strict";n.r(t),n.d(t,{branches:function(){return a},meta:function(){return s}});var i=JSON.parse('{"version":"2.0.4","author":"Grant Howard, Coulomb-G","copyright":"[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)","licence":"MIT","match":"*://*.bilibili.com/*","exclude":["*://api.bilibili.com/*","*://api.*.bilibili.com/*","*://*.bilibili.com/api/*","*://member.bilibili.com/studio/bs-editor/*","*://t.bilibili.com/h5/dynamic/specification","*://bbq.bilibili.com/*"],"run-at":"document-start","supportURL":"https://github.com/the1812/Bilibili-Evolved/issues","homepage":"https://github.com/the1812/Bilibili-Evolved","grant":["unsafeWindow","GM_getValue","GM_setValue","GM_deleteValue","GM_info","GM_xmlhttpRequest"],"connect":["raw.githubusercontent.com","github.com","cdn.jsdelivr.net","cn.bing.com","www.bing.com","translate.google.cn","translate.google.com","localhost","*"],"require":["https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"],"icon":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo-small.png","icon64":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo.png"}'),r=n(4011);i.copyright=i.copyright.replace(/\[year\]/g,(new Date).getFullYear().toString());const a={stable:"v2",preview:"preview"},o={commitHash:"46b0b301034b1d5e9dfa9c8db1b8e99f35dd6806",branch:"preview",nearestTag:"v2.0.4-preview",versionWithTag:"v2.0.4-preview"},s={compilationInfo:o,name:GM_info.script.name,description:GM_info.script.description,get originalFilename(){const{branch:e}=o;return e===a.stable?"bilibili-evolved.user.js":`bilibili-evolved.${e}.user.js`},get updateURL(){return`${r.cdnRoots.jsDelivr(o.branch)}dist/${this.originalFilename}`},get downloadURL(){return this.updateURL},...i}},9017:function(e,t,n){"use strict";n.r(t),n.d(t,{childList:function(){return l},childListSubtree:function(){return c},attributes:function(){return d},attributesSubtree:function(){return u},characterData:function(){return p},characterDataSubtree:function(){return f},allMutationsOn:function(){return h},allMutations:function(){return g},visible:function(){return v},visibleInside:function(){return y},sizeChange:function(){return w},urlChange:function(){return k},videoChange:function(){return S}});var i=n(4742),r=n(4402),a=n(6363);const o=e=>"string"==typeof e?(0,i.dqa)(e):Array.isArray(e)?e:[e],s=(e,t,n)=>{const i=new MutationObserver(n);return e.forEach((e=>i.observe(e,t))),n([],i),[i,t]},l=(e,t)=>s(o(e),{childList:!0,subtree:!1,attributes:!1},t),c=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!1},t),d=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!0},t),u=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!0},t),p=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!1,characterData:!0},t),f=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!1,characterData:!0},t),h=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!0,characterData:!0},t),m={observer:null,config:null,callbacks:[]},g=e=>{if(m.observer)m.callbacks.push(e);else{m.callbacks.push(e);const[t,n]=h(document.body,(e=>m.callbacks.forEach((t=>t(e,m.observer)))));m.observer=t,m.config=n}return m},b=(e,t,n)=>{const i=new IntersectionObserver(n,t);return e.forEach((e=>i.observe(e))),[i,t]},v=(e,t)=>b(o(e),{},t),y=(e,t,n,i)=>b(o(e),{root:t,rootMargin:n},i),w=(e,t)=>((e,t,n)=>{const i=new ResizeObserver(n);return e.forEach((e=>i.observe(e,t))),[i,t]})(o(e),{box:"border-box"},t),x=lodash.once((()=>{let e=document.URL;g((()=>{e!==document.URL&&((()=>{const e=new CustomEvent("urlChange",{detail:document.URL});window.dispatchEvent(e)})(),e=document.URL)}))})),k=(e,t)=>{x(),e(document.URL),window.addEventListener("urlChange",(()=>e(document.URL)),t)},_=lodash.once((()=>(0,r.select)((()=>{if(unsafeWindow.cid)return unsafeWindow.cid;if(unsafeWindow.player&&unsafeWindow.player.getVideoMessage){const e=unsafeWindow.player.getVideoMessage();return Number.isNaN(e.cid)?null:(!unsafeWindow.aid&&e.aid&&(unsafeWindow.aid=e.aid.toString()),!unsafeWindow.bvid&&e.bvid&&(unsafeWindow.bvid=e.bvid),e.cid.toString())}return null}))));let C=!1;const S=async(e,t)=>{if(!(0,a.matchCurrentPage)(a.playerUrls))return!1;const{bpxPlayerPolyfill:i}=await Promise.resolve().then(n.bind(n,1479));i();const r=await _();if(null===r)return!1;const o=()=>({aid:unsafeWindow.aid,cid:unsafeWindow.cid});if(!C){let e=r;Object.defineProperty(unsafeWindow,"cid",{get:()=>e,set(t){e=t,Array.isArray(t)||(()=>{const e=o(),t=new CustomEvent("videoChange",{detail:e});window.dispatchEvent(t)})()}}),C=!0}return e(o()),window.addEventListener("videoChange",(t=>e(t.detail)),t),!0}},2428:function(e,t,n){"use strict";n.r(t),n.d(t,{componentLoadTime:function(){return i},componentResolveTime:function(){return r},componentLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,7724));if(!t().devMode)return;const a=e.entry;e.entry=async e=>{const{metadata:t}=e,n=performance.now();let o=a(e);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(t,s-n),r.set(t,l-n),o}}},2053:function(e,t,n){"use strict";n.r(t),n.d(t,{pluginLoadTime:function(){return i},pluginResolveTime:function(){return r},pluginLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,7724));if(!t().devMode)return;const a=e.setup;e.setup=async t=>{const n=performance.now();let o=a(t);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(e,s-n),r.set(e,l-n),o}}},5878:function(e,t,n){"use strict";n.r(t),n.d(t,{promiseLoadTime:function(){return i},promiseResolveTime:function(){return r},promiseLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async(e,t)=>{const{getGeneralSettings:a}=await Promise.resolve().then(n.bind(n,7724));if(!a().devMode)return t();const o=performance.now(),s=t(),l=performance.now(),c=await s,d=performance.now();return i.set({name:e},l-o),r.set({name:e},d-o),c}},9821:function(e,t,n){"use strict";n.r(t),n.d(t,{logStats:function(){return i}});const i=(e,t)=>{const n=[...t.entries()],i=n.reduce(((e,t)=>e+t[1]),0);console.groupCollapsed(`${e} time:`,Math.round(100*i)/100+"ms",`for ${n.length} items`),n.forEach((([e,t])=>{console.log(`%c${e.name} %c${Math.round(100*t)/100}ms ${Math.round(t/i*1e4)/100}% %c`,"color: #00A0D8","color: #888","color: unset")})),console.groupEnd()}},6984:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RuntimeLibrary:function(){return RuntimeLibrary},protobufLibrary:function(){return protobufLibrary},JSZipLibrary:function(){return JSZipLibrary},SortableJSLibrary:function(){return SortableJSLibrary}});var _ajax__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6773);function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class RuntimeLibrary{constructor(e){this.config=e,_defineProperty(this,"modulePromise",void 0)}async then(resolve,reject){try{const{url:url,getModule:getModule}=this.config;this.modulePromise||(this.modulePromise=(async()=>{console.log(`[Runtime Library] Start download from ${url}`);const code=await(0,_ajax__WEBPACK_IMPORTED_MODULE_0__.monkey)({url:url});return console.log(`[Runtime Library] Downloaded from ${url} , length = ${code.length}`),function runEval(){return eval(code);// eslint-disable-next-line no-extra-bind +const t=e=>e.__vue__||e.parentElement.__vue__,n=async t=>{const n=await(0,q.sq)((()=>e.querySelector(t)),(t=>null!==t||null===e.parentNode),{queryInterval:100});if(null===e.parentNode)return"";if(null===n)return console.warn(e,t,e.parentNode),"";return n.innerText.trim()},i=e=>{if(void 0===e.card.origin)return{originalText:"",originalDescription:"",originalTitle:""};const t=JSON.parse(e.card.origin);return{originalText:e.originCardData.pureText,originalDescription:lodash.get(t,"item.description",lodash.get(t,"desc","")),originalTitle:t.title}},r=async e=>{const t=parseInt(await n(e));return isNaN(t)?0:t},a={id:e.getAttribute("data-did"),username:await n(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:_e(e),get presented(){return null!==e.parentNode},async getText(){const n=await(async n=>{if(n===ye.bangumi)return"";const r=await(0,q.sq)((()=>e),(n=>Boolean(t(n)||!e.parentNode)),{queryInterval:100});if(null===e.parentNode)return"";if(null===r)return console.warn(r,e,t(r),e.parentNode),"";const a=t(r);if(n===ye.repost){const e=a.card.item.content,t=i(a);return[e,...Object.values(t).filter((e=>""!==e))].filter((e=>Boolean(e))).join("\n")}return[a.originCardData.pureText,a.originCardData.title].filter((e=>Boolean(e))).join("\n")})(this.type);return this.text=n,n}};if(await a.getText(),e.setAttribute("data-type",a.type.id.toString()),(e=>e.type===ye.repost)(a)){const n=a.username,r=t(a.element),o=lodash.get(r,"card.origin_user.info.uname","");n===o&&e.setAttribute("data-self-repost","true"),a.repostUsername=o,a.repostText=i(r).originalText}return a}updateCards(e){const t=".card[data-did]",n=e=>{if(e instanceof HTMLElement){if(e.matches(t))return e;const n=e.querySelector(t);if(n)return n}};return[...e.querySelectorAll(t)].forEach((e=>this.addCard(e))),(0,L.childList)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>this.addCard(n(e)))),e.removedNodes.forEach((e=>this.removeCard(n(e))))}))}))}async startWatching(){if(this.watching)return!0;this.watching=!0;const[e]=(0,ve.registerAndGetData)(Se,[]),t=e.find((e=>e.match.some((e=>(0,X.matchUrlPattern)(e)))));return t?t.watchCardsList(this):(console.warn("[FeedsCardsManager] No adaptor found",e),!1)}}const $e=new Ee,Ae=e=>{(async()=>{if(!await $e.startWatching())return void console.error("feedsCardsManager.startWatching() failed");const{added:t}=e;t&&$e.cards.forEach((e=>t(e))),Ce.push({added:none,removed:none,...e})})()},Ie=e=>{const t=lodash.groupBy(e,(e=>e.aid)),n=e=>({id:e.upID,name:e.upName,faceUrl:e.upFaceUrl});return Object.values(t).map((e=>{if(1===e.length)return e[0];const[t,...i]=e;return t.cooperation=[n(t),...i.map(n)],console.log([...t.cooperation]),t})).sort((0,ae.descendingStringSort)((e=>e.id)))},Te=e=>1===lodash.get(e,"extra.is_reserve_recall",0),Oe="feeds.contentFilters";(0,ve.registerData)(Oe,[]);const Le=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Me=e=>(...t)=>e(...t).then((e=>Le(e))),Pe=Me((async(e="video")=>{if(!(0,X.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${"video"===e?8:512}`);if(0!==t.code)throw new Error(t.message);const n=t.data.cards,i=n.filter((e=>!Te(JSON.parse(e.card))));return"video"===e?Ie(n.map((e=>{const t=JSON.parse(e.card),n=lodash.get(e,"display.topic_info.topic_details",[]).map((e=>({id:e.topic_id,name:e.topic_name})));return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(1e3*e.timestamp),topics:n,dynamic:t.dynamic,like:(0,K.formatCount)(e.desc.like),duration:t.duration,durationText:(0,K.formatDuration)(t.duration,0),playCount:(0,K.formatCount)(t.stat.view),danmakuCount:(0,K.formatCount)(t.stat.danmaku),watchlater:me.includes(t.aid)}}))):"bangumi"===e?i.map((e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(1e3*e.timestamp),like:(0,K.formatCount)(e.desc.like),durationText:"",playCount:(0,K.formatCount)(t.play_count),danmakuCount:(0,K.formatCount)(t.bullet_count),watchlater:!1}})):[]})),ze=async(e,t)=>{if("string"==typeof e)return(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${e}`);const n=e.id.toString();let i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,X.getUID)()}&offset_dynamic_id=${t}&type=${n}`),(0,C.getJsonWithCredentials)(i)},De=(e,t)=>{const n=dq(e.element,".more-panel"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("p");o.classList.add("child-button","c-pointer",i),o.textContent=r;[...new Set([...n.children].map((e=>e.getAttributeNames().filter((e=>e.startsWith("data-v-"))))).flat())].forEach((e=>o.setAttribute(e,""))),o.addEventListener("click",(t=>{a(t),e.element.click()})),n.appendChild(o)};var Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"bangumi-card",class:{new:e.isNew},attrs:{target:"_blank",href:e.data.url}},[n("div",{staticClass:"ep-cover-container"},[n("DpiImage",{staticClass:"ep-cover",attrs:{size:{width:100},src:e.data.epCoverUrl}})],1),e._v(" "),n("h1",{staticClass:"ep-title",attrs:{title:e.data.epTitle}},[e._v(e._s(e.data.epTitle))]),e._v(" "),n("div",{staticClass:"up",attrs:{title:e.data.title}},[n("DpiImage",{staticClass:"cover",attrs:{size:24,src:e.data.coverUrl}}),e._v(" "),n("div",{staticClass:"title"},[e._v(e._s(e.data.title))])],1)])};Ve._withStripped=!0;var Be=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),Ne=n(3379),je=n.n(Ne),qe=n(4780),Fe=n.n(qe),Re={insert:"head",singleton:!1},Ue=(je()(Fe(),Re),Fe().locals,n(1900)),He=(0,Ue.Z)(Be,Ve,[],!1,null,"3bc2da4f",null);He.options.__file="src/components/feeds/BangumiCard.vue";var Ze=He.exports,We=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"video-card",class:{vertical:"vertical"===e.orientation,"no-stats":!e.showStats},attrs:{target:"_blank",href:e.epID?"https://www.bilibili.com/bangumi/play/ep"+e.epID:"https://www.bilibili.com/"+e.bvid}},[n("div",{staticClass:"cover-container"},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{height:120,width:200}}}),e._v(" "),e.isNew?n("div",{staticClass:"new"},[e._v("NEW")]):e._e(),e._v(" "),e.pubTime&&e.pubTimeText?[n("div",{staticClass:"publish-time-summary"},[e._v("\n "+e._s(e.pubTimeText)+"\n ")]),e._v(" "),n("div",{staticClass:"publish-time-detail"},[e._v("\n "+e._s(e.pubTime)+"\n ")])]:e._e(),e._v(" "),e.durationText?n("div",{staticClass:"duration"},[e._v(e._s(e.durationText))]):e._e(),e._v(" "),e.durationText&&null!==e.watchlater&&void 0!==e.watchlater?n("div",{staticClass:"watchlater",on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.toggleWatchlater(e.aid)}}},[n("VIcon",{attrs:{size:15,icon:e.watchlater?"mdi-check-circle":"mdi-clock-outline"}}),e._v("\n "+e._s(e.watchlater?"已添加":"稍后再看")+"\n ")],1):e._e()],2),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.title}},[e._v(e._s(e.title))]),e._v(" "),e.topics&&e.topics.length?n("div",{staticClass:"topics"},e._l(e.topics.slice(0,3),(function(t){return n("a",{key:t.id,staticClass:"topic",attrs:{target:"_blank",href:"https://t.bilibili.com/topic/name/"+t.name+"/feed"}},[e._v("#"+e._s(t.name)+"#")])})),0):n("p",{staticClass:"description",attrs:{title:e.description}},[e._v(e._s(e.description))]),e._v(" "),0===e.cooperation.length?n("a",{staticClass:"up",class:{"no-face":!e.upFaceUrl},attrs:{target:"_blank",href:e.upID?"https://space.bilibili.com/"+e.upID:null}},[e.upFaceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.upFaceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}}),e._v(" "),n("div",{staticClass:"name",attrs:{title:e.upName}},[e._v(e._s(e.upName))])],1):e._e(),e._v(" "),0!==e.cooperation.length?n("div",{staticClass:"cooperation"},[n("div",{staticClass:"cooperation-ups"},e._l(e.reversedCooperation,(function(e){return n("a",{key:e.id,staticClass:"cooperation-up",class:{"no-face":!e.faceUrl},attrs:{target:"_blank",title:e.name,href:e.id?"https://space.bilibili.com/"+e.id:null}},[e.faceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.faceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}})],1)})),0),e._v(" "),n("div",{staticClass:"cooperation-note"},[e._v("\n 联合投稿\n ")])]):e._e(),e._v(" "),e.showStats?n("div",{staticClass:"stats"},[e.like&&!e.vertical?[n("VIcon",{attrs:{icon:"like-outline",size:18}}),e._v("\n "+e._s(e.like)+"\n ")]:e._e(),e._v(" "),e.coins&&!e.vertical?[n("VIcon",{attrs:{icon:"coin-outline",size:18}}),e._v("\n "+e._s(e.coins)+"\n ")]:e._e(),e._v(" "),e.favorites?[n("VIcon",{attrs:{icon:"favorites-outline",size:18}}),e._v("\n "+e._s(e.favorites)+"\n ")]:e._e(),e._v(" "),e.playCount?[n("VIcon",{attrs:{icon:"play",size:18}}),e._v("\n "+e._s(e.playCount)+"\n ")]:e._e(),e._v(" "),e.danmakuCount?[n("VIcon",{attrs:{icon:"danmaku",size:18}}),e._v("\n "+e._s(e.danmakuCount)+"\n ")]:e._e()],2):e._e()])};We._withStripped=!0;var Ge={components:{DpiImage:ce.DpiImage,VIcon:ce.VIcon},props:{data:{type:Object,required:!0},orientation:{type:String,default:"horizontal"},showStats:{type:Boolean,default:!0},isNew:{type:Boolean,default:!1}},data(){return{watchlaterList:me,upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,cooperation:[],...lodash.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return"vertical"===this.orientation},watchlater(){return(0,X.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Xe=n(1267),Je=n.n(Xe),Ke={insert:"head",singleton:!1},Ye=(je()(Je(),Ke),Je().locals,(0,Ue.Z)(Ge,We,[],!1,null,"0ffa1cb1",null));Ye.options.__file="src/components/feeds/VideoCard.vue";var Qe=Ye.exports,et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"column-card",attrs:{target:"_blank",href:"https://www.bilibili.com/read/cv"+e.data.cvID}},[n("div",{staticClass:"covers"},e._l(e.data.covers,(function(e){return n("DpiImage",{key:e,staticClass:"cover",attrs:{size:{height:120},src:e}})})),1),e._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.data.upID}},[n("DpiImage",{staticClass:"face",attrs:{size:24,src:e.data.upFaceUrl}}),e._v(" "),n("div",{staticClass:"name"},[e._v(e._s(e.data.upName))])],1),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.data.title}},[e._v(e._s(e.data.title))]),e._v(" "),n("div",{staticClass:"description",attrs:{title:e.data.description}},[e._v(e._s(e.data.description))])])};et._withStripped=!0;var tt=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),nt=n(807),it=n.n(nt),rt={insert:"head",singleton:!1},at=(je()(it(),rt),it().locals,(0,Ue.Z)(tt,et,[],!1,null,null,null));at.options.__file="src/components/feeds/ColumnCard.vue";var ot=at.exports;let st=!1;const lt=()=>{"https://t.bilibili.com/"===document.URL.replace(window.location.search,"")&&(async()=>{const{select:e}=await Promise.resolve().then(n.bind(n,4402)),t=await e(".live-up-list");if(null!==t){const{getComponentSettings:e}=await Promise.resolve().then(n.bind(n,7724));if(st)return;const i=e("fixedSidebars"),r=e("extendFeedsLive");t.addEventListener("mouseenter",(e=>{(i.enabled||r.enabled)&&e.stopImmediatePropagation()}),{capture:!0}),st=!0}})()},ct=3e5,dt=()=>(0,X.getCookieValue)(`bp_t_offset_${(0,X.getUID)()}`),ut=(e,t)=>e===t?0:e.length>t.length?1:t.length>e.length?-1:e>t==!0?1:-1,pt=e=>{if(null==e)return;const t=dt();ut(e,t)<0||(document.cookie=`bp_t_offset_${(0,X.getUID)()}=${e};path=/;domain=.bilibili.com;max-age=2592000`)},ft=e=>ut(e,dt())>0,ht=e=>{const[t]=[...e.map((e=>e.id))].sort(ut).reverse();pt(t)},mt=async e=>{const t=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${(0,X.getUID)()}&update_num_dy_id=${dt()}&type_list=${e||xe}`,n=await(0,C.getJsonWithCredentials)(t);return 0!==n.code?0:lodash.get(n,"data.update_num",0)},gt=e=>{e.startsWith("#")&&(e=e.substring(1));return{red:e.substring(0,2),green:e.substring(2,4),blue:e.substring(4,6)}},bt=e=>{const{red:t,green:n,blue:i}=gt(e);return`\\c&H${i}${n}${t}&`.toUpperCase()},vt=(e,t=1)=>{const{red:n,green:i,blue:r}=gt(e);return`&H${Math.round(255*(1-t)).toString(16).padStart(2,"0")}${r}${i}${n}`.toUpperCase()},yt=e=>{let t=0,n=0;for(;e>=60;)e-=60,n++;for(;n>=60;)n-=60,t++;return`${t}:${String(n).padStart(2,"0")}:${(e=>{const[t,n="00"]=String(e).split(".");return`${t.padStart(2,"0")}.${n.substr(0,2).padEnd(2,"0")}`})(e)}`},wt=(e,t)=>[yt(e),yt(e+t)],xt=(e,t)=>[yt(e),yt(t)],kt=e=>{const t={"{":"{","}":"}","&":"&","<":"<",">":">",""":'"',"'":"'","\n":"\\N"};for(const[n,i]of Object.entries(t))e=e.replace(new RegExp(n,"g"),i);return e};var _t=n(4572);const Ct=e=>oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:X.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,L.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,L.childListSubtree)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement,i=At.find((e=>e.element===n));if(!i)return;return i.text=e.textContent||"",i.reuse=!0,void(t.added&&t.added(i))}if(!(e instanceof HTMLElement))return;const n={element:i=e,reuse:!1,text:i.textContent||""};var i;At.push(n),t.added&&t.added(n)})),e.removedNodes.forEach((e=>{if(!(e instanceof HTMLElement))return;const n=At.findIndex((t=>t.element===e));if(-1!==n){const[e]=At.splice(n,1);t.removed&&t.removed(e)}}))}))}))})(t,e)}))};function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ot{constructor(e){Tt(this,"aid",void 0),Tt(this,"cid",void 0),Tt(this,"pageCount",void 0),Tt(this,"coverUrl",void 0),Tt(this,"tagId",void 0),Tt(this,"tagName",void 0),Tt(this,"title",void 0),Tt(this,"description",void 0),Tt(this,"up",void 0),Tt(this,"pages",void 0),Tt(this,"subtitles",void 0),this.aid=e}async fetchInfo(){let e;e=this.cid?`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`:`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`;const t=await(0,C.getJson)(e);if(0!==t.code)throw new Error(t.message);const{data:n}=t;return this.cid=n.cid,this.pageCount=n.videos,this.coverUrl=n.pic.replace("http:","https:"),this.tagId=n.tid,this.tagName=n.tname,this.title=n.title,this.description=n.desc,this.up={uid:n.owner.mid,name:n.owner.name,faceUrl:n.owner.face.replace("http:","https:")},this.pages=n.pages.map((e=>({cid:e.cid,title:e.part,pageNumber:e.page}))),this.subtitles=n.subtitle.list.map((e=>({id:e.id,languageCode:e.lan,language:e.lan_doc,url:e.subtitle_url.replace("http:","https:")}))),this}}class Lt{constructor(e){Tt(this,"ep",void 0),Tt(this,"videos",void 0),Tt(this,"title",void 0),Tt(this,"cover",void 0),Tt(this,"squareCover",void 0),Tt(this,"aid",void 0),Tt(this,"cid",void 0),this.ep=e,this.videos=[]}async fetchInfo(){const e=await(0,C.getText)(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`),t=JSON.parse(e.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);return this.title=t.mediaInfo.title,this.cover=t.mediaInfo.cover,this.squareCover=t.mediaInfo.square_cover,this.aid=t.epInfo.aid,this.cid=t.epInfo.cid,this.videos=t.epList.map((async e=>({title:e.index_title,aid:e.aid,cid:e.cid,info:await new Ot(e.aid).fetchInfo()}))),this}}const Mt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"HDR",displayName:"真彩 HDR",value:125},{name:"4K",displayName:"超清 4K",value:120},{name:"1080P60",displayName:"高清 1080P60",value:116},{name:"1080P+",displayName:"高清 1080P+",value:112},{name:"720P60",displayName:"高清 720P60",value:74}],zt=[...Pt,...Mt,{name:"480P",displayName:"清晰 480P",value:32},{name:"360P",displayName:"流畅 360P",value:16}].sort((0,ae.descendingSort)((e=>e.value))),Dt=async e=>{const{open:t,close:n}=e;if(!(0,q.hasVideo)())return;const i=await(0,q.select)(".bilibili-player");if(!i)return;const[r]=(0,L.childList)(i,(()=>{const e=dq(".bilibili-player-context-menu-origin");if(e){r.disconnect();const i=dq(e,"ul"),a={containerElement:e,listElement:i,get itemElements(){return dqa(e,".context-menu-function")},get isOpen(){return e.classList.contains("active")}};(0,L.childList)(i,(()=>{a.isOpen?t?.(a):n?.(a)}))}}))},Vt=async(e,t)=>Dt({open:t=>{if(t.listElement.contains(e))return;const n=document.createElement("li");n.classList.add("context-line","context-menu-function"),n.setAttribute("data-append","1");const i=document.createElement("a");i.classList.add("context-menu-a","js-action"),i.href="javascript:void(0);",i.appendChild(e),n.addEventListener("mouseover",(()=>n.classList.add("hover"))),n.addEventListener("mouseout",(()=>n.classList.remove("hover"))),n.appendChild(i),t.listElement.appendChild(n)},close:e=>t?.(e)});let Bt;const Nt=[],jt=lodash.once((async()=>{oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))&&(0,L.videoChange)((async()=>{const{playerAgent:e}=await Promise.resolve().then(n.bind(n,4572)),t=await e.query.control.buttons.time();if(null===t||null!==t.parentElement?.querySelector(".be-video-control-bar-extend"))return;const i=await Promise.resolve().then(n.bind(n,413)).then((e=>e.default));Bt=new i({propsData:{items:Nt}}).$mount(),t.insertAdjacentElement("afterend",Bt.$el)}))})),qt=async e=>{Bt||await jt(),Nt.push(e)},Ft=async e=>{if(!oe.liveUrls.some((e=>(0,X.matchUrlPattern)(e))))return;const t=await(0,q.select)(".bilibili-live-player-video-controller, .web-player-controller-wrap:not(.web-player-controller-bg)");if(!t)return;const{init:n,callback:i}=e;n?.(t),(0,L.childList)(t,(async()=>{const e=dq(t,".control-area");e&&i?.(e)}))};function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ut=0,Ht=2,Zt={heartBeat:2,heartBeatResponse:3,message:5,enterRoom:7,enterRoomResponse:8};class Wt{constructor(){Rt(this,"textEncoder",new TextEncoder),Rt(this,"textDecoder",new TextDecoder)}static readInt(e,t,n){let i=0;for(let r=n-1;r>=0;r--)i+=256**(n-r-1)*e[t+r];return i}static writeInt(e,t,n,i){let r=0;for(;r{const i={packetLength:Wt.readInt(e,0,4),headerLength:Wt.readInt(e,4,2),protocolVersion:Wt.readInt(e,6,2),operation:Wt.readInt(e,8,4),sequenceID:Wt.readInt(e,12,4)},r=[i];if(i.packetLengthe.messages[0])))}else i.protocolVersion===Ut&&(i.messages=[JSON.parse(this.textDecoder.decode(r))])}else i.operation===Zt.heartBeatResponse&&(i.heartBeatResponse={count:Wt.readInt(e,16,4)});return r};return new Promise(((n,i)=>{const r=new FileReader;r.onload=async e=>{if(!e.target)return void i(e);const r=new Uint8Array(e.target.result);n(await t(r))},r.readAsArrayBuffer(e)}))}}class Gt{constructor(){Rt(this,"startTime",0)}getLiveTime(){return new Promise((e=>{if(this.startTime)return void e(this.startTime);const t=(0,X.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,L.childList)(t,(t=>{if(t.length>0&&t.some((e=>e.addedNodes.length>0&&[...e.addedNodes].every((e=>e.nodeType===Node.TEXT_NODE))))){n.disconnect();const i=t[0].addedNodes[0].textContent,[r,a,o=0]=i.split(":").reverse().map(lodash.unary(parseInt)),s=Number(new Date);this.startTime=s-1e3*o*3600-60*a*1e3-1e3*r,e(this.startTime)}}))}))}}class Xt extends EventTarget{constructor(e){super(),this.roomID=e,Rt(this,"heartBeatTimer",void 0),Rt(this,"webSocket",void 0),Rt(this,"retryInterval",200),Rt(this,"autoRetry",!0),Rt(this,"servers",["broadcastlv.chat.bilibili.com"]),Rt(this,"selectedServer",""),Rt(this,"liveTime",new Gt),Rt(this,"bufferHelper",new Wt),Rt(this,"stopRequested",!1),window.addEventListener("unload",(()=>this.stop()))}heartBeat(){this.webSocket.readyState===WebSocket.OPEN?this.webSocket.send(this.bufferHelper.encode("","heartBeat")):(this.stop(),this.restart())}restart(){if(this.dispatchEvent(new CustomEvent("restart")),!this.stopRequested&&this.autoRetry){console.log(`Live Socket: unexpected disconnect, retry in ${this.retryInterval}ms`);const e=this.servers.indexOf(this.selectedServer);ethis.start()),this.retryInterval)}}async start(){const e=await(0,C.getJson)(`https://api.live.bilibili.com/room/v1/Danmu/getConf?room_id=${this.roomID}&platform=pc&player=web`),t=lodash.get(e,"data.host_server_list",[]);this.servers=[...new Set([...this.servers,...t.map((e=>e.host))])],""===this.selectedServer&&([this.selectedServer]=this.servers,console.log("Initial server:",this.selectedServer)),this.webSocket&&[WebSocket.CONNECTING,WebSocket.OPEN].includes(this.webSocket.readyState)&&this.stop(),this.webSocket=new WebSocket(`wss://${this.selectedServer}/sub`),this.stopRequested=!1,this.dispatchEvent(new CustomEvent("start",{detail:this.webSocket})),this.webSocket.addEventListener("open",(()=>{const t={roomid:this.roomID,uid:parseInt((0,X.getUID)()),protover:2,platform:"web",clientVer:"1.10.1",type:"2",key:lodash.get(e,"data.token")};this.webSocket.send(this.bufferHelper.encode(JSON.stringify(t),"enterRoom")),this.dispatchEvent(new CustomEvent("open",{detail:t}))})),this.webSocket.addEventListener("message",(async e=>{const[t]=await this.bufferHelper.decode(e.data);switch(this.dispatchEvent(new CustomEvent("message",{detail:t})),t.operation){case Zt.enterRoomResponse:this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.heartBeatTimer=window.setInterval((()=>{this.heartBeat()}),3e4);break;case Zt.heartBeatResponse:if(!t.heartBeatResponse)break;this.dispatchEvent(new CustomEvent("heartBeatResponse",{detail:t.heartBeatResponse.count}));break;case Zt.message:{if(!t.messages)break;const e=await this.liveTime.getLiveTime();t.messages.forEach((t=>{if("DANMU_MSG"===t.cmd){const{info:n}=t,i={content:n[1],type:n[0][1],fontSize:n[0][2],color:n[0][3],sendTime:n[0][4],userHash:n[0][7],userID:n[2][0],userName:n[2][1],startTime:e,get time(){return this.sendTime-this.startTime}};this.dispatchEvent(new CustomEvent("danmaku",{detail:i}))}}));break}}})),this.webSocket.addEventListener("close",(e=>{this.stopRequested||(console.error("Live Socket: close",e),this.restart())})),this.webSocket.addEventListener("error",(e=>{console.error("Live Socket: error",e),this.restart()}))}stop(){this.stopRequested=!0,this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.webSocket&&this.webSocket.readyState===WebSocket.OPEN&&this.webSocket.close()}}const Jt=[],Kt="bb-comment",Yt=[],Qt=[],en=[],tn=e=>{const t=e.querySelector(".con .user .name"),n=e=>{const t=e.querySelector(".reply-face"),n=e.querySelector(".reply-con .user .name");return{id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:n.textContent,content:e.querySelector(".text-con").textContent,timeText:e.querySelector(".info .time").textContent,likes:parseInt(e.querySelector(".info .like span").textContent)}},i={id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".con .text").textContent,timeText:e.querySelector(".con .info .time").textContent,likes:parseInt(e.querySelector(".con .like span").textContent),replies:[]};if(dq(e,".reply-box .view-more")){const t=dq(e,".reply-box");(0,L.childList)(t,(t=>{i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Kt)){const t={element:e,items:[]};Jt.push(t),(e=>{e.observer||(e.items=(0,X.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,L.childListSubtree)(e.element,(t=>{t.forEach((t=>{const n=e=>e instanceof HTMLElement&&e.classList.contains("list-item")&&e.classList.contains("reply-wrap");t.addedNodes.forEach((t=>{if(n(t)){const n=tn(t);e.items.push(n),Yt.forEach((e=>e(n)))}})),t.removedNodes.forEach((t=>{if(n(t)){const n=t.getAttribute("data-id"),i=e.items.findIndex((e=>e.id===n));if(-1!==i){const[t]=e.items.splice(i,1);Qt.forEach((e=>e(t)))}}}))}))})))})(t),en.forEach((e=>e(t)))}};(0,I.contentLoaded)((()=>{(0,L.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,X.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Jt.forEach((t=>e(t))),en.push(e)},an=e=>{const{added:t,removed:n}=e;rn((e=>{t&&(e.items.forEach((e=>t(e))),Yt.push(t)),n&&Qt.push(n)}))},on=(e,t)=>{const n=dq(e.element,".opera-list ul"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("li");o.classList.add(i),o.textContent=r,o.addEventListener("click",(e=>{a(e)})),n.appendChild(o)};var sn=n(4350);const ln=JSON.parse('[[{"name":"首页","route":"/","tid":"","locid":23,"sub":[]},{"name":"动画","route":"douga","tid":1,"locid":52,"count":"","subMenuSize":162,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2507,"leftId":2452,"rightId":2453},"sub":[{"name":"MAD·AMV","route":"mad","tid":24,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":151},"desc":"具有一定制作程度的动画或静画的二次创作视频","url":"//www.bilibili.com/video/douga-mad-1.html"},{"name":"MMD·3D","route":"mmd","tid":25,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":152},"desc":"使用MMD(MikuMikuDance)和其他3D建模类软件制作的视频","url":"//www.bilibili.com/video/douga-mmd-1.html"},{"name":"短片·手书·配音","route":"voice","tid":47,"ps":15,"rps":10,"desc":"追求创新并具有强烈特色的短片、手书(绘)及ACG相关配音","url":"//www.bilibili.com/video/douga-voice-1.html"},{"name":"手办·模玩","route":"garage_kit","tid":210,"ps":15,"rps":10,"desc":"手办模玩的测评、改造或其他衍生内容","url":""},{"name":"特摄","route":"tokusatsu","tid":86,"ps":15,"rps":10,"desc":"特摄相关衍生视频","url":"//www.bilibili.com/video/cinephile-tokusatsu.html"},{"name":"综合","route":"other","tid":27,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":153},"desc":"以动画及动画相关内容为素材,包括但不仅限于音频替换、杂谈、排行榜等内容","url":"//www.bilibili.com/video/douga-else-1.html"}]},{"name":"番剧","route":"anime","tid":13,"url":"//www.bilibili.com/anime/","takeOvered":true,"count":"","subMenuSize":172,"combination":true,"sub":[{"name":"连载动画","tid":33,"route":"serial","desc":"当季连载的动画番剧","url":"//www.bilibili.com/video/bangumi-two-1.html"},{"name":"完结动画","tid":32,"route":"finish","desc":"已完结的动画番剧合集","url":"//www.bilibili.com/video/part-twoelement-1.html"},{"name":"资讯","tid":51,"route":"information","desc":"动画番剧相关资讯视频","url":"//www.bilibili.com/video/douga-else-information-1.html"},{"name":"官方延伸","tid":152,"route":"offical","desc":"动画番剧为主题的宣传节目、采访视频,及声优相关视频","url":"//www.bilibili.com/video/bagumi_offical_1.html"},{"name":"新番时间表","url":"//www.bilibili.com/anime/timeline/","desc":""},{"name":"番剧索引","url":"//www.bilibili.com/anime/index/","desc":""}]},{"name":"国创","tid":167,"route":"guochuang","url":"//www.bilibili.com/guochuang/","takeOvered":true,"count":"","subMenuSize":214,"combination":true,"sub":[{"name":"国产动画","tid":153,"route":"chinese","desc":"我国出品的PGC动画","url":"//www.bilibili.com/video/bangumi_chinese_1.html"},{"name":"国产原创相关","tid":168,"route":"original","desc":"","url":"//www.bilibili.com/video/guochuang-fanvid-1.html"},{"name":"布袋戏","tid":169,"route":"puppetry","desc":"","url":"//www.bilibili.com/video/glove-puppetry-1.html"},{"name":"动态漫·广播剧","tid":195,"route":"motioncomic","desc":"","url":""},{"name":"资讯","tid":170,"route":"information","desc":"","url":"//www.bilibili.com/video/guochuang-offical-1.html"},{"name":"新番时间表","url":"//www.bilibili.com/guochuang/timeline/","desc":""},{"name":"国产动画索引","url":"//www.bilibili.com/guochuang/index/","desc":""}]},{"name":"音乐","route":"music","tid":3,"locid":58,"count":"","subMenuSize":268,"slider":{"width":620,"height":220},"viewTag":true,"customComponent":{"name":"Energy","titleId":2511,"leftId":2462,"rightId":3131,"rightType":"slide"},"sub":[{"name":"原创音乐","route":"original","tid":28,"ps":15,"rps":10,"viewHotTag":true,"ad":{"active":true,"dataLocId":243},"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"个人或团队制作以音乐为主要原创因素的歌曲或纯音乐","url":"//www.bilibili.com/video/music-original-1.html"},{"name":"翻唱","route":"cover","tid":31,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":245},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"一切非官方的人声再演绎歌曲作品","url":"//www.bilibili.com/video/music-Cover-1.html"},{"name":"VOCALOID·UTAU","route":"vocaloid","tid":30,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以雅马哈Vocaloid和UTAU引擎为基础,包含其他调教引擎,运用各类音源进行的歌曲创作内容","url":"//www.bilibili.com/video/music-vocaloid-1.html"},{"name":"电音","route":"electronic","tid":194,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以电子合成器、音乐软体等产生的电子声响制作的音乐","url":"#"},{"name":"演奏","route":"perform","tid":59,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":247},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"传统或非传统乐器及器材的演奏作品","url":"//www.bilibili.com/video/music-perform-1.html"},{"name":"MV","route":"mv","tid":193,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐录影带,为搭配音乐而拍摄或制作的视频","url":"//www.bilibili.com/video/music-coordinate-1.html"},{"name":"音乐现场","route":"live","tid":29,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐实况表演视频","url":"//www.bilibili.com/video/music-oped-1.html"},{"name":"音乐综合","route":"other","tid":130,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"收录无法定义到其他音乐子分区的音乐视频","url":"//www.bilibili.com/video/music-collection-1.html"},{"name":"音频","customZone":"Audio","route":"audio","url":"//www.bilibili.com/audio/home?musicType=music"},{"name":"说唱","url":"//www.bilibili.com/v/rap"}]},{"name":"舞蹈","route":"dance","tid":129,"locid":64,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2513,"leftId":2472,"rightId":2473},"sub":[{"name":"宅舞","route":"otaku","tid":20,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":249},"desc":"与ACG相关的翻跳、原创舞蹈","url":"//www.bilibili.com/video/dance-1.html"},{"name":"街舞","route":"hiphop","tid":198,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":251},"desc":"收录街舞相关内容,包括赛事现场、舞室作品、个人翻跳、FREESTYLE等","url":""},{"name":"明星舞蹈","route":"star","tid":199,"ps":15,"rps":10,"desc":"国内外明星发布的官方舞蹈及其翻跳内容","url":""},{"name":"中国舞","route":"china","tid":200,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":253},"desc":"传承中国艺术文化的舞蹈内容,包括古典舞、民族民间舞、汉唐舞、古风舞等","url":""},{"name":"舞蹈综合","route":"three_d","tid":154,"ps":15,"rps":10,"desc":"收录无法定义到其他舞蹈子分区的舞蹈视频","url":""},{"name":"舞蹈教程","route":"demo","tid":156,"ps":10,"rps":6,"desc":"镜面慢速,动作分解,基础教程等具有教学意义的舞蹈视频","url":"//www.bilibili.com/video/dance-demo-1.html"}]},{"name":"游戏","route":"game","tid":4,"locid":70,"count":"","subMenuSize":240,"slider":{"width":470,"height":216},"viewTag":true,"customComponent":{"name":"Energy","titleId":3761,"leftId":3765,"rightId":3775,"rightType":"slide"},"recommendCardType":"GameGroomBox","sub":[{"name":"单机游戏","route":"stand_alone","tid":17,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":255},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以所有平台(PC、主机、移动端)的单机或联机游戏为主的视频内容,包括游戏预告、CG、实况解说及相关的评测、杂谈与视频剪辑等","url":"//www.bilibili.com/video/videogame-1.html"},{"name":"电子竞技","route":"esports","tid":171,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":257},"desc":"具有高对抗性的电子竞技游戏项目,其相关的赛事、实况、攻略、解说、短剧等视频。","url":"//www.bilibili.com/video/esports-1.html"},{"name":"手机游戏","route":"mobile","tid":172,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"desc":"以手机及平板设备为主要平台的游戏,其相关的实况、攻略、解说、短剧、演示等视频。","url":"//www.bilibili.com/video/mobilegame-1.html"},{"name":"网络游戏","route":"online","tid":65,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":259},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由网络运营商运营的多人在线游戏,以及电子竞技的相关游戏内容。包括赛事、攻略、实况、解说等相关视频","url":"//www.bilibili.com/video/onlinegame-1.html"},{"name":"桌游棋牌","route":"board","tid":173,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"desc":"桌游、棋牌、卡牌对战等及其相关电子版游戏的实况、攻略、解说、演示等视频。","url":"//www.bilibili.com/video/boardgame-1.html"},{"name":"GMV","route":"gmv","tid":121,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由游戏素材制作的MV视频。以游戏内容或CG为主制作的,具有一定创作程度的MV类型的视频","url":"//www.bilibili.com/video/gmv-1.html"},{"name":"音游","route":"music","tid":136,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"各个平台上,通过配合音乐与节奏而进行的音乐类游戏视频","url":"//www.bilibili.com/video/music-game-1.html"},{"name":"Mugen","route":"mugen","tid":19,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以Mugen引擎为平台制作、或与Mugen相关的游戏视频","url":"//www.bilibili.com/video/game-mugen-1.html"},{"name":"游戏赛事","url":"//www.bilibili.com/v/game/match/","newIcon":true}]},{"name":"知识","route":"knowledge","tid":36,"locid":76,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2058,"leftId":2047,"rightId":2048},"sub":[{"name":"科学科普","route":"science","tid":201,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":261},"desc":"回答你的十万个为什么"},{"name":"社科·法律·心理","route":"social_science","tid":124,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":263},"desc":"基于社会科学、法学、心理学展开或个人观点输出的知识视频"},{"name":"人文历史","route":"humanity_history","tid":228,"ps":15,"rps":10,"desc":"看看古今人物,聊聊历史过往,品品文学典籍"},{"name":"财经商业","route":"business","tid":207,"ps":15,"rps":10,"desc":"说金融市场,谈宏观经济,一起畅聊商业故事"},{"name":"校园学习","route":"campus","tid":208,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":265},"desc":"老师很有趣,学生也有才,我们一起搞学习"},{"name":"职业职场","route":"career","tid":209,"ps":15,"rps":10,"desc":"职业分享、升级指南,一起成为最有料的职场人"},{"name":"设计·创意","route":"design","tid":229,"ps":15,"rps":10,"desc":"天马行空,创意设计,都在这里"},{"name":"野生技能协会","route":"skill","tid":122,"ps":15,"rps":10,"desc":"技能党集合,是时候展示真正的技术了"}]},{"name":"科技","route":"tech","tid":188,"locid":2977,"count":"","subMenuSize":80,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2980,"leftId":2978,"rightId":2979},"sub":[{"name":"数码","route":"digital","tid":95,"ps":15,"rps":10,"viewHotTag":true,"desc":"科技数码产品大全,一起来做发烧友","url":"#"},{"name":"软件应用","route":"application","tid":230,"ps":15,"rps":10,"viewHotTag":true,"desc":"超全软件应用指南","url":"#"},{"name":"计算机技术","route":"computer_tech","tid":231,"ps":15,"rps":10,"viewHotTag":true,"desc":"研究分析、教学演示、经验分享......有关计算机技术的都在这里","url":"#"},{"name":"工业·工程·机械","route":"industry","tid":232,"ps":15,"rps":10,"viewHotTag":true,"desc":"前方高能,机甲重工即将出没","url":"#"},{"name":"极客DIY","route":"diy","tid":233,"ps":15,"rps":10,"viewHotTag":true,"desc":"炫酷技能,极客文化,硬核技巧,准备好你的惊讶","url":"#"}]},{"name":"运动","route":"sports","tid":234,"locid":4639,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4646,"rightId":4652,"rightType":"slide"},"sub":[{"name":"篮球·足球","route":"basketballfootball","tid":235,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4656},"desc":"与篮球、足球相关的视频,包括但不限于篮足球赛事、教学、评述、剪辑、剧情等相关内容","url":"#"},{"name":"健身","route":"aerobics","tid":164,"ps":15,"rps":10,"desc":"与健身相关的视频,包括但不限于瑜伽、CrossFit、健美、力量举、普拉提、街健等相关内容","url":"//www.bilibili.com/video/fashion-body-1.html"},{"name":"竞技体育","route":"athletic","tid":236,"ps":15,"rps":10,"desc":"与竞技体育相关的视频,包括但不限于乒乓、羽毛球、排球、赛车等竞技项目的赛事、评述、剪辑、剧情等相关内容","url":"#"},{"name":"运动文化","route":"culture","tid":237,"ps":15,"rps":10,"desc":"与运动文化相关的视频,包络但不限于球鞋、球衣、球星卡等运动衍生品的分享、解读,体育产业的分析、科普等相关内容","url":"#"},{"name":"运动综合","route":"comprehensive","tid":238,"ps":15,"rps":10,"desc":"与运动综合相关的视频,包括但不限于钓鱼、骑行、滑板等日常运动分享、教学、Vlog等相关内容","url":"#"}]},{"name":"汽车","route":"car","tid":223,"locid":4428,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4435,"rightId":4441,"rightType":"slide"},"sub":[{"name":"汽车生活","route":"life","tid":176,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4445},"desc":"分享汽车及出行相关的生活体验类视频","url":"#"},{"name":"汽车文化","route":"culture","tid":224,"ps":15,"rps":10,"desc":"车迷的精神圣地,包括汽车赛事、品牌历史、汽车改装、经典车型和汽车模型等","url":"#"},{"name":"汽车极客","route":"geek","tid":225,"ps":15,"rps":10,"desc":"汽车硬核达人聚集地,包括DIY造车、专业评测和技术知识分享","url":"#"},{"name":"摩托车","route":"motorcycle","tid":240,"ps":15,"rps":10,"desc":"骑士们集合啦","url":"#"},{"name":"智能出行","route":"smart","tid":226,"ps":15,"rps":10,"desc":"探索新能源汽车和未来智能出行的前沿阵地","url":"#"},{"name":"购车攻略","route":"strategy","tid":227,"ps":15,"rps":10,"desc":"丰富详实的购车建议和新车体验","url":"#"}]},{"name":"生活","route":"life","tid":160,"locid":88,"count":"","subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2062,"leftId":1674,"rightId":1670},"sub":[{"name":"搞笑","route":"funny","tid":138,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":273},"desc":"各种沙雕有趣的搞笑剪辑,挑战,表演,配音等视频","url":"//www.bilibili.com/video/ent_funny_1.html","locid":4204,"recommendId":4210,"slider":{"width":620,"height":220},"customComponent":{"name":"Energy","leftId":4212,"rightId":4218,"rightType":"slide"}},{"name":"家居房产","route":"home","tid":239,"ps":15,"rps":10,"desc":"与买房、装修、居家生活相关的分享","url":"#"},{"name":"手工","route":"handmake","tid":161,"ps":15,"rps":10,"desc":"手工制品的制作过程或成品展示、教程、测评类视频","url":"//www.bilibili.com/video/ent-handmake-1.html"},{"name":"绘画","route":"painting","tid":162,"ps":15,"rps":10,"desc":"绘画过程或绘画教程,以及绘画相关的所有视频","url":"//www.bilibili.com/video/ent-painting-1.html"},{"name":"日常","route":"daily","tid":21,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":275},"desc":"记录日常生活,分享生活故事","url":"//www.bilibili.com/video/ent-life-1.html"}]},{"name":"美食","route":"food","tid":211,"locid":4243,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4258,"rightId":4264},"sub":[{"name":"美食制作","route":"make","tid":76,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4268},"desc":"学做人间美味,展示精湛厨艺","url":"#"},{"name":"美食侦探","route":"detective","tid":212,"ps":15,"rps":10,"desc":"寻找美味餐厅,发现街头美食","url":"#"},{"name":"美食测评","route":"measurement","tid":213,"ps":15,"rps":10,"desc":"吃货世界,品尝世间美味","url":"#"},{"name":"田园美食","route":"rural","tid":214,"ps":15,"rps":10,"desc":"品味乡野美食,寻找山与海的味道","url":"#"},{"name":"美食记录","route":"record","tid":215,"ps":15,"rps":10,"desc":"记录一日三餐,给生活添一点幸福感","url":"#"}]},{"name":"动物圈","route":"animal","tid":217,"locid":4365,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4376,"rightId":4381,"rightType":"slide"},"sub":[{"name":"喵星人","route":"cat","tid":218,"ps":15,"rps":10,"desc":"喵喵喵喵喵","url":"#","ad":{"active":true,"dataLocId":4385}},{"name":"汪星人","route":"dog","tid":219,"ps":15,"rps":10,"desc":"汪汪汪汪汪","url":"#"},{"name":"大熊猫","route":"panda","tid":220,"ps":15,"rps":10,"desc":"芝麻汤圆营业中","url":"#"},{"name":"野生动物","route":"wild_animal","tid":221,"ps":15,"rps":10,"desc":"内有“猛兽”出没","url":"#"},{"name":"爬宠","route":"reptiles","tid":222,"ps":15,"rps":10,"desc":"鳞甲有灵","url":"#"},{"name":"动物综合","route":"animal_composite","tid":75,"ps":15,"rps":10,"desc":"收录除上述子分区外,其余动物相关视频以及非动物主体或多个动物主体的动物相关延伸内容","url":"#"}]},{"name":"鬼畜","route":"kichiku","tid":119,"locid":100,"count":"","subMenuSize":182,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2509,"leftId":2482,"rightId":2483},"sub":[{"name":"鬼畜调教","route":"guide","tid":22,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":285},"desc":"使用素材在音频、画面上做一定处理,达到与BGM一定的同步感","url":"//www.bilibili.com/video/ent-Kichiku-1.html"},{"name":"音MAD","route":"mad","tid":26,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":287},"desc":"使用素材音频进行一定的二次创作来达到还原原曲的非商业性质稿件","url":"//www.bilibili.com/video/douga-kichiku-1.html"},{"name":"人力VOCALOID","route":"manual_vocaloid","tid":126,"ps":15,"rps":10,"desc":"将人物或者角色的无伴奏素材进行人工调音,使其就像VOCALOID一样歌唱的技术","url":"//www.bilibili.com/video/kichiku-manual_vocaloid-1.html"},{"name":"鬼畜剧场","route":"theatre","tid":216,"ps":15,"rps":10,"desc":"使用素材进行人工剪辑编排的有剧情的作品"},{"name":"教程演示","route":"course","tid":127,"ps":10,"rps":6,"rightComponent":{"name":"CmImgList","id":148},"ad":{"active":true,"dataLocId":289},"hideDropdown":false,"desc":"鬼畜相关的教程演示","url":"//www.bilibili.com/video/kichiku-course-1.html"}]},{"name":"时尚","route":"fashion","tid":155,"locid":94,"count":"","subMenuSize":124,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2515,"leftId":2492,"rightId":2493},"sub":[{"name":"美妆护肤","route":"makeup","tid":157,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":279},"desc":"彩妆护肤、美甲美发、仿妆、医美相关内容分享或产品测评","url":"//www.bilibili.com/video/fashion-makeup-fitness-1.html"},{"name":"穿搭","route":"clothing","tid":158,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":281},"desc":"穿搭风格、穿搭技巧的展示分享,涵盖衣服、鞋靴、箱包配件、配饰(帽子、钟表、珠宝首饰)等","url":"//www.bilibili.com/video/fashion-clothing-1.html"},{"name":"时尚潮流","route":"trend","tid":159,"ps":15,"rps":10,"desc":"时尚街拍、时装周、时尚大片,时尚品牌、潮流等行业相关记录及知识科普","url":"#"}]},{"name":"资讯","route":"information","tid":202,"locid":4076,"count":"","subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"sub":[{"name":"热点","route":"hotspot","tid":203,"ps":18,"rps":10,"desc":"全民关注的时政热门资讯"},{"name":"环球","route":"global","tid":204,"ps":18,"rps":10,"desc":"全球范围内发生的具有重大影响力的事件动态"},{"name":"社会","route":"social","tid":205,"ps":18,"rps":10,"desc":"日常生活的社会事件、社会问题、社会风貌的报道"},{"name":"综合","route":"multiple","tid":206,"ps":18,"rps":10,"desc":"除上述领域外其它垂直领域的综合资讯"}]},{"name":"娱乐","route":"ent","tid":5,"locid":82,"count":"","subMenuSize":62,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2067,"leftId":2065,"rightId":2066},"sub":[{"name":"综艺","route":"variety","tid":71,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":267},"desc":"所有综艺相关,全部一手掌握!","url":"//www.bilibili.com/video/ent-variety-1.html"},{"name":"娱乐杂谈","route":"talker","tid":241,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":269},"desc":"娱乐人物解读、娱乐热点点评、娱乐行业分析"},{"name":"粉丝创作","route":"fans","tid":242,"ps":15,"rps":10,"desc":"粉丝向创作视频"},{"name":"明星综合","route":"celebrity","tid":137,"ps":15,"rps":10,"desc":"娱乐圈动态、明星资讯相关"}]},{"name":"影视","route":"cinephile","tid":181,"locid":2211,"count":"","subMenuSize":84,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2309,"leftId":2307,"rightId":2308},"sub":[{"name":"影视杂谈","route":"cinecism","tid":182,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2212},"desc":"影视评论、解说、吐槽、科普等","url":"//www.bilibili.com/video/cinephile-cinecism.html"},{"name":"影视剪辑","route":"montage","tid":183,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2213},"desc":"对影视素材进行剪辑再创作的视频","url":"//www.bilibili.com/video/cinephile-montage.html"},{"name":"短片","route":"shortfilm","tid":85,"ps":15,"rps":10,"desc":"追求自我表达且具有特色的短片","url":"//www.bilibili.com/video/cinephile-shortfilm.html"},{"name":"预告·资讯","route":"trailer_info","tid":184,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2214},"desc":"影视类相关资讯,预告,花絮等视频","url":"//www.bilibili.com/video/cinephile-trailer-info.html"}]},{"name":"纪录片","route":"documentary","tid":177,"url":"//www.bilibili.com/documentary/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"人文·历史","tid":37,"route":"history","dise":"","url":"//www.bilibili.com/video/doco-history.html"},{"name":"科学·探索·自然","tid":178,"route":"science","dise":"","url":"//www.bilibili.com/video/doco-science.html"},{"name":"军事","tid":179,"route":"military","dise":"","url":"//www.bilibili.com/video/doco-military.html"},{"name":"社会·美食·旅行","tid":180,"route":"travel","dise":"","url":"//www.bilibili.com/video/doco-travel.html"},{"name":"纪录片索引","url":"//www.bilibili.com/documentary/index/"}]},{"name":"电影","route":"movie","tid":23,"url":"//www.bilibili.com/movie/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"华语电影","tid":147,"route":"chinese","desc":"","url":"//www.bilibili.com/video/movie_chinese_1.html"},{"name":"欧美电影","tid":145,"route":"west","desc":"","url":"//www.bilibili.com/video/movie_west_1.html"},{"name":"日本电影","tid":146,"route":"japan","desc":"","url":"//www.bilibili.com/video/movie_japan_1.html"},{"name":"其他国家","tid":83,"route":"movie","desc":"","url":"//www.bilibili.com/video/movie-movie-1.html"},{"name":"电影索引","url":"//www.bilibili.com/movie/index/"}]},{"name":"电视剧","route":"tv","tid":11,"url":"//www.bilibili.com/tv/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"国产剧","tid":185,"route":"mainland","desc":"","url":"//www.bilibili.com/video/tv-mainland.html"},{"name":"海外剧","tid":187,"route":"overseas","desc":"","url":"//www.bilibili.com/video/tv-overseas.html"},{"name":"电视剧索引","url":"//www.bilibili.com/tv/index/"}]},{"name":"虚拟UP主","route":"virtual","locid":4735,"count":"","isHide":true,"subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":4754,"leftId":4756},"sub":[{"name":"游戏","route":"game","tid":4,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/game"},{"name":"音乐","route":"music","tid":3,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/music"},{"name":"动画","route":"douga","tid":1,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/douga"},{"name":"其他","route":"other","tid":0,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/other"}]}],[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}],[{"name":"会员购","url":"//show.bilibili.com/platform/home.html","icon":"icon-vip-buy"},{"name":"游戏中心","url":"//game.bilibili.com","icon":"icon-game"},{"name":"画友","url":"http://h.bilibili.com","icon":"icon-hy"},{"name":"芒果TV","url":"//www.bilibili.com/mango","icon":"icon-mango"}],[{"name":"专栏","report":"article","url":"//www.bilibili.com/read/home","icon":"read"},{"name":"直播","report":"live","url":"//live.bilibili.com","icon":"live","sub":[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}]},{"name":"活动","report":"activity","url":"//www.bilibili.com/blackboard/activity-list.html","icon":"activit"},{"name":"课堂","report":"cheese","url":"//www.bilibili.com/cheese/","icon":"zhishi"},{"name":"小黑屋","report":"blackroom","url":"//www.bilibili.com/blackroom/","icon":"blackroom"},{"name":"新歌热榜","report":"musicplus","url":"//www.bilibili.com/v/musicplus/","icon":"musicplus"}]]'),cn=e=>e.startsWith("//")?`https:${e}`:e.replace("http:","https:"),dn=ln[0].filter((e=>"string"!=typeof e.tid)),un=ln[3],pn={};dn.forEach((e=>{const t=cn(`https://www.bilibili.com/v/${e.route}/`);pn[e.name]={icon:e.route,code:e.tid,link:t,subCategories:e.sub?Object.fromEntries(e.sub.map((e=>{const n=cn(e.route?`${t}${e.route}/`:e.url);return[e.name,n]}))):null}})),un.forEach((e=>{pn[e.name]={icon:e.icon,code:null,link:cn(e.url),subCategories:e.sub?Object.fromEntries(e.sub.map((e=>[e.name,cn(e.url)]))):null}}));const fn=pn,hn=Object.fromEntries(dn.map((e=>[e.route,e.tid]))),mn=Object.fromEntries(Object.values(pn).map((e=>[e.icon,e.link]))),gn=async()=>{if(document.getElementById("be-category-icons"))return;const{default:e}=await Promise.resolve().then(n.bind(n,382));document.body.insertAdjacentHTML("beforeend",e)};var bn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"translate-container"},[e.working||e.translated?e._e():n("div",{staticClass:"translate",on:{click:function(t){return e.translate()}}},[n("VIcon",{attrs:{size:14,icon:"mdi-earth"}}),e._v("翻译\n ")],1),e._v(" "),e.translated?n("div",{staticClass:"translated"},[n("a",{attrs:{href:e.activeTranslator&&e.activeTranslator.link,target:"_blank"}},[e._v("\n 翻译自\n ")]),e._v(" "),n("VDropdown",{attrs:{items:Object.values(e.translateProviders),value:e.activeTranslator,"key-mapper":function(e){return e.name}},on:{change:function(t){return e.changeTranslator(t)}},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[e._v("\n "+e._s(n.name)+"\n ")]}}],null,!1,1956376614)})],1):e._e(),e._v(" "),e.working?n("VIcon",{staticClass:"translating mdi-spin",attrs:{size:18,icon:"mdi-loading"}}):e._e(),e._v(" "),!e.working&&e.translated?n("div",{staticClass:"translate-result",domProps:{textContent:e._s(e.result)}}):e._e()],1)};bn._withStripped=!0;var vn=n(8494),yn=Vue.extend({components:{VDropdown:ce.VDropdown,VIcon:ce.VIcon},props:{text:{type:String,required:!0}},data:()=>({result:"",working:!1,translateProviders:vn.WK,activeTranslator:{}}),computed:{translated(){return""!==this.result}},methods:{changeTranslator(e){(0,U.getComponentSettings)("i18n").options.translator=e.name,this.translate()},async translate(){try{this.working=!0;const e=this.text.replace(/#(.+?)#/g,"");this.activeTranslator=(0,vn.Ty)();const t=this.activeTranslator;this.result=await t.translate(e)}catch(e){(0,re.logError)(e)}finally{this.working=!1}}}}),wn=n(3109),xn=n.n(wn),kn={insert:"head",singleton:!1},_n=(je()(xn(),kn),xn().locals,(0,Ue.Z)(yn,bn,[],!1,null,null,null));_n.options.__file="src/components/i18n/machine-translator/MachineTranslator.vue";var Cn=_n.exports;const Sn=e=>{void 0===e.radio&&(e.radio=!1);const{name:t,switches:i}=e,r={};return Object.entries(i).forEach((([e,{displayName:t,defaultValue:n}])=>{r[`switch-${e}`]={defaultValue:n,displayName:t,hidden:!0}})),i=>{const a=`${i.displayName}选项`,o={componentName:i.name,optionDisplayName:a};Object.assign(e,o),r[t]={defaultValue:e,displayName:a},i.options={...i.options,...r},i.widget||(i.widget={component:()=>Promise.resolve().then(n.bind(n,9560)).then((e=>e.default)),options:e});const s=i.entry;return i.entry=async(...e)=>{s?.(...e);const{name:t}=i,n=(0,U.getComponentSettings)(t).options;Object.keys(n).forEach((e=>{e.startsWith("switch-")&&(0,U.addComponentListener)(`${t}.${e}`,(n=>{document.body.classList.toggle(`${t}-${e}`,n)}),!0)}))},i}};const En={component:de,userComponent:ue,styledComponent:s,description:he,switchOptions:_,launchBar:{LaunchBar:n(8805).Z},feeds:{api:c,BangumiCard:Ze,VideoCard:Qe,ColumnCard:ot,disableProfilePopup:d,notify:u},video:{assUtils:p,playerLight:f,playerAgent:_t,videoDanmaku:h,videoInfo:m,videoQuality:g,videoContextMenu:b,videoControlBar:v,watchlater:l},live:{liveControlBar:y,liveSocket:w},utils:{commentApis:x,categories:{updater:sn,data:k}},i18N:{machineTranslator:{MachineTranslator:Cn}}};var $n=n(1773),An=n(3865),In=n(9263);const Tn={style:$n,plugin:An,data:ve,hook:In},On={ajax:C,cdnTypes:S,download:E,externalInput:$,filePicker:A,lifeCycle:I,loadingMode:T,meta:O,observer:L,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...X,constants:J,formatters:K,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Ln={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:L,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...X,...J,...K,...Y,...Q,...o,...re,...ae,...oe},ui:ce,componentApis:{...En.component,...En.userComponent,...En.styledComponent,...En.launchBar,...lodash.omit(En,"component","userComponent","styledComponent","launchBar")},pluginApis:{...Tn.style,...Tn.plugin,...Tn.data,...Tn.hook},monkeyApis:{GM_setValue:GM_setValue,GM_getValue:GM_getValue,GM_deleteValue:GM_deleteValue,GM_xmlhttpRequest:GM_xmlhttpRequest,GM_info:GM_info},lodash:lodash,Vue:Vue,sandboxWindow:window,theWorld:e=>{setTimeout((()=>{}),e)}}},595:function(e,t,n){"use strict";let i;n.d(t,{h:function(){return i}}),function(e){e.Packed="打包下载",e.Individual="单独下载"}(i||(i={}))},9356:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadPackage:function(){return l}});var i=n(595),r=n(6984),a=n(7724),o=n(2433);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l{constructor(e=[]){this.entries=e,s(this,"noEscape",!1)}add(e,t,n={}){null!=t&&this.entries.push({name:this.noEscape?e:(0,o.formatFilename)(e),data:t,options:n})}async blob(){if(0===this.entries.length)return null;if(1===this.entries.length){const{data:e}=this.entries[0];return"string"==typeof e?new Blob([e]):e}const e=new(await r.JSZipLibrary);return this.entries.forEach((({name:t,data:n,options:i})=>{e.file(t,n,i)})),e.generateAsync({type:"blob"})}async emit(e){if(0===this.entries.length)return;e&&1!==this.entries.length||(e=this.entries[0].name);if((0,a.getGeneralSettings)().downloadPackageEmitMode===i.h.Individual&&this.entries.length>1)return void await Promise.all(this.entries.map((e=>l.single(e.name,e.data,e.options))));const t=await this.blob();t&&l.download(e,t)}static download(e,t){const n=document.createElement("a"),i=URL.createObjectURL(t);l.lastPackageUrl&&URL.revokeObjectURL(l.lastPackageUrl),l.lastPackageUrl=i;const r=(0,o.formatFilename)(e);n.setAttribute("href",i),n.setAttribute("download",r),console.log("[Download file]",r),document.body.appendChild(n),n.click(),n.remove()}static async single(e,t,n={}){const i=new l;return i.add(e,t,n),i.emit()}}s(l,"lastPackageUrl","")},6522:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{parseExternalInput:function(){return parseExternalInput},batchParseCode:function(){return batchParseCode}});var _file_picker__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(9183);const parseExternalInput=async input=>{if(void 0===input){const files=await(0,_file_picker__WEBPACK_IMPORTED_MODULE_0__.pickFile)({accept:"application/json"});if(!(files.length>0))return console.error("[parseExternalInput] No file selected"),null;{const[file]=files,text=await file.text();try{return eval(`(${text})`)}catch(e){return console.error(e),null}}}else{if("string"!=typeof input)return input;try{const exports={},result=eval(input);if(Object.values(exports).length>0){const e=Object.values(exports)[0];return e}return result}catch(e){return console.error(e),null}}},batchParseCode=async inputs=>{try{const exports={},result=inputs.map((input=>eval(input)));if(Object.values(exports).length>0){const{coreApis:e}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,5842));return Object.values(exports).map((t=>"function"==typeof t?t(e):t))}return result}catch(e){return console.error(e),null}}},9183:function(e,t,n){"use strict";let i,r;n.r(t),n.d(t,{pickFile:function(){return o}});const a={accept:"*",multiple:!1},o=async(e=a)=>{const{accept:t,multiple:n}={...a,...e};i||(i=document.createElement("input"),i.type="file",i.style.display="none",document.body.appendChild(i),i.addEventListener("change",(()=>{r?.([...i.files]),r=null}))),i.accept=t,i.multiple=n,i.value="",r&&r([]);return await new Promise((e=>{r=e,i.click()}))}},3575:function(e,t,n){"use strict";n.r(t),n.d(t,{tryParseZip:function(){return s},installFeatureFromCode:function(){return l},installFeature:function(){return c}});var i=n(559),r=n(9263),a=n(3865),o=n(1773);const s=async e=>{const{JSZipLibrary:t}=await Promise.resolve().then(n.bind(n,6984)),{monkey:i}=await Promise.resolve().then(n.bind(n,6773)),r=e.endsWith(".zip"),a=r?"blob":"text",o=await i({url:e,method:"GET",responseType:a});if(!r||"string"==typeof o)return o;const s=await t,l=await s.loadAsync(o),c=Object.values(l.files);if(0===c.length)throw new Error("Empty zip file");return c[0].async("text")},l=async(e,t)=>{const{parseExternalInput:s}=await Promise.resolve().then(n.bind(n,6522)),l=await s(e),{type:c,installer:d}=(()=>{if((e=>"entry"in e)(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>"setup"in e)(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>"style"in e)(l))return{type:"style",installer:()=>(0,o.installStyle)(e)};throw new Error("无效的功能代码")})(),{before:u,after:p}=(0,r.getHook)(`user${lodash.startCase(c)}s.add`,e,t);await u();const f=await d();return await p(f.metadata),f},c=async e=>{const t=await s(e);return l(t,e)}},5527:function(e,t,n){"use strict";n.r(t),n.d(t,{headLoaded:function(){return r},contentLoaded:function(){return a},fullyLoaded:function(){return o},LifeCycleEventTypes:function(){return s},raiseLifeCycleEvent:function(){return l}});var i=n(9017);const r=e=>new Promise((t=>{if(null!==document.head)t(e());else{const[n]=(0,i.childList)(document.documentElement,(()=>{null!==document.head&&(n.disconnect(),t(e()))}))}})),a=e=>new Promise((t=>{"loading"!==document.readyState?t(e()):document.addEventListener("DOMContentLoaded",(()=>t(e())))})),o=e=>new Promise((t=>{"complete"===document.readyState?t(e()):unsafeWindow.addEventListener("load",(()=>t(e())))}));let s;!function(e){e.Start="be:start",e.StyleLoaded="be:style-loaded",e.ComponentsLoaded="be:components-loaded",e.End="be:end"}(s||(s={}));const l=e=>{unsafeWindow.dispatchEvent(new CustomEvent(e))}},4327:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{LoadingMode:function(){return i}}),function(e){e.Delay="延后",e.Race="同时"}(i||(i={}))},7601:function(e,t,n){"use strict";n.r(t),n.d(t,{branches:function(){return a},meta:function(){return s}});var i=JSON.parse('{"version":"2.0.4","author":"Grant Howard, Coulomb-G","copyright":"[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)","licence":"MIT","match":"*://*.bilibili.com/*","exclude":["*://api.bilibili.com/*","*://api.*.bilibili.com/*","*://*.bilibili.com/api/*","*://member.bilibili.com/studio/bs-editor/*","*://t.bilibili.com/h5/dynamic/specification","*://bbq.bilibili.com/*"],"run-at":"document-start","supportURL":"https://github.com/the1812/Bilibili-Evolved/issues","homepage":"https://github.com/the1812/Bilibili-Evolved","grant":["unsafeWindow","GM_getValue","GM_setValue","GM_deleteValue","GM_info","GM_xmlhttpRequest"],"connect":["raw.githubusercontent.com","github.com","cdn.jsdelivr.net","cn.bing.com","www.bing.com","translate.google.cn","translate.google.com","localhost","*"],"require":["https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"],"icon":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo-small.png","icon64":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo.png"}'),r=n(4011);i.copyright=i.copyright.replace(/\[year\]/g,(new Date).getFullYear().toString());const a={stable:"v2",preview:"preview"},o={commitHash:"87be51e9960458e7f4755307485078d08edf3c95",branch:"preview",nearestTag:"v2.0.4-preview",versionWithTag:"v2.0.4-preview-1-g87be51e99"},s={compilationInfo:o,name:GM_info.script.name,description:GM_info.script.description,get originalFilename(){const{branch:e}=o;return e===a.stable?"bilibili-evolved.user.js":`bilibili-evolved.${e}.user.js`},get updateURL(){return`${r.cdnRoots.jsDelivr(o.branch)}dist/${this.originalFilename}`},get downloadURL(){return this.updateURL},...i}},9017:function(e,t,n){"use strict";n.r(t),n.d(t,{childList:function(){return l},childListSubtree:function(){return c},attributes:function(){return d},attributesSubtree:function(){return u},characterData:function(){return p},characterDataSubtree:function(){return f},allMutationsOn:function(){return h},allMutations:function(){return g},visible:function(){return v},visibleInside:function(){return y},sizeChange:function(){return w},urlChange:function(){return k},videoChange:function(){return S}});var i=n(4742),r=n(4402),a=n(6363);const o=e=>"string"==typeof e?(0,i.dqa)(e):Array.isArray(e)?e:[e],s=(e,t,n)=>{const i=new MutationObserver(n);return e.forEach((e=>i.observe(e,t))),n([],i),[i,t]},l=(e,t)=>s(o(e),{childList:!0,subtree:!1,attributes:!1},t),c=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!1},t),d=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!0},t),u=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!0},t),p=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!1,characterData:!0},t),f=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!1,characterData:!0},t),h=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!0,characterData:!0},t),m={observer:null,config:null,callbacks:[]},g=e=>{if(m.observer)m.callbacks.push(e);else{m.callbacks.push(e);const[t,n]=h(document.body,(e=>m.callbacks.forEach((t=>t(e,m.observer)))));m.observer=t,m.config=n}return m},b=(e,t,n)=>{const i=new IntersectionObserver(n,t);return e.forEach((e=>i.observe(e))),[i,t]},v=(e,t)=>b(o(e),{},t),y=(e,t,n,i)=>b(o(e),{root:t,rootMargin:n},i),w=(e,t)=>((e,t,n)=>{const i=new ResizeObserver(n);return e.forEach((e=>i.observe(e,t))),[i,t]})(o(e),{box:"border-box"},t),x=lodash.once((()=>{let e=document.URL;g((()=>{e!==document.URL&&((()=>{const e=new CustomEvent("urlChange",{detail:document.URL});window.dispatchEvent(e)})(),e=document.URL)}))})),k=(e,t)=>{x(),e(document.URL),window.addEventListener("urlChange",(()=>e(document.URL)),t)},_=lodash.once((()=>(0,r.select)((()=>{if(unsafeWindow.cid)return unsafeWindow.cid;if(unsafeWindow.player&&unsafeWindow.player.getVideoMessage){const e=unsafeWindow.player.getVideoMessage();return Number.isNaN(e.cid)?null:(!unsafeWindow.aid&&e.aid&&(unsafeWindow.aid=e.aid.toString()),!unsafeWindow.bvid&&e.bvid&&(unsafeWindow.bvid=e.bvid),e.cid.toString())}return null}))));let C=!1;const S=async(e,t)=>{if(!(0,a.matchCurrentPage)(a.playerUrls))return!1;const{bpxPlayerPolyfill:i}=await Promise.resolve().then(n.bind(n,1479));i();const r=await _();if(null===r)return!1;const o=()=>({aid:unsafeWindow.aid,cid:unsafeWindow.cid});if(!C){let e=r;Object.defineProperty(unsafeWindow,"cid",{get:()=>e,set(t){e=t,Array.isArray(t)||(()=>{const e=o(),t=new CustomEvent("videoChange",{detail:e});window.dispatchEvent(t)})()}}),C=!0}return e(o()),window.addEventListener("videoChange",(t=>e(t.detail)),t),!0}},2428:function(e,t,n){"use strict";n.r(t),n.d(t,{componentLoadTime:function(){return i},componentResolveTime:function(){return r},componentLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,7724));if(!t().devMode)return;const a=e.entry;e.entry=async e=>{const{metadata:t}=e,n=performance.now();let o=a(e);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(t,s-n),r.set(t,l-n),o}}},2053:function(e,t,n){"use strict";n.r(t),n.d(t,{pluginLoadTime:function(){return i},pluginResolveTime:function(){return r},pluginLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,7724));if(!t().devMode)return;const a=e.setup;e.setup=async t=>{const n=performance.now();let o=a(t);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(e,s-n),r.set(e,l-n),o}}},5878:function(e,t,n){"use strict";n.r(t),n.d(t,{promiseLoadTime:function(){return i},promiseResolveTime:function(){return r},promiseLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async(e,t)=>{const{getGeneralSettings:a}=await Promise.resolve().then(n.bind(n,7724));if(!a().devMode)return t();const o=performance.now(),s=t(),l=performance.now(),c=await s,d=performance.now();return i.set({name:e},l-o),r.set({name:e},d-o),c}},9821:function(e,t,n){"use strict";n.r(t),n.d(t,{logStats:function(){return i}});const i=(e,t)=>{const n=[...t.entries()],i=n.reduce(((e,t)=>e+t[1]),0);console.groupCollapsed(`${e} time:`,Math.round(100*i)/100+"ms",`for ${n.length} items`),n.forEach((([e,t])=>{console.log(`%c${e.name} %c${Math.round(100*t)/100}ms ${Math.round(t/i*1e4)/100}% %c`,"color: #00A0D8","color: #888","color: unset")})),console.groupEnd()}},6984:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RuntimeLibrary:function(){return RuntimeLibrary},protobufLibrary:function(){return protobufLibrary},JSZipLibrary:function(){return JSZipLibrary},SortableJSLibrary:function(){return SortableJSLibrary}});var _ajax__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6773);function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class RuntimeLibrary{constructor(e){this.config=e,_defineProperty(this,"modulePromise",void 0)}async then(resolve,reject){try{const{url:url,getModule:getModule}=this.config;this.modulePromise||(this.modulePromise=(async()=>{console.log(`[Runtime Library] Start download from ${url}`);const code=await(0,_ajax__WEBPACK_IMPORTED_MODULE_0__.monkey)({url:url});return console.log(`[Runtime Library] Downloaded from ${url} , length = ${code.length}`),function runEval(){return eval(code);// eslint-disable-next-line no-extra-bind }.bind(window)(),getModule(window)})());const library=await this.modulePromise;return resolve(library)}catch(e){throw reject(e),e}}}const protobufLibrary=new RuntimeLibrary({url:"https://cdn.jsdelivr.net/npm/protobufjs@6.10.1/dist/light/protobuf.min.js",getModule:e=>e.protobuf}),JSZipLibrary=new RuntimeLibrary({url:"https://cdn.jsdelivr.net/npm/jszip@3.7.1/dist/jszip.min.js",getModule:e=>e.JSZip}),SortableJSLibrary=new RuntimeLibrary({url:"https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js",getModule:e=>e.Sortable})},4576:function(e,t,n){"use strict";n.r(t),n.d(t,{componentOptionsToSettings:function(){return o},componentToSettings:function(){return s},isUserComponent:function(){return l},isUserPlugin:function(){return c},getComponentSettings:function(){return u},getGeneralSettings:function(){return p},isComponentEnabled:function(){return f}});var i=n(6087),r=n(7724),a=n(4742);const o=e=>lodash.fromPairs(Object.entries(e).map((([e,t])=>[e,t.defaultValue]))),s=e=>({enabled:e.enabledByDefault??!0,options:e.options?o(e.options):{}}),l=e=>{const t="string"==typeof e?e:e.name;return Boolean(r.settings.userComponents[t])},c=e=>{const t="string"==typeof e?e:e.name;return Boolean(r.settings.userPlugins[t])},d={enabled:!1,options:new Proxy({},{get:()=>!1})},u=e=>{if("string"==typeof e){const t=i.componentsMap[e];if(void 0===t)return r.settings.components.settingsPanel.options.devMode&&console.warn("No settings found for component:",e),d;e=t}if(l(e)){const{name:t}=e;return r.settings.userComponents[t]?.settings??d}return r.settings.components[e.name]},p=()=>u("settingsPanel").options,f=e=>("string"==typeof e&&(e=i.componentsMap[e]),(!e.urlExclude||!e.urlExclude.some(a.matchUrlPattern))&&((!e.urlInclude||!e.urlInclude.every(lodash.negate(a.matchUrlPattern)))&&(!1===e.configurable?e.enabledByDefault??!0:u(e).enabled)))},7724:function(e,t,n){"use strict";n.r(t),n.d(t,{isProxy:function(){return c},createProxy:function(){return d},defaultSettings:function(){return u},addSettingsChangeListener:function(){return p},removeSettingsChangeListener:function(){return f},addComponentListener:function(){return m},removeComponentListener:function(){return g},settings:function(){return b},componentOptionsToSettings:function(){return a.componentOptionsToSettings},componentToSettings:function(){return a.componentToSettings},getComponentSettings:function(){return a.getComponentSettings},getGeneralSettings:function(){return a.getGeneralSettings},isComponentEnabled:function(){return a.isComponentEnabled},isUserComponent:function(){return a.isUserComponent},isUserPlugin:function(){return a.isUserPlugin}});var i=n(6087),r=n(3865),a=n(4576);let o={userStyles:{},userPlugins:{},userComponents:{},components:{},plugins:{}},s=!1;const l=new Map,c=Symbol("isProxy"),d=(e,t)=>{const n=(e,i,r=[])=>{for(const[t,a]of Object.entries(e))"object"!=typeof a||a instanceof RegExp||(e[t]=n(a,i||t,[...r,t]));return new Proxy(e,{get:(e,t)=>t===c||e[t],set(e,a,o){"object"!=typeof o||o instanceof RegExp||!0===o[c]||(o=n(o,i||a,[...r,a]));const s=e[a];return e[a]=o,t(o,s,i||a,[...r,a]),!0},deleteProperty(e,n){const a=e[n];return delete e[n],t(void 0,a,i||n,[...r,n]),!0}})};return n(e)};r.plugins.forEach((e=>{o.plugins[e.name]=!0})),i.components.forEach((e=>{o.components[e.name]=(0,a.componentToSettings)(e)}));const u=lodash.cloneDeep(o);o=d((e=>{for(const[t,n]of Object.entries(e)){let i;const r=GM_getValue(t,n);i="object"==typeof r?lodash.defaultsDeep(r,n):r,e[t]=i}return e})(o),((e,t,n,i=[])=>{if(s){GM_setValue(n.toString(),o[n.toString()]);const r=i.join(".");if(i.length>1){const e=i.slice(0,i.length-1).join("."),t=lodash.get(o,e);if(Array.isArray(t)||lodash.isPlainObject(t)){l.get(e)?.forEach((e=>e(t,null,n,i)))}}l.get(r)?.forEach((r=>r(e,t,n,i)))}}));for(const[e,t]of Object.entries(o))GM_setValue(e,t);const p=(e,t,n=!1)=>{const i=l.get(e);if(i?i.push(t):l.set(e,[t]),n){const n=lodash.get(o,e);t(n,n,"",[])}},f=(e,t)=>{const n=l.get(e);if(!n)return;const i=n.indexOf(t);-1!==i&&n.splice(i,1)},h=e=>{const[t,n]=e.split(".");return(0,a.isUserComponent)(t)?void 0===n?`userComponents.${t}.settings.enabled`:`userComponents.${t}.settings.options.${n}`:void 0===n?`components.${t}.enabled`:`components.${t}.options.${n}`},m=(e,t,n=!1)=>{p(h(e),t,n)},g=(e,t)=>{f(h(e),t)};s=!0;const b=o},4402:function(e,t,n){"use strict";n.r(t),n.d(t,{sq:function(){return o},select:function(){return c},selectLazy:function(){return d},selectAll:function(){return f},selectAllLazy:function(){return h},count:function(){return m},hasVideo:function(){return b}});var i=n(9017),r=n(4742);const a={maxRetry:15,queryInterval:1e3},o=(e,t=(e=>Boolean(e)),n=a)=>{const i={...a,...n};return new Promise((n=>{let a=null,o=0;const s=()=>{n(a)},l=()=>{o>i.maxRetry?n(null):(a=e(),!0===t(a,s)?n(a):setTimeout((()=>{"undefined"!=typeof document?(0,r.waitForForeground)((()=>{o++,l()})):l()}),i.queryInterval))};l()}))},s=new Map,l=(e,t)=>{let n;if("string"==typeof e){if(s.has(e))return s.get(e);n=()=>document.querySelector((0,r.bwpVideoFilter)(e))}else n=e;const i=t(n);if("string"==typeof e){const t=i.then((t=>(s.delete(e),t)));return s.set(e,t),t}return i},c=(e,t)=>l(e,(e=>o(e,(e=>null!=e),t))),d=e=>l(e,(e=>new Promise((t=>{(0,i.allMutations)((()=>{const n=e();null!=n&&t(n)}))})))),u=new Map,p=(e,t)=>{let n;if("string"==typeof e){if(u.has(e))return u.get(e);n=()=>Array.from(document.querySelectorAll((0,r.bwpVideoFilter)(e)))}else n=e;const i=e=>null===e?[]:e,a=t(n);if("string"==typeof e){const t=a.then((t=>(u.delete(e),i(t))));return u.set(e,t),t}return a.then((e=>i(e)))},f=(e,t)=>p(e,(e=>o(e,(e=>e.length>0),t))),h=e=>p(e,(e=>new Promise((t=>{(0,i.allMutations)((()=>{const n=e();null!=n&&t(n)}))})))),m=(e,t,n)=>o(e,(e=>e.length===t),n);let g;const b=async()=>{g||(g=new Promise((e=>(0,i.videoChange)((()=>e(unsafeWindow.cid))))));const e=await g;return Boolean(e)}},9261:function(e,t,n){"use strict";n.r(t),n.d(t,{getDefaultStyleID:function(){return r},addStyle:function(){return a},addImportantStyle:function(){return o},removeStyle:function(){return s},loadInstantStyle:function(){return l},preloadStyles:function(){return c},loadAllCustomStyles:function(){return d}});var i=n(5527);const r=e=>e.replace(/([a-z][A-Z])/g,(e=>`${e[0]}-${e[1].toLowerCase()}`)),a=(e,t,n)=>{const i=t?r(t):null,a=dq(`#${i}`);if(!a||!t){const t=document.createElement("style");return t.id=i,t.textContent=e,(n||document.head).insertAdjacentElement("beforeend",t),t}return a},o=(e,t)=>a(e,t,document.body),s=(...e)=>{e.forEach((e=>{const t=r(e);dqa(`#${t}`).forEach((e=>e.remove()))}))},l=async(e,t={head:document.head,body:document.body})=>{e.instantStyles?.forEach((async e=>{const n=document.createElement("style");if(n.id=r(e.name),"string"==typeof e.style)n.textContent=e.style;else{const{default:t}=await e.style();n.textContent=t}e.important?t.body.appendChild(n):t.head.appendChild(n)}))},c=lodash.once((async()=>{const{LoadingMode:e}=await Promise.resolve().then(n.bind(n,4327)),{addHook:t}=await Promise.resolve().then(n.bind(n,9263)),{getGeneralSettings:a,settings:o,isComponentEnabled:c,isUserComponent:d,addComponentListener:u,removeComponentListener:p}=await Promise.resolve().then(n.bind(n,7724)),f=async()=>{const{components:e}=await Promise.resolve().then(n.bind(n,6087)),a=document.createDocumentFragment(),f=document.createDocumentFragment();await Promise.all(e.map((e=>{const n=t=>t?l(e):e.instantStyles?.forEach((e=>s(e.name)));if(u(e.name,n),d(e)&&t("userComponents.remove",{after:t=>{t.name===e.name&&p(e.name,n)}}),c(e))return l(e,{head:a,body:f})})));const{UserStyleMode:h}=await Promise.resolve().then(n.bind(n,1773));Object.values(o.userStyles).filter((e=>e.mode===h.Instant)).forEach((e=>{const t=document.createElement("style");t.id=r(e.name),t.textContent=e.style,a.appendChild(t)})),document.head.appendChild(a),(0,i.contentLoaded)((()=>document.body.appendChild(f)))};a().styleLoadingMode===e.Delay?await(0,i.contentLoaded)(f):await f(),(0,i.contentLoaded)((async()=>{const{initColors:e}=await Promise.resolve().then(n.bind(n,8232)),{initMdiStyle:t}=await Promise.resolve().then(n.bind(n,3673));document.head.appendChild(e()),document.head.appendChild(t())}))})),d=async()=>{const{settings:e}=await Promise.resolve().then(n.bind(n,7724)),{UserStyleMode:t}=await Promise.resolve().then(n.bind(n,1773));(0,i.contentLoaded)((()=>{Object.values(e.userStyles).filter((e=>e.mode===t.Important)).forEach((e=>{a(e.style,e.name,document.body)}))})),Object.values(e.userStyles).filter((e=>e.mode===t.Default)).forEach((e=>{a(e.style,e.name,document.head)}))}},4659:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{TextColor:function(){return i}}),function(e){e.Auto="自动",e.White="白色",e.Black="黑色"}(i||(i={}))},8232:function(e,t,n){"use strict";n.r(t),n.d(t,{initColors:function(){return l}});var i=n(6767),r=n.n(i),a=n(7724);const o=(e,t)=>{const n=t.hue()-e.hue(),i=100*((t.saturationv()-e.saturationv())/100+1),r=e=>Math.round(10*e)/10;return`hue-rotate(${r(n)}deg) saturate(${r(i)}%)`};var s=n(4659);const l=()=>{const e=document.createElement("style"),t=new Map,n=(e,n)=>{t.set(e,n)},i=lodash.debounce((()=>{e.textContent=`\n html {\n ${[...t.entries()].map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `.trim()}),100);return(0,a.addComponentListener)("settingsPanel.themeColor",(e=>{n("--theme-color",e);for(let t=10;t<=90;t+=10){const i=r()(e,"hex");n(`--theme-color-${t}`,i.alpha(t/100).rgb().string()),n(`--theme-color-lightness-${t}`,i.lightness(t).rgb().toString())}n("--pink-image-filter",o(r()({r:251,g:113,b:152},"rgb"),r()(e,"hex"))),n("--blue-image-filter",o(r()({r:0,g:160,b:213},"rgb"),r()(e,"hex"))),i()}),!0),(0,a.addComponentListener)("settingsPanel.accentColor",(e=>{n("--accent-color",e),i()}),!0),(0,a.addComponentListener)("settingsPanel.textColor",(e=>{let t;t=e===s.TextColor.Auto?r()(a.settings.themeColor).isLight()?"black":"white":e===s.TextColor.Black?"black":"white",n("--text-color",t),n("--foreground-color",t),n("--foreground-color-d",r()(t,"keyword").alpha(.875).rgb().string()),n("--foreground-color-b",r()(t,"keyword").alpha(.75).rgb().string()),n("--brightness",("black"===t?"100":"0")+"%"),n("--invert-filter","black"===t?"invert(0)":"invert(1)"),i()}),!0),e}},3446:function(e,t,n){"use strict";n.r(t),n.d(t,{Toast:function(){return b},ToastType:function(){return m}});var i=n(4742),r=n(3449),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition-group",{staticClass:"toast-card-container",attrs:{name:"toast-card-container",tag:"div"}},e._l(e.cards,(function(e){return n("ToastCard",{key:e.key,attrs:{"data-key":e.key,card:e}})})),1)};a._withStripped=!0;var o=Vue.extend({components:{ToastCard:()=>Promise.resolve().then(n.bind(n,5971)).then((e=>e.default))},data:()=>({cards:[]})}),s=n(3379),l=n.n(s),c=n(9164),d=n.n(c),u={insert:"head",singleton:!1},p=(l()(d(),u),d().locals,(0,n(1900).Z)(o,a,[],!1,null,null,null));p.options.__file="src/core/toast/ToastCardContainer.vue";var f=p.exports;function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let m,g;!function(e){e.Default="default",e.Info="info",e.Success="success",e.Error="error"}(m||(m={}));class b{constructor(e="",t="",n=m.Default){this.message=e,this.title=t,this.type=n,h(this,"durationNumber",3e3),h(this,"durationTimeout",0),h(this,"creationTime",Number(new Date)),h(this,"randomKey",Math.floor(Math.random()*(Number.MAX_SAFE_INTEGER+1)))}static get containerVM(){return g||b.createToastContainer(),g}static createToastContainer(){dq(".toast-card-container")||(g=(0,i.mountVueComponent)(f),document.body.insertAdjacentElement("beforeend",g.$el))}get element(){return dq(`.toast-card[data-key='${this.key}']`)}get key(){return`${this.creationTime}[${this.randomKey}]`}get duration(){return this.durationNumber}set duration(e){this.durationNumber=e,this.durationTimeout&&this.clearDuration(),this.setDuration()}show(){b.containerVM.cards.unshift(this),this.setDuration()}dismiss(){b.containerVM.cards.includes(this)&&b.containerVM.cards.splice(b.containerVM.cards.indexOf(this),1),this.clearDuration()}setDuration(){void 0!==this.durationNumber&&(this.durationTimeout=window.setTimeout((()=>this.dismiss()),this.durationNumber))}clearDuration(){window.clearTimeout(this.durationTimeout),this.durationTimeout=0}static internalShow(e,t,n,i){const r=new b(e,t,i);return r.duration=n,r.show(),r}static show(e,t,n){return this.internalShow(e,t,n,m.Default)}static info(e,t,n){return this.internalShow(e,t,n,m.Info)}static success(e,t,n){return this.internalShow(e,t,n,m.Success)}static error(e,t,n){return this.internalShow(e,t,n,m.Error)}static mini(...e){return(0,r.$)(...e)}}},3449:function(e,t,n){"use strict";function i(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function a(e){var t=r(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function o(e){return e instanceof r(e).Element||e instanceof Element}function s(e){return e instanceof r(e).HTMLElement||e instanceof HTMLElement}function l(e){return"undefined"!=typeof ShadowRoot&&(e instanceof r(e).ShadowRoot||e instanceof ShadowRoot)}function c(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function u(e){return i(d(e)).left+a(e).scrollLeft}function p(e){return r(e).getComputedStyle(e)}function f(e){var t=p(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function h(e,t,n){void 0===n&&(n=!1);var o,l,p=d(t),h=i(e),m=s(t),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(m||!m&&!n)&&(("body"!==c(t)||f(p))&&(g=(o=t)!==r(o)&&s(o)?{scrollLeft:(l=o).scrollLeft,scrollTop:l.scrollTop}:a(o)),s(t)?((b=i(t)).x+=t.clientLeft,b.y+=t.clientTop):p&&(b.x=u(p))),{x:h.left+g.scrollLeft-b.x,y:h.top+g.scrollTop-b.y,width:h.width,height:h.height}}function m(e){var t=i(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function g(e){return"html"===c(e)?e:e.assignedSlot||e.parentNode||(l(e)?e.host:null)||d(e)}function b(e){return["html","body","#document"].indexOf(c(e))>=0?e.ownerDocument.body:s(e)&&f(e)?e:b(g(e))}function v(e,t){var n;void 0===t&&(t=[]);var i=b(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),o=r(i),s=a?[o].concat(o.visualViewport||[],f(i)?i:[]):i,l=t.concat(s);return a?l:l.concat(v(g(s)))}function y(e){return["table","td","th"].indexOf(c(e))>=0}function w(e){return s(e)&&"fixed"!==p(e).position?e.offsetParent:null}function x(e){for(var t=r(e),n=w(e);n&&y(n)&&"static"===p(n).position;)n=w(n);return n&&("html"===c(n)||"body"===c(n)&&"static"===p(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===p(e).position)return null;for(var n=g(e);s(n)&&["html","body"].indexOf(c(n))<0;){var i=p(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}n.d(t,{$:function(){return st}});var k="top",_="bottom",C="right",S="left",E="auto",$=[k,_,C,S],A="start",I="end",T="viewport",O="popper",L=$.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+I])}),[]),M=[].concat($,[E]).reduce((function(e,t){return e.concat([t,t+"-"+A,t+"-"+I])}),[]),P=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function z(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}var D={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function U(e){var t,n=e.reference,i=e.element,r=e.placement,a=r?q(r):null,o=r?F(r):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case k:t={x:s,y:n.y-i.height};break;case _:t={x:s,y:n.y+n.height};break;case C:t={x:n.x+n.width,y:l};break;case S:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?R(a):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case A:t[c]=t[c]-(n[d]/2-i[d]/2);break;case I:t[c]=t[c]+(n[d]/2-i[d]/2)}}return t}// eslint-disable-next-line import/no-unused-modules diff --git a/dist/bilibili-evolved.user.js b/dist/bilibili-evolved.user.js index b8d272455..af143b656 100644 --- a/dist/bilibili-evolved.user.js +++ b/dist/bilibili-evolved.user.js @@ -52,7 +52,7 @@ getPlayerConfig(e){return lodash.get(JSON.parse(localStorage.getItem("bilibili_p // eslint-disable-next-line class-methods-use-this get nativeApi(){return unsafeWindow.player}isMute(){return this.nativeApi?this.nativeApi.isMute():null}changeVolume(e){if(!this.nativeApi)return null;const t=this.nativeApi.volume();return this.nativeApi.volume(t+e/100),Math.round(100*this.nativeApi.volume())}seek(e){return this.nativeApi?(this.nativeApi.play(),setTimeout((()=>{this.nativeApi.seek(e);const t=dq(".bilibili-player-video-toast-bottom .bilibili-player-video-toast-item:first-child .bilibili-player-video-toast-item-text span:nth-child(2)");t&&(t.textContent=" 00:00")})),this.nativeApi.getCurrentTime()):null}changeTime(e){if(!this.nativeApi)return null;const t=this.query.video.element.sync();return t?(this.nativeApi.seek(t.currentTime+e,t.paused),this.nativeApi.getCurrentTime()):null}async toggleLight(e){const t=await this.query.control.settings.lightOff();t.checked=!e,(0,r.raiseEvent)(t,"change")}}class f extends p{constructor(){super(),s(this,"type","bwp"),this.query.video.element=l(".bilibili-player-video bwp-video")}}class h extends u{constructor(){super(),s(this,"type","bangumi"),s(this,"query",c({playerWrap:".player-module",bilibiliPlayer:".bpx-player-container",playerArea:".bpx-player-primary-area",video:{element:".bpx-player-video-wrap video",wrap:".bpx-player-video-area",top:".bpx-player-top-wrap",state:".bpx-player-state-wrap",panel:".bpx-player-ending-panel",popup:".bpx-player-dialog-wrap",subtitle:".bpx-player-subtitle-wrap",basDanmaku:".bpx-player-bas-dm-wrap",advDanmaku:".bpx-player-adv-dm-wrap",danmaku:".bpx-player-row-dm-wrap",container:".bpx-player-video-wrap"},control:{element:".squirtle-controller",wrap:".bpx-player-control-wrap",mask:".bpx-player-control-mask",top:".bpx-player-control-top",progress:".squirtle-progress-wrap",bottom:".squirtle-controller-wrap",bottomLeft:".squirtle-controller-wrap-left",bottomCenter:".squirtle-controller-wrap-center",bottomRight:".squirtle-controller-wrap-right",buttons:{start:".squirtle-video-start",next:".squirtle-video-next",time:".squirtle-time-wrap",quality:".squirtle-video-quality",pageList:".squirtle-video-pagelist",speed:".squirtle-video-speed",subtitle:".squirtle-video-subtitle",volume:".squirtle-video-volume .squirtle-volume-icon",settings:".squirtle-video-setting",pip:".squirtle-video-pip",widescreen:".squirtle-video-widescreen",webFullscreen:".squirtle-video-pagefullscreen",fullscreen:".squirtle-video-fullscreen"},settings:{wrap:".squirtle-setting-wrap",lightOff:".squirtle-lightoff"}},toastWrap:".bpx-player-tooltip-area",danmakuTipLayer:".bpx-player-dialog-wrap",danmakuSwitch:".bpx-player-dm-switch input"})),(0,o.bpxPlayerPolyfill)()}isMute(){return this.query.control.buttons.volume.sync()?.classList.contains("squirtle-volume-mute-state")??!1}changeVolume(e){const t=this.query.video.element.sync();return t?(t.volume=lodash.clamp(t.volume+e/100,0,1),Math.round(100*t.volume)):null}seek(e){const t=this.query.video.element.sync();return t?(t.play(),setTimeout((()=>{t.currentTime=lodash.clamp(e,0,t.duration);const n=dq(".bpx-player-toast-row .bpx-player-toast-item .bpx-player-toast-text");n?.textContent?.startsWith("已为您定位至")&&(n.textContent="已为您定位至00:00")})),t.currentTime):null}changeTime(e){const t=this.query.video.element.sync();return t?(t.currentTime=lodash.clamp(t.currentTime+e,0,t.duration),t.currentTime):null}toggleLight(e){const t=this.query.control.settings.lightOff.sync(),n=!t.classList.contains("active")&&!e,i=t.classList.contains("active")&&e;(n||i)&&t.dispatchEvent(new MouseEvent("click"))}}const m=(0,a.matchCurrentPage)(a.bangumiUrls)?new h:(0,r.isBwpVideo)()?new f:new p},7195:function(e,t,n){"use strict";n.r(t),n.d(t,{getBlob:function(){return s},getBlobWithCredentials:function(){return l},getText:function(){return d},getTextWithCredentials:function(){return u},getJson:function(){return h},getJsonWithCredentials:function(){return m},postText:function(){return g},postTextWithCredentials:function(){return b},postJson:function(){return v},postJsonWithCredentials:function(){return y},monkey:function(){return w},responsiveGetPages:function(){return x},getPages:function(){return k},bilibiliApi:function(){return _}});var i=n(2264);const r=e=>{const t=new XMLHttpRequest,{isText:n=!0,body:i}=e(t);return new Promise(((e,r)=>{t.addEventListener("load",(()=>e(n?t.responseText:t.response))),t.addEventListener("error",(()=>r(t.status))),t.send(i)}))},a=e=>t=>(t.withCredentials=!0,e(t)),o=e=>t=>(t.responseType="blob",t.open("GET",e),{isText:!1}),s=e=>r(o(e)),l=e=>r(a(o(e))),c=e=>t=>(t.responseType="text",t.open("GET",e),{isText:!0}),d=e=>r(c(e)),u=e=>r(a(c(e))),p=e=>t=>(t.responseType="json",t.open("GET",e),{isText:!1}),f=e=>"string"==typeof e?JSON.parse(e):e,h=async e=>{const t=await r(p(e));return f(t)},m=async e=>{const t=await r(a(p(e)));return f(t)},g=(e,t)=>r((n=>(n.open("POST",e),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),{isText:!1,body:t}))),b=(e,t)=>r((n=>(n.open("POST",e),n.withCredentials=!0,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),{isText:!1,body:t}))),v=(e,t)=>r((n=>(n.open("POST",e),n.setRequestHeader("Content-Type","application/json"),{isText:!1,body:JSON.stringify(t)}))),y=(e,t)=>r((n=>(n.open("POST",e),n.withCredentials=!0,n.setRequestHeader("Content-Type","application/json"),{isText:!1,body:JSON.stringify(t)}))),w=e=>new Promise(((t,n)=>{const i={...e,onload:e=>t(e.response),onerror:e=>{const t={...JSON.parse(JSON.stringify(e)),toString(){return JSON.stringify(this)}};n(t)}};"method"in i||(i.method="GET"),GM_xmlhttpRequest(i)})),x=e=>{let t;const n=new Promise((n=>{t=new Promise((t=>{(async()=>{const{api:i,getList:r,getTotal:a}=e;let o=1,s=1/0;const l=[];for(;l.length{const[,t]=x(e);return await t},_=async(e,t)=>{const n=await e;if(0!==n.code){const e=new Error(`${t}: code = ${n.code}, message = ${n.message||n.msg}`);throw(0,i.logError)(e),e}return n.data||{}}},2462:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{CdnTypes:function(){return i},cdnRoots:function(){return a}}),function(e){e.jsDelivr="jsDelivr",e.GitHub="GitHub"}(i||(i={}));const r="the1812",a={jsDelivr:(e,t)=>`https://cdn.jsdelivr.net/gh/${t||r}/Bilibili-Evolved@${e}/`,GitHub:(e,t)=>`https://raw.githubusercontent.com/${t||r}/Bilibili-Evolved/${e}/`}},9388:function(e,t,n){"use strict";n.r(t),n.d(t,{coreApis:function(){return On},externalApis:function(){return Ln}});var i={};n.r(i),n.d(i,{Reorder:function(){return N},ReorderDecreaseClassName:function(){return P},ReorderEnabledClassName:function(){return D},ReorderIncreaseClassName:function(){return z},ReorderOrientations:function(){return B},ReorderingClassName:function(){return V}});var r={};n.r(r),n.d(r,{getUserInfo:function(){return Z}});var a={};n.r(a),n.d(a,{CompareResult:function(){return W},Version:function(){return G}});var o={};n.r(o),n.d(o,{loadDanmakuSettingsPanel:function(){return ne},loadLazyPanel:function(){return ee},loadLazyPlayerSettingsPanel:function(){return te},loadSubtitleSettingsPanel:function(){return ie}});var s={};n.r(s),n.d(s,{styledComponentEntry:function(){return pe},toggleStyle:function(){return fe}});var l={};n.r(l),n.d(l,{getWatchlaterList:function(){return ge},toggleWatchlater:function(){return be},watchlaterList:function(){return me}});var c={};n.r(c),n.d(c,{addMenuItem:function(){return De},applyContentFilter:function(){return Le},bangumiTypeList:function(){return we},feedsCardTypes:function(){return ye},feedsCardsManager:function(){return $e},forEachFeedsCard:function(){return Ae},getFeeds:function(){return ze},getVideoFeeds:function(){return Pe},groupVideoFeeds:function(){return Ie},isPreOrderedVideo:function(){return Te},navbarFeedsTypeList:function(){return xe},withContentFilter:function(){return Me}});var d={};n.r(d),n.d(d,{disableProfilePopup:function(){return lt}});var u={};n.r(u),n.d(u,{compareID:function(){return ut},getLatestID:function(){return dt},getNotifyCount:function(){return mt},isNewID:function(){return ft},setLatestID:function(){return pt},updateInterval:function(){return ct},updateLatestID:function(){return ht}});var p={};n.r(p),n.d(p,{convertHexColorForDialogue:function(){return bt},convertHexColorForStyle:function(){return vt},convertTimeByDuration:function(){return wt},convertTimeByEndTime:function(){return xt},normalizeContent:function(){return kt}});var f={};n.r(f),n.d(f,{lightOff:function(){return Et},lightOn:function(){return St}});var h={};n.r(h),n.d(h,{forEachVideoDanmaku:function(){return It}});var m={};n.r(m),n.d(m,{BangumiInfo:function(){return Lt},VideoInfo:function(){return Ot}});var g={};n.r(g),n.d(g,{allQualities:function(){return zt},loginRequiredQualities:function(){return Mt},vipRequiredQualities:function(){return Pt}});var b={};n.r(b),n.d(b,{addMenuItem:function(){return Vt},forEachContextMenu:function(){return Dt}});var v={};n.r(v),n.d(v,{addControlBarButton:function(){return qt}});var y={};n.r(y),n.d(y,{waitForControlBar:function(){return Ft}});var w={};n.r(w),n.d(w,{LiveSocket:function(){return Xt}});var x={};n.r(x),n.d(x,{addMenuItem:function(){return on},commentAreas:function(){return Jt},forEachCommentArea:function(){return rn},forEachCommentItem:function(){return an}});var k={};n.r(k),n.d(k,{addCategoryIcons:function(){return gn},categories:function(){return fn},categoryCodes:function(){return hn},categoryLinks:function(){return mn},rawData:function(){return ln}});var _={};n.r(_),n.d(_,{createSwitchOptions:function(){return Sn}});var C=n(7195),S=n(2462),E=n(4114),$=n(7731),A=n(7590),I=n(7177),T=n(4345),O=n(1836),L=n(3420);function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P="reorder-decrease",z="reorder-increase",D="reorder-enabled",V="reordering",B={horizontal:{name:"horizontal",getMoveTransform:e=>`translateX(${e}px)`,setOtherTransform:lodash.throttle(((e,t,n)=>{if(!t.classList.contains(V))return;const i=e.find((e=>e.element===t));if(!i)return;const r=i.rect,a=e.filter((e=>e.rect.leftt.rect.left-e.rect.left)),o=e.filter((e=>e.rect.left>r.left)).sort(((e,t)=>e.rect.left-t.rect.left));if(n>=0){const[e]=o;a.forEach((e=>{e.element.style.transform="",e.element.classList.remove(z)})),o.forEach((t=>{r.left+n+r.width>=t.rect.left+t.rect.width/2?(t.element.classList.add(P),t.element.style.transform=`translateX(-${e.rect.left-r.left}px)`):(t.element.classList.remove(P),t.element.style.transform="")}))}else{const[e]=a;o.forEach((e=>{e.element.style.transform="",e.element.classList.remove(P)})),a.forEach((t=>{r.left+n<=t.rect.left+t.rect.width/2?(t.element.classList.add(z),t.element.style.transform=`translateX(${r.left+r.width-e.rect.left-e.rect.width}px)`):(t.element.classList.remove(z),t.element.style.transform="")}))}}),50)},vertical:{name:"vertical",getMoveTransform:(e,t)=>`translateY(${t}px)`,setOtherTransform:lodash.throttle(((e,t,n,i)=>{if(!t.classList.contains(V))return;const r=e.find((e=>e.element===t));if(!r)return;const a=r.rect,o=e.filter((e=>e.rect.topt.rect.top-e.rect.top)),s=e.filter((e=>e.rect.top>a.top)).sort(((e,t)=>e.rect.top-t.rect.top));if(i>=0){const[e]=s;o.forEach((e=>{e.element.style.transform="",e.element.classList.remove(z)})),s.forEach((t=>{a.top+i+a.height>=t.rect.top+t.rect.height/2?(t.element.classList.add(P),t.element.style.transform=`translateY(-${e.rect.top-a.top}px)`):(t.element.classList.remove(P),t.element.style.transform="")}))}else{const[e]=o;s.forEach((e=>{e.element.style.transform="",e.element.classList.remove(P)})),o.forEach((t=>{a.top+i<=t.rect.top+t.rect.height/2?(t.element.classList.add(z),t.element.style.transform=`translateY(${a.top+a.height-e.rect.top-e.rect.height}px)`):(t.element.classList.remove(z),t.element.style.transform="")}))}}),50)}};class N extends EventTarget{constructor(e){super(),this.container=e,M(this,"orientation",B.horizontal),M(this,"enabled",!1),M(this,"children",void 0),M(this,"snapshots",new Map),M(this,"attachedEvents",[]),this.children=[...this.container.children],this.children.every((e=>""===e.style.order))&&this.children.forEach(((e,t)=>{e.style.order=(t+1).toString()}))}addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.addEventListener(e,t,n)}getOrderMap(){return new Map(this.children.map((e=>[e,parseInt(e.style.order)])))}toggle(){this.enabled?this.disable():this.enable()}generateSnapshots(){this.children.forEach((e=>{this.snapshots.set(e,{element:e,rect:e.getBoundingClientRect()})}))}enable(){this.children.forEach((e=>{let t=0,n=0,i=!1;e.classList.add(D);(()=>{const r=(r,a)=>{e.classList.add(V),e.style.transition="none",e.style.userSelect="none",this.generateSnapshots(),this.children.filter((t=>t!==e)).forEach((e=>{e.style.transition="transform .2s ease-out"})),t=r,n=a,i=!0},a=e=>{r(e.screenX,e.screenY)};e.addEventListener("mousedown",a),this.attachedEvents.push((()=>e.removeEventListener("mousedown",a)));const o=e=>{if(1!==e.touches.length)return;const[t]=e.touches;r(t.screenX,t.screenY)};e.addEventListener("touchstart",o),this.attachedEvents.push((()=>e.removeEventListener("touchstart",o)))})(),(()=>{const r=(i,r)=>{const a=i-t,o=r-n;e.style.transform=this.orientation.getMoveTransform(a,o),this.orientation.setOtherTransform([...this.snapshots.values()],e,a,o)},a=e=>{i&&(r(e.screenX,e.screenY),e.cancelable&&e.preventDefault())};document.addEventListener("mousemove",a),this.attachedEvents.push((()=>document.removeEventListener("mousemove",a)));const o=e=>{if(!i)return;if(1!==e.touches.length)return;const[t]=e.touches;r(t.screenX,t.screenY),e.cancelable&&e.preventDefault()};e.addEventListener("touchmove",o,{passive:!1}),this.attachedEvents.push((()=>e.removeEventListener("touchmove",o)))})(),(()=>{const t=()=>{if(!i)return;e.classList.remove(V),i=!1;let t=0;const n=this.children.filter((t=>t!==e)),r=[];n.forEach((e=>{e.style.transform="",e.style.transition="",e.classList.contains(z)?(t--,e.style.order=(parseInt(e.style.order)+1).toString(),e.classList.remove(z),r.push(this.snapshots.get(e))):e.classList.contains(P)&&(t++,e.style.order=(parseInt(e.style.order)-1).toString(),e.classList.remove(P),r.push(this.snapshots.get(e)))})),e.style.userSelect="",e.style.order=(parseInt(e.style.order)+t).toString(),e.style.transform="",e.style.transition="",this.dispatchEvent(new CustomEvent("reorder",{detail:this.children.map((e=>({element:e,order:parseInt(e.style.order)})))}))};document.addEventListener("mouseup",t),this.attachedEvents.push((()=>document.removeEventListener("mouseup",t))),e.addEventListener("touchend",t),this.attachedEvents.push((()=>e.removeEventListener("touchend",t)))})()})),this.enabled=!0}disable(){this.attachedEvents.forEach((e=>e())),this.children.forEach((e=>e.classList.remove(D))),this.enabled=!1}}var j=n(391),q=n(5550),F=n(6182),R=n(6314),U=n(6171);const H={isLogin:!1},Z=lodash.once((async()=>{const{getUID:e}=await Promise.resolve().then(n.bind(n,1906));if(!e())return H;const{getJsonWithCredentials:t}=await Promise.resolve().then(n.bind(n,7195)),i=await t("https://api.bilibili.com/x/web-interface/nav");return 0!==i.code&&-101!==i.code?(console.warn("[store.fetchUserInfo] API Error",i.message),H):i.data}));let W;!function(e){e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e[e.Incomparable=NaN]="Incomparable"}(W||(W={}));class G{constructor(e){var t,n,i;if(this.versionString=e,i=void 0,(n="parts")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,!/^[\d\.]+$/.test(e))throw new Error("Invalid version string");this.parts=e.split(".").map((e=>parseInt(e)))}compareTo(e){for(let t=0;te.parts[t]?W.Greater:W.Less}return this.parts.length!==e.parts.length?W.Less:W.Equal}greaterThan(e){return this.compareTo(e)===W.Greater}lessThan(e){return this.compareTo(e)===W.Less}equals(e){return this.compareTo(e)===W.Equal}}var X=n(1906),J=n(2121),K=n(3708),Y=n(53),Q=n(5106);const ee=async(e,t={})=>{const{style:n,enterDelay:i=750,leaveDelay:r=1e3}=t,a=await(0,q.select)(e);if(!a)throw new Error(`lazy panel failed! selector = ${e}`);let o;return void 0!==n&&(o=document.createElement("style"),o.textContent=n,document.body.insertAdjacentElement("beforeend",o)),(0,X.raiseEvent)(a,"mouseover"),await(0,X.delay)(i),(0,X.raiseEvent)(a,"mouseout"),setTimeout((()=>o?.remove()),r),a},te=async(e,t,n={})=>{await ee(e,{style:`${t} { display: none !important; }`,...n});const i=(0,X.dq)(t);if(!i)throw new Error(`lazy player settings panel failed! panelSelector = ${t}`);return i},ne=()=>te(".bilibili-player-video-danmaku-setting",".bilibili-player-video-danmaku-setting-wrap"),ie=()=>te(".bilibili-player-video-btn-subtitle",".bilibili-player-video-subtitle-setting-wrap",{style:".bilibili-player-video-subtitle-setting-wrap, .bilibili-player-video-subtitle { display: none }"});var re=n(2264),ae=n(5945),oe=n(7735),se=n(5683),le=n(8208),ce=n(3923),de=n(8171),ue=n(7010);const pe=(e,t)=>async i=>{const{default:r}=await e(),{addStyle:a}=await Promise.resolve().then(n.bind(n,6182));return a(r,i.metadata.name),t(i)},fe=(e,t,i=X.none)=>{let r=null;const a=async()=>{if(r)return;const{default:i}=await t(),{addStyle:a}=await Promise.resolve().then(n.bind(n,6182));r=a(i,e)};return{name:e,entry:e=>a().then((()=>i(e))),reload:a,unload:()=>{r?.remove(),r=null}}};var he=n(5143);const me=[];async function ge(e=!1){const{getJsonWithCredentials:t}=await Promise.resolve().then(n.bind(n,7195)),i=await t("https://api.bilibili.com/x/v2/history/toview/web");if(0!==i.code)throw new Error(`获取稍后再看列表失败: ${i.message}`);if(!i.data.list)return lodash.pullAll(me,me),[];const r=i.data.list,a=r.filter((e=>!me.find((t=>t===e.aid)))),o=me.filter((e=>!r.find((t=>t.aid===e))));return lodash.pullAll(me,o),me.push(...a.map((e=>e.aid))),e?r:r.map((e=>e.aid))}const be=async(e,t)=>{const i=parseInt(e.toString());if(Number.isNaN(i))return;void 0===t&&(t=!me.includes(i));const r=t?"https://api.bilibili.com/x/v2/history/toview/add":"https://api.bilibili.com/x/v2/history/toview/del",{getCsrf:a}=await Promise.resolve().then(n.bind(n,1906)),o=a(),{postTextWithCredentials:s}=await Promise.resolve().then(n.bind(n,7195)),l=await s(r,`aid=${e}&csrf=${o}`),c=JSON.parse(l);if(0!==c.code)throw new Error(`稍后再看操作失败: ${c.message}`);t?me.push(i):lodash.pull(me,i)};requestIdleCallback((async()=>{const{getUID:e}=await Promise.resolve().then(n.bind(n,1906));e()&&ge()}));var ve=n(950);const ye={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"},liveRecord:{id:2047,name:"开播记录"}},we="512,4097,4098,4099,4100,4101",xe="8,64,512,4097,4098,4099,4100,4101";function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=e=>e.querySelector(".repost")?ye.repost:e.querySelector(".imagesbox")?ye.textWithImages:e.querySelector(".video-container")?ye.video:e.querySelector(".bangumi-container")?ye.bangumi:e.querySelector(".article-container")?ye.column:e.querySelector(".music-container")?ye.audio:e.querySelector(".h5share-container")?ye.share:e.querySelector(".vc-ctnr")?ye.miniVideo:e.querySelector(".live-container")?ye.liveRecord:ye.text,Ce=[],Se="feeds.manager.listAdaptors";(0,ve.addData)(Se,(e=>{e.push({name:"live",match:[...oe.liveUrls],watchCardsList:async e=>{const t=await(0,q.select)(".room-feed");if(!t)return!1;console.log("live watch");let n=null;return(0,L.childList)(t,(async()=>{if(dq(".room-feed-content")){const t=await(0,q.select)(".room-feed-content .content");n?.disconnect(),[n]=e.updateCards(t)}else n?.disconnect(),n=null,await Promise.all(e.cards.map((e=>e.element)).map((t=>e.removeCard(t))))})),!0}},{name:"space",match:["https://space.bilibili.com/"],watchCardsList:async e=>{const t=await(0,q.select)(".s-space");if(!t)return!1;const n={},i=()=>n.listElement&&n.observer?(console.log("space feeds stop"),n.observer?.then((e=>e.disconnect())),delete n.observer,delete n.listElement,Promise.all(e.cards.map((e=>e.element)).map((t=>e.removeCard(t))))):[],r=()=>{if(n.observer)return n.observer;const t=(0,q.select)(".feed-card .content");return n.observer=(async()=>{const a=await t;a!==await n.listElement&&(n.listElement&&await i(),n.listElement=t,r()),console.log("space feeds start");const[o]=e.updateCards(a);return o})(),n.observer};return(0,L.childListSubtree)(t,(async()=>{dq(".feed-card .content")?r():i()})),!0}},{name:"topic",match:["https://t.bilibili.com/topic"],watchCardsList:async e=>{const t=await(0,q.select)(".page-container");if(!t)return!1;let n=null;return(0,L.childList)(t,(async()=>{if(dq(".page-container .feed")){const t=await(0,q.select)(".feed .feed-topic");n?.disconnect(),[n]=e.updateCards(t)}else n?.disconnect(),n=null,await Promise.all(e.cards.map((e=>e.element)).map((t=>e.removeCard(t))))})),!0}},{name:"default",match:["https://t.bilibili.com/"],watchCardsList:async e=>{const t=await(0,q.select)(".feed-card .content, .detail-content .detail-card");return!!t&&(e.updateCards(t),!0)}})}));class Ee extends EventTarget{constructor(...e){super(...e),ke(this,"watching",!1),ke(this,"cards",[])}addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}async addCard(e){if(e&&e instanceof HTMLElement&&e.classList.contains("card"))if(null!==e.querySelector(".skeleton")){const[t]=(0,L.childList)(e,(()=>{null===e.querySelector(".skeleton")&&(t.disconnect(),this.addCard(e))}))}else{if(null===e.parentNode)return;const t=await Ee.parseCard(e);if(!t.presented)return;if(this.cards.find((e=>e.id===t.id)))return;this.cards.push(t),this.cards.sort(((e,t)=>e.id===t.id?0:e.id>t.id?-1:1));const n=new CustomEvent("addCard",{detail:t});this.dispatchEvent(n),Ce.forEach((e=>e.added(t)))}}async removeCard(e){if(e&&e instanceof HTMLElement&&e.classList.contains("card")){const t=e.getAttribute("data-did"),n=this.cards.findIndex((e=>e.id===t));if(-1===n)return;const i=this.cards[n];this.cards.splice(n,1);const r=new CustomEvent("removeCard",{detail:i});this.dispatchEvent(r),Ce.forEach((e=>e.removed(i)))}}static async parseCard(e){ // eslint-disable-next-line no-underscore-dangle -const t=e=>e.__vue__||e.parentElement.__vue__,n=async t=>{const n=await(0,q.sq)((()=>e.querySelector(t)),(t=>null!==t||null===e.parentNode),{queryInterval:100});if(null===e.parentNode)return"";if(null===n)return console.warn(e,t,e.parentNode),"";return n.innerText.trim()},i=e=>{if(void 0===e.card.origin)return{originalText:"",originalDescription:"",originalTitle:""};const t=JSON.parse(e.card.origin);return{originalText:e.originCardData.pureText,originalDescription:lodash.get(t,"item.description",lodash.get(t,"desc","")),originalTitle:t.title}},r=async e=>{const t=parseInt(await n(e));return isNaN(t)?0:t},a={id:e.getAttribute("data-did"),username:await n(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:_e(e),get presented(){return null!==e.parentNode},async getText(){const n=await(async n=>{if(n===ye.bangumi)return"";const r=await(0,q.sq)((()=>e),(n=>Boolean(t(n)||!e.parentNode)),{queryInterval:100});if(null===e.parentNode)return"";if(null===r)return console.warn(r,e,t(r),e.parentNode),"";const a=t(r);if(n===ye.repost){const e=a.card.item.content,t=i(a);return[e,...Object.values(t).filter((e=>""!==e))].filter((e=>Boolean(e))).join("\n")}return[a.originCardData.pureText,a.originCardData.title].filter((e=>Boolean(e))).join("\n")})(this.type);return this.text=n,n}};if(await a.getText(),e.setAttribute("data-type",a.type.id.toString()),(e=>e.type===ye.repost)(a)){const n=a.username,r=t(a.element),o=lodash.get(r,"card.origin_user.info.uname","");n===o&&e.setAttribute("data-self-repost","true"),a.repostUsername=o,a.repostText=i(r).originalText}return a}updateCards(e){const t=".card[data-did]",n=e=>{if(e instanceof HTMLElement){if(e.matches(t))return e;const n=e.querySelector(t);if(n)return n}};return[...e.querySelectorAll(t)].forEach((e=>this.addCard(e))),(0,L.childList)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>this.addCard(n(e)))),e.removedNodes.forEach((e=>this.removeCard(n(e))))}))}))}async startWatching(){if(this.watching)return!0;this.watching=!0;const[e]=(0,ve.registerAndGetData)(Se,[]),t=e.find((e=>e.match.some((e=>(0,X.matchUrlPattern)(e)))));return t?t.watchCardsList(this):(console.warn("[FeedsCardsManager] No adaptor found",e),!1)}}const $e=new Ee,Ae=e=>{(async()=>{if(!await $e.startWatching())return void console.error("feedsCardsManager.startWatching() failed");const{added:t}=e;t&&$e.cards.forEach((e=>t(e))),Ce.push({added:none,removed:none,...e})})()},Ie=e=>{const t=lodash.groupBy(e,(e=>e.aid)),n=e=>({id:e.upID,name:e.upName,faceUrl:e.upFaceUrl});return Object.values(t).map((e=>{if(1===e.length)return e[0];const[t,...i]=e;return t.cooperation=[n(t),...i.map(n)],console.log([...t.cooperation]),t})).sort((0,ae.descendingStringSort)((e=>e.id)))},Te=e=>1===lodash.get(e,"extra.is_reserve_recall",0),Oe="feeds.contentFilters";(0,ve.registerData)(Oe,[]);const Le=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Me=e=>(...t)=>e(...t).then((e=>Le(e))),Pe=Me((async(e="video")=>{if(!(0,X.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${"video"===e?8:512}`);if(0!==t.code)throw new Error(t.message);const n=t.data.cards,i=n.filter((e=>!Te(JSON.parse(e.card))));return"video"===e?Ie(n.map((e=>{const t=JSON.parse(e.card),n=lodash.get(e,"display.topic_info.topic_details",[]).map((e=>({id:e.topic_id,name:e.topic_name})));return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(1e3*e.timestamp),topics:n,dynamic:t.dynamic,like:(0,K.formatCount)(e.desc.like),duration:t.duration,durationText:(0,K.formatDuration)(t.duration,0),playCount:(0,K.formatCount)(t.stat.view),danmakuCount:(0,K.formatCount)(t.stat.danmaku),watchlater:me.includes(t.aid)}}))):"bangumi"===e?i.map((e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(1e3*e.timestamp),like:(0,K.formatCount)(e.desc.like),durationText:"",playCount:(0,K.formatCount)(t.play_count),danmakuCount:(0,K.formatCount)(t.bullet_count),watchlater:!1}})):[]})),ze=async(e,t)=>{if("string"==typeof e)return(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${e}`);const n=e.id.toString();let i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,X.getUID)()}&offset_dynamic_id=${t}&type=${n}`),(0,C.getJsonWithCredentials)(i)},De=(e,t)=>{const n=dq(e.element,".more-panel"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("p");o.classList.add("child-button","c-pointer",i),o.textContent=r;[...new Set([...n.children].map((e=>e.getAttributeNames().filter((e=>e.startsWith("data-v-"))))).flat())].forEach((e=>o.setAttribute(e,""))),o.addEventListener("click",(t=>{a(t),e.element.click()})),n.appendChild(o)};var Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"bangumi-card",class:{new:e.isNew},attrs:{target:"_blank",href:e.data.url}},[n("div",{staticClass:"ep-cover-container"},[n("DpiImage",{staticClass:"ep-cover",attrs:{size:{width:100},src:e.data.epCoverUrl}})],1),e._v(" "),n("h1",{staticClass:"ep-title",attrs:{title:e.data.epTitle}},[e._v(e._s(e.data.epTitle))]),e._v(" "),n("div",{staticClass:"up",attrs:{title:e.data.title}},[n("DpiImage",{staticClass:"cover",attrs:{size:24,src:e.data.coverUrl}}),e._v(" "),n("div",{staticClass:"title"},[e._v(e._s(e.data.title))])],1)])};Ve._withStripped=!0;var Be=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),Ne=n(3379),je=n.n(Ne),qe=n(5478),Fe=n.n(qe),Re={insert:"head",singleton:!1},Ue=(je()(Fe(),Re),Fe().locals,n(1900)),He=(0,Ue.Z)(Be,Ve,[],!1,null,"3bc2da4f",null);He.options.__file="src/components/feeds/BangumiCard.vue";var Ze=He.exports,We=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"video-card",class:{vertical:"vertical"===e.orientation,"no-stats":!e.showStats},attrs:{target:"_blank",href:e.epID?"https://www.bilibili.com/bangumi/play/ep"+e.epID:"https://www.bilibili.com/"+e.bvid}},[n("div",{staticClass:"cover-container"},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{height:120,width:200}}}),e._v(" "),e.isNew?n("div",{staticClass:"new"},[e._v("NEW")]):e._e(),e._v(" "),e.pubTime&&e.pubTimeText?[n("div",{staticClass:"publish-time-summary"},[e._v("\n "+e._s(e.pubTimeText)+"\n ")]),e._v(" "),n("div",{staticClass:"publish-time-detail"},[e._v("\n "+e._s(e.pubTime)+"\n ")])]:e._e(),e._v(" "),e.durationText?n("div",{staticClass:"duration"},[e._v(e._s(e.durationText))]):e._e(),e._v(" "),e.durationText&&null!==e.watchlater&&void 0!==e.watchlater?n("div",{staticClass:"watchlater",on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.toggleWatchlater(e.aid)}}},[n("VIcon",{attrs:{size:15,icon:e.watchlater?"mdi-check-circle":"mdi-clock-outline"}}),e._v("\n "+e._s(e.watchlater?"已添加":"稍后再看")+"\n ")],1):e._e()],2),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.title}},[e._v(e._s(e.title))]),e._v(" "),e.topics&&e.topics.length?n("div",{staticClass:"topics"},e._l(e.topics.slice(0,3),(function(t){return n("a",{key:t.id,staticClass:"topic",attrs:{target:"_blank",href:"https://t.bilibili.com/topic/name/"+t.name+"/feed"}},[e._v("#"+e._s(t.name)+"#")])})),0):n("p",{staticClass:"description",attrs:{title:e.description}},[e._v(e._s(e.description))]),e._v(" "),0===e.cooperation.length?n("a",{staticClass:"up",class:{"no-face":!e.upFaceUrl},attrs:{target:"_blank",href:e.upID?"https://space.bilibili.com/"+e.upID:null}},[e.upFaceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.upFaceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}}),e._v(" "),n("div",{staticClass:"name",attrs:{title:e.upName}},[e._v(e._s(e.upName))])],1):e._e(),e._v(" "),0!==e.cooperation.length?n("div",{staticClass:"cooperation"},[n("div",{staticClass:"cooperation-ups"},e._l(e.reversedCooperation,(function(e){return n("a",{key:e.id,staticClass:"cooperation-up",class:{"no-face":!e.faceUrl},attrs:{target:"_blank",title:e.name,href:e.id?"https://space.bilibili.com/"+e.id:null}},[e.faceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.faceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}})],1)})),0),e._v(" "),n("div",{staticClass:"cooperation-note"},[e._v("\n 联合投稿\n ")])]):e._e(),e._v(" "),e.showStats?n("div",{staticClass:"stats"},[e.like&&!e.vertical?[n("VIcon",{attrs:{icon:"like-outline",size:18}}),e._v("\n "+e._s(e.like)+"\n ")]:e._e(),e._v(" "),e.coins&&!e.vertical?[n("VIcon",{attrs:{icon:"coin-outline",size:18}}),e._v("\n "+e._s(e.coins)+"\n ")]:e._e(),e._v(" "),e.favorites?[n("VIcon",{attrs:{icon:"favorites-outline",size:18}}),e._v("\n "+e._s(e.favorites)+"\n ")]:e._e(),e._v(" "),e.playCount?[n("VIcon",{attrs:{icon:"play",size:18}}),e._v("\n "+e._s(e.playCount)+"\n ")]:e._e(),e._v(" "),e.danmakuCount?[n("VIcon",{attrs:{icon:"danmaku",size:18}}),e._v("\n "+e._s(e.danmakuCount)+"\n ")]:e._e()],2):e._e()])};We._withStripped=!0;var Ge={components:{DpiImage:ce.DpiImage,VIcon:ce.VIcon},props:{data:{type:Object,required:!0},orientation:{type:String,default:"horizontal"},showStats:{type:Boolean,default:!0},isNew:{type:Boolean,default:!1}},data(){return{watchlaterList:me,upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,cooperation:[],...lodash.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return"vertical"===this.orientation},watchlater(){return(0,X.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Xe=n(1745),Je=n.n(Xe),Ke={insert:"head",singleton:!1},Ye=(je()(Je(),Ke),Je().locals,(0,Ue.Z)(Ge,We,[],!1,null,"0ffa1cb1",null));Ye.options.__file="src/components/feeds/VideoCard.vue";var Qe=Ye.exports,et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"column-card",attrs:{target:"_blank",href:"https://www.bilibili.com/read/cv"+e.data.cvID}},[n("div",{staticClass:"covers"},e._l(e.data.covers,(function(e){return n("DpiImage",{key:e,staticClass:"cover",attrs:{size:{height:120},src:e}})})),1),e._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.data.upID}},[n("DpiImage",{staticClass:"face",attrs:{size:24,src:e.data.upFaceUrl}}),e._v(" "),n("div",{staticClass:"name"},[e._v(e._s(e.data.upName))])],1),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.data.title}},[e._v(e._s(e.data.title))]),e._v(" "),n("div",{staticClass:"description",attrs:{title:e.data.description}},[e._v(e._s(e.data.description))])])};et._withStripped=!0;var tt=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),nt=n(620),it=n.n(nt),rt={insert:"head",singleton:!1},at=(je()(it(),rt),it().locals,(0,Ue.Z)(tt,et,[],!1,null,null,null));at.options.__file="src/components/feeds/ColumnCard.vue";var ot=at.exports;let st=!1;const lt=()=>{"https://t.bilibili.com/"===document.URL.replace(window.location.search,"")&&(async()=>{const{select:e}=await Promise.resolve().then(n.bind(n,5550)),t=await e(".live-up-list");if(null!==t){const{getComponentSettings:e}=await Promise.resolve().then(n.bind(n,6171));if(st)return;const i=e("fixedSidebars"),r=e("extendFeedsLive");t.addEventListener("mouseenter",(e=>{(i.enabled||r.enabled)&&e.stopImmediatePropagation()}),{capture:!0}),st=!0}})()},ct=3e5,dt=()=>(0,X.getCookieValue)(`bp_t_offset_${(0,X.getUID)()}`),ut=(e,t)=>e===t?0:e.length>t.length?1:t.length>e.length?-1:e>t==!0?1:-1,pt=e=>{if(null==e)return;const t=dt();ut(e,t)<0||(document.cookie=`bp_t_offset_${(0,X.getUID)()}=${e};path=/;domain=.bilibili.com;max-age=2592000`)},ft=e=>ut(e,dt())>0,ht=e=>{const[t]=[...e.map((e=>e.id))].sort(ut).reverse();pt(t)},mt=async e=>{const t=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${(0,X.getUID)()}&update_num_dy_id=${dt()}&type_list=${e||xe}`,n=await(0,C.getJsonWithCredentials)(t);return 0!==n.code?0:lodash.get(n,"data.update_num",0)},gt=e=>{e.startsWith("#")&&(e=e.substring(1));return{red:e.substring(0,2),green:e.substring(2,4),blue:e.substring(4,6)}},bt=e=>{const{red:t,green:n,blue:i}=gt(e);return`\\c&H${i}${n}${t}&`.toUpperCase()},vt=(e,t=1)=>{const{red:n,green:i,blue:r}=gt(e);return`&H${Math.round(255*(1-t)).toString(16).padStart(2,"0")}${r}${i}${n}`.toUpperCase()},yt=e=>{let t=0,n=0;for(;e>=60;)e-=60,n++;for(;n>=60;)n-=60,t++;return`${t}:${String(n).padStart(2,"0")}:${(e=>{const[t,n="00"]=String(e).split(".");return`${t.padStart(2,"0")}.${n.substr(0,2).padEnd(2,"0")}`})(e)}`},wt=(e,t)=>[yt(e),yt(e+t)],xt=(e,t)=>[yt(e),yt(t)],kt=e=>{const t={"{":"{","}":"}","&":"&","<":"<",">":">",""":'"',"'":"'","\n":"\\N"};for(const[n,i]of Object.entries(t))e=e.replace(new RegExp(n,"g"),i);return e};var _t=n(7412);const Ct=e=>oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:X.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,L.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,L.childListSubtree)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement,i=At.find((e=>e.element===n));if(!i)return;return i.text=e.textContent||"",i.reuse=!0,void(t.added&&t.added(i))}if(!(e instanceof HTMLElement))return;const n={element:i=e,reuse:!1,text:i.textContent||""};var i;At.push(n),t.added&&t.added(n)})),e.removedNodes.forEach((e=>{if(!(e instanceof HTMLElement))return;const n=At.findIndex((t=>t.element===e));if(-1!==n){const[e]=At.splice(n,1);t.removed&&t.removed(e)}}))}))}))})(t,e)}))};function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ot{constructor(e){Tt(this,"aid",void 0),Tt(this,"cid",void 0),Tt(this,"pageCount",void 0),Tt(this,"coverUrl",void 0),Tt(this,"tagId",void 0),Tt(this,"tagName",void 0),Tt(this,"title",void 0),Tt(this,"description",void 0),Tt(this,"up",void 0),Tt(this,"pages",void 0),Tt(this,"subtitles",void 0),this.aid=e}async fetchInfo(){let e;e=this.cid?`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`:`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`;const t=await(0,C.getJson)(e);if(0!==t.code)throw new Error(t.message);const{data:n}=t;return this.cid=n.cid,this.pageCount=n.videos,this.coverUrl=n.pic.replace("http:","https:"),this.tagId=n.tid,this.tagName=n.tname,this.title=n.title,this.description=n.desc,this.up={uid:n.owner.mid,name:n.owner.name,faceUrl:n.owner.face.replace("http:","https:")},this.pages=n.pages.map((e=>({cid:e.cid,title:e.part,pageNumber:e.page}))),this.subtitles=n.subtitle.list.map((e=>({id:e.id,languageCode:e.lan,language:e.lan_doc,url:e.subtitle_url.replace("http:","https:")}))),this}}class Lt{constructor(e){Tt(this,"ep",void 0),Tt(this,"videos",void 0),Tt(this,"title",void 0),Tt(this,"cover",void 0),Tt(this,"squareCover",void 0),Tt(this,"aid",void 0),Tt(this,"cid",void 0),this.ep=e,this.videos=[]}async fetchInfo(){const e=await(0,C.getText)(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`),t=JSON.parse(e.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);return this.title=t.mediaInfo.title,this.cover=t.mediaInfo.cover,this.squareCover=t.mediaInfo.square_cover,this.aid=t.epInfo.aid,this.cid=t.epInfo.cid,this.videos=t.epList.map((async e=>({title:e.index_title,aid:e.aid,cid:e.cid,info:await new Ot(e.aid).fetchInfo()}))),this}}const Mt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"HDR",displayName:"真彩 HDR",value:125},{name:"4K",displayName:"超清 4K",value:120},{name:"1080P60",displayName:"高清 1080P60",value:116},{name:"1080P+",displayName:"高清 1080P+",value:112},{name:"720P60",displayName:"高清 720P60",value:74}],zt=[...Pt,...Mt,{name:"480P",displayName:"清晰 480P",value:32},{name:"360P",displayName:"流畅 360P",value:16}].sort((0,ae.descendingSort)((e=>e.value))),Dt=async e=>{const{open:t,close:n}=e;if(!(0,q.hasVideo)())return;const i=await(0,q.select)(".bilibili-player");if(!i)return;const[r]=(0,L.childList)(i,(()=>{const e=dq(".bilibili-player-context-menu-origin");if(e){r.disconnect();const i=dq(e,"ul"),a={containerElement:e,listElement:i,get itemElements(){return dqa(e,".context-menu-function")},get isOpen(){return e.classList.contains("active")}};(0,L.childList)(i,(()=>{a.isOpen?t?.(a):n?.(a)}))}}))},Vt=async(e,t)=>Dt({open:t=>{if(t.listElement.contains(e))return;const n=document.createElement("li");n.classList.add("context-line","context-menu-function"),n.setAttribute("data-append","1");const i=document.createElement("a");i.classList.add("context-menu-a","js-action"),i.href="javascript:void(0);",i.appendChild(e),n.addEventListener("mouseover",(()=>n.classList.add("hover"))),n.addEventListener("mouseout",(()=>n.classList.remove("hover"))),n.appendChild(i),t.listElement.appendChild(n)},close:e=>t?.(e)});let Bt;const Nt=[],jt=lodash.once((async()=>{oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))&&(0,L.videoChange)((async()=>{const{playerAgent:e}=await Promise.resolve().then(n.bind(n,7412)),t=await e.query.control.buttons.time();if(null===t||null!==t.parentElement?.querySelector(".be-video-control-bar-extend"))return;const i=await Promise.resolve().then(n.bind(n,135)).then((e=>e.default));Bt=new i({propsData:{items:Nt}}).$mount(),t.insertAdjacentElement("afterend",Bt.$el)}))})),qt=async e=>{Bt||await jt(),Nt.push(e)},Ft=async e=>{if(!oe.liveUrls.some((e=>(0,X.matchUrlPattern)(e))))return;const t=await(0,q.select)(".bilibili-live-player-video-controller, .web-player-controller-wrap:not(.web-player-controller-bg)");if(!t)return;const{init:n,callback:i}=e;n?.(t),(0,L.childList)(t,(async()=>{const e=dq(t,".control-area");e&&i?.(e)}))};function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ut=0,Ht=2,Zt={heartBeat:2,heartBeatResponse:3,message:5,enterRoom:7,enterRoomResponse:8};class Wt{constructor(){Rt(this,"textEncoder",new TextEncoder),Rt(this,"textDecoder",new TextDecoder)}static readInt(e,t,n){let i=0;for(let r=n-1;r>=0;r--)i+=256**(n-r-1)*e[t+r];return i}static writeInt(e,t,n,i){let r=0;for(;r{const i={packetLength:Wt.readInt(e,0,4),headerLength:Wt.readInt(e,4,2),protocolVersion:Wt.readInt(e,6,2),operation:Wt.readInt(e,8,4),sequenceID:Wt.readInt(e,12,4)},r=[i];if(i.packetLengthe.messages[0])))}else i.protocolVersion===Ut&&(i.messages=[JSON.parse(this.textDecoder.decode(r))])}else i.operation===Zt.heartBeatResponse&&(i.heartBeatResponse={count:Wt.readInt(e,16,4)});return r};return new Promise(((n,i)=>{const r=new FileReader;r.onload=async e=>{if(!e.target)return void i(e);const r=new Uint8Array(e.target.result);n(await t(r))},r.readAsArrayBuffer(e)}))}}class Gt{constructor(){Rt(this,"startTime",0)}getLiveTime(){return new Promise((e=>{if(this.startTime)return void e(this.startTime);const t=(0,X.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,L.childList)(t,(t=>{if(t.length>0&&t.some((e=>e.addedNodes.length>0&&[...e.addedNodes].every((e=>e.nodeType===Node.TEXT_NODE))))){n.disconnect();const i=t[0].addedNodes[0].textContent,[r,a,o=0]=i.split(":").reverse().map(lodash.unary(parseInt)),s=Number(new Date);this.startTime=s-1e3*o*3600-60*a*1e3-1e3*r,e(this.startTime)}}))}))}}class Xt extends EventTarget{constructor(e){super(),this.roomID=e,Rt(this,"heartBeatTimer",void 0),Rt(this,"webSocket",void 0),Rt(this,"retryInterval",200),Rt(this,"autoRetry",!0),Rt(this,"servers",["broadcastlv.chat.bilibili.com"]),Rt(this,"selectedServer",""),Rt(this,"liveTime",new Gt),Rt(this,"bufferHelper",new Wt),Rt(this,"stopRequested",!1),window.addEventListener("unload",(()=>this.stop()))}heartBeat(){this.webSocket.readyState===WebSocket.OPEN?this.webSocket.send(this.bufferHelper.encode("","heartBeat")):(this.stop(),this.restart())}restart(){if(this.dispatchEvent(new CustomEvent("restart")),!this.stopRequested&&this.autoRetry){console.log(`Live Socket: unexpected disconnect, retry in ${this.retryInterval}ms`);const e=this.servers.indexOf(this.selectedServer);ethis.start()),this.retryInterval)}}async start(){const e=await(0,C.getJson)(`https://api.live.bilibili.com/room/v1/Danmu/getConf?room_id=${this.roomID}&platform=pc&player=web`),t=lodash.get(e,"data.host_server_list",[]);this.servers=[...new Set([...this.servers,...t.map((e=>e.host))])],""===this.selectedServer&&([this.selectedServer]=this.servers,console.log("Initial server:",this.selectedServer)),this.webSocket&&[WebSocket.CONNECTING,WebSocket.OPEN].includes(this.webSocket.readyState)&&this.stop(),this.webSocket=new WebSocket(`wss://${this.selectedServer}/sub`),this.stopRequested=!1,this.dispatchEvent(new CustomEvent("start",{detail:this.webSocket})),this.webSocket.addEventListener("open",(()=>{const t={roomid:this.roomID,uid:parseInt((0,X.getUID)()),protover:2,platform:"web",clientVer:"1.10.1",type:"2",key:lodash.get(e,"data.token")};this.webSocket.send(this.bufferHelper.encode(JSON.stringify(t),"enterRoom")),this.dispatchEvent(new CustomEvent("open",{detail:t}))})),this.webSocket.addEventListener("message",(async e=>{const[t]=await this.bufferHelper.decode(e.data);switch(this.dispatchEvent(new CustomEvent("message",{detail:t})),t.operation){case Zt.enterRoomResponse:this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.heartBeatTimer=window.setInterval((()=>{this.heartBeat()}),3e4);break;case Zt.heartBeatResponse:if(!t.heartBeatResponse)break;this.dispatchEvent(new CustomEvent("heartBeatResponse",{detail:t.heartBeatResponse.count}));break;case Zt.message:{if(!t.messages)break;const e=await this.liveTime.getLiveTime();t.messages.forEach((t=>{if("DANMU_MSG"===t.cmd){const{info:n}=t,i={content:n[1],type:n[0][1],fontSize:n[0][2],color:n[0][3],sendTime:n[0][4],userHash:n[0][7],userID:n[2][0],userName:n[2][1],startTime:e,get time(){return this.sendTime-this.startTime}};this.dispatchEvent(new CustomEvent("danmaku",{detail:i}))}}));break}}})),this.webSocket.addEventListener("close",(e=>{this.stopRequested||(console.error("Live Socket: close",e),this.restart())})),this.webSocket.addEventListener("error",(e=>{console.error("Live Socket: error",e),this.restart()}))}stop(){this.stopRequested=!0,this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.webSocket&&this.webSocket.readyState===WebSocket.OPEN&&this.webSocket.close()}}const Jt=[],Kt="bb-comment",Yt=[],Qt=[],en=[],tn=e=>{const t=e.querySelector(".con .user .name"),n=e=>{const t=e.querySelector(".reply-face"),n=e.querySelector(".reply-con .user .name");return{id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:n.textContent,content:e.querySelector(".text-con").textContent,timeText:e.querySelector(".info .time").textContent,likes:parseInt(e.querySelector(".info .like span").textContent)}},i={id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".con .text").textContent,timeText:e.querySelector(".con .info .time").textContent,likes:parseInt(e.querySelector(".con .like span").textContent),replies:[]};if(dq(e,".reply-box .view-more")){const t=dq(e,".reply-box");(0,L.childList)(t,(t=>{i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Kt)){const t={element:e,items:[]};Jt.push(t),(e=>{e.observer||(e.items=(0,X.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,L.childListSubtree)(e.element,(t=>{t.forEach((t=>{const n=e=>e instanceof HTMLElement&&e.classList.contains("list-item")&&e.classList.contains("reply-wrap");t.addedNodes.forEach((t=>{if(n(t)){const n=tn(t);e.items.push(n),Yt.forEach((e=>e(n)))}})),t.removedNodes.forEach((t=>{if(n(t)){const n=t.getAttribute("data-id"),i=e.items.findIndex((e=>e.id===n));if(-1!==i){const[t]=e.items.splice(i,1);Qt.forEach((e=>e(t)))}}}))}))})))})(t),en.forEach((e=>e(t)))}};(0,I.contentLoaded)((()=>{(0,L.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,X.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Jt.forEach((t=>e(t))),en.push(e)},an=e=>{const{added:t,removed:n}=e;rn((e=>{t&&(e.items.forEach((e=>t(e))),Yt.push(t)),n&&Qt.push(n)}))},on=(e,t)=>{const n=dq(e.element,".opera-list ul"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("li");o.classList.add(i),o.textContent=r,o.addEventListener("click",(e=>{a(e)})),n.appendChild(o)};var sn=n(2149);const ln=JSON.parse('[[{"name":"首页","route":"/","tid":"","locid":23,"sub":[]},{"name":"动画","route":"douga","tid":1,"locid":52,"count":"","subMenuSize":162,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2507,"leftId":2452,"rightId":2453},"sub":[{"name":"MAD·AMV","route":"mad","tid":24,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":151},"desc":"具有一定制作程度的动画或静画的二次创作视频","url":"//www.bilibili.com/video/douga-mad-1.html"},{"name":"MMD·3D","route":"mmd","tid":25,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":152},"desc":"使用MMD(MikuMikuDance)和其他3D建模类软件制作的视频","url":"//www.bilibili.com/video/douga-mmd-1.html"},{"name":"短片·手书·配音","route":"voice","tid":47,"ps":15,"rps":10,"desc":"追求创新并具有强烈特色的短片、手书(绘)及ACG相关配音","url":"//www.bilibili.com/video/douga-voice-1.html"},{"name":"手办·模玩","route":"garage_kit","tid":210,"ps":15,"rps":10,"desc":"手办模玩的测评、改造或其他衍生内容","url":""},{"name":"特摄","route":"tokusatsu","tid":86,"ps":15,"rps":10,"desc":"特摄相关衍生视频","url":"//www.bilibili.com/video/cinephile-tokusatsu.html"},{"name":"综合","route":"other","tid":27,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":153},"desc":"以动画及动画相关内容为素材,包括但不仅限于音频替换、杂谈、排行榜等内容","url":"//www.bilibili.com/video/douga-else-1.html"}]},{"name":"番剧","route":"anime","tid":13,"url":"//www.bilibili.com/anime/","takeOvered":true,"count":"","subMenuSize":172,"combination":true,"sub":[{"name":"连载动画","tid":33,"route":"serial","desc":"当季连载的动画番剧","url":"//www.bilibili.com/video/bangumi-two-1.html"},{"name":"完结动画","tid":32,"route":"finish","desc":"已完结的动画番剧合集","url":"//www.bilibili.com/video/part-twoelement-1.html"},{"name":"资讯","tid":51,"route":"information","desc":"动画番剧相关资讯视频","url":"//www.bilibili.com/video/douga-else-information-1.html"},{"name":"官方延伸","tid":152,"route":"offical","desc":"动画番剧为主题的宣传节目、采访视频,及声优相关视频","url":"//www.bilibili.com/video/bagumi_offical_1.html"},{"name":"新番时间表","url":"//www.bilibili.com/anime/timeline/","desc":""},{"name":"番剧索引","url":"//www.bilibili.com/anime/index/","desc":""}]},{"name":"国创","tid":167,"route":"guochuang","url":"//www.bilibili.com/guochuang/","takeOvered":true,"count":"","subMenuSize":214,"combination":true,"sub":[{"name":"国产动画","tid":153,"route":"chinese","desc":"我国出品的PGC动画","url":"//www.bilibili.com/video/bangumi_chinese_1.html"},{"name":"国产原创相关","tid":168,"route":"original","desc":"","url":"//www.bilibili.com/video/guochuang-fanvid-1.html"},{"name":"布袋戏","tid":169,"route":"puppetry","desc":"","url":"//www.bilibili.com/video/glove-puppetry-1.html"},{"name":"动态漫·广播剧","tid":195,"route":"motioncomic","desc":"","url":""},{"name":"资讯","tid":170,"route":"information","desc":"","url":"//www.bilibili.com/video/guochuang-offical-1.html"},{"name":"新番时间表","url":"//www.bilibili.com/guochuang/timeline/","desc":""},{"name":"国产动画索引","url":"//www.bilibili.com/guochuang/index/","desc":""}]},{"name":"音乐","route":"music","tid":3,"locid":58,"count":"","subMenuSize":268,"slider":{"width":620,"height":220},"viewTag":true,"customComponent":{"name":"Energy","titleId":2511,"leftId":2462,"rightId":3131,"rightType":"slide"},"sub":[{"name":"原创音乐","route":"original","tid":28,"ps":15,"rps":10,"viewHotTag":true,"ad":{"active":true,"dataLocId":243},"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"个人或团队制作以音乐为主要原创因素的歌曲或纯音乐","url":"//www.bilibili.com/video/music-original-1.html"},{"name":"翻唱","route":"cover","tid":31,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":245},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"一切非官方的人声再演绎歌曲作品","url":"//www.bilibili.com/video/music-Cover-1.html"},{"name":"VOCALOID·UTAU","route":"vocaloid","tid":30,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以雅马哈Vocaloid和UTAU引擎为基础,包含其他调教引擎,运用各类音源进行的歌曲创作内容","url":"//www.bilibili.com/video/music-vocaloid-1.html"},{"name":"电音","route":"electronic","tid":194,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以电子合成器、音乐软体等产生的电子声响制作的音乐","url":"#"},{"name":"演奏","route":"perform","tid":59,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":247},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"传统或非传统乐器及器材的演奏作品","url":"//www.bilibili.com/video/music-perform-1.html"},{"name":"MV","route":"mv","tid":193,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐录影带,为搭配音乐而拍摄或制作的视频","url":"//www.bilibili.com/video/music-coordinate-1.html"},{"name":"音乐现场","route":"live","tid":29,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐实况表演视频","url":"//www.bilibili.com/video/music-oped-1.html"},{"name":"音乐综合","route":"other","tid":130,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"收录无法定义到其他音乐子分区的音乐视频","url":"//www.bilibili.com/video/music-collection-1.html"},{"name":"音频","customZone":"Audio","route":"audio","url":"//www.bilibili.com/audio/home?musicType=music"},{"name":"说唱","url":"//www.bilibili.com/v/rap"}]},{"name":"舞蹈","route":"dance","tid":129,"locid":64,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2513,"leftId":2472,"rightId":2473},"sub":[{"name":"宅舞","route":"otaku","tid":20,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":249},"desc":"与ACG相关的翻跳、原创舞蹈","url":"//www.bilibili.com/video/dance-1.html"},{"name":"街舞","route":"hiphop","tid":198,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":251},"desc":"收录街舞相关内容,包括赛事现场、舞室作品、个人翻跳、FREESTYLE等","url":""},{"name":"明星舞蹈","route":"star","tid":199,"ps":15,"rps":10,"desc":"国内外明星发布的官方舞蹈及其翻跳内容","url":""},{"name":"中国舞","route":"china","tid":200,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":253},"desc":"传承中国艺术文化的舞蹈内容,包括古典舞、民族民间舞、汉唐舞、古风舞等","url":""},{"name":"舞蹈综合","route":"three_d","tid":154,"ps":15,"rps":10,"desc":"收录无法定义到其他舞蹈子分区的舞蹈视频","url":""},{"name":"舞蹈教程","route":"demo","tid":156,"ps":10,"rps":6,"desc":"镜面慢速,动作分解,基础教程等具有教学意义的舞蹈视频","url":"//www.bilibili.com/video/dance-demo-1.html"}]},{"name":"游戏","route":"game","tid":4,"locid":70,"count":"","subMenuSize":240,"slider":{"width":470,"height":216},"viewTag":true,"customComponent":{"name":"Energy","titleId":3761,"leftId":3765,"rightId":3775,"rightType":"slide"},"recommendCardType":"GameGroomBox","sub":[{"name":"单机游戏","route":"stand_alone","tid":17,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":255},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以所有平台(PC、主机、移动端)的单机或联机游戏为主的视频内容,包括游戏预告、CG、实况解说及相关的评测、杂谈与视频剪辑等","url":"//www.bilibili.com/video/videogame-1.html"},{"name":"电子竞技","route":"esports","tid":171,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":257},"desc":"具有高对抗性的电子竞技游戏项目,其相关的赛事、实况、攻略、解说、短剧等视频。","url":"//www.bilibili.com/video/esports-1.html"},{"name":"手机游戏","route":"mobile","tid":172,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"desc":"以手机及平板设备为主要平台的游戏,其相关的实况、攻略、解说、短剧、演示等视频。","url":"//www.bilibili.com/video/mobilegame-1.html"},{"name":"网络游戏","route":"online","tid":65,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":259},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由网络运营商运营的多人在线游戏,以及电子竞技的相关游戏内容。包括赛事、攻略、实况、解说等相关视频","url":"//www.bilibili.com/video/onlinegame-1.html"},{"name":"桌游棋牌","route":"board","tid":173,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"desc":"桌游、棋牌、卡牌对战等及其相关电子版游戏的实况、攻略、解说、演示等视频。","url":"//www.bilibili.com/video/boardgame-1.html"},{"name":"GMV","route":"gmv","tid":121,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由游戏素材制作的MV视频。以游戏内容或CG为主制作的,具有一定创作程度的MV类型的视频","url":"//www.bilibili.com/video/gmv-1.html"},{"name":"音游","route":"music","tid":136,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"各个平台上,通过配合音乐与节奏而进行的音乐类游戏视频","url":"//www.bilibili.com/video/music-game-1.html"},{"name":"Mugen","route":"mugen","tid":19,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以Mugen引擎为平台制作、或与Mugen相关的游戏视频","url":"//www.bilibili.com/video/game-mugen-1.html"},{"name":"游戏赛事","url":"//www.bilibili.com/v/game/match/","newIcon":true}]},{"name":"知识","route":"knowledge","tid":36,"locid":76,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2058,"leftId":2047,"rightId":2048},"sub":[{"name":"科学科普","route":"science","tid":201,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":261},"desc":"回答你的十万个为什么"},{"name":"社科·法律·心理","route":"social_science","tid":124,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":263},"desc":"基于社会科学、法学、心理学展开或个人观点输出的知识视频"},{"name":"人文历史","route":"humanity_history","tid":228,"ps":15,"rps":10,"desc":"看看古今人物,聊聊历史过往,品品文学典籍"},{"name":"财经商业","route":"business","tid":207,"ps":15,"rps":10,"desc":"说金融市场,谈宏观经济,一起畅聊商业故事"},{"name":"校园学习","route":"campus","tid":208,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":265},"desc":"老师很有趣,学生也有才,我们一起搞学习"},{"name":"职业职场","route":"career","tid":209,"ps":15,"rps":10,"desc":"职业分享、升级指南,一起成为最有料的职场人"},{"name":"设计·创意","route":"design","tid":229,"ps":15,"rps":10,"desc":"天马行空,创意设计,都在这里"},{"name":"野生技能协会","route":"skill","tid":122,"ps":15,"rps":10,"desc":"技能党集合,是时候展示真正的技术了"}]},{"name":"科技","route":"tech","tid":188,"locid":2977,"count":"","subMenuSize":80,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2980,"leftId":2978,"rightId":2979},"sub":[{"name":"数码","route":"digital","tid":95,"ps":15,"rps":10,"viewHotTag":true,"desc":"科技数码产品大全,一起来做发烧友","url":"#"},{"name":"软件应用","route":"application","tid":230,"ps":15,"rps":10,"viewHotTag":true,"desc":"超全软件应用指南","url":"#"},{"name":"计算机技术","route":"computer_tech","tid":231,"ps":15,"rps":10,"viewHotTag":true,"desc":"研究分析、教学演示、经验分享......有关计算机技术的都在这里","url":"#"},{"name":"工业·工程·机械","route":"industry","tid":232,"ps":15,"rps":10,"viewHotTag":true,"desc":"前方高能,机甲重工即将出没","url":"#"},{"name":"极客DIY","route":"diy","tid":233,"ps":15,"rps":10,"viewHotTag":true,"desc":"炫酷技能,极客文化,硬核技巧,准备好你的惊讶","url":"#"}]},{"name":"运动","route":"sports","tid":234,"locid":4639,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4646,"rightId":4652,"rightType":"slide"},"sub":[{"name":"篮球·足球","route":"basketballfootball","tid":235,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4656},"desc":"与篮球、足球相关的视频,包括但不限于篮足球赛事、教学、评述、剪辑、剧情等相关内容","url":"#"},{"name":"健身","route":"aerobics","tid":164,"ps":15,"rps":10,"desc":"与健身相关的视频,包括但不限于瑜伽、CrossFit、健美、力量举、普拉提、街健等相关内容","url":"//www.bilibili.com/video/fashion-body-1.html"},{"name":"竞技体育","route":"athletic","tid":236,"ps":15,"rps":10,"desc":"与竞技体育相关的视频,包括但不限于乒乓、羽毛球、排球、赛车等竞技项目的赛事、评述、剪辑、剧情等相关内容","url":"#"},{"name":"运动文化","route":"culture","tid":237,"ps":15,"rps":10,"desc":"与运动文化相关的视频,包络但不限于球鞋、球衣、球星卡等运动衍生品的分享、解读,体育产业的分析、科普等相关内容","url":"#"},{"name":"运动综合","route":"comprehensive","tid":238,"ps":15,"rps":10,"desc":"与运动综合相关的视频,包括但不限于钓鱼、骑行、滑板等日常运动分享、教学、Vlog等相关内容","url":"#"}]},{"name":"汽车","route":"car","tid":223,"locid":4428,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4435,"rightId":4441,"rightType":"slide"},"sub":[{"name":"汽车生活","route":"life","tid":176,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4445},"desc":"分享汽车及出行相关的生活体验类视频","url":"#"},{"name":"汽车文化","route":"culture","tid":224,"ps":15,"rps":10,"desc":"车迷的精神圣地,包括汽车赛事、品牌历史、汽车改装、经典车型和汽车模型等","url":"#"},{"name":"汽车极客","route":"geek","tid":225,"ps":15,"rps":10,"desc":"汽车硬核达人聚集地,包括DIY造车、专业评测和技术知识分享","url":"#"},{"name":"摩托车","route":"motorcycle","tid":240,"ps":15,"rps":10,"desc":"骑士们集合啦","url":"#"},{"name":"智能出行","route":"smart","tid":226,"ps":15,"rps":10,"desc":"探索新能源汽车和未来智能出行的前沿阵地","url":"#"},{"name":"购车攻略","route":"strategy","tid":227,"ps":15,"rps":10,"desc":"丰富详实的购车建议和新车体验","url":"#"}]},{"name":"生活","route":"life","tid":160,"locid":88,"count":"","subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2062,"leftId":1674,"rightId":1670},"sub":[{"name":"搞笑","route":"funny","tid":138,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":273},"desc":"各种沙雕有趣的搞笑剪辑,挑战,表演,配音等视频","url":"//www.bilibili.com/video/ent_funny_1.html","locid":4204,"recommendId":4210,"slider":{"width":620,"height":220},"customComponent":{"name":"Energy","leftId":4212,"rightId":4218,"rightType":"slide"}},{"name":"家居房产","route":"home","tid":239,"ps":15,"rps":10,"desc":"与买房、装修、居家生活相关的分享","url":"#"},{"name":"手工","route":"handmake","tid":161,"ps":15,"rps":10,"desc":"手工制品的制作过程或成品展示、教程、测评类视频","url":"//www.bilibili.com/video/ent-handmake-1.html"},{"name":"绘画","route":"painting","tid":162,"ps":15,"rps":10,"desc":"绘画过程或绘画教程,以及绘画相关的所有视频","url":"//www.bilibili.com/video/ent-painting-1.html"},{"name":"日常","route":"daily","tid":21,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":275},"desc":"记录日常生活,分享生活故事","url":"//www.bilibili.com/video/ent-life-1.html"}]},{"name":"美食","route":"food","tid":211,"locid":4243,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4258,"rightId":4264},"sub":[{"name":"美食制作","route":"make","tid":76,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4268},"desc":"学做人间美味,展示精湛厨艺","url":"#"},{"name":"美食侦探","route":"detective","tid":212,"ps":15,"rps":10,"desc":"寻找美味餐厅,发现街头美食","url":"#"},{"name":"美食测评","route":"measurement","tid":213,"ps":15,"rps":10,"desc":"吃货世界,品尝世间美味","url":"#"},{"name":"田园美食","route":"rural","tid":214,"ps":15,"rps":10,"desc":"品味乡野美食,寻找山与海的味道","url":"#"},{"name":"美食记录","route":"record","tid":215,"ps":15,"rps":10,"desc":"记录一日三餐,给生活添一点幸福感","url":"#"}]},{"name":"动物圈","route":"animal","tid":217,"locid":4365,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4376,"rightId":4381,"rightType":"slide"},"sub":[{"name":"喵星人","route":"cat","tid":218,"ps":15,"rps":10,"desc":"喵喵喵喵喵","url":"#","ad":{"active":true,"dataLocId":4385}},{"name":"汪星人","route":"dog","tid":219,"ps":15,"rps":10,"desc":"汪汪汪汪汪","url":"#"},{"name":"大熊猫","route":"panda","tid":220,"ps":15,"rps":10,"desc":"芝麻汤圆营业中","url":"#"},{"name":"野生动物","route":"wild_animal","tid":221,"ps":15,"rps":10,"desc":"内有“猛兽”出没","url":"#"},{"name":"爬宠","route":"reptiles","tid":222,"ps":15,"rps":10,"desc":"鳞甲有灵","url":"#"},{"name":"动物综合","route":"animal_composite","tid":75,"ps":15,"rps":10,"desc":"收录除上述子分区外,其余动物相关视频以及非动物主体或多个动物主体的动物相关延伸内容","url":"#"}]},{"name":"鬼畜","route":"kichiku","tid":119,"locid":100,"count":"","subMenuSize":182,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2509,"leftId":2482,"rightId":2483},"sub":[{"name":"鬼畜调教","route":"guide","tid":22,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":285},"desc":"使用素材在音频、画面上做一定处理,达到与BGM一定的同步感","url":"//www.bilibili.com/video/ent-Kichiku-1.html"},{"name":"音MAD","route":"mad","tid":26,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":287},"desc":"使用素材音频进行一定的二次创作来达到还原原曲的非商业性质稿件","url":"//www.bilibili.com/video/douga-kichiku-1.html"},{"name":"人力VOCALOID","route":"manual_vocaloid","tid":126,"ps":15,"rps":10,"desc":"将人物或者角色的无伴奏素材进行人工调音,使其就像VOCALOID一样歌唱的技术","url":"//www.bilibili.com/video/kichiku-manual_vocaloid-1.html"},{"name":"鬼畜剧场","route":"theatre","tid":216,"ps":15,"rps":10,"desc":"使用素材进行人工剪辑编排的有剧情的作品"},{"name":"教程演示","route":"course","tid":127,"ps":10,"rps":6,"rightComponent":{"name":"CmImgList","id":148},"ad":{"active":true,"dataLocId":289},"hideDropdown":false,"desc":"鬼畜相关的教程演示","url":"//www.bilibili.com/video/kichiku-course-1.html"}]},{"name":"时尚","route":"fashion","tid":155,"locid":94,"count":"","subMenuSize":124,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2515,"leftId":2492,"rightId":2493},"sub":[{"name":"美妆护肤","route":"makeup","tid":157,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":279},"desc":"彩妆护肤、美甲美发、仿妆、医美相关内容分享或产品测评","url":"//www.bilibili.com/video/fashion-makeup-fitness-1.html"},{"name":"穿搭","route":"clothing","tid":158,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":281},"desc":"穿搭风格、穿搭技巧的展示分享,涵盖衣服、鞋靴、箱包配件、配饰(帽子、钟表、珠宝首饰)等","url":"//www.bilibili.com/video/fashion-clothing-1.html"},{"name":"时尚潮流","route":"trend","tid":159,"ps":15,"rps":10,"desc":"时尚街拍、时装周、时尚大片,时尚品牌、潮流等行业相关记录及知识科普","url":"#"}]},{"name":"资讯","route":"information","tid":202,"locid":4076,"count":"","subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"sub":[{"name":"热点","route":"hotspot","tid":203,"ps":18,"rps":10,"desc":"全民关注的时政热门资讯"},{"name":"环球","route":"global","tid":204,"ps":18,"rps":10,"desc":"全球范围内发生的具有重大影响力的事件动态"},{"name":"社会","route":"social","tid":205,"ps":18,"rps":10,"desc":"日常生活的社会事件、社会问题、社会风貌的报道"},{"name":"综合","route":"multiple","tid":206,"ps":18,"rps":10,"desc":"除上述领域外其它垂直领域的综合资讯"}]},{"name":"娱乐","route":"ent","tid":5,"locid":82,"count":"","subMenuSize":62,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2067,"leftId":2065,"rightId":2066},"sub":[{"name":"综艺","route":"variety","tid":71,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":267},"desc":"所有综艺相关,全部一手掌握!","url":"//www.bilibili.com/video/ent-variety-1.html"},{"name":"娱乐杂谈","route":"talker","tid":241,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":269},"desc":"娱乐人物解读、娱乐热点点评、娱乐行业分析"},{"name":"粉丝创作","route":"fans","tid":242,"ps":15,"rps":10,"desc":"粉丝向创作视频"},{"name":"明星综合","route":"celebrity","tid":137,"ps":15,"rps":10,"desc":"娱乐圈动态、明星资讯相关"}]},{"name":"影视","route":"cinephile","tid":181,"locid":2211,"count":"","subMenuSize":84,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2309,"leftId":2307,"rightId":2308},"sub":[{"name":"影视杂谈","route":"cinecism","tid":182,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2212},"desc":"影视评论、解说、吐槽、科普等","url":"//www.bilibili.com/video/cinephile-cinecism.html"},{"name":"影视剪辑","route":"montage","tid":183,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2213},"desc":"对影视素材进行剪辑再创作的视频","url":"//www.bilibili.com/video/cinephile-montage.html"},{"name":"短片","route":"shortfilm","tid":85,"ps":15,"rps":10,"desc":"追求自我表达且具有特色的短片","url":"//www.bilibili.com/video/cinephile-shortfilm.html"},{"name":"预告·资讯","route":"trailer_info","tid":184,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2214},"desc":"影视类相关资讯,预告,花絮等视频","url":"//www.bilibili.com/video/cinephile-trailer-info.html"}]},{"name":"纪录片","route":"documentary","tid":177,"url":"//www.bilibili.com/documentary/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"人文·历史","tid":37,"route":"history","dise":"","url":"//www.bilibili.com/video/doco-history.html"},{"name":"科学·探索·自然","tid":178,"route":"science","dise":"","url":"//www.bilibili.com/video/doco-science.html"},{"name":"军事","tid":179,"route":"military","dise":"","url":"//www.bilibili.com/video/doco-military.html"},{"name":"社会·美食·旅行","tid":180,"route":"travel","dise":"","url":"//www.bilibili.com/video/doco-travel.html"},{"name":"纪录片索引","url":"//www.bilibili.com/documentary/index/"}]},{"name":"电影","route":"movie","tid":23,"url":"//www.bilibili.com/movie/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"华语电影","tid":147,"route":"chinese","desc":"","url":"//www.bilibili.com/video/movie_chinese_1.html"},{"name":"欧美电影","tid":145,"route":"west","desc":"","url":"//www.bilibili.com/video/movie_west_1.html"},{"name":"日本电影","tid":146,"route":"japan","desc":"","url":"//www.bilibili.com/video/movie_japan_1.html"},{"name":"其他国家","tid":83,"route":"movie","desc":"","url":"//www.bilibili.com/video/movie-movie-1.html"},{"name":"电影索引","url":"//www.bilibili.com/movie/index/"}]},{"name":"电视剧","route":"tv","tid":11,"url":"//www.bilibili.com/tv/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"国产剧","tid":185,"route":"mainland","desc":"","url":"//www.bilibili.com/video/tv-mainland.html"},{"name":"海外剧","tid":187,"route":"overseas","desc":"","url":"//www.bilibili.com/video/tv-overseas.html"},{"name":"电视剧索引","url":"//www.bilibili.com/tv/index/"}]},{"name":"虚拟UP主","route":"virtual","locid":4735,"count":"","isHide":true,"subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":4754,"leftId":4756},"sub":[{"name":"游戏","route":"game","tid":4,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/game"},{"name":"音乐","route":"music","tid":3,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/music"},{"name":"动画","route":"douga","tid":1,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/douga"},{"name":"其他","route":"other","tid":0,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/other"}]}],[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}],[{"name":"会员购","url":"//show.bilibili.com/platform/home.html","icon":"icon-vip-buy"},{"name":"游戏中心","url":"//game.bilibili.com","icon":"icon-game"},{"name":"画友","url":"http://h.bilibili.com","icon":"icon-hy"},{"name":"芒果TV","url":"//www.bilibili.com/mango","icon":"icon-mango"}],[{"name":"专栏","report":"article","url":"//www.bilibili.com/read/home","icon":"read"},{"name":"直播","report":"live","url":"//live.bilibili.com","icon":"live","sub":[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}]},{"name":"活动","report":"activity","url":"//www.bilibili.com/blackboard/activity-list.html","icon":"activit"},{"name":"课堂","report":"cheese","url":"//www.bilibili.com/cheese/","icon":"zhishi"},{"name":"小黑屋","report":"blackroom","url":"//www.bilibili.com/blackroom/","icon":"blackroom"},{"name":"新歌热榜","report":"musicplus","url":"//www.bilibili.com/v/musicplus/","icon":"musicplus"}]]'),cn=e=>e.startsWith("//")?`https:${e}`:e.replace("http:","https:"),dn=ln[0].filter((e=>"string"!=typeof e.tid)),un=ln[3],pn={};dn.forEach((e=>{const t=cn(`https://www.bilibili.com/v/${e.route}/`);pn[e.name]={icon:e.route,code:e.tid,link:t,subCategories:e.sub?Object.fromEntries(e.sub.map((e=>{const n=cn(e.route?`${t}${e.route}/`:e.url);return[e.name,n]}))):null}})),un.forEach((e=>{pn[e.name]={icon:e.icon,code:null,link:cn(e.url),subCategories:e.sub?Object.fromEntries(e.sub.map((e=>[e.name,cn(e.url)]))):null}}));const fn=pn,hn=Object.fromEntries(dn.map((e=>[e.route,e.tid]))),mn=Object.fromEntries(Object.values(pn).map((e=>[e.icon,e.link]))),gn=async()=>{if(document.getElementById("be-category-icons"))return;const{default:e}=await Promise.resolve().then(n.bind(n,382));document.body.insertAdjacentHTML("beforeend",e)};var bn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"translate-container"},[e.working||e.translated?e._e():n("div",{staticClass:"translate",on:{click:function(t){return e.translate()}}},[n("VIcon",{attrs:{size:14,icon:"mdi-earth"}}),e._v("翻译\n ")],1),e._v(" "),e.translated?n("div",{staticClass:"translated"},[n("a",{attrs:{href:e.activeTranslator&&e.activeTranslator.link,target:"_blank"}},[e._v("\n 翻译自\n ")]),e._v(" "),n("VDropdown",{attrs:{items:Object.values(e.translateProviders),value:e.activeTranslator,"key-mapper":function(e){return e.name}},on:{change:function(t){return e.changeTranslator(t)}},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[e._v("\n "+e._s(n.name)+"\n ")]}}],null,!1,1956376614)})],1):e._e(),e._v(" "),e.working?n("VIcon",{staticClass:"translating mdi-spin",attrs:{size:18,icon:"mdi-loading"}}):e._e(),e._v(" "),!e.working&&e.translated?n("div",{staticClass:"translate-result",domProps:{textContent:e._s(e.result)}}):e._e()],1)};bn._withStripped=!0;var vn=n(1993),yn=Vue.extend({components:{VDropdown:ce.VDropdown,VIcon:ce.VIcon},props:{text:{type:String,required:!0}},data:()=>({result:"",working:!1,translateProviders:vn.WK,activeTranslator:{}}),computed:{translated(){return""!==this.result}},methods:{changeTranslator(e){(0,U.getComponentSettings)("i18n").options.translator=e.name,this.translate()},async translate(){try{this.working=!0;const e=this.text.replace(/#(.+?)#/g,"");this.activeTranslator=(0,vn.Ty)();const t=this.activeTranslator;this.result=await t.translate(e)}catch(e){(0,re.logError)(e)}finally{this.working=!1}}}}),wn=n(4618),xn=n.n(wn),kn={insert:"head",singleton:!1},_n=(je()(xn(),kn),xn().locals,(0,Ue.Z)(yn,bn,[],!1,null,null,null));_n.options.__file="src/components/i18n/machine-translator/MachineTranslator.vue";var Cn=_n.exports;const Sn=e=>{void 0===e.radio&&(e.radio=!1);const{name:t,switches:i}=e,r={};return Object.entries(i).forEach((([e,{displayName:t,defaultValue:n}])=>{r[`switch-${e}`]={defaultValue:n,displayName:t,hidden:!0}})),i=>{const a=`${i.displayName}选项`,o={componentName:i.name,optionDisplayName:a};Object.assign(e,o),r[t]={defaultValue:e,displayName:a},i.options={...i.options,...r},i.widget||(i.widget={component:()=>Promise.resolve().then(n.bind(n,1299)).then((e=>e.default)),options:e});const s=i.entry;return i.entry=async(...e)=>{s?.(...e);const{name:t}=i,n=(0,U.getComponentSettings)(t).options;Object.keys(n).forEach((e=>{e.startsWith("switch-")&&(0,U.addComponentListener)(`${t}.${e}`,(n=>{document.body.classList.toggle(`${t}-${e}`,n)}),!0)}))},i}};const En={component:de,userComponent:ue,styledComponent:s,description:he,switchOptions:_,launchBar:{LaunchBar:n(3059).Z},feeds:{api:c,BangumiCard:Ze,VideoCard:Qe,ColumnCard:ot,disableProfilePopup:d,notify:u},video:{assUtils:p,playerLight:f,playerAgent:_t,videoDanmaku:h,videoInfo:m,videoQuality:g,videoContextMenu:b,videoControlBar:v,watchlater:l},live:{liveControlBar:y,liveSocket:w},utils:{commentApis:x,categories:{updater:sn,data:k}},i18N:{machineTranslator:{MachineTranslator:Cn}}};var $n=n(8900),An=n(1623),In=n(9543);const Tn={style:$n,plugin:An,data:ve,hook:In},On={ajax:C,cdnTypes:S,download:E,externalInput:$,filePicker:A,lifeCycle:I,loadingMode:T,meta:O,observer:L,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...X,constants:J,formatters:K,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Ln={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:L,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...X,...J,...K,...Y,...Q,...o,...re,...ae,...oe},ui:ce,componentApis:{...En.component,...En.userComponent,...En.styledComponent,...En.launchBar,...lodash.omit(En,"component","userComponent","styledComponent","launchBar")},pluginApis:{...Tn.style,...Tn.plugin,...Tn.data,...Tn.hook},monkeyApis:{GM_setValue:GM_setValue,GM_getValue:GM_getValue,GM_deleteValue:GM_deleteValue,GM_xmlhttpRequest:GM_xmlhttpRequest,GM_info:GM_info},lodash:lodash,Vue:Vue,sandboxWindow:window,theWorld:e=>{setTimeout((()=>{}),e)}}},5300:function(e,t,n){"use strict";let i;n.d(t,{h:function(){return i}}),function(e){e.Packed="打包下载",e.Individual="单独下载"}(i||(i={}))},4114:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadPackage:function(){return l}});var i=n(5300),r=n(391),a=n(6171),o=n(3708);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l{constructor(e=[]){this.entries=e,s(this,"noEscape",!1)}add(e,t,n={}){null!=t&&this.entries.push({name:this.noEscape?e:(0,o.formatFilename)(e),data:t,options:n})}async blob(){if(0===this.entries.length)return null;if(1===this.entries.length){const{data:e}=this.entries[0];return"string"==typeof e?new Blob([e]):e}const e=new(await r.JSZipLibrary);return this.entries.forEach((({name:t,data:n,options:i})=>{e.file(t,n,i)})),e.generateAsync({type:"blob"})}async emit(e){if(0===this.entries.length)return;e&&1!==this.entries.length||(e=this.entries[0].name);if((0,a.getGeneralSettings)().downloadPackageEmitMode===i.h.Individual&&this.entries.length>1)return void await Promise.all(this.entries.map((e=>l.single(e.name,e.data,e.options))));const t=await this.blob();t&&l.download(e,t)}static download(e,t){const n=document.createElement("a"),i=URL.createObjectURL(t);l.lastPackageUrl&&URL.revokeObjectURL(l.lastPackageUrl),l.lastPackageUrl=i;const r=(0,o.formatFilename)(e);n.setAttribute("href",i),n.setAttribute("download",r),console.log("[Download file]",r),document.body.appendChild(n),n.click(),n.remove()}static async single(e,t,n={}){const i=new l;return i.add(e,t,n),i.emit()}}s(l,"lastPackageUrl","")},7731:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{parseExternalInput:function(){return parseExternalInput},batchParseCode:function(){return batchParseCode}});var _file_picker__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7590);const parseExternalInput=async input=>{if(void 0===input){const files=await(0,_file_picker__WEBPACK_IMPORTED_MODULE_0__.pickFile)({accept:"application/json"});if(!(files.length>0))return console.error("[parseExternalInput] No file selected"),null;{const[file]=files,text=await file.text();try{return eval(`(${text})`)}catch(e){return console.error(e),null}}}else{if("string"!=typeof input)return input;try{const exports={},result=eval(input);if(Object.values(exports).length>0){const e=Object.values(exports)[0];return e}return result}catch(e){return console.error(e),null}}},batchParseCode=async inputs=>{try{const exports={},result=inputs.map((input=>eval(input)));if(Object.values(exports).length>0){const{coreApis:e}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,9388));return Object.values(exports).map((t=>"function"==typeof t?t(e):t))}return result}catch(e){return console.error(e),null}}},7590:function(e,t,n){"use strict";let i,r;n.r(t),n.d(t,{pickFile:function(){return o}});const a={accept:"*",multiple:!1},o=async(e=a)=>{const{accept:t,multiple:n}={...a,...e};i||(i=document.createElement("input"),i.type="file",i.style.display="none",document.body.appendChild(i),i.addEventListener("change",(()=>{r?.([...i.files]),r=null}))),i.accept=t,i.multiple=n,i.value="",r&&r([]);return await new Promise((e=>{r=e,i.click()}))}},9513:function(e,t,n){"use strict";n.r(t),n.d(t,{tryParseZip:function(){return s},installFeatureFromCode:function(){return l},installFeature:function(){return c}});var i=n(7010),r=n(9543),a=n(1623),o=n(8900);const s=async e=>{const{JSZipLibrary:t}=await Promise.resolve().then(n.bind(n,391)),{monkey:i}=await Promise.resolve().then(n.bind(n,7195)),r=e.endsWith(".zip"),a=r?"blob":"text",o=await i({url:e,method:"GET",responseType:a});if(!r||"string"==typeof o)return o;const s=await t,l=await s.loadAsync(o),c=Object.values(l.files);if(0===c.length)throw new Error("Empty zip file");return c[0].async("text")},l=async(e,t)=>{const{parseExternalInput:s}=await Promise.resolve().then(n.bind(n,7731)),l=await s(e),{type:c,installer:d}=(()=>{if((e=>"entry"in e)(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>"setup"in e)(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>"style"in e)(l))return{type:"style",installer:()=>(0,o.installStyle)(e)};throw new Error("无效的功能代码")})(),{before:u,after:p}=(0,r.getHook)(`user${lodash.startCase(c)}s.add`,e,t);await u();const f=await d();return await p(f.metadata),f},c=async e=>{const t=await s(e);return l(t,e)}},7177:function(e,t,n){"use strict";n.r(t),n.d(t,{headLoaded:function(){return r},contentLoaded:function(){return a},fullyLoaded:function(){return o},LifeCycleEventTypes:function(){return s},raiseLifeCycleEvent:function(){return l}});var i=n(3420);const r=e=>new Promise((t=>{if(null!==document.head)t(e());else{const[n]=(0,i.childList)(document.documentElement,(()=>{null!==document.head&&(n.disconnect(),t(e()))}))}})),a=e=>new Promise((t=>{"loading"!==document.readyState?t(e()):document.addEventListener("DOMContentLoaded",(()=>t(e())))})),o=e=>new Promise((t=>{"complete"===document.readyState?t(e()):unsafeWindow.addEventListener("load",(()=>t(e())))}));let s;!function(e){e.Start="be:start",e.StyleLoaded="be:style-loaded",e.ComponentsLoaded="be:components-loaded",e.End="be:end"}(s||(s={}));const l=e=>{unsafeWindow.dispatchEvent(new CustomEvent(e))}},4345:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{LoadingMode:function(){return i}}),function(e){e.Delay="延后",e.Race="同时"}(i||(i={}))},1836:function(e,t,n){"use strict";n.r(t),n.d(t,{branches:function(){return a},meta:function(){return s}});var i=JSON.parse('{"version":"2.0.4","author":"Grant Howard, Coulomb-G","copyright":"[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)","licence":"MIT","match":"*://*.bilibili.com/*","exclude":["*://api.bilibili.com/*","*://api.*.bilibili.com/*","*://*.bilibili.com/api/*","*://member.bilibili.com/studio/bs-editor/*","*://t.bilibili.com/h5/dynamic/specification","*://bbq.bilibili.com/*"],"run-at":"document-start","supportURL":"https://github.com/the1812/Bilibili-Evolved/issues","homepage":"https://github.com/the1812/Bilibili-Evolved","grant":["unsafeWindow","GM_getValue","GM_setValue","GM_deleteValue","GM_info","GM_xmlhttpRequest"],"connect":["raw.githubusercontent.com","github.com","cdn.jsdelivr.net","cn.bing.com","www.bing.com","translate.google.cn","translate.google.com","localhost","*"],"require":["https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"],"icon":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo-small.png","icon64":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo.png"}'),r=n(2462);i.copyright=i.copyright.replace(/\[year\]/g,(new Date).getFullYear().toString());const a={stable:"v2",preview:"preview"},o={commitHash:"46b0b301034b1d5e9dfa9c8db1b8e99f35dd6806",branch:"preview",nearestTag:"v2.0.4-preview",versionWithTag:"v2.0.4-preview"},s={compilationInfo:o,name:GM_info.script.name,description:GM_info.script.description,get originalFilename(){const{branch:e}=o;return e===a.stable?"bilibili-evolved.user.js":`bilibili-evolved.${e}.user.js`},get updateURL(){return`${r.cdnRoots.jsDelivr(o.branch)}dist/${this.originalFilename}`},get downloadURL(){return this.updateURL},...i}},3420:function(e,t,n){"use strict";n.r(t),n.d(t,{childList:function(){return l},childListSubtree:function(){return c},attributes:function(){return d},attributesSubtree:function(){return u},characterData:function(){return p},characterDataSubtree:function(){return f},allMutationsOn:function(){return h},allMutations:function(){return g},visible:function(){return v},visibleInside:function(){return y},sizeChange:function(){return w},urlChange:function(){return k},videoChange:function(){return S}});var i=n(1906),r=n(5550),a=n(7735);const o=e=>"string"==typeof e?(0,i.dqa)(e):Array.isArray(e)?e:[e],s=(e,t,n)=>{const i=new MutationObserver(n);return e.forEach((e=>i.observe(e,t))),n([],i),[i,t]},l=(e,t)=>s(o(e),{childList:!0,subtree:!1,attributes:!1},t),c=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!1},t),d=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!0},t),u=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!0},t),p=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!1,characterData:!0},t),f=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!1,characterData:!0},t),h=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!0,characterData:!0},t),m={observer:null,config:null,callbacks:[]},g=e=>{if(m.observer)m.callbacks.push(e);else{m.callbacks.push(e);const[t,n]=h(document.body,(e=>m.callbacks.forEach((t=>t(e,m.observer)))));m.observer=t,m.config=n}return m},b=(e,t,n)=>{const i=new IntersectionObserver(n,t);return e.forEach((e=>i.observe(e))),[i,t]},v=(e,t)=>b(o(e),{},t),y=(e,t,n,i)=>b(o(e),{root:t,rootMargin:n},i),w=(e,t)=>((e,t,n)=>{const i=new ResizeObserver(n);return e.forEach((e=>i.observe(e,t))),[i,t]})(o(e),{box:"border-box"},t),x=lodash.once((()=>{let e=document.URL;g((()=>{e!==document.URL&&((()=>{const e=new CustomEvent("urlChange",{detail:document.URL});window.dispatchEvent(e)})(),e=document.URL)}))})),k=(e,t)=>{x(),e(document.URL),window.addEventListener("urlChange",(()=>e(document.URL)),t)},_=lodash.once((()=>(0,r.select)((()=>{if(unsafeWindow.cid)return unsafeWindow.cid;if(unsafeWindow.player&&unsafeWindow.player.getVideoMessage){const e=unsafeWindow.player.getVideoMessage();return Number.isNaN(e.cid)?null:(!unsafeWindow.aid&&e.aid&&(unsafeWindow.aid=e.aid.toString()),!unsafeWindow.bvid&&e.bvid&&(unsafeWindow.bvid=e.bvid),e.cid.toString())}return null}))));let C=!1;const S=async(e,t)=>{if(!(0,a.matchCurrentPage)(a.playerUrls))return!1;const{bpxPlayerPolyfill:i}=await Promise.resolve().then(n.bind(n,6958));i();const r=await _();if(null===r)return!1;const o=()=>({aid:unsafeWindow.aid,cid:unsafeWindow.cid});if(!C){let e=r;Object.defineProperty(unsafeWindow,"cid",{get:()=>e,set(t){e=t,Array.isArray(t)||(()=>{const e=o(),t=new CustomEvent("videoChange",{detail:e});window.dispatchEvent(t)})()}}),C=!0}return e(o()),window.addEventListener("videoChange",(t=>e(t.detail)),t),!0}},1485:function(e,t,n){"use strict";n.r(t),n.d(t,{componentLoadTime:function(){return i},componentResolveTime:function(){return r},componentLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,6171));if(!t().devMode)return;const a=e.entry;e.entry=async e=>{const{metadata:t}=e,n=performance.now();let o=a(e);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(t,s-n),r.set(t,l-n),o}}},8970:function(e,t,n){"use strict";n.r(t),n.d(t,{pluginLoadTime:function(){return i},pluginResolveTime:function(){return r},pluginLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,6171));if(!t().devMode)return;const a=e.setup;e.setup=async t=>{const n=performance.now();let o=a(t);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(e,s-n),r.set(e,l-n),o}}},719:function(e,t,n){"use strict";n.r(t),n.d(t,{promiseLoadTime:function(){return i},promiseResolveTime:function(){return r},promiseLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async(e,t)=>{const{getGeneralSettings:a}=await Promise.resolve().then(n.bind(n,6171));if(!a().devMode)return t();const o=performance.now(),s=t(),l=performance.now(),c=await s,d=performance.now();return i.set({name:e},l-o),r.set({name:e},d-o),c}},9476:function(e,t,n){"use strict";n.r(t),n.d(t,{logStats:function(){return i}});const i=(e,t)=>{const n=[...t.entries()],i=n.reduce(((e,t)=>e+t[1]),0);console.groupCollapsed(`${e} time:`,Math.round(100*i)/100+"ms",`for ${n.length} items`),n.forEach((([e,t])=>{console.log(`%c${e.name} %c${Math.round(100*t)/100}ms ${Math.round(t/i*1e4)/100}% %c`,"color: #00A0D8","color: #888","color: unset")})),console.groupEnd()}},391:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RuntimeLibrary:function(){return RuntimeLibrary},protobufLibrary:function(){return protobufLibrary},JSZipLibrary:function(){return JSZipLibrary},SortableJSLibrary:function(){return SortableJSLibrary}});var _ajax__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7195);function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class RuntimeLibrary{constructor(e){this.config=e,_defineProperty(this,"modulePromise",void 0)}async then(resolve,reject){try{const{url:url,getModule:getModule}=this.config;this.modulePromise||(this.modulePromise=(async()=>{console.log(`[Runtime Library] Start download from ${url}`);const code=await(0,_ajax__WEBPACK_IMPORTED_MODULE_0__.monkey)({url:url});return console.log(`[Runtime Library] Downloaded from ${url} , length = ${code.length}`),function runEval(){return eval(code);// eslint-disable-next-line no-extra-bind +const t=e=>e.__vue__||e.parentElement.__vue__,n=async t=>{const n=await(0,q.sq)((()=>e.querySelector(t)),(t=>null!==t||null===e.parentNode),{queryInterval:100});if(null===e.parentNode)return"";if(null===n)return console.warn(e,t,e.parentNode),"";return n.innerText.trim()},i=e=>{if(void 0===e.card.origin)return{originalText:"",originalDescription:"",originalTitle:""};const t=JSON.parse(e.card.origin);return{originalText:e.originCardData.pureText,originalDescription:lodash.get(t,"item.description",lodash.get(t,"desc","")),originalTitle:t.title}},r=async e=>{const t=parseInt(await n(e));return isNaN(t)?0:t},a={id:e.getAttribute("data-did"),username:await n(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:_e(e),get presented(){return null!==e.parentNode},async getText(){const n=await(async n=>{if(n===ye.bangumi)return"";const r=await(0,q.sq)((()=>e),(n=>Boolean(t(n)||!e.parentNode)),{queryInterval:100});if(null===e.parentNode)return"";if(null===r)return console.warn(r,e,t(r),e.parentNode),"";const a=t(r);if(n===ye.repost){const e=a.card.item.content,t=i(a);return[e,...Object.values(t).filter((e=>""!==e))].filter((e=>Boolean(e))).join("\n")}return[a.originCardData.pureText,a.originCardData.title].filter((e=>Boolean(e))).join("\n")})(this.type);return this.text=n,n}};if(await a.getText(),e.setAttribute("data-type",a.type.id.toString()),(e=>e.type===ye.repost)(a)){const n=a.username,r=t(a.element),o=lodash.get(r,"card.origin_user.info.uname","");n===o&&e.setAttribute("data-self-repost","true"),a.repostUsername=o,a.repostText=i(r).originalText}return a}updateCards(e){const t=".card[data-did]",n=e=>{if(e instanceof HTMLElement){if(e.matches(t))return e;const n=e.querySelector(t);if(n)return n}};return[...e.querySelectorAll(t)].forEach((e=>this.addCard(e))),(0,L.childList)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>this.addCard(n(e)))),e.removedNodes.forEach((e=>this.removeCard(n(e))))}))}))}async startWatching(){if(this.watching)return!0;this.watching=!0;const[e]=(0,ve.registerAndGetData)(Se,[]),t=e.find((e=>e.match.some((e=>(0,X.matchUrlPattern)(e)))));return t?t.watchCardsList(this):(console.warn("[FeedsCardsManager] No adaptor found",e),!1)}}const $e=new Ee,Ae=e=>{(async()=>{if(!await $e.startWatching())return void console.error("feedsCardsManager.startWatching() failed");const{added:t}=e;t&&$e.cards.forEach((e=>t(e))),Ce.push({added:none,removed:none,...e})})()},Ie=e=>{const t=lodash.groupBy(e,(e=>e.aid)),n=e=>({id:e.upID,name:e.upName,faceUrl:e.upFaceUrl});return Object.values(t).map((e=>{if(1===e.length)return e[0];const[t,...i]=e;return t.cooperation=[n(t),...i.map(n)],console.log([...t.cooperation]),t})).sort((0,ae.descendingStringSort)((e=>e.id)))},Te=e=>1===lodash.get(e,"extra.is_reserve_recall",0),Oe="feeds.contentFilters";(0,ve.registerData)(Oe,[]);const Le=e=>{const[t]=(0,ve.getData)(Oe);return t.reduce(((e,t)=>t.filter(e)),e)},Me=e=>(...t)=>e(...t).then((e=>Le(e))),Pe=Me((async(e="video")=>{if(!(0,X.getUID)())return[];const t=await(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${"video"===e?8:512}`);if(0!==t.code)throw new Error(t.message);const n=t.data.cards,i=n.filter((e=>!Te(JSON.parse(e.card))));return"video"===e?Ie(n.map((e=>{const t=JSON.parse(e.card),n=lodash.get(e,"display.topic_info.topic_details",[]).map((e=>({id:e.topic_id,name:e.topic_name})));return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(1e3*e.timestamp),topics:n,dynamic:t.dynamic,like:(0,K.formatCount)(e.desc.like),duration:t.duration,durationText:(0,K.formatDuration)(t.duration,0),playCount:(0,K.formatCount)(t.stat.view),danmakuCount:(0,K.formatCount)(t.stat.danmaku),watchlater:me.includes(t.aid)}}))):"bangumi"===e?i.map((e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(1e3*e.timestamp),like:(0,K.formatCount)(e.desc.like),durationText:"",playCount:(0,K.formatCount)(t.play_count),danmakuCount:(0,K.formatCount)(t.bullet_count),watchlater:!1}})):[]})),ze=async(e,t)=>{if("string"==typeof e)return(0,C.getJsonWithCredentials)(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${e}`);const n=e.id.toString();let i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${(0,X.getUID)()}&type_list=${n}`;return t&&(i=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid=${(0,X.getUID)()}&offset_dynamic_id=${t}&type=${n}`),(0,C.getJsonWithCredentials)(i)},De=(e,t)=>{const n=dq(e.element,".more-panel"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("p");o.classList.add("child-button","c-pointer",i),o.textContent=r;[...new Set([...n.children].map((e=>e.getAttributeNames().filter((e=>e.startsWith("data-v-"))))).flat())].forEach((e=>o.setAttribute(e,""))),o.addEventListener("click",(t=>{a(t),e.element.click()})),n.appendChild(o)};var Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"bangumi-card",class:{new:e.isNew},attrs:{target:"_blank",href:e.data.url}},[n("div",{staticClass:"ep-cover-container"},[n("DpiImage",{staticClass:"ep-cover",attrs:{size:{width:100},src:e.data.epCoverUrl}})],1),e._v(" "),n("h1",{staticClass:"ep-title",attrs:{title:e.data.epTitle}},[e._v(e._s(e.data.epTitle))]),e._v(" "),n("div",{staticClass:"up",attrs:{title:e.data.title}},[n("DpiImage",{staticClass:"cover",attrs:{size:24,src:e.data.coverUrl}}),e._v(" "),n("div",{staticClass:"title"},[e._v(e._s(e.data.title))])],1)])};Ve._withStripped=!0;var Be=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),Ne=n(3379),je=n.n(Ne),qe=n(5478),Fe=n.n(qe),Re={insert:"head",singleton:!1},Ue=(je()(Fe(),Re),Fe().locals,n(1900)),He=(0,Ue.Z)(Be,Ve,[],!1,null,"3bc2da4f",null);He.options.__file="src/components/feeds/BangumiCard.vue";var Ze=He.exports,We=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"video-card",class:{vertical:"vertical"===e.orientation,"no-stats":!e.showStats},attrs:{target:"_blank",href:e.epID?"https://www.bilibili.com/bangumi/play/ep"+e.epID:"https://www.bilibili.com/"+e.bvid}},[n("div",{staticClass:"cover-container"},[n("DpiImage",{staticClass:"cover",attrs:{src:e.coverUrl,size:{height:120,width:200}}}),e._v(" "),e.isNew?n("div",{staticClass:"new"},[e._v("NEW")]):e._e(),e._v(" "),e.pubTime&&e.pubTimeText?[n("div",{staticClass:"publish-time-summary"},[e._v("\n "+e._s(e.pubTimeText)+"\n ")]),e._v(" "),n("div",{staticClass:"publish-time-detail"},[e._v("\n "+e._s(e.pubTime)+"\n ")])]:e._e(),e._v(" "),e.durationText?n("div",{staticClass:"duration"},[e._v(e._s(e.durationText))]):e._e(),e._v(" "),e.durationText&&null!==e.watchlater&&void 0!==e.watchlater?n("div",{staticClass:"watchlater",on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.toggleWatchlater(e.aid)}}},[n("VIcon",{attrs:{size:15,icon:e.watchlater?"mdi-check-circle":"mdi-clock-outline"}}),e._v("\n "+e._s(e.watchlater?"已添加":"稍后再看")+"\n ")],1):e._e()],2),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.title}},[e._v(e._s(e.title))]),e._v(" "),e.topics&&e.topics.length?n("div",{staticClass:"topics"},e._l(e.topics.slice(0,3),(function(t){return n("a",{key:t.id,staticClass:"topic",attrs:{target:"_blank",href:"https://t.bilibili.com/topic/name/"+t.name+"/feed"}},[e._v("#"+e._s(t.name)+"#")])})),0):n("p",{staticClass:"description",attrs:{title:e.description}},[e._v(e._s(e.description))]),e._v(" "),0===e.cooperation.length?n("a",{staticClass:"up",class:{"no-face":!e.upFaceUrl},attrs:{target:"_blank",href:e.upID?"https://space.bilibili.com/"+e.upID:null}},[e.upFaceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.upFaceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}}),e._v(" "),n("div",{staticClass:"name",attrs:{title:e.upName}},[e._v(e._s(e.upName))])],1):e._e(),e._v(" "),0!==e.cooperation.length?n("div",{staticClass:"cooperation"},[n("div",{staticClass:"cooperation-ups"},e._l(e.reversedCooperation,(function(e){return n("a",{key:e.id,staticClass:"cooperation-up",class:{"no-face":!e.faceUrl},attrs:{target:"_blank",title:e.name,href:e.id?"https://space.bilibili.com/"+e.id:null}},[e.faceUrl?n("DpiImage",{staticClass:"face",attrs:{src:e.faceUrl,size:24}}):n("VIcon",{attrs:{icon:"up"}})],1)})),0),e._v(" "),n("div",{staticClass:"cooperation-note"},[e._v("\n 联合投稿\n ")])]):e._e(),e._v(" "),e.showStats?n("div",{staticClass:"stats"},[e.like&&!e.vertical?[n("VIcon",{attrs:{icon:"like-outline",size:18}}),e._v("\n "+e._s(e.like)+"\n ")]:e._e(),e._v(" "),e.coins&&!e.vertical?[n("VIcon",{attrs:{icon:"coin-outline",size:18}}),e._v("\n "+e._s(e.coins)+"\n ")]:e._e(),e._v(" "),e.favorites?[n("VIcon",{attrs:{icon:"favorites-outline",size:18}}),e._v("\n "+e._s(e.favorites)+"\n ")]:e._e(),e._v(" "),e.playCount?[n("VIcon",{attrs:{icon:"play",size:18}}),e._v("\n "+e._s(e.playCount)+"\n ")]:e._e(),e._v(" "),e.danmakuCount?[n("VIcon",{attrs:{icon:"danmaku",size:18}}),e._v("\n "+e._s(e.danmakuCount)+"\n ")]:e._e()],2):e._e()])};We._withStripped=!0;var Ge={components:{DpiImage:ce.DpiImage,VIcon:ce.VIcon},props:{data:{type:Object,required:!0},orientation:{type:String,default:"horizontal"},showStats:{type:Boolean,default:!0},isNew:{type:Boolean,default:!1}},data(){return{watchlaterList:me,upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,cooperation:[],...lodash.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return"vertical"===this.orientation},watchlater(){return(0,X.getUID)()&&null!==this.watchlaterInit?this.watchlaterList.includes(this.aid):null},reversedCooperation(){return[...this.cooperation].reverse().slice(0,3)}},methods:{toggleWatchlater:be}},Xe=n(1745),Je=n.n(Xe),Ke={insert:"head",singleton:!1},Ye=(je()(Je(),Ke),Je().locals,(0,Ue.Z)(Ge,We,[],!1,null,"0ffa1cb1",null));Ye.options.__file="src/components/feeds/VideoCard.vue";var Qe=Ye.exports,et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",{staticClass:"column-card",attrs:{target:"_blank",href:"https://www.bilibili.com/read/cv"+e.data.cvID}},[n("div",{staticClass:"covers"},e._l(e.data.covers,(function(e){return n("DpiImage",{key:e,staticClass:"cover",attrs:{size:{height:120},src:e}})})),1),e._v(" "),n("a",{staticClass:"up",attrs:{target:"_blank",href:"https://space.bilibili.com/"+e.data.upID}},[n("DpiImage",{staticClass:"face",attrs:{size:24,src:e.data.upFaceUrl}}),e._v(" "),n("div",{staticClass:"name"},[e._v(e._s(e.data.upName))])],1),e._v(" "),n("h1",{staticClass:"title",attrs:{title:e.data.title}},[e._v(e._s(e.data.title))]),e._v(" "),n("div",{staticClass:"description",attrs:{title:e.data.description}},[e._v(e._s(e.data.description))])])};et._withStripped=!0;var tt=Vue.extend({components:{DpiImage:ce.DpiImage},props:{data:{type:Object,required:!0},isNew:{type:Boolean,default:!1}}}),nt=n(620),it=n.n(nt),rt={insert:"head",singleton:!1},at=(je()(it(),rt),it().locals,(0,Ue.Z)(tt,et,[],!1,null,null,null));at.options.__file="src/components/feeds/ColumnCard.vue";var ot=at.exports;let st=!1;const lt=()=>{"https://t.bilibili.com/"===document.URL.replace(window.location.search,"")&&(async()=>{const{select:e}=await Promise.resolve().then(n.bind(n,5550)),t=await e(".live-up-list");if(null!==t){const{getComponentSettings:e}=await Promise.resolve().then(n.bind(n,6171));if(st)return;const i=e("fixedSidebars"),r=e("extendFeedsLive");t.addEventListener("mouseenter",(e=>{(i.enabled||r.enabled)&&e.stopImmediatePropagation()}),{capture:!0}),st=!0}})()},ct=3e5,dt=()=>(0,X.getCookieValue)(`bp_t_offset_${(0,X.getUID)()}`),ut=(e,t)=>e===t?0:e.length>t.length?1:t.length>e.length?-1:e>t==!0?1:-1,pt=e=>{if(null==e)return;const t=dt();ut(e,t)<0||(document.cookie=`bp_t_offset_${(0,X.getUID)()}=${e};path=/;domain=.bilibili.com;max-age=2592000`)},ft=e=>ut(e,dt())>0,ht=e=>{const[t]=[...e.map((e=>e.id))].sort(ut).reverse();pt(t)},mt=async e=>{const t=`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${(0,X.getUID)()}&update_num_dy_id=${dt()}&type_list=${e||xe}`,n=await(0,C.getJsonWithCredentials)(t);return 0!==n.code?0:lodash.get(n,"data.update_num",0)},gt=e=>{e.startsWith("#")&&(e=e.substring(1));return{red:e.substring(0,2),green:e.substring(2,4),blue:e.substring(4,6)}},bt=e=>{const{red:t,green:n,blue:i}=gt(e);return`\\c&H${i}${n}${t}&`.toUpperCase()},vt=(e,t=1)=>{const{red:n,green:i,blue:r}=gt(e);return`&H${Math.round(255*(1-t)).toString(16).padStart(2,"0")}${r}${i}${n}`.toUpperCase()},yt=e=>{let t=0,n=0;for(;e>=60;)e-=60,n++;for(;n>=60;)n-=60,t++;return`${t}:${String(n).padStart(2,"0")}:${(e=>{const[t,n="00"]=String(e).split(".");return`${t.padStart(2,"0")}.${n.substr(0,2).padEnd(2,"0")}`})(e)}`},wt=(e,t)=>[yt(e),yt(e+t)],xt=(e,t)=>[yt(e),yt(t)],kt=e=>{const t={"{":"{","}":"}","&":"&","<":"<",">":">",""":'"',"'":"'","\n":"\\N"};for(const[n,i]of Object.entries(t))e=e.replace(new RegExp(n,"g"),i);return e};var _t=n(7412);const Ct=e=>oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))?async()=>{const t=_t.playerAgent,{query:{control:{settings:n,buttons:i}}}=t;te(i.settings.selector,n.wrap.selector),t.toggleLight(e)}:X.none,St=Ct(!0),Et=Ct(!1);let $t;const At=[],It=async e=>{await(0,q.hasVideo)()&&(0,L.videoChange)((async()=>{const t=await _t.playerAgent.query.video.danmaku();t&&((e,t)=>{$t&&$t.disconnect(),[$t]=(0,L.childListSubtree)(e,(e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement,i=At.find((e=>e.element===n));if(!i)return;return i.text=e.textContent||"",i.reuse=!0,void(t.added&&t.added(i))}if(!(e instanceof HTMLElement))return;const n={element:i=e,reuse:!1,text:i.textContent||""};var i;At.push(n),t.added&&t.added(n)})),e.removedNodes.forEach((e=>{if(!(e instanceof HTMLElement))return;const n=At.findIndex((t=>t.element===e));if(-1!==n){const[e]=At.splice(n,1);t.removed&&t.removed(e)}}))}))}))})(t,e)}))};function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ot{constructor(e){Tt(this,"aid",void 0),Tt(this,"cid",void 0),Tt(this,"pageCount",void 0),Tt(this,"coverUrl",void 0),Tt(this,"tagId",void 0),Tt(this,"tagName",void 0),Tt(this,"title",void 0),Tt(this,"description",void 0),Tt(this,"up",void 0),Tt(this,"pages",void 0),Tt(this,"subtitles",void 0),this.aid=e}async fetchInfo(){let e;e=this.cid?`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`:`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`;const t=await(0,C.getJson)(e);if(0!==t.code)throw new Error(t.message);const{data:n}=t;return this.cid=n.cid,this.pageCount=n.videos,this.coverUrl=n.pic.replace("http:","https:"),this.tagId=n.tid,this.tagName=n.tname,this.title=n.title,this.description=n.desc,this.up={uid:n.owner.mid,name:n.owner.name,faceUrl:n.owner.face.replace("http:","https:")},this.pages=n.pages.map((e=>({cid:e.cid,title:e.part,pageNumber:e.page}))),this.subtitles=n.subtitle.list.map((e=>({id:e.id,languageCode:e.lan,language:e.lan_doc,url:e.subtitle_url.replace("http:","https:")}))),this}}class Lt{constructor(e){Tt(this,"ep",void 0),Tt(this,"videos",void 0),Tt(this,"title",void 0),Tt(this,"cover",void 0),Tt(this,"squareCover",void 0),Tt(this,"aid",void 0),Tt(this,"cid",void 0),this.ep=e,this.videos=[]}async fetchInfo(){const e=await(0,C.getText)(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`),t=JSON.parse(e.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);return this.title=t.mediaInfo.title,this.cover=t.mediaInfo.cover,this.squareCover=t.mediaInfo.square_cover,this.aid=t.epInfo.aid,this.cid=t.epInfo.cid,this.videos=t.epList.map((async e=>({title:e.index_title,aid:e.aid,cid:e.cid,info:await new Ot(e.aid).fetchInfo()}))),this}}const Mt=[{name:"720P",displayName:"高清 720P",value:64},{name:"1080P",displayName:"高清 1080P",value:80}],Pt=[{name:"HDR",displayName:"真彩 HDR",value:125},{name:"4K",displayName:"超清 4K",value:120},{name:"1080P60",displayName:"高清 1080P60",value:116},{name:"1080P+",displayName:"高清 1080P+",value:112},{name:"720P60",displayName:"高清 720P60",value:74}],zt=[...Pt,...Mt,{name:"480P",displayName:"清晰 480P",value:32},{name:"360P",displayName:"流畅 360P",value:16}].sort((0,ae.descendingSort)((e=>e.value))),Dt=async e=>{const{open:t,close:n}=e;if(!(0,q.hasVideo)())return;const i=await(0,q.select)(".bilibili-player");if(!i)return;const[r]=(0,L.childList)(i,(()=>{const e=dq(".bilibili-player-context-menu-origin");if(e){r.disconnect();const i=dq(e,"ul"),a={containerElement:e,listElement:i,get itemElements(){return dqa(e,".context-menu-function")},get isOpen(){return e.classList.contains("active")}};(0,L.childList)(i,(()=>{a.isOpen?t?.(a):n?.(a)}))}}))},Vt=async(e,t)=>Dt({open:t=>{if(t.listElement.contains(e))return;const n=document.createElement("li");n.classList.add("context-line","context-menu-function"),n.setAttribute("data-append","1");const i=document.createElement("a");i.classList.add("context-menu-a","js-action"),i.href="javascript:void(0);",i.appendChild(e),n.addEventListener("mouseover",(()=>n.classList.add("hover"))),n.addEventListener("mouseout",(()=>n.classList.remove("hover"))),n.appendChild(i),t.listElement.appendChild(n)},close:e=>t?.(e)});let Bt;const Nt=[],jt=lodash.once((async()=>{oe.playerUrls.some((e=>(0,X.matchUrlPattern)(e)))&&(0,L.videoChange)((async()=>{const{playerAgent:e}=await Promise.resolve().then(n.bind(n,7412)),t=await e.query.control.buttons.time();if(null===t||null!==t.parentElement?.querySelector(".be-video-control-bar-extend"))return;const i=await Promise.resolve().then(n.bind(n,135)).then((e=>e.default));Bt=new i({propsData:{items:Nt}}).$mount(),t.insertAdjacentElement("afterend",Bt.$el)}))})),qt=async e=>{Bt||await jt(),Nt.push(e)},Ft=async e=>{if(!oe.liveUrls.some((e=>(0,X.matchUrlPattern)(e))))return;const t=await(0,q.select)(".bilibili-live-player-video-controller, .web-player-controller-wrap:not(.web-player-controller-bg)");if(!t)return;const{init:n,callback:i}=e;n?.(t),(0,L.childList)(t,(async()=>{const e=dq(t,".control-area");e&&i?.(e)}))};function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ut=0,Ht=2,Zt={heartBeat:2,heartBeatResponse:3,message:5,enterRoom:7,enterRoomResponse:8};class Wt{constructor(){Rt(this,"textEncoder",new TextEncoder),Rt(this,"textDecoder",new TextDecoder)}static readInt(e,t,n){let i=0;for(let r=n-1;r>=0;r--)i+=256**(n-r-1)*e[t+r];return i}static writeInt(e,t,n,i){let r=0;for(;r{const i={packetLength:Wt.readInt(e,0,4),headerLength:Wt.readInt(e,4,2),protocolVersion:Wt.readInt(e,6,2),operation:Wt.readInt(e,8,4),sequenceID:Wt.readInt(e,12,4)},r=[i];if(i.packetLengthe.messages[0])))}else i.protocolVersion===Ut&&(i.messages=[JSON.parse(this.textDecoder.decode(r))])}else i.operation===Zt.heartBeatResponse&&(i.heartBeatResponse={count:Wt.readInt(e,16,4)});return r};return new Promise(((n,i)=>{const r=new FileReader;r.onload=async e=>{if(!e.target)return void i(e);const r=new Uint8Array(e.target.result);n(await t(r))},r.readAsArrayBuffer(e)}))}}class Gt{constructor(){Rt(this,"startTime",0)}getLiveTime(){return new Promise((e=>{if(this.startTime)return void e(this.startTime);const t=(0,X.dq)(".bilibili-live-player-video-controller-duration-btn span"),[n]=(0,L.childList)(t,(t=>{if(t.length>0&&t.some((e=>e.addedNodes.length>0&&[...e.addedNodes].every((e=>e.nodeType===Node.TEXT_NODE))))){n.disconnect();const i=t[0].addedNodes[0].textContent,[r,a,o=0]=i.split(":").reverse().map(lodash.unary(parseInt)),s=Number(new Date);this.startTime=s-1e3*o*3600-60*a*1e3-1e3*r,e(this.startTime)}}))}))}}class Xt extends EventTarget{constructor(e){super(),this.roomID=e,Rt(this,"heartBeatTimer",void 0),Rt(this,"webSocket",void 0),Rt(this,"retryInterval",200),Rt(this,"autoRetry",!0),Rt(this,"servers",["broadcastlv.chat.bilibili.com"]),Rt(this,"selectedServer",""),Rt(this,"liveTime",new Gt),Rt(this,"bufferHelper",new Wt),Rt(this,"stopRequested",!1),window.addEventListener("unload",(()=>this.stop()))}heartBeat(){this.webSocket.readyState===WebSocket.OPEN?this.webSocket.send(this.bufferHelper.encode("","heartBeat")):(this.stop(),this.restart())}restart(){if(this.dispatchEvent(new CustomEvent("restart")),!this.stopRequested&&this.autoRetry){console.log(`Live Socket: unexpected disconnect, retry in ${this.retryInterval}ms`);const e=this.servers.indexOf(this.selectedServer);ethis.start()),this.retryInterval)}}async start(){const e=await(0,C.getJson)(`https://api.live.bilibili.com/room/v1/Danmu/getConf?room_id=${this.roomID}&platform=pc&player=web`),t=lodash.get(e,"data.host_server_list",[]);this.servers=[...new Set([...this.servers,...t.map((e=>e.host))])],""===this.selectedServer&&([this.selectedServer]=this.servers,console.log("Initial server:",this.selectedServer)),this.webSocket&&[WebSocket.CONNECTING,WebSocket.OPEN].includes(this.webSocket.readyState)&&this.stop(),this.webSocket=new WebSocket(`wss://${this.selectedServer}/sub`),this.stopRequested=!1,this.dispatchEvent(new CustomEvent("start",{detail:this.webSocket})),this.webSocket.addEventListener("open",(()=>{const t={roomid:this.roomID,uid:parseInt((0,X.getUID)()),protover:2,platform:"web",clientVer:"1.10.1",type:"2",key:lodash.get(e,"data.token")};this.webSocket.send(this.bufferHelper.encode(JSON.stringify(t),"enterRoom")),this.dispatchEvent(new CustomEvent("open",{detail:t}))})),this.webSocket.addEventListener("message",(async e=>{const[t]=await this.bufferHelper.decode(e.data);switch(this.dispatchEvent(new CustomEvent("message",{detail:t})),t.operation){case Zt.enterRoomResponse:this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.heartBeatTimer=window.setInterval((()=>{this.heartBeat()}),3e4);break;case Zt.heartBeatResponse:if(!t.heartBeatResponse)break;this.dispatchEvent(new CustomEvent("heartBeatResponse",{detail:t.heartBeatResponse.count}));break;case Zt.message:{if(!t.messages)break;const e=await this.liveTime.getLiveTime();t.messages.forEach((t=>{if("DANMU_MSG"===t.cmd){const{info:n}=t,i={content:n[1],type:n[0][1],fontSize:n[0][2],color:n[0][3],sendTime:n[0][4],userHash:n[0][7],userID:n[2][0],userName:n[2][1],startTime:e,get time(){return this.sendTime-this.startTime}};this.dispatchEvent(new CustomEvent("danmaku",{detail:i}))}}));break}}})),this.webSocket.addEventListener("close",(e=>{this.stopRequested||(console.error("Live Socket: close",e),this.restart())})),this.webSocket.addEventListener("error",(e=>{console.error("Live Socket: error",e),this.restart()}))}stop(){this.stopRequested=!0,this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.webSocket&&this.webSocket.readyState===WebSocket.OPEN&&this.webSocket.close()}}const Jt=[],Kt="bb-comment",Yt=[],Qt=[],en=[],tn=e=>{const t=e.querySelector(".con .user .name"),n=e=>{const t=e.querySelector(".reply-face"),n=e.querySelector(".reply-con .user .name");return{id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:n.textContent,content:e.querySelector(".text-con").textContent,timeText:e.querySelector(".info .time").textContent,likes:parseInt(e.querySelector(".info .like span").textContent)}},i={id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".con .text").textContent,timeText:e.querySelector(".con .info .time").textContent,likes:parseInt(e.querySelector(".con .like span").textContent),replies:[]};if(dq(e,".reply-box .view-more")){const t=dq(e,".reply-box");(0,L.childList)(t,(t=>{i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n),0!==t.length&&i.onRepliesUpdate?.(i.replies)}))}else i.replies=(0,X.dqa)(e,".reply-box .reply-item").map(n);return i},nn=e=>{if(e instanceof HTMLElement&&e.classList.contains(Kt)){const t={element:e,items:[]};Jt.push(t),(e=>{e.observer||(e.items=(0,X.dqa)(e.element,".list-item.reply-wrap").map(tn),e.items.forEach((e=>{Yt.forEach((t=>t(e)))})),[e.observer]=(0,L.childListSubtree)(e.element,(t=>{t.forEach((t=>{const n=e=>e instanceof HTMLElement&&e.classList.contains("list-item")&&e.classList.contains("reply-wrap");t.addedNodes.forEach((t=>{if(n(t)){const n=tn(t);e.items.push(n),Yt.forEach((e=>e(n)))}})),t.removedNodes.forEach((t=>{if(n(t)){const n=t.getAttribute("data-id"),i=e.items.findIndex((e=>e.id===n));if(-1!==i){const[t]=e.items.splice(i,1);Qt.forEach((e=>e(t)))}}}))}))})))})(t),en.forEach((e=>e(t)))}};(0,I.contentLoaded)((()=>{(0,L.allMutations)((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>nn(e)))}))})),(0,X.dqa)(".bb-comment").forEach(nn)}));const rn=e=>{Jt.forEach((t=>e(t))),en.push(e)},an=e=>{const{added:t,removed:n}=e;rn((e=>{t&&(e.items.forEach((e=>t(e))),Yt.push(t)),n&&Qt.push(n)}))},on=(e,t)=>{const n=dq(e.element,".opera-list ul"),{className:i,text:r,action:a}=t;if(!n||dq(n,`.${i}`))return;const o=document.createElement("li");o.classList.add(i),o.textContent=r,o.addEventListener("click",(e=>{a(e)})),n.appendChild(o)};var sn=n(2149);const ln=JSON.parse('[[{"name":"首页","route":"/","tid":"","locid":23,"sub":[]},{"name":"动画","route":"douga","tid":1,"locid":52,"count":"","subMenuSize":162,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2507,"leftId":2452,"rightId":2453},"sub":[{"name":"MAD·AMV","route":"mad","tid":24,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":151},"desc":"具有一定制作程度的动画或静画的二次创作视频","url":"//www.bilibili.com/video/douga-mad-1.html"},{"name":"MMD·3D","route":"mmd","tid":25,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":152},"desc":"使用MMD(MikuMikuDance)和其他3D建模类软件制作的视频","url":"//www.bilibili.com/video/douga-mmd-1.html"},{"name":"短片·手书·配音","route":"voice","tid":47,"ps":15,"rps":10,"desc":"追求创新并具有强烈特色的短片、手书(绘)及ACG相关配音","url":"//www.bilibili.com/video/douga-voice-1.html"},{"name":"手办·模玩","route":"garage_kit","tid":210,"ps":15,"rps":10,"desc":"手办模玩的测评、改造或其他衍生内容","url":""},{"name":"特摄","route":"tokusatsu","tid":86,"ps":15,"rps":10,"desc":"特摄相关衍生视频","url":"//www.bilibili.com/video/cinephile-tokusatsu.html"},{"name":"综合","route":"other","tid":27,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":153},"desc":"以动画及动画相关内容为素材,包括但不仅限于音频替换、杂谈、排行榜等内容","url":"//www.bilibili.com/video/douga-else-1.html"}]},{"name":"番剧","route":"anime","tid":13,"url":"//www.bilibili.com/anime/","takeOvered":true,"count":"","subMenuSize":172,"combination":true,"sub":[{"name":"连载动画","tid":33,"route":"serial","desc":"当季连载的动画番剧","url":"//www.bilibili.com/video/bangumi-two-1.html"},{"name":"完结动画","tid":32,"route":"finish","desc":"已完结的动画番剧合集","url":"//www.bilibili.com/video/part-twoelement-1.html"},{"name":"资讯","tid":51,"route":"information","desc":"动画番剧相关资讯视频","url":"//www.bilibili.com/video/douga-else-information-1.html"},{"name":"官方延伸","tid":152,"route":"offical","desc":"动画番剧为主题的宣传节目、采访视频,及声优相关视频","url":"//www.bilibili.com/video/bagumi_offical_1.html"},{"name":"新番时间表","url":"//www.bilibili.com/anime/timeline/","desc":""},{"name":"番剧索引","url":"//www.bilibili.com/anime/index/","desc":""}]},{"name":"国创","tid":167,"route":"guochuang","url":"//www.bilibili.com/guochuang/","takeOvered":true,"count":"","subMenuSize":214,"combination":true,"sub":[{"name":"国产动画","tid":153,"route":"chinese","desc":"我国出品的PGC动画","url":"//www.bilibili.com/video/bangumi_chinese_1.html"},{"name":"国产原创相关","tid":168,"route":"original","desc":"","url":"//www.bilibili.com/video/guochuang-fanvid-1.html"},{"name":"布袋戏","tid":169,"route":"puppetry","desc":"","url":"//www.bilibili.com/video/glove-puppetry-1.html"},{"name":"动态漫·广播剧","tid":195,"route":"motioncomic","desc":"","url":""},{"name":"资讯","tid":170,"route":"information","desc":"","url":"//www.bilibili.com/video/guochuang-offical-1.html"},{"name":"新番时间表","url":"//www.bilibili.com/guochuang/timeline/","desc":""},{"name":"国产动画索引","url":"//www.bilibili.com/guochuang/index/","desc":""}]},{"name":"音乐","route":"music","tid":3,"locid":58,"count":"","subMenuSize":268,"slider":{"width":620,"height":220},"viewTag":true,"customComponent":{"name":"Energy","titleId":2511,"leftId":2462,"rightId":3131,"rightType":"slide"},"sub":[{"name":"原创音乐","route":"original","tid":28,"ps":15,"rps":10,"viewHotTag":true,"ad":{"active":true,"dataLocId":243},"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"个人或团队制作以音乐为主要原创因素的歌曲或纯音乐","url":"//www.bilibili.com/video/music-original-1.html"},{"name":"翻唱","route":"cover","tid":31,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":245},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"一切非官方的人声再演绎歌曲作品","url":"//www.bilibili.com/video/music-Cover-1.html"},{"name":"VOCALOID·UTAU","route":"vocaloid","tid":30,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以雅马哈Vocaloid和UTAU引擎为基础,包含其他调教引擎,运用各类音源进行的歌曲创作内容","url":"//www.bilibili.com/video/music-vocaloid-1.html"},{"name":"电音","route":"electronic","tid":194,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"以电子合成器、音乐软体等产生的电子声响制作的音乐","url":"#"},{"name":"演奏","route":"perform","tid":59,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":247},"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"传统或非传统乐器及器材的演奏作品","url":"//www.bilibili.com/video/music-perform-1.html"},{"name":"MV","route":"mv","tid":193,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐录影带,为搭配音乐而拍摄或制作的视频","url":"//www.bilibili.com/video/music-coordinate-1.html"},{"name":"音乐现场","route":"live","tid":29,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"音乐实况表演视频","url":"//www.bilibili.com/video/music-oped-1.html"},{"name":"音乐综合","route":"other","tid":130,"ps":15,"rps":10,"viewHotTag":true,"dpConfig":[{"name":"一日","value":1},{"name":"三日","value":3}],"desc":"收录无法定义到其他音乐子分区的音乐视频","url":"//www.bilibili.com/video/music-collection-1.html"},{"name":"音频","customZone":"Audio","route":"audio","url":"//www.bilibili.com/audio/home?musicType=music"},{"name":"说唱","url":"//www.bilibili.com/v/rap"}]},{"name":"舞蹈","route":"dance","tid":129,"locid":64,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2513,"leftId":2472,"rightId":2473},"sub":[{"name":"宅舞","route":"otaku","tid":20,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":249},"desc":"与ACG相关的翻跳、原创舞蹈","url":"//www.bilibili.com/video/dance-1.html"},{"name":"街舞","route":"hiphop","tid":198,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":251},"desc":"收录街舞相关内容,包括赛事现场、舞室作品、个人翻跳、FREESTYLE等","url":""},{"name":"明星舞蹈","route":"star","tid":199,"ps":15,"rps":10,"desc":"国内外明星发布的官方舞蹈及其翻跳内容","url":""},{"name":"中国舞","route":"china","tid":200,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":253},"desc":"传承中国艺术文化的舞蹈内容,包括古典舞、民族民间舞、汉唐舞、古风舞等","url":""},{"name":"舞蹈综合","route":"three_d","tid":154,"ps":15,"rps":10,"desc":"收录无法定义到其他舞蹈子分区的舞蹈视频","url":""},{"name":"舞蹈教程","route":"demo","tid":156,"ps":10,"rps":6,"desc":"镜面慢速,动作分解,基础教程等具有教学意义的舞蹈视频","url":"//www.bilibili.com/video/dance-demo-1.html"}]},{"name":"游戏","route":"game","tid":4,"locid":70,"count":"","subMenuSize":240,"slider":{"width":470,"height":216},"viewTag":true,"customComponent":{"name":"Energy","titleId":3761,"leftId":3765,"rightId":3775,"rightType":"slide"},"recommendCardType":"GameGroomBox","sub":[{"name":"单机游戏","route":"stand_alone","tid":17,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":255},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以所有平台(PC、主机、移动端)的单机或联机游戏为主的视频内容,包括游戏预告、CG、实况解说及相关的评测、杂谈与视频剪辑等","url":"//www.bilibili.com/video/videogame-1.html"},{"name":"电子竞技","route":"esports","tid":171,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":257},"desc":"具有高对抗性的电子竞技游戏项目,其相关的赛事、实况、攻略、解说、短剧等视频。","url":"//www.bilibili.com/video/esports-1.html"},{"name":"手机游戏","route":"mobile","tid":172,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"desc":"以手机及平板设备为主要平台的游戏,其相关的实况、攻略、解说、短剧、演示等视频。","url":"//www.bilibili.com/video/mobilegame-1.html"},{"name":"网络游戏","route":"online","tid":65,"ps":10,"rps":7,"rankshow":1,"viewHotTag":true,"ad":{"active":true,"dataLocId":259},"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由网络运营商运营的多人在线游戏,以及电子竞技的相关游戏内容。包括赛事、攻略、实况、解说等相关视频","url":"//www.bilibili.com/video/onlinegame-1.html"},{"name":"桌游棋牌","route":"board","tid":173,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"desc":"桌游、棋牌、卡牌对战等及其相关电子版游戏的实况、攻略、解说、演示等视频。","url":"//www.bilibili.com/video/boardgame-1.html"},{"name":"GMV","route":"gmv","tid":121,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"由游戏素材制作的MV视频。以游戏内容或CG为主制作的,具有一定创作程度的MV类型的视频","url":"//www.bilibili.com/video/gmv-1.html"},{"name":"音游","route":"music","tid":136,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"各个平台上,通过配合音乐与节奏而进行的音乐类游戏视频","url":"//www.bilibili.com/video/music-game-1.html"},{"name":"Mugen","route":"mugen","tid":19,"ps":5,"rps":3,"rankshow":1,"viewHotTag":true,"dpConfig":[{"name":"三日","value":3},{"name":"一日","value":1},{"name":"一周","value":7}],"desc":"以Mugen引擎为平台制作、或与Mugen相关的游戏视频","url":"//www.bilibili.com/video/game-mugen-1.html"},{"name":"游戏赛事","url":"//www.bilibili.com/v/game/match/","newIcon":true}]},{"name":"知识","route":"knowledge","tid":36,"locid":76,"count":"","subMenuSize":172,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2058,"leftId":2047,"rightId":2048},"sub":[{"name":"科学科普","route":"science","tid":201,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":261},"desc":"回答你的十万个为什么"},{"name":"社科·法律·心理","route":"social_science","tid":124,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":263},"desc":"基于社会科学、法学、心理学展开或个人观点输出的知识视频"},{"name":"人文历史","route":"humanity_history","tid":228,"ps":15,"rps":10,"desc":"看看古今人物,聊聊历史过往,品品文学典籍"},{"name":"财经商业","route":"business","tid":207,"ps":15,"rps":10,"desc":"说金融市场,谈宏观经济,一起畅聊商业故事"},{"name":"校园学习","route":"campus","tid":208,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":265},"desc":"老师很有趣,学生也有才,我们一起搞学习"},{"name":"职业职场","route":"career","tid":209,"ps":15,"rps":10,"desc":"职业分享、升级指南,一起成为最有料的职场人"},{"name":"设计·创意","route":"design","tid":229,"ps":15,"rps":10,"desc":"天马行空,创意设计,都在这里"},{"name":"野生技能协会","route":"skill","tid":122,"ps":15,"rps":10,"desc":"技能党集合,是时候展示真正的技术了"}]},{"name":"科技","route":"tech","tid":188,"locid":2977,"count":"","subMenuSize":80,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2980,"leftId":2978,"rightId":2979},"sub":[{"name":"数码","route":"digital","tid":95,"ps":15,"rps":10,"viewHotTag":true,"desc":"科技数码产品大全,一起来做发烧友","url":"#"},{"name":"软件应用","route":"application","tid":230,"ps":15,"rps":10,"viewHotTag":true,"desc":"超全软件应用指南","url":"#"},{"name":"计算机技术","route":"computer_tech","tid":231,"ps":15,"rps":10,"viewHotTag":true,"desc":"研究分析、教学演示、经验分享......有关计算机技术的都在这里","url":"#"},{"name":"工业·工程·机械","route":"industry","tid":232,"ps":15,"rps":10,"viewHotTag":true,"desc":"前方高能,机甲重工即将出没","url":"#"},{"name":"极客DIY","route":"diy","tid":233,"ps":15,"rps":10,"viewHotTag":true,"desc":"炫酷技能,极客文化,硬核技巧,准备好你的惊讶","url":"#"}]},{"name":"运动","route":"sports","tid":234,"locid":4639,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4646,"rightId":4652,"rightType":"slide"},"sub":[{"name":"篮球·足球","route":"basketballfootball","tid":235,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4656},"desc":"与篮球、足球相关的视频,包括但不限于篮足球赛事、教学、评述、剪辑、剧情等相关内容","url":"#"},{"name":"健身","route":"aerobics","tid":164,"ps":15,"rps":10,"desc":"与健身相关的视频,包括但不限于瑜伽、CrossFit、健美、力量举、普拉提、街健等相关内容","url":"//www.bilibili.com/video/fashion-body-1.html"},{"name":"竞技体育","route":"athletic","tid":236,"ps":15,"rps":10,"desc":"与竞技体育相关的视频,包括但不限于乒乓、羽毛球、排球、赛车等竞技项目的赛事、评述、剪辑、剧情等相关内容","url":"#"},{"name":"运动文化","route":"culture","tid":237,"ps":15,"rps":10,"desc":"与运动文化相关的视频,包络但不限于球鞋、球衣、球星卡等运动衍生品的分享、解读,体育产业的分析、科普等相关内容","url":"#"},{"name":"运动综合","route":"comprehensive","tid":238,"ps":15,"rps":10,"desc":"与运动综合相关的视频,包括但不限于钓鱼、骑行、滑板等日常运动分享、教学、Vlog等相关内容","url":"#"}]},{"name":"汽车","route":"car","tid":223,"locid":4428,"isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4435,"rightId":4441,"rightType":"slide"},"sub":[{"name":"汽车生活","route":"life","tid":176,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4445},"desc":"分享汽车及出行相关的生活体验类视频","url":"#"},{"name":"汽车文化","route":"culture","tid":224,"ps":15,"rps":10,"desc":"车迷的精神圣地,包括汽车赛事、品牌历史、汽车改装、经典车型和汽车模型等","url":"#"},{"name":"汽车极客","route":"geek","tid":225,"ps":15,"rps":10,"desc":"汽车硬核达人聚集地,包括DIY造车、专业评测和技术知识分享","url":"#"},{"name":"摩托车","route":"motorcycle","tid":240,"ps":15,"rps":10,"desc":"骑士们集合啦","url":"#"},{"name":"智能出行","route":"smart","tid":226,"ps":15,"rps":10,"desc":"探索新能源汽车和未来智能出行的前沿阵地","url":"#"},{"name":"购车攻略","route":"strategy","tid":227,"ps":15,"rps":10,"desc":"丰富详实的购车建议和新车体验","url":"#"}]},{"name":"生活","route":"life","tid":160,"locid":88,"count":"","subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2062,"leftId":1674,"rightId":1670},"sub":[{"name":"搞笑","route":"funny","tid":138,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":273},"desc":"各种沙雕有趣的搞笑剪辑,挑战,表演,配音等视频","url":"//www.bilibili.com/video/ent_funny_1.html","locid":4204,"recommendId":4210,"slider":{"width":620,"height":220},"customComponent":{"name":"Energy","leftId":4212,"rightId":4218,"rightType":"slide"}},{"name":"家居房产","route":"home","tid":239,"ps":15,"rps":10,"desc":"与买房、装修、居家生活相关的分享","url":"#"},{"name":"手工","route":"handmake","tid":161,"ps":15,"rps":10,"desc":"手工制品的制作过程或成品展示、教程、测评类视频","url":"//www.bilibili.com/video/ent-handmake-1.html"},{"name":"绘画","route":"painting","tid":162,"ps":15,"rps":10,"desc":"绘画过程或绘画教程,以及绘画相关的所有视频","url":"//www.bilibili.com/video/ent-painting-1.html"},{"name":"日常","route":"daily","tid":21,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":275},"desc":"记录日常生活,分享生活故事","url":"//www.bilibili.com/video/ent-life-1.html"}]},{"name":"美食","route":"food","tid":211,"locid":4243,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4258,"rightId":4264},"sub":[{"name":"美食制作","route":"make","tid":76,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":4268},"desc":"学做人间美味,展示精湛厨艺","url":"#"},{"name":"美食侦探","route":"detective","tid":212,"ps":15,"rps":10,"desc":"寻找美味餐厅,发现街头美食","url":"#"},{"name":"美食测评","route":"measurement","tid":213,"ps":15,"rps":10,"desc":"吃货世界,品尝世间美味","url":"#"},{"name":"田园美食","route":"rural","tid":214,"ps":15,"rps":10,"desc":"品味乡野美食,寻找山与海的味道","url":"#"},{"name":"美食记录","route":"record","tid":215,"ps":15,"rps":10,"desc":"记录一日三餐,给生活添一点幸福感","url":"#"}]},{"name":"动物圈","route":"animal","tid":217,"locid":4365,"count":"","isHide":true,"subMenuSize":164,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","leftId":4376,"rightId":4381,"rightType":"slide"},"sub":[{"name":"喵星人","route":"cat","tid":218,"ps":15,"rps":10,"desc":"喵喵喵喵喵","url":"#","ad":{"active":true,"dataLocId":4385}},{"name":"汪星人","route":"dog","tid":219,"ps":15,"rps":10,"desc":"汪汪汪汪汪","url":"#"},{"name":"大熊猫","route":"panda","tid":220,"ps":15,"rps":10,"desc":"芝麻汤圆营业中","url":"#"},{"name":"野生动物","route":"wild_animal","tid":221,"ps":15,"rps":10,"desc":"内有“猛兽”出没","url":"#"},{"name":"爬宠","route":"reptiles","tid":222,"ps":15,"rps":10,"desc":"鳞甲有灵","url":"#"},{"name":"动物综合","route":"animal_composite","tid":75,"ps":15,"rps":10,"desc":"收录除上述子分区外,其余动物相关视频以及非动物主体或多个动物主体的动物相关延伸内容","url":"#"}]},{"name":"鬼畜","route":"kichiku","tid":119,"locid":100,"count":"","subMenuSize":182,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2509,"leftId":2482,"rightId":2483},"sub":[{"name":"鬼畜调教","route":"guide","tid":22,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":285},"desc":"使用素材在音频、画面上做一定处理,达到与BGM一定的同步感","url":"//www.bilibili.com/video/ent-Kichiku-1.html"},{"name":"音MAD","route":"mad","tid":26,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":287},"desc":"使用素材音频进行一定的二次创作来达到还原原曲的非商业性质稿件","url":"//www.bilibili.com/video/douga-kichiku-1.html"},{"name":"人力VOCALOID","route":"manual_vocaloid","tid":126,"ps":15,"rps":10,"desc":"将人物或者角色的无伴奏素材进行人工调音,使其就像VOCALOID一样歌唱的技术","url":"//www.bilibili.com/video/kichiku-manual_vocaloid-1.html"},{"name":"鬼畜剧场","route":"theatre","tid":216,"ps":15,"rps":10,"desc":"使用素材进行人工剪辑编排的有剧情的作品"},{"name":"教程演示","route":"course","tid":127,"ps":10,"rps":6,"rightComponent":{"name":"CmImgList","id":148},"ad":{"active":true,"dataLocId":289},"hideDropdown":false,"desc":"鬼畜相关的教程演示","url":"//www.bilibili.com/video/kichiku-course-1.html"}]},{"name":"时尚","route":"fashion","tid":155,"locid":94,"count":"","subMenuSize":124,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2515,"leftId":2492,"rightId":2493},"sub":[{"name":"美妆护肤","route":"makeup","tid":157,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":279},"desc":"彩妆护肤、美甲美发、仿妆、医美相关内容分享或产品测评","url":"//www.bilibili.com/video/fashion-makeup-fitness-1.html"},{"name":"穿搭","route":"clothing","tid":158,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":281},"desc":"穿搭风格、穿搭技巧的展示分享,涵盖衣服、鞋靴、箱包配件、配饰(帽子、钟表、珠宝首饰)等","url":"//www.bilibili.com/video/fashion-clothing-1.html"},{"name":"时尚潮流","route":"trend","tid":159,"ps":15,"rps":10,"desc":"时尚街拍、时装周、时尚大片,时尚品牌、潮流等行业相关记录及知识科普","url":"#"}]},{"name":"资讯","route":"information","tid":202,"locid":4076,"count":"","subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"sub":[{"name":"热点","route":"hotspot","tid":203,"ps":18,"rps":10,"desc":"全民关注的时政热门资讯"},{"name":"环球","route":"global","tid":204,"ps":18,"rps":10,"desc":"全球范围内发生的具有重大影响力的事件动态"},{"name":"社会","route":"social","tid":205,"ps":18,"rps":10,"desc":"日常生活的社会事件、社会问题、社会风貌的报道"},{"name":"综合","route":"multiple","tid":206,"ps":18,"rps":10,"desc":"除上述领域外其它垂直领域的综合资讯"}]},{"name":"娱乐","route":"ent","tid":5,"locid":82,"count":"","subMenuSize":62,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2067,"leftId":2065,"rightId":2066},"sub":[{"name":"综艺","route":"variety","tid":71,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":267},"desc":"所有综艺相关,全部一手掌握!","url":"//www.bilibili.com/video/ent-variety-1.html"},{"name":"娱乐杂谈","route":"talker","tid":241,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":269},"desc":"娱乐人物解读、娱乐热点点评、娱乐行业分析"},{"name":"粉丝创作","route":"fans","tid":242,"ps":15,"rps":10,"desc":"粉丝向创作视频"},{"name":"明星综合","route":"celebrity","tid":137,"ps":15,"rps":10,"desc":"娱乐圈动态、明星资讯相关"}]},{"name":"影视","route":"cinephile","tid":181,"locid":2211,"count":"","subMenuSize":84,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":2309,"leftId":2307,"rightId":2308},"sub":[{"name":"影视杂谈","route":"cinecism","tid":182,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2212},"desc":"影视评论、解说、吐槽、科普等","url":"//www.bilibili.com/video/cinephile-cinecism.html"},{"name":"影视剪辑","route":"montage","tid":183,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2213},"desc":"对影视素材进行剪辑再创作的视频","url":"//www.bilibili.com/video/cinephile-montage.html"},{"name":"短片","route":"shortfilm","tid":85,"ps":15,"rps":10,"desc":"追求自我表达且具有特色的短片","url":"//www.bilibili.com/video/cinephile-shortfilm.html"},{"name":"预告·资讯","route":"trailer_info","tid":184,"ps":15,"rps":10,"ad":{"active":true,"dataLocId":2214},"desc":"影视类相关资讯,预告,花絮等视频","url":"//www.bilibili.com/video/cinephile-trailer-info.html"}]},{"name":"纪录片","route":"documentary","tid":177,"url":"//www.bilibili.com/documentary/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"人文·历史","tid":37,"route":"history","dise":"","url":"//www.bilibili.com/video/doco-history.html"},{"name":"科学·探索·自然","tid":178,"route":"science","dise":"","url":"//www.bilibili.com/video/doco-science.html"},{"name":"军事","tid":179,"route":"military","dise":"","url":"//www.bilibili.com/video/doco-military.html"},{"name":"社会·美食·旅行","tid":180,"route":"travel","dise":"","url":"//www.bilibili.com/video/doco-travel.html"},{"name":"纪录片索引","url":"//www.bilibili.com/documentary/index/"}]},{"name":"电影","route":"movie","tid":23,"url":"//www.bilibili.com/movie/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"华语电影","tid":147,"route":"chinese","desc":"","url":"//www.bilibili.com/video/movie_chinese_1.html"},{"name":"欧美电影","tid":145,"route":"west","desc":"","url":"//www.bilibili.com/video/movie_west_1.html"},{"name":"日本电影","tid":146,"route":"japan","desc":"","url":"//www.bilibili.com/video/movie_japan_1.html"},{"name":"其他国家","tid":83,"route":"movie","desc":"","url":"//www.bilibili.com/video/movie-movie-1.html"},{"name":"电影索引","url":"//www.bilibili.com/movie/index/"}]},{"name":"电视剧","route":"tv","tid":11,"url":"//www.bilibili.com/tv/","count":"","takeOvered":true,"hasParent":true,"combination":true,"sub":[{"name":"国产剧","tid":185,"route":"mainland","desc":"","url":"//www.bilibili.com/video/tv-mainland.html"},{"name":"海外剧","tid":187,"route":"overseas","desc":"","url":"//www.bilibili.com/video/tv-overseas.html"},{"name":"电视剧索引","url":"//www.bilibili.com/tv/index/"}]},{"name":"虚拟UP主","route":"virtual","locid":4735,"count":"","isHide":true,"subMenuSize":60,"slider":{"width":620,"height":220},"viewTag":false,"customComponent":{"name":"Energy","titleId":4754,"leftId":4756},"sub":[{"name":"游戏","route":"game","tid":4,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/game"},{"name":"音乐","route":"music","tid":3,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/music"},{"name":"动画","route":"douga","tid":1,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/douga"},{"name":"其他","route":"other","tid":0,"ps":18,"rps":10,"url":"//www.bilibili.com/v/virtual/other"}]}],[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}],[{"name":"会员购","url":"//show.bilibili.com/platform/home.html","icon":"icon-vip-buy"},{"name":"游戏中心","url":"//game.bilibili.com","icon":"icon-game"},{"name":"画友","url":"http://h.bilibili.com","icon":"icon-hy"},{"name":"芒果TV","url":"//www.bilibili.com/mango","icon":"icon-mango"}],[{"name":"专栏","report":"article","url":"//www.bilibili.com/read/home","icon":"read"},{"name":"直播","report":"live","url":"//live.bilibili.com","icon":"live","sub":[{"url":"//live.bilibili.com/all","name":"全部直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=2&areaId=0","name":"网游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=3&areaId=0","name":"手游直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=6&areaId=0","name":"单机直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=1&areaId=0","name":"娱乐直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=5&areaId=0","name":"电台直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=9&areaId=0","name":"虚拟直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=10&areaId=0","name":"生活直播"},{"url":"//live.bilibili.com/p/eden/area-tags?parentAreaId=11&areaId=0","name":"学习直播"}]},{"name":"活动","report":"activity","url":"//www.bilibili.com/blackboard/activity-list.html","icon":"activit"},{"name":"课堂","report":"cheese","url":"//www.bilibili.com/cheese/","icon":"zhishi"},{"name":"小黑屋","report":"blackroom","url":"//www.bilibili.com/blackroom/","icon":"blackroom"},{"name":"新歌热榜","report":"musicplus","url":"//www.bilibili.com/v/musicplus/","icon":"musicplus"}]]'),cn=e=>e.startsWith("//")?`https:${e}`:e.replace("http:","https:"),dn=ln[0].filter((e=>"string"!=typeof e.tid)),un=ln[3],pn={};dn.forEach((e=>{const t=cn(`https://www.bilibili.com/v/${e.route}/`);pn[e.name]={icon:e.route,code:e.tid,link:t,subCategories:e.sub?Object.fromEntries(e.sub.map((e=>{const n=cn(e.route?`${t}${e.route}/`:e.url);return[e.name,n]}))):null}})),un.forEach((e=>{pn[e.name]={icon:e.icon,code:null,link:cn(e.url),subCategories:e.sub?Object.fromEntries(e.sub.map((e=>[e.name,cn(e.url)]))):null}}));const fn=pn,hn=Object.fromEntries(dn.map((e=>[e.route,e.tid]))),mn=Object.fromEntries(Object.values(pn).map((e=>[e.icon,e.link]))),gn=async()=>{if(document.getElementById("be-category-icons"))return;const{default:e}=await Promise.resolve().then(n.bind(n,382));document.body.insertAdjacentHTML("beforeend",e)};var bn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"translate-container"},[e.working||e.translated?e._e():n("div",{staticClass:"translate",on:{click:function(t){return e.translate()}}},[n("VIcon",{attrs:{size:14,icon:"mdi-earth"}}),e._v("翻译\n ")],1),e._v(" "),e.translated?n("div",{staticClass:"translated"},[n("a",{attrs:{href:e.activeTranslator&&e.activeTranslator.link,target:"_blank"}},[e._v("\n 翻译自\n ")]),e._v(" "),n("VDropdown",{attrs:{items:Object.values(e.translateProviders),value:e.activeTranslator,"key-mapper":function(e){return e.name}},on:{change:function(t){return e.changeTranslator(t)}},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[e._v("\n "+e._s(n.name)+"\n ")]}}],null,!1,1956376614)})],1):e._e(),e._v(" "),e.working?n("VIcon",{staticClass:"translating mdi-spin",attrs:{size:18,icon:"mdi-loading"}}):e._e(),e._v(" "),!e.working&&e.translated?n("div",{staticClass:"translate-result",domProps:{textContent:e._s(e.result)}}):e._e()],1)};bn._withStripped=!0;var vn=n(1993),yn=Vue.extend({components:{VDropdown:ce.VDropdown,VIcon:ce.VIcon},props:{text:{type:String,required:!0}},data:()=>({result:"",working:!1,translateProviders:vn.WK,activeTranslator:{}}),computed:{translated(){return""!==this.result}},methods:{changeTranslator(e){(0,U.getComponentSettings)("i18n").options.translator=e.name,this.translate()},async translate(){try{this.working=!0;const e=this.text.replace(/#(.+?)#/g,"");this.activeTranslator=(0,vn.Ty)();const t=this.activeTranslator;this.result=await t.translate(e)}catch(e){(0,re.logError)(e)}finally{this.working=!1}}}}),wn=n(4618),xn=n.n(wn),kn={insert:"head",singleton:!1},_n=(je()(xn(),kn),xn().locals,(0,Ue.Z)(yn,bn,[],!1,null,null,null));_n.options.__file="src/components/i18n/machine-translator/MachineTranslator.vue";var Cn=_n.exports;const Sn=e=>{void 0===e.radio&&(e.radio=!1);const{name:t,switches:i}=e,r={};return Object.entries(i).forEach((([e,{displayName:t,defaultValue:n}])=>{r[`switch-${e}`]={defaultValue:n,displayName:t,hidden:!0}})),i=>{const a=`${i.displayName}选项`,o={componentName:i.name,optionDisplayName:a};Object.assign(e,o),r[t]={defaultValue:e,displayName:a},i.options={...i.options,...r},i.widget||(i.widget={component:()=>Promise.resolve().then(n.bind(n,1299)).then((e=>e.default)),options:e});const s=i.entry;return i.entry=async(...e)=>{s?.(...e);const{name:t}=i,n=(0,U.getComponentSettings)(t).options;Object.keys(n).forEach((e=>{e.startsWith("switch-")&&(0,U.addComponentListener)(`${t}.${e}`,(n=>{document.body.classList.toggle(`${t}-${e}`,n)}),!0)}))},i}};const En={component:de,userComponent:ue,styledComponent:s,description:he,switchOptions:_,launchBar:{LaunchBar:n(3059).Z},feeds:{api:c,BangumiCard:Ze,VideoCard:Qe,ColumnCard:ot,disableProfilePopup:d,notify:u},video:{assUtils:p,playerLight:f,playerAgent:_t,videoDanmaku:h,videoInfo:m,videoQuality:g,videoContextMenu:b,videoControlBar:v,watchlater:l},live:{liveControlBar:y,liveSocket:w},utils:{commentApis:x,categories:{updater:sn,data:k}},i18N:{machineTranslator:{MachineTranslator:Cn}}};var $n=n(8900),An=n(1623),In=n(9543);const Tn={style:$n,plugin:An,data:ve,hook:In},On={ajax:C,cdnTypes:S,download:E,externalInput:$,filePicker:A,lifeCycle:I,loadingMode:T,meta:O,observer:L,reorder:i,runtimeLibrary:j,spinQuery:q,style:F,textColor:R,userInfo:r,version:a,settings:U,toast:se,themeColor:le,utils:{...X,constants:J,formatters:K,title:Y,i18n:Q,lazyPanel:o,log:re,sort:ae,urls:oe},ui:ce,componentApis:En,pluginApis:Tn},Ln={ajax:C,...S,...E,...$,...A,lifeCycle:I,...T,...O,observer:L,...i,runtimeLibrary:j,spinQuery:q,...F,...R,...r,...a,settingsApis:U,get settings(){return U.settings},...se,utils:{...X,...J,...K,...Y,...Q,...o,...re,...ae,...oe},ui:ce,componentApis:{...En.component,...En.userComponent,...En.styledComponent,...En.launchBar,...lodash.omit(En,"component","userComponent","styledComponent","launchBar")},pluginApis:{...Tn.style,...Tn.plugin,...Tn.data,...Tn.hook},monkeyApis:{GM_setValue:GM_setValue,GM_getValue:GM_getValue,GM_deleteValue:GM_deleteValue,GM_xmlhttpRequest:GM_xmlhttpRequest,GM_info:GM_info},lodash:lodash,Vue:Vue,sandboxWindow:window,theWorld:e=>{setTimeout((()=>{}),e)}}},5300:function(e,t,n){"use strict";let i;n.d(t,{h:function(){return i}}),function(e){e.Packed="打包下载",e.Individual="单独下载"}(i||(i={}))},4114:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadPackage:function(){return l}});var i=n(5300),r=n(391),a=n(6171),o=n(3708);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l{constructor(e=[]){this.entries=e,s(this,"noEscape",!1)}add(e,t,n={}){null!=t&&this.entries.push({name:this.noEscape?e:(0,o.formatFilename)(e),data:t,options:n})}async blob(){if(0===this.entries.length)return null;if(1===this.entries.length){const{data:e}=this.entries[0];return"string"==typeof e?new Blob([e]):e}const e=new(await r.JSZipLibrary);return this.entries.forEach((({name:t,data:n,options:i})=>{e.file(t,n,i)})),e.generateAsync({type:"blob"})}async emit(e){if(0===this.entries.length)return;e&&1!==this.entries.length||(e=this.entries[0].name);if((0,a.getGeneralSettings)().downloadPackageEmitMode===i.h.Individual&&this.entries.length>1)return void await Promise.all(this.entries.map((e=>l.single(e.name,e.data,e.options))));const t=await this.blob();t&&l.download(e,t)}static download(e,t){const n=document.createElement("a"),i=URL.createObjectURL(t);l.lastPackageUrl&&URL.revokeObjectURL(l.lastPackageUrl),l.lastPackageUrl=i;const r=(0,o.formatFilename)(e);n.setAttribute("href",i),n.setAttribute("download",r),console.log("[Download file]",r),document.body.appendChild(n),n.click(),n.remove()}static async single(e,t,n={}){const i=new l;return i.add(e,t,n),i.emit()}}s(l,"lastPackageUrl","")},7731:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{parseExternalInput:function(){return parseExternalInput},batchParseCode:function(){return batchParseCode}});var _file_picker__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7590);const parseExternalInput=async input=>{if(void 0===input){const files=await(0,_file_picker__WEBPACK_IMPORTED_MODULE_0__.pickFile)({accept:"application/json"});if(!(files.length>0))return console.error("[parseExternalInput] No file selected"),null;{const[file]=files,text=await file.text();try{return eval(`(${text})`)}catch(e){return console.error(e),null}}}else{if("string"!=typeof input)return input;try{const exports={},result=eval(input);if(Object.values(exports).length>0){const e=Object.values(exports)[0];return e}return result}catch(e){return console.error(e),null}}},batchParseCode=async inputs=>{try{const exports={},result=inputs.map((input=>eval(input)));if(Object.values(exports).length>0){const{coreApis:e}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,9388));return Object.values(exports).map((t=>"function"==typeof t?t(e):t))}return result}catch(e){return console.error(e),null}}},7590:function(e,t,n){"use strict";let i,r;n.r(t),n.d(t,{pickFile:function(){return o}});const a={accept:"*",multiple:!1},o=async(e=a)=>{const{accept:t,multiple:n}={...a,...e};i||(i=document.createElement("input"),i.type="file",i.style.display="none",document.body.appendChild(i),i.addEventListener("change",(()=>{r?.([...i.files]),r=null}))),i.accept=t,i.multiple=n,i.value="",r&&r([]);return await new Promise((e=>{r=e,i.click()}))}},9513:function(e,t,n){"use strict";n.r(t),n.d(t,{tryParseZip:function(){return s},installFeatureFromCode:function(){return l},installFeature:function(){return c}});var i=n(7010),r=n(9543),a=n(1623),o=n(8900);const s=async e=>{const{JSZipLibrary:t}=await Promise.resolve().then(n.bind(n,391)),{monkey:i}=await Promise.resolve().then(n.bind(n,7195)),r=e.endsWith(".zip"),a=r?"blob":"text",o=await i({url:e,method:"GET",responseType:a});if(!r||"string"==typeof o)return o;const s=await t,l=await s.loadAsync(o),c=Object.values(l.files);if(0===c.length)throw new Error("Empty zip file");return c[0].async("text")},l=async(e,t)=>{const{parseExternalInput:s}=await Promise.resolve().then(n.bind(n,7731)),l=await s(e),{type:c,installer:d}=(()=>{if((e=>"entry"in e)(l))return{type:"component",installer:()=>(0,i.installComponent)(e)};if((e=>"setup"in e)(l))return{type:"plugin",installer:()=>(0,a.installPlugin)(e)};if((e=>"style"in e)(l))return{type:"style",installer:()=>(0,o.installStyle)(e)};throw new Error("无效的功能代码")})(),{before:u,after:p}=(0,r.getHook)(`user${lodash.startCase(c)}s.add`,e,t);await u();const f=await d();return await p(f.metadata),f},c=async e=>{const t=await s(e);return l(t,e)}},7177:function(e,t,n){"use strict";n.r(t),n.d(t,{headLoaded:function(){return r},contentLoaded:function(){return a},fullyLoaded:function(){return o},LifeCycleEventTypes:function(){return s},raiseLifeCycleEvent:function(){return l}});var i=n(3420);const r=e=>new Promise((t=>{if(null!==document.head)t(e());else{const[n]=(0,i.childList)(document.documentElement,(()=>{null!==document.head&&(n.disconnect(),t(e()))}))}})),a=e=>new Promise((t=>{"loading"!==document.readyState?t(e()):document.addEventListener("DOMContentLoaded",(()=>t(e())))})),o=e=>new Promise((t=>{"complete"===document.readyState?t(e()):unsafeWindow.addEventListener("load",(()=>t(e())))}));let s;!function(e){e.Start="be:start",e.StyleLoaded="be:style-loaded",e.ComponentsLoaded="be:components-loaded",e.End="be:end"}(s||(s={}));const l=e=>{unsafeWindow.dispatchEvent(new CustomEvent(e))}},4345:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{LoadingMode:function(){return i}}),function(e){e.Delay="延后",e.Race="同时"}(i||(i={}))},1836:function(e,t,n){"use strict";n.r(t),n.d(t,{branches:function(){return a},meta:function(){return s}});var i=JSON.parse('{"version":"2.0.4","author":"Grant Howard, Coulomb-G","copyright":"[year], Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)","licence":"MIT","match":"*://*.bilibili.com/*","exclude":["*://api.bilibili.com/*","*://api.*.bilibili.com/*","*://*.bilibili.com/api/*","*://member.bilibili.com/studio/bs-editor/*","*://t.bilibili.com/h5/dynamic/specification","*://bbq.bilibili.com/*"],"run-at":"document-start","supportURL":"https://github.com/the1812/Bilibili-Evolved/issues","homepage":"https://github.com/the1812/Bilibili-Evolved","grant":["unsafeWindow","GM_getValue","GM_setValue","GM_deleteValue","GM_info","GM_xmlhttpRequest"],"connect":["raw.githubusercontent.com","github.com","cdn.jsdelivr.net","cn.bing.com","www.bing.com","translate.google.cn","translate.google.com","localhost","*"],"require":["https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"],"icon":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo-small.png","icon64":"https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo.png"}'),r=n(2462);i.copyright=i.copyright.replace(/\[year\]/g,(new Date).getFullYear().toString());const a={stable:"v2",preview:"preview"},o={commitHash:"87be51e9960458e7f4755307485078d08edf3c95",branch:"preview",nearestTag:"v2.0.4-preview",versionWithTag:"v2.0.4-preview-1-g87be51e99"},s={compilationInfo:o,name:GM_info.script.name,description:GM_info.script.description,get originalFilename(){const{branch:e}=o;return e===a.stable?"bilibili-evolved.user.js":`bilibili-evolved.${e}.user.js`},get updateURL(){return`${r.cdnRoots.jsDelivr(o.branch)}dist/${this.originalFilename}`},get downloadURL(){return this.updateURL},...i}},3420:function(e,t,n){"use strict";n.r(t),n.d(t,{childList:function(){return l},childListSubtree:function(){return c},attributes:function(){return d},attributesSubtree:function(){return u},characterData:function(){return p},characterDataSubtree:function(){return f},allMutationsOn:function(){return h},allMutations:function(){return g},visible:function(){return v},visibleInside:function(){return y},sizeChange:function(){return w},urlChange:function(){return k},videoChange:function(){return S}});var i=n(1906),r=n(5550),a=n(7735);const o=e=>"string"==typeof e?(0,i.dqa)(e):Array.isArray(e)?e:[e],s=(e,t,n)=>{const i=new MutationObserver(n);return e.forEach((e=>i.observe(e,t))),n([],i),[i,t]},l=(e,t)=>s(o(e),{childList:!0,subtree:!1,attributes:!1},t),c=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!1},t),d=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!0},t),u=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!0},t),p=(e,t)=>s(o(e),{childList:!1,subtree:!1,attributes:!1,characterData:!0},t),f=(e,t)=>s(o(e),{childList:!1,subtree:!0,attributes:!1,characterData:!0},t),h=(e,t)=>s(o(e),{childList:!0,subtree:!0,attributes:!0,characterData:!0},t),m={observer:null,config:null,callbacks:[]},g=e=>{if(m.observer)m.callbacks.push(e);else{m.callbacks.push(e);const[t,n]=h(document.body,(e=>m.callbacks.forEach((t=>t(e,m.observer)))));m.observer=t,m.config=n}return m},b=(e,t,n)=>{const i=new IntersectionObserver(n,t);return e.forEach((e=>i.observe(e))),[i,t]},v=(e,t)=>b(o(e),{},t),y=(e,t,n,i)=>b(o(e),{root:t,rootMargin:n},i),w=(e,t)=>((e,t,n)=>{const i=new ResizeObserver(n);return e.forEach((e=>i.observe(e,t))),[i,t]})(o(e),{box:"border-box"},t),x=lodash.once((()=>{let e=document.URL;g((()=>{e!==document.URL&&((()=>{const e=new CustomEvent("urlChange",{detail:document.URL});window.dispatchEvent(e)})(),e=document.URL)}))})),k=(e,t)=>{x(),e(document.URL),window.addEventListener("urlChange",(()=>e(document.URL)),t)},_=lodash.once((()=>(0,r.select)((()=>{if(unsafeWindow.cid)return unsafeWindow.cid;if(unsafeWindow.player&&unsafeWindow.player.getVideoMessage){const e=unsafeWindow.player.getVideoMessage();return Number.isNaN(e.cid)?null:(!unsafeWindow.aid&&e.aid&&(unsafeWindow.aid=e.aid.toString()),!unsafeWindow.bvid&&e.bvid&&(unsafeWindow.bvid=e.bvid),e.cid.toString())}return null}))));let C=!1;const S=async(e,t)=>{if(!(0,a.matchCurrentPage)(a.playerUrls))return!1;const{bpxPlayerPolyfill:i}=await Promise.resolve().then(n.bind(n,6958));i();const r=await _();if(null===r)return!1;const o=()=>({aid:unsafeWindow.aid,cid:unsafeWindow.cid});if(!C){let e=r;Object.defineProperty(unsafeWindow,"cid",{get:()=>e,set(t){e=t,Array.isArray(t)||(()=>{const e=o(),t=new CustomEvent("videoChange",{detail:e});window.dispatchEvent(t)})()}}),C=!0}return e(o()),window.addEventListener("videoChange",(t=>e(t.detail)),t),!0}},1485:function(e,t,n){"use strict";n.r(t),n.d(t,{componentLoadTime:function(){return i},componentResolveTime:function(){return r},componentLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,6171));if(!t().devMode)return;const a=e.entry;e.entry=async e=>{const{metadata:t}=e,n=performance.now();let o=a(e);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(t,s-n),r.set(t,l-n),o}}},8970:function(e,t,n){"use strict";n.r(t),n.d(t,{pluginLoadTime:function(){return i},pluginResolveTime:function(){return r},pluginLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async e=>{const{getGeneralSettings:t}=await Promise.resolve().then(n.bind(n,6171));if(!t().devMode)return;const a=e.setup;e.setup=async t=>{const n=performance.now();let o=a(t);const s=performance.now();o instanceof Promise&&(o=await o);const l=performance.now();return i.set(e,s-n),r.set(e,l-n),o}}},719:function(e,t,n){"use strict";n.r(t),n.d(t,{promiseLoadTime:function(){return i},promiseResolveTime:function(){return r},promiseLoadTrace:function(){return a}});const i=new Map,r=new Map,a=async(e,t)=>{const{getGeneralSettings:a}=await Promise.resolve().then(n.bind(n,6171));if(!a().devMode)return t();const o=performance.now(),s=t(),l=performance.now(),c=await s,d=performance.now();return i.set({name:e},l-o),r.set({name:e},d-o),c}},9476:function(e,t,n){"use strict";n.r(t),n.d(t,{logStats:function(){return i}});const i=(e,t)=>{const n=[...t.entries()],i=n.reduce(((e,t)=>e+t[1]),0);console.groupCollapsed(`${e} time:`,Math.round(100*i)/100+"ms",`for ${n.length} items`),n.forEach((([e,t])=>{console.log(`%c${e.name} %c${Math.round(100*t)/100}ms ${Math.round(t/i*1e4)/100}% %c`,"color: #00A0D8","color: #888","color: unset")})),console.groupEnd()}},391:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RuntimeLibrary:function(){return RuntimeLibrary},protobufLibrary:function(){return protobufLibrary},JSZipLibrary:function(){return JSZipLibrary},SortableJSLibrary:function(){return SortableJSLibrary}});var _ajax__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7195);function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class RuntimeLibrary{constructor(e){this.config=e,_defineProperty(this,"modulePromise",void 0)}async then(resolve,reject){try{const{url:url,getModule:getModule}=this.config;this.modulePromise||(this.modulePromise=(async()=>{console.log(`[Runtime Library] Start download from ${url}`);const code=await(0,_ajax__WEBPACK_IMPORTED_MODULE_0__.monkey)({url:url});return console.log(`[Runtime Library] Downloaded from ${url} , length = ${code.length}`),function runEval(){return eval(code);// eslint-disable-next-line no-extra-bind }.bind(window)(),getModule(window)})());const library=await this.modulePromise;return resolve(library)}catch(e){throw reject(e),e}}}const protobufLibrary=new RuntimeLibrary({url:"https://cdn.jsdelivr.net/npm/protobufjs@6.10.1/dist/light/protobuf.min.js",getModule:e=>e.protobuf}),JSZipLibrary=new RuntimeLibrary({url:"https://cdn.jsdelivr.net/npm/jszip@3.7.1/dist/jszip.min.js",getModule:e=>e.JSZip}),SortableJSLibrary=new RuntimeLibrary({url:"https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js",getModule:e=>e.Sortable})},5605:function(e,t,n){"use strict";n.r(t),n.d(t,{componentOptionsToSettings:function(){return o},componentToSettings:function(){return s},isUserComponent:function(){return l},isUserPlugin:function(){return c},getComponentSettings:function(){return u},getGeneralSettings:function(){return p},isComponentEnabled:function(){return f}});var i=n(8171),r=n(6171),a=n(1906);const o=e=>lodash.fromPairs(Object.entries(e).map((([e,t])=>[e,t.defaultValue]))),s=e=>({enabled:e.enabledByDefault??!0,options:e.options?o(e.options):{}}),l=e=>{const t="string"==typeof e?e:e.name;return Boolean(r.settings.userComponents[t])},c=e=>{const t="string"==typeof e?e:e.name;return Boolean(r.settings.userPlugins[t])},d={enabled:!1,options:new Proxy({},{get:()=>!1})},u=e=>{if("string"==typeof e){const t=i.componentsMap[e];if(void 0===t)return r.settings.components.settingsPanel.options.devMode&&console.warn("No settings found for component:",e),d;e=t}if(l(e)){const{name:t}=e;return r.settings.userComponents[t]?.settings??d}return r.settings.components[e.name]},p=()=>u("settingsPanel").options,f=e=>("string"==typeof e&&(e=i.componentsMap[e]),(!e.urlExclude||!e.urlExclude.some(a.matchUrlPattern))&&((!e.urlInclude||!e.urlInclude.every(lodash.negate(a.matchUrlPattern)))&&(!1===e.configurable?e.enabledByDefault??!0:u(e).enabled)))},6171:function(e,t,n){"use strict";n.r(t),n.d(t,{isProxy:function(){return c},createProxy:function(){return d},defaultSettings:function(){return u},addSettingsChangeListener:function(){return p},removeSettingsChangeListener:function(){return f},addComponentListener:function(){return m},removeComponentListener:function(){return g},settings:function(){return b},componentOptionsToSettings:function(){return a.componentOptionsToSettings},componentToSettings:function(){return a.componentToSettings},getComponentSettings:function(){return a.getComponentSettings},getGeneralSettings:function(){return a.getGeneralSettings},isComponentEnabled:function(){return a.isComponentEnabled},isUserComponent:function(){return a.isUserComponent},isUserPlugin:function(){return a.isUserPlugin}});var i=n(8171),r=n(1623),a=n(5605);let o={userStyles:{},userPlugins:{},userComponents:{},components:{},plugins:{}},s=!1;const l=new Map,c=Symbol("isProxy"),d=(e,t)=>{const n=(e,i,r=[])=>{for(const[t,a]of Object.entries(e))"object"!=typeof a||a instanceof RegExp||(e[t]=n(a,i||t,[...r,t]));return new Proxy(e,{get:(e,t)=>t===c||e[t],set(e,a,o){"object"!=typeof o||o instanceof RegExp||!0===o[c]||(o=n(o,i||a,[...r,a]));const s=e[a];return e[a]=o,t(o,s,i||a,[...r,a]),!0},deleteProperty(e,n){const a=e[n];return delete e[n],t(void 0,a,i||n,[...r,n]),!0}})};return n(e)};r.plugins.forEach((e=>{o.plugins[e.name]=!0})),i.components.forEach((e=>{o.components[e.name]=(0,a.componentToSettings)(e)}));const u=lodash.cloneDeep(o);o=d((e=>{for(const[t,n]of Object.entries(e)){let i;const r=GM_getValue(t,n);i="object"==typeof r?lodash.defaultsDeep(r,n):r,e[t]=i}return e})(o),((e,t,n,i=[])=>{if(s){GM_setValue(n.toString(),o[n.toString()]);const r=i.join(".");if(i.length>1){const e=i.slice(0,i.length-1).join("."),t=lodash.get(o,e);if(Array.isArray(t)||lodash.isPlainObject(t)){l.get(e)?.forEach((e=>e(t,null,n,i)))}}l.get(r)?.forEach((r=>r(e,t,n,i)))}}));for(const[e,t]of Object.entries(o))GM_setValue(e,t);const p=(e,t,n=!1)=>{const i=l.get(e);if(i?i.push(t):l.set(e,[t]),n){const n=lodash.get(o,e);t(n,n,"",[])}},f=(e,t)=>{const n=l.get(e);if(!n)return;const i=n.indexOf(t);-1!==i&&n.splice(i,1)},h=e=>{const[t,n]=e.split(".");return(0,a.isUserComponent)(t)?void 0===n?`userComponents.${t}.settings.enabled`:`userComponents.${t}.settings.options.${n}`:void 0===n?`components.${t}.enabled`:`components.${t}.options.${n}`},m=(e,t,n=!1)=>{p(h(e),t,n)},g=(e,t)=>{f(h(e),t)};s=!0;const b=o},5550:function(e,t,n){"use strict";n.r(t),n.d(t,{sq:function(){return o},select:function(){return c},selectLazy:function(){return d},selectAll:function(){return f},selectAllLazy:function(){return h},count:function(){return m},hasVideo:function(){return b}});var i=n(3420),r=n(1906);const a={maxRetry:15,queryInterval:1e3},o=(e,t=(e=>Boolean(e)),n=a)=>{const i={...a,...n};return new Promise((n=>{let a=null,o=0;const s=()=>{n(a)},l=()=>{o>i.maxRetry?n(null):(a=e(),!0===t(a,s)?n(a):setTimeout((()=>{"undefined"!=typeof document?(0,r.waitForForeground)((()=>{o++,l()})):l()}),i.queryInterval))};l()}))},s=new Map,l=(e,t)=>{let n;if("string"==typeof e){if(s.has(e))return s.get(e);n=()=>document.querySelector((0,r.bwpVideoFilter)(e))}else n=e;const i=t(n);if("string"==typeof e){const t=i.then((t=>(s.delete(e),t)));return s.set(e,t),t}return i},c=(e,t)=>l(e,(e=>o(e,(e=>null!=e),t))),d=e=>l(e,(e=>new Promise((t=>{(0,i.allMutations)((()=>{const n=e();null!=n&&t(n)}))})))),u=new Map,p=(e,t)=>{let n;if("string"==typeof e){if(u.has(e))return u.get(e);n=()=>Array.from(document.querySelectorAll((0,r.bwpVideoFilter)(e)))}else n=e;const i=e=>null===e?[]:e,a=t(n);if("string"==typeof e){const t=a.then((t=>(u.delete(e),i(t))));return u.set(e,t),t}return a.then((e=>i(e)))},f=(e,t)=>p(e,(e=>o(e,(e=>e.length>0),t))),h=e=>p(e,(e=>new Promise((t=>{(0,i.allMutations)((()=>{const n=e();null!=n&&t(n)}))})))),m=(e,t,n)=>o(e,(e=>e.length===t),n);let g;const b=async()=>{g||(g=new Promise((e=>(0,i.videoChange)((()=>e(unsafeWindow.cid))))));const e=await g;return Boolean(e)}},6182:function(e,t,n){"use strict";n.r(t),n.d(t,{getDefaultStyleID:function(){return r},addStyle:function(){return a},addImportantStyle:function(){return o},removeStyle:function(){return s},loadInstantStyle:function(){return l},preloadStyles:function(){return c},loadAllCustomStyles:function(){return d}});var i=n(7177);const r=e=>e.replace(/([a-z][A-Z])/g,(e=>`${e[0]}-${e[1].toLowerCase()}`)),a=(e,t,n)=>{const i=t?r(t):null,a=dq(`#${i}`);if(!a||!t){const t=document.createElement("style");return t.id=i,t.textContent=e,(n||document.head).insertAdjacentElement("beforeend",t),t}return a},o=(e,t)=>a(e,t,document.body),s=(...e)=>{e.forEach((e=>{const t=r(e);dqa(`#${t}`).forEach((e=>e.remove()))}))},l=async(e,t={head:document.head,body:document.body})=>{e.instantStyles?.forEach((async e=>{const n=document.createElement("style");if(n.id=r(e.name),"string"==typeof e.style)n.textContent=e.style;else{const{default:t}=await e.style();n.textContent=t}e.important?t.body.appendChild(n):t.head.appendChild(n)}))},c=lodash.once((async()=>{const{LoadingMode:e}=await Promise.resolve().then(n.bind(n,4345)),{addHook:t}=await Promise.resolve().then(n.bind(n,9543)),{getGeneralSettings:a,settings:o,isComponentEnabled:c,isUserComponent:d,addComponentListener:u,removeComponentListener:p}=await Promise.resolve().then(n.bind(n,6171)),f=async()=>{const{components:e}=await Promise.resolve().then(n.bind(n,8171)),a=document.createDocumentFragment(),f=document.createDocumentFragment();await Promise.all(e.map((e=>{const n=t=>t?l(e):e.instantStyles?.forEach((e=>s(e.name)));if(u(e.name,n),d(e)&&t("userComponents.remove",{after:t=>{t.name===e.name&&p(e.name,n)}}),c(e))return l(e,{head:a,body:f})})));const{UserStyleMode:h}=await Promise.resolve().then(n.bind(n,8900));Object.values(o.userStyles).filter((e=>e.mode===h.Instant)).forEach((e=>{const t=document.createElement("style");t.id=r(e.name),t.textContent=e.style,a.appendChild(t)})),document.head.appendChild(a),(0,i.contentLoaded)((()=>document.body.appendChild(f)))};a().styleLoadingMode===e.Delay?await(0,i.contentLoaded)(f):await f(),(0,i.contentLoaded)((async()=>{const{initColors:e}=await Promise.resolve().then(n.bind(n,8208)),{initMdiStyle:t}=await Promise.resolve().then(n.bind(n,3007));document.head.appendChild(e()),document.head.appendChild(t())}))})),d=async()=>{const{settings:e}=await Promise.resolve().then(n.bind(n,6171)),{UserStyleMode:t}=await Promise.resolve().then(n.bind(n,8900));(0,i.contentLoaded)((()=>{Object.values(e.userStyles).filter((e=>e.mode===t.Important)).forEach((e=>{a(e.style,e.name,document.body)}))})),Object.values(e.userStyles).filter((e=>e.mode===t.Default)).forEach((e=>{a(e.style,e.name,document.head)}))}},6314:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{TextColor:function(){return i}}),function(e){e.Auto="自动",e.White="白色",e.Black="黑色"}(i||(i={}))},8208:function(e,t,n){"use strict";n.r(t),n.d(t,{initColors:function(){return l}});var i=n(6767),r=n.n(i),a=n(6171);const o=(e,t)=>{const n=t.hue()-e.hue(),i=100*((t.saturationv()-e.saturationv())/100+1),r=e=>Math.round(10*e)/10;return`hue-rotate(${r(n)}deg) saturate(${r(i)}%)`};var s=n(6314);const l=()=>{const e=document.createElement("style"),t=new Map,n=(e,n)=>{t.set(e,n)},i=lodash.debounce((()=>{e.textContent=`\n html {\n ${[...t.entries()].map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `.trim()}),100);return(0,a.addComponentListener)("settingsPanel.themeColor",(e=>{n("--theme-color",e);for(let t=10;t<=90;t+=10){const i=r()(e,"hex");n(`--theme-color-${t}`,i.alpha(t/100).rgb().string()),n(`--theme-color-lightness-${t}`,i.lightness(t).rgb().toString())}n("--pink-image-filter",o(r()({r:251,g:113,b:152},"rgb"),r()(e,"hex"))),n("--blue-image-filter",o(r()({r:0,g:160,b:213},"rgb"),r()(e,"hex"))),i()}),!0),(0,a.addComponentListener)("settingsPanel.accentColor",(e=>{n("--accent-color",e),i()}),!0),(0,a.addComponentListener)("settingsPanel.textColor",(e=>{let t;t=e===s.TextColor.Auto?r()(a.settings.themeColor).isLight()?"black":"white":e===s.TextColor.Black?"black":"white",n("--text-color",t),n("--foreground-color",t),n("--foreground-color-d",r()(t,"keyword").alpha(.875).rgb().string()),n("--foreground-color-b",r()(t,"keyword").alpha(.75).rgb().string()),n("--brightness",("black"===t?"100":"0")+"%"),n("--invert-filter","black"===t?"invert(0)":"invert(1)"),i()}),!0),e}},5683:function(e,t,n){"use strict";n.r(t),n.d(t,{Toast:function(){return b},ToastType:function(){return m}});var i=n(1906),r=n(8333),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition-group",{staticClass:"toast-card-container",attrs:{name:"toast-card-container",tag:"div"}},e._l(e.cards,(function(e){return n("ToastCard",{key:e.key,attrs:{"data-key":e.key,card:e}})})),1)};a._withStripped=!0;var o=Vue.extend({components:{ToastCard:()=>Promise.resolve().then(n.bind(n,7300)).then((e=>e.default))},data:()=>({cards:[]})}),s=n(3379),l=n.n(s),c=n(848),d=n.n(c),u={insert:"head",singleton:!1},p=(l()(d(),u),d().locals,(0,n(1900).Z)(o,a,[],!1,null,null,null));p.options.__file="src/core/toast/ToastCardContainer.vue";var f=p.exports;function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let m,g;!function(e){e.Default="default",e.Info="info",e.Success="success",e.Error="error"}(m||(m={}));class b{constructor(e="",t="",n=m.Default){this.message=e,this.title=t,this.type=n,h(this,"durationNumber",3e3),h(this,"durationTimeout",0),h(this,"creationTime",Number(new Date)),h(this,"randomKey",Math.floor(Math.random()*(Number.MAX_SAFE_INTEGER+1)))}static get containerVM(){return g||b.createToastContainer(),g}static createToastContainer(){dq(".toast-card-container")||(g=(0,i.mountVueComponent)(f),document.body.insertAdjacentElement("beforeend",g.$el))}get element(){return dq(`.toast-card[data-key='${this.key}']`)}get key(){return`${this.creationTime}[${this.randomKey}]`}get duration(){return this.durationNumber}set duration(e){this.durationNumber=e,this.durationTimeout&&this.clearDuration(),this.setDuration()}show(){b.containerVM.cards.unshift(this),this.setDuration()}dismiss(){b.containerVM.cards.includes(this)&&b.containerVM.cards.splice(b.containerVM.cards.indexOf(this),1),this.clearDuration()}setDuration(){void 0!==this.durationNumber&&(this.durationTimeout=window.setTimeout((()=>this.dismiss()),this.durationNumber))}clearDuration(){window.clearTimeout(this.durationTimeout),this.durationTimeout=0}static internalShow(e,t,n,i){const r=new b(e,t,i);return r.duration=n,r.show(),r}static show(e,t,n){return this.internalShow(e,t,n,m.Default)}static info(e,t,n){return this.internalShow(e,t,n,m.Info)}static success(e,t,n){return this.internalShow(e,t,n,m.Success)}static error(e,t,n){return this.internalShow(e,t,n,m.Error)}static mini(...e){return(0,r.$)(...e)}}},8333:function(e,t,n){"use strict";function i(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function a(e){var t=r(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function o(e){return e instanceof r(e).Element||e instanceof Element}function s(e){return e instanceof r(e).HTMLElement||e instanceof HTMLElement}function l(e){return"undefined"!=typeof ShadowRoot&&(e instanceof r(e).ShadowRoot||e instanceof ShadowRoot)}function c(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function u(e){return i(d(e)).left+a(e).scrollLeft}function p(e){return r(e).getComputedStyle(e)}function f(e){var t=p(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function h(e,t,n){void 0===n&&(n=!1);var o,l,p=d(t),h=i(e),m=s(t),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(m||!m&&!n)&&(("body"!==c(t)||f(p))&&(g=(o=t)!==r(o)&&s(o)?{scrollLeft:(l=o).scrollLeft,scrollTop:l.scrollTop}:a(o)),s(t)?((b=i(t)).x+=t.clientLeft,b.y+=t.clientTop):p&&(b.x=u(p))),{x:h.left+g.scrollLeft-b.x,y:h.top+g.scrollTop-b.y,width:h.width,height:h.height}}function m(e){var t=i(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function g(e){return"html"===c(e)?e:e.assignedSlot||e.parentNode||(l(e)?e.host:null)||d(e)}function b(e){return["html","body","#document"].indexOf(c(e))>=0?e.ownerDocument.body:s(e)&&f(e)?e:b(g(e))}function v(e,t){var n;void 0===t&&(t=[]);var i=b(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),o=r(i),s=a?[o].concat(o.visualViewport||[],f(i)?i:[]):i,l=t.concat(s);return a?l:l.concat(v(g(s)))}function y(e){return["table","td","th"].indexOf(c(e))>=0}function w(e){return s(e)&&"fixed"!==p(e).position?e.offsetParent:null}function x(e){for(var t=r(e),n=w(e);n&&y(n)&&"static"===p(n).position;)n=w(n);return n&&("html"===c(n)||"body"===c(n)&&"static"===p(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===p(e).position)return null;for(var n=g(e);s(n)&&["html","body"].indexOf(c(n))<0;){var i=p(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}n.d(t,{$:function(){return st}});var k="top",_="bottom",C="right",S="left",E="auto",$=[k,_,C,S],A="start",I="end",T="viewport",O="popper",L=$.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+I])}),[]),M=[].concat($,[E]).reduce((function(e,t){return e.concat([t,t+"-"+A,t+"-"+I])}),[]),P=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function z(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}var D={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function U(e){var t,n=e.reference,i=e.element,r=e.placement,a=r?q(r):null,o=r?F(r):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case k:t={x:s,y:n.y-i.height};break;case _:t={x:s,y:n.y+n.height};break;case C:t={x:n.x+n.width,y:l};break;case S:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?R(a):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case A:t[c]=t[c]-(n[d]/2-i[d]/2);break;case I:t[c]=t[c]+(n[d]/2-i[d]/2)}}return t}// eslint-disable-next-line import/no-unused-modules